Skip to content

Commit c673945

Browse files
algolia-botmillotp
andcommitted
chore: generated code for commit ad27abc1. [skip ci]
algolia/api-clients-automation@ad27abc Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent be57d64 commit c673945

File tree

15 files changed

+62
-20
lines changed

15 files changed

+62
-20
lines changed

packages/client-abtesting/builds/browser.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ import {
99
} from '@experimental-api-clients-automation/client-common';
1010
import { createXhrRequester } from '@experimental-api-clients-automation/requester-browser-xhr';
1111

12+
import type { AbtestingClient, Region } from '../src/abtestingClient';
1213
import {
1314
createAbtestingClient,
1415
apiClientVersion,
16+
REGIONS,
1517
} from '../src/abtestingClient';
16-
import type { AbtestingClient, Region } from '../src/abtestingClient';
1718

1819
export { apiClientVersion, AbtestingClient } from '../src/abtestingClient';
1920
export * from '../model';
@@ -32,6 +33,12 @@ export function abtestingClient(
3233
throw new Error('`apiKey` is missing.');
3334
}
3435

36+
if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {
37+
throw new Error(
38+
`\`region\` must be one of the following: ${REGIONS.join(', ')}`
39+
);
40+
}
41+
3542
return createAbtestingClient({
3643
appId,
3744
apiKey,

packages/client-abtesting/builds/node.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
import { createHttpRequester } from '@experimental-api-clients-automation/requester-node-http';
1010

1111
import type { AbtestingClient, Region } from '../src/abtestingClient';
12-
import { createAbtestingClient } from '../src/abtestingClient';
12+
import { createAbtestingClient, REGIONS } from '../src/abtestingClient';
1313

1414
export { apiClientVersion, AbtestingClient } from '../src/abtestingClient';
1515
export * from '../model';
@@ -28,6 +28,12 @@ export function abtestingClient(
2828
throw new Error('`apiKey` is missing.');
2929
}
3030

31+
if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {
32+
throw new Error(
33+
`\`region\` must be one of the following: ${REGIONS.join(', ')}`
34+
);
35+
}
36+
3137
return createAbtestingClient({
3238
appId,
3339
apiKey,

packages/client-analytics/builds/browser.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ import {
99
} from '@experimental-api-clients-automation/client-common';
1010
import { createXhrRequester } from '@experimental-api-clients-automation/requester-browser-xhr';
1111

12+
import type { AnalyticsClient, Region } from '../src/analyticsClient';
1213
import {
1314
createAnalyticsClient,
1415
apiClientVersion,
16+
REGIONS,
1517
} from '../src/analyticsClient';
16-
import type { AnalyticsClient, Region } from '../src/analyticsClient';
1718

1819
export { apiClientVersion, AnalyticsClient } from '../src/analyticsClient';
1920
export * from '../model';
@@ -32,6 +33,12 @@ export function analyticsClient(
3233
throw new Error('`apiKey` is missing.');
3334
}
3435

36+
if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {
37+
throw new Error(
38+
`\`region\` must be one of the following: ${REGIONS.join(', ')}`
39+
);
40+
}
41+
3542
return createAnalyticsClient({
3643
appId,
3744
apiKey,

packages/client-analytics/builds/node.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
import { createHttpRequester } from '@experimental-api-clients-automation/requester-node-http';
1010

1111
import type { AnalyticsClient, Region } from '../src/analyticsClient';
12-
import { createAnalyticsClient } from '../src/analyticsClient';
12+
import { createAnalyticsClient, REGIONS } from '../src/analyticsClient';
1313

1414
export { apiClientVersion, AnalyticsClient } from '../src/analyticsClient';
1515
export * from '../model';
@@ -28,6 +28,12 @@ export function analyticsClient(
2828
throw new Error('`apiKey` is missing.');
2929
}
3030

31+
if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {
32+
throw new Error(
33+
`\`region\` must be one of the following: ${REGIONS.join(', ')}`
34+
);
35+
}
36+
3137
return createAnalyticsClient({
3238
appId,
3339
apiKey,

packages/client-insights/builds/browser.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ import {
1010
import { createXhrRequester } from '@experimental-api-clients-automation/requester-browser-xhr';
1111

1212
import type { InsightsClient, Region } from '../src/insightsClient';
13-
import { createInsightsClient, apiClientVersion } from '../src/insightsClient';
13+
import {
14+
createInsightsClient,
15+
apiClientVersion,
16+
REGIONS,
17+
} from '../src/insightsClient';
1418

1519
export { apiClientVersion, InsightsClient } from '../src/insightsClient';
1620
export * from '../model';
@@ -29,6 +33,12 @@ export function insightsClient(
2933
throw new Error('`apiKey` is missing.');
3034
}
3135

36+
if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {
37+
throw new Error(
38+
`\`region\` must be one of the following: ${REGIONS.join(', ')}`
39+
);
40+
}
41+
3242
return createInsightsClient({
3343
appId,
3444
apiKey,

packages/client-insights/builds/node.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
import { createHttpRequester } from '@experimental-api-clients-automation/requester-node-http';
1010

1111
import type { InsightsClient, Region } from '../src/insightsClient';
12-
import { createInsightsClient } from '../src/insightsClient';
12+
import { createInsightsClient, REGIONS } from '../src/insightsClient';
1313

1414
export { apiClientVersion, InsightsClient } from '../src/insightsClient';
1515
export * from '../model';
@@ -28,6 +28,12 @@ export function insightsClient(
2828
throw new Error('`apiKey` is missing.');
2929
}
3030

31+
if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {
32+
throw new Error(
33+
`\`region\` must be one of the following: ${REGIONS.join(', ')}`
34+
);
35+
}
36+
3137
return createInsightsClient({
3238
appId,
3339
apiKey,

packages/client-personalization/builds/browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function personalizationClient(
4343
throw new Error('`region` is missing.');
4444
}
4545

46-
if (typeof region !== 'string' || !REGIONS.includes(region)) {
46+
if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {
4747
throw new Error(
4848
`\`region\` must be one of the following: ${REGIONS.join(', ')}`
4949
);

packages/client-personalization/builds/node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function personalizationClient(
4141
throw new Error('`region` is missing.');
4242
}
4343

44-
if (typeof region !== 'string' || !REGIONS.includes(region)) {
44+
if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {
4545
throw new Error(
4646
`\`region\` must be one of the following: ${REGIONS.join(', ')}`
4747
);

packages/client-predict/builds/browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function predictClient(
3737
throw new Error('`region` is missing.');
3838
}
3939

40-
if (typeof region !== 'string' || !REGIONS.includes(region)) {
40+
if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {
4141
throw new Error(
4242
`\`region\` must be one of the following: ${REGIONS.join(', ')}`
4343
);

packages/client-predict/builds/node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function predictClient(
3232
throw new Error('`region` is missing.');
3333
}
3434

35-
if (typeof region !== 'string' || !REGIONS.includes(region)) {
35+
if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {
3636
throw new Error(
3737
`\`region\` must be one of the following: ${REGIONS.join(', ')}`
3838
);

packages/client-query-suggestions/builds/browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function querySuggestionsClient(
4343
throw new Error('`region` is missing.');
4444
}
4545

46-
if (typeof region !== 'string' || !REGIONS.includes(region)) {
46+
if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {
4747
throw new Error(
4848
`\`region\` must be one of the following: ${REGIONS.join(', ')}`
4949
);

packages/client-query-suggestions/builds/node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export function querySuggestionsClient(
4141
throw new Error('`region` is missing.');
4242
}
4343

44-
if (typeof region !== 'string' || !REGIONS.includes(region)) {
44+
if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {
4545
throw new Error(
4646
`\`region\` must be one of the following: ${REGIONS.join(', ')}`
4747
);

packages/client-sources/builds/browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function sourcesClient(
3737
throw new Error('`region` is missing.');
3838
}
3939

40-
if (typeof region !== 'string' || !REGIONS.includes(region)) {
40+
if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {
4141
throw new Error(
4242
`\`region\` must be one of the following: ${REGIONS.join(', ')}`
4343
);

packages/client-sources/builds/node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function sourcesClient(
3232
throw new Error('`region` is missing.');
3333
}
3434

35-
if (typeof region !== 'string' || !REGIONS.includes(region)) {
35+
if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {
3636
throw new Error(
3737
`\`region\` must be one of the following: ${REGIONS.join(', ')}`
3838
);

yarn.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4950,9 +4950,9 @@ __metadata:
49504950
linkType: hard
49514951

49524952
"electron-to-chromium@npm:^1.4.147":
4953-
version: 1.4.150
4954-
resolution: "electron-to-chromium@npm:1.4.150"
4955-
checksum: d89c4db96c7d8d23c619772b787b7c036ccf48289c36c9e0d0938c137b7d3934234825161e9cc9e918ad83b9a23145e605181544a80034df4d2c0fc880881304
4953+
version: 1.4.151
4954+
resolution: "electron-to-chromium@npm:1.4.151"
4955+
checksum: 03be4f1f1f08da6962a2983ae7a092a61edc736010ed10e42c612ce3fa13d47e360313230ddc101bec71f5da5689546d7eee541ea5e1fe4082b09355b30311ec
49564956
languageName: node
49574957
linkType: hard
49584958

@@ -10429,8 +10429,8 @@ __metadata:
1042910429
linkType: hard
1043010430

1043110431
"ws@npm:^8.2.3":
10432-
version: 8.7.0
10433-
resolution: "ws@npm:8.7.0"
10432+
version: 8.8.0
10433+
resolution: "ws@npm:8.8.0"
1043410434
peerDependencies:
1043510435
bufferutil: ^4.0.1
1043610436
utf-8-validate: ^5.0.2
@@ -10439,7 +10439,7 @@ __metadata:
1043910439
optional: true
1044010440
utf-8-validate:
1044110441
optional: true
10442-
checksum: 078fa2dbc06b31a45e0057b19e2930d26c222622e355955afe019c9b9b25f62eb2a8eff7cceabdad04910ecd2bd6ef4fa48e6f3673f2fdddff02a6e4c2459584
10442+
checksum: 6ceed1ca1cb800ef60c7fc8346c7d5d73d73be754228eb958765abf5d714519338efa20ffe674167039486eb3a813aae5a497f8d319e16b4d96216a31df5bd95
1044310443
languageName: node
1044410444
linkType: hard
1044510445

0 commit comments

Comments
 (0)