@scaleway/sdk 2.20.0 → 2.21.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.
- package/dist/api/container/v1beta1/api.gen.js +1 -19
- package/dist/api/container/v1beta1/marshalling.gen.js +1 -23
- package/dist/api/domain/v2beta1/marshalling.gen.js +3 -0
- package/dist/api/function/v1beta1/api.gen.js +1 -19
- package/dist/api/function/v1beta1/marshalling.gen.js +1 -23
- package/dist/api/marketplace/index.js +2 -4
- package/dist/api/tem/v1alpha1/marshalling.gen.js +18 -0
- package/dist/index.cjs +134 -303
- package/dist/index.d.ts +707 -873
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
- package/dist/api/marketplace/v1/api.gen.js +0 -36
- package/dist/api/marketplace/v1/index.gen.js +0 -4
- package/dist/api/marketplace/v1/marshalling.gen.js +0 -75
|
@@ -3,7 +3,7 @@ import { API as API$1 } from '../../../scw/api.js';
|
|
|
3
3
|
import { validatePathParam, urlParams, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
4
4
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
5
|
import { NAMESPACE_TRANSIENT_STATUSES, CONTAINER_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES, TRIGGER_TRANSIENT_STATUSES } from './content.gen.js';
|
|
6
|
-
import { unmarshalListNamespacesResponse, unmarshalNamespace, marshalCreateNamespaceRequest, marshalUpdateNamespaceRequest, unmarshalListContainersResponse, unmarshalContainer, marshalCreateContainerRequest, marshalUpdateContainerRequest, unmarshalListCronsResponse, unmarshalCron, marshalCreateCronRequest, marshalUpdateCronRequest,
|
|
6
|
+
import { unmarshalListNamespacesResponse, unmarshalNamespace, marshalCreateNamespaceRequest, marshalUpdateNamespaceRequest, unmarshalListContainersResponse, unmarshalContainer, marshalCreateContainerRequest, marshalUpdateContainerRequest, unmarshalListCronsResponse, unmarshalCron, marshalCreateCronRequest, marshalUpdateCronRequest, unmarshalListDomainsResponse, unmarshalDomain, marshalCreateDomainRequest, unmarshalToken, marshalCreateTokenRequest, unmarshalListTokensResponse, marshalCreateTriggerRequest, unmarshalTrigger, unmarshalListTriggersResponse, marshalUpdateTriggerRequest } from './marshalling.gen.js';
|
|
7
7
|
|
|
8
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
9
9
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -241,24 +241,6 @@ class API extends API$1 {
|
|
|
241
241
|
method: 'DELETE',
|
|
242
242
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
|
|
243
243
|
}, unmarshalCron);
|
|
244
|
-
pageOfListLogs = request => this.client.fetch({
|
|
245
|
-
method: 'GET',
|
|
246
|
-
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}/logs`,
|
|
247
|
-
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
248
|
-
}, unmarshalListLogsResponse);
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* Deprecated (replaced by
|
|
252
|
-
* [Cockpit](https://www.scaleway.com/en/developers/api/cockpit/)). List your
|
|
253
|
-
* container logs. Deprecated (replaced by
|
|
254
|
-
* [Cockpit](https://www.scaleway.com/en/developers/api/cockpit/)). List the
|
|
255
|
-
* logs of the container with the specified ID.
|
|
256
|
-
*
|
|
257
|
-
* @deprecated
|
|
258
|
-
* @param request - The request {@link ListLogsRequest}
|
|
259
|
-
* @returns A Promise of ListLogsResponse
|
|
260
|
-
*/
|
|
261
|
-
listLogs = request => enrichForPagination('logs', this.pageOfListLogs, request);
|
|
262
244
|
pageOfListDomains = request => this.client.fetch({
|
|
263
245
|
method: 'GET',
|
|
264
246
|
path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`,
|
|
@@ -179,28 +179,6 @@ const unmarshalListDomainsResponse = data => {
|
|
|
179
179
|
totalCount: data.total_count
|
|
180
180
|
};
|
|
181
181
|
};
|
|
182
|
-
const unmarshalLog = data => {
|
|
183
|
-
if (!isJSONObject(data)) {
|
|
184
|
-
throw new TypeError(`Unmarshalling the type 'Log' failed as data isn't a dictionary.`);
|
|
185
|
-
}
|
|
186
|
-
return {
|
|
187
|
-
id: data.id,
|
|
188
|
-
level: data.level,
|
|
189
|
-
message: data.message,
|
|
190
|
-
source: data.source,
|
|
191
|
-
stream: data.stream,
|
|
192
|
-
timestamp: unmarshalDate(data.timestamp)
|
|
193
|
-
};
|
|
194
|
-
};
|
|
195
|
-
const unmarshalListLogsResponse = data => {
|
|
196
|
-
if (!isJSONObject(data)) {
|
|
197
|
-
throw new TypeError(`Unmarshalling the type 'ListLogsResponse' failed as data isn't a dictionary.`);
|
|
198
|
-
}
|
|
199
|
-
return {
|
|
200
|
-
logs: unmarshalArrayOfObject(data.logs, unmarshalLog),
|
|
201
|
-
totalCount: data.total_count
|
|
202
|
-
};
|
|
203
|
-
};
|
|
204
182
|
const unmarshalListNamespacesResponse = data => {
|
|
205
183
|
if (!isJSONObject(data)) {
|
|
206
184
|
throw new TypeError(`Unmarshalling the type 'ListNamespacesResponse' failed as data isn't a dictionary.`);
|
|
@@ -351,4 +329,4 @@ const marshalUpdateTriggerRequest = (request, defaults) => ({
|
|
|
351
329
|
}])
|
|
352
330
|
});
|
|
353
331
|
|
|
354
|
-
export { marshalCreateContainerRequest, marshalCreateCronRequest, marshalCreateDomainRequest, marshalCreateNamespaceRequest, marshalCreateTokenRequest, marshalCreateTriggerRequest, marshalUpdateContainerRequest, marshalUpdateCronRequest, marshalUpdateNamespaceRequest, marshalUpdateTriggerRequest, unmarshalContainer, unmarshalCron, unmarshalDomain, unmarshalListContainersResponse, unmarshalListCronsResponse, unmarshalListDomainsResponse,
|
|
332
|
+
export { marshalCreateContainerRequest, marshalCreateCronRequest, marshalCreateDomainRequest, marshalCreateNamespaceRequest, marshalCreateTokenRequest, marshalCreateTriggerRequest, marshalUpdateContainerRequest, marshalUpdateCronRequest, marshalUpdateNamespaceRequest, marshalUpdateTriggerRequest, unmarshalContainer, unmarshalCron, unmarshalDomain, unmarshalListContainersResponse, unmarshalListCronsResponse, unmarshalListDomainsResponse, unmarshalListNamespacesResponse, unmarshalListTokensResponse, unmarshalListTriggersResponse, unmarshalNamespace, unmarshalToken, unmarshalTrigger };
|
|
@@ -301,6 +301,7 @@ const unmarshalDomain = data => {
|
|
|
301
301
|
linkedProducts: data.linked_products,
|
|
302
302
|
organizationId: data.organization_id,
|
|
303
303
|
ownerContact: data.owner_contact ? unmarshalContact(data.owner_contact) : undefined,
|
|
304
|
+
pendingTrade: data.pending_trade,
|
|
304
305
|
projectId: data.project_id,
|
|
305
306
|
registrar: data.registrar,
|
|
306
307
|
status: data.status,
|
|
@@ -595,6 +596,7 @@ const unmarshalDomainSummary = data => {
|
|
|
595
596
|
}
|
|
596
597
|
return {
|
|
597
598
|
autoRenewStatus: data.auto_renew_status,
|
|
599
|
+
createdAt: unmarshalDate(data.created_at),
|
|
598
600
|
dnssecStatus: data.dnssec_status,
|
|
599
601
|
domain: data.domain,
|
|
600
602
|
eppCode: data.epp_code,
|
|
@@ -602,6 +604,7 @@ const unmarshalDomainSummary = data => {
|
|
|
602
604
|
externalDomainRegistrationStatus: data.external_domain_registration_status ? unmarshalDomainRegistrationStatusExternalDomain(data.external_domain_registration_status) : undefined,
|
|
603
605
|
isExternal: data.is_external,
|
|
604
606
|
organizationId: data.organization_id,
|
|
607
|
+
pendingTrade: data.pending_trade,
|
|
605
608
|
projectId: data.project_id,
|
|
606
609
|
registrar: data.registrar,
|
|
607
610
|
status: data.status,
|
|
@@ -3,7 +3,7 @@ import { API as API$1 } from '../../../scw/api.js';
|
|
|
3
3
|
import { validatePathParam, urlParams, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
4
4
|
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
5
5
|
import { NAMESPACE_TRANSIENT_STATUSES, FUNCTION_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES, TRIGGER_TRANSIENT_STATUSES } from './content.gen.js';
|
|
6
|
-
import { unmarshalListNamespacesResponse, unmarshalNamespace, marshalCreateNamespaceRequest, marshalUpdateNamespaceRequest, unmarshalListFunctionsResponse, unmarshalFunction, marshalCreateFunctionRequest, marshalUpdateFunctionRequest, unmarshalListFunctionRuntimesResponse, unmarshalUploadURL, unmarshalDownloadURL, unmarshalListCronsResponse, unmarshalCron, marshalCreateCronRequest, marshalUpdateCronRequest,
|
|
6
|
+
import { unmarshalListNamespacesResponse, unmarshalNamespace, marshalCreateNamespaceRequest, marshalUpdateNamespaceRequest, unmarshalListFunctionsResponse, unmarshalFunction, marshalCreateFunctionRequest, marshalUpdateFunctionRequest, unmarshalListFunctionRuntimesResponse, unmarshalUploadURL, unmarshalDownloadURL, unmarshalListCronsResponse, unmarshalCron, marshalCreateCronRequest, marshalUpdateCronRequest, unmarshalListDomainsResponse, unmarshalDomain, marshalCreateDomainRequest, unmarshalToken, marshalCreateTokenRequest, unmarshalListTokensResponse, marshalCreateTriggerRequest, unmarshalTrigger, unmarshalListTriggersResponse, marshalUpdateTriggerRequest } from './marshalling.gen.js';
|
|
7
7
|
|
|
8
8
|
// This file was automatically generated. DO NOT EDIT.
|
|
9
9
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
@@ -281,24 +281,6 @@ class API extends API$1 {
|
|
|
281
281
|
method: 'DELETE',
|
|
282
282
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
|
|
283
283
|
}, unmarshalCron);
|
|
284
|
-
pageOfListLogs = request => this.client.fetch({
|
|
285
|
-
method: 'GET',
|
|
286
|
-
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}/logs`,
|
|
287
|
-
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
288
|
-
}, unmarshalListLogsResponse);
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Deprecated (replaced by
|
|
292
|
-
* [Cockpit](https://www.scaleway.com/en/developers/api/cockpit/)). List
|
|
293
|
-
* application logs. Deprecated (replaced by
|
|
294
|
-
* [Cockpit](https://www.scaleway.com/en/developers/api/cockpit/)). List the
|
|
295
|
-
* application logs of the function with the specified ID.
|
|
296
|
-
*
|
|
297
|
-
* @deprecated
|
|
298
|
-
* @param request - The request {@link ListLogsRequest}
|
|
299
|
-
* @returns A Promise of ListLogsResponse
|
|
300
|
-
*/
|
|
301
|
-
listLogs = request => enrichForPagination('logs', this.pageOfListLogs, request);
|
|
302
284
|
pageOfListDomains = request => this.client.fetch({
|
|
303
285
|
method: 'GET',
|
|
304
286
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`,
|
|
@@ -214,28 +214,6 @@ const unmarshalListFunctionsResponse = data => {
|
|
|
214
214
|
totalCount: data.total_count
|
|
215
215
|
};
|
|
216
216
|
};
|
|
217
|
-
const unmarshalLog = data => {
|
|
218
|
-
if (!isJSONObject(data)) {
|
|
219
|
-
throw new TypeError(`Unmarshalling the type 'Log' failed as data isn't a dictionary.`);
|
|
220
|
-
}
|
|
221
|
-
return {
|
|
222
|
-
id: data.id,
|
|
223
|
-
level: data.level,
|
|
224
|
-
message: data.message,
|
|
225
|
-
source: data.source,
|
|
226
|
-
stream: data.stream,
|
|
227
|
-
timestamp: unmarshalDate(data.timestamp)
|
|
228
|
-
};
|
|
229
|
-
};
|
|
230
|
-
const unmarshalListLogsResponse = data => {
|
|
231
|
-
if (!isJSONObject(data)) {
|
|
232
|
-
throw new TypeError(`Unmarshalling the type 'ListLogsResponse' failed as data isn't a dictionary.`);
|
|
233
|
-
}
|
|
234
|
-
return {
|
|
235
|
-
logs: unmarshalArrayOfObject(data.logs, unmarshalLog),
|
|
236
|
-
totalCount: data.total_count
|
|
237
|
-
};
|
|
238
|
-
};
|
|
239
217
|
const unmarshalListNamespacesResponse = data => {
|
|
240
218
|
if (!isJSONObject(data)) {
|
|
241
219
|
throw new TypeError(`Unmarshalling the type 'ListNamespacesResponse' failed as data isn't a dictionary.`);
|
|
@@ -389,4 +367,4 @@ const marshalUpdateTriggerRequest = (request, defaults) => ({
|
|
|
389
367
|
}])
|
|
390
368
|
});
|
|
391
369
|
|
|
392
|
-
export { marshalCreateCronRequest, marshalCreateDomainRequest, marshalCreateFunctionRequest, marshalCreateNamespaceRequest, marshalCreateTokenRequest, marshalCreateTriggerRequest, marshalUpdateCronRequest, marshalUpdateFunctionRequest, marshalUpdateNamespaceRequest, marshalUpdateTriggerRequest, unmarshalCron, unmarshalDomain, unmarshalDownloadURL, unmarshalFunction, unmarshalListCronsResponse, unmarshalListDomainsResponse, unmarshalListFunctionRuntimesResponse, unmarshalListFunctionsResponse,
|
|
370
|
+
export { marshalCreateCronRequest, marshalCreateDomainRequest, marshalCreateFunctionRequest, marshalCreateNamespaceRequest, marshalCreateTokenRequest, marshalCreateTriggerRequest, marshalUpdateCronRequest, marshalUpdateFunctionRequest, marshalUpdateNamespaceRequest, marshalUpdateTriggerRequest, unmarshalCron, unmarshalDomain, unmarshalDownloadURL, unmarshalFunction, unmarshalListCronsResponse, unmarshalListDomainsResponse, unmarshalListFunctionRuntimesResponse, unmarshalListFunctionsResponse, unmarshalListNamespacesResponse, unmarshalListTokensResponse, unmarshalListTriggersResponse, unmarshalNamespace, unmarshalToken, unmarshalTrigger, unmarshalUploadURL };
|
|
@@ -36,6 +36,23 @@ const unmarshalEmail = data => {
|
|
|
36
36
|
updatedAt: unmarshalDate(data.updated_at)
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
+
const unmarshalDomainRecordsDMARC = data => {
|
|
40
|
+
if (!isJSONObject(data)) {
|
|
41
|
+
throw new TypeError(`Unmarshalling the type 'DomainRecordsDMARC' failed as data isn't a dictionary.`);
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
name: data.name,
|
|
45
|
+
value: data.value
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
const unmarshalDomainRecords = data => {
|
|
49
|
+
if (!isJSONObject(data)) {
|
|
50
|
+
throw new TypeError(`Unmarshalling the type 'DomainRecords' failed as data isn't a dictionary.`);
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
dmarc: data.dmarc ? unmarshalDomainRecordsDMARC(data.dmarc) : undefined
|
|
54
|
+
};
|
|
55
|
+
};
|
|
39
56
|
const unmarshalDomainReputation = data => {
|
|
40
57
|
if (!isJSONObject(data)) {
|
|
41
58
|
throw new TypeError(`Unmarshalling the type 'DomainReputation' failed as data isn't a dictionary.`);
|
|
@@ -73,6 +90,7 @@ const unmarshalDomain = data => {
|
|
|
73
90
|
nextCheckAt: unmarshalDate(data.next_check_at),
|
|
74
91
|
organizationId: data.organization_id,
|
|
75
92
|
projectId: data.project_id,
|
|
93
|
+
records: data.records ? unmarshalDomainRecords(data.records) : undefined,
|
|
76
94
|
region: data.region,
|
|
77
95
|
reputation: data.reputation ? unmarshalDomainReputation(data.reputation) : undefined,
|
|
78
96
|
revokedAt: unmarshalDate(data.revoked_at),
|