algoliasearch 5.2.4-beta.4 → 5.2.4-beta.6
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/builds/browser.ts +1 -1
- package/builds/models.ts +5 -11
- package/builds/node.ts +1 -1
- package/dist/algoliasearch.umd.js +3 -3
- package/dist/browser.d.ts +3 -5
- package/dist/browser.js +1 -319
- package/dist/browser.js.map +1 -1
- package/dist/browser.min.js +1 -1
- package/dist/browser.min.js.map +1 -1
- package/dist/lite/browser.d.ts +1 -1
- 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 +1 -1
- package/dist/lite/node.d.ts +1 -1
- 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 +10 -254
- package/dist/node.cjs.map +1 -1
- package/dist/node.d.cts +3 -5
- package/dist/node.d.ts +3 -5
- package/dist/node.js +1 -319
- package/dist/node.js.map +1 -1
- package/lite/src/liteClient.ts +1 -1
- package/package.json +9 -9
package/dist/node.cjs
CHANGED
|
@@ -21,195 +21,30 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
// builds/node.ts
|
|
22
22
|
var node_exports = {};
|
|
23
23
|
__export(node_exports, {
|
|
24
|
-
ABTestingRegion: () => import_client_abtesting.Region,
|
|
25
|
-
AbtestingClient: () => import_client_abtesting2.AbtestingClient,
|
|
26
|
-
AdvancedSyntaxFeatures: () => import_client_search.AdvancedSyntaxFeatures,
|
|
27
|
-
AlternativesAsExact: () => import_client_search.AlternativesAsExact,
|
|
28
|
-
AnalyticsClient: () => import_client_analytics2.AnalyticsClient,
|
|
29
|
-
AnalyticsRegion: () => import_client_analytics.Region,
|
|
30
|
-
Anchoring: () => import_client_search.Anchoring,
|
|
31
|
-
AroundPrecision: () => import_client_search.AroundPrecision,
|
|
32
|
-
AroundRadius: () => import_client_search.AroundRadius,
|
|
33
|
-
AroundRadiusAll: () => import_client_search.AroundRadiusAll,
|
|
34
|
-
AutomaticFacetFilter: () => import_client_search.AutomaticFacetFilter,
|
|
35
|
-
AutomaticFacetFilters: () => import_client_search.AutomaticFacetFilters,
|
|
36
|
-
BaseSearchParams: () => import_client_search.BaseSearchParams,
|
|
37
|
-
BaseSearchParamsWithoutQuery: () => import_client_search.BaseSearchParamsWithoutQuery,
|
|
38
|
-
BaseSearchResponse: () => import_client_search.BaseSearchResponse,
|
|
39
|
-
BooleanString: () => import_client_search.BooleanString,
|
|
40
|
-
Condition: () => import_client_search.Condition,
|
|
41
|
-
Consequence: () => import_client_search.Consequence,
|
|
42
|
-
ConsequenceHide: () => import_client_search.ConsequenceHide,
|
|
43
|
-
ConsequenceParams: () => import_client_search.ConsequenceParams,
|
|
44
|
-
ConsequenceQuery: () => import_client_search.ConsequenceQuery,
|
|
45
|
-
ConsequenceQueryObject: () => import_client_search.ConsequenceQueryObject,
|
|
46
|
-
CustomDeleteProps: () => import_client_search.CustomDeleteProps,
|
|
47
|
-
CustomGetProps: () => import_client_search.CustomGetProps,
|
|
48
|
-
CustomPostProps: () => import_client_search.CustomPostProps,
|
|
49
|
-
CustomPutProps: () => import_client_search.CustomPutProps,
|
|
50
|
-
DeletedAtResponse: () => import_client_search.DeletedAtResponse,
|
|
51
|
-
Distinct: () => import_client_search.Distinct,
|
|
52
|
-
Edit: () => import_client_search.Edit,
|
|
53
|
-
EditType: () => import_client_search.EditType,
|
|
54
|
-
ErrorBase: () => import_client_search.ErrorBase,
|
|
55
|
-
ExactOnSingleWordQuery: () => import_client_search.ExactOnSingleWordQuery,
|
|
56
|
-
Exhaustive: () => import_client_search.Exhaustive,
|
|
57
|
-
FacetFilters: () => import_client_search.FacetFilters,
|
|
58
|
-
FacetOrdering: () => import_client_search.FacetOrdering,
|
|
59
|
-
FacetStats: () => import_client_search.FacetStats,
|
|
60
|
-
Facets: () => import_client_search.Facets,
|
|
61
|
-
HighlightResult: () => import_client_search.HighlightResult,
|
|
62
|
-
HighlightResultOption: () => import_client_search.HighlightResultOption,
|
|
63
|
-
IgnorePlurals: () => import_client_search.IgnorePlurals,
|
|
64
|
-
IndexSettingsAsSearchParams: () => import_client_search.IndexSettingsAsSearchParams,
|
|
65
|
-
MatchLevel: () => import_client_search.MatchLevel,
|
|
66
|
-
MatchedGeoLocation: () => import_client_search.MatchedGeoLocation,
|
|
67
|
-
Mode: () => import_client_search.Mode,
|
|
68
|
-
NumericFilters: () => import_client_search.NumericFilters,
|
|
69
|
-
OptionalFilters: () => import_client_search.OptionalFilters,
|
|
70
|
-
Params: () => import_client_search.Params,
|
|
71
|
-
Personalization: () => import_client_search.Personalization,
|
|
72
|
-
PersonalizationClient: () => import_client_personalization.PersonalizationClient,
|
|
73
|
-
Promote: () => import_client_search.Promote,
|
|
74
|
-
PromoteObjectID: () => import_client_search.PromoteObjectID,
|
|
75
|
-
PromoteObjectIDs: () => import_client_search.PromoteObjectIDs,
|
|
76
|
-
QueryType: () => import_client_search.QueryType,
|
|
77
|
-
Range: () => import_client_search.Range,
|
|
78
|
-
RankingInfo: () => import_client_search.RankingInfo,
|
|
79
|
-
ReRankingApplyFilter: () => import_client_search.ReRankingApplyFilter,
|
|
80
|
-
RecommendClient: () => import_recommend.RecommendClient,
|
|
81
|
-
Redirect: () => import_client_search.Redirect,
|
|
82
|
-
RedirectRuleIndexData: () => import_client_search.RedirectRuleIndexData,
|
|
83
|
-
RedirectRuleIndexMetadata: () => import_client_search.RedirectRuleIndexMetadata,
|
|
84
|
-
RedirectURL: () => import_client_search.RedirectURL,
|
|
85
|
-
RemoveStopWords: () => import_client_search.RemoveStopWords,
|
|
86
|
-
RemoveWordsIfNoResults: () => import_client_search.RemoveWordsIfNoResults,
|
|
87
|
-
RenderingContent: () => import_client_search.RenderingContent,
|
|
88
|
-
SearchClient: () => import_client_search2.SearchClient,
|
|
89
|
-
SearchPagination: () => import_client_search.SearchPagination,
|
|
90
|
-
SearchParams: () => import_client_search.SearchParams,
|
|
91
|
-
SearchParamsObject: () => import_client_search.SearchParamsObject,
|
|
92
|
-
SearchParamsQuery: () => import_client_search.SearchParamsQuery,
|
|
93
|
-
SemanticSearch: () => import_client_search.SemanticSearch,
|
|
94
|
-
SnippetResult: () => import_client_search.SnippetResult,
|
|
95
|
-
SnippetResultOption: () => import_client_search.SnippetResultOption,
|
|
96
|
-
SortRemainingBy: () => import_client_search.SortRemainingBy,
|
|
97
|
-
SupportedLanguage: () => import_client_search.SupportedLanguage,
|
|
98
|
-
TagFilters: () => import_client_search.TagFilters,
|
|
99
|
-
TaskStatus: () => import_client_search.TaskStatus,
|
|
100
|
-
TypoTolerance: () => import_client_search.TypoTolerance,
|
|
101
|
-
TypoToleranceEnum: () => import_client_search.TypoToleranceEnum,
|
|
102
|
-
Value: () => import_client_search.Value,
|
|
103
24
|
algoliasearch: () => algoliasearch,
|
|
104
25
|
apiClientVersion: () => import_client_search.apiClientVersion
|
|
105
26
|
});
|
|
106
27
|
module.exports = __toCommonJS(node_exports);
|
|
107
28
|
var import_node_crypto = require("crypto");
|
|
108
|
-
var
|
|
109
|
-
var
|
|
29
|
+
var import_client_abtesting = require("@algolia/client-abtesting");
|
|
30
|
+
var import_client_analytics = require("@algolia/client-analytics");
|
|
110
31
|
var import_client_common = require("@algolia/client-common");
|
|
111
|
-
var
|
|
112
|
-
var
|
|
113
|
-
var
|
|
32
|
+
var import_client_personalization = require("@algolia/client-personalization");
|
|
33
|
+
var import_client_search2 = require("@algolia/client-search");
|
|
34
|
+
var import_recommend = require("@algolia/recommend");
|
|
114
35
|
var import_requester_node_http = require("@algolia/requester-node-http");
|
|
115
36
|
|
|
116
37
|
// builds/models.ts
|
|
117
38
|
var models_exports = {};
|
|
118
39
|
__export(models_exports, {
|
|
119
|
-
ABTestingRegion: () => import_client_abtesting.Region,
|
|
120
|
-
AbtestingClient: () => import_client_abtesting2.AbtestingClient,
|
|
121
|
-
AdvancedSyntaxFeatures: () => import_client_search.AdvancedSyntaxFeatures,
|
|
122
|
-
AlternativesAsExact: () => import_client_search.AlternativesAsExact,
|
|
123
|
-
AnalyticsClient: () => import_client_analytics2.AnalyticsClient,
|
|
124
|
-
AnalyticsRegion: () => import_client_analytics.Region,
|
|
125
|
-
Anchoring: () => import_client_search.Anchoring,
|
|
126
|
-
AroundPrecision: () => import_client_search.AroundPrecision,
|
|
127
|
-
AroundRadius: () => import_client_search.AroundRadius,
|
|
128
|
-
AroundRadiusAll: () => import_client_search.AroundRadiusAll,
|
|
129
|
-
AutomaticFacetFilter: () => import_client_search.AutomaticFacetFilter,
|
|
130
|
-
AutomaticFacetFilters: () => import_client_search.AutomaticFacetFilters,
|
|
131
|
-
BaseSearchParams: () => import_client_search.BaseSearchParams,
|
|
132
|
-
BaseSearchParamsWithoutQuery: () => import_client_search.BaseSearchParamsWithoutQuery,
|
|
133
|
-
BaseSearchResponse: () => import_client_search.BaseSearchResponse,
|
|
134
|
-
BooleanString: () => import_client_search.BooleanString,
|
|
135
|
-
Condition: () => import_client_search.Condition,
|
|
136
|
-
Consequence: () => import_client_search.Consequence,
|
|
137
|
-
ConsequenceHide: () => import_client_search.ConsequenceHide,
|
|
138
|
-
ConsequenceParams: () => import_client_search.ConsequenceParams,
|
|
139
|
-
ConsequenceQuery: () => import_client_search.ConsequenceQuery,
|
|
140
|
-
ConsequenceQueryObject: () => import_client_search.ConsequenceQueryObject,
|
|
141
|
-
CustomDeleteProps: () => import_client_search.CustomDeleteProps,
|
|
142
|
-
CustomGetProps: () => import_client_search.CustomGetProps,
|
|
143
|
-
CustomPostProps: () => import_client_search.CustomPostProps,
|
|
144
|
-
CustomPutProps: () => import_client_search.CustomPutProps,
|
|
145
|
-
DeletedAtResponse: () => import_client_search.DeletedAtResponse,
|
|
146
|
-
Distinct: () => import_client_search.Distinct,
|
|
147
|
-
Edit: () => import_client_search.Edit,
|
|
148
|
-
EditType: () => import_client_search.EditType,
|
|
149
|
-
ErrorBase: () => import_client_search.ErrorBase,
|
|
150
|
-
ExactOnSingleWordQuery: () => import_client_search.ExactOnSingleWordQuery,
|
|
151
|
-
Exhaustive: () => import_client_search.Exhaustive,
|
|
152
|
-
FacetFilters: () => import_client_search.FacetFilters,
|
|
153
|
-
FacetOrdering: () => import_client_search.FacetOrdering,
|
|
154
|
-
FacetStats: () => import_client_search.FacetStats,
|
|
155
|
-
Facets: () => import_client_search.Facets,
|
|
156
|
-
HighlightResult: () => import_client_search.HighlightResult,
|
|
157
|
-
HighlightResultOption: () => import_client_search.HighlightResultOption,
|
|
158
|
-
IgnorePlurals: () => import_client_search.IgnorePlurals,
|
|
159
|
-
IndexSettingsAsSearchParams: () => import_client_search.IndexSettingsAsSearchParams,
|
|
160
|
-
MatchLevel: () => import_client_search.MatchLevel,
|
|
161
|
-
MatchedGeoLocation: () => import_client_search.MatchedGeoLocation,
|
|
162
|
-
Mode: () => import_client_search.Mode,
|
|
163
|
-
NumericFilters: () => import_client_search.NumericFilters,
|
|
164
|
-
OptionalFilters: () => import_client_search.OptionalFilters,
|
|
165
|
-
Params: () => import_client_search.Params,
|
|
166
|
-
Personalization: () => import_client_search.Personalization,
|
|
167
|
-
PersonalizationClient: () => import_client_personalization.PersonalizationClient,
|
|
168
|
-
Promote: () => import_client_search.Promote,
|
|
169
|
-
PromoteObjectID: () => import_client_search.PromoteObjectID,
|
|
170
|
-
PromoteObjectIDs: () => import_client_search.PromoteObjectIDs,
|
|
171
|
-
QueryType: () => import_client_search.QueryType,
|
|
172
|
-
Range: () => import_client_search.Range,
|
|
173
|
-
RankingInfo: () => import_client_search.RankingInfo,
|
|
174
|
-
ReRankingApplyFilter: () => import_client_search.ReRankingApplyFilter,
|
|
175
|
-
RecommendClient: () => import_recommend.RecommendClient,
|
|
176
|
-
Redirect: () => import_client_search.Redirect,
|
|
177
|
-
RedirectRuleIndexData: () => import_client_search.RedirectRuleIndexData,
|
|
178
|
-
RedirectRuleIndexMetadata: () => import_client_search.RedirectRuleIndexMetadata,
|
|
179
|
-
RedirectURL: () => import_client_search.RedirectURL,
|
|
180
|
-
RemoveStopWords: () => import_client_search.RemoveStopWords,
|
|
181
|
-
RemoveWordsIfNoResults: () => import_client_search.RemoveWordsIfNoResults,
|
|
182
|
-
RenderingContent: () => import_client_search.RenderingContent,
|
|
183
|
-
SearchClient: () => import_client_search2.SearchClient,
|
|
184
|
-
SearchPagination: () => import_client_search.SearchPagination,
|
|
185
|
-
SearchParams: () => import_client_search.SearchParams,
|
|
186
|
-
SearchParamsObject: () => import_client_search.SearchParamsObject,
|
|
187
|
-
SearchParamsQuery: () => import_client_search.SearchParamsQuery,
|
|
188
|
-
SemanticSearch: () => import_client_search.SemanticSearch,
|
|
189
|
-
SnippetResult: () => import_client_search.SnippetResult,
|
|
190
|
-
SnippetResultOption: () => import_client_search.SnippetResultOption,
|
|
191
|
-
SortRemainingBy: () => import_client_search.SortRemainingBy,
|
|
192
|
-
SupportedLanguage: () => import_client_search.SupportedLanguage,
|
|
193
|
-
TagFilters: () => import_client_search.TagFilters,
|
|
194
|
-
TaskStatus: () => import_client_search.TaskStatus,
|
|
195
|
-
TypoTolerance: () => import_client_search.TypoTolerance,
|
|
196
|
-
TypoToleranceEnum: () => import_client_search.TypoToleranceEnum,
|
|
197
|
-
Value: () => import_client_search.Value,
|
|
198
40
|
apiClientVersion: () => import_client_search.apiClientVersion
|
|
199
41
|
});
|
|
200
|
-
var import_client_abtesting = require("@algolia/client-abtesting");
|
|
201
|
-
var import_client_analytics = require("@algolia/client-analytics");
|
|
202
42
|
var import_client_search = require("@algolia/client-search");
|
|
203
43
|
__reExport(models_exports, require("@algolia/client-search"));
|
|
204
44
|
__reExport(models_exports, require("@algolia/recommend"));
|
|
205
45
|
__reExport(models_exports, require("@algolia/client-personalization"));
|
|
206
46
|
__reExport(models_exports, require("@algolia/client-analytics"));
|
|
207
47
|
__reExport(models_exports, require("@algolia/client-abtesting"));
|
|
208
|
-
var import_client_search2 = require("@algolia/client-search");
|
|
209
|
-
var import_recommend = require("@algolia/recommend");
|
|
210
|
-
var import_client_personalization = require("@algolia/client-personalization");
|
|
211
|
-
var import_client_analytics2 = require("@algolia/client-analytics");
|
|
212
|
-
var import_client_abtesting2 = require("@algolia/client-abtesting");
|
|
213
48
|
|
|
214
49
|
// builds/node.ts
|
|
215
50
|
__reExport(node_exports, models_exports, module.exports);
|
|
@@ -221,10 +56,10 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
221
56
|
throw new Error("`apiKey` is missing.");
|
|
222
57
|
}
|
|
223
58
|
function initRecommend(initOptions = {}) {
|
|
224
|
-
return (0,
|
|
59
|
+
return (0, import_recommend.recommendClient)(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);
|
|
225
60
|
}
|
|
226
61
|
function initAnalytics(initOptions = {}) {
|
|
227
|
-
return (0,
|
|
62
|
+
return (0, import_client_analytics.analyticsClient)(
|
|
228
63
|
initOptions.appId || appId,
|
|
229
64
|
initOptions.apiKey || apiKey,
|
|
230
65
|
initOptions.region,
|
|
@@ -232,7 +67,7 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
232
67
|
);
|
|
233
68
|
}
|
|
234
69
|
function initAbtesting(initOptions = {}) {
|
|
235
|
-
return (0,
|
|
70
|
+
return (0, import_client_abtesting.abtestingClient)(
|
|
236
71
|
initOptions.appId || appId,
|
|
237
72
|
initOptions.apiKey || apiKey,
|
|
238
73
|
initOptions.region,
|
|
@@ -240,7 +75,7 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
240
75
|
);
|
|
241
76
|
}
|
|
242
77
|
function initPersonalization(initOptions) {
|
|
243
|
-
return (0,
|
|
78
|
+
return (0, import_client_personalization.personalizationClient)(
|
|
244
79
|
initOptions.appId || appId,
|
|
245
80
|
initOptions.apiKey || apiKey,
|
|
246
81
|
initOptions.region,
|
|
@@ -248,7 +83,7 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
248
83
|
);
|
|
249
84
|
}
|
|
250
85
|
return {
|
|
251
|
-
...(0,
|
|
86
|
+
...(0, import_client_search2.searchClient)(appId, apiKey, {
|
|
252
87
|
timeouts: {
|
|
253
88
|
connect: import_client_common.DEFAULT_CONNECT_TIMEOUT_NODE,
|
|
254
89
|
read: import_client_common.DEFAULT_READ_TIMEOUT_NODE,
|
|
@@ -320,85 +155,6 @@ function algoliasearch(appId, apiKey, options) {
|
|
|
320
155
|
}
|
|
321
156
|
// Annotate the CommonJS export names for ESM import in node:
|
|
322
157
|
0 && (module.exports = {
|
|
323
|
-
ABTestingRegion,
|
|
324
|
-
AbtestingClient,
|
|
325
|
-
AdvancedSyntaxFeatures,
|
|
326
|
-
AlternativesAsExact,
|
|
327
|
-
AnalyticsClient,
|
|
328
|
-
AnalyticsRegion,
|
|
329
|
-
Anchoring,
|
|
330
|
-
AroundPrecision,
|
|
331
|
-
AroundRadius,
|
|
332
|
-
AroundRadiusAll,
|
|
333
|
-
AutomaticFacetFilter,
|
|
334
|
-
AutomaticFacetFilters,
|
|
335
|
-
BaseSearchParams,
|
|
336
|
-
BaseSearchParamsWithoutQuery,
|
|
337
|
-
BaseSearchResponse,
|
|
338
|
-
BooleanString,
|
|
339
|
-
Condition,
|
|
340
|
-
Consequence,
|
|
341
|
-
ConsequenceHide,
|
|
342
|
-
ConsequenceParams,
|
|
343
|
-
ConsequenceQuery,
|
|
344
|
-
ConsequenceQueryObject,
|
|
345
|
-
CustomDeleteProps,
|
|
346
|
-
CustomGetProps,
|
|
347
|
-
CustomPostProps,
|
|
348
|
-
CustomPutProps,
|
|
349
|
-
DeletedAtResponse,
|
|
350
|
-
Distinct,
|
|
351
|
-
Edit,
|
|
352
|
-
EditType,
|
|
353
|
-
ErrorBase,
|
|
354
|
-
ExactOnSingleWordQuery,
|
|
355
|
-
Exhaustive,
|
|
356
|
-
FacetFilters,
|
|
357
|
-
FacetOrdering,
|
|
358
|
-
FacetStats,
|
|
359
|
-
Facets,
|
|
360
|
-
HighlightResult,
|
|
361
|
-
HighlightResultOption,
|
|
362
|
-
IgnorePlurals,
|
|
363
|
-
IndexSettingsAsSearchParams,
|
|
364
|
-
MatchLevel,
|
|
365
|
-
MatchedGeoLocation,
|
|
366
|
-
Mode,
|
|
367
|
-
NumericFilters,
|
|
368
|
-
OptionalFilters,
|
|
369
|
-
Params,
|
|
370
|
-
Personalization,
|
|
371
|
-
PersonalizationClient,
|
|
372
|
-
Promote,
|
|
373
|
-
PromoteObjectID,
|
|
374
|
-
PromoteObjectIDs,
|
|
375
|
-
QueryType,
|
|
376
|
-
Range,
|
|
377
|
-
RankingInfo,
|
|
378
|
-
ReRankingApplyFilter,
|
|
379
|
-
RecommendClient,
|
|
380
|
-
Redirect,
|
|
381
|
-
RedirectRuleIndexData,
|
|
382
|
-
RedirectRuleIndexMetadata,
|
|
383
|
-
RedirectURL,
|
|
384
|
-
RemoveStopWords,
|
|
385
|
-
RemoveWordsIfNoResults,
|
|
386
|
-
RenderingContent,
|
|
387
|
-
SearchClient,
|
|
388
|
-
SearchPagination,
|
|
389
|
-
SearchParams,
|
|
390
|
-
SearchParamsObject,
|
|
391
|
-
SearchParamsQuery,
|
|
392
|
-
SemanticSearch,
|
|
393
|
-
SnippetResult,
|
|
394
|
-
SnippetResultOption,
|
|
395
|
-
SortRemainingBy,
|
|
396
|
-
SupportedLanguage,
|
|
397
|
-
TagFilters,
|
|
398
|
-
TaskStatus,
|
|
399
|
-
TypoTolerance,
|
|
400
|
-
TypoToleranceEnum,
|
|
401
|
-
Value,
|
|
402
158
|
algoliasearch,
|
|
403
159
|
apiClientVersion
|
|
404
160
|
});
|
package/dist/node.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../builds/node.ts","../builds/models.ts"],"sourcesContent":["// 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.\n\nimport { createHmac } from 'node:crypto';\n\nimport type { AbtestingClient, Region as AbtestingRegion } from '@algolia/client-abtesting';\nimport { abtestingClient } from '@algolia/client-abtesting';\nimport type { AnalyticsClient, Region as AnalyticsRegion } from '@algolia/client-analytics';\nimport { analyticsClient } from '@algolia/client-analytics';\nimport type { ClientOptions } from '@algolia/client-common';\nimport {\n DEFAULT_CONNECT_TIMEOUT_NODE,\n DEFAULT_READ_TIMEOUT_NODE,\n DEFAULT_WRITE_TIMEOUT_NODE,\n createMemoryCache,\n createNullCache,\n serializeQueryParameters,\n} from '@algolia/client-common';\nimport type { PersonalizationClient, Region as PersonalizationRegion } from '@algolia/client-personalization';\nimport { personalizationClient } from '@algolia/client-personalization';\nimport { searchClient } from '@algolia/client-search';\nimport type { RecommendClient } from '@algolia/recommend';\nimport { recommendClient } from '@algolia/recommend';\nimport { createHttpRequester } from '@algolia/requester-node-http';\n\nimport type {\n InitClientOptions,\n InitClientRegion,\n GenerateSecuredApiKeyOptions,\n GetSecuredApiKeyRemainingValidityOptions,\n} from './models';\n\nexport * from './models';\n\n/**\n * The client type.\n */\nexport type Algoliasearch = ReturnType<typeof algoliasearch>;\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport function algoliasearch(appId: string, apiKey: string, options?: ClientOptions) {\n if (!appId || typeof appId !== 'string') {\n throw new Error('`appId` is missing.');\n }\n\n if (!apiKey || typeof apiKey !== 'string') {\n throw new Error('`apiKey` is missing.');\n }\n function initRecommend(initOptions: InitClientOptions = {}): RecommendClient {\n return recommendClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);\n }\n\n function initAnalytics(initOptions: InitClientOptions & InitClientRegion<AnalyticsRegion> = {}): AnalyticsClient {\n return analyticsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n }\n\n function initAbtesting(initOptions: InitClientOptions & InitClientRegion<AbtestingRegion> = {}): AbtestingClient {\n return abtestingClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n }\n\n function initPersonalization(\n initOptions: InitClientOptions & Required<InitClientRegion<PersonalizationRegion>>,\n ): PersonalizationClient {\n return personalizationClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n }\n\n return {\n ...searchClient(appId, apiKey, {\n timeouts: {\n connect: DEFAULT_CONNECT_TIMEOUT_NODE,\n read: DEFAULT_READ_TIMEOUT_NODE,\n write: DEFAULT_WRITE_TIMEOUT_NODE,\n },\n requester: createHttpRequester(),\n algoliaAgents: [{ segment: 'Node.js', version: process.versions.node }],\n responsesCache: createNullCache(),\n requestsCache: createNullCache(),\n hostsCache: createMemoryCache(),\n ...options,\n }),\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return this.transporter.algoliaAgent.value;\n },\n initAbtesting,\n initAnalytics,\n initPersonalization,\n initRecommend,\n /**\n * Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.\n *\n * @summary Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.\n * @param generateSecuredApiKey - The `generateSecuredApiKey` object.\n * @param generateSecuredApiKey.parentApiKey - The base API key from which to generate the new secured one.\n * @param generateSecuredApiKey.restrictions - A set of properties defining the restrictions of the secured API key.\n */\n generateSecuredApiKey({ parentApiKey, restrictions = {} }: GenerateSecuredApiKeyOptions): string {\n let mergedRestrictions = restrictions;\n if (restrictions.searchParams) {\n // merge searchParams with the root restrictions\n mergedRestrictions = {\n ...restrictions,\n ...restrictions.searchParams,\n };\n\n delete mergedRestrictions.searchParams;\n }\n\n mergedRestrictions = Object.keys(mergedRestrictions)\n .sort()\n .reduce(\n (acc, key) => {\n // eslint-disable-next-line no-param-reassign\n acc[key] = (mergedRestrictions as any)[key];\n return acc;\n },\n {} as Record<string, unknown>,\n );\n\n const queryParameters = serializeQueryParameters(mergedRestrictions);\n return Buffer.from(\n createHmac('sha256', parentApiKey).update(queryParameters).digest('hex') + queryParameters,\n ).toString('base64');\n },\n\n /**\n * Helper: Retrieves the remaining validity of the previous generated `securedApiKey`, the `ValidUntil` parameter must have been provided.\n *\n * @summary Helper: Retrieves the remaining validity of the previous generated `secured_api_key`, the `ValidUntil` parameter must have been provided.\n * @param getSecuredApiKeyRemainingValidity - The `getSecuredApiKeyRemainingValidity` object.\n * @param getSecuredApiKeyRemainingValidity.securedApiKey - The secured API key generated with the `generateSecuredApiKey` method.\n */\n getSecuredApiKeyRemainingValidity({ securedApiKey }: GetSecuredApiKeyRemainingValidityOptions): number {\n const decodedString = Buffer.from(securedApiKey, 'base64').toString('ascii');\n const regex = /validUntil=(\\d+)/;\n const match = decodedString.match(regex);\n\n if (match === null) {\n throw new Error('validUntil not found in given secured api key.');\n }\n\n return parseInt(match[1], 10) - Math.round(new Date().getTime() / 1000);\n },\n };\n}\n","// 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.\n\nimport { Region as ABTestingRegion } from '@algolia/client-abtesting';\nimport { Region as AnalyticsRegion } from '@algolia/client-analytics';\nimport type { ClientOptions } from '@algolia/client-common';\nimport {\n AdvancedSyntaxFeatures,\n AlternativesAsExact,\n Anchoring,\n AroundPrecision,\n AroundRadius,\n AroundRadiusAll,\n AutomaticFacetFilter,\n AutomaticFacetFilters,\n BaseSearchParams,\n BaseSearchParamsWithoutQuery,\n BaseSearchResponse,\n BooleanString,\n Condition,\n Consequence,\n ConsequenceHide,\n ConsequenceParams,\n ConsequenceQuery,\n ConsequenceQueryObject,\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n DeletedAtResponse,\n Distinct,\n Edit,\n EditType,\n ErrorBase,\n ExactOnSingleWordQuery,\n Exhaustive,\n FacetFilters,\n FacetOrdering,\n Facets,\n FacetStats,\n HighlightResult,\n HighlightResultOption,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n MatchLevel,\n MatchedGeoLocation,\n Mode,\n NumericFilters,\n OptionalFilters,\n Params,\n Personalization,\n Promote,\n PromoteObjectID,\n PromoteObjectIDs,\n QueryType,\n Range,\n RankingInfo,\n ReRankingApplyFilter,\n Redirect,\n RedirectRuleIndexMetadata,\n RedirectRuleIndexData,\n RedirectURL,\n RemoveStopWords,\n RemoveWordsIfNoResults,\n RenderingContent,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SemanticSearch,\n SnippetResult,\n SnippetResultOption,\n SortRemainingBy,\n SupportedLanguage,\n TagFilters,\n TaskStatus,\n TypoTolerance,\n TypoToleranceEnum,\n Value,\n apiClientVersion,\n} from '@algolia/client-search';\n\ntype Region = ABTestingRegion | AnalyticsRegion;\n\nexport * from '@algolia/client-search';\nexport * from '@algolia/recommend';\nexport * from '@algolia/client-personalization';\nexport * from '@algolia/client-analytics';\nexport * from '@algolia/client-abtesting';\n\nexport { SearchClient } from '@algolia/client-search';\nexport { RecommendClient } from '@algolia/recommend';\nexport { PersonalizationClient } from '@algolia/client-personalization';\nexport { AnalyticsClient } from '@algolia/client-analytics';\nexport { AbtestingClient } from '@algolia/client-abtesting';\n\nexport {\n AdvancedSyntaxFeatures,\n AlternativesAsExact,\n Anchoring,\n AroundPrecision,\n AroundRadius,\n AroundRadiusAll,\n AutomaticFacetFilter,\n AutomaticFacetFilters,\n BaseSearchParams,\n BaseSearchParamsWithoutQuery,\n BaseSearchResponse,\n BooleanString,\n Condition,\n Consequence,\n ConsequenceHide,\n ConsequenceParams,\n ConsequenceQuery,\n ConsequenceQueryObject,\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n DeletedAtResponse,\n Distinct,\n Edit,\n EditType,\n ErrorBase,\n ExactOnSingleWordQuery,\n Exhaustive,\n FacetFilters,\n FacetOrdering,\n Facets,\n FacetStats,\n HighlightResult,\n HighlightResultOption,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n MatchLevel,\n MatchedGeoLocation,\n Mode,\n NumericFilters,\n OptionalFilters,\n Params,\n Personalization,\n Promote,\n PromoteObjectID,\n PromoteObjectIDs,\n QueryType,\n Range,\n RankingInfo,\n ReRankingApplyFilter,\n Redirect,\n RedirectRuleIndexMetadata,\n RedirectRuleIndexData,\n RedirectURL,\n RemoveStopWords,\n RemoveWordsIfNoResults,\n RenderingContent,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SemanticSearch,\n SearchPagination,\n SnippetResult,\n SnippetResultOption,\n SortRemainingBy,\n SupportedLanguage,\n TagFilters,\n TaskStatus,\n TypoTolerance,\n TypoToleranceEnum,\n Value,\n apiClientVersion,\n AnalyticsRegion,\n ABTestingRegion,\n Region,\n};\n\n/**\n * Options forwarded to the client initialized via the `init` method.\n */\nexport type InitClientOptions = Partial<{\n /**\n * App to target with the initialized client, defaults to the `algoliasearch` appId.\n */\n appId: string;\n /**\n * API key of the targeted app ID, defaults to the `algoliasearch` apiKey.\n */\n apiKey: string;\n options: ClientOptions;\n}>;\n\nexport type InitClientRegion<TRegion> = Partial<{\n /**\n * Available regions of the initialized client.\n */\n region: TRegion;\n}>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,iDAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA,iDAAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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,eAAe,CAAC,EAAE,GAAyC;AAC/F,UAAI,qBAAqB;AACzB,UAAI,aAAa,cAAc;AAE7B,6BAAqB;AAAA,UACnB,GAAG;AAAA,UACH,GAAG,aAAa;AAAA,QAClB;AAEA,eAAO,mBAAmB;AAAA,MAC5B;AAEA,2BAAqB,OAAO,KAAK,kBAAkB,EAChD,KAAK,EACL;AAAA,QACC,CAAC,KAAK,QAAQ;AAEZ,cAAI,GAAG,IAAK,mBAA2B,GAAG;AAC1C,iBAAO;AAAA,QACT;AAAA,QACA,CAAC;AAAA,MACH;AAEF,YAAM,sBAAkB,+CAAyB,kBAAkB;AACnE,aAAO,OAAO;AAAA,YACZ,+BAAW,UAAU,YAAY,EAAE,OAAO,eAAe,EAAE,OAAO,KAAK,IAAI;AAAA,MAC7E,EAAE,SAAS,QAAQ;AAAA,IACrB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,kCAAkC,EAAE,cAAc,GAAqD;AACrG,YAAM,gBAAgB,OAAO,KAAK,eAAe,QAAQ,EAAE,SAAS,OAAO;AAC3E,YAAM,QAAQ;AACd,YAAM,QAAQ,cAAc,MAAM,KAAK;AAEvC,UAAI,UAAU,MAAM;AAClB,cAAM,IAAI,MAAM,gDAAgD;AAAA,MAClE;AAEA,aAAO,SAAS,MAAM,CAAC,GAAG,EAAE,IAAI,KAAK,OAAM,oBAAI,KAAK,GAAE,QAAQ,IAAI,GAAI;AAAA,IACxE;AAAA,EACF;AACF;","names":["ABTestingRegion","AnalyticsRegion","import_client_abtesting","import_client_analytics","import_client_personalization","import_client_search","import_recommend","ABTestingRegion","AnalyticsRegion","import_client_search","import_client_analytics","import_client_abtesting"]}
|
|
1
|
+
{"version":3,"sources":["../builds/node.ts","../builds/models.ts"],"sourcesContent":["// 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.\n\nimport { createHmac } from 'node:crypto';\n\nimport type { AbtestingClient, Region as AbtestingRegion } from '@algolia/client-abtesting';\nimport { abtestingClient } from '@algolia/client-abtesting';\nimport type { AnalyticsClient, Region as AnalyticsRegion } from '@algolia/client-analytics';\nimport { analyticsClient } from '@algolia/client-analytics';\nimport {\n DEFAULT_CONNECT_TIMEOUT_NODE,\n DEFAULT_READ_TIMEOUT_NODE,\n DEFAULT_WRITE_TIMEOUT_NODE,\n createMemoryCache,\n createNullCache,\n serializeQueryParameters,\n} from '@algolia/client-common';\nimport type { ClientOptions } from '@algolia/client-common';\nimport type { PersonalizationClient, Region as PersonalizationRegion } from '@algolia/client-personalization';\nimport { personalizationClient } from '@algolia/client-personalization';\nimport { searchClient } from '@algolia/client-search';\nimport type { RecommendClient } from '@algolia/recommend';\nimport { recommendClient } from '@algolia/recommend';\nimport { createHttpRequester } from '@algolia/requester-node-http';\n\nimport type {\n InitClientOptions,\n InitClientRegion,\n GenerateSecuredApiKeyOptions,\n GetSecuredApiKeyRemainingValidityOptions,\n} from './models';\n\nexport * from './models';\n\n/**\n * The client type.\n */\nexport type Algoliasearch = ReturnType<typeof algoliasearch>;\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport function algoliasearch(appId: string, apiKey: string, options?: ClientOptions) {\n if (!appId || typeof appId !== 'string') {\n throw new Error('`appId` is missing.');\n }\n\n if (!apiKey || typeof apiKey !== 'string') {\n throw new Error('`apiKey` is missing.');\n }\n function initRecommend(initOptions: InitClientOptions = {}): RecommendClient {\n return recommendClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);\n }\n\n function initAnalytics(initOptions: InitClientOptions & InitClientRegion<AnalyticsRegion> = {}): AnalyticsClient {\n return analyticsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n }\n\n function initAbtesting(initOptions: InitClientOptions & InitClientRegion<AbtestingRegion> = {}): AbtestingClient {\n return abtestingClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n }\n\n function initPersonalization(\n initOptions: InitClientOptions & Required<InitClientRegion<PersonalizationRegion>>,\n ): PersonalizationClient {\n return personalizationClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n }\n\n return {\n ...searchClient(appId, apiKey, {\n timeouts: {\n connect: DEFAULT_CONNECT_TIMEOUT_NODE,\n read: DEFAULT_READ_TIMEOUT_NODE,\n write: DEFAULT_WRITE_TIMEOUT_NODE,\n },\n requester: createHttpRequester(),\n algoliaAgents: [{ segment: 'Node.js', version: process.versions.node }],\n responsesCache: createNullCache(),\n requestsCache: createNullCache(),\n hostsCache: createMemoryCache(),\n ...options,\n }),\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return this.transporter.algoliaAgent.value;\n },\n initAbtesting,\n initAnalytics,\n initPersonalization,\n initRecommend,\n /**\n * Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.\n *\n * @summary Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.\n * @param generateSecuredApiKey - The `generateSecuredApiKey` object.\n * @param generateSecuredApiKey.parentApiKey - The base API key from which to generate the new secured one.\n * @param generateSecuredApiKey.restrictions - A set of properties defining the restrictions of the secured API key.\n */\n generateSecuredApiKey({ parentApiKey, restrictions = {} }: GenerateSecuredApiKeyOptions): string {\n let mergedRestrictions = restrictions;\n if (restrictions.searchParams) {\n // merge searchParams with the root restrictions\n mergedRestrictions = {\n ...restrictions,\n ...restrictions.searchParams,\n };\n\n delete mergedRestrictions.searchParams;\n }\n\n mergedRestrictions = Object.keys(mergedRestrictions)\n .sort()\n .reduce(\n (acc, key) => {\n // eslint-disable-next-line no-param-reassign\n acc[key] = (mergedRestrictions as any)[key];\n return acc;\n },\n {} as Record<string, unknown>,\n );\n\n const queryParameters = serializeQueryParameters(mergedRestrictions);\n return Buffer.from(\n createHmac('sha256', parentApiKey).update(queryParameters).digest('hex') + queryParameters,\n ).toString('base64');\n },\n\n /**\n * Helper: Retrieves the remaining validity of the previous generated `securedApiKey`, the `ValidUntil` parameter must have been provided.\n *\n * @summary Helper: Retrieves the remaining validity of the previous generated `secured_api_key`, the `ValidUntil` parameter must have been provided.\n * @param getSecuredApiKeyRemainingValidity - The `getSecuredApiKeyRemainingValidity` object.\n * @param getSecuredApiKeyRemainingValidity.securedApiKey - The secured API key generated with the `generateSecuredApiKey` method.\n */\n getSecuredApiKeyRemainingValidity({ securedApiKey }: GetSecuredApiKeyRemainingValidityOptions): number {\n const decodedString = Buffer.from(securedApiKey, 'base64').toString('ascii');\n const regex = /validUntil=(\\d+)/;\n const match = decodedString.match(regex);\n\n if (match === null) {\n throw new Error('validUntil not found in given secured api key.');\n }\n\n return parseInt(match[1], 10) - Math.round(new Date().getTime() / 1000);\n },\n };\n}\n","// 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.\n\nimport type { Region as ABTestingRegion } from '@algolia/client-abtesting';\nimport type { Region as AnalyticsRegion } from '@algolia/client-analytics';\nimport type { ClientOptions } from '@algolia/client-common';\nimport type {\n AdvancedSyntaxFeatures,\n AlternativesAsExact,\n Anchoring,\n AroundPrecision,\n AroundRadius,\n AroundRadiusAll,\n AutomaticFacetFilter,\n AutomaticFacetFilters,\n BaseSearchParams,\n BaseSearchParamsWithoutQuery,\n BaseSearchResponse,\n BooleanString,\n Condition,\n Consequence,\n ConsequenceHide,\n ConsequenceParams,\n ConsequenceQuery,\n ConsequenceQueryObject,\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n DeletedAtResponse,\n Distinct,\n Edit,\n EditType,\n ErrorBase,\n ExactOnSingleWordQuery,\n Exhaustive,\n FacetFilters,\n FacetOrdering,\n Facets,\n FacetStats,\n HighlightResult,\n HighlightResultOption,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n MatchLevel,\n MatchedGeoLocation,\n Mode,\n NumericFilters,\n OptionalFilters,\n Params,\n Personalization,\n Promote,\n PromoteObjectID,\n PromoteObjectIDs,\n QueryType,\n Range,\n RankingInfo,\n ReRankingApplyFilter,\n Redirect,\n RedirectRuleIndexMetadata,\n RedirectRuleIndexData,\n RedirectURL,\n RemoveStopWords,\n RemoveWordsIfNoResults,\n RenderingContent,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SemanticSearch,\n SnippetResult,\n SnippetResultOption,\n SortRemainingBy,\n SupportedLanguage,\n TagFilters,\n TaskStatus,\n TypoTolerance,\n TypoToleranceEnum,\n Value,\n} from '@algolia/client-search';\nimport { apiClientVersion } from '@algolia/client-search';\n\ntype Region = ABTestingRegion | AnalyticsRegion;\n\nexport * from '@algolia/client-search';\nexport * from '@algolia/recommend';\nexport * from '@algolia/client-personalization';\nexport * from '@algolia/client-analytics';\nexport * from '@algolia/client-abtesting';\n\nexport {\n AdvancedSyntaxFeatures,\n AlternativesAsExact,\n Anchoring,\n AroundPrecision,\n AroundRadius,\n AroundRadiusAll,\n AutomaticFacetFilter,\n AutomaticFacetFilters,\n BaseSearchParams,\n BaseSearchParamsWithoutQuery,\n BaseSearchResponse,\n BooleanString,\n Condition,\n Consequence,\n ConsequenceHide,\n ConsequenceParams,\n ConsequenceQuery,\n ConsequenceQueryObject,\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n DeletedAtResponse,\n Distinct,\n Edit,\n EditType,\n ErrorBase,\n ExactOnSingleWordQuery,\n Exhaustive,\n FacetFilters,\n FacetOrdering,\n Facets,\n FacetStats,\n HighlightResult,\n HighlightResultOption,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n MatchLevel,\n MatchedGeoLocation,\n Mode,\n NumericFilters,\n OptionalFilters,\n Params,\n Personalization,\n Promote,\n PromoteObjectID,\n PromoteObjectIDs,\n QueryType,\n Range,\n RankingInfo,\n ReRankingApplyFilter,\n Redirect,\n RedirectRuleIndexMetadata,\n RedirectRuleIndexData,\n RedirectURL,\n RemoveStopWords,\n RemoveWordsIfNoResults,\n RenderingContent,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SemanticSearch,\n SearchPagination,\n SnippetResult,\n SnippetResultOption,\n SortRemainingBy,\n SupportedLanguage,\n TagFilters,\n TaskStatus,\n TypoTolerance,\n TypoToleranceEnum,\n Value,\n AnalyticsRegion,\n ABTestingRegion,\n Region,\n apiClientVersion,\n};\n\n/**\n * Options forwarded to the client initialized via the `init` method.\n */\nexport type InitClientOptions = Partial<{\n /**\n * App to target with the initialized client, defaults to the `algoliasearch` appId.\n */\n appId: string;\n /**\n * API key of the targeted app ID, defaults to the `algoliasearch` apiKey.\n */\n apiKey: string;\n options: ClientOptions;\n}>;\n\nexport type InitClientRegion<TRegion> = Partial<{\n /**\n * Available regions of the initialized client.\n */\n region: TRegion;\n}>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,yBAA2B;AAG3B,8BAAgC;AAEhC,8BAAgC;AAChC,2BAOO;AAGP,oCAAsC;AACtC,IAAAA,wBAA6B;AAE7B,uBAAgC;AAChC,iCAAoC;;;ACtBpC;AAAA;AAAA;AAAA;AA+EA,2BAAiC;AAIjC,2BAAc;AACd,2BAAc;AACd,2BAAc;AACd,2BAAc;AACd,2BAAc;;;ADxDd,yBAAc,gBA/Bd;AAuCO,SAAS,cAAc,OAAe,QAAgB,SAAyB;AACpF,MAAI,CAAC,SAAS,OAAO,UAAU,UAAU;AACvC,UAAM,IAAI,MAAM,qBAAqB;AAAA,EACvC;AAEA,MAAI,CAAC,UAAU,OAAO,WAAW,UAAU;AACzC,UAAM,IAAI,MAAM,sBAAsB;AAAA,EACxC;AACA,WAAS,cAAc,cAAiC,CAAC,GAAoB;AAC3E,eAAO,kCAAgB,YAAY,SAAS,OAAO,YAAY,UAAU,QAAQ,YAAY,OAAO;AAAA,EACtG;AAEA,WAAS,cAAc,cAAqE,CAAC,GAA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AEZ,cAAI,GAAG,IAAK,mBAA2B,GAAG;AAC1C,iBAAO;AAAA,QACT;AAAA,QACA,CAAC;AAAA,MACH;AAEF,YAAM,sBAAkB,+CAAyB,kBAAkB;AACnE,aAAO,OAAO;AAAA,YACZ,+BAAW,UAAU,YAAY,EAAE,OAAO,eAAe,EAAE,OAAO,KAAK,IAAI;AAAA,MAC7E,EAAE,SAAS,QAAQ;AAAA,IACrB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,kCAAkC,EAAE,cAAc,GAAqD;AACrG,YAAM,gBAAgB,OAAO,KAAK,eAAe,QAAQ,EAAE,SAAS,OAAO;AAC3E,YAAM,QAAQ;AACd,YAAM,QAAQ,cAAc,MAAM,KAAK;AAEvC,UAAI,UAAU,MAAM;AAClB,cAAM,IAAI,MAAM,gDAAgD;AAAA,MAClE;AAEA,aAAO,SAAS,MAAM,CAAC,GAAG,EAAE,IAAI,KAAK,OAAM,oBAAI,KAAK,GAAE,QAAQ,IAAI,GAAI;AAAA,IACxE;AAAA,EACF;AACF;","names":["import_client_search"]}
|
package/dist/node.d.cts
CHANGED
|
@@ -2,21 +2,19 @@ import * as _algolia_client_search_dist_model from '@algolia/client-search/dist/
|
|
|
2
2
|
import * as _algolia_client_search from '@algolia/client-search';
|
|
3
3
|
import { GenerateSecuredApiKeyOptions, GetSecuredApiKeyRemainingValidityOptions } from '@algolia/client-search';
|
|
4
4
|
export * from '@algolia/client-search';
|
|
5
|
-
export { AdvancedSyntaxFeatures, AlternativesAsExact, Anchoring, AroundPrecision, AroundRadius, AroundRadiusAll, AutomaticFacetFilter, AutomaticFacetFilters, BaseSearchParams, BaseSearchParamsWithoutQuery, BaseSearchResponse, BooleanString, Condition, Consequence, ConsequenceHide, ConsequenceParams, ConsequenceQuery, ConsequenceQueryObject, CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeletedAtResponse, Distinct, Edit, EditType, ErrorBase, ExactOnSingleWordQuery, Exhaustive, FacetFilters, FacetOrdering, FacetStats, Facets, HighlightResult, HighlightResultOption, IgnorePlurals, IndexSettingsAsSearchParams, MatchLevel, MatchedGeoLocation, Mode, NumericFilters, OptionalFilters, Params, Personalization, Promote, PromoteObjectID, PromoteObjectIDs, QueryType, Range, RankingInfo, ReRankingApplyFilter, Redirect, RedirectRuleIndexData, RedirectRuleIndexMetadata, RedirectURL, RemoveStopWords, RemoveWordsIfNoResults, RenderingContent,
|
|
5
|
+
export { AdvancedSyntaxFeatures, AlternativesAsExact, Anchoring, AroundPrecision, AroundRadius, AroundRadiusAll, AutomaticFacetFilter, AutomaticFacetFilters, BaseSearchParams, BaseSearchParamsWithoutQuery, BaseSearchResponse, BooleanString, Condition, Consequence, ConsequenceHide, ConsequenceParams, ConsequenceQuery, ConsequenceQueryObject, CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeletedAtResponse, Distinct, Edit, EditType, ErrorBase, ExactOnSingleWordQuery, Exhaustive, FacetFilters, FacetOrdering, FacetStats, Facets, HighlightResult, HighlightResultOption, IgnorePlurals, IndexSettingsAsSearchParams, MatchLevel, MatchedGeoLocation, Mode, NumericFilters, OptionalFilters, Params, Personalization, Promote, PromoteObjectID, PromoteObjectIDs, QueryType, Range, RankingInfo, ReRankingApplyFilter, Redirect, RedirectRuleIndexData, RedirectRuleIndexMetadata, RedirectURL, RemoveStopWords, RemoveWordsIfNoResults, RenderingContent, SearchPagination, SearchParams, SearchParamsObject, SearchParamsQuery, SemanticSearch, SnippetResult, SnippetResultOption, SortRemainingBy, SupportedLanguage, TagFilters, TaskStatus, TypoTolerance, TypoToleranceEnum, Value, apiClientVersion } from '@algolia/client-search';
|
|
6
6
|
import * as _algolia_client_common from '@algolia/client-common';
|
|
7
7
|
import { ClientOptions } from '@algolia/client-common';
|
|
8
8
|
import { Region as Region$1, AbtestingClient } from '@algolia/client-abtesting';
|
|
9
9
|
export * from '@algolia/client-abtesting';
|
|
10
|
-
export { Region as ABTestingRegion
|
|
10
|
+
export { Region as ABTestingRegion } from '@algolia/client-abtesting';
|
|
11
11
|
import { Region as Region$2, AnalyticsClient } from '@algolia/client-analytics';
|
|
12
12
|
export * from '@algolia/client-analytics';
|
|
13
|
-
export {
|
|
13
|
+
export { Region as AnalyticsRegion } from '@algolia/client-analytics';
|
|
14
14
|
import { Region as Region$3, PersonalizationClient } from '@algolia/client-personalization';
|
|
15
15
|
export * from '@algolia/client-personalization';
|
|
16
|
-
export { PersonalizationClient } from '@algolia/client-personalization';
|
|
17
16
|
import { RecommendClient } from '@algolia/recommend';
|
|
18
17
|
export * from '@algolia/recommend';
|
|
19
|
-
export { RecommendClient } from '@algolia/recommend';
|
|
20
18
|
|
|
21
19
|
type Region = Region$1 | Region$2;
|
|
22
20
|
|
package/dist/node.d.ts
CHANGED
|
@@ -2,21 +2,19 @@ import * as _algolia_client_search_dist_model from '@algolia/client-search/dist/
|
|
|
2
2
|
import * as _algolia_client_search from '@algolia/client-search';
|
|
3
3
|
import { GenerateSecuredApiKeyOptions, GetSecuredApiKeyRemainingValidityOptions } from '@algolia/client-search';
|
|
4
4
|
export * from '@algolia/client-search';
|
|
5
|
-
export { AdvancedSyntaxFeatures, AlternativesAsExact, Anchoring, AroundPrecision, AroundRadius, AroundRadiusAll, AutomaticFacetFilter, AutomaticFacetFilters, BaseSearchParams, BaseSearchParamsWithoutQuery, BaseSearchResponse, BooleanString, Condition, Consequence, ConsequenceHide, ConsequenceParams, ConsequenceQuery, ConsequenceQueryObject, CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeletedAtResponse, Distinct, Edit, EditType, ErrorBase, ExactOnSingleWordQuery, Exhaustive, FacetFilters, FacetOrdering, FacetStats, Facets, HighlightResult, HighlightResultOption, IgnorePlurals, IndexSettingsAsSearchParams, MatchLevel, MatchedGeoLocation, Mode, NumericFilters, OptionalFilters, Params, Personalization, Promote, PromoteObjectID, PromoteObjectIDs, QueryType, Range, RankingInfo, ReRankingApplyFilter, Redirect, RedirectRuleIndexData, RedirectRuleIndexMetadata, RedirectURL, RemoveStopWords, RemoveWordsIfNoResults, RenderingContent,
|
|
5
|
+
export { AdvancedSyntaxFeatures, AlternativesAsExact, Anchoring, AroundPrecision, AroundRadius, AroundRadiusAll, AutomaticFacetFilter, AutomaticFacetFilters, BaseSearchParams, BaseSearchParamsWithoutQuery, BaseSearchResponse, BooleanString, Condition, Consequence, ConsequenceHide, ConsequenceParams, ConsequenceQuery, ConsequenceQueryObject, CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeletedAtResponse, Distinct, Edit, EditType, ErrorBase, ExactOnSingleWordQuery, Exhaustive, FacetFilters, FacetOrdering, FacetStats, Facets, HighlightResult, HighlightResultOption, IgnorePlurals, IndexSettingsAsSearchParams, MatchLevel, MatchedGeoLocation, Mode, NumericFilters, OptionalFilters, Params, Personalization, Promote, PromoteObjectID, PromoteObjectIDs, QueryType, Range, RankingInfo, ReRankingApplyFilter, Redirect, RedirectRuleIndexData, RedirectRuleIndexMetadata, RedirectURL, RemoveStopWords, RemoveWordsIfNoResults, RenderingContent, SearchPagination, SearchParams, SearchParamsObject, SearchParamsQuery, SemanticSearch, SnippetResult, SnippetResultOption, SortRemainingBy, SupportedLanguage, TagFilters, TaskStatus, TypoTolerance, TypoToleranceEnum, Value, apiClientVersion } from '@algolia/client-search';
|
|
6
6
|
import * as _algolia_client_common from '@algolia/client-common';
|
|
7
7
|
import { ClientOptions } from '@algolia/client-common';
|
|
8
8
|
import { Region as Region$1, AbtestingClient } from '@algolia/client-abtesting';
|
|
9
9
|
export * from '@algolia/client-abtesting';
|
|
10
|
-
export { Region as ABTestingRegion
|
|
10
|
+
export { Region as ABTestingRegion } from '@algolia/client-abtesting';
|
|
11
11
|
import { Region as Region$2, AnalyticsClient } from '@algolia/client-analytics';
|
|
12
12
|
export * from '@algolia/client-analytics';
|
|
13
|
-
export {
|
|
13
|
+
export { Region as AnalyticsRegion } from '@algolia/client-analytics';
|
|
14
14
|
import { Region as Region$3, PersonalizationClient } from '@algolia/client-personalization';
|
|
15
15
|
export * from '@algolia/client-personalization';
|
|
16
|
-
export { PersonalizationClient } from '@algolia/client-personalization';
|
|
17
16
|
import { RecommendClient } from '@algolia/recommend';
|
|
18
17
|
export * from '@algolia/recommend';
|
|
19
|
-
export { RecommendClient } from '@algolia/recommend';
|
|
20
18
|
|
|
21
19
|
type Region = Region$1 | Region$2;
|
|
22
20
|
|