algoliasearch 5.9.0 → 5.10.0
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 +5 -5
- package/dist/algoliasearch.umd.js +7 -7
- package/dist/browser.d.ts +5 -5
- package/dist/browser.js +11 -2329
- package/dist/browser.js.map +1 -1
- package/dist/browser.min.js +1 -1
- package/dist/browser.min.js.map +1 -1
- package/dist/fetch.d.ts +5 -5
- package/dist/fetch.js +11 -2374
- package/dist/fetch.js.map +1 -1
- package/dist/lite/browser.d.ts +7 -7
- package/dist/lite/builds/browser.js +1 -1
- package/dist/lite/builds/browser.js.map +1 -1
- package/dist/lite/builds/browser.min.js +1 -1
- package/dist/lite/builds/browser.min.js.map +1 -1
- package/dist/lite/builds/browser.umd.js +1 -1
- package/dist/lite/builds/node.cjs +1 -1
- package/dist/lite/builds/node.cjs.map +1 -1
- package/dist/lite/builds/node.js +1 -1
- package/dist/lite/builds/node.js.map +1 -1
- package/dist/lite/node.d.cts +7 -7
- package/dist/lite/node.d.ts +7 -7
- package/dist/lite/src/liteClient.cjs +1 -1
- package/dist/lite/src/liteClient.cjs.map +1 -1
- package/dist/lite/src/liteClient.js +1 -1
- package/dist/lite/src/liteClient.js.map +1 -1
- package/dist/node.cjs +9 -2358
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.cts +5 -5
- package/dist/node.d.ts +5 -5
- package/dist/node.js +11 -2374
- package/dist/node.js.map +1 -1
- package/package.json +17 -18
- package/builds/browser.ts +0 -130
- package/builds/fetch.ts +0 -130
- package/builds/models.ts +0 -250
- package/builds/node.ts +0 -130
- package/lite/builds/browser.ts +0 -51
- package/lite/builds/node.ts +0 -47
- package/lite/model/acl.ts +0 -21
- package/lite/model/advancedSyntaxFeatures.ts +0 -3
- package/lite/model/alternativesAsExact.ts +0 -3
- package/lite/model/apiKey.ts +0 -48
- package/lite/model/aroundPrecision.ts +0 -8
- package/lite/model/aroundRadius.ts +0 -8
- package/lite/model/aroundRadiusAll.ts +0 -6
- package/lite/model/automaticFacetFilter.ts +0 -21
- package/lite/model/automaticFacetFilters.ts +0 -8
- package/lite/model/banner.ts +0 -13
- package/lite/model/bannerImage.ts +0 -12
- package/lite/model/bannerImageUrl.ts +0 -8
- package/lite/model/bannerLink.ts +0 -8
- package/lite/model/baseGetApiKeyResponse.ts +0 -13
- package/lite/model/baseIndexSettings.ts +0 -90
- package/lite/model/baseRecommendIndexSettings.ts +0 -184
- package/lite/model/baseRecommendRequest.ts +0 -22
- package/lite/model/baseRecommendSearchParams.ts +0 -133
- package/lite/model/baseSearchParams.ts +0 -6
- package/lite/model/baseSearchParamsWithoutQuery.ts +0 -148
- package/lite/model/baseSearchResponse.ts +0 -129
- package/lite/model/booleanString.ts +0 -3
- package/lite/model/boughtTogetherQuery.ts +0 -6
- package/lite/model/browsePagination.ts +0 -23
- package/lite/model/browseParamsObject.ts +0 -6
- package/lite/model/browseResponse.ts +0 -8
- package/lite/model/clientMethodProps.ts +0 -63
- package/lite/model/consequenceParams.ts +0 -7
- package/lite/model/consequenceQuery.ts +0 -8
- package/lite/model/consequenceQueryObject.ts +0 -15
- package/lite/model/cursor.ts +0 -8
- package/lite/model/distinct.ts +0 -6
- package/lite/model/edit.ts +0 -17
- package/lite/model/editType.ts +0 -6
- package/lite/model/errorBase.ts +0 -8
- package/lite/model/exactOnSingleWordQuery.ts +0 -6
- package/lite/model/exhaustive.ts +0 -31
- package/lite/model/facetFilters.ts +0 -6
- package/lite/model/facetHits.ts +0 -18
- package/lite/model/facetOrdering.ts +0 -16
- package/lite/model/facetStats.ts +0 -23
- package/lite/model/fallbackParams.ts +0 -5
- package/lite/model/fbtModel.ts +0 -6
- package/lite/model/frequentlyBoughtTogether.ts +0 -12
- package/lite/model/getApiKeyResponse.ts +0 -6
- package/lite/model/getRecommendationsParams.ts +0 -13
- package/lite/model/getRecommendationsResponse.ts +0 -7
- package/lite/model/highlightResult.ts +0 -5
- package/lite/model/highlightResultOption.ts +0 -25
- package/lite/model/hit.ts +0 -29
- package/lite/model/ignorePlurals.ts +0 -9
- package/lite/model/index.ts +0 -128
- package/lite/model/indexSettings.ts +0 -9
- package/lite/model/indexSettingsAsSearchParams.ts +0 -205
- package/lite/model/indexSettingsFacets.ts +0 -11
- package/lite/model/lookingSimilar.ts +0 -15
- package/lite/model/lookingSimilarModel.ts +0 -6
- package/lite/model/lookingSimilarQuery.ts +0 -6
- package/lite/model/matchLevel.ts +0 -6
- package/lite/model/matchedGeoLocation.ts +0 -18
- package/lite/model/mode.ts +0 -6
- package/lite/model/numericFilters.ts +0 -6
- package/lite/model/optionalFilters.ts +0 -6
- package/lite/model/params.ts +0 -18
- package/lite/model/personalization.ts +0 -18
- package/lite/model/queryType.ts +0 -6
- package/lite/model/range.ts +0 -16
- package/lite/model/rankingInfo.ts +0 -68
- package/lite/model/reRankingApplyFilter.ts +0 -6
- package/lite/model/recommendHit.ts +0 -34
- package/lite/model/recommendIndexSettings.ts +0 -9
- package/lite/model/recommendSearchParams.ts +0 -10
- package/lite/model/recommendationsHit.ts +0 -7
- package/lite/model/recommendationsHits.ts +0 -7
- package/lite/model/recommendationsRequest.ts +0 -18
- package/lite/model/recommendationsResults.ts +0 -7
- package/lite/model/recommendedForYou.ts +0 -10
- package/lite/model/recommendedForYouModel.ts +0 -6
- package/lite/model/recommendedForYouQuery.ts +0 -6
- package/lite/model/redirect.ts +0 -10
- package/lite/model/redirectRuleIndexData.ts +0 -8
- package/lite/model/redirectRuleIndexMetadata.ts +0 -27
- package/lite/model/redirectURL.ts +0 -8
- package/lite/model/relatedModel.ts +0 -6
- package/lite/model/relatedProducts.ts +0 -15
- package/lite/model/relatedQuery.ts +0 -6
- package/lite/model/removeStopWords.ts +0 -8
- package/lite/model/removeWordsIfNoResults.ts +0 -6
- package/lite/model/renderingContent.ts +0 -16
- package/lite/model/searchForFacetValuesResponse.ts +0 -20
- package/lite/model/searchForFacets.ts +0 -6
- package/lite/model/searchForFacetsOptions.ts +0 -27
- package/lite/model/searchForHits.ts +0 -6
- package/lite/model/searchForHitsOptions.ts +0 -12
- package/lite/model/searchHits.ts +0 -20
- package/lite/model/searchMethodParams.ts +0 -10
- package/lite/model/searchPagination.ts +0 -23
- package/lite/model/searchParams.ts +0 -6
- package/lite/model/searchParamsObject.ts +0 -9
- package/lite/model/searchParamsQuery.ts +0 -8
- package/lite/model/searchParamsString.ts +0 -11
- package/lite/model/searchQuery.ts +0 -6
- package/lite/model/searchResponse.ts +0 -7
- package/lite/model/searchResponses.ts +0 -7
- package/lite/model/searchResult.ts +0 -6
- package/lite/model/searchStrategy.ts +0 -6
- package/lite/model/searchTypeDefault.ts +0 -6
- package/lite/model/searchTypeFacet.ts +0 -6
- package/lite/model/semanticSearch.ts +0 -11
- package/lite/model/settingsResponse.ts +0 -6
- package/lite/model/snippetResult.ts +0 -5
- package/lite/model/snippetResultOption.ts +0 -15
- package/lite/model/sortRemainingBy.ts +0 -6
- package/lite/model/supportedLanguage.ts +0 -74
- package/lite/model/tagFilters.ts +0 -6
- package/lite/model/trendingFacetHit.ts +0 -21
- package/lite/model/trendingFacets.ts +0 -15
- package/lite/model/trendingFacetsModel.ts +0 -6
- package/lite/model/trendingFacetsQuery.ts +0 -6
- package/lite/model/trendingItems.ts +0 -20
- package/lite/model/trendingItemsModel.ts +0 -6
- package/lite/model/trendingItemsQuery.ts +0 -6
- package/lite/model/typoTolerance.ts +0 -8
- package/lite/model/typoToleranceEnum.ts +0 -6
- package/lite/model/value.ts +0 -17
- package/lite/model/widgets.ts +0 -13
- package/lite/model/withPrimary.ts +0 -8
- package/lite/src/liteClient.ts +0 -305
- package/lite/tsconfig.json +0 -9
package/builds/browser.ts
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
-
|
|
3
|
-
import type { ClientOptions } from '@algolia/client-common';
|
|
4
|
-
import type { SearchClient } from '@algolia/client-search';
|
|
5
|
-
import { searchClient } from '@algolia/client-search';
|
|
6
|
-
|
|
7
|
-
import type { AbtestingClient } from '@algolia/client-abtesting';
|
|
8
|
-
import { abtestingClient } from '@algolia/client-abtesting';
|
|
9
|
-
import type { AnalyticsClient } from '@algolia/client-analytics';
|
|
10
|
-
import { analyticsClient } from '@algolia/client-analytics';
|
|
11
|
-
import type { InsightsClient } from '@algolia/client-insights';
|
|
12
|
-
import { insightsClient } from '@algolia/client-insights';
|
|
13
|
-
import type { PersonalizationClient } from '@algolia/client-personalization';
|
|
14
|
-
import { personalizationClient } from '@algolia/client-personalization';
|
|
15
|
-
import type { QuerySuggestionsClient } from '@algolia/client-query-suggestions';
|
|
16
|
-
import { querySuggestionsClient } from '@algolia/client-query-suggestions';
|
|
17
|
-
import type { IngestionClient } from '@algolia/ingestion';
|
|
18
|
-
import { ingestionClient } from '@algolia/ingestion';
|
|
19
|
-
import type { MonitoringClient } from '@algolia/monitoring';
|
|
20
|
-
import { monitoringClient } from '@algolia/monitoring';
|
|
21
|
-
import type { RecommendClient } from '@algolia/recommend';
|
|
22
|
-
import { recommendClient } from '@algolia/recommend';
|
|
23
|
-
|
|
24
|
-
import type {
|
|
25
|
-
AbtestingRegionOptions,
|
|
26
|
-
AnalyticsRegionOptions,
|
|
27
|
-
IngestionRegionOptions,
|
|
28
|
-
InitClientOptions,
|
|
29
|
-
InsightsRegionOptions,
|
|
30
|
-
PersonalizationRegionOptions,
|
|
31
|
-
QuerySuggestionsRegionOptions,
|
|
32
|
-
} from './models';
|
|
33
|
-
|
|
34
|
-
export * from './models';
|
|
35
|
-
|
|
36
|
-
export type Algoliasearch = SearchClient & {
|
|
37
|
-
initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions) => AbtestingClient;
|
|
38
|
-
initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions) => AnalyticsClient;
|
|
39
|
-
initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions) => IngestionClient;
|
|
40
|
-
initInsights: (initOptions: InitClientOptions & InsightsRegionOptions) => InsightsClient;
|
|
41
|
-
initMonitoring: (initOptions: InitClientOptions) => MonitoringClient;
|
|
42
|
-
initPersonalization: (initOptions: InitClientOptions & PersonalizationRegionOptions) => PersonalizationClient;
|
|
43
|
-
initQuerySuggestions: (initOptions: InitClientOptions & QuerySuggestionsRegionOptions) => QuerySuggestionsClient;
|
|
44
|
-
initRecommend: (initOptions: InitClientOptions) => RecommendClient;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export function algoliasearch(appId: string, apiKey: string, options?: ClientOptions): Algoliasearch {
|
|
48
|
-
if (!appId || typeof appId !== 'string') {
|
|
49
|
-
throw new Error('`appId` is missing.');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (!apiKey || typeof apiKey !== 'string') {
|
|
53
|
-
throw new Error('`apiKey` is missing.');
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const client = searchClient(appId, apiKey, options);
|
|
57
|
-
|
|
58
|
-
return {
|
|
59
|
-
...client,
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
63
|
-
*/
|
|
64
|
-
get _ua(): string {
|
|
65
|
-
return client.transporter.algoliaAgent.value;
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions): AbtestingClient => {
|
|
69
|
-
return abtestingClient(
|
|
70
|
-
initOptions.appId || appId,
|
|
71
|
-
initOptions.apiKey || apiKey,
|
|
72
|
-
initOptions.region,
|
|
73
|
-
initOptions.options,
|
|
74
|
-
);
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions): AnalyticsClient => {
|
|
78
|
-
return analyticsClient(
|
|
79
|
-
initOptions.appId || appId,
|
|
80
|
-
initOptions.apiKey || apiKey,
|
|
81
|
-
initOptions.region,
|
|
82
|
-
initOptions.options,
|
|
83
|
-
);
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions): IngestionClient => {
|
|
87
|
-
return ingestionClient(
|
|
88
|
-
initOptions.appId || appId,
|
|
89
|
-
initOptions.apiKey || apiKey,
|
|
90
|
-
initOptions.region,
|
|
91
|
-
initOptions.options,
|
|
92
|
-
);
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
initInsights: (initOptions: InitClientOptions & InsightsRegionOptions): InsightsClient => {
|
|
96
|
-
return insightsClient(
|
|
97
|
-
initOptions.appId || appId,
|
|
98
|
-
initOptions.apiKey || apiKey,
|
|
99
|
-
initOptions.region,
|
|
100
|
-
initOptions.options,
|
|
101
|
-
);
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
initMonitoring: (initOptions: InitClientOptions): MonitoringClient => {
|
|
105
|
-
return monitoringClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
initPersonalization: (initOptions: InitClientOptions & PersonalizationRegionOptions): PersonalizationClient => {
|
|
109
|
-
return personalizationClient(
|
|
110
|
-
initOptions.appId || appId,
|
|
111
|
-
initOptions.apiKey || apiKey,
|
|
112
|
-
initOptions.region,
|
|
113
|
-
initOptions.options,
|
|
114
|
-
);
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
initQuerySuggestions: (initOptions: InitClientOptions & QuerySuggestionsRegionOptions): QuerySuggestionsClient => {
|
|
118
|
-
return querySuggestionsClient(
|
|
119
|
-
initOptions.appId || appId,
|
|
120
|
-
initOptions.apiKey || apiKey,
|
|
121
|
-
initOptions.region,
|
|
122
|
-
initOptions.options,
|
|
123
|
-
);
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
initRecommend: (initOptions: InitClientOptions): RecommendClient => {
|
|
127
|
-
return recommendClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);
|
|
128
|
-
},
|
|
129
|
-
};
|
|
130
|
-
}
|
package/builds/fetch.ts
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
-
|
|
3
|
-
import type { ClientOptions } from '@algolia/client-common';
|
|
4
|
-
import type { SearchClient } from '@algolia/client-search';
|
|
5
|
-
import { searchClient } from '@algolia/client-search';
|
|
6
|
-
|
|
7
|
-
import type { AbtestingClient } from '@algolia/client-abtesting';
|
|
8
|
-
import { abtestingClient } from '@algolia/client-abtesting';
|
|
9
|
-
import type { AnalyticsClient } from '@algolia/client-analytics';
|
|
10
|
-
import { analyticsClient } from '@algolia/client-analytics';
|
|
11
|
-
import type { InsightsClient } from '@algolia/client-insights';
|
|
12
|
-
import { insightsClient } from '@algolia/client-insights';
|
|
13
|
-
import type { PersonalizationClient } from '@algolia/client-personalization';
|
|
14
|
-
import { personalizationClient } from '@algolia/client-personalization';
|
|
15
|
-
import type { QuerySuggestionsClient } from '@algolia/client-query-suggestions';
|
|
16
|
-
import { querySuggestionsClient } from '@algolia/client-query-suggestions';
|
|
17
|
-
import type { IngestionClient } from '@algolia/ingestion';
|
|
18
|
-
import { ingestionClient } from '@algolia/ingestion';
|
|
19
|
-
import type { MonitoringClient } from '@algolia/monitoring';
|
|
20
|
-
import { monitoringClient } from '@algolia/monitoring';
|
|
21
|
-
import type { RecommendClient } from '@algolia/recommend';
|
|
22
|
-
import { recommendClient } from '@algolia/recommend';
|
|
23
|
-
|
|
24
|
-
import type {
|
|
25
|
-
AbtestingRegionOptions,
|
|
26
|
-
AnalyticsRegionOptions,
|
|
27
|
-
IngestionRegionOptions,
|
|
28
|
-
InitClientOptions,
|
|
29
|
-
InsightsRegionOptions,
|
|
30
|
-
PersonalizationRegionOptions,
|
|
31
|
-
QuerySuggestionsRegionOptions,
|
|
32
|
-
} from './models';
|
|
33
|
-
|
|
34
|
-
export * from './models';
|
|
35
|
-
|
|
36
|
-
export type Algoliasearch = SearchClient & {
|
|
37
|
-
initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions) => AbtestingClient;
|
|
38
|
-
initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions) => AnalyticsClient;
|
|
39
|
-
initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions) => IngestionClient;
|
|
40
|
-
initInsights: (initOptions: InitClientOptions & InsightsRegionOptions) => InsightsClient;
|
|
41
|
-
initMonitoring: (initOptions: InitClientOptions) => MonitoringClient;
|
|
42
|
-
initPersonalization: (initOptions: InitClientOptions & PersonalizationRegionOptions) => PersonalizationClient;
|
|
43
|
-
initQuerySuggestions: (initOptions: InitClientOptions & QuerySuggestionsRegionOptions) => QuerySuggestionsClient;
|
|
44
|
-
initRecommend: (initOptions: InitClientOptions) => RecommendClient;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export function algoliasearch(appId: string, apiKey: string, options?: ClientOptions): Algoliasearch {
|
|
48
|
-
if (!appId || typeof appId !== 'string') {
|
|
49
|
-
throw new Error('`appId` is missing.');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (!apiKey || typeof apiKey !== 'string') {
|
|
53
|
-
throw new Error('`apiKey` is missing.');
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const client = searchClient(appId, apiKey, options);
|
|
57
|
-
|
|
58
|
-
return {
|
|
59
|
-
...client,
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
63
|
-
*/
|
|
64
|
-
get _ua(): string {
|
|
65
|
-
return client.transporter.algoliaAgent.value;
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions): AbtestingClient => {
|
|
69
|
-
return abtestingClient(
|
|
70
|
-
initOptions.appId || appId,
|
|
71
|
-
initOptions.apiKey || apiKey,
|
|
72
|
-
initOptions.region,
|
|
73
|
-
initOptions.options,
|
|
74
|
-
);
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions): AnalyticsClient => {
|
|
78
|
-
return analyticsClient(
|
|
79
|
-
initOptions.appId || appId,
|
|
80
|
-
initOptions.apiKey || apiKey,
|
|
81
|
-
initOptions.region,
|
|
82
|
-
initOptions.options,
|
|
83
|
-
);
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions): IngestionClient => {
|
|
87
|
-
return ingestionClient(
|
|
88
|
-
initOptions.appId || appId,
|
|
89
|
-
initOptions.apiKey || apiKey,
|
|
90
|
-
initOptions.region,
|
|
91
|
-
initOptions.options,
|
|
92
|
-
);
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
initInsights: (initOptions: InitClientOptions & InsightsRegionOptions): InsightsClient => {
|
|
96
|
-
return insightsClient(
|
|
97
|
-
initOptions.appId || appId,
|
|
98
|
-
initOptions.apiKey || apiKey,
|
|
99
|
-
initOptions.region,
|
|
100
|
-
initOptions.options,
|
|
101
|
-
);
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
initMonitoring: (initOptions: InitClientOptions): MonitoringClient => {
|
|
105
|
-
return monitoringClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
initPersonalization: (initOptions: InitClientOptions & PersonalizationRegionOptions): PersonalizationClient => {
|
|
109
|
-
return personalizationClient(
|
|
110
|
-
initOptions.appId || appId,
|
|
111
|
-
initOptions.apiKey || apiKey,
|
|
112
|
-
initOptions.region,
|
|
113
|
-
initOptions.options,
|
|
114
|
-
);
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
initQuerySuggestions: (initOptions: InitClientOptions & QuerySuggestionsRegionOptions): QuerySuggestionsClient => {
|
|
118
|
-
return querySuggestionsClient(
|
|
119
|
-
initOptions.appId || appId,
|
|
120
|
-
initOptions.apiKey || apiKey,
|
|
121
|
-
initOptions.region,
|
|
122
|
-
initOptions.options,
|
|
123
|
-
);
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
initRecommend: (initOptions: InitClientOptions): RecommendClient => {
|
|
127
|
-
return recommendClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);
|
|
128
|
-
},
|
|
129
|
-
};
|
|
130
|
-
}
|
package/builds/models.ts
DELETED
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
-
|
|
3
|
-
import type { Region as AbtestingRegion, RegionOptions as AbtestingRegionOptions } from '@algolia/client-abtesting';
|
|
4
|
-
import type { Region as AnalyticsRegion, RegionOptions as AnalyticsRegionOptions } from '@algolia/client-analytics';
|
|
5
|
-
import type { Region as InsightsRegion, RegionOptions as InsightsRegionOptions } from '@algolia/client-insights';
|
|
6
|
-
import type { Region as IngestionRegion, RegionOptions as IngestionRegionOptions } from '@algolia/ingestion';
|
|
7
|
-
|
|
8
|
-
import type {
|
|
9
|
-
Region as PersonalizationRegion,
|
|
10
|
-
RegionOptions as PersonalizationRegionOptions,
|
|
11
|
-
} from '@algolia/client-personalization';
|
|
12
|
-
import type {
|
|
13
|
-
Region as QuerySuggestionsRegion,
|
|
14
|
-
RegionOptions as QuerySuggestionsRegionOptions,
|
|
15
|
-
} from '@algolia/client-query-suggestions';
|
|
16
|
-
|
|
17
|
-
import { Status } from '@algolia/client-abtesting';
|
|
18
|
-
import type { ClientOptions } from '@algolia/client-common';
|
|
19
|
-
import { EventType } from '@algolia/client-personalization';
|
|
20
|
-
import type {
|
|
21
|
-
Action,
|
|
22
|
-
AdvancedSyntaxFeatures,
|
|
23
|
-
AlternativesAsExact,
|
|
24
|
-
Anchoring,
|
|
25
|
-
AroundPrecision,
|
|
26
|
-
AroundRadius,
|
|
27
|
-
AroundRadiusAll,
|
|
28
|
-
AutomaticFacetFilter,
|
|
29
|
-
AutomaticFacetFilters,
|
|
30
|
-
Banner,
|
|
31
|
-
BannerImage,
|
|
32
|
-
BannerImageUrl,
|
|
33
|
-
BannerLink,
|
|
34
|
-
BaseIndexSettings,
|
|
35
|
-
BaseSearchParams,
|
|
36
|
-
BaseSearchParamsWithoutQuery,
|
|
37
|
-
BaseSearchResponse,
|
|
38
|
-
BooleanString,
|
|
39
|
-
Condition,
|
|
40
|
-
Consequence,
|
|
41
|
-
ConsequenceHide,
|
|
42
|
-
ConsequenceParams,
|
|
43
|
-
ConsequenceQuery,
|
|
44
|
-
ConsequenceQueryObject,
|
|
45
|
-
CustomDeleteProps,
|
|
46
|
-
CustomGetProps,
|
|
47
|
-
CustomPostProps,
|
|
48
|
-
CustomPutProps,
|
|
49
|
-
DeleteSourceProps,
|
|
50
|
-
DeletedAtResponse,
|
|
51
|
-
Distinct,
|
|
52
|
-
Edit,
|
|
53
|
-
EditType,
|
|
54
|
-
ErrorBase,
|
|
55
|
-
ExactOnSingleWordQuery,
|
|
56
|
-
Exhaustive,
|
|
57
|
-
FacetFilters,
|
|
58
|
-
FacetOrdering,
|
|
59
|
-
FacetStats,
|
|
60
|
-
Facets,
|
|
61
|
-
GetTaskProps,
|
|
62
|
-
HighlightResult,
|
|
63
|
-
HighlightResultOption,
|
|
64
|
-
IgnorePlurals,
|
|
65
|
-
IndexSettingsAsSearchParams,
|
|
66
|
-
Languages,
|
|
67
|
-
MatchLevel,
|
|
68
|
-
MatchedGeoLocation,
|
|
69
|
-
Mode,
|
|
70
|
-
NumericFilters,
|
|
71
|
-
OptionalFilters,
|
|
72
|
-
Params,
|
|
73
|
-
Personalization,
|
|
74
|
-
Promote,
|
|
75
|
-
PromoteObjectID,
|
|
76
|
-
PromoteObjectIDs,
|
|
77
|
-
QueryType,
|
|
78
|
-
Range,
|
|
79
|
-
RankingInfo,
|
|
80
|
-
ReRankingApplyFilter,
|
|
81
|
-
Redirect,
|
|
82
|
-
RedirectRuleIndexData,
|
|
83
|
-
RedirectRuleIndexMetadata,
|
|
84
|
-
RedirectURL,
|
|
85
|
-
RemoveStopWords,
|
|
86
|
-
RemoveWordsIfNoResults,
|
|
87
|
-
RenderingContent,
|
|
88
|
-
SearchPagination,
|
|
89
|
-
SearchParams,
|
|
90
|
-
SearchParamsObject,
|
|
91
|
-
SearchParamsQuery,
|
|
92
|
-
SemanticSearch,
|
|
93
|
-
SnippetResult,
|
|
94
|
-
SnippetResultOption,
|
|
95
|
-
SortRemainingBy,
|
|
96
|
-
Source,
|
|
97
|
-
SupportedLanguage,
|
|
98
|
-
TagFilters,
|
|
99
|
-
TaskStatus,
|
|
100
|
-
TimeRange,
|
|
101
|
-
TypoTolerance,
|
|
102
|
-
TypoToleranceEnum,
|
|
103
|
-
Value,
|
|
104
|
-
Widgets,
|
|
105
|
-
} from '@algolia/client-search';
|
|
106
|
-
import { apiClientVersion } from '@algolia/client-search';
|
|
107
|
-
|
|
108
|
-
type Region =
|
|
109
|
-
| AbtestingRegion
|
|
110
|
-
| AnalyticsRegion
|
|
111
|
-
| IngestionRegion
|
|
112
|
-
| InsightsRegion
|
|
113
|
-
| PersonalizationRegion
|
|
114
|
-
| QuerySuggestionsRegion;
|
|
115
|
-
type RegionOptions =
|
|
116
|
-
| AbtestingRegionOptions
|
|
117
|
-
| AnalyticsRegionOptions
|
|
118
|
-
| IngestionRegionOptions
|
|
119
|
-
| InsightsRegionOptions
|
|
120
|
-
| PersonalizationRegionOptions
|
|
121
|
-
| QuerySuggestionsRegionOptions;
|
|
122
|
-
|
|
123
|
-
export * from '@algolia/client-abtesting';
|
|
124
|
-
export * from '@algolia/client-analytics';
|
|
125
|
-
export * from '@algolia/client-insights';
|
|
126
|
-
export * from '@algolia/client-personalization';
|
|
127
|
-
export * from '@algolia/client-query-suggestions';
|
|
128
|
-
export * from '@algolia/client-search';
|
|
129
|
-
export * from '@algolia/ingestion';
|
|
130
|
-
export * from '@algolia/monitoring';
|
|
131
|
-
export * from '@algolia/recommend';
|
|
132
|
-
|
|
133
|
-
export {
|
|
134
|
-
AbtestingRegion,
|
|
135
|
-
AbtestingRegionOptions,
|
|
136
|
-
Action,
|
|
137
|
-
AdvancedSyntaxFeatures,
|
|
138
|
-
AlternativesAsExact,
|
|
139
|
-
AnalyticsRegion,
|
|
140
|
-
AnalyticsRegionOptions,
|
|
141
|
-
Anchoring,
|
|
142
|
-
AroundPrecision,
|
|
143
|
-
AroundRadius,
|
|
144
|
-
AroundRadiusAll,
|
|
145
|
-
AutomaticFacetFilter,
|
|
146
|
-
AutomaticFacetFilters,
|
|
147
|
-
Banner,
|
|
148
|
-
BannerImage,
|
|
149
|
-
BannerImageUrl,
|
|
150
|
-
BannerLink,
|
|
151
|
-
BaseIndexSettings,
|
|
152
|
-
BaseSearchParams,
|
|
153
|
-
BaseSearchParamsWithoutQuery,
|
|
154
|
-
BaseSearchResponse,
|
|
155
|
-
BooleanString,
|
|
156
|
-
Condition,
|
|
157
|
-
Consequence,
|
|
158
|
-
ConsequenceHide,
|
|
159
|
-
ConsequenceParams,
|
|
160
|
-
ConsequenceQuery,
|
|
161
|
-
ConsequenceQueryObject,
|
|
162
|
-
CustomDeleteProps,
|
|
163
|
-
CustomGetProps,
|
|
164
|
-
CustomPostProps,
|
|
165
|
-
CustomPutProps,
|
|
166
|
-
DeleteSourceProps,
|
|
167
|
-
DeletedAtResponse,
|
|
168
|
-
Distinct,
|
|
169
|
-
Edit,
|
|
170
|
-
EditType,
|
|
171
|
-
ErrorBase,
|
|
172
|
-
EventType,
|
|
173
|
-
ExactOnSingleWordQuery,
|
|
174
|
-
Exhaustive,
|
|
175
|
-
FacetFilters,
|
|
176
|
-
FacetOrdering,
|
|
177
|
-
FacetStats,
|
|
178
|
-
Facets,
|
|
179
|
-
GetTaskProps,
|
|
180
|
-
HighlightResult,
|
|
181
|
-
HighlightResultOption,
|
|
182
|
-
IgnorePlurals,
|
|
183
|
-
IndexSettingsAsSearchParams,
|
|
184
|
-
IngestionRegion,
|
|
185
|
-
IngestionRegionOptions,
|
|
186
|
-
InsightsRegion,
|
|
187
|
-
InsightsRegionOptions,
|
|
188
|
-
Languages,
|
|
189
|
-
MatchLevel,
|
|
190
|
-
MatchedGeoLocation,
|
|
191
|
-
Mode,
|
|
192
|
-
NumericFilters,
|
|
193
|
-
OptionalFilters,
|
|
194
|
-
Params,
|
|
195
|
-
Personalization,
|
|
196
|
-
PersonalizationRegion,
|
|
197
|
-
PersonalizationRegionOptions,
|
|
198
|
-
Promote,
|
|
199
|
-
PromoteObjectID,
|
|
200
|
-
PromoteObjectIDs,
|
|
201
|
-
QuerySuggestionsRegion,
|
|
202
|
-
QuerySuggestionsRegionOptions,
|
|
203
|
-
QueryType,
|
|
204
|
-
Range,
|
|
205
|
-
RankingInfo,
|
|
206
|
-
ReRankingApplyFilter,
|
|
207
|
-
Redirect,
|
|
208
|
-
RedirectRuleIndexData,
|
|
209
|
-
RedirectRuleIndexMetadata,
|
|
210
|
-
RedirectURL,
|
|
211
|
-
Region,
|
|
212
|
-
RegionOptions,
|
|
213
|
-
RemoveStopWords,
|
|
214
|
-
RemoveWordsIfNoResults,
|
|
215
|
-
RenderingContent,
|
|
216
|
-
SearchPagination,
|
|
217
|
-
SearchParams,
|
|
218
|
-
SearchParamsObject,
|
|
219
|
-
SearchParamsQuery,
|
|
220
|
-
SemanticSearch,
|
|
221
|
-
SnippetResult,
|
|
222
|
-
SnippetResultOption,
|
|
223
|
-
SortRemainingBy,
|
|
224
|
-
Source,
|
|
225
|
-
Status,
|
|
226
|
-
SupportedLanguage,
|
|
227
|
-
TagFilters,
|
|
228
|
-
TaskStatus,
|
|
229
|
-
TimeRange,
|
|
230
|
-
TypoTolerance,
|
|
231
|
-
TypoToleranceEnum,
|
|
232
|
-
Value,
|
|
233
|
-
Widgets,
|
|
234
|
-
apiClientVersion,
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Options forwarded to the client initialized via the `init` method.
|
|
239
|
-
*/
|
|
240
|
-
export type InitClientOptions = Partial<{
|
|
241
|
-
/**
|
|
242
|
-
* App to target with the initialized client, defaults to the `algoliasearch` appId.
|
|
243
|
-
*/
|
|
244
|
-
appId: string;
|
|
245
|
-
/**
|
|
246
|
-
* API key of the targeted app ID, defaults to the `algoliasearch` apiKey.
|
|
247
|
-
*/
|
|
248
|
-
apiKey: string;
|
|
249
|
-
options: ClientOptions;
|
|
250
|
-
}>;
|
package/builds/node.ts
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
-
|
|
3
|
-
import type { ClientOptions } from '@algolia/client-common';
|
|
4
|
-
import type { SearchClient } from '@algolia/client-search';
|
|
5
|
-
import { searchClient } from '@algolia/client-search';
|
|
6
|
-
|
|
7
|
-
import type { AbtestingClient } from '@algolia/client-abtesting';
|
|
8
|
-
import { abtestingClient } from '@algolia/client-abtesting';
|
|
9
|
-
import type { AnalyticsClient } from '@algolia/client-analytics';
|
|
10
|
-
import { analyticsClient } from '@algolia/client-analytics';
|
|
11
|
-
import type { InsightsClient } from '@algolia/client-insights';
|
|
12
|
-
import { insightsClient } from '@algolia/client-insights';
|
|
13
|
-
import type { PersonalizationClient } from '@algolia/client-personalization';
|
|
14
|
-
import { personalizationClient } from '@algolia/client-personalization';
|
|
15
|
-
import type { QuerySuggestionsClient } from '@algolia/client-query-suggestions';
|
|
16
|
-
import { querySuggestionsClient } from '@algolia/client-query-suggestions';
|
|
17
|
-
import type { IngestionClient } from '@algolia/ingestion';
|
|
18
|
-
import { ingestionClient } from '@algolia/ingestion';
|
|
19
|
-
import type { MonitoringClient } from '@algolia/monitoring';
|
|
20
|
-
import { monitoringClient } from '@algolia/monitoring';
|
|
21
|
-
import type { RecommendClient } from '@algolia/recommend';
|
|
22
|
-
import { recommendClient } from '@algolia/recommend';
|
|
23
|
-
|
|
24
|
-
import type {
|
|
25
|
-
AbtestingRegionOptions,
|
|
26
|
-
AnalyticsRegionOptions,
|
|
27
|
-
IngestionRegionOptions,
|
|
28
|
-
InitClientOptions,
|
|
29
|
-
InsightsRegionOptions,
|
|
30
|
-
PersonalizationRegionOptions,
|
|
31
|
-
QuerySuggestionsRegionOptions,
|
|
32
|
-
} from './models';
|
|
33
|
-
|
|
34
|
-
export * from './models';
|
|
35
|
-
|
|
36
|
-
export type Algoliasearch = SearchClient & {
|
|
37
|
-
initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions) => AbtestingClient;
|
|
38
|
-
initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions) => AnalyticsClient;
|
|
39
|
-
initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions) => IngestionClient;
|
|
40
|
-
initInsights: (initOptions: InitClientOptions & InsightsRegionOptions) => InsightsClient;
|
|
41
|
-
initMonitoring: (initOptions: InitClientOptions) => MonitoringClient;
|
|
42
|
-
initPersonalization: (initOptions: InitClientOptions & PersonalizationRegionOptions) => PersonalizationClient;
|
|
43
|
-
initQuerySuggestions: (initOptions: InitClientOptions & QuerySuggestionsRegionOptions) => QuerySuggestionsClient;
|
|
44
|
-
initRecommend: (initOptions: InitClientOptions) => RecommendClient;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export function algoliasearch(appId: string, apiKey: string, options?: ClientOptions): Algoliasearch {
|
|
48
|
-
if (!appId || typeof appId !== 'string') {
|
|
49
|
-
throw new Error('`appId` is missing.');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (!apiKey || typeof apiKey !== 'string') {
|
|
53
|
-
throw new Error('`apiKey` is missing.');
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const client = searchClient(appId, apiKey, options);
|
|
57
|
-
|
|
58
|
-
return {
|
|
59
|
-
...client,
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
63
|
-
*/
|
|
64
|
-
get _ua(): string {
|
|
65
|
-
return client.transporter.algoliaAgent.value;
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions): AbtestingClient => {
|
|
69
|
-
return abtestingClient(
|
|
70
|
-
initOptions.appId || appId,
|
|
71
|
-
initOptions.apiKey || apiKey,
|
|
72
|
-
initOptions.region,
|
|
73
|
-
initOptions.options,
|
|
74
|
-
);
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions): AnalyticsClient => {
|
|
78
|
-
return analyticsClient(
|
|
79
|
-
initOptions.appId || appId,
|
|
80
|
-
initOptions.apiKey || apiKey,
|
|
81
|
-
initOptions.region,
|
|
82
|
-
initOptions.options,
|
|
83
|
-
);
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions): IngestionClient => {
|
|
87
|
-
return ingestionClient(
|
|
88
|
-
initOptions.appId || appId,
|
|
89
|
-
initOptions.apiKey || apiKey,
|
|
90
|
-
initOptions.region,
|
|
91
|
-
initOptions.options,
|
|
92
|
-
);
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
initInsights: (initOptions: InitClientOptions & InsightsRegionOptions): InsightsClient => {
|
|
96
|
-
return insightsClient(
|
|
97
|
-
initOptions.appId || appId,
|
|
98
|
-
initOptions.apiKey || apiKey,
|
|
99
|
-
initOptions.region,
|
|
100
|
-
initOptions.options,
|
|
101
|
-
);
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
initMonitoring: (initOptions: InitClientOptions): MonitoringClient => {
|
|
105
|
-
return monitoringClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
initPersonalization: (initOptions: InitClientOptions & PersonalizationRegionOptions): PersonalizationClient => {
|
|
109
|
-
return personalizationClient(
|
|
110
|
-
initOptions.appId || appId,
|
|
111
|
-
initOptions.apiKey || apiKey,
|
|
112
|
-
initOptions.region,
|
|
113
|
-
initOptions.options,
|
|
114
|
-
);
|
|
115
|
-
},
|
|
116
|
-
|
|
117
|
-
initQuerySuggestions: (initOptions: InitClientOptions & QuerySuggestionsRegionOptions): QuerySuggestionsClient => {
|
|
118
|
-
return querySuggestionsClient(
|
|
119
|
-
initOptions.appId || appId,
|
|
120
|
-
initOptions.apiKey || apiKey,
|
|
121
|
-
initOptions.region,
|
|
122
|
-
initOptions.options,
|
|
123
|
-
);
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
initRecommend: (initOptions: InitClientOptions): RecommendClient => {
|
|
127
|
-
return recommendClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);
|
|
128
|
-
},
|
|
129
|
-
};
|
|
130
|
-
}
|
package/lite/builds/browser.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
-
|
|
3
|
-
import { createXhrRequester } from '@algolia/requester-browser-xhr';
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
ClientOptions,
|
|
7
|
-
createBrowserLocalStorageCache,
|
|
8
|
-
createFallbackableCache,
|
|
9
|
-
createMemoryCache,
|
|
10
|
-
createNullLogger,
|
|
11
|
-
DEFAULT_CONNECT_TIMEOUT_BROWSER,
|
|
12
|
-
DEFAULT_READ_TIMEOUT_BROWSER,
|
|
13
|
-
DEFAULT_WRITE_TIMEOUT_BROWSER,
|
|
14
|
-
} from '@algolia/client-common';
|
|
15
|
-
|
|
16
|
-
import { apiClientVersion, createLiteClient } from '../src/liteClient';
|
|
17
|
-
|
|
18
|
-
export * from '../model';
|
|
19
|
-
export { apiClientVersion } from '../src/liteClient';
|
|
20
|
-
|
|
21
|
-
export function liteClient(appId: string, apiKey: string, options?: ClientOptions): LiteClient {
|
|
22
|
-
if (!appId || typeof appId !== 'string') {
|
|
23
|
-
throw new Error('`appId` is missing.');
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (!apiKey || typeof apiKey !== 'string') {
|
|
27
|
-
throw new Error('`apiKey` is missing.');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return createLiteClient({
|
|
31
|
-
appId,
|
|
32
|
-
apiKey,
|
|
33
|
-
timeouts: {
|
|
34
|
-
connect: DEFAULT_CONNECT_TIMEOUT_BROWSER,
|
|
35
|
-
read: DEFAULT_READ_TIMEOUT_BROWSER,
|
|
36
|
-
write: DEFAULT_WRITE_TIMEOUT_BROWSER,
|
|
37
|
-
},
|
|
38
|
-
logger: createNullLogger(),
|
|
39
|
-
requester: createXhrRequester(),
|
|
40
|
-
algoliaAgents: [{ segment: 'Browser' }],
|
|
41
|
-
authMode: 'WithinQueryParameters',
|
|
42
|
-
responsesCache: createMemoryCache(),
|
|
43
|
-
requestsCache: createMemoryCache({ serializable: false }),
|
|
44
|
-
hostsCache: createFallbackableCache({
|
|
45
|
-
caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()],
|
|
46
|
-
}),
|
|
47
|
-
...options,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export type LiteClient = ReturnType<typeof createLiteClient>;
|