@scaleway/sdk 2.38.0 → 2.39.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.
@@ -95,6 +95,7 @@ export type CreateJobDefinitionRequest = {
95
95
  description: string;
96
96
  /** Timeout of the job in seconds. */
97
97
  jobTimeout?: string;
98
+ /** Configure a cron for the job. */
98
99
  cronSchedule?: CreateJobDefinitionRequestCronScheduleConfig;
99
100
  };
100
101
  export type DeleteJobDefinitionRequest = {
@@ -123,7 +123,8 @@ class API extends api.API {
123
123
  ],
124
124
  ["prefix", request.prefix],
125
125
  ["project_id", request.projectId],
126
- ["tags", request.tags]
126
+ ["tags", request.tags],
127
+ ["type", request.type]
127
128
  )
128
129
  },
129
130
  marshalling_gen.unmarshalBrowseSecretsResponse
@@ -121,7 +121,8 @@ class API extends API$1 {
121
121
  ],
122
122
  ["prefix", request.prefix],
123
123
  ["project_id", request.projectId],
124
- ["tags", request.tags]
124
+ ["tags", request.tags],
125
+ ["type", request.type]
125
126
  )
126
127
  },
127
128
  unmarshalBrowseSecretsResponse
@@ -206,6 +206,8 @@ export type BrowseSecretsRequest = {
206
206
  pageSize?: number;
207
207
  /** Filter secrets by tags. */
208
208
  tags?: string[];
209
+ /** Filter by secret type (optional). */
210
+ type?: SecretType;
209
211
  };
210
212
  export interface BrowseSecretsResponse {
211
213
  /** Repeated item of type secret or folder, sorted by the request parameter. */
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,
@@ -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';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const version = "v2.37.0";
3
+ const version = "v2.38.1";
4
4
  const userAgent = `scaleway-sdk-js/${version}`;
5
5
  exports.userAgent = userAgent;
6
6
  exports.version = version;
@@ -1,2 +1,2 @@
1
- export declare const version = "v2.37.0";
2
- export declare const userAgent = "scaleway-sdk-js/v2.37.0";
1
+ export declare const version = "v2.38.1";
2
+ export declare const userAgent = "scaleway-sdk-js/v2.38.1";
@@ -1,4 +1,4 @@
1
- const version = "v2.37.0";
1
+ const version = "v2.38.1";
2
2
  const userAgent = `scaleway-sdk-js/${version}`;
3
3
  export {
4
4
  userAgent,
@@ -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,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,
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ class Decimal {
4
+ str;
5
+ constructor(v) {
6
+ this.str = v;
7
+ }
8
+ toString = () => this.str;
9
+ }
10
+ exports.Decimal = Decimal;
@@ -0,0 +1,10 @@
1
+ class Decimal {
2
+ str;
3
+ constructor(v) {
4
+ this.str = v;
5
+ }
6
+ toString = () => this.str;
7
+ }
8
+ export {
9
+ Decimal
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk",
3
- "version": "2.38.0",
3
+ "version": "2.39.0",
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": "21d0735f42beb56422452c9cf68095a212c94dc8"
42
+ "gitHead": "617534d45cefae7ee565ef849b60d16cdda339f6"
43
43
  }