File tree Expand file tree Collapse file tree 15 files changed +62
-20
lines changed
client-personalization/builds
client-query-suggestions/builds Expand file tree Collapse file tree 15 files changed +62
-20
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,12 @@ import {
9
9
} from '@experimental-api-clients-automation/client-common' ;
10
10
import { createXhrRequester } from '@experimental-api-clients-automation/requester-browser-xhr' ;
11
11
12
+ import type { AbtestingClient , Region } from '../src/abtestingClient' ;
12
13
import {
13
14
createAbtestingClient ,
14
15
apiClientVersion ,
16
+ REGIONS ,
15
17
} from '../src/abtestingClient' ;
16
- import type { AbtestingClient , Region } from '../src/abtestingClient' ;
17
18
18
19
export { apiClientVersion , AbtestingClient } from '../src/abtestingClient' ;
19
20
export * from '../model' ;
@@ -32,6 +33,12 @@ export function abtestingClient(
32
33
throw new Error ( '`apiKey` is missing.' ) ;
33
34
}
34
35
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
+
35
42
return createAbtestingClient ( {
36
43
appId,
37
44
apiKey,
Original file line number Diff line number Diff line change 9
9
import { createHttpRequester } from '@experimental-api-clients-automation/requester-node-http' ;
10
10
11
11
import type { AbtestingClient , Region } from '../src/abtestingClient' ;
12
- import { createAbtestingClient } from '../src/abtestingClient' ;
12
+ import { createAbtestingClient , REGIONS } from '../src/abtestingClient' ;
13
13
14
14
export { apiClientVersion , AbtestingClient } from '../src/abtestingClient' ;
15
15
export * from '../model' ;
@@ -28,6 +28,12 @@ export function abtestingClient(
28
28
throw new Error ( '`apiKey` is missing.' ) ;
29
29
}
30
30
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
+
31
37
return createAbtestingClient ( {
32
38
appId,
33
39
apiKey,
Original file line number Diff line number Diff line change @@ -9,11 +9,12 @@ import {
9
9
} from '@experimental-api-clients-automation/client-common' ;
10
10
import { createXhrRequester } from '@experimental-api-clients-automation/requester-browser-xhr' ;
11
11
12
+ import type { AnalyticsClient , Region } from '../src/analyticsClient' ;
12
13
import {
13
14
createAnalyticsClient ,
14
15
apiClientVersion ,
16
+ REGIONS ,
15
17
} from '../src/analyticsClient' ;
16
- import type { AnalyticsClient , Region } from '../src/analyticsClient' ;
17
18
18
19
export { apiClientVersion , AnalyticsClient } from '../src/analyticsClient' ;
19
20
export * from '../model' ;
@@ -32,6 +33,12 @@ export function analyticsClient(
32
33
throw new Error ( '`apiKey` is missing.' ) ;
33
34
}
34
35
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
+
35
42
return createAnalyticsClient ( {
36
43
appId,
37
44
apiKey,
Original file line number Diff line number Diff line change 9
9
import { createHttpRequester } from '@experimental-api-clients-automation/requester-node-http' ;
10
10
11
11
import type { AnalyticsClient , Region } from '../src/analyticsClient' ;
12
- import { createAnalyticsClient } from '../src/analyticsClient' ;
12
+ import { createAnalyticsClient , REGIONS } from '../src/analyticsClient' ;
13
13
14
14
export { apiClientVersion , AnalyticsClient } from '../src/analyticsClient' ;
15
15
export * from '../model' ;
@@ -28,6 +28,12 @@ export function analyticsClient(
28
28
throw new Error ( '`apiKey` is missing.' ) ;
29
29
}
30
30
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
+
31
37
return createAnalyticsClient ( {
32
38
appId,
33
39
apiKey,
Original file line number Diff line number Diff line change @@ -10,7 +10,11 @@ import {
10
10
import { createXhrRequester } from '@experimental-api-clients-automation/requester-browser-xhr' ;
11
11
12
12
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' ;
14
18
15
19
export { apiClientVersion , InsightsClient } from '../src/insightsClient' ;
16
20
export * from '../model' ;
@@ -29,6 +33,12 @@ export function insightsClient(
29
33
throw new Error ( '`apiKey` is missing.' ) ;
30
34
}
31
35
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
+
32
42
return createInsightsClient ( {
33
43
appId,
34
44
apiKey,
Original file line number Diff line number Diff line change 9
9
import { createHttpRequester } from '@experimental-api-clients-automation/requester-node-http' ;
10
10
11
11
import type { InsightsClient , Region } from '../src/insightsClient' ;
12
- import { createInsightsClient } from '../src/insightsClient' ;
12
+ import { createInsightsClient , REGIONS } from '../src/insightsClient' ;
13
13
14
14
export { apiClientVersion , InsightsClient } from '../src/insightsClient' ;
15
15
export * from '../model' ;
@@ -28,6 +28,12 @@ export function insightsClient(
28
28
throw new Error ( '`apiKey` is missing.' ) ;
29
29
}
30
30
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
+
31
37
return createInsightsClient ( {
32
38
appId,
33
39
apiKey,
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export function personalizationClient(
43
43
throw new Error ( '`region` is missing.' ) ;
44
44
}
45
45
46
- if ( typeof region !== 'string' || ! REGIONS . includes ( region ) ) {
46
+ if ( region && ( typeof region !== 'string' || ! REGIONS . includes ( region ) ) ) {
47
47
throw new Error (
48
48
`\`region\` must be one of the following: ${ REGIONS . join ( ', ' ) } `
49
49
) ;
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export function personalizationClient(
41
41
throw new Error ( '`region` is missing.' ) ;
42
42
}
43
43
44
- if ( typeof region !== 'string' || ! REGIONS . includes ( region ) ) {
44
+ if ( region && ( typeof region !== 'string' || ! REGIONS . includes ( region ) ) ) {
45
45
throw new Error (
46
46
`\`region\` must be one of the following: ${ REGIONS . join ( ', ' ) } `
47
47
) ;
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export function predictClient(
37
37
throw new Error ( '`region` is missing.' ) ;
38
38
}
39
39
40
- if ( typeof region !== 'string' || ! REGIONS . includes ( region ) ) {
40
+ if ( region && ( typeof region !== 'string' || ! REGIONS . includes ( region ) ) ) {
41
41
throw new Error (
42
42
`\`region\` must be one of the following: ${ REGIONS . join ( ', ' ) } `
43
43
) ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export function predictClient(
32
32
throw new Error ( '`region` is missing.' ) ;
33
33
}
34
34
35
- if ( typeof region !== 'string' || ! REGIONS . includes ( region ) ) {
35
+ if ( region && ( typeof region !== 'string' || ! REGIONS . includes ( region ) ) ) {
36
36
throw new Error (
37
37
`\`region\` must be one of the following: ${ REGIONS . join ( ', ' ) } `
38
38
) ;
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export function querySuggestionsClient(
43
43
throw new Error ( '`region` is missing.' ) ;
44
44
}
45
45
46
- if ( typeof region !== 'string' || ! REGIONS . includes ( region ) ) {
46
+ if ( region && ( typeof region !== 'string' || ! REGIONS . includes ( region ) ) ) {
47
47
throw new Error (
48
48
`\`region\` must be one of the following: ${ REGIONS . join ( ', ' ) } `
49
49
) ;
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export function querySuggestionsClient(
41
41
throw new Error ( '`region` is missing.' ) ;
42
42
}
43
43
44
- if ( typeof region !== 'string' || ! REGIONS . includes ( region ) ) {
44
+ if ( region && ( typeof region !== 'string' || ! REGIONS . includes ( region ) ) ) {
45
45
throw new Error (
46
46
`\`region\` must be one of the following: ${ REGIONS . join ( ', ' ) } `
47
47
) ;
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export function sourcesClient(
37
37
throw new Error ( '`region` is missing.' ) ;
38
38
}
39
39
40
- if ( typeof region !== 'string' || ! REGIONS . includes ( region ) ) {
40
+ if ( region && ( typeof region !== 'string' || ! REGIONS . includes ( region ) ) ) {
41
41
throw new Error (
42
42
`\`region\` must be one of the following: ${ REGIONS . join ( ', ' ) } `
43
43
) ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export function sourcesClient(
32
32
throw new Error ( '`region` is missing.' ) ;
33
33
}
34
34
35
- if ( typeof region !== 'string' || ! REGIONS . includes ( region ) ) {
35
+ if ( region && ( typeof region !== 'string' || ! REGIONS . includes ( region ) ) ) {
36
36
throw new Error (
37
37
`\`region\` must be one of the following: ${ REGIONS . join ( ', ' ) } `
38
38
) ;
Original file line number Diff line number Diff line change @@ -4950,9 +4950,9 @@ __metadata:
4950
4950
linkType : hard
4951
4951
4952
4952
" 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
4956
4956
languageName : node
4957
4957
linkType : hard
4958
4958
@@ -10429,8 +10429,8 @@ __metadata:
10429
10429
linkType : hard
10430
10430
10431
10431
" 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"
10434
10434
peerDependencies :
10435
10435
bufferutil : ^4.0.1
10436
10436
utf-8-validate : ^5.0.2
@@ -10439,7 +10439,7 @@ __metadata:
10439
10439
optional : true
10440
10440
utf-8-validate :
10441
10441
optional : true
10442
- checksum : 078fa2dbc06b31a45e0057b19e2930d26c222622e355955afe019c9b9b25f62eb2a8eff7cceabdad04910ecd2bd6ef4fa48e6f3673f2fdddff02a6e4c2459584
10442
+ checksum : 6ceed1ca1cb800ef60c7fc8346c7d5d73d73be754228eb958765abf5d714519338efa20ffe674167039486eb3a813aae5a497f8d319e16b4d96216a31df5bd95
10443
10443
languageName : node
10444
10444
linkType : hard
10445
10445
You can’t perform that action at this time.
0 commit comments