@scaleway/sdk 2.50.0 → 2.52.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 (91) hide show
  1. package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +1 -0
  2. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +1 -0
  3. package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +8 -0
  4. package/dist/api/baremetal/v1/index.gen.d.ts +1 -1
  5. package/dist/api/baremetal/v1/marshalling.gen.cjs +15 -1
  6. package/dist/api/baremetal/v1/marshalling.gen.js +15 -1
  7. package/dist/api/baremetal/v1/types.gen.d.ts +12 -3
  8. package/dist/api/block/v1alpha1/api.gen.cjs +3 -0
  9. package/dist/api/block/v1alpha1/api.gen.js +3 -0
  10. package/dist/api/container/v1beta1/index.gen.d.ts +1 -1
  11. package/dist/api/container/v1beta1/marshalling.gen.cjs +21 -0
  12. package/dist/api/container/v1beta1/marshalling.gen.js +21 -0
  13. package/dist/api/container/v1beta1/types.gen.d.ts +30 -2
  14. package/dist/api/container/v1beta1/validation-rules.gen.cjs +2 -0
  15. package/dist/api/container/v1beta1/validation-rules.gen.d.ts +1 -0
  16. package/dist/api/container/v1beta1/validation-rules.gen.js +2 -0
  17. package/dist/api/edge_services/v1alpha1/api.gen.cjs +27 -2
  18. package/dist/api/edge_services/v1alpha1/api.gen.d.ts +10 -3
  19. package/dist/api/edge_services/v1alpha1/api.gen.js +28 -3
  20. package/dist/api/edge_services/v1alpha1/index.gen.d.ts +1 -1
  21. package/dist/api/edge_services/v1alpha1/marshalling.gen.cjs +31 -0
  22. package/dist/api/edge_services/v1alpha1/marshalling.gen.d.ts +3 -1
  23. package/dist/api/edge_services/v1alpha1/marshalling.gen.js +31 -0
  24. package/dist/api/edge_services/v1alpha1/types.gen.d.ts +47 -9
  25. package/dist/api/iam/v1alpha1/api.gen.cjs +11 -0
  26. package/dist/api/iam/v1alpha1/api.gen.d.ts +2 -1
  27. package/dist/api/iam/v1alpha1/api.gen.js +12 -1
  28. package/dist/api/iam/v1alpha1/index.gen.d.ts +1 -1
  29. package/dist/api/iam/v1alpha1/marshalling.gen.cjs +6 -0
  30. package/dist/api/iam/v1alpha1/marshalling.gen.d.ts +2 -1
  31. package/dist/api/iam/v1alpha1/marshalling.gen.js +6 -0
  32. package/dist/api/iam/v1alpha1/types.gen.d.ts +25 -18
  33. package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +7 -0
  34. package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +6 -0
  35. package/dist/api/iam/v1alpha1/validation-rules.gen.js +8 -1
  36. package/dist/api/index.gen.d.ts +2 -1
  37. package/dist/api/inference/v1beta1/validation-rules.gen.cjs +1 -1
  38. package/dist/api/inference/v1beta1/validation-rules.gen.js +1 -1
  39. package/dist/api/instance/v1/api.gen.cjs +0 -37
  40. package/dist/api/instance/v1/api.gen.d.ts +1 -21
  41. package/dist/api/instance/v1/api.gen.js +1 -38
  42. package/dist/api/instance/v1/index.gen.d.ts +1 -1
  43. package/dist/api/instance/v1/marshalling.gen.cjs +1 -28
  44. package/dist/api/instance/v1/marshalling.gen.d.ts +1 -3
  45. package/dist/api/instance/v1/marshalling.gen.js +1 -28
  46. package/dist/api/instance/v1/types.gen.d.ts +9 -53
  47. package/dist/api/instance/v1/types.private.gen.d.ts +1 -3
  48. package/dist/api/jobs/v1alpha1/api.gen.cjs +13 -0
  49. package/dist/api/jobs/v1alpha1/api.gen.d.ts +8 -1
  50. package/dist/api/jobs/v1alpha1/api.gen.js +14 -1
  51. package/dist/api/jobs/v1alpha1/index.gen.d.ts +1 -1
  52. package/dist/api/jobs/v1alpha1/marshalling.gen.cjs +11 -0
  53. package/dist/api/jobs/v1alpha1/marshalling.gen.d.ts +2 -1
  54. package/dist/api/jobs/v1alpha1/marshalling.gen.js +11 -0
  55. package/dist/api/jobs/v1alpha1/types.gen.d.ts +10 -0
  56. package/dist/api/jobs/v1alpha1/validation-rules.gen.cjs +2 -2
  57. package/dist/api/jobs/v1alpha1/validation-rules.gen.js +2 -2
  58. package/dist/api/k8s/v1/api.gen.cjs +0 -16
  59. package/dist/api/k8s/v1/api.gen.d.ts +1 -9
  60. package/dist/api/k8s/v1/api.gen.js +0 -16
  61. package/dist/api/k8s/v1/index.gen.d.ts +1 -1
  62. package/dist/api/k8s/v1/types.gen.d.ts +0 -9
  63. package/dist/api/k8s/v1/validation-rules.gen.cjs +8 -16
  64. package/dist/api/k8s/v1/validation-rules.gen.d.ts +0 -8
  65. package/dist/api/k8s/v1/validation-rules.gen.js +8 -16
  66. package/dist/api/mongodb/index.gen.cjs +4 -0
  67. package/dist/api/mongodb/index.gen.d.ts +5 -0
  68. package/dist/api/mongodb/index.gen.js +4 -0
  69. package/dist/api/mongodb/v1alpha1/api.gen.cjs +393 -0
  70. package/dist/api/mongodb/v1alpha1/api.gen.d.ts +203 -0
  71. package/dist/api/mongodb/v1alpha1/api.gen.js +393 -0
  72. package/dist/api/mongodb/v1alpha1/content.gen.cjs +16 -0
  73. package/dist/api/mongodb/v1alpha1/content.gen.d.ts +5 -0
  74. package/dist/api/mongodb/v1alpha1/content.gen.js +16 -0
  75. package/dist/api/mongodb/v1alpha1/index.gen.cjs +9 -0
  76. package/dist/api/mongodb/v1alpha1/index.gen.d.ts +4 -0
  77. package/dist/api/mongodb/v1alpha1/index.gen.js +9 -0
  78. package/dist/api/mongodb/v1alpha1/marshalling.gen.cjs +327 -0
  79. package/dist/api/mongodb/v1alpha1/marshalling.gen.d.ts +19 -0
  80. package/dist/api/mongodb/v1alpha1/marshalling.gen.js +327 -0
  81. package/dist/api/mongodb/v1alpha1/types.gen.d.ts +461 -0
  82. package/dist/api/mongodb/v1alpha1/validation-rules.gen.cjs +147 -0
  83. package/dist/api/mongodb/v1alpha1/validation-rules.gen.d.ts +134 -0
  84. package/dist/api/mongodb/v1alpha1/validation-rules.gen.js +147 -0
  85. package/dist/api/webhosting/v1alpha1/types.gen.d.ts +1 -1
  86. package/dist/index.cjs +16 -14
  87. package/dist/index.js +16 -14
  88. package/dist/scw/constants.cjs +1 -1
  89. package/dist/scw/constants.d.ts +2 -2
  90. package/dist/scw/constants.js +1 -1
  91. package/package.json +2 -2
