@scaleway/sdk-client 1.2.3 → 1.3.0
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/dist/bridge.d.ts +1 -1
- package/dist/index.cjs +2 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -0
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.js +1 -1
- package/dist/scw/client-ini-profile.d.ts +1 -1
- package/dist/scw/locality.cjs +16 -0
- package/dist/scw/locality.d.ts +15 -0
- package/dist/scw/locality.js +16 -0
- package/package.json +1 -1
package/dist/bridge.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ export type { Money, ServiceInfo, ScwFile, TimeSeries, } from './scw/custom-type
|
|
|
8
8
|
export { Decimal } from './scw/custom-types.js';
|
|
9
9
|
export { marshalScwFile, marshalMoney, marshalTimeSeries, marshalDecimal, marshalBlobToScwFile, unmarshalMoney, unmarshalScwFile, unmarshalServiceInfo, unmarshalTimeSeries, unmarshalTimeSeriesPoint, unmarshalDecimal, } from './scw/custom-marshalling.js';
|
|
10
10
|
export { enrichForPagination } from './scw/fetch/resource-paginator.js';
|
|
11
|
-
export type { Region, Zone } from './scw/locality';
|
|
11
|
+
export type { Region, Zone } from './scw/locality.js';
|
|
12
12
|
export { resolveOneOf, unmarshalDate, unmarshalArrayOfObject, unmarshalMapOfObject, urlParams, validatePathParam, } from './helpers/marshalling.js';
|
package/dist/index.cjs
CHANGED
|
@@ -14,6 +14,7 @@ const auth = require("./scw/auth.cjs");
|
|
|
14
14
|
const customMarshalling = require("./scw/custom-marshalling.cjs");
|
|
15
15
|
const marshalling = require("./helpers/marshalling.cjs");
|
|
16
16
|
const resourcePaginator = require("./scw/fetch/resource-paginator.cjs");
|
|
17
|
+
const locality = require("./scw/locality.cjs");
|
|
17
18
|
exports.enableConsoleLogger = index.enableConsoleLogger;
|
|
18
19
|
exports.setLogger = index.setLogger;
|
|
19
20
|
exports.createAdvancedClient = client.createAdvancedClient;
|
|
@@ -54,3 +55,4 @@ exports.unmarshalMapOfObject = marshalling.unmarshalMapOfObject;
|
|
|
54
55
|
exports.urlParams = marshalling.urlParams;
|
|
55
56
|
exports.validatePathParam = marshalling.validatePathParam;
|
|
56
57
|
exports.enrichForPagination = resourcePaginator.enrichForPagination;
|
|
58
|
+
exports.toApiLocality = locality.toApiLocality;
|
package/dist/index.d.ts
CHANGED
|
@@ -12,5 +12,7 @@ export type { ClientConfig } from './scw/client-ini-factory.js';
|
|
|
12
12
|
export { Decimal } from './scw/custom-types.js';
|
|
13
13
|
export type { Money, ScwFile, TimeSeries } from './scw/custom-types.js';
|
|
14
14
|
export * as Errors from './scw/errors/standard/index.js';
|
|
15
|
-
export type { Region, Zone } from './scw/locality';
|
|
15
|
+
export type { Region, Zone } from './scw/locality.js';
|
|
16
16
|
export * from './internals';
|
|
17
|
+
export { toApiLocality } from './scw/locality.js';
|
|
18
|
+
export type { ApiLocality } from './scw/locality.js';
|
package/dist/index.js
CHANGED
|
@@ -12,6 +12,7 @@ import { authenticateWithSessionToken } from "./scw/auth.js";
|
|
|
12
12
|
import { marshalBlobToScwFile, marshalDecimal, marshalMoney, marshalScwFile, marshalTimeSeries, unmarshalAnyRes, unmarshalDecimal, unmarshalMoney, unmarshalScwFile, unmarshalServiceInfo, unmarshalTimeSeries, unmarshalTimeSeriesPoint } from "./scw/custom-marshalling.js";
|
|
13
13
|
import { resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMapOfObject, urlParams, validatePathParam } from "./helpers/marshalling.js";
|
|
14
14
|
import { enrichForPagination } from "./scw/fetch/resource-paginator.js";
|
|
15
|
+
import { toApiLocality } from "./scw/locality.js";
|
|
15
16
|
export {
|
|
16
17
|
API,
|
|
17
18
|
AUTH_HEADER_KEY,
|
|
@@ -33,6 +34,7 @@ export {
|
|
|
33
34
|
marshalTimeSeries,
|
|
34
35
|
resolveOneOf,
|
|
35
36
|
setLogger,
|
|
37
|
+
toApiLocality,
|
|
36
38
|
tryAtIntervals,
|
|
37
39
|
unmarshalAnyRes,
|
|
38
40
|
unmarshalArrayOfObject,
|
package/dist/package.json.cjs
CHANGED
package/dist/package.json.js
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
function toApiLocality(legacy) {
|
|
4
|
+
if (!legacy) {
|
|
5
|
+
return { type: "unspecified" };
|
|
6
|
+
}
|
|
7
|
+
const { zones, regions } = legacy;
|
|
8
|
+
if (zones && zones.length > 0) {
|
|
9
|
+
return { type: "zone", zones };
|
|
10
|
+
}
|
|
11
|
+
if (regions && regions.length > 0) {
|
|
12
|
+
return { type: "region", regions };
|
|
13
|
+
}
|
|
14
|
+
return { type: "global" };
|
|
15
|
+
}
|
|
16
|
+
exports.toApiLocality = toApiLocality;
|
package/dist/scw/locality.d.ts
CHANGED
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
export type Region = 'fr-par' | 'nl-ams' | 'pl-waw' | (string & {});
|
|
2
2
|
export type Zone = 'fr-par-1' | 'fr-par-2' | 'fr-par-3' | 'nl-ams-1' | 'nl-ams-2' | 'nl-ams-3' | 'pl-waw-1' | 'pl-waw-2' | 'pl-waw-3' | (string & {});
|
|
3
|
+
export type ApiLocality = {
|
|
4
|
+
type: 'zone';
|
|
5
|
+
zones: Zone[];
|
|
6
|
+
} | {
|
|
7
|
+
type: 'region';
|
|
8
|
+
regions: Region[];
|
|
9
|
+
} | {
|
|
10
|
+
type: 'global';
|
|
11
|
+
} | {
|
|
12
|
+
type: 'unspecified';
|
|
13
|
+
};
|
|
14
|
+
export declare function toApiLocality(legacy?: {
|
|
15
|
+
zones?: Zone[];
|
|
16
|
+
regions?: Region[];
|
|
17
|
+
}): ApiLocality;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function toApiLocality(legacy) {
|
|
2
|
+
if (!legacy) {
|
|
3
|
+
return { type: "unspecified" };
|
|
4
|
+
}
|
|
5
|
+
const { zones, regions } = legacy;
|
|
6
|
+
if (zones && zones.length > 0) {
|
|
7
|
+
return { type: "zone", zones };
|
|
8
|
+
}
|
|
9
|
+
if (regions && regions.length > 0) {
|
|
10
|
+
return { type: "region", regions };
|
|
11
|
+
}
|
|
12
|
+
return { type: "global" };
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
toApiLocality
|
|
16
|
+
};
|