@sinequa/atomic 0.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/dist/atomic.js +887 -0
- package/dist/atomic.umd.cjs +1 -0
- package/dist/auth/auth.d.ts +39 -0
- package/dist/auth/auth.d.ts.map +1 -0
- package/dist/auth/index.d.ts +2 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/configurations/global.config.d.ts +35 -0
- package/dist/configurations/global.config.d.ts.map +1 -0
- package/dist/configurations/index.d.ts +2 -0
- package/dist/configurations/index.d.ts.map +1 -0
- package/dist/helpers/column-resolver.d.ts +10 -0
- package/dist/helpers/column-resolver.d.ts.map +1 -0
- package/dist/helpers/column-resolver.test.d.ts +2 -0
- package/dist/helpers/column-resolver.test.d.ts.map +1 -0
- package/dist/helpers/index.d.ts +5 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/metadata.d.ts +13 -0
- package/dist/helpers/metadata.d.ts.map +1 -0
- package/dist/helpers/ts-helper.d.ts +8 -0
- package/dist/helpers/ts-helper.d.ts.map +1 -0
- package/dist/helpers/utils.d.ts +38 -0
- package/dist/helpers/utils.d.ts.map +1 -0
- package/dist/helpers/utils.test.d.ts +2 -0
- package/dist/helpers/utils.test.d.ts.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/types/aggregations/Aggregation.d.ts +38 -0
- package/dist/types/aggregations/Aggregation.d.ts.map +1 -0
- package/dist/types/aggregations/AggregationItem.d.ts +30 -0
- package/dist/types/aggregations/AggregationItem.d.ts.map +1 -0
- package/dist/types/aggregations/AggregationOptions.d.ts +14 -0
- package/dist/types/aggregations/AggregationOptions.d.ts.map +1 -0
- package/dist/types/aggregations/ListAggregation.d.ts +6 -0
- package/dist/types/aggregations/ListAggregation.d.ts.map +1 -0
- package/dist/types/aggregations/TreeAggregation.d.ts +13 -0
- package/dist/types/aggregations/TreeAggregation.d.ts.map +1 -0
- package/dist/types/aggregations/TreeAggregationNode.d.ts +27 -0
- package/dist/types/aggregations/TreeAggregationNode.d.ts.map +1 -0
- package/dist/types/aggregations/index.d.ts +7 -0
- package/dist/types/aggregations/index.d.ts.map +1 -0
- package/dist/types/api-endpoints.d.ts +4 -0
- package/dist/types/api-endpoints.d.ts.map +1 -0
- package/dist/types/audit/AuditEvent.d.ts +15 -0
- package/dist/types/audit/AuditEvent.d.ts.map +1 -0
- package/dist/types/audit/AuditEventType.d.ts +114 -0
- package/dist/types/audit/AuditEventType.d.ts.map +1 -0
- package/dist/types/audit/AuditRecord.d.ts +9 -0
- package/dist/types/audit/AuditRecord.d.ts.map +1 -0
- package/dist/types/audit/index.d.ts +5 -0
- package/dist/types/audit/index.d.ts.map +1 -0
- package/dist/types/chunks/index.d.ts +3 -0
- package/dist/types/chunks/index.d.ts.map +1 -0
- package/dist/types/chunks/text-chunk.d.ts +11 -0
- package/dist/types/chunks/text-chunk.d.ts.map +1 -0
- package/dist/types/chunks/text-location.d.ts +7 -0
- package/dist/types/chunks/text-location.d.ts.map +1 -0
- package/dist/types/config/CCAggregation.d.ts +47 -0
- package/dist/types/config/CCAggregation.d.ts.map +1 -0
- package/dist/types/config/CCApp.d.ts +87 -0
- package/dist/types/config/CCApp.d.ts.map +1 -0
- package/dist/types/config/CCAppPreLogin.d.ts +9 -0
- package/dist/types/config/CCAppPreLogin.d.ts.map +1 -0
- package/dist/types/config/CCAppRefresh.d.ts +10 -0
- package/dist/types/config/CCAppRefresh.d.ts.map +1 -0
- package/dist/types/config/CCAutocomplete.d.ts +32 -0
- package/dist/types/config/CCAutocomplete.d.ts.map +1 -0
- package/dist/types/config/CCColumn.d.ts +15 -0
- package/dist/types/config/CCColumn.d.ts.map +1 -0
- package/dist/types/config/CCColumnInfo.d.ts +38 -0
- package/dist/types/config/CCColumnInfo.d.ts.map +1 -0
- package/dist/types/config/CCColumnsInfo.d.ts +8 -0
- package/dist/types/config/CCColumnsInfo.d.ts.map +1 -0
- package/dist/types/config/CCConfig.d.ts +15 -0
- package/dist/types/config/CCConfig.d.ts.map +1 -0
- package/dist/types/config/CCIndex.d.ts +16 -0
- package/dist/types/config/CCIndex.d.ts.map +1 -0
- package/dist/types/config/CCLabels.d.ts +43 -0
- package/dist/types/config/CCLabels.d.ts.map +1 -0
- package/dist/types/config/CCList.d.ts +16 -0
- package/dist/types/config/CCList.d.ts.map +1 -0
- package/dist/types/config/CCListItem.d.ts +14 -0
- package/dist/types/config/CCListItem.d.ts.map +1 -0
- package/dist/types/config/CCQuery.d.ts +34 -0
- package/dist/types/config/CCQuery.d.ts.map +1 -0
- package/dist/types/config/CCRFM.d.ts +11 -0
- package/dist/types/config/CCRFM.d.ts.map +1 -0
- package/dist/types/config/CCRFMAction.d.ts +12 -0
- package/dist/types/config/CCRFMAction.d.ts.map +1 -0
- package/dist/types/config/CCScope.d.ts +28 -0
- package/dist/types/config/CCScope.d.ts.map +1 -0
- package/dist/types/config/CCSortingChoice.d.ts +32 -0
- package/dist/types/config/CCSortingChoice.d.ts.map +1 -0
- package/dist/types/config/CCTab.d.ts +35 -0
- package/dist/types/config/CCTab.d.ts.map +1 -0
- package/dist/types/config/CCTabSearch.d.ts +46 -0
- package/dist/types/config/CCTabSearch.d.ts.map +1 -0
- package/dist/types/config/CCWebService.d.ts +10 -0
- package/dist/types/config/CCWebService.d.ts.map +1 -0
- package/dist/types/config/EngineType.d.ts +22 -0
- package/dist/types/config/EngineType.d.ts.map +1 -0
- package/dist/types/config/EngineTypeModifier.d.ts +24 -0
- package/dist/types/config/EngineTypeModifier.d.ts.map +1 -0
- package/dist/types/config/ExportDialogModel.d.ts +13 -0
- package/dist/types/config/ExportDialogModel.d.ts.map +1 -0
- package/dist/types/config/ExportOutputFormat.d.ts +10 -0
- package/dist/types/config/ExportOutputFormat.d.ts.map +1 -0
- package/dist/types/config/ExportSourceType.d.ts +10 -0
- package/dist/types/config/ExportSourceType.d.ts.map +1 -0
- package/dist/types/config/QueryPrecision.d.ts +14 -0
- package/dist/types/config/QueryPrecision.d.ts.map +1 -0
- package/dist/types/config/QueryStrategy.d.ts +18 -0
- package/dist/types/config/QueryStrategy.d.ts.map +1 -0
- package/dist/types/config/SpellingCorrectionMode.d.ts +28 -0
- package/dist/types/config/SpellingCorrectionMode.d.ts.map +1 -0
- package/dist/types/config/index.d.ts +34 -0
- package/dist/types/config/index.d.ts.map +1 -0
- package/dist/types/credentials.d.ts +5 -0
- package/dist/types/credentials.d.ts.map +1 -0
- package/dist/types/filters/BetweenFilter.d.ts +7 -0
- package/dist/types/filters/BetweenFilter.d.ts.map +1 -0
- package/dist/types/filters/ExprFilter.d.ts +6 -0
- package/dist/types/filters/ExprFilter.d.ts.map +1 -0
- package/dist/types/filters/Filter.d.ts +10 -0
- package/dist/types/filters/Filter.d.ts.map +1 -0
- package/dist/types/filters/InFilter.d.ts +6 -0
- package/dist/types/filters/InFilter.d.ts.map +1 -0
- package/dist/types/filters/NotNullFilter.d.ts +5 -0
- package/dist/types/filters/NotNullFilter.d.ts.map +1 -0
- package/dist/types/filters/NullFilter.d.ts +5 -0
- package/dist/types/filters/NullFilter.d.ts.map +1 -0
- package/dist/types/filters/SimpleFilter.d.ts +5 -0
- package/dist/types/filters/SimpleFilter.d.ts.map +1 -0
- package/dist/types/filters/index.d.ts +9 -0
- package/dist/types/filters/index.d.ts.map +1 -0
- package/dist/types/filters/legacy-filters.d.ts +13 -0
- package/dist/types/filters/legacy-filters.d.ts.map +1 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/interfaces/Open.d.ts +14 -0
- package/dist/types/interfaces/Open.d.ts.map +1 -0
- package/dist/types/interfaces/Query.d.ts +136 -0
- package/dist/types/interfaces/Query.d.ts.map +1 -0
- package/dist/types/interfaces/Select.d.ts +15 -0
- package/dist/types/interfaces/Select.d.ts.map +1 -0
- package/dist/types/interfaces/index.d.ts +4 -0
- package/dist/types/interfaces/index.d.ts.map +1 -0
- package/dist/types/interfaces/json.d.ts +7 -0
- package/dist/types/interfaces/json.d.ts.map +1 -0
- package/dist/types/labels/label-rights.d.ts +5 -0
- package/dist/types/labels/label-rights.d.ts.map +1 -0
- package/dist/types/link-results/index.d.ts +3 -0
- package/dist/types/link-results/index.d.ts.map +1 -0
- package/dist/types/link-results/link-results.d.ts +12 -0
- package/dist/types/link-results/link-results.d.ts.map +1 -0
- package/dist/types/link-results/links-results.d.ts +9 -0
- package/dist/types/link-results/links-results.d.ts.map +1 -0
- package/dist/types/preview/CategoryHighlightData.d.ts +12 -0
- package/dist/types/preview/CategoryHighlightData.d.ts.map +1 -0
- package/dist/types/preview/CustomHighlights.d.ts +8 -0
- package/dist/types/preview/CustomHighlights.d.ts.map +1 -0
- package/dist/types/preview/HighlightDataPerCategory.d.ts +6 -0
- package/dist/types/preview/HighlightDataPerCategory.d.ts.map +1 -0
- package/dist/types/preview/HighlightDataPerLocation.d.ts +11 -0
- package/dist/types/preview/HighlightDataPerLocation.d.ts.map +1 -0
- package/dist/types/preview/HighlightValue.d.ts +10 -0
- package/dist/types/preview/HighlightValue.d.ts.map +1 -0
- package/dist/types/preview/Location.d.ts +8 -0
- package/dist/types/preview/Location.d.ts.map +1 -0
- package/dist/types/preview/PreviewData.d.ts +15 -0
- package/dist/types/preview/PreviewData.d.ts.map +1 -0
- package/dist/types/preview/index.d.ts +8 -0
- package/dist/types/preview/index.d.ts.map +1 -0
- package/dist/types/principal/Principal.d.ts +29 -0
- package/dist/types/principal/Principal.d.ts.map +1 -0
- package/dist/types/principal/PrincipalChangedEvent.d.ts +11 -0
- package/dist/types/principal/PrincipalChangedEvent.d.ts.map +1 -0
- package/dist/types/principal/PrincipalEvent.d.ts +7 -0
- package/dist/types/principal/PrincipalEvent.d.ts.map +1 -0
- package/dist/types/principal/PrincipalParams.d.ts +8 -0
- package/dist/types/principal/PrincipalParams.d.ts.map +1 -0
- package/dist/types/principal/PrincipalUserIdsParams.d.ts +6 -0
- package/dist/types/principal/PrincipalUserIdsParams.d.ts.map +1 -0
- package/dist/types/principal/PrincipalUserInfo.d.ts +11 -0
- package/dist/types/principal/PrincipalUserInfo.d.ts.map +1 -0
- package/dist/types/principal/index.d.ts +7 -0
- package/dist/types/principal/index.d.ts.map +1 -0
- package/dist/types/search/AccessListPrincipal.d.ts +17 -0
- package/dist/types/search/AccessListPrincipal.d.ts.map +1 -0
- package/dist/types/search/AccessLists.d.ts +9 -0
- package/dist/types/search/AccessLists.d.ts.map +1 -0
- package/dist/types/search/Answer.d.ts +16 -0
- package/dist/types/search/Answer.d.ts.map +1 -0
- package/dist/types/search/Article.d.ts +194 -0
- package/dist/types/search/Article.d.ts.map +1 -0
- package/dist/types/search/Attributes.d.ts +17 -0
- package/dist/types/search/Attributes.d.ts.map +1 -0
- package/dist/types/search/DidYouMean.d.ts +10 -0
- package/dist/types/search/DidYouMean.d.ts.map +1 -0
- package/dist/types/search/DidYouMeanItem.d.ts +17 -0
- package/dist/types/search/DidYouMeanItem.d.ts.map +1 -0
- package/dist/types/search/DidYouMeanKind.d.ts +8 -0
- package/dist/types/search/DidYouMeanKind.d.ts.map +1 -0
- package/dist/types/search/DocumentAccessLists.d.ts +10 -0
- package/dist/types/search/DocumentAccessLists.d.ts.map +1 -0
- package/dist/types/search/EntityItem.d.ts +26 -0
- package/dist/types/search/EntityItem.d.ts.map +1 -0
- package/dist/types/search/MatchLocationsPerPartname.d.ts +8 -0
- package/dist/types/search/MatchLocationsPerPartname.d.ts.map +1 -0
- package/dist/types/search/MatchingPassage.d.ts +11 -0
- package/dist/types/search/MatchingPassage.d.ts.map +1 -0
- package/dist/types/search/PartnameMatchLocations.d.ts +8 -0
- package/dist/types/search/PartnameMatchLocations.d.ts.map +1 -0
- package/dist/types/search/Passage.d.ts +8 -0
- package/dist/types/search/Passage.d.ts.map +1 -0
- package/dist/types/search/QueryAnalysis.d.ts +11 -0
- package/dist/types/search/QueryAnalysis.d.ts.map +1 -0
- package/dist/types/search/QueryAnalysisElement.d.ts +24 -0
- package/dist/types/search/QueryAnalysisElement.d.ts.map +1 -0
- package/dist/types/search/QueryIntent.d.ts +15 -0
- package/dist/types/search/QueryIntent.d.ts.map +1 -0
- package/dist/types/search/QueryIntentAction.d.ts +11 -0
- package/dist/types/search/QueryIntentAction.d.ts.map +1 -0
- package/dist/types/search/QueryIntentData.d.ts +27 -0
- package/dist/types/search/QueryIntentData.d.ts.map +1 -0
- package/dist/types/search/QueryIntentDatasets.d.ts +13 -0
- package/dist/types/search/QueryIntentDatasets.d.ts.map +1 -0
- package/dist/types/search/QueryIntentEntity.d.ts +27 -0
- package/dist/types/search/QueryIntentEntity.d.ts.map +1 -0
- package/dist/types/search/QueryIntentMatch.d.ts +17 -0
- package/dist/types/search/QueryIntentMatch.d.ts.map +1 -0
- package/dist/types/search/QueryIntentResponse.d.ts +9 -0
- package/dist/types/search/QueryIntentResponse.d.ts.map +1 -0
- package/dist/types/search/QueryIntentWord.d.ts +12 -0
- package/dist/types/search/QueryIntentWord.d.ts.map +1 -0
- package/dist/types/search/RFMActionDisplay.d.ts +16 -0
- package/dist/types/search/RFMActionDisplay.d.ts.map +1 -0
- package/dist/types/search/RFMData.d.ts +10 -0
- package/dist/types/search/RFMData.d.ts.map +1 -0
- package/dist/types/search/RFMDisplay.d.ts +18 -0
- package/dist/types/search/RFMDisplay.d.ts.map +1 -0
- package/dist/types/search/RelevantExtract.d.ts +11 -0
- package/dist/types/search/RelevantExtract.d.ts.map +1 -0
- package/dist/types/search/Result.d.ts +43 -0
- package/dist/types/search/Result.d.ts.map +1 -0
- package/dist/types/search/Tab.d.ts +25 -0
- package/dist/types/search/Tab.d.ts.map +1 -0
- package/dist/types/search/TermPresence.d.ts +11 -0
- package/dist/types/search/TermPresence.d.ts.map +1 -0
- package/dist/types/search/TopPassage.d.ts +13 -0
- package/dist/types/search/TopPassage.d.ts.map +1 -0
- package/dist/types/search/index.d.ts +34 -0
- package/dist/types/search/index.d.ts.map +1 -0
- package/dist/types/suggest/suggestion.d.ts +11 -0
- package/dist/types/suggest/suggestion.d.ts.map +1 -0
- package/dist/types/user-settings/user-settings.d.ts +14 -0
- package/dist/types/user-settings/user-settings.d.ts.map +1 -0
- package/dist/utils/aggregations.d.ts +51 -0
- package/dist/utils/aggregations.d.ts.map +1 -0
- package/dist/utils/array/bisect.d.ts +17 -0
- package/dist/utils/array/bisect.d.ts.map +1 -0
- package/dist/utils/concepts.d.ts +72 -0
- package/dist/utils/concepts.d.ts.map +1 -0
- package/dist/utils/date.d.ts +31 -0
- package/dist/utils/date.d.ts.map +1 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/query-params.d.ts +72 -0
- package/dist/utils/query-params.d.ts.map +1 -0
- package/dist/utils/syslang.d.ts +27 -0
- package/dist/utils/syslang.d.ts.map +1 -0
- package/dist/web-api/fetch-aggregation.d.ts +11 -0
- package/dist/web-api/fetch-aggregation.d.ts.map +1 -0
- package/dist/web-api/fetch-app.d.ts +17 -0
- package/dist/web-api/fetch-app.d.ts.map +1 -0
- package/dist/web-api/fetch-audit.d.ts +33 -0
- package/dist/web-api/fetch-audit.d.ts.map +1 -0
- package/dist/web-api/fetch-dataset.d.ts +43 -0
- package/dist/web-api/fetch-dataset.d.ts.map +1 -0
- package/dist/web-api/fetch-labels.d.ts +95 -0
- package/dist/web-api/fetch-labels.d.ts.map +1 -0
- package/dist/web-api/fetch-preview.d.ts +17 -0
- package/dist/web-api/fetch-preview.d.ts.map +1 -0
- package/dist/web-api/fetch-principal.d.ts +13 -0
- package/dist/web-api/fetch-principal.d.ts.map +1 -0
- package/dist/web-api/fetch-query-intent.d.ts +13 -0
- package/dist/web-api/fetch-query-intent.d.ts.map +1 -0
- package/dist/web-api/fetch-query.d.ts +27 -0
- package/dist/web-api/fetch-query.d.ts.map +1 -0
- package/dist/web-api/fetch-sponsored-links.d.ts +14 -0
- package/dist/web-api/fetch-sponsored-links.d.ts.map +1 -0
- package/dist/web-api/fetch-suggest.d.ts +55 -0
- package/dist/web-api/fetch-suggest.d.ts.map +1 -0
- package/dist/web-api/fetch-text-chunk.d.ts +16 -0
- package/dist/web-api/fetch-text-chunk.d.ts.map +1 -0
- package/dist/web-api/fetch-user-settings.d.ts +28 -0
- package/dist/web-api/fetch-user-settings.d.ts.map +1 -0
- package/dist/web-api/helpers.d.ts +35 -0
- package/dist/web-api/helpers.d.ts.map +1 -0
- package/dist/web-api/helpers.test.d.ts +2 -0
- package/dist/web-api/helpers.test.d.ts.map +1 -0
- package/dist/web-api/index.d.ts +15 -0
- package/dist/web-api/index.d.ts.map +1 -0
- package/package.json +41 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Aggregation, AggregationItem, TreeAggregationNode } from "../types/aggregations";
|
|
2
|
+
import { FilterOperator, LegacyFilter } from "../types/filters";
|
|
3
|
+
import { Suggestion } from "../types/suggest/suggestion";
|
|
4
|
+
export type DateFilter = {
|
|
5
|
+
label?: string;
|
|
6
|
+
operator?: FilterOperator;
|
|
7
|
+
value?: string;
|
|
8
|
+
filters?: LegacyFilter | LegacyFilter[];
|
|
9
|
+
display?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
hidden?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type FieldValue = string | number | Date | boolean | Array<string | {
|
|
14
|
+
value: string;
|
|
15
|
+
display?: string;
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* Translates an aggregation object to an array of DateFilter options.
|
|
19
|
+
*
|
|
20
|
+
* @param aggregation - The aggregation object to be translated.
|
|
21
|
+
* @param displayEmptyDistributionIntervals - A boolean indicating whether to display empty distribution intervals.
|
|
22
|
+
* @returns An array of DateFilter options.
|
|
23
|
+
*/
|
|
24
|
+
export declare function translateAggregationToDateOptions(aggregation: Aggregation, displayEmptyDistributionIntervals: boolean): DateFilter[];
|
|
25
|
+
/**
|
|
26
|
+
* Parses the value and operator from an AggregationItem and returns a LegacyFilter object.
|
|
27
|
+
*
|
|
28
|
+
* @param item - The AggregationItem to parse.
|
|
29
|
+
* @param aggregationColumn - The aggregation column.
|
|
30
|
+
* @returns The parsed LegacyFilter object.
|
|
31
|
+
* @throws Error if the distribution expression fails to parse.
|
|
32
|
+
*/
|
|
33
|
+
export declare function parseValueAndOperatorFromItem(item: AggregationItem, aggregationColumn: string): LegacyFilter;
|
|
34
|
+
/**
|
|
35
|
+
* Compares two aggregation items for equality based on the valuesAreExpressions property of the aggregation.
|
|
36
|
+
*
|
|
37
|
+
* @param aggregation - Aggregation object to use the comparison from.
|
|
38
|
+
* @param first - First aggregation item to compare.
|
|
39
|
+
* @param second - Second aggregation item to compare.
|
|
40
|
+
* @returns A boolean indicating whether the two aggregation items are strictly equal.
|
|
41
|
+
*/
|
|
42
|
+
export declare function aggregationItemStrictCompare(aggregation: Pick<Aggregation, 'valuesAreExpressions'>, first: Pick<AggregationItem, 'value' | 'display'>, second: Pick<AggregationItem, 'value' | 'display'>): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Converts an array of suggestions into an array of TreeAggregationNode objects.
|
|
45
|
+
*
|
|
46
|
+
* @param suggests - An array of Suggestion objects to be converted.
|
|
47
|
+
* @param searchTerm - The search term used to filter and match suggestions.
|
|
48
|
+
* @returns An array of TreeAggregationNode objects.
|
|
49
|
+
*/
|
|
50
|
+
export declare function suggestionsToTreeAggregationNodes(suggests: Suggestion[], searchTerm: string): TreeAggregationNode[];
|
|
51
|
+
//# sourceMappingURL=aggregations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregations.d.ts","sourceRoot":"","sources":["../../src/utils/aggregations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEhH;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,WAAW,EAAE,WAAW,EAAE,iCAAiC,EAAE,OAAO,GAAG,UAAU,EAAE,CA4BpI;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,GAAG,YAAY,CAsB5G;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,sBAAsB,CAAC,EACtD,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,SAAS,CAAC,EACjD,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,SAAS,CAAC,GACjD,OAAO,CAIT;AAED;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,QAAQ,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,mBAAmB,EAAE,CAgBnH"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Type for a halved array */
|
|
2
|
+
export type Bisections<T = any> = {
|
|
3
|
+
true: T[];
|
|
4
|
+
false: T[];
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Bisect an array into two sub arrays based on a predicate function.
|
|
8
|
+
*
|
|
9
|
+
* @template T - The type of elements in the array.
|
|
10
|
+
* @param array - The array to bisect.
|
|
11
|
+
* @param predicate - A function that determines the bisect condition.
|
|
12
|
+
* Elements for which the predicate returns true will be in the first half,
|
|
13
|
+
* and elements for which it returns false will be in the second half.
|
|
14
|
+
* @returns An object containing the two sub arrays of the array.
|
|
15
|
+
*/
|
|
16
|
+
export declare function bisect<T>(array: T[], predicate: (value: T) => boolean): Bisections<T>;
|
|
17
|
+
//# sourceMappingURL=bisect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bisect.d.ts","sourceRoot":"","sources":["../../../src/utils/array/bisect.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,GAAG,IAAI;IAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAAC,KAAK,EAAE,CAAC,EAAE,CAAA;CAAE,CAAC;AAE5D;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,CAQrF"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export type FullTextPattern = {
|
|
2
|
+
type: 'group' | 'adjacent' | 'exact' | 'regex' | 'token';
|
|
3
|
+
value: string;
|
|
4
|
+
op?: '+' | '-';
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Parses the given text and returns an array of FullTextPattern objects.
|
|
8
|
+
* @param text - The text to parse.
|
|
9
|
+
* @returns An array of FullTextPattern objects.
|
|
10
|
+
*/
|
|
11
|
+
export declare function parseText(text: string): FullTextPattern[];
|
|
12
|
+
/**
|
|
13
|
+
* Rewrites the text based on the provided patterns.
|
|
14
|
+
* @param patterns An array of FullTextPattern objects representing the patterns to be applied.
|
|
15
|
+
* @returns The rewritten text.
|
|
16
|
+
*/
|
|
17
|
+
export declare function rewriteText(patterns: FullTextPattern[]): string;
|
|
18
|
+
/**
|
|
19
|
+
* Adds concepts to the given text by modifying the patterns.
|
|
20
|
+
* @param text - The input text to which the concepts will be added.
|
|
21
|
+
* @param concepts - An array of concepts to be added to the text.
|
|
22
|
+
* @param op - An optional parameter specifying the operation to be performed on the concepts.
|
|
23
|
+
* If '+' is provided, the concepts will be added adjacent to the text.
|
|
24
|
+
* If '-' is provided, the concepts will be removed from the text.
|
|
25
|
+
* @returns The modified text after adding or removing the concepts.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // Example 1:
|
|
29
|
+
* const text = "This is a +[test] +[sentence].";
|
|
30
|
+
* const result = addConcepts(text, ["example"]);
|
|
31
|
+
* // Output: "This is a +[test] +[sentence] +[example]."
|
|
32
|
+
*/
|
|
33
|
+
export declare function addConcepts(text: string, concepts: string[], op?: '+' | '-'): string;
|
|
34
|
+
/**
|
|
35
|
+
* Removes a concept from the given text.
|
|
36
|
+
*
|
|
37
|
+
* @param concept - The concept to be removed.
|
|
38
|
+
* @param text - The text from which the concept should be removed.
|
|
39
|
+
* @returns The updated text with the concept removed, or the original text if the concept was not found.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* // Example 1:
|
|
43
|
+
* const text = "This is a +test +sentence.";
|
|
44
|
+
* const result = removeConcept("test", text);
|
|
45
|
+
* // Output: "This is a +sentence."
|
|
46
|
+
*/
|
|
47
|
+
export declare function removeConcept(concept: string, text: string): string;
|
|
48
|
+
/**
|
|
49
|
+
* Removes concepts from the given text.
|
|
50
|
+
* @param text - The input text.
|
|
51
|
+
* @returns The text with concepts removed.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* // Example 1:
|
|
55
|
+
* const text = "This is a +[test] +[sentence].";
|
|
56
|
+
* const result = removeConcepts(text);
|
|
57
|
+
* // Output: "This is a ."
|
|
58
|
+
*/
|
|
59
|
+
export declare function removeConcepts(text: string): string;
|
|
60
|
+
/**
|
|
61
|
+
* Retrieves the concepts from the given text.
|
|
62
|
+
* @param text - The text to parse and extract concepts from.
|
|
63
|
+
* @returns An array of concepts extracted from the text.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* // Example 1:
|
|
67
|
+
* const text = "This is a +[test] +[sentence].";
|
|
68
|
+
* const concepts = getConcepts(text);
|
|
69
|
+
* // Output: ["test", "sentence"]
|
|
70
|
+
*/
|
|
71
|
+
export declare function getConcepts(text: string): string[];
|
|
72
|
+
//# sourceMappingURL=concepts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"concepts.d.ts","sourceRoot":"","sources":["../../src/utils/concepts.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,GAAG,GAAG,GAAG,CAAA;CACf,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAC,MAAM,GAAG,eAAe,EAAE,CAYxD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,eAAe,EAAE,GAAG,MAAM,CAW/D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,GAAC,GAAG,GAAG,MAAM,CAMjF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAC,MAAM,GAAG,MAAM,CAQlE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAC,MAAM,GAAG,MAAM,CAIlD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAC,MAAM,GAAG,MAAM,EAAE,CAIjD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Relative date object to represent the difference between two dates
|
|
3
|
+
* @typedef {Object} RelativeDate
|
|
4
|
+
* @property {number} offset - The difference between two dates
|
|
5
|
+
* @property {Intl.RelativeTimeFormatUnit} unit - The unit of the difference
|
|
6
|
+
* @property {boolean} isFuture - If the target date is in the future
|
|
7
|
+
*/
|
|
8
|
+
export type RelativeDate = {
|
|
9
|
+
offset: number;
|
|
10
|
+
unit: Intl.RelativeTimeFormatUnit;
|
|
11
|
+
isFuture: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Get the relative date between two dates, in most cases the base date is the current date
|
|
15
|
+
* @param locale Locale to use for the relative date
|
|
16
|
+
* @param target Target date to compare
|
|
17
|
+
* @param base Base date to compare
|
|
18
|
+
* @returns Relative date string as a human readable format using {@link Intl.RelativeTimeFormat}
|
|
19
|
+
*/
|
|
20
|
+
export declare function getRelativeDate(locale: string, target: string, base?: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Get the relative date between two dates, in most cases the base date is the current date
|
|
23
|
+
* and the target date is the the future date to compare, if the base date is not provided
|
|
24
|
+
* the current date will be used.
|
|
25
|
+
* RelativeDate.offset is return in day unit.
|
|
26
|
+
* @param target Target date to compare
|
|
27
|
+
* @param base Base date to compare
|
|
28
|
+
* @returns RelativeDate object with offset, unit and isFuture
|
|
29
|
+
*/
|
|
30
|
+
export declare function getOffsetFromDates(target: string, base?: string): RelativeDate;
|
|
31
|
+
//# sourceMappingURL=date.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/utils/date.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,IAAI,CAAC,sBAAsB,CAAC;IAClC,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAKrF;AAGD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,YAAY,CAY9E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { LegacyFilter, Query } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* `path`: hash of the search without the bang in form of `/search/all`
|
|
4
|
+
* `filters`: filters associated to the query
|
|
5
|
+
* `id`: document id if there's one opened,
|
|
6
|
+
* `queryName`: name of the query
|
|
7
|
+
*/
|
|
8
|
+
export type QueryParams = Query & {
|
|
9
|
+
path?: string;
|
|
10
|
+
filters?: LegacyFilter[];
|
|
11
|
+
id?: string;
|
|
12
|
+
queryName?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Get {@link QueryParams} from url string
|
|
16
|
+
*
|
|
17
|
+
* @param url string to parse
|
|
18
|
+
* @returns {@link QueryParams} or undefined
|
|
19
|
+
*/
|
|
20
|
+
export declare function getQueryParamsFromUrl(url: string | undefined): QueryParams | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Get {@link Filter} array from query params string
|
|
23
|
+
*
|
|
24
|
+
* @param queryParams string to parse
|
|
25
|
+
* @returns {@link Filter} array
|
|
26
|
+
*/
|
|
27
|
+
export declare function getFiltersFromUrl(url: string | undefined): LegacyFilter[];
|
|
28
|
+
/**
|
|
29
|
+
* Get {@link Filter} array from uri string
|
|
30
|
+
*
|
|
31
|
+
* @param uri string to parse
|
|
32
|
+
* @returns {@link Filter} array
|
|
33
|
+
*/
|
|
34
|
+
export declare function getFiltersFromURI(uri: string): LegacyFilter[];
|
|
35
|
+
/**
|
|
36
|
+
* Returns the object query parameters from the given URL
|
|
37
|
+
*
|
|
38
|
+
* @param url
|
|
39
|
+
* @returns
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* const url = 'https://example.com/search?q=hello&f=type:document';
|
|
44
|
+
* const rawQueryParams = queryParamsFromUrl(url);
|
|
45
|
+
*
|
|
46
|
+
* console.log(rawQueryParams);
|
|
47
|
+
*
|
|
48
|
+
* ^// Output: {q:'hello', f:'type:document', ...}
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export declare function queryParamsFromUrl(url: string): Record<string, string>;
|
|
52
|
+
/**
|
|
53
|
+
* Retrieves the query text from a URL.
|
|
54
|
+
* @param url - The URL containing the query text.
|
|
55
|
+
* @returns The decoded query text.
|
|
56
|
+
*/
|
|
57
|
+
export declare function getQueryTextFromUrl(url: string): string;
|
|
58
|
+
/**
|
|
59
|
+
* Retrieves the ID from the given URL.
|
|
60
|
+
* @param url - The URL from which to extract the ID.
|
|
61
|
+
* @returns The decoded ID.
|
|
62
|
+
*/
|
|
63
|
+
export declare function getIdFromUrl(url: string): string;
|
|
64
|
+
/**
|
|
65
|
+
* Retrieves the page number from the given URL query string.
|
|
66
|
+
*
|
|
67
|
+
* @param url - The URL containing the query string.
|
|
68
|
+
* @returns The page number parsed from the query string.
|
|
69
|
+
*/
|
|
70
|
+
export declare function getQueryPageFromUrl(url: string): number;
|
|
71
|
+
export declare function getQueryTabFromUrl(url: string): string;
|
|
72
|
+
//# sourceMappingURL=query-params.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-params.d.ts","sourceRoot":"","sources":["../../src/utils/query-params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAetF;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,EAAE,CAKzE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,EAAE,CAK7D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOtE;AAGD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGvD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIvD;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAItD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Translates a system language formatted text to the specified locale.
|
|
3
|
+
* If a matching language is found, returns the translated text.
|
|
4
|
+
* If no matching language is found, returns the default language text.
|
|
5
|
+
* If the input text is empty, returns an empty string.
|
|
6
|
+
*
|
|
7
|
+
* @param text - The system language formatted text to translate.
|
|
8
|
+
* @param currentLocale - The locale to translate the text to.
|
|
9
|
+
* @returns The translated text or the default language text.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* // Example 1:
|
|
13
|
+
* const translatedText = sysLang("all[fr]tous[de]alle", "en-US");
|
|
14
|
+
* // Output: "all"
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Example 2:
|
|
18
|
+
* const translatedText = sysLang("all[fr]tous[de]alle", "fr-FR");
|
|
19
|
+
* // Output: "tous"
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* // Example 2:
|
|
23
|
+
* const translatedText = sysLang("all[fr]tous[de]alle", "fr");
|
|
24
|
+
* // Output: "tous"
|
|
25
|
+
*/
|
|
26
|
+
export declare function sysLang(text: string, currentLocale: string): string;
|
|
27
|
+
//# sourceMappingURL=syslang.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syslang.d.ts","sourceRoot":"","sources":["../../src/utils/syslang.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAsCnE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Aggregation, AuditEvents, Query } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Fetches an aggregation from the server.
|
|
4
|
+
*
|
|
5
|
+
* @param aggregation - The aggregation to fetch.
|
|
6
|
+
* @param query - The query parameters.
|
|
7
|
+
* @param audit - Optional audit events.
|
|
8
|
+
* @returns A promise that resolves to the fetched aggregation.
|
|
9
|
+
*/
|
|
10
|
+
export declare function fetchAggregation(aggregation: Aggregation, query: Query, audit?: AuditEvents): Promise<Aggregation>;
|
|
11
|
+
//# sourceMappingURL=fetch-aggregation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-aggregation.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-aggregation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAU,MAAM,UAAU,CAAC;AAGnE;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAkBxH"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CCApp, CCAppPreLogin } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Fetches the CCApp object.
|
|
4
|
+
* @returns A promise that resolves to the CCApp object.
|
|
5
|
+
*/
|
|
6
|
+
export declare function fetchApp(): Promise<CCApp>;
|
|
7
|
+
/**
|
|
8
|
+
* Fetches the pre-login information for the app.
|
|
9
|
+
* @returns A promise that resolves to the pre-login information of the app.
|
|
10
|
+
*/
|
|
11
|
+
export declare function fetchAppPreLogin(): Promise<CCAppPreLogin>;
|
|
12
|
+
/**
|
|
13
|
+
* Initializes the application by setting the global configuration and fetching app pre-login data.
|
|
14
|
+
* @returns A promise that resolves when the initialization is complete.
|
|
15
|
+
*/
|
|
16
|
+
export declare function appInitializerFn(): Promise<any>;
|
|
17
|
+
//# sourceMappingURL=fetch-app.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-app.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-app.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIhD;;;GAGG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC,CAK/C;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC,CAQ/D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAAC,GAAG,CAAC,CA8C/C"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AuditEvents, AuditRecord } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Adds additional audit information to the provided body object.
|
|
4
|
+
*
|
|
5
|
+
* @param body - The body object to add audit information to.
|
|
6
|
+
*/
|
|
7
|
+
export declare function addAuditAdditionalInfo(body: unknown): void;
|
|
8
|
+
/**
|
|
9
|
+
* Adds a session ID to the audit record.
|
|
10
|
+
*
|
|
11
|
+
* @param auditRecord - The audit record to modify.
|
|
12
|
+
* @returns The modified audit record with the session ID added.
|
|
13
|
+
*/
|
|
14
|
+
export declare function addSessionId(auditRecord: AuditRecord): AuditRecord;
|
|
15
|
+
/**
|
|
16
|
+
* Adds the current URL to the audit record.
|
|
17
|
+
*
|
|
18
|
+
* @param auditRecord - The audit record to update.
|
|
19
|
+
* @returns The updated audit record.
|
|
20
|
+
*/
|
|
21
|
+
export declare function addUrl(auditRecord: AuditRecord): AuditRecord;
|
|
22
|
+
/**
|
|
23
|
+
* Notifies the server about audit events.
|
|
24
|
+
*
|
|
25
|
+
* @param auditEvents - The audit events to be sent to the server.
|
|
26
|
+
* @returns A promise that resolves to the updated audit events.
|
|
27
|
+
*/
|
|
28
|
+
declare function notify(auditEvents: AuditEvents): Promise<AuditEvents>;
|
|
29
|
+
export declare const Audit: {
|
|
30
|
+
notify: typeof notify;
|
|
31
|
+
};
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=fetch-audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-audit.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-audit.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,WAAW,EAAkB,WAAW,EAAE,MAAM,UAAU,CAAC;AAOhF;;;;EAIE;AACF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,QAOlD;AA6BD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,eASpD;AAGD;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,WAAW,EAAE,WAAW,eAS9C;AAwBF;;;;;GAKG;AACH,iBAAe,MAAM,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CASpE;AAED,eAAO,MAAM,KAAK;;CAAa,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Result } from "../types";
|
|
2
|
+
export type DatasetError = {
|
|
3
|
+
errorCode: number;
|
|
4
|
+
errorMessage: string;
|
|
5
|
+
};
|
|
6
|
+
export type DatasetDescription = {
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
};
|
|
10
|
+
export type DataSet<T extends Result = Result> = Record<string, T | DatasetError>;
|
|
11
|
+
/**
|
|
12
|
+
* Fetches a dataset from the specified web service and query name.
|
|
13
|
+
*
|
|
14
|
+
* @template T - The type of the dataset, defaults to `Article`.
|
|
15
|
+
* @param {string} webserviceName - The name of the web service to fetch the dataset from.
|
|
16
|
+
* @param {string} queryName - The name of the query to execute.
|
|
17
|
+
* @param {object} [parameters={}] - Optional parameters to pass to the query.
|
|
18
|
+
* @returns {Promise<T>} A promise that resolves to the fetched dataset.
|
|
19
|
+
* @throws {Error} If the dataset contains an error code and message.
|
|
20
|
+
*/
|
|
21
|
+
export declare function fetchDataset<T extends Result = Result>(webserviceName: string, queryName: string, parameters?: {}): Promise<T>;
|
|
22
|
+
/**
|
|
23
|
+
* Fetches datasets from a specified web service.
|
|
24
|
+
*
|
|
25
|
+
* @template T - The type of the articles in the dataset, defaults to `Article`.
|
|
26
|
+
* @param {string} webserviceName - The name of the web service to fetch datasets from.
|
|
27
|
+
* @param {Object} options - The options for the request.
|
|
28
|
+
* @param {Object} [options.body] - The body of the request, defaults to an empty object.
|
|
29
|
+
* @param {string[]} [options.datasets] - An array of dataset names to fetch, defaults to an empty array.
|
|
30
|
+
* @returns {Promise<DataSet<T>>} - A promise that resolves to the fetched datasets.
|
|
31
|
+
*/
|
|
32
|
+
export declare function fetchDatasets<T extends Result = Result>(webserviceName: string, options: {
|
|
33
|
+
parameters?: {};
|
|
34
|
+
datasets?: string[];
|
|
35
|
+
}): Promise<DataSet<T>>;
|
|
36
|
+
/**
|
|
37
|
+
* Fetches a list of dataset descriptions from the specified web service.
|
|
38
|
+
*
|
|
39
|
+
* @param webserviceName - The name of the web service to fetch the dataset list from.
|
|
40
|
+
* @returns A promise that resolves to an array of `DatasetDescription` objects.
|
|
41
|
+
*/
|
|
42
|
+
export declare function fetchDatasetList(webserviceName: string): Promise<DatasetDescription[]>;
|
|
43
|
+
//# sourceMappingURL=fetch-dataset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-dataset.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-dataset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAA;AAED,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC,GAAC,YAAY,CAAC,CAAC;AAEhF;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CASpI;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,UAAU,CAAC,EAAE,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CAAC,GAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAO7J;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAG5F"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { LabelsRights, Query } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Fetches labels based on the provided prefix and other optional parameters.
|
|
4
|
+
*
|
|
5
|
+
* @param {string} prefix - The prefix to filter the labels.
|
|
6
|
+
* @param {boolean} [publicOnly=true] - Whether to fetch only public labels. Defaults to true.
|
|
7
|
+
* @param {string} [locale] - Optional locale to filter the labels.
|
|
8
|
+
* @returns {Promise<Labels>} A promise that resolves to the fetched labels.
|
|
9
|
+
*/
|
|
10
|
+
export declare function fetchLabels(prefix: string, publicOnly?: boolean, locale?: string): Promise<string[]>;
|
|
11
|
+
/**
|
|
12
|
+
* Fetches the user labels's rights.
|
|
13
|
+
*
|
|
14
|
+
* This function constructs a URLSearchParams object with the current application
|
|
15
|
+
* name and the action "getUserRights". It then calls the `get` function with
|
|
16
|
+
* the endpoint "labels" and the constructed parameters to retrieve the user labels's rights.
|
|
17
|
+
*
|
|
18
|
+
* @returns {Promise<LabelsRights>} A promise that resolves to the user rights for the current application.
|
|
19
|
+
*/
|
|
20
|
+
declare function getUserRights(): Promise<LabelsRights>;
|
|
21
|
+
/**
|
|
22
|
+
* Adds labels to the specified document IDs.
|
|
23
|
+
*
|
|
24
|
+
* @param labels - An array of labels to be added.
|
|
25
|
+
* @param ids - An array of document IDs to which the labels will be added.
|
|
26
|
+
* @param publicOnly - A boolean indicating whether the labels should be public. Defaults to true.
|
|
27
|
+
* @returns A promise that resolves when the labels have been added.
|
|
28
|
+
*/
|
|
29
|
+
declare function add(labels: string[], ids: string[], publicOnly?: boolean): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Removes labels from documents.
|
|
32
|
+
*
|
|
33
|
+
* @param {string[]} labels - The labels to be removed.
|
|
34
|
+
* @param {string[]} ids - The IDs of the documents from which the labels will be removed.
|
|
35
|
+
* @param {boolean} [publicOnly=true] - Indicates whether the operation should be public only.
|
|
36
|
+
* @returns {Promise<void>} A promise that resolves when the operation is complete.
|
|
37
|
+
*/
|
|
38
|
+
declare function remove(labels: string[], ids: string[], publicOnly?: boolean): Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Renames a set of labels to a new label.
|
|
41
|
+
*
|
|
42
|
+
* @param {string[]} labels - The list of labels to be renamed.
|
|
43
|
+
* @param {string} newLabel - The new label name to be assigned.
|
|
44
|
+
* @param {boolean} [publicOnly=true] - Indicates if the operation should be applied to public labels only.
|
|
45
|
+
* @returns {Promise<void>} A promise that resolves when the operation is complete.
|
|
46
|
+
*/
|
|
47
|
+
declare function rename(labels: string[], newLabel: string, publicOnly?: boolean): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Deletes the specified labels.
|
|
50
|
+
*
|
|
51
|
+
* @param {string[]} labels - The labels to be deleted.
|
|
52
|
+
* @param {boolean} [publicOnly=true] - Indicates whether to delete only public labels. Defaults to true.
|
|
53
|
+
* @returns {Promise<void>} A promise that resolves when the labels have been deleted.
|
|
54
|
+
*/
|
|
55
|
+
declare function deleteLabels(labels: string[], publicOnly?: boolean): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Adds multiple labels in bulk to the specified query.
|
|
58
|
+
*
|
|
59
|
+
* @param labels - An array of labels to be added.
|
|
60
|
+
* @param query - The query object to which the labels will be added.
|
|
61
|
+
* @param publicOnly - A boolean indicating whether the labels should be public. Defaults to true.
|
|
62
|
+
* @returns A promise that resolves when the labels have been added.
|
|
63
|
+
*/
|
|
64
|
+
declare function bulkAdd(labels: string[], query: Query, publicOnly?: boolean): Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Removes multiple labels based on the provided query.
|
|
67
|
+
*
|
|
68
|
+
* @param labels - An array of label strings to be removed.
|
|
69
|
+
* @param query - The query object used to filter which labels to remove.
|
|
70
|
+
* @param publicOnly - A boolean indicating whether to remove only public labels. Defaults to true.
|
|
71
|
+
* @returns A promise that resolves when the labels have been removed.
|
|
72
|
+
*/
|
|
73
|
+
declare function bulkRemove(labels: string[], query: Query, publicOnly?: boolean): Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* A collection of functions related to label management.
|
|
76
|
+
*
|
|
77
|
+
* @property {Function} getUserRights - Retrieves the rights of a user.
|
|
78
|
+
* @property {Function} add - Adds a new label.
|
|
79
|
+
* @property {Function} remove - Removes an existing label.
|
|
80
|
+
* @property {Function} rename - Renames an existing label.
|
|
81
|
+
* @property {Function} delete - Deletes a label.
|
|
82
|
+
* @property {Function} bulkAdd - Adds multiple labels at once.
|
|
83
|
+
* @property {Function} bulkRemove - Removes multiple labels at once.
|
|
84
|
+
*/
|
|
85
|
+
export declare const labels: {
|
|
86
|
+
getUserRights: typeof getUserRights;
|
|
87
|
+
add: typeof add;
|
|
88
|
+
remove: typeof remove;
|
|
89
|
+
rename: typeof rename;
|
|
90
|
+
delete: typeof deleteLabels;
|
|
91
|
+
bulkAdd: typeof bulkAdd;
|
|
92
|
+
bulkRemove: typeof bulkRemove;
|
|
93
|
+
};
|
|
94
|
+
export {};
|
|
95
|
+
//# sourceMappingURL=fetch-labels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-labels.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-labels.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAG/D;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,GAAE,OAAc,EAAE,MAAM,CAAC,EAAE,MAAM,qBAW5F;AAED;;;;;;;;GAQG;AACH,iBAAe,aAAa,0BAQ3B;AAED;;;;;;;GAOG;AACH,iBAAe,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,UAAU,GAAE,OAAc,iBA2B7E;AAED;;;;;;;GAOG;AACH,iBAAe,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,UAAU,GAAE,OAAc,iBA2BhF;AAED;;;;;;;GAOG;AACH,iBAAe,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,GAAE,OAAc,iBAiBnF;AAED;;;;;;GAMG;AACH,iBAAe,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,UAAU,GAAE,OAAc,iBAevE;AAED;;;;;;;GAOG;AACH,iBAAe,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,GAAE,OAAc,iBAiBhF;AAED;;;;;;;GAOG;AACH,iBAAe,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,GAAE,OAAc,iBAiBnF;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM;;;;;;;;CAQlB,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PreviewData, Query } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Fetches preview data for a given id and query.
|
|
4
|
+
*
|
|
5
|
+
* @param id - The identifier for the preview.
|
|
6
|
+
* @param query - The query parameters for the preview.
|
|
7
|
+
* @returns A promise that resolves to the PreviewData.
|
|
8
|
+
*/
|
|
9
|
+
export declare function fetchPreview(id: string, q: Query): Promise<PreviewData>;
|
|
10
|
+
/**
|
|
11
|
+
* Fetches preview document content from a given URL.
|
|
12
|
+
*
|
|
13
|
+
* @param url - The URL to fetch the preview document content from.
|
|
14
|
+
* @returns A promise that resolves to the PreviewData.
|
|
15
|
+
*/
|
|
16
|
+
export declare function fetchPreviewUrl(url: string): Promise<void>;
|
|
17
|
+
//# sourceMappingURL=fetch-preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-preview.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAG9C;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,WAAW,CAAC,CAY7E;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,iBAYhD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Principal } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Fetches the principal (current user) information from the backend API.
|
|
4
|
+
*
|
|
5
|
+
* This function sends a GET request to the "principal" endpoint with specific
|
|
6
|
+
* query parameters to retrieve the current user's data without triggering
|
|
7
|
+
* automatic authentication.
|
|
8
|
+
*
|
|
9
|
+
* @returns A promise that resolves to the Principal object, representing
|
|
10
|
+
* the current user's information.
|
|
11
|
+
*/
|
|
12
|
+
export declare function fetchPrincipal(): Promise<Principal>;
|
|
13
|
+
//# sourceMappingURL=fetch-principal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-principal.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-principal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC;;;;;;;;;GASG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,SAAS,CAAC,CAOzD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Query, QueryIntentMatch } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Fetches query intent based on the query.
|
|
4
|
+
*
|
|
5
|
+
* This function sends a POST request to the "queryintent" endpoint with the
|
|
6
|
+
* app name and query parameters to retrieve query intent matches.
|
|
7
|
+
*
|
|
8
|
+
* @param query - The query parameters for fetching query intent matches.
|
|
9
|
+
* @returns A promise that resolves to an array of QueryIntentMatch objects, each
|
|
10
|
+
* representing a query intent match.
|
|
11
|
+
*/
|
|
12
|
+
export declare function fetchQueryIntent(query: Query): Promise<QueryIntentMatch[]>;
|
|
13
|
+
//# sourceMappingURL=fetch-query-intent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-query-intent.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-query-intent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAuB,MAAM,UAAU,CAAC;AAGxE;;;;;;;;;GASG;AACH,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAOhF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AuditEvents, Query, QueryIntentData, Result, TreeAggregation, TreeAggregationNode } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Fetches data from the backend using the specified query.
|
|
4
|
+
* @param query The query to be sent to the backend.
|
|
5
|
+
* @returns A promise that resolves to the fetched data.
|
|
6
|
+
*/
|
|
7
|
+
export declare function fetchQuery(query: Query, audit?: AuditEvents, queryIntentData?: QueryIntentData): Promise<Result>;
|
|
8
|
+
/**
|
|
9
|
+
* Fetches multiple queries in bulk.
|
|
10
|
+
* @param queries - An array of Query objects representing the queries to be fetched.
|
|
11
|
+
* @param auditEvents - Optional AuditEvents object containing audit events for the request.
|
|
12
|
+
* @returns A Promise that resolves to an array of Result objects representing the query results.
|
|
13
|
+
*/
|
|
14
|
+
export declare function fetchBulkQuery(queries: Query[], mode?: "parallel", auditEvents?: AuditEvents): Promise<Result[]>;
|
|
15
|
+
/**
|
|
16
|
+
* Builds an array of paths and levels for a given tree aggregation.
|
|
17
|
+
*
|
|
18
|
+
* @param tree - The tree aggregation object.
|
|
19
|
+
* @param currentPath - The current path (optional, default: '').
|
|
20
|
+
* @param currentLevel - The current level (optional, default: 0).
|
|
21
|
+
* @returns An array of objects containing the path and level for each item in the tree.
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildPathsAndLevels(tree: TreeAggregation | TreeAggregationNode, currentPath?: string, currentLevel?: number): {
|
|
24
|
+
path: string;
|
|
25
|
+
level: number;
|
|
26
|
+
}[];
|
|
27
|
+
//# sourceMappingURL=fetch-query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-query.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-query.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,WAAW,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKnI;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,WAAW,EAAE,eAAe,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CA0BtH;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAoDtH;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,eAAe,GAAG,mBAAmB,EAAE,WAAW,SAAK,EAAE,YAAY,SAAI,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAG,CAkBvJ"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LinkResult, Query } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Fetches sponsored links based on the provided webservice and query.
|
|
4
|
+
*
|
|
5
|
+
* This function sends a POST request to the "query.links" endpoint with the
|
|
6
|
+
* specified webservice and query parameters to retrieve sponsored links.
|
|
7
|
+
*
|
|
8
|
+
* @param webservice - The name of the webservice to use for fetching sponsored links.
|
|
9
|
+
* @param query - The query parameters for fetching sponsored links.
|
|
10
|
+
* @returns A promise that resolves to an array of LinkResult objects, each
|
|
11
|
+
* representing a sponsored link with the original query attached.
|
|
12
|
+
*/
|
|
13
|
+
export declare function fetchSponsoredLinks(webservice: string, query: Query): Promise<LinkResult[]>;
|
|
14
|
+
//# sourceMappingURL=fetch-sponsored-links.d.ts.map
|