@scaleway/sdk 1.13.0 → 1.15.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 (50) hide show
  1. package/dist/api/account/v2/api.gen.js +77 -60
  2. package/dist/api/applesilicon/v1alpha1/api.gen.js +175 -173
  3. package/dist/api/baremetal/v1/api.gen.js +434 -378
  4. package/dist/api/baremetal/v1/api.utils.js +19 -22
  5. package/dist/api/billing/v2alpha1/api.gen.js +21 -17
  6. package/dist/api/cockpit/v1beta1/api.gen.js +308 -232
  7. package/dist/api/container/v1beta1/api.gen.js +384 -337
  8. package/dist/api/domain/v2beta1/api.gen.js +754 -668
  9. package/dist/api/flexibleip/v1alpha1/api.gen.js +164 -151
  10. package/dist/api/function/v1beta1/api.gen.js +467 -407
  11. package/dist/api/iam/v1alpha1/api.gen.js +641 -557
  12. package/dist/api/instance/v1/api.gen.js +802 -677
  13. package/dist/api/instance/v1/api.utils.js +337 -325
  14. package/dist/api/instance/v1/marshalling.gen.js +2 -1
  15. package/dist/api/iot/v1/api.gen.js +508 -452
  16. package/dist/api/ipfs/index.js +2 -0
  17. package/dist/api/ipfs/v1alpha1/api.gen.js +197 -0
  18. package/dist/api/ipfs/v1alpha1/content.gen.js +7 -0
  19. package/dist/api/ipfs/v1alpha1/index.gen.js +5 -0
  20. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +125 -0
  21. package/dist/api/k8s/v1/api.gen.js +403 -342
  22. package/dist/api/k8s/v1/api.utils.js +7 -10
  23. package/dist/api/k8s/v1/marshalling.gen.js +19 -1
  24. package/dist/api/k8s/v1/validation-rules.gen.js +10 -1
  25. package/dist/api/lb/v1/api.gen.js +1501 -1363
  26. package/dist/api/lb/v1/api.utils.js +71 -75
  27. package/dist/api/lb/v1/marshalling.gen.js +6 -0
  28. package/dist/api/marketplace/v1/api.gen.js +35 -32
  29. package/dist/api/marketplace/v2/api.gen.js +117 -102
  30. package/dist/api/mnq/v1alpha1/api.gen.js +154 -137
  31. package/dist/api/rdb/v1/api.gen.js +897 -819
  32. package/dist/api/redis/v1/api.gen.js +358 -333
  33. package/dist/api/registry/v1/api.gen.js +211 -189
  34. package/dist/api/secret/v1alpha1/api.gen.js +265 -245
  35. package/dist/api/secret/v1alpha1/marshalling.gen.js +1 -0
  36. package/dist/api/tem/v1alpha1/api.gen.js +183 -156
  37. package/dist/api/tem/v1alpha1/marshalling.gen.js +32 -1
  38. package/dist/api/test/v1/api.gen.js +116 -104
  39. package/dist/api/vpc/v1/api.gen.js +74 -65
  40. package/dist/api/vpc/v2/api.gen.js +200 -178
  41. package/dist/api/vpc/v2/marshalling.gen.js +2 -0
  42. package/dist/api/vpcgw/v1/api.gen.js +575 -501
  43. package/dist/api/webhosting/v1alpha1/api.gen.js +127 -117
  44. package/dist/index.cjs +738 -343
  45. package/dist/index.d.ts +2067 -1592
  46. package/dist/index.js +28 -26
  47. package/dist/internal/logger/console-logger.js +4 -5
  48. package/dist/scw/constants.js +1 -1
  49. package/dist/scw/errors/scw-error.js +0 -1
  50. package/package.json +2 -2
