Skip to content

Commit 09d51ae

Browse files
shortcutsapi-clients-bot
and
api-clients-bot
authored
Generated code for commit 09259f7. (#285)
Co-authored-by: Clément Vannicatte <[email protected]> Co-authored-by: api-clients-bot <[email protected]>
1 parent 1c63fbf commit 09d51ae

File tree

27 files changed

+2064
-1465
lines changed

27 files changed

+2064
-1465
lines changed

clients/algoliasearch-client-javascript/packages/client-abtesting/builds/browser.ts

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import type {
2-
Host,
3-
Requester,
4-
} from '@experimental-api-clients-automation/client-common';
1+
import type { InitClientOptions } from '@experimental-api-clients-automation/client-common';
52
import {
63
createMemoryCache,
74
createFallbackableCache,
@@ -18,7 +15,7 @@ export function abtestingApi(
1815
appId: string,
1916
apiKey: string,
2017
region?: Region,
21-
options?: { requester?: Requester; hosts?: Host[] }
18+
options?: InitClientOptions
2219
): AbtestingApi {
2320
if (!appId) {
2421
throw new Error('`appId` is missing.');
@@ -40,14 +37,19 @@ export function abtestingApi(
4037
requester: options?.requester ?? createXhrRequester(),
4138
userAgents: [{ segment: 'Browser' }],
4239
authMode: 'WithinQueryParameters',
43-
responsesCache: createMemoryCache(),
44-
requestsCache: createMemoryCache({ serializable: false }),
45-
hostsCache: createFallbackableCache({
46-
caches: [
47-
createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }),
48-
createMemoryCache(),
49-
],
50-
}),
40+
responsesCache: options?.responsesCache ?? createMemoryCache(),
41+
requestsCache:
42+
options?.requestsCache ?? createMemoryCache({ serializable: false }),
43+
hostsCache:
44+
options?.hostsCache ??
45+
createFallbackableCache({
46+
caches: [
47+
createBrowserLocalStorageCache({
48+
key: `${apiClientVersion}-${appId}`,
49+
}),
50+
createMemoryCache(),
51+
],
52+
}),
5153
...options,
5254
});
5355
}

clients/algoliasearch-client-javascript/packages/client-abtesting/builds/node.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import type {
2-
Host,
3-
Requester,
4-
} from '@experimental-api-clients-automation/client-common';
1+
import type { InitClientOptions } from '@experimental-api-clients-automation/client-common';
52
import {
63
createMemoryCache,
74
createNullCache,
@@ -17,7 +14,7 @@ export function abtestingApi(
1714
appId: string,
1815
apiKey: string,
1916
region?: Region,
20-
options?: { requester?: Requester; hosts?: Host[] }
17+
options?: InitClientOptions
2118
): AbtestingApi {
2219
if (!appId) {
2320
throw new Error('`appId` is missing.');
@@ -38,9 +35,9 @@ export function abtestingApi(
3835
},
3936
requester: options?.requester ?? createHttpRequester(),
4037
userAgents: [{ segment: 'Node.js', version: process.versions.node }],
41-
responsesCache: createNullCache(),
42-
requestsCache: createNullCache(),
43-
hostsCache: createMemoryCache(),
38+
responsesCache: options?.responsesCache ?? createNullCache(),
39+
requestsCache: options?.requestsCache ?? createNullCache(),
40+
hostsCache: options?.hostsCache ?? createMemoryCache(),
4441
...options,
4542
});
4643
}

0 commit comments

Comments
 (0)