diff --git a/package-lock.json b/package-lock.json index 1d24fa6b..f5bbb29a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1969,7 +1969,7 @@ "dependencies": { "minimist": { "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", "dev": true } diff --git a/src/core/protocol/routes/search/MultiSearchRequest.ts b/src/core/protocol/routes/search/MultiSearchRequest.ts index a1924b53..d8b4c207 100644 --- a/src/core/protocol/routes/search/MultiSearchRequest.ts +++ b/src/core/protocol/routes/search/MultiSearchRequest.ts @@ -13,6 +13,7 @@ * this program. If not, see . */ import {SCAbstractRoute, SCRouteHttpVerbs} from '../../../Route'; +import {SCMap} from '../../../types/Map'; import { SCInternalServerErrorResponse, SCMethodNotAllowedErrorResponse, @@ -33,9 +34,7 @@ import {SCSearchQuery} from './SearchRequest'; * * @validatable */ -export interface SCMultiSearchRequest { - [k: string]: SCSearchQuery; -} +export type SCMultiSearchRequest = SCMap; /** * Route for submission of multiple search requests at once diff --git a/src/core/protocol/routes/search/MultiSearchResponse.ts b/src/core/protocol/routes/search/MultiSearchResponse.ts index bf3eef5d..1c14a3e3 100644 --- a/src/core/protocol/routes/search/MultiSearchResponse.ts +++ b/src/core/protocol/routes/search/MultiSearchResponse.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 StApps + * Copyright (C) 2018-2019 StApps * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation, version 3. @@ -12,6 +12,7 @@ * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ +import {SCMap} from '../../../types/Map'; import {SCSearchResult} from './SearchResponse'; /** @@ -21,6 +22,4 @@ import {SCSearchResult} from './SearchResponse'; * * @validatable */ -export interface SCMultiSearchResponse { - [k: string]: SCSearchResult; -} +export type SCMultiSearchResponse = SCMap; diff --git a/src/core/types/config/Backend.ts b/src/core/types/config/Backend.ts index 0efd305d..858e60ae 100644 --- a/src/core/types/config/Backend.ts +++ b/src/core/types/config/Backend.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 StApps + * Copyright (C) 2018-2019 StApps * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation, version 3. @@ -79,19 +79,6 @@ export interface SCBackendConfigurationSortableField { } -/** - * Values of a field that should be boosted by the given factors - */ -export interface SCBackendConfigurationSearchBoostingValues { - - /** - * Value of the field that should be boosted by the given number - * - * For example `"SS 2019": 2` - */ - [valueOfField: string]: number; -} - /** * A boosting configuration for one SCType */ @@ -103,11 +90,15 @@ export interface SCBackendConfigurationSearchBoosting { factor: number; /** + * Outer-Map: * Fields of this type that should be boosted if they match a given value - * * For nest fields you can use the `.` as a separator. For example `academicTerms.acronym` + * + * Inner-map: + * Value of the field that should be boosted by the given number + * For example `"SS 2019": 2` */ - fields?: SCMap; + fields?: SCMap>; /** * Type of things the factor should be applied to @@ -163,14 +154,10 @@ export interface SCBackendInternalConfiguration { /** * Configuration of the database */ -export interface SCBackendConfigurationDatabaseConfiguration { +export interface SCBackendConfigurationDatabaseConfiguration extends SCMap { /** * Name of the database used by the backend */ name: string; - /** - * Allow additional configuration for the database - */ - [key: string]: any; } diff --git a/src/core/types/filters/Abstract.ts b/src/core/types/filters/Abstract.ts index 5d2efaed..9cc3fbe7 100644 --- a/src/core/types/filters/Abstract.ts +++ b/src/core/types/filters/Abstract.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 StApps + * Copyright (C) 2018-2019 StApps * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation, version 3. @@ -12,6 +12,7 @@ * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ +import {SCMap} from '../Map'; /** * All available filter types */ @@ -47,9 +48,7 @@ export interface SCSearchAbstractFilter; /** * Available filter instructions diff --git a/src/core/types/sorts/Abstract.ts b/src/core/types/sorts/Abstract.ts index 26a93f9e..d25cf1d6 100644 --- a/src/core/types/sorts/Abstract.ts +++ b/src/core/types/sorts/Abstract.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 StApps + * Copyright (C) 2018-2019 StApps * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation, version 3. @@ -13,6 +13,7 @@ * this program. If not, see . */ import {SCThingsField} from '../../Classes'; +import {SCMap} from '../Map'; import {SCDistanceSort} from './Distance'; import {SCDucetSort} from './Ducet'; import {SCPriceSort} from './Price'; @@ -40,12 +41,7 @@ export interface SCSearchAbstractSort { /** * Map of arguments for the sort instruction */ -export interface SCSearchAbstractSortArguments { - /** - * Index signature for additional arguments - */ - [key: string]: any; - +export interface SCSearchAbstractSortArguments extends SCMap { /** * Field to sort by */