@scaleway/sdk 2.0.0-alpha.9 → 2.0.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 (78) hide show
  1. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +12 -12
  2. package/dist/api/baremetal/v1/marshalling.gen.js +63 -52
  3. package/dist/api/billing/v2alpha1/api.gen.js +32 -1
  4. package/dist/api/billing/v2alpha1/marshalling.gen.js +46 -1
  5. package/dist/api/block/v1alpha1/api.gen.js +23 -19
  6. package/dist/api/block/v1alpha1/marshalling.gen.js +47 -40
  7. package/dist/api/block/v1alpha1/validation-rules.gen.js +11 -1
  8. package/dist/api/cockpit/v1beta1/api.gen.js +143 -48
  9. package/dist/api/cockpit/v1beta1/marshalling.gen.js +89 -36
  10. package/dist/api/container/v1beta1/index.gen.js +2 -0
  11. package/dist/api/container/v1beta1/marshalling.gen.js +63 -35
  12. package/dist/api/container/v1beta1/validation-rules.gen.js +44 -0
  13. package/dist/api/document_db/v1beta1/marshalling.gen.js +117 -61
  14. package/dist/api/domain/v2beta1/api.gen.js +29 -37
  15. package/dist/api/domain/v2beta1/index.gen.js +0 -2
  16. package/dist/api/domain/v2beta1/marshalling.gen.js +408 -194
  17. package/dist/api/flexibleip/v1alpha1/api.gen.js +6 -14
  18. package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +2 -2
  19. package/dist/api/function/v1beta1/api.gen.js +36 -0
  20. package/dist/api/function/v1beta1/index.gen.js +2 -0
  21. package/dist/api/function/v1beta1/marshalling.gen.js +64 -36
  22. package/dist/api/function/v1beta1/validation-rules.gen.js +44 -0
  23. package/dist/api/iam/v1alpha1/api.gen.js +54 -44
  24. package/dist/api/iam/v1alpha1/marshalling.gen.js +69 -34
  25. package/dist/api/iam/v1alpha1/validation-rules.gen.js +10 -1
  26. package/dist/api/instance/v1/api.gen.js +1 -1
  27. package/dist/api/instance/v1/content.gen.js +4 -1
  28. package/dist/api/instance/v1/index.js +1 -1
  29. package/dist/api/instance/v1/marshalling.gen.js +414 -205
  30. package/dist/api/iot/v1/api.gen.js +24 -32
  31. package/dist/api/iot/v1/marshalling.gen.js +87 -36
  32. package/dist/api/ipam/index.js +2 -0
  33. package/dist/api/ipam/v1/api.gen.js +113 -0
  34. package/dist/api/ipam/v1/index.gen.js +6 -0
  35. package/dist/api/ipam/v1/marshalling.gen.js +77 -0
  36. package/dist/api/ipam/v1/validation-rules.gen.js +11 -0
  37. package/dist/api/ipfs/v1alpha1/api.gen.js +120 -3
  38. package/dist/api/ipfs/v1alpha1/content.gen.js +4 -1
  39. package/dist/api/ipfs/v1alpha1/index.gen.js +2 -2
  40. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +71 -19
  41. package/dist/api/jobs/index.js +2 -0
  42. package/dist/api/jobs/v1alpha1/api.gen.js +111 -0
  43. package/dist/api/jobs/v1alpha1/content.gen.js +7 -0
  44. package/dist/api/jobs/v1alpha1/index.gen.js +7 -0
  45. package/dist/api/jobs/v1alpha1/marshalling.gen.js +84 -0
  46. package/dist/api/jobs/v1alpha1/validation-rules.gen.js +45 -0
  47. package/dist/api/k8s/v1/marshalling.gen.js +128 -40
  48. package/dist/api/lb/v1/api.gen.js +1 -1
  49. package/dist/api/lb/v1/marshalling.gen.js +268 -152
  50. package/dist/api/marketplace/v1/marshalling.gen.js +11 -11
  51. package/dist/api/marketplace/v2/api.gen.js +3 -3
  52. package/dist/api/mnq/index.js +2 -0
  53. package/dist/api/mnq/v1alpha1/api.gen.js +12 -20
  54. package/dist/api/mnq/v1alpha1/marshalling.gen.js +19 -14
  55. package/dist/api/mnq/v1beta1/api.gen.js +529 -0
  56. package/dist/api/mnq/v1beta1/index.gen.js +6 -0
  57. package/dist/api/mnq/v1beta1/marshalling.gen.js +212 -0
  58. package/dist/api/mnq/v1beta1/validation-rules.gen.js +77 -0
  59. package/dist/api/rdb/v1/marshalling.gen.js +131 -66
  60. package/dist/api/redis/v1/marshalling.gen.js +51 -27
  61. package/dist/api/registry/v1/marshalling.gen.js +6 -4
  62. package/dist/api/secret/v1alpha1/api.gen.js +2 -2
  63. package/dist/api/secret/v1alpha1/marshalling.gen.js +17 -5
  64. package/dist/api/std/index.gen.js +1 -0
  65. package/dist/api/tem/v1alpha1/api.gen.js +8 -2
  66. package/dist/api/tem/v1alpha1/marshalling.gen.js +35 -13
  67. package/dist/api/test/v1/marshalling.gen.js +5 -3
  68. package/dist/api/vpc/v2/marshalling.gen.js +2 -0
  69. package/dist/api/vpcgw/v1/marshalling.gen.js +53 -24
  70. package/dist/api/webhosting/v1alpha1/api.gen.js +2 -54
  71. package/dist/api/webhosting/v1alpha1/index.gen.js +1 -1
  72. package/dist/api/webhosting/v1alpha1/marshalling.gen.js +14 -41
  73. package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +1 -10
  74. package/dist/index.cjs +4351 -1833
  75. package/dist/index.d.ts +6778 -2542
  76. package/dist/index.js +34 -28
  77. package/dist/scw/constants.js +1 -1
  78. package/package.json +2 -2
