@algolia/composition 0.0.1-beta.2
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/LICENSE +21 -0
- package/README.md +77 -0
- package/dist/browser.d.ts +825 -0
- package/dist/builds/browser.js +216 -0
- package/dist/builds/browser.js.map +1 -0
- package/dist/builds/browser.min.js +2 -0
- package/dist/builds/browser.min.js.map +1 -0
- package/dist/builds/browser.umd.js +12 -0
- package/dist/builds/fetch.js +210 -0
- package/dist/builds/fetch.js.map +1 -0
- package/dist/builds/node.cjs +236 -0
- package/dist/builds/node.cjs.map +1 -0
- package/dist/builds/node.js +210 -0
- package/dist/builds/node.js.map +1 -0
- package/dist/builds/worker.js +210 -0
- package/dist/builds/worker.js.map +1 -0
- package/dist/fetch.d.ts +826 -0
- package/dist/node.d.cts +826 -0
- package/dist/node.d.ts +826 -0
- package/dist/src/compositionClient.cjs +204 -0
- package/dist/src/compositionClient.cjs.map +1 -0
- package/dist/src/compositionClient.js +178 -0
- package/dist/src/compositionClient.js.map +1 -0
- package/dist/worker.d.ts +826 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
// builds/fetch.ts
|
|
2
|
+
import { createMemoryCache, createNullCache, createNullLogger } from "@algolia/client-common";
|
|
3
|
+
import { createFetchRequester } from "@algolia/requester-fetch";
|
|
4
|
+
|
|
5
|
+
// src/compositionClient.ts
|
|
6
|
+
import { createAuth, createTransporter, getAlgoliaAgent, shuffle } from "@algolia/client-common";
|
|
7
|
+
var apiClientVersion = "0.0.1-beta.2";
|
|
8
|
+
function getDefaultHosts(appId) {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
url: `${appId}-dsn.algolia.net`,
|
|
12
|
+
accept: "read",
|
|
13
|
+
protocol: "https"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
url: `${appId}.algolia.net`,
|
|
17
|
+
accept: "write",
|
|
18
|
+
protocol: "https"
|
|
19
|
+
}
|
|
20
|
+
].concat(
|
|
21
|
+
shuffle([
|
|
22
|
+
{
|
|
23
|
+
url: `${appId}-1.algolianet.com`,
|
|
24
|
+
accept: "readWrite",
|
|
25
|
+
protocol: "https"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
url: `${appId}-2.algolianet.com`,
|
|
29
|
+
accept: "readWrite",
|
|
30
|
+
protocol: "https"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
url: `${appId}-3.algolianet.com`,
|
|
34
|
+
accept: "readWrite",
|
|
35
|
+
protocol: "https"
|
|
36
|
+
}
|
|
37
|
+
])
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
function createCompositionClient({
|
|
41
|
+
appId: appIdOption,
|
|
42
|
+
apiKey: apiKeyOption,
|
|
43
|
+
authMode,
|
|
44
|
+
algoliaAgents,
|
|
45
|
+
...options
|
|
46
|
+
}) {
|
|
47
|
+
const auth = createAuth(appIdOption, apiKeyOption, authMode);
|
|
48
|
+
const transporter = createTransporter({
|
|
49
|
+
hosts: getDefaultHosts(appIdOption),
|
|
50
|
+
...options,
|
|
51
|
+
algoliaAgent: getAlgoliaAgent({
|
|
52
|
+
algoliaAgents,
|
|
53
|
+
client: "Composition",
|
|
54
|
+
version: apiClientVersion
|
|
55
|
+
}),
|
|
56
|
+
baseHeaders: {
|
|
57
|
+
"content-type": "text/plain",
|
|
58
|
+
...auth.headers(),
|
|
59
|
+
...options.baseHeaders
|
|
60
|
+
},
|
|
61
|
+
baseQueryParameters: {
|
|
62
|
+
...auth.queryParameters(),
|
|
63
|
+
...options.baseQueryParameters
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
return {
|
|
67
|
+
transporter,
|
|
68
|
+
/**
|
|
69
|
+
* The `appId` currently in use.
|
|
70
|
+
*/
|
|
71
|
+
appId: appIdOption,
|
|
72
|
+
/**
|
|
73
|
+
* The `apiKey` currently in use.
|
|
74
|
+
*/
|
|
75
|
+
apiKey: apiKeyOption,
|
|
76
|
+
/**
|
|
77
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
78
|
+
*/
|
|
79
|
+
clearCache() {
|
|
80
|
+
return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);
|
|
81
|
+
},
|
|
82
|
+
/**
|
|
83
|
+
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
84
|
+
*/
|
|
85
|
+
get _ua() {
|
|
86
|
+
return transporter.algoliaAgent.value;
|
|
87
|
+
},
|
|
88
|
+
/**
|
|
89
|
+
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
|
|
90
|
+
*
|
|
91
|
+
* @param segment - The algolia agent (user-agent) segment to add.
|
|
92
|
+
* @param version - The version of the agent.
|
|
93
|
+
*/
|
|
94
|
+
addAlgoliaAgent(segment, version) {
|
|
95
|
+
transporter.algoliaAgent.add({ segment, version });
|
|
96
|
+
},
|
|
97
|
+
/**
|
|
98
|
+
* Helper method to switch the API key used to authenticate the requests.
|
|
99
|
+
*
|
|
100
|
+
* @param params - Method params.
|
|
101
|
+
* @param params.apiKey - The new API Key to use.
|
|
102
|
+
*/
|
|
103
|
+
setClientApiKey({ apiKey }) {
|
|
104
|
+
if (!authMode || authMode === "WithinHeaders") {
|
|
105
|
+
transporter.baseHeaders["x-algolia-api-key"] = apiKey;
|
|
106
|
+
} else {
|
|
107
|
+
transporter.baseQueryParameters["x-algolia-api-key"] = apiKey;
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
/**
|
|
111
|
+
* Runs a query on a single composition and returns matching results.
|
|
112
|
+
*
|
|
113
|
+
* Required API Key ACLs:
|
|
114
|
+
* - search
|
|
115
|
+
* @param search - The search object.
|
|
116
|
+
* @param search.compositionID - Unique Composition ObjectID.
|
|
117
|
+
* @param search.requestBody - The requestBody object.
|
|
118
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
119
|
+
*/
|
|
120
|
+
search({ compositionID, requestBody }, requestOptions) {
|
|
121
|
+
if (!compositionID) {
|
|
122
|
+
throw new Error("Parameter `compositionID` is required when calling `search`.");
|
|
123
|
+
}
|
|
124
|
+
if (!requestBody) {
|
|
125
|
+
throw new Error("Parameter `requestBody` is required when calling `search`.");
|
|
126
|
+
}
|
|
127
|
+
const requestPath = "/1/compositions/{compositionID}/run".replace(
|
|
128
|
+
"{compositionID}",
|
|
129
|
+
encodeURIComponent(compositionID)
|
|
130
|
+
);
|
|
131
|
+
const headers = {};
|
|
132
|
+
const queryParameters = {};
|
|
133
|
+
const request = {
|
|
134
|
+
method: "POST",
|
|
135
|
+
path: requestPath,
|
|
136
|
+
queryParameters,
|
|
137
|
+
headers,
|
|
138
|
+
data: requestBody,
|
|
139
|
+
useReadTransporter: true,
|
|
140
|
+
cacheable: true
|
|
141
|
+
};
|
|
142
|
+
return transporter.request(request, requestOptions);
|
|
143
|
+
},
|
|
144
|
+
/**
|
|
145
|
+
* Searches for values of a specified facet attribute on the composition\'s main source\'s index. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\'t work if you have **more than 65 searchable facets and searchable attributes combined**.
|
|
146
|
+
*
|
|
147
|
+
* Required API Key ACLs:
|
|
148
|
+
* - search
|
|
149
|
+
* @param searchForFacetValues - The searchForFacetValues object.
|
|
150
|
+
* @param searchForFacetValues.compositionID - Unique Composition ObjectID.
|
|
151
|
+
* @param searchForFacetValues.facetName - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.
|
|
152
|
+
* @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
|
|
153
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
154
|
+
*/
|
|
155
|
+
searchForFacetValues({ compositionID, facetName, searchForFacetValuesRequest }, requestOptions) {
|
|
156
|
+
if (!compositionID) {
|
|
157
|
+
throw new Error("Parameter `compositionID` is required when calling `searchForFacetValues`.");
|
|
158
|
+
}
|
|
159
|
+
if (!facetName) {
|
|
160
|
+
throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");
|
|
161
|
+
}
|
|
162
|
+
const requestPath = "/1/compositions/{compositionID}/facets/{facetName}/query".replace("{compositionID}", encodeURIComponent(compositionID)).replace("{facetName}", encodeURIComponent(facetName));
|
|
163
|
+
const headers = {};
|
|
164
|
+
const queryParameters = {};
|
|
165
|
+
const request = {
|
|
166
|
+
method: "POST",
|
|
167
|
+
path: requestPath,
|
|
168
|
+
queryParameters,
|
|
169
|
+
headers,
|
|
170
|
+
data: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},
|
|
171
|
+
useReadTransporter: true,
|
|
172
|
+
cacheable: true
|
|
173
|
+
};
|
|
174
|
+
return transporter.request(request, requestOptions);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// builds/fetch.ts
|
|
180
|
+
function compositionClient(appId, apiKey, options) {
|
|
181
|
+
if (!appId || typeof appId !== "string") {
|
|
182
|
+
throw new Error("`appId` is missing.");
|
|
183
|
+
}
|
|
184
|
+
if (!apiKey || typeof apiKey !== "string") {
|
|
185
|
+
throw new Error("`apiKey` is missing.");
|
|
186
|
+
}
|
|
187
|
+
return {
|
|
188
|
+
...createCompositionClient({
|
|
189
|
+
appId,
|
|
190
|
+
apiKey,
|
|
191
|
+
timeouts: {
|
|
192
|
+
connect: 2e3,
|
|
193
|
+
read: 5e3,
|
|
194
|
+
write: 3e4
|
|
195
|
+
},
|
|
196
|
+
logger: createNullLogger(),
|
|
197
|
+
requester: createFetchRequester(),
|
|
198
|
+
algoliaAgents: [{ segment: "Fetch" }],
|
|
199
|
+
responsesCache: createNullCache(),
|
|
200
|
+
requestsCache: createNullCache(),
|
|
201
|
+
hostsCache: createMemoryCache(),
|
|
202
|
+
...options
|
|
203
|
+
})
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
export {
|
|
207
|
+
apiClientVersion,
|
|
208
|
+
compositionClient
|
|
209
|
+
};
|
|
210
|
+
//# sourceMappingURL=fetch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../builds/fetch.ts","../../src/compositionClient.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\nexport type CompositionClient = ReturnType<typeof createCompositionClient>;\n\nimport { createMemoryCache, createNullCache, createNullLogger } from '@algolia/client-common';\nimport { createFetchRequester } from '@algolia/requester-fetch';\n\nimport type { ClientOptions } from '@algolia/client-common';\n\nimport { createCompositionClient } from '../src/compositionClient';\n\nexport { apiClientVersion } from '../src/compositionClient';\n\nexport * from '../model';\n\nexport function compositionClient(appId: string, apiKey: string, options?: ClientOptions): CompositionClient {\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\n return {\n ...createCompositionClient({\n appId,\n apiKey,\n timeouts: {\n connect: 2000,\n read: 5000,\n write: 30000,\n },\n logger: createNullLogger(),\n requester: createFetchRequester(),\n algoliaAgents: [{ segment: 'Fetch' }],\n responsesCache: createNullCache(),\n requestsCache: createNullCache(),\n hostsCache: createMemoryCache(),\n ...options,\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 {\n CreateClientOptions,\n Headers,\n Host,\n QueryParameters,\n Request,\n RequestOptions,\n} from '@algolia/client-common';\nimport { createAuth, createTransporter, getAlgoliaAgent, shuffle } from '@algolia/client-common';\n\nimport type { SearchForFacetValuesResponse } from '../model/searchForFacetValuesResponse';\nimport type { SearchResponse } from '../model/searchResponse';\n\nimport type { SearchForFacetValuesProps, SearchProps } from '../model/clientMethodProps';\n\nexport const apiClientVersion = '0.0.1-beta.2';\n\nfunction getDefaultHosts(appId: string): Host[] {\n return (\n [\n {\n url: `${appId}-dsn.algolia.net`,\n accept: 'read',\n protocol: 'https',\n },\n {\n url: `${appId}.algolia.net`,\n accept: 'write',\n protocol: 'https',\n },\n ] as Host[]\n ).concat(\n shuffle([\n {\n url: `${appId}-1.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n {\n url: `${appId}-2.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n {\n url: `${appId}-3.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n ]),\n );\n}\n\nexport function createCompositionClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}: CreateClientOptions) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(appIdOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: 'Composition',\n version: apiClientVersion,\n }),\n baseHeaders: {\n 'content-type': 'text/plain',\n ...auth.headers(),\n ...options.baseHeaders,\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters,\n },\n });\n\n return {\n transporter,\n\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache(): Promise<void> {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);\n },\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return transporter.algoliaAgent.value;\n },\n\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment: string, version?: string): void {\n transporter.algoliaAgent.add({ segment, version });\n },\n\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }: { apiKey: string }): void {\n if (!authMode || authMode === 'WithinHeaders') {\n transporter.baseHeaders['x-algolia-api-key'] = apiKey;\n } else {\n transporter.baseQueryParameters['x-algolia-api-key'] = apiKey;\n }\n },\n\n /**\n * Runs a query on a single composition and returns matching results.\n *\n * Required API Key ACLs:\n * - search\n * @param search - The search object.\n * @param search.compositionID - Unique Composition ObjectID.\n * @param search.requestBody - The requestBody object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n search<T>(\n { compositionID, requestBody }: SearchProps,\n requestOptions?: RequestOptions,\n ): Promise<SearchResponse<T>> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `search`.');\n }\n\n if (!requestBody) {\n throw new Error('Parameter `requestBody` is required when calling `search`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/run'.replace(\n '{compositionID}',\n encodeURIComponent(compositionID),\n );\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: requestBody,\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Searches for values of a specified facet attribute on the composition\\'s main source\\'s index. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\\'t work if you have **more than 65 searchable facets and searchable attributes combined**.\n *\n * Required API Key ACLs:\n * - search\n * @param searchForFacetValues - The searchForFacetValues object.\n * @param searchForFacetValues.compositionID - Unique Composition ObjectID.\n * @param searchForFacetValues.facetName - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.\n * @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchForFacetValues(\n { compositionID, facetName, searchForFacetValuesRequest }: SearchForFacetValuesProps,\n requestOptions?: RequestOptions,\n ): Promise<SearchForFacetValuesResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `searchForFacetValues`.');\n }\n\n if (!facetName) {\n throw new Error('Parameter `facetName` is required when calling `searchForFacetValues`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/facets/{facetName}/query'\n .replace('{compositionID}', encodeURIComponent(compositionID))\n .replace('{facetName}', encodeURIComponent(facetName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.request(request, requestOptions);\n },\n };\n}\n"],"mappings":";AAIA,SAAS,mBAAmB,iBAAiB,wBAAwB;AACrE,SAAS,4BAA4B;;;ACKrC,SAAS,YAAY,mBAAmB,iBAAiB,eAAe;AAOjE,IAAM,mBAAmB;AAEhC,SAAS,gBAAgB,OAAuB;AAC9C,SACE;AAAA,IACE;AAAA,MACE,KAAK,GAAG,KAAK;AAAA,MACb,QAAQ;AAAA,MACR,UAAU;AAAA,IACZ;AAAA,IACA;AAAA,MACE,KAAK,GAAG,KAAK;AAAA,MACb,QAAQ;AAAA,MACR,UAAU;AAAA,IACZ;AAAA,EACF,EACA;AAAA,IACA,QAAQ;AAAA,MACN;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAEO,SAAS,wBAAwB;AAAA,EACtC,OAAO;AAAA,EACP,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,UAAU,UAAU;AACvC,UAAM,IAAI,MAAM,qBAAqB;AAAA,EACvC;AAEA,MAAI,CAAC,UAAU,OAAO,WAAW,UAAU;AACzC,UAAM,IAAI,MAAM,sBAAsB;AAAA,EACxC;AAEA,SAAO;AAAA,IACL,GAAG,wBAAwB;AAAA,MACzB;AAAA,MACA;AAAA,MACA,UAAU;AAAA,QACR,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,MACA,QAAQ,iBAAiB;AAAA,MACzB,WAAW,qBAAqB;AAAA,MAChC,eAAe,CAAC,EAAE,SAAS,QAAQ,CAAC;AAAA,MACpC,gBAAgB,gBAAgB;AAAA,MAChC,eAAe,gBAAgB;AAAA,MAC/B,YAAY,kBAAkB;AAAA,MAC9B,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// builds/node.ts
|
|
21
|
+
var node_exports = {};
|
|
22
|
+
__export(node_exports, {
|
|
23
|
+
apiClientVersion: () => apiClientVersion,
|
|
24
|
+
compositionClient: () => compositionClient
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(node_exports);
|
|
27
|
+
var import_requester_node_http = require("@algolia/requester-node-http");
|
|
28
|
+
var import_client_common2 = require("@algolia/client-common");
|
|
29
|
+
|
|
30
|
+
// src/compositionClient.ts
|
|
31
|
+
var import_client_common = require("@algolia/client-common");
|
|
32
|
+
var apiClientVersion = "0.0.1-beta.2";
|
|
33
|
+
function getDefaultHosts(appId) {
|
|
34
|
+
return [
|
|
35
|
+
{
|
|
36
|
+
url: `${appId}-dsn.algolia.net`,
|
|
37
|
+
accept: "read",
|
|
38
|
+
protocol: "https"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
url: `${appId}.algolia.net`,
|
|
42
|
+
accept: "write",
|
|
43
|
+
protocol: "https"
|
|
44
|
+
}
|
|
45
|
+
].concat(
|
|
46
|
+
(0, import_client_common.shuffle)([
|
|
47
|
+
{
|
|
48
|
+
url: `${appId}-1.algolianet.com`,
|
|
49
|
+
accept: "readWrite",
|
|
50
|
+
protocol: "https"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
url: `${appId}-2.algolianet.com`,
|
|
54
|
+
accept: "readWrite",
|
|
55
|
+
protocol: "https"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
url: `${appId}-3.algolianet.com`,
|
|
59
|
+
accept: "readWrite",
|
|
60
|
+
protocol: "https"
|
|
61
|
+
}
|
|
62
|
+
])
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
function createCompositionClient({
|
|
66
|
+
appId: appIdOption,
|
|
67
|
+
apiKey: apiKeyOption,
|
|
68
|
+
authMode,
|
|
69
|
+
algoliaAgents,
|
|
70
|
+
...options
|
|
71
|
+
}) {
|
|
72
|
+
const auth = (0, import_client_common.createAuth)(appIdOption, apiKeyOption, authMode);
|
|
73
|
+
const transporter = (0, import_client_common.createTransporter)({
|
|
74
|
+
hosts: getDefaultHosts(appIdOption),
|
|
75
|
+
...options,
|
|
76
|
+
algoliaAgent: (0, import_client_common.getAlgoliaAgent)({
|
|
77
|
+
algoliaAgents,
|
|
78
|
+
client: "Composition",
|
|
79
|
+
version: apiClientVersion
|
|
80
|
+
}),
|
|
81
|
+
baseHeaders: {
|
|
82
|
+
"content-type": "text/plain",
|
|
83
|
+
...auth.headers(),
|
|
84
|
+
...options.baseHeaders
|
|
85
|
+
},
|
|
86
|
+
baseQueryParameters: {
|
|
87
|
+
...auth.queryParameters(),
|
|
88
|
+
...options.baseQueryParameters
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
return {
|
|
92
|
+
transporter,
|
|
93
|
+
/**
|
|
94
|
+
* The `appId` currently in use.
|
|
95
|
+
*/
|
|
96
|
+
appId: appIdOption,
|
|
97
|
+
/**
|
|
98
|
+
* The `apiKey` currently in use.
|
|
99
|
+
*/
|
|
100
|
+
apiKey: apiKeyOption,
|
|
101
|
+
/**
|
|
102
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
103
|
+
*/
|
|
104
|
+
clearCache() {
|
|
105
|
+
return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);
|
|
106
|
+
},
|
|
107
|
+
/**
|
|
108
|
+
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
109
|
+
*/
|
|
110
|
+
get _ua() {
|
|
111
|
+
return transporter.algoliaAgent.value;
|
|
112
|
+
},
|
|
113
|
+
/**
|
|
114
|
+
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
|
|
115
|
+
*
|
|
116
|
+
* @param segment - The algolia agent (user-agent) segment to add.
|
|
117
|
+
* @param version - The version of the agent.
|
|
118
|
+
*/
|
|
119
|
+
addAlgoliaAgent(segment, version) {
|
|
120
|
+
transporter.algoliaAgent.add({ segment, version });
|
|
121
|
+
},
|
|
122
|
+
/**
|
|
123
|
+
* Helper method to switch the API key used to authenticate the requests.
|
|
124
|
+
*
|
|
125
|
+
* @param params - Method params.
|
|
126
|
+
* @param params.apiKey - The new API Key to use.
|
|
127
|
+
*/
|
|
128
|
+
setClientApiKey({ apiKey }) {
|
|
129
|
+
if (!authMode || authMode === "WithinHeaders") {
|
|
130
|
+
transporter.baseHeaders["x-algolia-api-key"] = apiKey;
|
|
131
|
+
} else {
|
|
132
|
+
transporter.baseQueryParameters["x-algolia-api-key"] = apiKey;
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
/**
|
|
136
|
+
* Runs a query on a single composition and returns matching results.
|
|
137
|
+
*
|
|
138
|
+
* Required API Key ACLs:
|
|
139
|
+
* - search
|
|
140
|
+
* @param search - The search object.
|
|
141
|
+
* @param search.compositionID - Unique Composition ObjectID.
|
|
142
|
+
* @param search.requestBody - The requestBody object.
|
|
143
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
144
|
+
*/
|
|
145
|
+
search({ compositionID, requestBody }, requestOptions) {
|
|
146
|
+
if (!compositionID) {
|
|
147
|
+
throw new Error("Parameter `compositionID` is required when calling `search`.");
|
|
148
|
+
}
|
|
149
|
+
if (!requestBody) {
|
|
150
|
+
throw new Error("Parameter `requestBody` is required when calling `search`.");
|
|
151
|
+
}
|
|
152
|
+
const requestPath = "/1/compositions/{compositionID}/run".replace(
|
|
153
|
+
"{compositionID}",
|
|
154
|
+
encodeURIComponent(compositionID)
|
|
155
|
+
);
|
|
156
|
+
const headers = {};
|
|
157
|
+
const queryParameters = {};
|
|
158
|
+
const request = {
|
|
159
|
+
method: "POST",
|
|
160
|
+
path: requestPath,
|
|
161
|
+
queryParameters,
|
|
162
|
+
headers,
|
|
163
|
+
data: requestBody,
|
|
164
|
+
useReadTransporter: true,
|
|
165
|
+
cacheable: true
|
|
166
|
+
};
|
|
167
|
+
return transporter.request(request, requestOptions);
|
|
168
|
+
},
|
|
169
|
+
/**
|
|
170
|
+
* Searches for values of a specified facet attribute on the composition\'s main source\'s index. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\'t work if you have **more than 65 searchable facets and searchable attributes combined**.
|
|
171
|
+
*
|
|
172
|
+
* Required API Key ACLs:
|
|
173
|
+
* - search
|
|
174
|
+
* @param searchForFacetValues - The searchForFacetValues object.
|
|
175
|
+
* @param searchForFacetValues.compositionID - Unique Composition ObjectID.
|
|
176
|
+
* @param searchForFacetValues.facetName - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.
|
|
177
|
+
* @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
|
|
178
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
179
|
+
*/
|
|
180
|
+
searchForFacetValues({ compositionID, facetName, searchForFacetValuesRequest }, requestOptions) {
|
|
181
|
+
if (!compositionID) {
|
|
182
|
+
throw new Error("Parameter `compositionID` is required when calling `searchForFacetValues`.");
|
|
183
|
+
}
|
|
184
|
+
if (!facetName) {
|
|
185
|
+
throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");
|
|
186
|
+
}
|
|
187
|
+
const requestPath = "/1/compositions/{compositionID}/facets/{facetName}/query".replace("{compositionID}", encodeURIComponent(compositionID)).replace("{facetName}", encodeURIComponent(facetName));
|
|
188
|
+
const headers = {};
|
|
189
|
+
const queryParameters = {};
|
|
190
|
+
const request = {
|
|
191
|
+
method: "POST",
|
|
192
|
+
path: requestPath,
|
|
193
|
+
queryParameters,
|
|
194
|
+
headers,
|
|
195
|
+
data: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},
|
|
196
|
+
useReadTransporter: true,
|
|
197
|
+
cacheable: true
|
|
198
|
+
};
|
|
199
|
+
return transporter.request(request, requestOptions);
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// builds/node.ts
|
|
205
|
+
function compositionClient(appId, apiKey, options) {
|
|
206
|
+
if (!appId || typeof appId !== "string") {
|
|
207
|
+
throw new Error("`appId` is missing.");
|
|
208
|
+
}
|
|
209
|
+
if (!apiKey || typeof apiKey !== "string") {
|
|
210
|
+
throw new Error("`apiKey` is missing.");
|
|
211
|
+
}
|
|
212
|
+
return {
|
|
213
|
+
...createCompositionClient({
|
|
214
|
+
appId,
|
|
215
|
+
apiKey,
|
|
216
|
+
timeouts: {
|
|
217
|
+
connect: 2e3,
|
|
218
|
+
read: 5e3,
|
|
219
|
+
write: 3e4
|
|
220
|
+
},
|
|
221
|
+
logger: (0, import_client_common2.createNullLogger)(),
|
|
222
|
+
requester: (0, import_requester_node_http.createHttpRequester)(),
|
|
223
|
+
algoliaAgents: [{ segment: "Node.js", version: process.versions.node }],
|
|
224
|
+
responsesCache: (0, import_client_common2.createNullCache)(),
|
|
225
|
+
requestsCache: (0, import_client_common2.createNullCache)(),
|
|
226
|
+
hostsCache: (0, import_client_common2.createMemoryCache)(),
|
|
227
|
+
...options
|
|
228
|
+
})
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
232
|
+
0 && (module.exports = {
|
|
233
|
+
apiClientVersion,
|
|
234
|
+
compositionClient
|
|
235
|
+
});
|
|
236
|
+
//# sourceMappingURL=node.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../builds/node.ts","../../src/compositionClient.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\nexport type CompositionClient = ReturnType<typeof createCompositionClient>;\n\nimport { createHttpRequester } from '@algolia/requester-node-http';\n\nimport { createMemoryCache, createNullCache, createNullLogger } from '@algolia/client-common';\n\nimport type { ClientOptions } from '@algolia/client-common';\n\nimport { createCompositionClient } from '../src/compositionClient';\n\nexport { apiClientVersion } from '../src/compositionClient';\n\nexport * from '../model';\n\nexport function compositionClient(appId: string, apiKey: string, options?: ClientOptions): CompositionClient {\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\n return {\n ...createCompositionClient({\n appId,\n apiKey,\n timeouts: {\n connect: 2000,\n read: 5000,\n write: 30000,\n },\n logger: createNullLogger(),\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}\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 {\n CreateClientOptions,\n Headers,\n Host,\n QueryParameters,\n Request,\n RequestOptions,\n} from '@algolia/client-common';\nimport { createAuth, createTransporter, getAlgoliaAgent, shuffle } from '@algolia/client-common';\n\nimport type { SearchForFacetValuesResponse } from '../model/searchForFacetValuesResponse';\nimport type { SearchResponse } from '../model/searchResponse';\n\nimport type { SearchForFacetValuesProps, SearchProps } from '../model/clientMethodProps';\n\nexport const apiClientVersion = '0.0.1-beta.2';\n\nfunction getDefaultHosts(appId: string): Host[] {\n return (\n [\n {\n url: `${appId}-dsn.algolia.net`,\n accept: 'read',\n protocol: 'https',\n },\n {\n url: `${appId}.algolia.net`,\n accept: 'write',\n protocol: 'https',\n },\n ] as Host[]\n ).concat(\n shuffle([\n {\n url: `${appId}-1.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n {\n url: `${appId}-2.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n {\n url: `${appId}-3.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n ]),\n );\n}\n\nexport function createCompositionClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}: CreateClientOptions) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(appIdOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: 'Composition',\n version: apiClientVersion,\n }),\n baseHeaders: {\n 'content-type': 'text/plain',\n ...auth.headers(),\n ...options.baseHeaders,\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters,\n },\n });\n\n return {\n transporter,\n\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n\n /**\n * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\n\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache(): Promise<void> {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);\n },\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return transporter.algoliaAgent.value;\n },\n\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment: string, version?: string): void {\n transporter.algoliaAgent.add({ segment, version });\n },\n\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }: { apiKey: string }): void {\n if (!authMode || authMode === 'WithinHeaders') {\n transporter.baseHeaders['x-algolia-api-key'] = apiKey;\n } else {\n transporter.baseQueryParameters['x-algolia-api-key'] = apiKey;\n }\n },\n\n /**\n * Runs a query on a single composition and returns matching results.\n *\n * Required API Key ACLs:\n * - search\n * @param search - The search object.\n * @param search.compositionID - Unique Composition ObjectID.\n * @param search.requestBody - The requestBody object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n search<T>(\n { compositionID, requestBody }: SearchProps,\n requestOptions?: RequestOptions,\n ): Promise<SearchResponse<T>> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `search`.');\n }\n\n if (!requestBody) {\n throw new Error('Parameter `requestBody` is required when calling `search`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/run'.replace(\n '{compositionID}',\n encodeURIComponent(compositionID),\n );\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: requestBody,\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Searches for values of a specified facet attribute on the composition\\'s main source\\'s index. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\\'t work if you have **more than 65 searchable facets and searchable attributes combined**.\n *\n * Required API Key ACLs:\n * - search\n * @param searchForFacetValues - The searchForFacetValues object.\n * @param searchForFacetValues.compositionID - Unique Composition ObjectID.\n * @param searchForFacetValues.facetName - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.\n * @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchForFacetValues(\n { compositionID, facetName, searchForFacetValuesRequest }: SearchForFacetValuesProps,\n requestOptions?: RequestOptions,\n ): Promise<SearchForFacetValuesResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `searchForFacetValues`.');\n }\n\n if (!facetName) {\n throw new Error('Parameter `facetName` is required when calling `searchForFacetValues`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/facets/{facetName}/query'\n .replace('{compositionID}', encodeURIComponent(compositionID))\n .replace('{facetName}', encodeURIComponent(facetName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.request(request, requestOptions);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