@scaleway/sdk 2.37.0 → 2.38.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/api/inference/v1beta1/types.gen.d.ts +1 -1
- package/dist/api/ipam/v1/api.gen.cjs +1 -0
- package/dist/api/ipam/v1/api.gen.js +1 -0
- package/dist/api/ipam/v1/types.gen.d.ts +5 -0
- package/dist/api/secret/v1beta1/marshalling.gen.cjs +1 -0
- package/dist/api/secret/v1beta1/marshalling.gen.js +1 -0
- package/dist/api/secret/v1beta1/types.gen.d.ts +1 -0
- package/dist/bridge.d.ts +2 -1
- package/dist/index.cjs +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -1
- package/dist/internals.d.ts +1 -1
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/dist/scw/custom-marshalling.cjs +12 -0
- package/dist/scw/custom-marshalling.d.ts +13 -0
- package/dist/scw/custom-marshalling.js +12 -0
- package/dist/scw/custom-types.cjs +10 -0
- package/dist/scw/custom-types.d.ts +8 -0
- package/dist/scw/custom-types.js +10 -0
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Region } from '../../../bridge';
|
|
2
2
|
export type DeploymentStatus = 'unknown_status' | 'creating' | 'deploying' | 'ready' | 'error' | 'deleting' | 'locked';
|
|
3
3
|
export type ListDeploymentsRequestOrderBy = 'created_at_desc' | 'created_at_asc' | 'name_asc' | 'name_desc';
|
|
4
|
-
export type ListModelsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
|
|
4
|
+
export type ListModelsRequestOrderBy = 'display_rank_asc' | 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
|
|
5
5
|
export type NodeTypeStock = 'unknown_stock' | 'low_stock' | 'out_of_stock' | 'available';
|
|
6
6
|
export interface EndpointPrivateNetworkDetails {
|
|
7
7
|
/** ID of the Private Network. */
|
|
@@ -97,6 +97,7 @@ class API extends api.API {
|
|
|
97
97
|
["resource_id", request.resourceId],
|
|
98
98
|
["resource_name", request.resourceName],
|
|
99
99
|
["resource_type", request.resourceType],
|
|
100
|
+
["resource_types", request.resourceTypes],
|
|
100
101
|
["tags", request.tags],
|
|
101
102
|
["vpc_id", request.vpcId],
|
|
102
103
|
...Object.entries(
|
|
@@ -95,6 +95,7 @@ class API extends API$1 {
|
|
|
95
95
|
["resource_id", request.resourceId],
|
|
96
96
|
["resource_name", request.resourceName],
|
|
97
97
|
["resource_type", request.resourceType],
|
|
98
|
+
["resource_types", request.resourceTypes],
|
|
98
99
|
["tags", request.tags],
|
|
99
100
|
["vpc_id", request.vpcId],
|
|
100
101
|
...Object.entries(
|
|
@@ -177,6 +177,11 @@ export type ListIPsRequest = {
|
|
|
177
177
|
* this string within their name will be returned.
|
|
178
178
|
*/
|
|
179
179
|
resourceName?: string;
|
|
180
|
+
/**
|
|
181
|
+
* Resource types to filter for. Only IPs attached to these types of resources
|
|
182
|
+
* will be returned.
|
|
183
|
+
*/
|
|
184
|
+
resourceTypes?: ResourceType[];
|
|
180
185
|
};
|
|
181
186
|
export interface ListIPsResponse {
|
|
182
187
|
totalCount: number;
|
|
@@ -25,6 +25,7 @@ export interface BrowseSecretsResponseItemSecretDetails {
|
|
|
25
25
|
versionCount: number;
|
|
26
26
|
protected: boolean;
|
|
27
27
|
ephemeralPolicy?: EphemeralPolicy;
|
|
28
|
+
type: SecretType;
|
|
28
29
|
}
|
|
29
30
|
export interface EphemeralProperties {
|
|
30
31
|
/** (Optional.) If not specified, the version does not have an expiration date. */
|
package/dist/bridge.d.ts
CHANGED
|
@@ -5,7 +5,8 @@ export type { WaitForOptions } from './internal/async/interval-retrier';
|
|
|
5
5
|
export { API } from './scw/api';
|
|
6
6
|
export type { DefaultValues } from './scw/client-settings';
|
|
7
7
|
export type { Money, ServiceInfo, ScwFile, TimeSeries, } from './scw/custom-types';
|
|
8
|
-
export {
|
|
8
|
+
export { Decimal } from './scw/custom-types';
|
|
9
|
+
export { marshalScwFile, marshalMoney, marshalTimeSeries, marshalDecimal, unmarshalMoney, unmarshalScwFile, unmarshalServiceInfo, unmarshalTimeSeries, unmarshalTimeSeriesPoint, unmarshalDecimal, } from './scw/custom-marshalling';
|
|
9
10
|
export { enrichForPagination } from './scw/fetch/resource-paginator';
|
|
10
11
|
export type { Region, Zone } from './scw/locality';
|
|
11
12
|
export { resolveOneOf, unmarshalDate, unmarshalArrayOfObject, unmarshalMapOfObject, urlParams, validatePathParam, } from './helpers/marshalling';
|
package/dist/index.cjs
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const index = require("./internal/logger/index.cjs");
|
|
4
4
|
const client = require("./scw/client.cjs");
|
|
5
5
|
const clientIniFactory = require("./scw/client-ini-factory.cjs");
|
|
6
|
+
const customTypes = require("./scw/custom-types.cjs");
|
|
6
7
|
const index$1 = require("./scw/errors/standard/index.cjs");
|
|
7
8
|
const json = require("./helpers/json.cjs");
|
|
8
9
|
const intervalRetrier = require("./internal/async/interval-retrier.cjs");
|
|
@@ -57,6 +58,7 @@ exports.withHTTPClient = clientIniFactory.withHTTPClient;
|
|
|
57
58
|
exports.withProfile = clientIniFactory.withProfile;
|
|
58
59
|
exports.withUserAgent = clientIniFactory.withUserAgent;
|
|
59
60
|
exports.withUserAgentSuffix = clientIniFactory.withUserAgentSuffix;
|
|
61
|
+
exports.Decimal = customTypes.Decimal;
|
|
60
62
|
exports.Errors = index$1;
|
|
61
63
|
exports.isJSONObject = json.isJSONObject;
|
|
62
64
|
exports.createExponentialBackoffStrategy = intervalRetrier.createExponentialBackoffStrategy;
|
|
@@ -65,9 +67,11 @@ exports.waitForResource = intervalRetrier.waitForResource;
|
|
|
65
67
|
exports.addAsyncHeaderInterceptor = helpers.addAsyncHeaderInterceptor;
|
|
66
68
|
exports.API = api.API;
|
|
67
69
|
exports.authenticateWithSessionToken = auth.authenticateWithSessionToken;
|
|
70
|
+
exports.marshalDecimal = customMarshalling.marshalDecimal;
|
|
68
71
|
exports.marshalMoney = customMarshalling.marshalMoney;
|
|
69
72
|
exports.marshalScwFile = customMarshalling.marshalScwFile;
|
|
70
73
|
exports.marshalTimeSeries = customMarshalling.marshalTimeSeries;
|
|
74
|
+
exports.unmarshalDecimal = customMarshalling.unmarshalDecimal;
|
|
71
75
|
exports.unmarshalMoney = customMarshalling.unmarshalMoney;
|
|
72
76
|
exports.unmarshalScwFile = customMarshalling.unmarshalScwFile;
|
|
73
77
|
exports.unmarshalServiceInfo = customMarshalling.unmarshalServiceInfo;
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export type { Profile } from './scw/client-ini-profile';
|
|
|
8
8
|
export type { Settings } from './scw/client-settings';
|
|
9
9
|
export { withAdditionalInterceptors, withDefaultPageSize, withHTTPClient, withProfile, withUserAgent, withUserAgentSuffix, } from './scw/client-ini-factory';
|
|
10
10
|
export type { ClientConfig } from './scw/client-ini-factory';
|
|
11
|
+
export { Decimal } from './scw/custom-types';
|
|
11
12
|
export type { Money, ScwFile, TimeSeries } from './scw/custom-types';
|
|
12
13
|
export * as Errors from './scw/errors/standard';
|
|
13
14
|
export type { Region, Zone } from './scw/locality';
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { enableConsoleLogger, setLogger } from "./internal/logger/index.js";
|
|
2
2
|
import { createAdvancedClient, createClient } from "./scw/client.js";
|
|
3
3
|
import { withAdditionalInterceptors, withDefaultPageSize, withHTTPClient, withProfile, withUserAgent, withUserAgentSuffix } from "./scw/client-ini-factory.js";
|
|
4
|
+
import { Decimal } from "./scw/custom-types.js";
|
|
4
5
|
import * as index from "./scw/errors/standard/index.js";
|
|
5
6
|
import { isJSONObject } from "./helpers/json.js";
|
|
6
7
|
import { createExponentialBackoffStrategy, tryAtIntervals, waitForResource } from "./internal/async/interval-retrier.js";
|
|
7
8
|
import { addAsyncHeaderInterceptor } from "./internal/interceptors/helpers.js";
|
|
8
9
|
import { API } from "./scw/api.js";
|
|
9
10
|
import { authenticateWithSessionToken } from "./scw/auth.js";
|
|
10
|
-
import { marshalMoney, marshalScwFile, marshalTimeSeries, unmarshalMoney, unmarshalScwFile, unmarshalServiceInfo, unmarshalTimeSeries, unmarshalTimeSeriesPoint } from "./scw/custom-marshalling.js";
|
|
11
|
+
import { marshalDecimal, marshalMoney, marshalScwFile, marshalTimeSeries, unmarshalDecimal, unmarshalMoney, unmarshalScwFile, unmarshalServiceInfo, unmarshalTimeSeries, unmarshalTimeSeriesPoint } from "./scw/custom-marshalling.js";
|
|
11
12
|
import { resolveOneOf, unmarshalArrayOfObject, unmarshalDate, unmarshalMapOfObject, urlParams, validatePathParam } from "./helpers/marshalling.js";
|
|
12
13
|
import { enrichForPagination } from "./scw/fetch/resource-paginator.js";
|
|
13
14
|
import * as index$1 from "./api/account/index.js";
|
|
@@ -54,6 +55,7 @@ export {
|
|
|
54
55
|
index$5 as Block,
|
|
55
56
|
index$6 as Cockpit,
|
|
56
57
|
index$7 as Container,
|
|
58
|
+
Decimal,
|
|
57
59
|
index$8 as Dedibox,
|
|
58
60
|
index$9 as DocumentDB,
|
|
59
61
|
index$a as Domain,
|
|
@@ -91,6 +93,7 @@ export {
|
|
|
91
93
|
enableConsoleLogger,
|
|
92
94
|
enrichForPagination,
|
|
93
95
|
isJSONObject,
|
|
96
|
+
marshalDecimal,
|
|
94
97
|
marshalMoney,
|
|
95
98
|
marshalScwFile,
|
|
96
99
|
marshalTimeSeries,
|
|
@@ -99,6 +102,7 @@ export {
|
|
|
99
102
|
tryAtIntervals,
|
|
100
103
|
unmarshalArrayOfObject,
|
|
101
104
|
unmarshalDate,
|
|
105
|
+
unmarshalDecimal,
|
|
102
106
|
unmarshalMapOfObject,
|
|
103
107
|
unmarshalMoney,
|
|
104
108
|
unmarshalScwFile,
|
package/dist/internals.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { addAsyncHeaderInterceptor } from './internal/interceptors/helpers';
|
|
|
4
4
|
export { API } from './scw/api';
|
|
5
5
|
export { authenticateWithSessionToken } from './scw/auth';
|
|
6
6
|
export type { DefaultValues } from './scw/client-settings';
|
|
7
|
-
export { marshalScwFile, marshalMoney, marshalTimeSeries, unmarshalMoney, unmarshalScwFile, unmarshalServiceInfo, unmarshalTimeSeries, unmarshalTimeSeriesPoint, } from './scw/custom-marshalling';
|
|
7
|
+
export { marshalDecimal, marshalScwFile, marshalMoney, marshalTimeSeries, unmarshalDecimal, unmarshalMoney, unmarshalScwFile, unmarshalServiceInfo, unmarshalTimeSeries, unmarshalTimeSeriesPoint, } from './scw/custom-marshalling';
|
|
8
8
|
export type { ServiceInfo } from './scw/custom-types';
|
|
9
9
|
export { resolveOneOf, unmarshalDate, unmarshalArrayOfObject, unmarshalMapOfObject, urlParams, validatePathParam, } from './helpers/marshalling';
|
|
10
10
|
export { enrichForPagination } from './scw/fetch/resource-paginator';
|
package/dist/scw/constants.cjs
CHANGED
package/dist/scw/constants.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "v2.
|
|
2
|
-
export declare const userAgent = "scaleway-sdk-js/v2.
|
|
1
|
+
export declare const version = "v2.38.0";
|
|
2
|
+
export declare const userAgent = "scaleway-sdk-js/v2.38.0";
|
package/dist/scw/constants.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const json = require("../helpers/json.cjs");
|
|
4
4
|
const marshalling = require("../helpers/marshalling.cjs");
|
|
5
|
+
const customTypes = require("./custom-types.cjs");
|
|
5
6
|
const unmarshalMoney = (data) => {
|
|
6
7
|
if (!json.isJSONObject(data)) {
|
|
7
8
|
throw new TypeError(
|
|
@@ -62,6 +63,14 @@ const unmarshalTimeSeries = (data) => {
|
|
|
62
63
|
points: marshalling.unmarshalArrayOfObject(data.points, unmarshalTimeSeriesPoint)
|
|
63
64
|
};
|
|
64
65
|
};
|
|
66
|
+
const unmarshalDecimal = (data) => {
|
|
67
|
+
if (!(typeof data === "string")) {
|
|
68
|
+
throw new TypeError(
|
|
69
|
+
`Unmarshalling the type 'Decimal' failed as data isn't a string.`
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
return new customTypes.Decimal(data);
|
|
73
|
+
};
|
|
65
74
|
const marshalScwFile = (obj) => ({
|
|
66
75
|
content: obj.content,
|
|
67
76
|
content_type: obj.contentType,
|
|
@@ -81,10 +90,13 @@ const marshalTimeSeries = (obj) => ({
|
|
|
81
90
|
name: obj.name,
|
|
82
91
|
points: obj.points.map((elt) => marshalTimeSeriesPoint(elt))
|
|
83
92
|
});
|
|
93
|
+
const marshalDecimal = (obj) => obj.toString();
|
|
94
|
+
exports.marshalDecimal = marshalDecimal;
|
|
84
95
|
exports.marshalMoney = marshalMoney;
|
|
85
96
|
exports.marshalScwFile = marshalScwFile;
|
|
86
97
|
exports.marshalTimeSeries = marshalTimeSeries;
|
|
87
98
|
exports.marshalTimeSeriesPoint = marshalTimeSeriesPoint;
|
|
99
|
+
exports.unmarshalDecimal = unmarshalDecimal;
|
|
88
100
|
exports.unmarshalMoney = unmarshalMoney;
|
|
89
101
|
exports.unmarshalScwFile = unmarshalScwFile;
|
|
90
102
|
exports.unmarshalServiceInfo = unmarshalServiceInfo;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Money, ScwFile, ServiceInfo, TimeSeries, TimeSeriesPoint } from './custom-types';
|
|
2
|
+
import { Decimal } from './custom-types';
|
|
2
3
|
/**
|
|
3
4
|
* Unmarshals {@link Money}
|
|
4
5
|
*
|
|
@@ -33,6 +34,12 @@ export declare const unmarshalTimeSeriesPoint: (data: unknown) => TimeSeriesPoin
|
|
|
33
34
|
* @internal
|
|
34
35
|
*/
|
|
35
36
|
export declare const unmarshalTimeSeries: (data: unknown) => TimeSeries;
|
|
37
|
+
/**
|
|
38
|
+
* Unmarshals {@link Decimal}
|
|
39
|
+
*
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
export declare const unmarshalDecimal: (data: unknown) => Decimal;
|
|
36
43
|
/**
|
|
37
44
|
* Marshals {@link ScwFile}.
|
|
38
45
|
*
|
|
@@ -57,3 +64,9 @@ export declare const marshalTimeSeriesPoint: (obj: TimeSeriesPoint) => Record<st
|
|
|
57
64
|
* @internal
|
|
58
65
|
*/
|
|
59
66
|
export declare const marshalTimeSeries: (obj: TimeSeries) => Record<string, unknown>;
|
|
67
|
+
/**
|
|
68
|
+
* Marshals {@link Decimal}
|
|
69
|
+
*
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
export declare const marshalDecimal: (obj: Decimal) => string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isJSONObject } from "../helpers/json.js";
|
|
2
2
|
import { unmarshalDate, unmarshalArrayOfObject } from "../helpers/marshalling.js";
|
|
3
|
+
import { Decimal } from "./custom-types.js";
|
|
3
4
|
const unmarshalMoney = (data) => {
|
|
4
5
|
if (!isJSONObject(data)) {
|
|
5
6
|
throw new TypeError(
|
|
@@ -60,6 +61,14 @@ const unmarshalTimeSeries = (data) => {
|
|
|
60
61
|
points: unmarshalArrayOfObject(data.points, unmarshalTimeSeriesPoint)
|
|
61
62
|
};
|
|
62
63
|
};
|
|
64
|
+
const unmarshalDecimal = (data) => {
|
|
65
|
+
if (!(typeof data === "string")) {
|
|
66
|
+
throw new TypeError(
|
|
67
|
+
`Unmarshalling the type 'Decimal' failed as data isn't a string.`
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
return new Decimal(data);
|
|
71
|
+
};
|
|
63
72
|
const marshalScwFile = (obj) => ({
|
|
64
73
|
content: obj.content,
|
|
65
74
|
content_type: obj.contentType,
|
|
@@ -79,11 +88,14 @@ const marshalTimeSeries = (obj) => ({
|
|
|
79
88
|
name: obj.name,
|
|
80
89
|
points: obj.points.map((elt) => marshalTimeSeriesPoint(elt))
|
|
81
90
|
});
|
|
91
|
+
const marshalDecimal = (obj) => obj.toString();
|
|
82
92
|
export {
|
|
93
|
+
marshalDecimal,
|
|
83
94
|
marshalMoney,
|
|
84
95
|
marshalScwFile,
|
|
85
96
|
marshalTimeSeries,
|
|
86
97
|
marshalTimeSeriesPoint,
|
|
98
|
+
unmarshalDecimal,
|
|
87
99
|
unmarshalMoney,
|
|
88
100
|
unmarshalScwFile,
|
|
89
101
|
unmarshalServiceInfo,
|
|
@@ -63,3 +63,11 @@ export interface ScwFile {
|
|
|
63
63
|
/** Content of the file in base64. */
|
|
64
64
|
content: string;
|
|
65
65
|
}
|
|
66
|
+
/** A representation of a decimal value, such as 2.5.
|
|
67
|
+
* Comparable to language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal.
|
|
68
|
+
* Lookup protobuf google.type.Decimal for details */
|
|
69
|
+
export declare class Decimal {
|
|
70
|
+
private readonly str;
|
|
71
|
+
constructor(v: string);
|
|
72
|
+
toString: () => string;
|
|
73
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.38.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Scaleway SDK.",
|
|
6
6
|
"keywords": [
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"bundledDependencies": [
|
|
40
40
|
"@scaleway/random-name"
|
|
41
41
|
],
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "0135b074d0a36b62cd812851691b217e7383d499"
|
|
43
43
|
}
|