@scaleway/sdk-client 1.2.3 → 1.3.1
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 +5 -5
- package/dist/index.cjs +26 -24
- package/dist/index.d.ts +9 -8
- package/dist/index.js +8 -6
- package/dist/internals.d.ts +1 -1
- 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/client.js +1 -1
- package/dist/scw/errors/standard/index.d.ts +4 -4
- 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 +2 -2
package/dist/bridge.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/** List all helpers required by APIs */
|
|
2
2
|
export { isJSONObject } from './helpers/json.js';
|
|
3
|
-
export {
|
|
3
|
+
export { resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMapOfObject, urlParams, validatePathParam, } from './helpers/marshalling.js';
|
|
4
4
|
export type { WaitForOptions } from './internal/async/interval-retrier.js';
|
|
5
|
+
export { waitForResource } from './internal/async/interval-retrier.js';
|
|
5
6
|
export { API } from './scw/api.js';
|
|
6
7
|
export type { DefaultValues } from './scw/client-settings.js';
|
|
7
|
-
export
|
|
8
|
+
export { marshalBlobToScwFile, marshalDecimal, marshalMoney, marshalScwFile, marshalTimeSeries, unmarshalDecimal, unmarshalMoney, unmarshalScwFile, unmarshalServiceInfo, unmarshalTimeSeries, unmarshalTimeSeriesPoint, } from './scw/custom-marshalling.js';
|
|
9
|
+
export type { Money, ScwFile, ServiceInfo, TimeSeries, } from './scw/custom-types.js';
|
|
8
10
|
export { Decimal } from './scw/custom-types.js';
|
|
9
|
-
export { marshalScwFile, marshalMoney, marshalTimeSeries, marshalDecimal, marshalBlobToScwFile, unmarshalMoney, unmarshalScwFile, unmarshalServiceInfo, unmarshalTimeSeries, unmarshalTimeSeriesPoint, unmarshalDecimal, } from './scw/custom-marshalling.js';
|
|
10
11
|
export { enrichForPagination } from './scw/fetch/resource-paginator.js';
|
|
11
|
-
export type { Region, Zone } from './scw/locality';
|
|
12
|
-
export { resolveOneOf, unmarshalDate, unmarshalArrayOfObject, unmarshalMapOfObject, urlParams, validatePathParam, } from './helpers/marshalling.js';
|
|
12
|
+
export type { Region, Zone } from './scw/locality.js';
|
package/dist/index.cjs
CHANGED
|
@@ -1,34 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const index = require("./internal/logger/index.cjs");
|
|
4
|
-
const client = require("./scw/client.cjs");
|
|
5
|
-
const constants = require("./scw/constants.cjs");
|
|
6
|
-
const clientIniFactory = require("./scw/client-ini-factory.cjs");
|
|
7
|
-
const customTypes = require("./scw/custom-types.cjs");
|
|
8
|
-
const index$1 = require("./scw/errors/standard/index.cjs");
|
|
9
4
|
const json = require("./helpers/json.cjs");
|
|
5
|
+
const marshalling = require("./helpers/marshalling.cjs");
|
|
10
6
|
const intervalRetrier = require("./internal/async/interval-retrier.cjs");
|
|
11
7
|
const helpers = require("./internal/interceptors/helpers.cjs");
|
|
12
8
|
const api = require("./scw/api.cjs");
|
|
13
9
|
const auth = require("./scw/auth.cjs");
|
|
14
10
|
const customMarshalling = require("./scw/custom-marshalling.cjs");
|
|
15
|
-
const marshalling = require("./helpers/marshalling.cjs");
|
|
16
11
|
const resourcePaginator = require("./scw/fetch/resource-paginator.cjs");
|
|
12
|
+
const client = require("./scw/client.cjs");
|
|
13
|
+
const clientIniFactory = require("./scw/client-ini-factory.cjs");
|
|
14
|
+
const constants = require("./scw/constants.cjs");
|
|
15
|
+
const customTypes = require("./scw/custom-types.cjs");
|
|
16
|
+
const index$1 = require("./scw/errors/standard/index.cjs");
|
|
17
|
+
const locality = require("./scw/locality.cjs");
|
|
17
18
|
exports.enableConsoleLogger = index.enableConsoleLogger;
|
|
18
19
|
exports.setLogger = index.setLogger;
|
|
19
|
-
exports.createAdvancedClient = client.createAdvancedClient;
|
|
20
|
-
exports.createClient = client.createClient;
|
|
21
|
-
exports.AUTH_HEADER_KEY = constants.AUTH_HEADER_KEY;
|
|
22
|
-
exports.SESSION_HEADER_KEY = constants.SESSION_HEADER_KEY;
|
|
23
|
-
exports.withAdditionalInterceptors = clientIniFactory.withAdditionalInterceptors;
|
|
24
|
-
exports.withDefaultPageSize = clientIniFactory.withDefaultPageSize;
|
|
25
|
-
exports.withHTTPClient = clientIniFactory.withHTTPClient;
|
|
26
|
-
exports.withProfile = clientIniFactory.withProfile;
|
|
27
|
-
exports.withUserAgent = clientIniFactory.withUserAgent;
|
|
28
|
-
exports.withUserAgentSuffix = clientIniFactory.withUserAgentSuffix;
|
|
29
|
-
exports.Decimal = customTypes.Decimal;
|
|
30
|
-
exports.Errors = index$1;
|
|
31
20
|
exports.isJSONObject = json.isJSONObject;
|
|
21
|
+
exports.resolveOneOf = marshalling.resolveOneOf;
|
|
22
|
+
exports.unmarshalArrayOfObject = marshalling.unmarshalArrayOfObject;
|
|
23
|
+
exports.unmarshalDate = marshalling.unmarshalDate;
|
|
24
|
+
exports.unmarshalMapOfObject = marshalling.unmarshalMapOfObject;
|
|
25
|
+
exports.urlParams = marshalling.urlParams;
|
|
26
|
+
exports.validatePathParam = marshalling.validatePathParam;
|
|
32
27
|
exports.createExponentialBackoffStrategy = intervalRetrier.createExponentialBackoffStrategy;
|
|
33
28
|
exports.tryAtIntervals = intervalRetrier.tryAtIntervals;
|
|
34
29
|
exports.waitForResource = intervalRetrier.waitForResource;
|
|
@@ -47,10 +42,17 @@ exports.unmarshalScwFile = customMarshalling.unmarshalScwFile;
|
|
|
47
42
|
exports.unmarshalServiceInfo = customMarshalling.unmarshalServiceInfo;
|
|
48
43
|
exports.unmarshalTimeSeries = customMarshalling.unmarshalTimeSeries;
|
|
49
44
|
exports.unmarshalTimeSeriesPoint = customMarshalling.unmarshalTimeSeriesPoint;
|
|
50
|
-
exports.resolveOneOf = marshalling.resolveOneOf;
|
|
51
|
-
exports.unmarshalArrayOfObject = marshalling.unmarshalArrayOfObject;
|
|
52
|
-
exports.unmarshalDate = marshalling.unmarshalDate;
|
|
53
|
-
exports.unmarshalMapOfObject = marshalling.unmarshalMapOfObject;
|
|
54
|
-
exports.urlParams = marshalling.urlParams;
|
|
55
|
-
exports.validatePathParam = marshalling.validatePathParam;
|
|
56
45
|
exports.enrichForPagination = resourcePaginator.enrichForPagination;
|
|
46
|
+
exports.createAdvancedClient = client.createAdvancedClient;
|
|
47
|
+
exports.createClient = client.createClient;
|
|
48
|
+
exports.withAdditionalInterceptors = clientIniFactory.withAdditionalInterceptors;
|
|
49
|
+
exports.withDefaultPageSize = clientIniFactory.withDefaultPageSize;
|
|
50
|
+
exports.withHTTPClient = clientIniFactory.withHTTPClient;
|
|
51
|
+
exports.withProfile = clientIniFactory.withProfile;
|
|
52
|
+
exports.withUserAgent = clientIniFactory.withUserAgent;
|
|
53
|
+
exports.withUserAgentSuffix = clientIniFactory.withUserAgentSuffix;
|
|
54
|
+
exports.AUTH_HEADER_KEY = constants.AUTH_HEADER_KEY;
|
|
55
|
+
exports.SESSION_HEADER_KEY = constants.SESSION_HEADER_KEY;
|
|
56
|
+
exports.Decimal = customTypes.Decimal;
|
|
57
|
+
exports.Errors = index$1;
|
|
58
|
+
exports.toApiLocality = locality.toApiLocality;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
export type { WaitForOptions, WaitForStopCondition, } from './internal/async/interval-retrier.js';
|
|
2
|
-
export type { NetworkInterceptors, RequestInterceptor,
|
|
2
|
+
export type { NetworkInterceptors, RequestInterceptor, ResponseErrorInterceptor, ResponseInterceptor, } from './internal/interceptors/types';
|
|
3
3
|
export { enableConsoleLogger, setLogger } from './internal/logger/index.js';
|
|
4
4
|
export type { Logger } from './internal/logger/logger';
|
|
5
|
-
export
|
|
6
|
-
export { AUTH_HEADER_KEY, SESSION_HEADER_KEY } from './scw/constants.js';
|
|
5
|
+
export * from './internals';
|
|
7
6
|
export type { Client } from './scw/client.js';
|
|
7
|
+
export { createAdvancedClient, createClient } from './scw/client.js';
|
|
8
|
+
export type { ClientConfig } from './scw/client-ini-factory.js';
|
|
9
|
+
export { withAdditionalInterceptors, withDefaultPageSize, withHTTPClient, withProfile, withUserAgent, withUserAgentSuffix, } from './scw/client-ini-factory.js';
|
|
8
10
|
export type { Profile } from './scw/client-ini-profile.js';
|
|
9
11
|
export type { Settings } from './scw/client-settings.js';
|
|
10
|
-
export {
|
|
11
|
-
export type { ClientConfig } from './scw/client-ini-factory.js';
|
|
12
|
-
export { Decimal } from './scw/custom-types.js';
|
|
12
|
+
export { AUTH_HEADER_KEY, SESSION_HEADER_KEY } from './scw/constants.js';
|
|
13
13
|
export type { Money, ScwFile, TimeSeries } from './scw/custom-types.js';
|
|
14
|
+
export { Decimal } from './scw/custom-types.js';
|
|
14
15
|
export * as Errors from './scw/errors/standard/index.js';
|
|
15
|
-
export type { Region, Zone } from './scw/locality';
|
|
16
|
-
export
|
|
16
|
+
export type { ApiLocality, Region, Zone } from './scw/locality.js';
|
|
17
|
+
export { toApiLocality } from './scw/locality.js';
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { enableConsoleLogger, setLogger } from "./internal/logger/index.js";
|
|
2
|
-
import { createAdvancedClient, createClient } from "./scw/client.js";
|
|
3
|
-
import { AUTH_HEADER_KEY, SESSION_HEADER_KEY } from "./scw/constants.js";
|
|
4
|
-
import { withAdditionalInterceptors, withDefaultPageSize, withHTTPClient, withProfile, withUserAgent, withUserAgentSuffix } from "./scw/client-ini-factory.js";
|
|
5
|
-
import { Decimal } from "./scw/custom-types.js";
|
|
6
|
-
import * as index from "./scw/errors/standard/index.js";
|
|
7
2
|
import { isJSONObject } from "./helpers/json.js";
|
|
3
|
+
import { resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMapOfObject, urlParams, validatePathParam } from "./helpers/marshalling.js";
|
|
8
4
|
import { createExponentialBackoffStrategy, tryAtIntervals, waitForResource } from "./internal/async/interval-retrier.js";
|
|
9
5
|
import { addAsyncHeaderInterceptor } from "./internal/interceptors/helpers.js";
|
|
10
6
|
import { API } from "./scw/api.js";
|
|
11
7
|
import { authenticateWithSessionToken } from "./scw/auth.js";
|
|
12
8
|
import { marshalBlobToScwFile, marshalDecimal, marshalMoney, marshalScwFile, marshalTimeSeries, unmarshalAnyRes, unmarshalDecimal, unmarshalMoney, unmarshalScwFile, unmarshalServiceInfo, unmarshalTimeSeries, unmarshalTimeSeriesPoint } from "./scw/custom-marshalling.js";
|
|
13
|
-
import { resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMapOfObject, urlParams, validatePathParam } from "./helpers/marshalling.js";
|
|
14
9
|
import { enrichForPagination } from "./scw/fetch/resource-paginator.js";
|
|
10
|
+
import { createAdvancedClient, createClient } from "./scw/client.js";
|
|
11
|
+
import { withAdditionalInterceptors, withDefaultPageSize, withHTTPClient, withProfile, withUserAgent, withUserAgentSuffix } from "./scw/client-ini-factory.js";
|
|
12
|
+
import { AUTH_HEADER_KEY, SESSION_HEADER_KEY } from "./scw/constants.js";
|
|
13
|
+
import { Decimal } from "./scw/custom-types.js";
|
|
14
|
+
import * as index from "./scw/errors/standard/index.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/internals.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { isJSONObject } from './helpers/json.js';
|
|
2
|
+
export { resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMapOfObject, urlParams, validatePathParam, } from './helpers/marshalling.js';
|
|
2
3
|
export { createExponentialBackoffStrategy, tryAtIntervals, waitForResource, } from './internal/async/interval-retrier.js';
|
|
3
4
|
export { addAsyncHeaderInterceptor } from './internal/interceptors/helpers.js';
|
|
4
5
|
export { API } from './scw/api.js';
|
|
@@ -6,5 +7,4 @@ export { authenticateWithSessionToken } from './scw/auth.js';
|
|
|
6
7
|
export type { DefaultValues } from './scw/client-settings.js';
|
|
7
8
|
export { marshalBlobToScwFile, marshalDecimal, marshalMoney, marshalScwFile, marshalTimeSeries, unmarshalAnyRes, unmarshalDecimal, unmarshalMoney, unmarshalScwFile, unmarshalServiceInfo, unmarshalTimeSeries, unmarshalTimeSeriesPoint, } from './scw/custom-marshalling.js';
|
|
8
9
|
export type { ServiceInfo } from './scw/custom-types.js';
|
|
9
|
-
export { resolveOneOf, unmarshalDate, unmarshalArrayOfObject, unmarshalMapOfObject, urlParams, validatePathParam, } from './helpers/marshalling.js';
|
|
10
10
|
export { enrichForPagination } from './scw/fetch/resource-paginator.js';
|
package/dist/package.json.cjs
CHANGED
package/dist/package.json.js
CHANGED
package/dist/scw/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getLogger } from "../internal/logger/index.js";
|
|
2
|
-
import { withAdditionalInterceptors, withProfile
|
|
2
|
+
import { withLegacyInterceptors, withAdditionalInterceptors, withProfile } from "./client-ini-factory.js";
|
|
3
3
|
import { assertValidSettings } from "./client-settings.js";
|
|
4
4
|
import { userAgent, version } from "./constants.js";
|
|
5
5
|
import { buildFetcher } from "./fetch/build-fetcher.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export { ScalewayError } from '../scw-error.js';
|
|
2
2
|
export { AlreadyExistsError } from './already-exists-error.js';
|
|
3
3
|
export { DeniedAuthenticationError } from './denied-authentication-error.js';
|
|
4
|
-
export { InvalidArgumentsError } from './invalid-arguments-error.js';
|
|
5
4
|
export type { InvalidArgumentsErrorDetails } from './invalid-arguments-error.js';
|
|
5
|
+
export { InvalidArgumentsError } from './invalid-arguments-error.js';
|
|
6
6
|
export { OutOfStockError } from './out-of-stock-error.js';
|
|
7
|
-
export { PermissionsDeniedError } from './permissions-denied-error.js';
|
|
8
7
|
export type { PermissionsDeniedErrorDetails } from './permissions-denied-error.js';
|
|
8
|
+
export { PermissionsDeniedError } from './permissions-denied-error.js';
|
|
9
9
|
export { PreconditionFailedError } from './precondition-failed-error.js';
|
|
10
|
-
export { QuotasExceededError } from './quotas-exceeded-error.js';
|
|
11
10
|
export type { QuotasExceededErrorDetails, QuotasExceededErrorScope, } from './quotas-exceeded-error.js';
|
|
11
|
+
export { QuotasExceededError } from './quotas-exceeded-error.js';
|
|
12
12
|
export { ResourceExpiredError } from './resource-expired-error.js';
|
|
13
13
|
export { ResourceLockedError } from './resource-locked-error.js';
|
|
14
14
|
export { ResourceNotFoundError } from './resource-not-found-error.js';
|
|
15
|
-
export { TooManyRequestsError } from './too-many-requests-error.js';
|
|
16
15
|
export type { TooManyRequestsQuotaPolicy } from './too-many-requests-error.js';
|
|
16
|
+
export { TooManyRequestsError } from './too-many-requests-error.js';
|
|
17
17
|
export { TransientStateError } from './transient-state-error.js';
|
|
@@ -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
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Scaleway SDK Client",
|
|
6
6
|
"keywords": [
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"directory": "packages/client"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
|
-
"node": ">=20.19.
|
|
24
|
+
"node": ">=20.19.4"
|
|
25
25
|
},
|
|
26
26
|
"type": "module",
|
|
27
27
|
"exports": {
|