@scaleway/sdk 2.47.0 → 2.49.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.
Files changed (44) hide show
  1. package/dist/api/baremetal/v1/api.gen.cjs +33 -0
  2. package/dist/api/baremetal/v1/api.gen.d.ts +17 -1
  3. package/dist/api/baremetal/v1/api.gen.js +34 -1
  4. package/dist/api/baremetal/v1/index.gen.d.ts +1 -1
  5. package/dist/api/baremetal/v1/marshalling.gen.cjs +140 -0
  6. package/dist/api/baremetal/v1/marshalling.gen.d.ts +4 -1
  7. package/dist/api/baremetal/v1/marshalling.gen.js +140 -0
  8. package/dist/api/baremetal/v1/types.gen.d.ts +63 -0
  9. package/dist/api/billing/v2alpha1/marshalling.gen.cjs +1 -0
  10. package/dist/api/billing/v2alpha1/marshalling.gen.js +1 -0
  11. package/dist/api/billing/v2alpha1/types.gen.d.ts +2 -0
  12. package/dist/api/billing/v2beta1/marshalling.gen.cjs +1 -0
  13. package/dist/api/billing/v2beta1/marshalling.gen.js +1 -0
  14. package/dist/api/billing/v2beta1/types.gen.d.ts +2 -0
  15. package/dist/api/edge_services/v1alpha1/api.gen.cjs +29 -0
  16. package/dist/api/edge_services/v1alpha1/api.gen.d.ts +5 -1
  17. package/dist/api/edge_services/v1alpha1/api.gen.js +30 -1
  18. package/dist/api/edge_services/v1alpha1/index.gen.d.ts +1 -1
  19. package/dist/api/edge_services/v1alpha1/marshalling.gen.cjs +56 -16
  20. package/dist/api/edge_services/v1alpha1/marshalling.gen.d.ts +5 -2
  21. package/dist/api/edge_services/v1alpha1/marshalling.gen.js +56 -16
  22. package/dist/api/edge_services/v1alpha1/types.gen.d.ts +51 -28
  23. package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +3 -0
  24. package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +3 -0
  25. package/dist/api/iam/v1alpha1/validation-rules.gen.js +3 -0
  26. package/dist/api/instance/v1/api.gen.cjs +7 -8
  27. package/dist/api/instance/v1/api.gen.d.ts +8 -9
  28. package/dist/api/instance/v1/api.gen.js +7 -8
  29. package/dist/api/k8s/v1/marshalling.gen.cjs +1 -0
  30. package/dist/api/k8s/v1/marshalling.gen.js +1 -0
  31. package/dist/api/k8s/v1/types.gen.d.ts +2 -0
  32. package/dist/api/k8s/v1/validation-rules.gen.cjs +2 -4
  33. package/dist/api/k8s/v1/validation-rules.gen.d.ts +0 -2
  34. package/dist/api/k8s/v1/validation-rules.gen.js +2 -4
  35. package/dist/scw/constants.cjs +1 -1
  36. package/dist/scw/constants.d.ts +2 -2
  37. package/dist/scw/constants.js +1 -1
  38. package/dist/scw/custom-marshalling.cjs +19 -4
  39. package/dist/scw/custom-marshalling.d.ts +4 -2
  40. package/dist/scw/custom-marshalling.js +19 -4
  41. package/dist/scw/custom-types.cjs +1 -0
  42. package/dist/scw/custom-types.d.ts +1 -0
  43. package/dist/scw/custom-types.js +1 -0
  44. package/package.json +2 -2
