@scaleway/sdk-function 1.6.0 → 2.1.1
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/README.md +96 -0
- package/dist/v1beta1/api.gen.d.ts +3 -2
- package/dist/v1beta1/api.gen.js +37 -56
- package/dist/v1beta1/content.gen.js +4 -1
- package/dist/v1beta1/index.gen.d.ts +1 -1
- package/dist/v1beta1/marshalling.gen.js +18 -34
- package/dist/v1beta1/types.gen.d.ts +2 -2
- package/package.json +6 -9
- package/dist/index.gen.cjs +0 -4
- package/dist/v1beta1/api.gen.cjs +0 -646
- package/dist/v1beta1/content.gen.cjs +0 -34
- package/dist/v1beta1/index.gen.cjs +0 -39
- package/dist/v1beta1/marshalling.gen.cjs +0 -475
- package/dist/v1beta1/validation-rules.gen.cjs +0 -57
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const api_gen = require("./api.gen.cjs");
|
|
4
|
-
const content_gen = require("./content.gen.cjs");
|
|
5
|
-
const marshalling_gen = require("./marshalling.gen.cjs");
|
|
6
|
-
const validationRules_gen = require("./validation-rules.gen.cjs");
|
|
7
|
-
exports.API = api_gen.API;
|
|
8
|
-
exports.CRON_TRANSIENT_STATUSES = content_gen.CRON_TRANSIENT_STATUSES;
|
|
9
|
-
exports.DOMAIN_TRANSIENT_STATUSES = content_gen.DOMAIN_TRANSIENT_STATUSES;
|
|
10
|
-
exports.FUNCTION_TRANSIENT_STATUSES = content_gen.FUNCTION_TRANSIENT_STATUSES;
|
|
11
|
-
exports.NAMESPACE_TRANSIENT_STATUSES = content_gen.NAMESPACE_TRANSIENT_STATUSES;
|
|
12
|
-
exports.TOKEN_TRANSIENT_STATUSES = content_gen.TOKEN_TRANSIENT_STATUSES;
|
|
13
|
-
exports.TRIGGER_TRANSIENT_STATUSES = content_gen.TRIGGER_TRANSIENT_STATUSES;
|
|
14
|
-
exports.marshalCreateCronRequest = marshalling_gen.marshalCreateCronRequest;
|
|
15
|
-
exports.marshalCreateDomainRequest = marshalling_gen.marshalCreateDomainRequest;
|
|
16
|
-
exports.marshalCreateFunctionRequest = marshalling_gen.marshalCreateFunctionRequest;
|
|
17
|
-
exports.marshalCreateNamespaceRequest = marshalling_gen.marshalCreateNamespaceRequest;
|
|
18
|
-
exports.marshalCreateTokenRequest = marshalling_gen.marshalCreateTokenRequest;
|
|
19
|
-
exports.marshalCreateTriggerRequest = marshalling_gen.marshalCreateTriggerRequest;
|
|
20
|
-
exports.marshalUpdateCronRequest = marshalling_gen.marshalUpdateCronRequest;
|
|
21
|
-
exports.marshalUpdateFunctionRequest = marshalling_gen.marshalUpdateFunctionRequest;
|
|
22
|
-
exports.marshalUpdateNamespaceRequest = marshalling_gen.marshalUpdateNamespaceRequest;
|
|
23
|
-
exports.marshalUpdateTriggerRequest = marshalling_gen.marshalUpdateTriggerRequest;
|
|
24
|
-
exports.unmarshalCron = marshalling_gen.unmarshalCron;
|
|
25
|
-
exports.unmarshalDomain = marshalling_gen.unmarshalDomain;
|
|
26
|
-
exports.unmarshalDownloadURL = marshalling_gen.unmarshalDownloadURL;
|
|
27
|
-
exports.unmarshalFunction = marshalling_gen.unmarshalFunction;
|
|
28
|
-
exports.unmarshalListCronsResponse = marshalling_gen.unmarshalListCronsResponse;
|
|
29
|
-
exports.unmarshalListDomainsResponse = marshalling_gen.unmarshalListDomainsResponse;
|
|
30
|
-
exports.unmarshalListFunctionRuntimesResponse = marshalling_gen.unmarshalListFunctionRuntimesResponse;
|
|
31
|
-
exports.unmarshalListFunctionsResponse = marshalling_gen.unmarshalListFunctionsResponse;
|
|
32
|
-
exports.unmarshalListNamespacesResponse = marshalling_gen.unmarshalListNamespacesResponse;
|
|
33
|
-
exports.unmarshalListTokensResponse = marshalling_gen.unmarshalListTokensResponse;
|
|
34
|
-
exports.unmarshalListTriggersResponse = marshalling_gen.unmarshalListTriggersResponse;
|
|
35
|
-
exports.unmarshalNamespace = marshalling_gen.unmarshalNamespace;
|
|
36
|
-
exports.unmarshalToken = marshalling_gen.unmarshalToken;
|
|
37
|
-
exports.unmarshalTrigger = marshalling_gen.unmarshalTrigger;
|
|
38
|
-
exports.unmarshalUploadURL = marshalling_gen.unmarshalUploadURL;
|
|
39
|
-
exports.ValidationRules = validationRules_gen;
|
|
@@ -1,475 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const randomName = require("@scaleway/random-name");
|
|
4
|
-
const sdkClient = require("@scaleway/sdk-client");
|
|
5
|
-
const unmarshalCron = (data) => {
|
|
6
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
7
|
-
throw new TypeError(
|
|
8
|
-
`Unmarshalling the type 'Cron' failed as data isn't a dictionary.`
|
|
9
|
-
);
|
|
10
|
-
}
|
|
11
|
-
return {
|
|
12
|
-
args: data.args,
|
|
13
|
-
functionId: data.function_id,
|
|
14
|
-
id: data.id,
|
|
15
|
-
name: data.name,
|
|
16
|
-
schedule: data.schedule,
|
|
17
|
-
status: data.status
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
const unmarshalDomain = (data) => {
|
|
21
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
22
|
-
throw new TypeError(
|
|
23
|
-
`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
return {
|
|
27
|
-
errorMessage: data.error_message,
|
|
28
|
-
functionId: data.function_id,
|
|
29
|
-
hostname: data.hostname,
|
|
30
|
-
id: data.id,
|
|
31
|
-
status: data.status,
|
|
32
|
-
url: data.url
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
const unmarshalSecretHashedValue = (data) => {
|
|
36
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
37
|
-
throw new TypeError(
|
|
38
|
-
`Unmarshalling the type 'SecretHashedValue' failed as data isn't a dictionary.`
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
return {
|
|
42
|
-
hashedValue: data.hashed_value,
|
|
43
|
-
key: data.key
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
const unmarshalFunction = (data) => {
|
|
47
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
48
|
-
throw new TypeError(
|
|
49
|
-
`Unmarshalling the type 'Function' failed as data isn't a dictionary.`
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
return {
|
|
53
|
-
buildMessage: data.build_message,
|
|
54
|
-
cpuLimit: data.cpu_limit,
|
|
55
|
-
createdAt: sdkClient.unmarshalDate(data.created_at),
|
|
56
|
-
description: data.description,
|
|
57
|
-
domainName: data.domain_name,
|
|
58
|
-
environmentVariables: data.environment_variables,
|
|
59
|
-
errorMessage: data.error_message,
|
|
60
|
-
handler: data.handler,
|
|
61
|
-
httpOption: data.http_option,
|
|
62
|
-
id: data.id,
|
|
63
|
-
maxScale: data.max_scale,
|
|
64
|
-
memoryLimit: data.memory_limit,
|
|
65
|
-
minScale: data.min_scale,
|
|
66
|
-
name: data.name,
|
|
67
|
-
namespaceId: data.namespace_id,
|
|
68
|
-
privacy: data.privacy,
|
|
69
|
-
privateNetworkId: data.private_network_id,
|
|
70
|
-
readyAt: sdkClient.unmarshalDate(data.ready_at),
|
|
71
|
-
region: data.region,
|
|
72
|
-
runtime: data.runtime,
|
|
73
|
-
runtimeMessage: data.runtime_message,
|
|
74
|
-
sandbox: data.sandbox,
|
|
75
|
-
secretEnvironmentVariables: sdkClient.unmarshalArrayOfObject(
|
|
76
|
-
data.secret_environment_variables,
|
|
77
|
-
unmarshalSecretHashedValue
|
|
78
|
-
),
|
|
79
|
-
status: data.status,
|
|
80
|
-
tags: data.tags,
|
|
81
|
-
timeout: data.timeout,
|
|
82
|
-
updatedAt: sdkClient.unmarshalDate(data.updated_at)
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
const unmarshalNamespace = (data) => {
|
|
86
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
87
|
-
throw new TypeError(
|
|
88
|
-
`Unmarshalling the type 'Namespace' failed as data isn't a dictionary.`
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
return {
|
|
92
|
-
createdAt: sdkClient.unmarshalDate(data.created_at),
|
|
93
|
-
description: data.description,
|
|
94
|
-
environmentVariables: data.environment_variables,
|
|
95
|
-
errorMessage: data.error_message,
|
|
96
|
-
id: data.id,
|
|
97
|
-
name: data.name,
|
|
98
|
-
organizationId: data.organization_id,
|
|
99
|
-
projectId: data.project_id,
|
|
100
|
-
region: data.region,
|
|
101
|
-
registryEndpoint: data.registry_endpoint,
|
|
102
|
-
registryNamespaceId: data.registry_namespace_id,
|
|
103
|
-
secretEnvironmentVariables: sdkClient.unmarshalArrayOfObject(
|
|
104
|
-
data.secret_environment_variables,
|
|
105
|
-
unmarshalSecretHashedValue
|
|
106
|
-
),
|
|
107
|
-
status: data.status,
|
|
108
|
-
tags: data.tags,
|
|
109
|
-
updatedAt: sdkClient.unmarshalDate(data.updated_at),
|
|
110
|
-
vpcIntegrationActivated: data.vpc_integration_activated
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
const unmarshalToken = (data) => {
|
|
114
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
115
|
-
throw new TypeError(
|
|
116
|
-
`Unmarshalling the type 'Token' failed as data isn't a dictionary.`
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
return {
|
|
120
|
-
description: data.description,
|
|
121
|
-
expiresAt: sdkClient.unmarshalDate(data.expires_at),
|
|
122
|
-
functionId: data.function_id,
|
|
123
|
-
id: data.id,
|
|
124
|
-
namespaceId: data.namespace_id,
|
|
125
|
-
publicKey: data.public_key,
|
|
126
|
-
status: data.status,
|
|
127
|
-
token: data.token
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
const unmarshalTriggerMnqNatsClientConfig = (data) => {
|
|
131
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
132
|
-
throw new TypeError(
|
|
133
|
-
`Unmarshalling the type 'TriggerMnqNatsClientConfig' failed as data isn't a dictionary.`
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
return {
|
|
137
|
-
mnqCredentialId: data.mnq_credential_id,
|
|
138
|
-
mnqNatsAccountId: data.mnq_nats_account_id,
|
|
139
|
-
mnqProjectId: data.mnq_project_id,
|
|
140
|
-
mnqRegion: data.mnq_region,
|
|
141
|
-
subject: data.subject
|
|
142
|
-
};
|
|
143
|
-
};
|
|
144
|
-
const unmarshalTriggerMnqSqsClientConfig = (data) => {
|
|
145
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
146
|
-
throw new TypeError(
|
|
147
|
-
`Unmarshalling the type 'TriggerMnqSqsClientConfig' failed as data isn't a dictionary.`
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
return {
|
|
151
|
-
mnqCredentialId: data.mnq_credential_id,
|
|
152
|
-
mnqProjectId: data.mnq_project_id,
|
|
153
|
-
mnqRegion: data.mnq_region,
|
|
154
|
-
queue: data.queue
|
|
155
|
-
};
|
|
156
|
-
};
|
|
157
|
-
const unmarshalTriggerSqsClientConfig = (data) => {
|
|
158
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
159
|
-
throw new TypeError(
|
|
160
|
-
`Unmarshalling the type 'TriggerSqsClientConfig' failed as data isn't a dictionary.`
|
|
161
|
-
);
|
|
162
|
-
}
|
|
163
|
-
return {
|
|
164
|
-
accessKey: data.access_key,
|
|
165
|
-
endpoint: data.endpoint,
|
|
166
|
-
queueUrl: data.queue_url,
|
|
167
|
-
secretKey: data.secret_key
|
|
168
|
-
};
|
|
169
|
-
};
|
|
170
|
-
const unmarshalTrigger = (data) => {
|
|
171
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
172
|
-
throw new TypeError(
|
|
173
|
-
`Unmarshalling the type 'Trigger' failed as data isn't a dictionary.`
|
|
174
|
-
);
|
|
175
|
-
}
|
|
176
|
-
return {
|
|
177
|
-
description: data.description,
|
|
178
|
-
errorMessage: data.error_message,
|
|
179
|
-
functionId: data.function_id,
|
|
180
|
-
id: data.id,
|
|
181
|
-
inputType: data.input_type,
|
|
182
|
-
name: data.name,
|
|
183
|
-
scwNatsConfig: data.scw_nats_config ? unmarshalTriggerMnqNatsClientConfig(data.scw_nats_config) : void 0,
|
|
184
|
-
scwSqsConfig: data.scw_sqs_config ? unmarshalTriggerMnqSqsClientConfig(data.scw_sqs_config) : void 0,
|
|
185
|
-
sqsConfig: data.sqs_config ? unmarshalTriggerSqsClientConfig(data.sqs_config) : void 0,
|
|
186
|
-
status: data.status
|
|
187
|
-
};
|
|
188
|
-
};
|
|
189
|
-
const unmarshalDownloadURL = (data) => {
|
|
190
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
191
|
-
throw new TypeError(
|
|
192
|
-
`Unmarshalling the type 'DownloadURL' failed as data isn't a dictionary.`
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
return {
|
|
196
|
-
headers: data.headers,
|
|
197
|
-
url: data.url
|
|
198
|
-
};
|
|
199
|
-
};
|
|
200
|
-
const unmarshalListCronsResponse = (data) => {
|
|
201
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
202
|
-
throw new TypeError(
|
|
203
|
-
`Unmarshalling the type 'ListCronsResponse' failed as data isn't a dictionary.`
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
return {
|
|
207
|
-
crons: sdkClient.unmarshalArrayOfObject(data.crons, unmarshalCron),
|
|
208
|
-
totalCount: data.total_count
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
const unmarshalListDomainsResponse = (data) => {
|
|
212
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
213
|
-
throw new TypeError(
|
|
214
|
-
`Unmarshalling the type 'ListDomainsResponse' failed as data isn't a dictionary.`
|
|
215
|
-
);
|
|
216
|
-
}
|
|
217
|
-
return {
|
|
218
|
-
domains: sdkClient.unmarshalArrayOfObject(data.domains, unmarshalDomain),
|
|
219
|
-
totalCount: data.total_count
|
|
220
|
-
};
|
|
221
|
-
};
|
|
222
|
-
const unmarshalRuntime = (data) => {
|
|
223
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
224
|
-
throw new TypeError(
|
|
225
|
-
`Unmarshalling the type 'Runtime' failed as data isn't a dictionary.`
|
|
226
|
-
);
|
|
227
|
-
}
|
|
228
|
-
return {
|
|
229
|
-
codeSample: data.code_sample,
|
|
230
|
-
defaultHandler: data.default_handler,
|
|
231
|
-
extension: data.extension,
|
|
232
|
-
implementation: data.implementation,
|
|
233
|
-
language: data.language,
|
|
234
|
-
logoUrl: data.logo_url,
|
|
235
|
-
name: data.name,
|
|
236
|
-
status: data.status,
|
|
237
|
-
statusMessage: data.status_message,
|
|
238
|
-
version: data.version
|
|
239
|
-
};
|
|
240
|
-
};
|
|
241
|
-
const unmarshalListFunctionRuntimesResponse = (data) => {
|
|
242
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
243
|
-
throw new TypeError(
|
|
244
|
-
`Unmarshalling the type 'ListFunctionRuntimesResponse' failed as data isn't a dictionary.`
|
|
245
|
-
);
|
|
246
|
-
}
|
|
247
|
-
return {
|
|
248
|
-
runtimes: sdkClient.unmarshalArrayOfObject(data.runtimes, unmarshalRuntime),
|
|
249
|
-
totalCount: data.total_count
|
|
250
|
-
};
|
|
251
|
-
};
|
|
252
|
-
const unmarshalListFunctionsResponse = (data) => {
|
|
253
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
254
|
-
throw new TypeError(
|
|
255
|
-
`Unmarshalling the type 'ListFunctionsResponse' failed as data isn't a dictionary.`
|
|
256
|
-
);
|
|
257
|
-
}
|
|
258
|
-
return {
|
|
259
|
-
functions: sdkClient.unmarshalArrayOfObject(data.functions, unmarshalFunction),
|
|
260
|
-
totalCount: data.total_count
|
|
261
|
-
};
|
|
262
|
-
};
|
|
263
|
-
const unmarshalListNamespacesResponse = (data) => {
|
|
264
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
265
|
-
throw new TypeError(
|
|
266
|
-
`Unmarshalling the type 'ListNamespacesResponse' failed as data isn't a dictionary.`
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
return {
|
|
270
|
-
namespaces: sdkClient.unmarshalArrayOfObject(data.namespaces, unmarshalNamespace),
|
|
271
|
-
totalCount: data.total_count
|
|
272
|
-
};
|
|
273
|
-
};
|
|
274
|
-
const unmarshalListTokensResponse = (data) => {
|
|
275
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
276
|
-
throw new TypeError(
|
|
277
|
-
`Unmarshalling the type 'ListTokensResponse' failed as data isn't a dictionary.`
|
|
278
|
-
);
|
|
279
|
-
}
|
|
280
|
-
return {
|
|
281
|
-
tokens: sdkClient.unmarshalArrayOfObject(data.tokens, unmarshalToken),
|
|
282
|
-
totalCount: data.total_count
|
|
283
|
-
};
|
|
284
|
-
};
|
|
285
|
-
const unmarshalListTriggersResponse = (data) => {
|
|
286
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
287
|
-
throw new TypeError(
|
|
288
|
-
`Unmarshalling the type 'ListTriggersResponse' failed as data isn't a dictionary.`
|
|
289
|
-
);
|
|
290
|
-
}
|
|
291
|
-
return {
|
|
292
|
-
totalCount: data.total_count,
|
|
293
|
-
triggers: sdkClient.unmarshalArrayOfObject(data.triggers, unmarshalTrigger)
|
|
294
|
-
};
|
|
295
|
-
};
|
|
296
|
-
const unmarshalUploadURL = (data) => {
|
|
297
|
-
if (!sdkClient.isJSONObject(data)) {
|
|
298
|
-
throw new TypeError(
|
|
299
|
-
`Unmarshalling the type 'UploadURL' failed as data isn't a dictionary.`
|
|
300
|
-
);
|
|
301
|
-
}
|
|
302
|
-
return {
|
|
303
|
-
headers: data.headers,
|
|
304
|
-
url: data.url
|
|
305
|
-
};
|
|
306
|
-
};
|
|
307
|
-
const marshalCreateCronRequest = (request, defaults) => ({
|
|
308
|
-
args: request.args,
|
|
309
|
-
function_id: request.functionId,
|
|
310
|
-
name: request.name,
|
|
311
|
-
schedule: request.schedule
|
|
312
|
-
});
|
|
313
|
-
const marshalCreateDomainRequest = (request, defaults) => ({
|
|
314
|
-
function_id: request.functionId,
|
|
315
|
-
hostname: request.hostname
|
|
316
|
-
});
|
|
317
|
-
const marshalSecret = (request, defaults) => ({
|
|
318
|
-
key: request.key,
|
|
319
|
-
value: request.value
|
|
320
|
-
});
|
|
321
|
-
const marshalCreateFunctionRequest = (request, defaults) => ({
|
|
322
|
-
description: request.description,
|
|
323
|
-
environment_variables: request.environmentVariables,
|
|
324
|
-
handler: request.handler,
|
|
325
|
-
http_option: request.httpOption,
|
|
326
|
-
max_scale: request.maxScale,
|
|
327
|
-
memory_limit: request.memoryLimit,
|
|
328
|
-
min_scale: request.minScale,
|
|
329
|
-
name: request.name || randomName("fn"),
|
|
330
|
-
namespace_id: request.namespaceId,
|
|
331
|
-
privacy: request.privacy,
|
|
332
|
-
private_network_id: request.privateNetworkId,
|
|
333
|
-
runtime: request.runtime,
|
|
334
|
-
sandbox: request.sandbox,
|
|
335
|
-
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
|
|
336
|
-
(elt) => marshalSecret(elt)
|
|
337
|
-
) : void 0,
|
|
338
|
-
tags: request.tags,
|
|
339
|
-
timeout: request.timeout
|
|
340
|
-
});
|
|
341
|
-
const marshalCreateNamespaceRequest = (request, defaults) => ({
|
|
342
|
-
activate_vpc_integration: request.activateVpcIntegration,
|
|
343
|
-
description: request.description,
|
|
344
|
-
environment_variables: request.environmentVariables,
|
|
345
|
-
name: request.name || randomName("ns"),
|
|
346
|
-
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
347
|
-
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
|
|
348
|
-
(elt) => marshalSecret(elt)
|
|
349
|
-
) : void 0,
|
|
350
|
-
tags: request.tags
|
|
351
|
-
});
|
|
352
|
-
const marshalCreateTokenRequest = (request, defaults) => ({
|
|
353
|
-
description: request.description,
|
|
354
|
-
expires_at: request.expiresAt,
|
|
355
|
-
...sdkClient.resolveOneOf([
|
|
356
|
-
{ param: "function_id", value: request.functionId },
|
|
357
|
-
{ param: "namespace_id", value: request.namespaceId }
|
|
358
|
-
])
|
|
359
|
-
});
|
|
360
|
-
const marshalCreateTriggerRequestMnqNatsClientConfig = (request, defaults) => ({
|
|
361
|
-
mnq_nats_account_id: request.mnqNatsAccountId,
|
|
362
|
-
mnq_project_id: request.mnqProjectId,
|
|
363
|
-
mnq_region: request.mnqRegion,
|
|
364
|
-
subject: request.subject
|
|
365
|
-
});
|
|
366
|
-
const marshalCreateTriggerRequestMnqSqsClientConfig = (request, defaults) => ({
|
|
367
|
-
mnq_project_id: request.mnqProjectId,
|
|
368
|
-
mnq_region: request.mnqRegion,
|
|
369
|
-
queue: request.queue
|
|
370
|
-
});
|
|
371
|
-
const marshalCreateTriggerRequestSqsClientConfig = (request, defaults) => ({
|
|
372
|
-
access_key: request.accessKey,
|
|
373
|
-
endpoint: request.endpoint,
|
|
374
|
-
queue_url: request.queueUrl,
|
|
375
|
-
secret_key: request.secretKey
|
|
376
|
-
});
|
|
377
|
-
const marshalCreateTriggerRequest = (request, defaults) => ({
|
|
378
|
-
description: request.description,
|
|
379
|
-
function_id: request.functionId,
|
|
380
|
-
name: request.name,
|
|
381
|
-
...sdkClient.resolveOneOf([
|
|
382
|
-
{
|
|
383
|
-
param: "scw_sqs_config",
|
|
384
|
-
value: request.scwSqsConfig !== void 0 ? marshalCreateTriggerRequestMnqSqsClientConfig(
|
|
385
|
-
request.scwSqsConfig
|
|
386
|
-
) : void 0
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
param: "scw_nats_config",
|
|
390
|
-
value: request.scwNatsConfig !== void 0 ? marshalCreateTriggerRequestMnqNatsClientConfig(
|
|
391
|
-
request.scwNatsConfig
|
|
392
|
-
) : void 0
|
|
393
|
-
},
|
|
394
|
-
{
|
|
395
|
-
param: "sqs_config",
|
|
396
|
-
value: request.sqsConfig !== void 0 ? marshalCreateTriggerRequestSqsClientConfig(
|
|
397
|
-
request.sqsConfig
|
|
398
|
-
) : void 0
|
|
399
|
-
}
|
|
400
|
-
])
|
|
401
|
-
});
|
|
402
|
-
const marshalUpdateCronRequest = (request, defaults) => ({
|
|
403
|
-
args: request.args,
|
|
404
|
-
function_id: request.functionId,
|
|
405
|
-
name: request.name,
|
|
406
|
-
schedule: request.schedule
|
|
407
|
-
});
|
|
408
|
-
const marshalUpdateFunctionRequest = (request, defaults) => ({
|
|
409
|
-
description: request.description,
|
|
410
|
-
environment_variables: request.environmentVariables,
|
|
411
|
-
handler: request.handler,
|
|
412
|
-
http_option: request.httpOption,
|
|
413
|
-
max_scale: request.maxScale,
|
|
414
|
-
memory_limit: request.memoryLimit,
|
|
415
|
-
min_scale: request.minScale,
|
|
416
|
-
privacy: request.privacy,
|
|
417
|
-
private_network_id: request.privateNetworkId,
|
|
418
|
-
redeploy: request.redeploy,
|
|
419
|
-
runtime: request.runtime,
|
|
420
|
-
sandbox: request.sandbox,
|
|
421
|
-
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
|
|
422
|
-
(elt) => marshalSecret(elt)
|
|
423
|
-
) : void 0,
|
|
424
|
-
tags: request.tags,
|
|
425
|
-
timeout: request.timeout
|
|
426
|
-
});
|
|
427
|
-
const marshalUpdateNamespaceRequest = (request, defaults) => ({
|
|
428
|
-
description: request.description,
|
|
429
|
-
environment_variables: request.environmentVariables,
|
|
430
|
-
secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map(
|
|
431
|
-
(elt) => marshalSecret(elt)
|
|
432
|
-
) : void 0,
|
|
433
|
-
tags: request.tags
|
|
434
|
-
});
|
|
435
|
-
const marshalUpdateTriggerRequestSqsClientConfig = (request, defaults) => ({
|
|
436
|
-
access_key: request.accessKey,
|
|
437
|
-
secret_key: request.secretKey
|
|
438
|
-
});
|
|
439
|
-
const marshalUpdateTriggerRequest = (request, defaults) => ({
|
|
440
|
-
description: request.description,
|
|
441
|
-
name: request.name,
|
|
442
|
-
...sdkClient.resolveOneOf([
|
|
443
|
-
{
|
|
444
|
-
param: "sqs_config",
|
|
445
|
-
value: request.sqsConfig !== void 0 ? marshalUpdateTriggerRequestSqsClientConfig(
|
|
446
|
-
request.sqsConfig
|
|
447
|
-
) : void 0
|
|
448
|
-
}
|
|
449
|
-
])
|
|
450
|
-
});
|
|
451
|
-
exports.marshalCreateCronRequest = marshalCreateCronRequest;
|
|
452
|
-
exports.marshalCreateDomainRequest = marshalCreateDomainRequest;
|
|
453
|
-
exports.marshalCreateFunctionRequest = marshalCreateFunctionRequest;
|
|
454
|
-
exports.marshalCreateNamespaceRequest = marshalCreateNamespaceRequest;
|
|
455
|
-
exports.marshalCreateTokenRequest = marshalCreateTokenRequest;
|
|
456
|
-
exports.marshalCreateTriggerRequest = marshalCreateTriggerRequest;
|
|
457
|
-
exports.marshalUpdateCronRequest = marshalUpdateCronRequest;
|
|
458
|
-
exports.marshalUpdateFunctionRequest = marshalUpdateFunctionRequest;
|
|
459
|
-
exports.marshalUpdateNamespaceRequest = marshalUpdateNamespaceRequest;
|
|
460
|
-
exports.marshalUpdateTriggerRequest = marshalUpdateTriggerRequest;
|
|
461
|
-
exports.unmarshalCron = unmarshalCron;
|
|
462
|
-
exports.unmarshalDomain = unmarshalDomain;
|
|
463
|
-
exports.unmarshalDownloadURL = unmarshalDownloadURL;
|
|
464
|
-
exports.unmarshalFunction = unmarshalFunction;
|
|
465
|
-
exports.unmarshalListCronsResponse = unmarshalListCronsResponse;
|
|
466
|
-
exports.unmarshalListDomainsResponse = unmarshalListDomainsResponse;
|
|
467
|
-
exports.unmarshalListFunctionRuntimesResponse = unmarshalListFunctionRuntimesResponse;
|
|
468
|
-
exports.unmarshalListFunctionsResponse = unmarshalListFunctionsResponse;
|
|
469
|
-
exports.unmarshalListNamespacesResponse = unmarshalListNamespacesResponse;
|
|
470
|
-
exports.unmarshalListTokensResponse = unmarshalListTokensResponse;
|
|
471
|
-
exports.unmarshalListTriggersResponse = unmarshalListTriggersResponse;
|
|
472
|
-
exports.unmarshalNamespace = unmarshalNamespace;
|
|
473
|
-
exports.unmarshalToken = unmarshalToken;
|
|
474
|
-
exports.unmarshalTrigger = unmarshalTrigger;
|
|
475
|
-
exports.unmarshalUploadURL = unmarshalUploadURL;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const CreateFunctionRequest = {
|
|
4
|
-
privateNetworkId: {
|
|
5
|
-
ignoreEmpty: true
|
|
6
|
-
}
|
|
7
|
-
};
|
|
8
|
-
const CreateTriggerRequest = {
|
|
9
|
-
description: {
|
|
10
|
-
maxLength: 255
|
|
11
|
-
},
|
|
12
|
-
name: {
|
|
13
|
-
maxLength: 50,
|
|
14
|
-
minLength: 1
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
const CreateTriggerRequestMnqNatsClientConfig = {
|
|
18
|
-
mnqRegion: {
|
|
19
|
-
maxLength: 20,
|
|
20
|
-
minLength: 1
|
|
21
|
-
},
|
|
22
|
-
subject: {
|
|
23
|
-
maxLength: 100,
|
|
24
|
-
minLength: 1,
|
|
25
|
-
pattern: /^[^\s]+$/
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
const CreateTriggerRequestMnqSqsClientConfig = {
|
|
29
|
-
mnqRegion: {
|
|
30
|
-
maxLength: 20,
|
|
31
|
-
minLength: 1
|
|
32
|
-
},
|
|
33
|
-
queue: {
|
|
34
|
-
maxLength: 100,
|
|
35
|
-
minLength: 1
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
const UpdateFunctionRequest = {
|
|
39
|
-
privateNetworkId: {
|
|
40
|
-
ignoreEmpty: true
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
const UpdateTriggerRequest = {
|
|
44
|
-
description: {
|
|
45
|
-
maxLength: 255
|
|
46
|
-
},
|
|
47
|
-
name: {
|
|
48
|
-
maxLength: 50,
|
|
49
|
-
minLength: 1
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
exports.CreateFunctionRequest = CreateFunctionRequest;
|
|
53
|
-
exports.CreateTriggerRequest = CreateTriggerRequest;
|
|
54
|
-
exports.CreateTriggerRequestMnqNatsClientConfig = CreateTriggerRequestMnqNatsClientConfig;
|
|
55
|
-
exports.CreateTriggerRequestMnqSqsClientConfig = CreateTriggerRequestMnqSqsClientConfig;
|
|
56
|
-
exports.UpdateFunctionRequest = UpdateFunctionRequest;
|
|
57
|
-
exports.UpdateTriggerRequest = UpdateTriggerRequest;
|