Skip to content

Commit 677cd8f

Browse files
jremy42protobuf-ci-cd
andauthored
chore: add locality type (#2206)
Co-authored-by: protobuf-ci-cd <[email protected]>
1 parent 9f0a4ec commit 677cd8f

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

packages/client/src/scw/locality.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ export type Zone =
1515
/* eslint-enable @typescript-eslint/ban-types */
1616

1717
export type ApiLocality =
18-
| { type: 'zone'; zones: Zone[] }
19-
| { type: 'region'; regions: Region[] }
18+
| { type: 'zone'; zones: Zone[] }
19+
| { type: 'region'; regions: Region[] }
2020
| { type: 'global' }
2121
| { type: 'unspecified' }
2222

23-
24-
export function toApiLocality(
25-
legacy?: { zones?: Zone[]; regions?: Region[] }
26-
): ApiLocality {
23+
export function toApiLocality(legacy?: {
24+
zones?: Zone[]
25+
regions?: Region[]
26+
}): ApiLocality {
2727
if (!legacy) {
2828
return { type: 'unspecified' }
2929
}
@@ -34,6 +34,6 @@ export function toApiLocality(
3434
if (regions && regions.length > 0) {
3535
return { type: 'region', regions }
3636
}
37-
37+
3838
return { type: 'global' }
3939
}

packages/sdk/src/index.gen.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { KeyManagerv1alpha1 } from '@scaleway/sdk-key-manager'
2929
import { Lbv1 } from '@scaleway/sdk-lb'
3030
import { Marketplacev2 } from '@scaleway/sdk-marketplace'
3131
import { Mnqv1beta1 } from '@scaleway/sdk-mnq'
32-
import { Mongodbv1alpha1 } from '@scaleway/sdk-mongodb'
32+
import { Mongodbv1, Mongodbv1alpha1 } from '@scaleway/sdk-mongodb'
3333
import { ProductCatalogv2alpha1 } from '@scaleway/sdk-product-catalog'
3434
import { Qaasv1alpha1 } from '@scaleway/sdk-qaas'
3535
import { Rdbv1 } from '@scaleway/sdk-rdb'
@@ -264,8 +264,9 @@ export const Mnq = {
264264
/**
265265
* @deprecated Direct version exports are deprecated. Use the 'Mongodb' namespace instead (e.g., Mongodb.v1).
266266
*/
267-
export { Mongodbv1alpha1 }
267+
export { Mongodbv1, Mongodbv1alpha1 }
268268
export const Mongodb = {
269+
v1: Mongodbv1,
269270
v1alpha1: Mongodbv1alpha1,
270271
}
271272

0 commit comments

Comments
 (0)