@scaleway/sdk 1.34.0 → 2.0.0-alpha.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/account/v2/api.gen.js +1 -1
- package/dist/api/account/v3/api.gen.js +1 -1
- package/dist/api/applesilicon/v1alpha1/api.gen.js +1 -1
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +26 -26
- package/dist/api/baremetal/v1/api.gen.js +6 -6
- package/dist/api/baremetal/v1/marshalling.gen.js +109 -120
- package/dist/api/billing/v2alpha1/api.gen.js +3 -3
- package/dist/api/billing/v2alpha1/marshalling.gen.js +9 -9
- package/dist/api/cockpit/v1beta1/api.gen.js +47 -71
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +43 -63
- package/dist/api/container/v1beta1/api.gen.js +11 -11
- package/dist/api/container/v1beta1/marshalling.gen.js +76 -102
- package/dist/api/document_db/v1beta1/api.gen.js +6 -6
- package/dist/api/document_db/v1beta1/marshalling.gen.js +169 -225
- package/dist/api/domain/v2beta1/api.gen.js +45 -38
- package/dist/api/domain/v2beta1/index.gen.js +2 -0
- package/dist/api/domain/v2beta1/marshalling.gen.js +361 -575
- package/dist/api/flexibleip/v1alpha1/api.gen.js +15 -7
- package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +2 -2
- package/dist/api/function/v1beta1/api.gen.js +11 -11
- package/dist/api/function/v1beta1/marshalling.gen.js +103 -129
- package/dist/api/iam/v1alpha1/api.gen.js +64 -32
- package/dist/api/iam/v1alpha1/marshalling.gen.js +68 -78
- package/dist/api/instance/v1/api.gen.js +1 -1
- package/dist/api/instance/v1/marshalling.gen.js +397 -602
- package/dist/api/iot/v1/api.gen.js +35 -27
- package/dist/api/iot/v1/marshalling.gen.js +111 -162
- package/dist/api/ipfs/v1alpha1/api.gen.js +2 -2
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +23 -27
- package/dist/api/k8s/v1/api.gen.js +3 -3
- package/dist/api/k8s/v1/marshalling.gen.js +109 -194
- package/dist/api/lb/v1/api.gen.js +583 -552
- package/dist/api/lb/v1/marshalling.gen.js +245 -361
- package/dist/api/marketplace/v1/marshalling.gen.js +11 -11
- package/dist/api/marketplace/v2/api.gen.js +6 -6
- package/dist/api/mnq/v1alpha1/api.gen.js +21 -14
- package/dist/api/mnq/v1alpha1/marshalling.gen.js +35 -40
- package/dist/api/rdb/v1/api.gen.js +7 -7
- package/dist/api/rdb/v1/marshalling.gen.js +184 -240
- package/dist/api/redis/v1/api.gen.js +1 -1
- package/dist/api/redis/v1/marshalling.gen.js +73 -97
- package/dist/api/registry/v1/api.gen.js +3 -3
- package/dist/api/registry/v1/marshalling.gen.js +5 -7
- package/dist/api/secret/v1alpha1/api.gen.js +2 -2
- package/dist/api/secret/v1alpha1/marshalling.gen.js +20 -30
- package/dist/api/tem/v1alpha1/api.gen.js +1 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.js +52 -61
- package/dist/api/test/v1/api.gen.js +8 -25
- package/dist/api/test/v1/marshalling.gen.js +5 -7
- package/dist/api/vpc/v1/api.gen.js +1 -1
- package/dist/api/vpc/v2/api.gen.js +2 -2
- package/dist/api/vpc/v2/marshalling.gen.js +3 -5
- package/dist/api/vpcgw/v1/api.gen.js +6 -6
- package/dist/api/vpcgw/v1/marshalling.gen.js +36 -49
- package/dist/api/webhosting/v1alpha1/api.gen.js +56 -4
- package/dist/api/webhosting/v1alpha1/index.gen.js +1 -1
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +69 -42
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +10 -1
- package/dist/index.cjs +3127 -3989
- package/dist/index.d.ts +9658 -12221
- package/package.json +2 -2
|
@@ -60,7 +60,7 @@ class API extends API$1 {
|
|
|
60
60
|
return _this.client.fetch({
|
|
61
61
|
method: 'GET',
|
|
62
62
|
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/fips`,
|
|
63
|
-
urlParams: urlParams(['order_by', request.orderBy
|
|
63
|
+
urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId], ['server_ids', request.serverIds], ['status', request.status], ['tags', request.tags])
|
|
64
64
|
}, unmarshalListFlexibleIPsResponse);
|
|
65
65
|
};
|
|
66
66
|
})();
|
|
@@ -129,12 +129,20 @@ class API extends API$1 {
|
|
|
129
129
|
* @param request - The request {@link DetachFlexibleIPRequest}
|
|
130
130
|
* @returns A Promise of DetachFlexibleIPsResponse
|
|
131
131
|
*/
|
|
132
|
-
detachFlexibleIP =
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
132
|
+
detachFlexibleIP = (() => {
|
|
133
|
+
var _this3 = this;
|
|
134
|
+
return function (request) {
|
|
135
|
+
if (request === void 0) {
|
|
136
|
+
request = {};
|
|
137
|
+
}
|
|
138
|
+
return _this3.client.fetch({
|
|
139
|
+
body: JSON.stringify(marshalDetachFlexibleIPRequest(request, _this3.client.settings)),
|
|
140
|
+
headers: jsonContentHeaders,
|
|
141
|
+
method: 'POST',
|
|
142
|
+
path: `/flexible-ip/v1alpha1/zones/${validatePathParam('zone', request.zone ?? _this3.client.settings.defaultZone)}/fips/detach`
|
|
143
|
+
}, unmarshalDetachFlexibleIPsResponse);
|
|
144
|
+
};
|
|
145
|
+
})();
|
|
138
146
|
|
|
139
147
|
/**
|
|
140
148
|
* Generate a virtual MAC address on an existing flexible IP. Generate a
|
|
@@ -26,11 +26,11 @@ const unmarshalFlexibleIP = data => {
|
|
|
26
26
|
description: data.description,
|
|
27
27
|
id: data.id,
|
|
28
28
|
ipAddress: data.ip_address,
|
|
29
|
-
macAddress:
|
|
29
|
+
macAddress: unmarshalMACAddress(data.mac_address),
|
|
30
30
|
organizationId: data.organization_id,
|
|
31
31
|
projectId: data.project_id,
|
|
32
32
|
reverse: data.reverse,
|
|
33
|
-
serverId: data.server_id,
|
|
33
|
+
serverId: data.server_id ? data.server_id : undefined,
|
|
34
34
|
status: data.status,
|
|
35
35
|
tags: data.tags,
|
|
36
36
|
updatedAt: unmarshalDate(data.updated_at),
|
|
@@ -24,7 +24,7 @@ class API extends API$1 {
|
|
|
24
24
|
return _this.client.fetch({
|
|
25
25
|
method: 'GET',
|
|
26
26
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/namespaces`,
|
|
27
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy
|
|
27
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
28
28
|
}, unmarshalListNamespacesResponse);
|
|
29
29
|
};
|
|
30
30
|
})();
|
|
@@ -116,7 +116,7 @@ class API extends API$1 {
|
|
|
116
116
|
pageOfListFunctions = request => this.client.fetch({
|
|
117
117
|
method: 'GET',
|
|
118
118
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions`,
|
|
119
|
-
urlParams: urlParams(['name', request.name], ['namespace_id', request.namespaceId], ['order_by', request.orderBy
|
|
119
|
+
urlParams: urlParams(['name', request.name], ['namespace_id', request.namespaceId], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
120
120
|
}, unmarshalListFunctionsResponse);
|
|
121
121
|
|
|
122
122
|
/**
|
|
@@ -245,7 +245,7 @@ class API extends API$1 {
|
|
|
245
245
|
pageOfListCrons = request => this.client.fetch({
|
|
246
246
|
method: 'GET',
|
|
247
247
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons`,
|
|
248
|
-
urlParams: urlParams(['function_id', request.functionId], ['order_by', request.orderBy
|
|
248
|
+
urlParams: urlParams(['function_id', request.functionId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
249
249
|
}, unmarshalListCronsResponse);
|
|
250
250
|
|
|
251
251
|
/**
|
|
@@ -316,7 +316,7 @@ class API extends API$1 {
|
|
|
316
316
|
pageOfListLogs = request => this.client.fetch({
|
|
317
317
|
method: 'GET',
|
|
318
318
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}/logs`,
|
|
319
|
-
urlParams: urlParams(['order_by', request.orderBy
|
|
319
|
+
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
320
320
|
}, unmarshalListLogsResponse);
|
|
321
321
|
|
|
322
322
|
/**
|
|
@@ -330,7 +330,7 @@ class API extends API$1 {
|
|
|
330
330
|
pageOfListDomains = request => this.client.fetch({
|
|
331
331
|
method: 'GET',
|
|
332
332
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`,
|
|
333
|
-
urlParams: urlParams(['function_id', request.functionId], ['order_by', request.orderBy
|
|
333
|
+
urlParams: urlParams(['function_id', request.functionId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
334
334
|
}, unmarshalListDomainsResponse);
|
|
335
335
|
|
|
336
336
|
/**
|
|
@@ -463,7 +463,7 @@ class API extends API$1 {
|
|
|
463
463
|
return _this7.client.fetch({
|
|
464
464
|
method: 'GET',
|
|
465
465
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this7.client.settings.defaultRegion)}/tokens`,
|
|
466
|
-
urlParams: urlParams(['function_id', request.functionId], ['namespace_id', request.namespaceId], ['order_by', request.orderBy
|
|
466
|
+
urlParams: urlParams(['function_id', request.functionId], ['namespace_id', request.namespaceId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize])
|
|
467
467
|
}, unmarshalListTokensResponse);
|
|
468
468
|
};
|
|
469
469
|
})();
|
|
@@ -522,16 +522,16 @@ class API extends API$1 {
|
|
|
522
522
|
return _this9.client.fetch({
|
|
523
523
|
method: 'GET',
|
|
524
524
|
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this9.client.settings.defaultRegion)}/triggers`,
|
|
525
|
-
urlParams: urlParams(['order_by', request.orderBy
|
|
526
|
-
default: _this9.client.settings.defaultProjectId,
|
|
527
|
-
param: 'project_id',
|
|
528
|
-
value: request.projectId
|
|
529
|
-
}, {
|
|
525
|
+
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this9.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([{
|
|
530
526
|
param: 'function_id',
|
|
531
527
|
value: request.functionId
|
|
532
528
|
}, {
|
|
533
529
|
param: 'namespace_id',
|
|
534
530
|
value: request.namespaceId
|
|
531
|
+
}, {
|
|
532
|
+
default: _this9.client.settings.defaultProjectId,
|
|
533
|
+
param: 'project_id',
|
|
534
|
+
value: request.projectId
|
|
535
535
|
}])))
|
|
536
536
|
}, unmarshalListTriggersResponse);
|
|
537
537
|
};
|
|
@@ -4,56 +4,12 @@ import { unmarshalArrayOfObject, unmarshalDate, resolveOneOf } from '../../../he
|
|
|
4
4
|
|
|
5
5
|
// This file was automatically generated. DO NOT EDIT.
|
|
6
6
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
7
|
-
const unmarshalSecretHashedValue = data => {
|
|
8
|
-
if (!isJSONObject(data)) {
|
|
9
|
-
throw new TypeError(`Unmarshalling the type 'SecretHashedValue' failed as data isn't a dictionary.`);
|
|
10
|
-
}
|
|
11
|
-
return {
|
|
12
|
-
hashedValue: data.hashed_value,
|
|
13
|
-
key: data.key
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
const unmarshalTriggerMnqNatsClientConfig = data => {
|
|
17
|
-
if (!isJSONObject(data)) {
|
|
18
|
-
throw new TypeError(`Unmarshalling the type 'TriggerMnqNatsClientConfig' failed as data isn't a dictionary.`);
|
|
19
|
-
}
|
|
20
|
-
return {
|
|
21
|
-
mnqCredentialId: data.mnq_credential_id,
|
|
22
|
-
mnqNamespaceId: data.mnq_namespace_id,
|
|
23
|
-
mnqProjectId: data.mnq_project_id,
|
|
24
|
-
mnqRegion: data.mnq_region,
|
|
25
|
-
subject: data.subject
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
const unmarshalTriggerMnqSqsClientConfig = data => {
|
|
29
|
-
if (!isJSONObject(data)) {
|
|
30
|
-
throw new TypeError(`Unmarshalling the type 'TriggerMnqSqsClientConfig' failed as data isn't a dictionary.`);
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
mnqCredentialId: data.mnq_credential_id,
|
|
34
|
-
mnqNamespaceId: data.mnq_namespace_id,
|
|
35
|
-
mnqProjectId: data.mnq_project_id,
|
|
36
|
-
mnqRegion: data.mnq_region,
|
|
37
|
-
queue: data.queue
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
const unmarshalTriggerSqsClientConfig = data => {
|
|
41
|
-
if (!isJSONObject(data)) {
|
|
42
|
-
throw new TypeError(`Unmarshalling the type 'TriggerSqsClientConfig' failed as data isn't a dictionary.`);
|
|
43
|
-
}
|
|
44
|
-
return {
|
|
45
|
-
accessKey: data.access_key,
|
|
46
|
-
endpoint: data.endpoint,
|
|
47
|
-
queueUrl: data.queue_url,
|
|
48
|
-
secretKey: data.secret_key
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
7
|
const unmarshalCron = data => {
|
|
52
8
|
if (!isJSONObject(data)) {
|
|
53
9
|
throw new TypeError(`Unmarshalling the type 'Cron' failed as data isn't a dictionary.`);
|
|
54
10
|
}
|
|
55
11
|
return {
|
|
56
|
-
args: data.args,
|
|
12
|
+
args: data.args ? data.args : undefined,
|
|
57
13
|
functionId: data.function_id,
|
|
58
14
|
id: data.id,
|
|
59
15
|
name: data.name,
|
|
@@ -66,7 +22,7 @@ const unmarshalDomain = data => {
|
|
|
66
22
|
throw new TypeError(`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`);
|
|
67
23
|
}
|
|
68
24
|
return {
|
|
69
|
-
errorMessage: data.error_message,
|
|
25
|
+
errorMessage: data.error_message ? data.error_message : undefined,
|
|
70
26
|
functionId: data.function_id,
|
|
71
27
|
hostname: data.hostname,
|
|
72
28
|
id: data.id,
|
|
@@ -74,17 +30,26 @@ const unmarshalDomain = data => {
|
|
|
74
30
|
url: data.url
|
|
75
31
|
};
|
|
76
32
|
};
|
|
33
|
+
const unmarshalSecretHashedValue = data => {
|
|
34
|
+
if (!isJSONObject(data)) {
|
|
35
|
+
throw new TypeError(`Unmarshalling the type 'SecretHashedValue' failed as data isn't a dictionary.`);
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
hashedValue: data.hashed_value,
|
|
39
|
+
key: data.key
|
|
40
|
+
};
|
|
41
|
+
};
|
|
77
42
|
const unmarshalFunction = data => {
|
|
78
43
|
if (!isJSONObject(data)) {
|
|
79
44
|
throw new TypeError(`Unmarshalling the type 'Function' failed as data isn't a dictionary.`);
|
|
80
45
|
}
|
|
81
46
|
return {
|
|
82
|
-
buildMessage: data.build_message,
|
|
47
|
+
buildMessage: data.build_message ? data.build_message : undefined,
|
|
83
48
|
cpuLimit: data.cpu_limit,
|
|
84
|
-
description: data.description,
|
|
49
|
+
description: data.description ? data.description : undefined,
|
|
85
50
|
domainName: data.domain_name,
|
|
86
51
|
environmentVariables: data.environment_variables,
|
|
87
|
-
errorMessage: data.error_message,
|
|
52
|
+
errorMessage: data.error_message ? data.error_message : undefined,
|
|
88
53
|
handler: data.handler,
|
|
89
54
|
httpOption: data.http_option,
|
|
90
55
|
id: data.id,
|
|
@@ -99,20 +64,7 @@ const unmarshalFunction = data => {
|
|
|
99
64
|
runtimeMessage: data.runtime_message,
|
|
100
65
|
secretEnvironmentVariables: unmarshalArrayOfObject(data.secret_environment_variables, unmarshalSecretHashedValue),
|
|
101
66
|
status: data.status,
|
|
102
|
-
timeout: data.timeout
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
const unmarshalLog = data => {
|
|
106
|
-
if (!isJSONObject(data)) {
|
|
107
|
-
throw new TypeError(`Unmarshalling the type 'Log' failed as data isn't a dictionary.`);
|
|
108
|
-
}
|
|
109
|
-
return {
|
|
110
|
-
id: data.id,
|
|
111
|
-
level: data.level,
|
|
112
|
-
message: data.message,
|
|
113
|
-
source: data.source,
|
|
114
|
-
stream: data.stream,
|
|
115
|
-
timestamp: unmarshalDate(data.timestamp)
|
|
67
|
+
timeout: data.timeout ? data.timeout : undefined
|
|
116
68
|
};
|
|
117
69
|
};
|
|
118
70
|
const unmarshalNamespace = data => {
|
|
@@ -120,9 +72,9 @@ const unmarshalNamespace = data => {
|
|
|
120
72
|
throw new TypeError(`Unmarshalling the type 'Namespace' failed as data isn't a dictionary.`);
|
|
121
73
|
}
|
|
122
74
|
return {
|
|
123
|
-
description: data.description,
|
|
75
|
+
description: data.description ? data.description : undefined,
|
|
124
76
|
environmentVariables: data.environment_variables,
|
|
125
|
-
errorMessage: data.error_message,
|
|
77
|
+
errorMessage: data.error_message ? data.error_message : undefined,
|
|
126
78
|
id: data.id,
|
|
127
79
|
name: data.name,
|
|
128
80
|
organizationId: data.organization_id,
|
|
@@ -134,45 +86,63 @@ const unmarshalNamespace = data => {
|
|
|
134
86
|
status: data.status
|
|
135
87
|
};
|
|
136
88
|
};
|
|
137
|
-
const unmarshalRuntime = data => {
|
|
138
|
-
if (!isJSONObject(data)) {
|
|
139
|
-
throw new TypeError(`Unmarshalling the type 'Runtime' failed as data isn't a dictionary.`);
|
|
140
|
-
}
|
|
141
|
-
return {
|
|
142
|
-
codeSample: data.code_sample,
|
|
143
|
-
defaultHandler: data.default_handler,
|
|
144
|
-
extension: data.extension,
|
|
145
|
-
implementation: data.implementation,
|
|
146
|
-
language: data.language,
|
|
147
|
-
logoUrl: data.logo_url,
|
|
148
|
-
name: data.name,
|
|
149
|
-
status: data.status,
|
|
150
|
-
statusMessage: data.status_message,
|
|
151
|
-
version: data.version
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
89
|
const unmarshalToken = data => {
|
|
155
90
|
if (!isJSONObject(data)) {
|
|
156
91
|
throw new TypeError(`Unmarshalling the type 'Token' failed as data isn't a dictionary.`);
|
|
157
92
|
}
|
|
158
93
|
return {
|
|
159
|
-
description: data.description,
|
|
94
|
+
description: data.description ? data.description : undefined,
|
|
160
95
|
expiresAt: unmarshalDate(data.expires_at),
|
|
161
|
-
functionId: data.function_id,
|
|
96
|
+
functionId: data.function_id ? data.function_id : undefined,
|
|
162
97
|
id: data.id,
|
|
163
|
-
namespaceId: data.namespace_id,
|
|
164
|
-
publicKey: data.public_key,
|
|
98
|
+
namespaceId: data.namespace_id ? data.namespace_id : undefined,
|
|
99
|
+
publicKey: data.public_key ? data.public_key : undefined,
|
|
165
100
|
status: data.status,
|
|
166
101
|
token: data.token
|
|
167
102
|
};
|
|
168
103
|
};
|
|
104
|
+
const unmarshalTriggerMnqNatsClientConfig = data => {
|
|
105
|
+
if (!isJSONObject(data)) {
|
|
106
|
+
throw new TypeError(`Unmarshalling the type 'TriggerMnqNatsClientConfig' failed as data isn't a dictionary.`);
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
mnqCredentialId: data.mnq_credential_id ? data.mnq_credential_id : undefined,
|
|
110
|
+
mnqNamespaceId: data.mnq_namespace_id,
|
|
111
|
+
mnqProjectId: data.mnq_project_id,
|
|
112
|
+
mnqRegion: data.mnq_region,
|
|
113
|
+
subject: data.subject
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
const unmarshalTriggerSqsClientConfig = data => {
|
|
117
|
+
if (!isJSONObject(data)) {
|
|
118
|
+
throw new TypeError(`Unmarshalling the type 'TriggerSqsClientConfig' failed as data isn't a dictionary.`);
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
accessKey: data.access_key,
|
|
122
|
+
endpoint: data.endpoint,
|
|
123
|
+
queueUrl: data.queue_url,
|
|
124
|
+
secretKey: data.secret_key
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
const unmarshalTriggerMnqSqsClientConfig = data => {
|
|
128
|
+
if (!isJSONObject(data)) {
|
|
129
|
+
throw new TypeError(`Unmarshalling the type 'TriggerMnqSqsClientConfig' failed as data isn't a dictionary.`);
|
|
130
|
+
}
|
|
131
|
+
return {
|
|
132
|
+
mnqCredentialId: data.mnq_credential_id ? data.mnq_credential_id : undefined,
|
|
133
|
+
mnqNamespaceId: data.mnq_namespace_id,
|
|
134
|
+
mnqProjectId: data.mnq_project_id,
|
|
135
|
+
mnqRegion: data.mnq_region,
|
|
136
|
+
queue: data.queue
|
|
137
|
+
};
|
|
138
|
+
};
|
|
169
139
|
const unmarshalTrigger = data => {
|
|
170
140
|
if (!isJSONObject(data)) {
|
|
171
141
|
throw new TypeError(`Unmarshalling the type 'Trigger' failed as data isn't a dictionary.`);
|
|
172
142
|
}
|
|
173
143
|
return {
|
|
174
144
|
description: data.description,
|
|
175
|
-
errorMessage: data.error_message,
|
|
145
|
+
errorMessage: data.error_message ? data.error_message : undefined,
|
|
176
146
|
functionId: data.function_id,
|
|
177
147
|
id: data.id,
|
|
178
148
|
inputType: data.input_type,
|
|
@@ -210,6 +180,23 @@ const unmarshalListDomainsResponse = data => {
|
|
|
210
180
|
totalCount: data.total_count
|
|
211
181
|
};
|
|
212
182
|
};
|
|
183
|
+
const unmarshalRuntime = data => {
|
|
184
|
+
if (!isJSONObject(data)) {
|
|
185
|
+
throw new TypeError(`Unmarshalling the type 'Runtime' failed as data isn't a dictionary.`);
|
|
186
|
+
}
|
|
187
|
+
return {
|
|
188
|
+
codeSample: data.code_sample,
|
|
189
|
+
defaultHandler: data.default_handler,
|
|
190
|
+
extension: data.extension,
|
|
191
|
+
implementation: data.implementation,
|
|
192
|
+
language: data.language,
|
|
193
|
+
logoUrl: data.logo_url,
|
|
194
|
+
name: data.name,
|
|
195
|
+
status: data.status,
|
|
196
|
+
statusMessage: data.status_message,
|
|
197
|
+
version: data.version
|
|
198
|
+
};
|
|
199
|
+
};
|
|
213
200
|
const unmarshalListFunctionRuntimesResponse = data => {
|
|
214
201
|
if (!isJSONObject(data)) {
|
|
215
202
|
throw new TypeError(`Unmarshalling the type 'ListFunctionRuntimesResponse' failed as data isn't a dictionary.`);
|
|
@@ -228,6 +215,19 @@ const unmarshalListFunctionsResponse = data => {
|
|
|
228
215
|
totalCount: data.total_count
|
|
229
216
|
};
|
|
230
217
|
};
|
|
218
|
+
const unmarshalLog = data => {
|
|
219
|
+
if (!isJSONObject(data)) {
|
|
220
|
+
throw new TypeError(`Unmarshalling the type 'Log' failed as data isn't a dictionary.`);
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
id: data.id,
|
|
224
|
+
level: data.level,
|
|
225
|
+
message: data.message,
|
|
226
|
+
source: data.source,
|
|
227
|
+
stream: data.stream,
|
|
228
|
+
timestamp: unmarshalDate(data.timestamp)
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
231
|
const unmarshalListLogsResponse = data => {
|
|
232
232
|
if (!isJSONObject(data)) {
|
|
233
233
|
throw new TypeError(`Unmarshalling the type 'ListLogsResponse' failed as data isn't a dictionary.`);
|
|
@@ -273,32 +273,6 @@ const unmarshalUploadURL = data => {
|
|
|
273
273
|
url: data.url
|
|
274
274
|
};
|
|
275
275
|
};
|
|
276
|
-
const marshalCreateTriggerRequestMnqNatsClientConfig = (request, defaults) => ({
|
|
277
|
-
mnq_namespace_id: request.mnqNamespaceId,
|
|
278
|
-
mnq_project_id: request.mnqProjectId,
|
|
279
|
-
mnq_region: request.mnqRegion,
|
|
280
|
-
subject: request.subject
|
|
281
|
-
});
|
|
282
|
-
const marshalCreateTriggerRequestMnqSqsClientConfig = (request, defaults) => ({
|
|
283
|
-
mnq_namespace_id: request.mnqNamespaceId,
|
|
284
|
-
mnq_project_id: request.mnqProjectId,
|
|
285
|
-
mnq_region: request.mnqRegion,
|
|
286
|
-
queue: request.queue
|
|
287
|
-
});
|
|
288
|
-
const marshalCreateTriggerRequestSqsClientConfig = (request, defaults) => ({
|
|
289
|
-
access_key: request.accessKey,
|
|
290
|
-
endpoint: request.endpoint,
|
|
291
|
-
queue_url: request.queueUrl,
|
|
292
|
-
secret_key: request.secretKey
|
|
293
|
-
});
|
|
294
|
-
const marshalSecret = (request, defaults) => ({
|
|
295
|
-
key: request.key,
|
|
296
|
-
value: request.value
|
|
297
|
-
});
|
|
298
|
-
const marshalUpdateTriggerRequestSqsClientConfig = (request, defaults) => ({
|
|
299
|
-
access_key: request.accessKey,
|
|
300
|
-
secret_key: request.secretKey
|
|
301
|
-
});
|
|
302
276
|
const marshalCreateCronRequest = (request, defaults) => ({
|
|
303
277
|
args: request.args,
|
|
304
278
|
function_id: request.functionId,
|
|
@@ -313,15 +287,15 @@ const marshalCreateFunctionRequest = (request, defaults) => ({
|
|
|
313
287
|
description: request.description,
|
|
314
288
|
environment_variables: request.environmentVariables,
|
|
315
289
|
handler: request.handler,
|
|
316
|
-
http_option: request.httpOption
|
|
290
|
+
http_option: request.httpOption,
|
|
317
291
|
max_scale: request.maxScale,
|
|
318
292
|
memory_limit: request.memoryLimit,
|
|
319
293
|
min_scale: request.minScale,
|
|
320
294
|
name: request.name || randomName('fn'),
|
|
321
295
|
namespace_id: request.namespaceId,
|
|
322
|
-
privacy: request.privacy
|
|
323
|
-
runtime: request.runtime
|
|
324
|
-
secret_environment_variables: request.secretEnvironmentVariables
|
|
296
|
+
privacy: request.privacy,
|
|
297
|
+
runtime: request.runtime,
|
|
298
|
+
secret_environment_variables: request.secretEnvironmentVariables,
|
|
325
299
|
timeout: request.timeout
|
|
326
300
|
});
|
|
327
301
|
const marshalCreateNamespaceRequest = (request, defaults) => ({
|
|
@@ -329,7 +303,7 @@ const marshalCreateNamespaceRequest = (request, defaults) => ({
|
|
|
329
303
|
environment_variables: request.environmentVariables,
|
|
330
304
|
name: request.name || randomName('ns'),
|
|
331
305
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
332
|
-
secret_environment_variables: request.secretEnvironmentVariables
|
|
306
|
+
secret_environment_variables: request.secretEnvironmentVariables
|
|
333
307
|
});
|
|
334
308
|
const marshalCreateTokenRequest = (request, defaults) => ({
|
|
335
309
|
description: request.description,
|
|
@@ -347,14 +321,14 @@ const marshalCreateTriggerRequest = (request, defaults) => ({
|
|
|
347
321
|
function_id: request.functionId,
|
|
348
322
|
name: request.name,
|
|
349
323
|
...resolveOneOf([{
|
|
324
|
+
param: 'scw_nats_config',
|
|
325
|
+
value: request.scwNatsConfig
|
|
326
|
+
}, {
|
|
350
327
|
param: 'scw_sqs_config',
|
|
351
|
-
value: request.scwSqsConfig
|
|
328
|
+
value: request.scwSqsConfig
|
|
352
329
|
}, {
|
|
353
330
|
param: 'sqs_config',
|
|
354
|
-
value: request.sqsConfig
|
|
355
|
-
}, {
|
|
356
|
-
param: 'scw_nats_config',
|
|
357
|
-
value: request.scwNatsConfig ? marshalCreateTriggerRequestMnqNatsClientConfig(request.scwNatsConfig) : undefined
|
|
331
|
+
value: request.sqsConfig
|
|
358
332
|
}])
|
|
359
333
|
});
|
|
360
334
|
const marshalUpdateCronRequest = (request, defaults) => ({
|
|
@@ -367,27 +341,27 @@ const marshalUpdateFunctionRequest = (request, defaults) => ({
|
|
|
367
341
|
description: request.description,
|
|
368
342
|
environment_variables: request.environmentVariables,
|
|
369
343
|
handler: request.handler,
|
|
370
|
-
http_option: request.httpOption
|
|
344
|
+
http_option: request.httpOption,
|
|
371
345
|
max_scale: request.maxScale,
|
|
372
346
|
memory_limit: request.memoryLimit,
|
|
373
347
|
min_scale: request.minScale,
|
|
374
|
-
privacy: request.privacy
|
|
348
|
+
privacy: request.privacy,
|
|
375
349
|
redeploy: request.redeploy,
|
|
376
|
-
runtime: request.runtime
|
|
377
|
-
secret_environment_variables: request.secretEnvironmentVariables
|
|
350
|
+
runtime: request.runtime,
|
|
351
|
+
secret_environment_variables: request.secretEnvironmentVariables,
|
|
378
352
|
timeout: request.timeout
|
|
379
353
|
});
|
|
380
354
|
const marshalUpdateNamespaceRequest = (request, defaults) => ({
|
|
381
355
|
description: request.description,
|
|
382
356
|
environment_variables: request.environmentVariables,
|
|
383
|
-
secret_environment_variables: request.secretEnvironmentVariables
|
|
357
|
+
secret_environment_variables: request.secretEnvironmentVariables
|
|
384
358
|
});
|
|
385
359
|
const marshalUpdateTriggerRequest = (request, defaults) => ({
|
|
386
360
|
description: request.description,
|
|
387
361
|
name: request.name,
|
|
388
362
|
...resolveOneOf([{
|
|
389
363
|
param: 'sqs_config',
|
|
390
|
-
value: request.sqsConfig
|
|
364
|
+
value: request.sqsConfig
|
|
391
365
|
}])
|
|
392
366
|
});
|
|
393
367
|
|