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