@@ -104,6 +104,7 @@ const unmarshalServer = (data) => {
104
104
  createdAt: marshalling.unmarshalDate(data.created_at),
105
105
  deletableAt: marshalling.unmarshalDate(data.deletable_at),
106
106
  deletionScheduled: data.deletion_scheduled,
107
+ delivered: data.delivered,
107
108
  id: data.id,
108
109
  ip: data.ip,
109
110
  name: data.name,
@@ -102,6 +102,7 @@ const unmarshalServer = (data) => {
102
102
  createdAt: unmarshalDate(data.created_at),
103
103
  deletableAt: unmarshalDate(data.deletable_at),
104
104
  deletionScheduled: data.deletion_scheduled,
105
+ delivered: data.delivered,
105
106
  id: data.id,
106
107
  ip: data.ip,
107
108
  name: data.name,
@@ -101,6 +101,14 @@ export interface Server {
101
101
  deletionScheduled: boolean;
102
102
  /** Zone of the server. */
103
103
  zone: Zone;
104
+ /**
105
+ * Set to true once the server has completed its provisioning steps and is
106
+ * ready to use. Some OS configurations might require a reinstallation of the
107
+ * server before delivery depending on the available stock. A reinstallation
108
+ * after the initial delivery will not change this flag and can be tracked
109
+ * using the server status.
110
+ */
111
+ delivered: boolean;
104
112
  }
105
113
  export type CreateServerRequest = {
106
114
  /** Zone to target. If none is passed will use default zone from the config. */
@@ -1,4 +1,4 @@
1
1
  export { API, PrivateNetworkAPI } from './api.gen';
2
2
  export * from './content.gen';
3
- export type { AddOptionServerRequest, BMCAccess, CPU, CertificationOption, CreateServerRequest, CreateServerRequestInstall, DeleteOptionServerRequest, DeleteServerRequest, Disk, GetBMCAccessRequest, GetDefaultPartitioningSchemaRequest, GetOSRequest, GetOfferRequest, GetOptionRequest, GetServerMetricsRequest, GetServerMetricsResponse, GetServerRequest, IP, IPReverseStatus, IPVersion, InstallServerRequest, LicenseOption, ListOSRequest, ListOSResponse, ListOffersRequest, ListOffersResponse, ListOptionsRequest, ListOptionsResponse, ListServerEventsRequest, ListServerEventsRequestOrderBy, ListServerEventsResponse, ListServerPrivateNetworksRequestOrderBy, ListServerPrivateNetworksResponse, ListServersRequest, ListServersRequestOrderBy, ListServersResponse, ListSettingsRequest, ListSettingsRequestOrderBy, ListSettingsResponse, Memory, OS, OSOSField, Offer, OfferOptionOffer, OfferStock, OfferSubscriptionPeriod, Option, PersistentMemory, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiDeleteServerPrivateNetworkRequest, PrivateNetworkApiListServerPrivateNetworksRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, PrivateNetworkOption, PublicBandwidthOption, RaidController, RebootServerRequest, RemoteAccessOption, Schema, SchemaDisk, SchemaFilesystem, SchemaFilesystemFormat, SchemaPartition, SchemaPartitionLabel, SchemaPool, SchemaPoolType, SchemaRAID, SchemaRAIDLevel, SchemaZFS, Server, ServerBootType, ServerEvent, ServerInstall, ServerInstallStatus, ServerOption, ServerOptionOptionStatus, ServerPingStatus, ServerPrivateNetwork, ServerPrivateNetworkStatus, ServerRescueServer, ServerStatus, SetServerPrivateNetworksResponse, Setting, SettingType, StartBMCAccessRequest, StartServerRequest, StopBMCAccessRequest, StopServerRequest, UpdateIPRequest, UpdateServerRequest, UpdateSettingRequest, ValidatePartitioningSchemaRequest, } from './types.gen';
3
+ export type { AddOptionServerRequest, BMCAccess, CPU, CertificationOption, CreateServerRequest, CreateServerRequestInstall, DeleteOptionServerRequest, DeleteServerRequest, Disk, GPU, GetBMCAccessRequest, GetDefaultPartitioningSchemaRequest, GetOSRequest, GetOfferRequest, GetOptionRequest, GetServerMetricsRequest, GetServerMetricsResponse, GetServerRequest, IP, IPReverseStatus, IPVersion, InstallServerRequest, LicenseOption, ListOSRequest, ListOSResponse, ListOffersRequest, ListOffersResponse, ListOptionsRequest, ListOptionsResponse, ListServerEventsRequest, ListServerEventsRequestOrderBy, ListServerEventsResponse, ListServerPrivateNetworksRequestOrderBy, ListServerPrivateNetworksResponse, ListServersRequest, ListServersRequestOrderBy, ListServersResponse, ListSettingsRequest, ListSettingsRequestOrderBy, ListSettingsResponse, Memory, OS, OSOSField, Offer, OfferOptionOffer, OfferStock, OfferSubscriptionPeriod, Option, PersistentMemory, PrivateNetworkApiAddServerPrivateNetworkRequest, PrivateNetworkApiDeleteServerPrivateNetworkRequest, PrivateNetworkApiListServerPrivateNetworksRequest, PrivateNetworkApiSetServerPrivateNetworksRequest, PrivateNetworkOption, PublicBandwidthOption, RaidController, RebootServerRequest, RemoteAccessOption, Schema, SchemaDisk, SchemaFilesystem, SchemaFilesystemFormat, SchemaPartition, SchemaPartitionLabel, SchemaPool, SchemaPoolType, SchemaRAID, SchemaRAIDLevel, SchemaZFS, Server, ServerBootType, ServerEvent, ServerInstall, ServerInstallStatus, ServerOption, ServerOptionOptionStatus, ServerPingStatus, ServerPrivateNetwork, ServerPrivateNetworkStatus, ServerRescueServer, ServerStatus, SetServerPrivateNetworksResponse, Setting, SettingType, StartBMCAccessRequest, StartServerRequest, StopBMCAccessRequest, StopServerRequest, UpdateIPRequest, UpdateServerRequest, UpdateSettingRequest, ValidatePartitioningSchemaRequest, } from './types.gen';
4
4
  export * as ValidationRules from './validation-rules.gen';
@@ -166,7 +166,9 @@ const unmarshalPrivateNetworkOption = (data) => {
166
166
  `Unmarshalling the type 'PrivateNetworkOption' failed as data isn't a dictionary.`
167
167
  );
168
168
  }
169
- return {};
169
+ return {
170
+ bandwidthInBps: data.bandwidth_in_bps
171
+ };
170
172
  };
171
173
  const unmarshalPublicBandwidthOption = (data) => {
172
174
  if (!json.isJSONObject(data)) {
@@ -211,6 +213,17 @@ const unmarshalDisk = (data) => {
211
213
  type: data.type
212
214
  };
213
215
  };
216
+ const unmarshalGPU = (data) => {
217
+ if (!json.isJSONObject(data)) {
218
+ throw new TypeError(
219
+ `Unmarshalling the type 'GPU' failed as data isn't a dictionary.`
220
+ );
221
+ }
222
+ return {
223
+ name: data.name,
224
+ vram: data.vram
225
+ };
226
+ };
214
227
  const unmarshalMemory = (data) => {
215
228
  if (!json.isJSONObject(data)) {
216
229
  throw new TypeError(
@@ -281,6 +294,7 @@ const unmarshalOffer = (data) => {
281
294
  disks: marshalling.unmarshalArrayOfObject(data.disks, unmarshalDisk),
282
295
  enable: data.enable,
283
296
  fee: data.fee ? customMarshalling.unmarshalMoney(data.fee) : void 0,
297
+ gpus: marshalling.unmarshalArrayOfObject(data.gpus, unmarshalGPU),
284
298
  id: data.id,
285
299
  incompatibleOsIds: data.incompatible_os_ids,
286
300
  maxBandwidth: data.max_bandwidth,
@@ -164,7 +164,9 @@ const unmarshalPrivateNetworkOption = (data) => {
164
164
  `Unmarshalling the type 'PrivateNetworkOption' failed as data isn't a dictionary.`
165
165
  );
166
166
  }
167
- return {};
167
+ return {
168
+ bandwidthInBps: data.bandwidth_in_bps
169
+ };
168
170
  };
169
171
  const unmarshalPublicBandwidthOption = (data) => {
170
172
  if (!isJSONObject(data)) {
@@ -209,6 +211,17 @@ const unmarshalDisk = (data) => {
209
211
  type: data.type
210
212
  };
211
213
  };
214
+ const unmarshalGPU = (data) => {
215
+ if (!isJSONObject(data)) {
216
+ throw new TypeError(
217
+ `Unmarshalling the type 'GPU' failed as data isn't a dictionary.`
218
+ );
219
+ }
220
+ return {
221
+ name: data.name,
222
+ vram: data.vram
223
+ };
224
+ };
212
225
  const unmarshalMemory = (data) => {
213
226
  if (!isJSONObject(data)) {
214
227
  throw new TypeError(
@@ -279,6 +292,7 @@ const unmarshalOffer = (data) => {
279
292
  disks: unmarshalArrayOfObject(data.disks, unmarshalDisk),
280
293
  enable: data.enable,
281
294
  fee: data.fee ? unmarshalMoney(data.fee) : void 0,
295
+ gpus: unmarshalArrayOfObject(data.gpus, unmarshalGPU),
282
296
  id: data.id,
283
297
  incompatibleOsIds: data.incompatible_os_ids,
284
298
  maxBandwidth: data.max_bandwidth,
@@ -53,6 +53,7 @@ export interface LicenseOption {
53
53
  osId: string;
54
54
  }
55
55
  export interface PrivateNetworkOption {
56
+ bandwidthInBps: number;
56
57
  }
57
58
  export interface PublicBandwidthOption {
58
59
  bandwidthInBps: number;
@@ -88,6 +89,12 @@ export interface Disk {
88
89
  /** Type of the disk. */
89
90
  type: string;
90
91
  }
92
+ export interface GPU {
93
+ /** Name of the GPU. */
94
+ name: string;
95
+ /** Capacity of the vram in bytes. */
96
+ vram: number;
97
+ }
91
98
  export interface Memory {
92
99
  /** Capacity of the memory in bytes. */
93
100
  capacity: number;
@@ -131,7 +138,7 @@ export interface OfferOptionOffer {
131
138
  */
132
139
  publicBandwidth?: PublicBandwidthOption;
133
140
  /**
134
- * Private_network option.
141
+ * Private_network option, contains the bandwidth_in_bps.
135
142
  *
136
143
  * One-of ('option'): at most one of 'license', 'publicBandwidth',
137
144
  * 'privateNetwork', 'remoteAccess', 'certification' could be set.
@@ -228,7 +235,7 @@ export interface ServerOption {
228
235
  */
229
236
  publicBandwidth?: PublicBandwidthOption;
230
237
  /**
231
- * Private_network option.
238
+ * Private_network option, contains the bandwidth_in_bps.
232
239
  *
233
240
  * One-of ('option'): at most one of 'license', 'publicBandwidth',
234
241
  * 'privateNetwork', 'remoteAccess', 'certification' could be set.
@@ -357,6 +364,8 @@ export interface Offer {
357
364
  sharedBandwidth: boolean;
358
365
  /** Array of tags attached to the offer. */
359
366
  tags: string[];
367
+ /** GPU specifications of the offer. */
368
+ gpus: GPU[];
360
369
  }
361
370
  export interface Option {
362
371
  /** ID of the option. */
@@ -380,7 +389,7 @@ export interface Option {
380
389
  */
381
390
  publicBandwidth?: PublicBandwidthOption;
382
391
  /**
383
- * Private_network option.
392
+ * Private_network option, contains the bandwidth_in_bps.
384
393
  *
385
394
  * One-of ('option'): at most one of 'license', 'publicBandwidth',
386
395
  * 'privateNetwork', 'remoteAccess', 'certification' could be set.
@@ -15,9 +15,12 @@ class API extends api.API {
15
15
  static LOCALITIES = [
16
16
  "fr-par-1",
17
17
  "fr-par-2",
18
+ "fr-par-3",
18
19
  "nl-ams-1",
19
20
  "nl-ams-2",
20
21
  "nl-ams-3",
22
+ "pl-waw-1",
23
+ "pl-waw-2",
21
24
  "pl-waw-3"
22
25
  ];
23
26
  pageOfListVolumeTypes = (request = {}) => this.client.fetch(
@@ -13,9 +13,12 @@ class API extends API$1 {
13
13
  static LOCALITIES = [
14
14
  "fr-par-1",
15
15
  "fr-par-2",
16
+ "fr-par-3",
16
17
  "nl-ams-1",
17
18
  "nl-ams-2",
18
19
  "nl-ams-3",
20
+ "pl-waw-1",
21
+ "pl-waw-2",
19
22
  "pl-waw-3"
20
23
  ];
21
24
  pageOfListVolumeTypes = (request = {}) => this.client.fetch(
@@ -1,4 +1,4 @@
1
1
  export { API } from './api.gen';
2
2
  export * from './content.gen';
3
- export type { Container, ContainerHttpOption, ContainerPrivacy, ContainerProtocol, ContainerSandbox, ContainerStatus, CreateContainerRequest, CreateCronRequest, CreateDomainRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, CreateTriggerRequestMnqNatsClientConfig, CreateTriggerRequestMnqSqsClientConfig, CreateTriggerRequestSqsClientConfig, Cron, CronStatus, DeleteContainerRequest, DeleteCronRequest, DeleteDomainRequest, DeleteNamespaceRequest, DeleteTokenRequest, DeleteTriggerRequest, DeployContainerRequest, Domain, DomainStatus, GetContainerRequest, GetCronRequest, GetDomainRequest, GetNamespaceRequest, GetTokenRequest, GetTriggerRequest, ListContainersRequest, ListContainersRequestOrderBy, ListContainersResponse, ListCronsRequest, ListCronsRequestOrderBy, ListCronsResponse, ListDomainsRequest, ListDomainsRequestOrderBy, ListDomainsResponse, ListNamespacesRequest, ListNamespacesRequestOrderBy, ListNamespacesResponse, ListTokensRequest, ListTokensRequestOrderBy, ListTokensResponse, ListTriggersRequest, ListTriggersRequestOrderBy, ListTriggersResponse, Namespace, NamespaceStatus, Secret, SecretHashedValue, Token, TokenStatus, Trigger, TriggerInputType, TriggerMnqNatsClientConfig, TriggerMnqSqsClientConfig, TriggerSqsClientConfig, TriggerStatus, UpdateContainerRequest, UpdateCronRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UpdateTriggerRequestSqsClientConfig, } from './types.gen';
3
+ export type { Container, ContainerHttpOption, ContainerPrivacy, ContainerProtocol, ContainerSandbox, ContainerScalingOption, ContainerStatus, CreateContainerRequest, CreateCronRequest, CreateDomainRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, CreateTriggerRequestMnqNatsClientConfig, CreateTriggerRequestMnqSqsClientConfig, CreateTriggerRequestSqsClientConfig, Cron, CronStatus, DeleteContainerRequest, DeleteCronRequest, DeleteDomainRequest, DeleteNamespaceRequest, DeleteTokenRequest, DeleteTriggerRequest, DeployContainerRequest, Domain, DomainStatus, GetContainerRequest, GetCronRequest, GetDomainRequest, GetNamespaceRequest, GetTokenRequest, GetTriggerRequest, ListContainersRequest, ListContainersRequestOrderBy, ListContainersResponse, ListCronsRequest, ListCronsRequestOrderBy, ListCronsResponse, ListDomainsRequest, ListDomainsRequestOrderBy, ListDomainsResponse, ListNamespacesRequest, ListNamespacesRequestOrderBy, ListNamespacesResponse, ListTokensRequest, ListTokensRequestOrderBy, ListTokensResponse, ListTriggersRequest, ListTriggersRequestOrderBy, ListTriggersResponse, Namespace, NamespaceStatus, Secret, SecretHashedValue, Token, TokenStatus, Trigger, TriggerInputType, TriggerMnqNatsClientConfig, TriggerMnqSqsClientConfig, TriggerSqsClientConfig, TriggerStatus, UpdateContainerRequest, UpdateCronRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UpdateTriggerRequestSqsClientConfig, } from './types.gen';
4
4
  export * as ValidationRules from './validation-rules.gen';
@@ -4,6 +4,16 @@ const randomName = require("@scaleway/random-name");
4
4
  const json = require("../../../helpers/json.cjs");
5
5
  const marshalling = require("../../../helpers/marshalling.cjs");
6
6
  require("../../../vendor/base64/index.cjs");
7
+ const unmarshalContainerScalingOption = (data) => {
8
+ if (!json.isJSONObject(data)) {
9
+ throw new TypeError(
10
+ `Unmarshalling the type 'ContainerScalingOption' failed as data isn't a dictionary.`
11
+ );
12
+ }
13
+ return {
14
+ concurrentRequestsThreshold: data.concurrent_requests_threshold
15
+ };
16
+ };
7
17
  const unmarshalSecretHashedValue = (data) => {
8
18
  if (!json.isJSONObject(data)) {
9
19
  throw new TypeError(
@@ -42,6 +52,7 @@ const unmarshalContainer = (data) => {
42
52
  region: data.region,
43
53
  registryImage: data.registry_image,
44
54
  sandbox: data.sandbox,
55
+ scalingOption: data.scaling_option ? unmarshalContainerScalingOption(data.scaling_option) : void 0,
45
56
  secretEnvironmentVariables: marshalling.unmarshalArrayOfObject(
46
57
  data.secret_environment_variables,
47
58
  unmarshalSecretHashedValue
@@ -246,6 +257,14 @@ const unmarshalListTriggersResponse = (data) => {
246
257
  triggers: marshalling.unmarshalArrayOfObject(data.triggers, unmarshalTrigger)
247
258
  };
248
259
  };
260
+ const marshalContainerScalingOption = (request, defaults) => ({
261
+ ...marshalling.resolveOneOf([
262
+ {
263
+ param: "concurrent_requests_threshold",
264
+ value: request.concurrentRequestsThreshold
265
+ }
266
+ ])
267
+ });
249
268
  const marshalSecret = (request, defaults) => ({
250
269
  key: request.key,
251
270
  value: request.value
@@ -267,6 +286,7 @@ const marshalCreateContainerRequest = (request, defaults) => ({
267
286
  protocol: request.protocol,
268
287
  registry_image: request.registryImage,
269
288
  sandbox: request.sandbox,
289
+ scaling_option: request.scalingOption !== void 0 ? marshalContainerScalingOption(request.scalingOption) : void 0,
270
290
  secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
271
291
  (elt) => marshalSecret(elt)
272
292
  ) : void 0,
@@ -357,6 +377,7 @@ const marshalUpdateContainerRequest = (request, defaults) => ({
357
377
  redeploy: request.redeploy,
358
378
  registry_image: request.registryImage,
359
379
  sandbox: request.sandbox,
380
+ scaling_option: request.scalingOption !== void 0 ? marshalContainerScalingOption(request.scalingOption) : void 0,
360
381
  secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
361
382
  (elt) => marshalSecret(elt)
362
383
  ) : void 0,
@@ -2,6 +2,16 @@ import randomName from "@scaleway/random-name";
2
2
  import { isJSONObject } from "../../../helpers/json.js";
3
3
  import { unmarshalArrayOfObject, unmarshalDate, resolveOneOf } from "../../../helpers/marshalling.js";
4
4
  import "../../../vendor/base64/index.js";
5
+ const unmarshalContainerScalingOption = (data) => {
6
+ if (!isJSONObject(data)) {
7
+ throw new TypeError(
8
+ `Unmarshalling the type 'ContainerScalingOption' failed as data isn't a dictionary.`
9
+ );
10
+ }
11
+ return {
12
+ concurrentRequestsThreshold: data.concurrent_requests_threshold
13
+ };
14
+ };
5
15
  const unmarshalSecretHashedValue = (data) => {
6
16
  if (!isJSONObject(data)) {
7
17
  throw new TypeError(
@@ -40,6 +50,7 @@ const unmarshalContainer = (data) => {
40
50
  region: data.region,
41
51
  registryImage: data.registry_image,
42
52
  sandbox: data.sandbox,
53
+ scalingOption: data.scaling_option ? unmarshalContainerScalingOption(data.scaling_option) : void 0,
43
54
  secretEnvironmentVariables: unmarshalArrayOfObject(
44
55
  data.secret_environment_variables,
45
56
  unmarshalSecretHashedValue
@@ -244,6 +255,14 @@ const unmarshalListTriggersResponse = (data) => {
244
255
  triggers: unmarshalArrayOfObject(data.triggers, unmarshalTrigger)
245
256
  };
246
257
  };
258
+ const marshalContainerScalingOption = (request, defaults) => ({
259
+ ...resolveOneOf([
260
+ {
261
+ param: "concurrent_requests_threshold",
262
+ value: request.concurrentRequestsThreshold
263
+ }
264
+ ])
265
+ });
247
266
  const marshalSecret = (request, defaults) => ({
248
267
  key: request.key,
249
268
  value: request.value
@@ -265,6 +284,7 @@ const marshalCreateContainerRequest = (request, defaults) => ({
265
284
  protocol: request.protocol,
266
285
  registry_image: request.registryImage,
267
286
  sandbox: request.sandbox,
287
+ scaling_option: request.scalingOption !== void 0 ? marshalContainerScalingOption(request.scalingOption) : void 0,
268
288
  secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
269
289
  (elt) => marshalSecret(elt)
270
290
  ) : void 0,
@@ -355,6 +375,7 @@ const marshalUpdateContainerRequest = (request, defaults) => ({
355
375
  redeploy: request.redeploy,
356
376
  registry_image: request.registryImage,
357
377
  sandbox: request.sandbox,
378
+ scaling_option: request.scalingOption !== void 0 ? marshalContainerScalingOption(request.scalingOption) : void 0,
358
379
  secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
359
380
  (elt) => marshalSecret(elt)
360
381
  ) : void 0,
@@ -16,6 +16,13 @@ export type NamespaceStatus = 'unknown' | 'ready' | 'deleting' | 'error' | 'lock
16
16
  export type TokenStatus = 'unknown' | 'ready' | 'deleting' | 'error' | 'creating';
17
17
  export type TriggerInputType = 'unknown_input_type' | 'sqs' | 'scw_sqs' | 'nats' | 'scw_nats';
18
18
  export type TriggerStatus = 'unknown_status' | 'ready' | 'deleting' | 'error' | 'creating' | 'pending';
19
+ export interface ContainerScalingOption {
20
+ /**
21
+ * One-of ('scalingRule'): at most one of 'concurrentRequestsThreshold' could
22
+ * be set.
23
+ */
24
+ concurrentRequestsThreshold?: number;
25
+ }
19
26
  export interface SecretHashedValue {
20
27
  key: string;
21
28
  hashedValue: string;
@@ -136,6 +143,13 @@ export interface Container {
136
143
  sandbox: ContainerSandbox;
137
144
  /** Local storage limit of the container (in MB). */
138
145
  localStorageLimit: number;
146
+ /**
147
+ * Possible values:
148
+ *
149
+ * - Concurrent_requests_threshold: Scale depending on the number of concurrent
150
+ * requests being processed per container instance.
151
+ */
152
+ scalingOption?: ContainerScalingOption;
139
153
  /** Region in which the container will be deployed. */
140
154
  region: Region;
141
155
  }
@@ -291,7 +305,7 @@ export type CreateContainerRequest = {
291
305
  * "rg.fr-par.scw.cloud/something/image:tag").
292
306
  */
293
307
  registryImage?: string;
294
- /** Number of maximum concurrent executions of the container. */
308
+ /** @deprecated Number of maximum concurrent executions of the container. */
295
309
  maxConcurrency?: number;
296
310
  /** Protocol the container uses. */
297
311
  protocol?: ContainerProtocol;
@@ -311,6 +325,13 @@ export type CreateContainerRequest = {
311
325
  sandbox?: ContainerSandbox;
312
326
  /** Local storage limit of the container (in MB). */
313
327
  localStorageLimit?: number;
328
+ /**
329
+ * Possible values:
330
+ *
331
+ * - Concurrent_requests_threshold: Scale depending on the number of concurrent
332
+ * requests being processed per container instance.
333
+ */
334
+ scalingOption?: ContainerScalingOption;
314
335
  };
315
336
  export type CreateCronRequest = {
316
337
  /**
@@ -715,7 +736,7 @@ export type UpdateContainerRequest = {
715
736
  * "rg.fr-par.scw.cloud/something/image:tag").
716
737
  */
717
738
  registryImage?: string;
718
- /** Number of maximum concurrent executions of the container. */
739
+ /** @deprecated Number of maximum concurrent executions of the container. */
719
740
  maxConcurrency?: number;
720
741
  protocol?: ContainerProtocol;
721
742
  port?: number;
@@ -732,6 +753,13 @@ export type UpdateContainerRequest = {
732
753
  sandbox?: ContainerSandbox;
733
754
  /** Local storage limit of the container (in MB). */
734
755
  localStorageLimit?: number;
756
+ /**
757
+ * Possible values:
758
+ *
759
+ * - Concurrent_requests_threshold: Scale depending on the number of concurrent
760
+ * requests being processed per container instance.
761
+ */
762
+ scalingOption?: ContainerScalingOption;
735
763
  };
736
764
  export type UpdateCronRequest = {
737
765
  /**
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const ContainerScalingOption = {};
3
4
  const CreateTriggerRequest = {
4
5
  description: {
5
6
  maxLength: 255
@@ -39,6 +40,7 @@ const UpdateTriggerRequest = {
39
40
  minLength: 1
40
41
  }
41
42
  };
43
+ exports.ContainerScalingOption = ContainerScalingOption;
42
44
  exports.CreateTriggerRequest = CreateTriggerRequest;
43
45
  exports.CreateTriggerRequestMnqNatsClientConfig = CreateTriggerRequestMnqNatsClientConfig;
44
46
  exports.CreateTriggerRequestMnqSqsClientConfig = CreateTriggerRequestMnqSqsClientConfig;
@@ -1,3 +1,4 @@
1
+ export declare const ContainerScalingOption: {};
1
2
  export declare const CreateTriggerRequest: {
2
3
  description: {
3
4
  maxLength: number;
@@ -1,3 +1,4 @@
1
+ const ContainerScalingOption = {};
1
2
  const CreateTriggerRequest = {
2
3
  description: {
3
4
  maxLength: 255
@@ -38,6 +39,7 @@ const UpdateTriggerRequest = {
38
39
  }
39
40
  };
40
41
  export {
42
+ ContainerScalingOption,
41
43
  CreateTriggerRequest,
42
44
  CreateTriggerRequestMnqNatsClientConfig,
43
45
  CreateTriggerRequestMnqSqsClientConfig,
@@ -87,6 +87,29 @@ class API extends api.API {
87
87
  request,
88
88
  options
89
89
  );
90
+ pageOfListPipelinesWithStages = (request = {}) => this.client.fetch(
91
+ {
92
+ method: "GET",
93
+ path: `/edge-services/v1alpha1/pipelines-stages`,
94
+ urlParams: marshalling.urlParams(
95
+ ["name", request.name],
96
+ ["order_by", request.orderBy],
97
+ ["organization_id", request.organizationId],
98
+ ["page", request.page],
99
+ [
100
+ "page_size",
101
+ request.pageSize ?? this.client.settings.defaultPageSize
102
+ ],
103
+ ["project_id", request.projectId]
104
+ )
105
+ },
106
+ marshalling_gen.unmarshalListPipelinesWithStagesResponse
107
+ );
108
+ listPipelinesWithStages = (request = {}) => resourcePaginator.enrichForPagination(
109
+ "pipelines",
110
+ this.pageOfListPipelinesWithStages,
111
+ request
112
+ );
90
113
  /**
91
114
  * Update pipeline. Update the parameters of an existing pipeline, specified
92
115
  * by its `pipeline_id`. Parameters which can be updated include the `name`,
@@ -625,8 +648,10 @@ class API extends api.API {
625
648
  path: `/edge-services/v1alpha1/current-plan/${marshalling.validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}`
626
649
  });
627
650
  /**
628
- * Gives information on current edge-services subscription plan and used
629
- * resources with associated price.
651
+ * Gives information on the currently selected Edge Services subscription
652
+ * plan, resource usage and associated billing information for this calendar
653
+ * month (including whether consumption falls within or exceeds the currently
654
+ * selected subscription plan.).
630
655
  *
631
656
  * @param request - The request {@link GetBillingRequest}
632
657
  * @returns A Promise of GetBillingResponse
@@ -1,6 +1,6 @@
1
1
  import { API as ParentAPI } from '../../../bridge';
2
2
  import type { WaitForOptions } from '../../../bridge';
3
- import type { BackendStage, CacheStage, CheckDomainRequest, CheckDomainResponse, CheckLbOriginRequest, CheckLbOriginResponse, CheckPEMChainRequest, CheckPEMChainResponse, CreateBackendStageRequest, CreateCacheStageRequest, CreateDNSStageRequest, CreatePipelineRequest, CreatePurgeRequestRequest, CreateTLSStageRequest, DNSStage, DeleteBackendStageRequest, DeleteCacheStageRequest, DeleteCurrentPlanRequest, DeleteDNSStageRequest, DeletePipelineRequest, DeleteTLSStageRequest, GetBackendStageRequest, GetBillingRequest, GetBillingResponse, GetCacheStageRequest, GetCurrentPlanRequest, GetDNSStageRequest, GetPipelineRequest, GetPurgeRequestRequest, GetTLSStageRequest, ListBackendStagesRequest, ListBackendStagesResponse, ListCacheStagesRequest, ListCacheStagesResponse, ListDNSStagesRequest, ListDNSStagesResponse, ListPipelinesRequest, ListPipelinesResponse, ListPlansResponse, ListPurgeRequestsRequest, ListPurgeRequestsResponse, ListTLSStagesRequest, ListTLSStagesResponse, Pipeline, Plan, PurgeRequest, SelectPlanRequest, TLSStage, UpdateBackendStageRequest, UpdateCacheStageRequest, UpdateDNSStageRequest, UpdatePipelineRequest, UpdateTLSStageRequest } from './types.gen';
3
+ import type { BackendStage, CacheStage, CheckDomainRequest, CheckDomainResponse, CheckLbOriginRequest, CheckLbOriginResponse, CheckPEMChainRequest, CheckPEMChainResponse, CreateBackendStageRequest, CreateCacheStageRequest, CreateDNSStageRequest, CreatePipelineRequest, CreatePurgeRequestRequest, CreateTLSStageRequest, DNSStage, DeleteBackendStageRequest, DeleteCacheStageRequest, DeleteCurrentPlanRequest, DeleteDNSStageRequest, DeletePipelineRequest, DeleteTLSStageRequest, GetBackendStageRequest, GetBillingRequest, GetBillingResponse, GetCacheStageRequest, GetCurrentPlanRequest, GetDNSStageRequest, GetPipelineRequest, GetPurgeRequestRequest, GetTLSStageRequest, ListBackendStagesRequest, ListBackendStagesResponse, ListCacheStagesRequest, ListCacheStagesResponse, ListDNSStagesRequest, ListDNSStagesResponse, ListPipelinesRequest, ListPipelinesResponse, ListPipelinesWithStagesRequest, ListPipelinesWithStagesResponse, ListPlansResponse, ListPurgeRequestsRequest, ListPurgeRequestsResponse, ListTLSStagesRequest, ListTLSStagesResponse, Pipeline, Plan, PurgeRequest, SelectPlanRequest, TLSStage, UpdateBackendStageRequest, UpdateCacheStageRequest, UpdateDNSStageRequest, UpdatePipelineRequest, UpdateTLSStageRequest } from './types.gen';
4
4
  /** Edge Services API. */
5
5
  export declare class API extends ParentAPI {
6
6
  protected pageOfListPipelines: (request?: Readonly<ListPipelinesRequest>) => Promise<ListPipelinesResponse>;
@@ -43,6 +43,11 @@ export declare class API extends ParentAPI {
43
43
  * @returns A Promise of Pipeline
44
44
  */
45
45
  waitForPipeline: (request: Readonly<GetPipelineRequest>, options?: Readonly<WaitForOptions<Pipeline>>) => Promise<Pipeline>;
46
+ protected pageOfListPipelinesWithStages: (request?: Readonly<ListPipelinesWithStagesRequest>) => Promise<ListPipelinesWithStagesResponse>;
47
+ listPipelinesWithStages: (request?: Readonly<ListPipelinesWithStagesRequest>) => Promise<ListPipelinesWithStagesResponse> & {
48
+ all: () => Promise<import("./types.gen").PipelineStages[]>;
49
+ [Symbol.asyncIterator]: () => AsyncGenerator<import("./types.gen").PipelineStages[], void, void>;
50
+ };
46
51
  /**
47
52
  * Update pipeline. Update the parameters of an existing pipeline, specified
48
53
  * by its `pipeline_id`. Parameters which can be updated include the `name`,
@@ -302,8 +307,10 @@ export declare class API extends ParentAPI {
302
307
  getCurrentPlan: (request?: Readonly<GetCurrentPlanRequest>) => Promise<Plan>;
303
308
  deleteCurrentPlan: (request?: Readonly<DeleteCurrentPlanRequest>) => Promise<void>;
304
309
  /**
305
- * Gives information on current edge-services subscription plan and used
306
- * resources with associated price.
310
+ * Gives information on the currently selected Edge Services subscription
311
+ * plan, resource usage and associated billing information for this calendar
312
+ * month (including whether consumption falls within or exceeds the currently
313
+ * selected subscription plan.).
307
314
  *
308
315
  * @param request - The request {@link GetBillingRequest}
309
316
  * @returns A Promise of GetBillingResponse
@@ -4,7 +4,7 @@ import { urlParams, validatePathParam } from "../../../helpers/marshalling.js";
4
4
  import "../../../vendor/base64/index.js";
5
5
  import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
6
6
  import { PIPELINE_TRANSIENT_STATUSES, PURGE_REQUEST_TRANSIENT_STATUSES } from "./content.gen.js";
7
- import { unmarshalListPipelinesResponse, marshalCreatePipelineRequest, unmarshalPipeline, marshalUpdatePipelineRequest, unmarshalListDNSStagesResponse, marshalCreateDNSStageRequest, unmarshalDNSStage, marshalUpdateDNSStageRequest, unmarshalListTLSStagesResponse, marshalCreateTLSStageRequest, unmarshalTLSStage, marshalUpdateTLSStageRequest, unmarshalListCacheStagesResponse, marshalCreateCacheStageRequest, unmarshalCacheStage, marshalUpdateCacheStageRequest, unmarshalListBackendStagesResponse, marshalCreateBackendStageRequest, unmarshalBackendStage, marshalUpdateBackendStageRequest, marshalCheckDomainRequest, unmarshalCheckDomainResponse, marshalCheckPEMChainRequest, unmarshalCheckPEMChainResponse, unmarshalListPurgeRequestsResponse, marshalCreatePurgeRequestRequest, unmarshalPurgeRequest, marshalCheckLbOriginRequest, unmarshalCheckLbOriginResponse, unmarshalListPlansResponse, marshalSelectPlanRequest, unmarshalPlan, unmarshalGetBillingResponse } from "./marshalling.gen.js";
7
+ import { unmarshalListPipelinesResponse, marshalCreatePipelineRequest, unmarshalPipeline, unmarshalListPipelinesWithStagesResponse, marshalUpdatePipelineRequest, unmarshalListDNSStagesResponse, marshalCreateDNSStageRequest, unmarshalDNSStage, marshalUpdateDNSStageRequest, unmarshalListTLSStagesResponse, marshalCreateTLSStageRequest, unmarshalTLSStage, marshalUpdateTLSStageRequest, unmarshalListCacheStagesResponse, marshalCreateCacheStageRequest, unmarshalCacheStage, marshalUpdateCacheStageRequest, unmarshalListBackendStagesResponse, marshalCreateBackendStageRequest, unmarshalBackendStage, marshalUpdateBackendStageRequest, marshalCheckDomainRequest, unmarshalCheckDomainResponse, marshalCheckPEMChainRequest, unmarshalCheckPEMChainResponse, unmarshalListPurgeRequestsResponse, marshalCreatePurgeRequestRequest, unmarshalPurgeRequest, marshalCheckLbOriginRequest, unmarshalCheckLbOriginResponse, unmarshalListPlansResponse, marshalSelectPlanRequest, unmarshalPlan, unmarshalGetBillingResponse } from "./marshalling.gen.js";
8
8
  const jsonContentHeaders = {
9
9
  "Content-Type": "application/json; charset=utf-8"
10
10
  };
@@ -85,6 +85,29 @@ class API extends API$1 {
85
85
  request,
86
86
  options
87
87
  );
88
+ pageOfListPipelinesWithStages = (request = {}) => this.client.fetch(
89
+ {
90
+ method: "GET",
91
+ path: `/edge-services/v1alpha1/pipelines-stages`,
92
+ urlParams: urlParams(
93
+ ["name", request.name],
94
+ ["order_by", request.orderBy],
95
+ ["organization_id", request.organizationId],
96
+ ["page", request.page],
97
+ [
98
+ "page_size",
99
+ request.pageSize ?? this.client.settings.defaultPageSize
100
+ ],
101
+ ["project_id", request.projectId]
102
+ )
103
+ },
104
+ unmarshalListPipelinesWithStagesResponse
105
+ );
106
+ listPipelinesWithStages = (request = {}) => enrichForPagination(
107
+ "pipelines",
108
+ this.pageOfListPipelinesWithStages,
109
+ request
110
+ );
88
111
  /**
89
112
  * Update pipeline. Update the parameters of an existing pipeline, specified
90
113
  * by its `pipeline_id`. Parameters which can be updated include the `name`,
@@ -623,8 +646,10 @@ class API extends API$1 {
623
646
  path: `/edge-services/v1alpha1/current-plan/${validatePathParam("projectId", request.projectId ?? this.client.settings.defaultProjectId)}`
624
647
  });
625
648
  /**
626
- * Gives information on current edge-services subscription plan and used
627
- * resources with associated price.
649
+ * Gives information on the currently selected Edge Services subscription
650
+ * plan, resource usage and associated billing information for this calendar
651
+ * month (including whether consumption falls within or exceeds the currently
652
+ * selected subscription plan.).
628
653
  *
629
654
  * @param request - The request {@link GetBillingRequest}
630
655
  * @returns A Promise of GetBillingResponse
@@ -1,3 +1,3 @@
1
1
  export { API } from './api.gen';
2
2
  export * from './content.gen';
3
- export type { BackendStage, CacheStage, CheckDomainRequest, CheckDomainResponse, CheckLbOriginRequest, CheckLbOriginResponse, CheckPEMChainRequest, CheckPEMChainRequestSecretChain, CheckPEMChainResponse, CreateBackendStageRequest, CreateCacheStageRequest, CreateDNSStageRequest, CreatePipelineRequest, CreatePurgeRequestRequest, CreateTLSStageRequest, DNSStage, DNSStageType, DeleteBackendStageRequest, DeleteCacheStageRequest, DeleteCurrentPlanRequest, DeleteDNSStageRequest, DeletePipelineRequest, DeleteTLSStageRequest, GetBackendStageRequest, GetBillingRequest, GetBillingResponse, GetCacheStageRequest, GetCurrentPlanRequest, GetDNSStageRequest, GetPipelineRequest, GetPurgeRequestRequest, GetTLSStageRequest, LbOriginError, ListBackendStagesRequest, ListBackendStagesRequestOrderBy, ListBackendStagesResponse, ListCacheStagesRequest, ListCacheStagesRequestOrderBy, ListCacheStagesResponse, ListDNSStagesRequest, ListDNSStagesRequestOrderBy, ListDNSStagesResponse, ListPipelinesRequest, ListPipelinesRequestOrderBy, ListPipelinesResponse, ListPlansResponse, ListPurgeRequestsRequest, ListPurgeRequestsRequestOrderBy, ListPurgeRequestsResponse, ListTLSStagesRequest, ListTLSStagesRequestOrderBy, ListTLSStagesResponse, Pipeline, PipelineError, PipelineErrorCode, PipelineErrorSeverity, PipelineErrorStage, PipelineErrorType, PipelineStatus, Plan, PlanDetails, PlanName, PurgeRequest, PurgeRequestStatus, ScalewayLb, ScalewayLbBackendConfig, ScalewayS3BackendConfig, SelectPlanRequest, TLSSecret, TLSSecretsConfig, TLSStage, UpdateBackendStageRequest, UpdateCacheStageRequest, UpdateDNSStageRequest, UpdatePipelineRequest, UpdateTLSStageRequest, } from './types.gen';
3
+ export type { BackendStage, CacheStage, CheckDomainRequest, CheckDomainResponse, CheckLbOriginRequest, CheckLbOriginResponse, CheckPEMChainRequest, CheckPEMChainRequestSecretChain, CheckPEMChainResponse, CreateBackendStageRequest, CreateCacheStageRequest, CreateDNSStageRequest, CreatePipelineRequest, CreatePurgeRequestRequest, CreateTLSStageRequest, DNSStage, DNSStageType, DeleteBackendStageRequest, DeleteCacheStageRequest, DeleteCurrentPlanRequest, DeleteDNSStageRequest, DeletePipelineRequest, DeleteTLSStageRequest, GetBackendStageRequest, GetBillingRequest, GetBillingResponse, GetCacheStageRequest, GetCurrentPlanRequest, GetDNSStageRequest, GetPipelineRequest, GetPurgeRequestRequest, GetTLSStageRequest, LbOriginError, ListBackendStagesRequest, ListBackendStagesRequestOrderBy, ListBackendStagesResponse, ListCacheStagesRequest, ListCacheStagesRequestOrderBy, ListCacheStagesResponse, ListDNSStagesRequest, ListDNSStagesRequestOrderBy, ListDNSStagesResponse, ListPipelinesRequest, ListPipelinesRequestOrderBy, ListPipelinesResponse, ListPipelinesWithStagesRequest, ListPipelinesWithStagesRequestOrderBy, ListPipelinesWithStagesResponse, ListPlansResponse, ListPurgeRequestsRequest, ListPurgeRequestsRequestOrderBy, ListPurgeRequestsResponse, ListTLSStagesRequest, ListTLSStagesRequestOrderBy, ListTLSStagesResponse, Pipeline, PipelineError, PipelineErrorCode, PipelineErrorSeverity, PipelineErrorStage, PipelineErrorType, PipelineStages, PipelineStatus, Plan, PlanDetails, PlanName, PurgeRequest, PurgeRequestStatus, ScalewayLb, ScalewayLbBackendConfig, ScalewayS3BackendConfig, SelectPlanRequest, TLSSecret, TLSSecretsConfig, TLSStage, UpdateBackendStageRequest, UpdateCacheStageRequest, UpdateDNSStageRequest, UpdatePipelineRequest, UpdateTLSStageRequest, } from './types.gen';
@@ -117,6 +117,7 @@ const unmarshalPipeline = (data) => {
117
117
  errors: marshalling.unmarshalArrayOfObject(data.errors, unmarshalPipelineError),
118
118
  id: data.id,
119
119
  name: data.name,
120
+ organizationId: data.organization_id,
120
121
  projectId: data.project_id,
121
122
  status: data.status,
122
123
  updatedAt: marshalling.unmarshalDate(data.updated_at)
@@ -152,6 +153,23 @@ const unmarshalTLSStage = (data) => {
152
153
  updatedAt: marshalling.unmarshalDate(data.updated_at)
153
154
  };
154
155
  };
156
+ const unmarshalPipelineStages = (data) => {
157
+ if (!json.isJSONObject(data)) {
158
+ throw new TypeError(
159
+ `Unmarshalling the type 'PipelineStages' failed as data isn't a dictionary.`
160
+ );
161
+ }
162
+ return {
163
+ backendStages: marshalling.unmarshalArrayOfObject(
164
+ data.backend_stages,
165
+ unmarshalBackendStage
166
+ ),
167
+ cacheStages: marshalling.unmarshalArrayOfObject(data.cache_stages, unmarshalCacheStage),
168
+ dnsStages: marshalling.unmarshalArrayOfObject(data.dns_stages, unmarshalDNSStage),
169
+ pipeline: data.pipeline ? unmarshalPipeline(data.pipeline) : void 0,
170
+ tlsStages: marshalling.unmarshalArrayOfObject(data.tls_stages, unmarshalTLSStage)
171
+ };
172
+ };
155
173
  const unmarshalPurgeRequest = (data) => {
156
174
  if (!json.isJSONObject(data)) {
157
175
  throw new TypeError(
@@ -272,6 +290,17 @@ const unmarshalListPipelinesResponse = (data) => {
272
290
  totalCount: data.total_count
273
291
  };
274
292
  };
293
+ const unmarshalListPipelinesWithStagesResponse = (data) => {
294
+ if (!json.isJSONObject(data)) {
295
+ throw new TypeError(
296
+ `Unmarshalling the type 'ListPipelinesWithStagesResponse' failed as data isn't a dictionary.`
297
+ );
298
+ }
299
+ return {
300
+ pipelines: marshalling.unmarshalArrayOfObject(data.pipelines, unmarshalPipelineStages),
301
+ totalCount: data.total_count
302
+ };
303
+ };
275
304
  const unmarshalListPlansResponse = (data) => {
276
305
  if (!json.isJSONObject(data)) {
277
306
  throw new TypeError(
@@ -483,10 +512,12 @@ exports.unmarshalListBackendStagesResponse = unmarshalListBackendStagesResponse;
483
512
  exports.unmarshalListCacheStagesResponse = unmarshalListCacheStagesResponse;
484
513
  exports.unmarshalListDNSStagesResponse = unmarshalListDNSStagesResponse;
485
514
  exports.unmarshalListPipelinesResponse = unmarshalListPipelinesResponse;
515
+ exports.unmarshalListPipelinesWithStagesResponse = unmarshalListPipelinesWithStagesResponse;
486
516
  exports.unmarshalListPlansResponse = unmarshalListPlansResponse;
487
517
  exports.unmarshalListPurgeRequestsResponse = unmarshalListPurgeRequestsResponse;
488
518
  exports.unmarshalListTLSStagesResponse = unmarshalListTLSStagesResponse;
489
519
  exports.unmarshalPipeline = unmarshalPipeline;
520
+ exports.unmarshalPipelineStages = unmarshalPipelineStages;
490
521
  exports.unmarshalPlan = unmarshalPlan;
491
522
  exports.unmarshalPurgeRequest = unmarshalPurgeRequest;
492
523
  exports.unmarshalTLSStage = unmarshalTLSStage;