@@ -3,24 +3,24 @@ import { unmarshalArrayOfObject, unmarshalDate } from '../../../helpers/marshall
3
3
 
4
4
  // This file was automatically generated. DO NOT EDIT.
5
5
  // If you have any remark or suggestion do not hesitate to open an issue.
6
- const unmarshalOrganization = data => {
6
+ const unmarshalLocalImage = data => {
7
7
  if (!isJSONObject(data)) {
8
- throw new TypeError(`Unmarshalling the type 'Organization' failed as data isn't a dictionary.`);
8
+ throw new TypeError(`Unmarshalling the type 'LocalImage' failed as data isn't a dictionary.`);
9
9
  }
10
10
  return {
11
+ arch: data.arch,
12
+ compatibleCommercialTypes: data.compatible_commercial_types,
11
13
  id: data.id,
12
- name: data.name
14
+ zone: data.zone
13
15
  };
14
16
  };
15
- const unmarshalLocalImage = data => {
17
+ const unmarshalOrganization = data => {
16
18
  if (!isJSONObject(data)) {
17
- throw new TypeError(`Unmarshalling the type 'LocalImage' failed as data isn't a dictionary.`);
19
+ throw new TypeError(`Unmarshalling the type 'Organization' failed as data isn't a dictionary.`);
18
20
  }
19
21
  return {
20
- arch: data.arch,
21
- compatibleCommercialTypes: data.compatible_commercial_types,
22
22
  id: data.id,
23
- zone: data.zone
23
+ name: data.name
24
24
  };
25
25
  };
26
26
  const unmarshalVersion = data => {
@@ -49,7 +49,7 @@ const unmarshalImage = data => {
49
49
  logo: data.logo,
50
50
  modificationDate: unmarshalDate(data.modification_date),
51
51
  name: data.name,
52
- organization: unmarshalOrganization(data.organization),
52
+ organization: data.organization ? unmarshalOrganization(data.organization) : undefined,
53
53
  validUntil: unmarshalDate(data.valid_until),
54
54
  versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
55
55
  };
@@ -59,7 +59,7 @@ const unmarshalGetImageResponse = data => {
59
59
  throw new TypeError(`Unmarshalling the type 'GetImageResponse' failed as data isn't a dictionary.`);
60
60
  }
61
61
  return {
62
- image: unmarshalImage(data.image)
62
+ image: data.image ? unmarshalImage(data.image) : undefined
63
63
  };
64
64
  };
65
65
  const unmarshalGetVersionResponse = data => {
@@ -67,7 +67,7 @@ const unmarshalGetVersionResponse = data => {
67
67
  throw new TypeError(`Unmarshalling the type 'GetVersionResponse' failed as data isn't a dictionary.`);
68
68
  }
69
69
  return {
70
- version: unmarshalVersion(data.version)
70
+ version: data.version ? unmarshalVersion(data.version) : undefined
71
71
  };
72
72
  };
73
73
  const unmarshalListImagesResponse = data => {
@@ -72,12 +72,12 @@ class API extends API$1 {
72
72
  urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['type', request.type], ['zone', request.zone], ...Object.entries(resolveOneOf([{
73
73
  param: 'image_id',
74
74
  value: request.imageId
75
- }, {
76
- param: 'image_label',
77
- value: request.imageLabel
78
75
  }, {
79
76
  param: 'version_id',
80
77
  value: request.versionId
78
+ }, {
79
+ param: 'image_label',
80
+ value: request.imageLabel
81
81
  }])))
82
82
  }, unmarshalListLocalImagesResponse);
83
83
  };