@@ -16,11 +16,11 @@ const jsonContentHeaders = {
16
16
  * Messaging and Queuing API.
17
17
  */
18
18
  class API extends API$1 {
19
- constructor() {
20
- var _this;
21
- super(...arguments);
22
- _this = this;
23
- this.pageOfListNamespaces = function (request) {
19
+ /** Lists the available regions of the API. */
20
+ static LOCALITIES = ['fr-par'];
21
+ pageOfListNamespaces = (() => {
22
+ var _this = this;
23
+ return function (request) {
24
24
  if (request === void 0) {
25
25
  request = {};
26
26
  }
@@ -30,152 +30,169 @@ class API extends API$1 {
30
30
  urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId])
31
31
  }, unmarshalListNamespacesResponse);
32
32
  };
33
- /**
34
- * List namespaces. List all Messaging and Queuing namespaces in the specified
35
- * region, for a Scaleway Organization or Project. By default, the namespaces
36
- * returned in the list are ordered by creation date in ascending order,
37
- * though this can be modified via the `order_by` field.
38
- *
39
- * @param request - The request {@link ListNamespacesRequest}
40
- * @returns A Promise of ListNamespacesResponse
41
- */
42
- this.listNamespaces = function (request) {
33
+ })();
34
+
35
+ /**
36
+ * List namespaces. List all Messaging and Queuing namespaces in the specified
37
+ * region, for a Scaleway Organization or Project. By default, the namespaces
38
+ * returned in the list are ordered by creation date in ascending order,
39
+ * though this can be modified via the `order_by` field.
40
+ *
41
+ * @param request - The request {@link ListNamespacesRequest}
42
+ * @returns A Promise of ListNamespacesResponse
43
+ */
44
+ listNamespaces = (() => {
45
+ var _this2 = this;
46
+ return function (request) {
43
47
  if (request === void 0) {
44
48
  request = {};
45
49
  }
46
- return enrichForPagination('namespaces', _this.pageOfListNamespaces, request);
50
+ return enrichForPagination('namespaces', _this2.pageOfListNamespaces, request);
47
51
  };
48
- /**
49
- * Create a namespace. Create a Messaging and Queuing namespace, set to the
50
- * desired protocol.
51
- *
52
- * @param request - The request {@link CreateNamespaceRequest}
53
- * @returns A Promise of Namespace
54
- */
55
- this.createNamespace = request => this.client.fetch({
56
- body: JSON.stringify(marshalCreateNamespaceRequest(request, this.client.settings)),
57
- headers: jsonContentHeaders,
58
- method: 'POST',
59
- path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces`
60
- }, unmarshalNamespace);
61
- /**
62
- * Update the name of a namespace. Update the name of a Messaging and Queuing
63
- * namespace, specified by its namespace ID.
64
- *
65
- * @param request - The request {@link UpdateNamespaceRequest}
66
- * @returns A Promise of Namespace
67
- */
68
- this.updateNamespace = request => this.client.fetch({
69
- body: JSON.stringify(marshalUpdateNamespaceRequest(request, this.client.settings)),
70
- headers: jsonContentHeaders,
71
- method: 'PATCH',
72
- path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces`
73
- }, unmarshalNamespace);
74
- /**
75
- * Get a namespace. Retrieve information about an existing Messaging and
76
- * Queuing namespace, identified by its namespace ID. Its full details,
77
- * including name, endpoint and protocol, are returned in the response.
78
- *
79
- * @param request - The request {@link GetNamespaceRequest}
80
- * @returns A Promise of Namespace
81
- */
82
- this.getNamespace = request => this.client.fetch({
83
- method: 'GET',
84
- path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
85
- }, unmarshalNamespace);
86
- /**
87
- * Delete a namespace. Delete a Messaging and Queuing namespace, specified by
88
- * its namespace ID. Note that deleting a namespace is irreversible, and any
89
- * URLs, credentials and queued messages belonging to this namespace will also
90
- * be deleted.
91
- *
92
- * @param request - The request {@link DeleteNamespaceRequest}
93
- */
94
- this.deleteNamespace = request => this.client.fetch({
95
- method: 'DELETE',
96
- path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
97
- });
98
- /**
99
- * Create credentials. Create a set of credentials for a Messaging and Queuing
100
- * namespace, specified by its namespace ID. If creating credentials for a
101
- * NATS namespace, the `permissions` object must not be included in the
102
- * request. If creating credentials for an SQS/SNS namespace, the
103
- * `permissions` object is required, with all three of its child attributes.
104
- *
105
- * @param request - The request {@link CreateCredentialRequest}
106
- * @returns A Promise of Credential
107
- */
108
- this.createCredential = request => this.client.fetch({
109
- body: JSON.stringify(marshalCreateCredentialRequest(request, this.client.settings)),
110
- headers: jsonContentHeaders,
111
- method: 'POST',
112
- path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials`
113
- }, unmarshalCredential);
114
- /**
115
- * Delete credentials. Delete a set of credentials, specified by their
116
- * credential ID. Deleting credentials is irreversible and cannot be undone.
117
- * The credentials can no longer be used to access the namespace.
118
- *
119
- * @param request - The request {@link DeleteCredentialRequest}
120
- */
121
- this.deleteCredential = request => this.client.fetch({
122
- method: 'DELETE',
123
- path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
124
- });
125
- this.pageOfListCredentials = function (request) {
52
+ })();
53
+
54
+ /**
55
+ * Create a namespace. Create a Messaging and Queuing namespace, set to the
56
+ * desired protocol.
57
+ *
58
+ * @param request - The request {@link CreateNamespaceRequest}
59
+ * @returns A Promise of Namespace
60
+ */
61
+ createNamespace = request => this.client.fetch({
62
+ body: JSON.stringify(marshalCreateNamespaceRequest(request, this.client.settings)),
63
+ headers: jsonContentHeaders,
64
+ method: 'POST',
65
+ path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces`
66
+ }, unmarshalNamespace);
67
+
68
+ /**
69
+ * Update the name of a namespace. Update the name of a Messaging and Queuing
70
+ * namespace, specified by its namespace ID.
71
+ *
72
+ * @param request - The request {@link UpdateNamespaceRequest}
73
+ * @returns A Promise of Namespace
74
+ */
75
+ updateNamespace = request => this.client.fetch({
76
+ body: JSON.stringify(marshalUpdateNamespaceRequest(request, this.client.settings)),
77
+ headers: jsonContentHeaders,
78
+ method: 'PATCH',
79
+ path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces`
80
+ }, unmarshalNamespace);
81
+
82
+ /**
83
+ * Get a namespace. Retrieve information about an existing Messaging and
84
+ * Queuing namespace, identified by its namespace ID. Its full details,
85
+ * including name, endpoint and protocol, are returned in the response.
86
+ *
87
+ * @param request - The request {@link GetNamespaceRequest}
88
+ * @returns A Promise of Namespace
89
+ */
90
+ getNamespace = request => this.client.fetch({
91
+ method: 'GET',
92
+ path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
93
+ }, unmarshalNamespace);
94
+
95
+ /**
96
+ * Delete a namespace. Delete a Messaging and Queuing namespace, specified by
97
+ * its namespace ID. Note that deleting a namespace is irreversible, and any
98
+ * URLs, credentials and queued messages belonging to this namespace will also
99
+ * be deleted.
100
+ *
101
+ * @param request - The request {@link DeleteNamespaceRequest}
102
+ */
103
+ deleteNamespace = request => this.client.fetch({
104
+ method: 'DELETE',
105
+ path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
106
+ });
107
+
108
+ /**
109
+ * Create credentials. Create a set of credentials for a Messaging and Queuing
110
+ * namespace, specified by its namespace ID. If creating credentials for a
111
+ * NATS namespace, the `permissions` object must not be included in the
112
+ * request. If creating credentials for an SQS/SNS namespace, the
113
+ * `permissions` object is required, with all three of its child attributes.
114
+ *
115
+ * @param request - The request {@link CreateCredentialRequest}
116
+ * @returns A Promise of Credential
117
+ */
118
+ createCredential = request => this.client.fetch({
119
+ body: JSON.stringify(marshalCreateCredentialRequest(request, this.client.settings)),
120
+ headers: jsonContentHeaders,
121
+ method: 'POST',
122
+ path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials`
123
+ }, unmarshalCredential);
124
+
125
+ /**
126
+ * Delete credentials. Delete a set of credentials, specified by their
127
+ * credential ID. Deleting credentials is irreversible and cannot be undone.
128
+ * The credentials can no longer be used to access the namespace.
129
+ *
130
+ * @param request - The request {@link DeleteCredentialRequest}
131
+ */
132
+ deleteCredential = request => this.client.fetch({
133
+ method: 'DELETE',
134
+ path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
135
+ });
136
+ pageOfListCredentials = (() => {
137
+ var _this3 = this;
138
+ return function (request) {
126
139
  if (request === void 0) {
127
140
  request = {};
128
141
  }
129
- return _this.client.fetch({
142
+ return _this3.client.fetch({
130
143
  method: 'GET',
131
- path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/credentials`,
132
- urlParams: urlParams(['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'id_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize])
144
+ path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/credentials`,
145
+ urlParams: urlParams(['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'id_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize])
133
146
  }, unmarshalListCredentialsResponse);
134
147
  };
135
- /**
136
- * List credentials. List existing credentials in the specified region. The
137
- * response contains only the metadata for the credentials, not the
138
- * credentials themselves (for this, use **Get Credentials**).
139
- *
140
- * @param request - The request {@link ListCredentialsRequest}
141
- * @returns A Promise of ListCredentialsResponse
142
- */
143
- this.listCredentials = function (request) {
148
+ })();
149
+
150
+ /**
151
+ * List credentials. List existing credentials in the specified region. The
152
+ * response contains only the metadata for the credentials, not the
153
+ * credentials themselves (for this, use **Get Credentials**).
154
+ *
155
+ * @param request - The request {@link ListCredentialsRequest}
156
+ * @returns A Promise of ListCredentialsResponse
157
+ */
158
+ listCredentials = (() => {
159
+ var _this4 = this;
160
+ return function (request) {
144
161
  if (request === void 0) {
145
162
  request = {};
146
163
  }
147
- return enrichForPagination('credentials', _this.pageOfListCredentials, request);
164
+ return enrichForPagination('credentials', _this4.pageOfListCredentials, request);
148
165
  };
149
- /**
150
- * Update credentials. Update a set of credentials. You can update the
151
- * credentials' name, or (in the case of SQS/SNS credentials only) their
152
- * permissions. To update the name of NATS credentials, do not include the
153
- * `permissions` object in your request.
154
- *
155
- * @param request - The request {@link UpdateCredentialRequest}
156
- * @returns A Promise of Credential
157
- */
158
- this.updateCredential = request => this.client.fetch({
159
- body: JSON.stringify(marshalUpdateCredentialRequest(request, this.client.settings)),
160
- headers: jsonContentHeaders,
161
- method: 'PATCH',
162
- path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
163
- }, unmarshalCredential);
164
- /**
165
- * Get credentials. Retrieve an existing set of credentials, identified by the
166
- * `credential_id`. The credentials themselves, as well as their metadata
167
- * (protocol, namespace ID etc), are returned in the response.
168
- *
169
- * @param request - The request {@link GetCredentialRequest}
170
- * @returns A Promise of Credential
171
- */
172
- this.getCredential = request => this.client.fetch({
173
- method: 'GET',
174
- path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
175
- }, unmarshalCredential);
176
- }
177
- /** Lists the available regions of the API. */
166
+ })();
167
+
168
+ /**
169
+ * Update credentials. Update a set of credentials. You can update the
170
+ * credentials' name, or (in the case of SQS/SNS credentials only) their
171
+ * permissions. To update the name of NATS credentials, do not include the
172
+ * `permissions` object in your request.
173
+ *
174
+ * @param request - The request {@link UpdateCredentialRequest}
175
+ * @returns A Promise of Credential
176
+ */
177
+ updateCredential = request => this.client.fetch({
178
+ body: JSON.stringify(marshalUpdateCredentialRequest(request, this.client.settings)),
179
+ headers: jsonContentHeaders,
180
+ method: 'PATCH',
181
+ path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
182
+ }, unmarshalCredential);
183
+
184
+ /**
185
+ * Get credentials. Retrieve an existing set of credentials, identified by the
186
+ * `credential_id`. The credentials themselves, as well as their metadata
187
+ * (protocol, namespace ID etc), are returned in the response.
188
+ *
189
+ * @param request - The request {@link GetCredentialRequest}
190
+ * @returns A Promise of Credential
191
+ */
192
+ getCredential = request => this.client.fetch({
193
+ method: 'GET',
194
+ path: `/mnq/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/credentials/${validatePathParam('credentialId', request.credentialId)}`
195
+ }, unmarshalCredential);
178
196
  }
179
- API.LOCALITIES = ['fr-par'];
180
197
 
181
198
  export { API };