@@ -188,15 +188,14 @@ class API extends API$1 {
188
188
  * and release the hypervisor slot. `stop_in_place`: Stop the Instance, but
189
189
  * keep the slot on the hypervisor. `reboot`: Stop the instance and restart
190
190
  * it. `backup`: Create an image with all the volumes of an Instance.
191
- * `terminate`: Delete the Instance along with all attached volumes.
192
- * `enable_routed_ip`: Migrate the Instance to the new network stack.
191
+ * `terminate`: Delete the Instance along with its attached volumes, except
192
+ * for SBS volumes. `enable_routed_ip`: Migrate the Instance to the new
193
+ * network stack.
193
194
  *
194
- * Keep in mind that terminating an Instance will result in the deletion of
195
- * all attached volumes, including local and block storage. If you want to
196
- * preserve your local volumes, you should use the `archive` action instead of
197
- * `terminate`. Similarly, if you want to keep your block storage volumes, you
198
- * must first detach them before issuing the `terminate` command. For more
199
- * information, read the [Volumes](#path-volumes-list-volumes) documentation.
195
+ * Keep in mind that `terminate` an Instance will result in the deletion of
196
+ * `l_ssd`, `b_ssd` and `scratch` volumes types, `sbs_volume` volumes type
197
+ * will only be detached. If you want to preserve your volumes, you should
198
+ * detach them before the Instance deletion or `terminate` action.
200
199
  *
201
200
  * @param request - The request {@link ServerActionRequest}
202
201
  * @returns A Promise of ServerActionResponse
@@ -139,6 +139,7 @@ const unmarshalCluster = (data) => {
139
139
  description: data.description,
140
140
  dnsWildcard: data.dns_wildcard,
141
141
  featureGates: data.feature_gates,
142
+ fullVpcIntegratonEnabled: data.full_vpc_integraton_enabled,
142
143
  id: data.id,
143
144
  name: data.name,
144
145
  openIdConnectConfig: data.open_id_connect_config ? unmarshalClusterOpenIDConnectConfig(data.open_id_connect_config) : void 0,
@@ -137,6 +137,7 @@ const unmarshalCluster = (data) => {
137
137
  description: data.description,
138
138
  dnsWildcard: data.dns_wildcard,
139
139
  featureGates: data.feature_gates,
140
+ fullVpcIntegratonEnabled: data.full_vpc_integraton_enabled,
140
141
  id: data.id,
141
142
  name: data.name,
142
143
  openIdConnectConfig: data.open_id_connect_config ? unmarshalClusterOpenIDConnectConfig(data.open_id_connect_config) : void 0,
@@ -450,6 +450,8 @@ export interface Cluster {
450
450
  * installed on the cluster.
451
451
  */
452
452
  sbsCsiEnabled?: boolean;
453
+ /** @deprecated Defines whether VPC is fully integrated on the cluster. */
454
+ fullVpcIntegratonEnabled?: boolean;
453
455
  }
454
456
  export interface Node {
455
457
  /** Node ID. */
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const CreateClusterRequest = {
4
4
  description: {
5
- maxLength: 4096,
6
- minLength: 1
5
+ maxLength: 4096
7
6
  },
8
7
  name: {
9
8
  maxLength: 100,
@@ -115,8 +114,7 @@ const SetClusterTypeRequest = {
115
114
  };
116
115
  const UpdateClusterRequest = {
117
116
  description: {
118
- maxLength: 4096,
119
- minLength: 1
117
+ maxLength: 4096
120
118
  },
121
119
  name: {
122
120
  maxLength: 100,
@@ -1,7 +1,6 @@
1
1
  export declare const CreateClusterRequest: {
2
2
  description: {
3
3
  maxLength: number;
4
- minLength: number;
5
4
  };
6
5
  name: {
7
6
  maxLength: number;
@@ -114,7 +113,6 @@ export declare const SetClusterTypeRequest: {
114
113
  export declare const UpdateClusterRequest: {
115
114
  description: {
116
115
  maxLength: number;
117
- minLength: number;
118
116
  };
119
117
  name: {
120
118
  maxLength: number;
@@ -1,7 +1,6 @@
1
1
  const CreateClusterRequest = {
2
2
  description: {
3
- maxLength: 4096,
4
- minLength: 1
3
+ maxLength: 4096
5
4
  },
6
5
  name: {
7
6
  maxLength: 100,
@@ -113,8 +112,7 @@ const SetClusterTypeRequest = {
113
112
  };
114
113
  const UpdateClusterRequest = {
115
114
  description: {
116
- maxLength: 4096,
117
- minLength: 1
115
+ maxLength: 4096
118
116
  },
119
117
  name: {
120
118
  maxLength: 100,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const version = "v2.46.0";
3
+ const version = "v2.48.0";
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.46.0";
2
- export declare const userAgent = "scaleway-sdk-js/v2.46.0";
1
+ export declare const version = "v2.48.0";
2
+ export declare const userAgent = "scaleway-sdk-js/v2.48.0";
@@ -1,4 +1,4 @@
1
- const version = "v2.46.0";
1
+ const version = "v2.48.0";
2
2
  const userAgent = `scaleway-sdk-js/${version}`;
3
3
  export {
4
4
  userAgent,
@@ -65,12 +65,25 @@ const unmarshalTimeSeries = (data) => {
65
65
  };
66
66
  };
67
67
  const unmarshalDecimal = (data) => {
68
- if (!(typeof data === "string")) {
68
+ if (!(typeof data === "object")) {
69
69
  throw new TypeError(
70
- `Unmarshalling the type 'Decimal' failed as data isn't a string.`
70
+ `Unmarshalling the type 'Decimal' failed as data isn't an object.`
71
71
  );
72
72
  }
73
- return new customTypes.Decimal(data);
73
+ if (data === null) {
74
+ return null;
75
+ }
76
+ if (!("value" in data)) {
77
+ throw new TypeError(
78
+ `Unmarshalling the type 'Decimal' failed as data object does not have a 'value' key.`
79
+ );
80
+ }
81
+ if (!(typeof data.value === "string")) {
82
+ throw new TypeError(
83
+ `Unmarshalling the type 'Decimal' failed as 'value' is not a string.`
84
+ );
85
+ }
86
+ return new customTypes.Decimal(data.value);
74
87
  };
75
88
  const marshalScwFile = (obj) => ({
76
89
  content: obj.content,
@@ -96,7 +109,9 @@ const marshalTimeSeries = (obj) => ({
96
109
  name: obj.name,
97
110
  points: obj.points.map((elt) => marshalTimeSeriesPoint(elt))
98
111
  });
99
- const marshalDecimal = (obj) => obj.toString();
112
+ const marshalDecimal = (obj) => ({
113
+ value: obj.toString()
114
+ });
100
115
  exports.marshalBlobToScwFile = marshalBlobToScwFile;
101
116
  exports.marshalDecimal = marshalDecimal;
102
117
  exports.marshalMoney = marshalMoney;
@@ -39,7 +39,7 @@ export declare const unmarshalTimeSeries: (data: unknown) => TimeSeries;
39
39
  *
40
40
  * @internal
41
41
  */
42
- export declare const unmarshalDecimal: (data: unknown) => Decimal;
42
+ export declare const unmarshalDecimal: (data: unknown) => Decimal | null;
43
43
  /**
44
44
  * Marshals {@link ScwFile}.
45
45
  *
@@ -75,4 +75,6 @@ export declare const marshalTimeSeries: (obj: TimeSeries) => Record<string, unkn
75
75
  *
76
76
  * @internal
77
77
  */
78
- export declare const marshalDecimal: (obj: Decimal) => string;
78
+ export declare const marshalDecimal: (obj: Decimal) => {
79
+ value: string;
80
+ };
@@ -63,12 +63,25 @@ const unmarshalTimeSeries = (data) => {
63
63
  };
64
64
  };
65
65
  const unmarshalDecimal = (data) => {
66
- if (!(typeof data === "string")) {
66
+ if (!(typeof data === "object")) {
67
67
  throw new TypeError(
68
- `Unmarshalling the type 'Decimal' failed as data isn't a string.`
68
+ `Unmarshalling the type 'Decimal' failed as data isn't an object.`
69
69
  );
70
70
  }
71
- return new Decimal(data);
71
+ if (data === null) {
72
+ return null;
73
+ }
74
+ if (!("value" in data)) {
75
+ throw new TypeError(
76
+ `Unmarshalling the type 'Decimal' failed as data object does not have a 'value' key.`
77
+ );
78
+ }
79
+ if (!(typeof data.value === "string")) {
80
+ throw new TypeError(
81
+ `Unmarshalling the type 'Decimal' failed as 'value' is not a string.`
82
+ );
83
+ }
84
+ return new Decimal(data.value);
72
85
  };
73
86
  const marshalScwFile = (obj) => ({
74
87
  content: obj.content,
@@ -94,7 +107,9 @@ const marshalTimeSeries = (obj) => ({
94
107
  name: obj.name,
95
108
  points: obj.points.map((elt) => marshalTimeSeriesPoint(elt))
96
109
  });
97
- const marshalDecimal = (obj) => obj.toString();
110
+ const marshalDecimal = (obj) => ({
111
+ value: obj.toString()
112
+ });
98
113
  export {
99
114
  marshalBlobToScwFile,
100
115
  marshalDecimal,
@@ -6,5 +6,6 @@ class Decimal {
6
6
  this.str = v;
7
7
  }
8
8
  toString = () => this.str;
9
+ marshal = () => ({ value: this.str });
9
10
  }
10
11
  exports.Decimal = Decimal;
@@ -70,4 +70,5 @@ export declare class Decimal {
70
70
  private readonly str;
71
71
  constructor(v: string);
72
72
  toString: () => string;
73
+ marshal: () => object;
73
74
  }
@@ -4,6 +4,7 @@ class Decimal {
4
4
  this.str = v;
5
5
  }
6
6
  toString = () => this.str;
7
+ marshal = () => ({ value: this.str });
7
8
  }
8
9
  export {
9
10
  Decimal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk",
3
- "version": "2.47.0",
3
+ "version": "2.49.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": "eb8e88c06b68e02187a7ef54e38885792e46d4cd"
42
+ "gitHead": "0ab8ab3769eca4e9be107caa8f51f5b8d5a71cb7"
43
43
  }