@@ -1,2 +1,4 @@
1
1
  import * as index_gen from './v1alpha1/index.gen.js';
2
2
  export { index_gen as v1alpha1 };
3
+ import * as index_gen$1 from './v1beta1/index.gen.js';
4
+ export { index_gen$1 as v1beta1 };
@@ -57,20 +57,12 @@ class API extends API$1 {
57
57
  * @param request - The request {@link CreateNamespaceRequest}
58
58
  * @returns A Promise of Namespace
59
59
  */
60
- createNamespace = (() => {
61
- var _this3 = this;
62
- return function (request) {
63
- if (request === void 0) {
64
- request = {};
65
- }
66
- return _this3.client.fetch({
67
- body: JSON.stringify(marshalCreateNamespaceRequest(request, _this3.client.settings)),
68
- headers: jsonContentHeaders,
69
- method: 'POST',
70
- path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/namespaces`
71
- }, unmarshalNamespace);
72
- };
73
- })();
60
+ createNamespace = request => this.client.fetch({
61
+ body: JSON.stringify(marshalCreateNamespaceRequest(request, this.client.settings)),
62
+ headers: jsonContentHeaders,
63
+ method: 'POST',
64
+ path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces`
65
+ }, unmarshalNamespace);
74
66
 
75
67
  /**
76
68
  * Update the name of a namespace. Update the name of a Messaging and Queuing
@@ -141,15 +133,15 @@ class API extends API$1 {
141
133
  path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
142
134
  });
143
135
  pageOfListCredentials = (() => {
144
- var _this4 = this;
136
+ var _this3 = this;
145
137
  return function (request) {
146
138
  if (request === void 0) {
147
139
  request = {};
148
140
  }
149
- return _this4.client.fetch({
141
+ return _this3.client.fetch({
150
142
  method: 'GET',
151
- path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? _this4.client.settings.defaultRegion)}/credentials`,
152
- urlParams: urlParams(['namespace_id', request.namespaceId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this4.client.settings.defaultPageSize])
143
+ path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/credentials`,
144
+ urlParams: urlParams(['namespace_id', request.namespaceId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize])
153
145
  }, unmarshalListCredentialsResponse);
154
146
  };
155
147
  })();
@@ -163,12 +155,12 @@ class API extends API$1 {
163
155
  * @returns A Promise of ListCredentialsResponse
164
156
  */
165
157
  listCredentials = (() => {
166
- var _this5 = this;
158
+ var _this4 = this;
167
159
  return function (request) {
168
160
  if (request === void 0) {
169
161
  request = {};
170
162
  }
171
- return enrichForPagination('credentials', _this5.pageOfListCredentials, request);
163
+ return enrichForPagination('credentials', _this4.pageOfListCredentials, request);
172
164
  };
173
165
  })();
174
166
 
@@ -24,27 +24,27 @@ const unmarshalPermissions = data => {
24
24
  throw new TypeError(`Unmarshalling the type 'Permissions' failed as data isn't a dictionary.`);
25
25
  }
26
26
  return {
27
- canManage: data.can_manage ? data.can_manage : undefined,
28
- canPublish: data.can_publish ? data.can_publish : undefined,
29
- canReceive: data.can_receive ? data.can_receive : undefined
27
+ canManage: data.can_manage,
28
+ canPublish: data.can_publish,
29
+ canReceive: data.can_receive
30
30
  };
31
31
  };
32
- const unmarshalCredentialSQSSNSCreds = data => {
32
+ const unmarshalCredentialNATSCredsFile = data => {
33
33
  if (!isJSONObject(data)) {
34
- throw new TypeError(`Unmarshalling the type 'CredentialSQSSNSCreds' failed as data isn't a dictionary.`);
34
+ throw new TypeError(`Unmarshalling the type 'CredentialNATSCredsFile' failed as data isn't a dictionary.`);
35
35
  }
36
36
  return {
37
- accessKey: data.access_key,
38
- permissions: unmarshalPermissions(data.permissions),
39
- secretKey: data.secret_key ? data.secret_key : undefined
37
+ content: data.content
40
38
  };
41
39
  };
42
- const unmarshalCredentialNATSCredsFile = data => {
40
+ const unmarshalCredentialSQSSNSCreds = data => {
43
41
  if (!isJSONObject(data)) {
44
- throw new TypeError(`Unmarshalling the type 'CredentialNATSCredsFile' failed as data isn't a dictionary.`);
42
+ throw new TypeError(`Unmarshalling the type 'CredentialSQSSNSCreds' failed as data isn't a dictionary.`);
45
43
  }
46
44
  return {
47
- content: data.content
45
+ accessKey: data.access_key,
46
+ permissions: data.permissions ? unmarshalPermissions(data.permissions) : undefined,
47
+ secretKey: data.secret_key
48
48
  };
49
49
  };
50
50
  const unmarshalCredential = data => {
@@ -66,7 +66,7 @@ const unmarshalCredentialSummarySQSSNSCreds = data => {
66
66
  }
67
67
  return {
68
68
  accessKey: data.access_key,
69
- permissions: unmarshalPermissions(data.permissions)
69
+ permissions: data.permissions ? unmarshalPermissions(data.permissions) : undefined
70
70
  };
71
71
  };
72
72
  const unmarshalCredentialSummary = data => {
@@ -99,10 +99,15 @@ const unmarshalListNamespacesResponse = data => {
99
99
  totalCount: data.total_count
100
100
  };
101
101
  };
102
+ const marshalPermissions = (request, defaults) => ({
103
+ can_manage: request.canManage,
104
+ can_publish: request.canPublish,
105
+ can_receive: request.canReceive
106
+ });
102
107
  const marshalCreateCredentialRequest = (request, defaults) => ({
103
108
  name: request.name || randomName('mnq'),
104
109
  namespace_id: request.namespaceId,
105
- permissions: request.permissions
110
+ permissions: request.permissions !== undefined ? marshalPermissions(request.permissions) : undefined
106
111
  });
107
112
  const marshalCreateNamespaceRequest = (request, defaults) => ({
108
113
  name: request.name || randomName('mnq'),
@@ -111,7 +116,7 @@ const marshalCreateNamespaceRequest = (request, defaults) => ({
111
116
  });
112
117
  const marshalUpdateCredentialRequest = (request, defaults) => ({
113
118
  name: request.name,
114
- permissions: request.permissions
119
+ permissions: request.permissions !== undefined ? marshalPermissions(request.permissions) : undefined
115
120
  });
116
121
  const marshalUpdateNamespaceRequest = (request, defaults) => ({
117
122
  name: request.name,