@scaleway/sdk 1.13.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/account/v2/api.gen.js +77 -60
- package/dist/api/applesilicon/v1alpha1/api.gen.js +175 -173
- package/dist/api/baremetal/v1/api.gen.js +434 -378
- package/dist/api/baremetal/v1/api.utils.js +19 -22
- package/dist/api/billing/v2alpha1/api.gen.js +21 -17
- package/dist/api/cockpit/v1beta1/api.gen.js +308 -232
- package/dist/api/container/v1beta1/api.gen.js +384 -337
- package/dist/api/domain/v2beta1/api.gen.js +754 -668
- package/dist/api/flexibleip/v1alpha1/api.gen.js +164 -151
- package/dist/api/function/v1beta1/api.gen.js +467 -407
- package/dist/api/iam/v1alpha1/api.gen.js +641 -557
- package/dist/api/instance/v1/api.gen.js +802 -677
- package/dist/api/instance/v1/api.utils.js +337 -325
- package/dist/api/instance/v1/marshalling.gen.js +2 -1
- package/dist/api/iot/v1/api.gen.js +508 -452
- package/dist/api/ipfs/index.js +2 -0
- package/dist/api/ipfs/v1alpha1/api.gen.js +197 -0
- package/dist/api/ipfs/v1alpha1/content.gen.js +7 -0
- package/dist/api/ipfs/v1alpha1/index.gen.js +5 -0
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +125 -0
- package/dist/api/k8s/v1/api.gen.js +403 -342
- package/dist/api/k8s/v1/api.utils.js +7 -10
- package/dist/api/k8s/v1/marshalling.gen.js +19 -1
- package/dist/api/k8s/v1/validation-rules.gen.js +10 -1
- package/dist/api/lb/v1/api.gen.js +1501 -1363
- package/dist/api/lb/v1/api.utils.js +71 -75
- package/dist/api/lb/v1/marshalling.gen.js +6 -0
- package/dist/api/marketplace/v1/api.gen.js +35 -32
- package/dist/api/marketplace/v2/api.gen.js +117 -102
- package/dist/api/mnq/v1alpha1/api.gen.js +154 -137
- package/dist/api/rdb/v1/api.gen.js +897 -819
- package/dist/api/redis/v1/api.gen.js +358 -333
- package/dist/api/registry/v1/api.gen.js +211 -189
- package/dist/api/secret/v1alpha1/api.gen.js +265 -245
- package/dist/api/secret/v1alpha1/marshalling.gen.js +1 -0
- package/dist/api/tem/v1alpha1/api.gen.js +183 -156
- package/dist/api/tem/v1alpha1/marshalling.gen.js +32 -1
- package/dist/api/test/v1/api.gen.js +116 -104
- package/dist/api/vpc/v1/api.gen.js +74 -65
- package/dist/api/vpc/v2/api.gen.js +200 -178
- package/dist/api/vpc/v2/marshalling.gen.js +2 -0
- package/dist/api/vpcgw/v1/api.gen.js +575 -501
- package/dist/api/webhosting/v1alpha1/api.gen.js +127 -117
- package/dist/index.cjs +738 -343
- package/dist/index.d.ts +2067 -1592
- package/dist/index.js +28 -26
- package/dist/internal/logger/console-logger.js +4 -5
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/scw-error.js +0 -1
- package/package.json +2 -2
|
@@ -13,11 +13,11 @@ const jsonContentHeaders = {
|
|
|
13
13
|
|
|
14
14
|
/** Serverless Functions API. */
|
|
15
15
|
class API extends API$1 {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
_this = this;
|
|
20
|
-
|
|
16
|
+
/** Lists the available regions of the API. */
|
|
17
|
+
static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
18
|
+
pageOfListNamespaces = (() => {
|
|
19
|
+
var _this = this;
|
|
20
|
+
return function (request) {
|
|
21
21
|
if (request === void 0) {
|
|
22
22
|
request = {};
|
|
23
23
|
}
|
|
@@ -27,341 +27,382 @@ class API extends API$1 {
|
|
|
27
27
|
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
28
28
|
}, unmarshalListNamespacesResponse);
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
})();
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* List all your namespaces. List all existing namespaces in the specified
|
|
34
|
+
* region.
|
|
35
|
+
*
|
|
36
|
+
* @param request - The request {@link ListNamespacesRequest}
|
|
37
|
+
* @returns A Promise of ListNamespacesResponse
|
|
38
|
+
*/
|
|
39
|
+
listNamespaces = (() => {
|
|
40
|
+
var _this2 = this;
|
|
41
|
+
return function (request) {
|
|
38
42
|
if (request === void 0) {
|
|
39
43
|
request = {};
|
|
40
44
|
}
|
|
41
|
-
return enrichForPagination('namespaces',
|
|
45
|
+
return enrichForPagination('namespaces', _this2.pageOfListNamespaces, request);
|
|
42
46
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
47
|
+
})();
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Get a namespace. Get the namespace associated with the specified ID.
|
|
51
|
+
*
|
|
52
|
+
* @param request - The request {@link GetNamespaceRequest}
|
|
53
|
+
* @returns A Promise of Namespace
|
|
54
|
+
*/
|
|
55
|
+
getNamespace = request => this.client.fetch({
|
|
56
|
+
method: 'GET',
|
|
57
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
58
|
+
}, unmarshalNamespace);
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Waits for {@link Namespace} to be in a final state.
|
|
62
|
+
*
|
|
63
|
+
* @param request - The request {@link GetNamespaceRequest}
|
|
64
|
+
* @param options - The waiting options
|
|
65
|
+
* @returns A Promise of Namespace
|
|
66
|
+
*/
|
|
67
|
+
waitForNamespace = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Create a new namespace. Create a new namespace in a specified Organization
|
|
71
|
+
* or Project.
|
|
72
|
+
*
|
|
73
|
+
* @param request - The request {@link CreateNamespaceRequest}
|
|
74
|
+
* @returns A Promise of Namespace
|
|
75
|
+
*/
|
|
76
|
+
createNamespace = (() => {
|
|
77
|
+
var _this3 = this;
|
|
78
|
+
return function (request) {
|
|
69
79
|
if (request === void 0) {
|
|
70
80
|
request = {};
|
|
71
81
|
}
|
|
72
|
-
return
|
|
73
|
-
body: JSON.stringify(marshalCreateNamespaceRequest(request,
|
|
82
|
+
return _this3.client.fetch({
|
|
83
|
+
body: JSON.stringify(marshalCreateNamespaceRequest(request, _this3.client.settings)),
|
|
74
84
|
headers: jsonContentHeaders,
|
|
75
85
|
method: 'POST',
|
|
76
|
-
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ??
|
|
86
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/namespaces`
|
|
77
87
|
}, unmarshalNamespace);
|
|
78
88
|
};
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
89
|
+
})();
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Update an existing namespace. Update the namespace associated with the
|
|
93
|
+
* specified ID.
|
|
94
|
+
*
|
|
95
|
+
* @param request - The request {@link UpdateNamespaceRequest}
|
|
96
|
+
* @returns A Promise of Namespace
|
|
97
|
+
*/
|
|
98
|
+
updateNamespace = request => this.client.fetch({
|
|
99
|
+
body: JSON.stringify(marshalUpdateNamespaceRequest(request, this.client.settings)),
|
|
100
|
+
headers: jsonContentHeaders,
|
|
101
|
+
method: 'PATCH',
|
|
102
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
103
|
+
}, unmarshalNamespace);
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Delete an existing namespace. Delete the namespace associated with the
|
|
107
|
+
* specified ID.
|
|
108
|
+
*
|
|
109
|
+
* @param request - The request {@link DeleteNamespaceRequest}
|
|
110
|
+
* @returns A Promise of Namespace
|
|
111
|
+
*/
|
|
112
|
+
deleteNamespace = request => this.client.fetch({
|
|
113
|
+
method: 'DELETE',
|
|
114
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
115
|
+
}, unmarshalNamespace);
|
|
116
|
+
pageOfListFunctions = request => this.client.fetch({
|
|
117
|
+
method: 'GET',
|
|
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 ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
120
|
+
}, unmarshalListFunctionsResponse);
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* List all your functions.
|
|
124
|
+
*
|
|
125
|
+
* @param request - The request {@link ListFunctionsRequest}
|
|
126
|
+
* @returns A Promise of ListFunctionsResponse
|
|
127
|
+
*/
|
|
128
|
+
listFunctions = request => enrichForPagination('functions', this.pageOfListFunctions, request);
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Get a function. Get the function associated with the specified ID.
|
|
132
|
+
*
|
|
133
|
+
* @param request - The request {@link GetFunctionRequest}
|
|
134
|
+
* @returns A Promise of Function
|
|
135
|
+
*/
|
|
136
|
+
getFunction = request => this.client.fetch({
|
|
137
|
+
method: 'GET',
|
|
138
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}`
|
|
139
|
+
}, unmarshalFunction);
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Waits for {@link Function} to be in a final state.
|
|
143
|
+
*
|
|
144
|
+
* @param request - The request {@link GetFunctionRequest}
|
|
145
|
+
* @param options - The waiting options
|
|
146
|
+
* @returns A Promise of Function
|
|
147
|
+
*/
|
|
148
|
+
waitForFunction = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!FUNCTION_TRANSIENT_STATUSES.includes(res.status))), this.getFunction, request, options);
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Create a new function. Create a new function in the specified region for a
|
|
152
|
+
* specified Organization or Project.
|
|
153
|
+
*
|
|
154
|
+
* @param request - The request {@link CreateFunctionRequest}
|
|
155
|
+
* @returns A Promise of Function
|
|
156
|
+
*/
|
|
157
|
+
createFunction = request => this.client.fetch({
|
|
158
|
+
body: JSON.stringify(marshalCreateFunctionRequest(request, this.client.settings)),
|
|
159
|
+
headers: jsonContentHeaders,
|
|
160
|
+
method: 'POST',
|
|
161
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions`
|
|
162
|
+
}, unmarshalFunction);
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Update an existing function. Update the function associated with the
|
|
166
|
+
* specified ID.
|
|
167
|
+
*
|
|
168
|
+
* @param request - The request {@link UpdateFunctionRequest}
|
|
169
|
+
* @returns A Promise of Function
|
|
170
|
+
*/
|
|
171
|
+
updateFunction = request => this.client.fetch({
|
|
172
|
+
body: JSON.stringify(marshalUpdateFunctionRequest(request, this.client.settings)),
|
|
173
|
+
headers: jsonContentHeaders,
|
|
174
|
+
method: 'PATCH',
|
|
175
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}`
|
|
176
|
+
}, unmarshalFunction);
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Delete a function. Delete the function associated with the specified ID.
|
|
180
|
+
*
|
|
181
|
+
* @param request - The request {@link DeleteFunctionRequest}
|
|
182
|
+
* @returns A Promise of Function
|
|
183
|
+
*/
|
|
184
|
+
deleteFunction = request => this.client.fetch({
|
|
185
|
+
method: 'DELETE',
|
|
186
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}`
|
|
187
|
+
}, unmarshalFunction);
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Deploy a function. Deploy a function associated with the specified ID.
|
|
191
|
+
*
|
|
192
|
+
* @param request - The request {@link DeployFunctionRequest}
|
|
193
|
+
* @returns A Promise of Function
|
|
194
|
+
*/
|
|
195
|
+
deployFunction = request => this.client.fetch({
|
|
196
|
+
body: '{}',
|
|
197
|
+
headers: jsonContentHeaders,
|
|
198
|
+
method: 'POST',
|
|
199
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}/deploy`
|
|
200
|
+
}, unmarshalFunction);
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* List function runtimes. List available function runtimes.
|
|
204
|
+
*
|
|
205
|
+
* @param request - The request {@link ListFunctionRuntimesRequest}
|
|
206
|
+
* @returns A Promise of ListFunctionRuntimesResponse
|
|
207
|
+
*/
|
|
208
|
+
listFunctionRuntimes = (() => {
|
|
209
|
+
var _this4 = this;
|
|
210
|
+
return function (request) {
|
|
188
211
|
if (request === void 0) {
|
|
189
212
|
request = {};
|
|
190
213
|
}
|
|
191
|
-
return
|
|
214
|
+
return _this4.client.fetch({
|
|
192
215
|
method: 'GET',
|
|
193
|
-
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ??
|
|
216
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this4.client.settings.defaultRegion)}/runtimes`
|
|
194
217
|
}, unmarshalListFunctionRuntimesResponse);
|
|
195
218
|
};
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
},
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
219
|
+
})();
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Get an upload URL of a function. Get an upload URL of a function associated
|
|
223
|
+
* with the specified ID.
|
|
224
|
+
*
|
|
225
|
+
* @param request - The request {@link GetFunctionUploadURLRequest}
|
|
226
|
+
* @returns A Promise of UploadURL
|
|
227
|
+
*/
|
|
228
|
+
getFunctionUploadURL = request => this.client.fetch({
|
|
229
|
+
method: 'GET',
|
|
230
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}/upload-url`,
|
|
231
|
+
urlParams: urlParams(['content_length', request.contentLength])
|
|
232
|
+
}, unmarshalUploadURL);
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Get a download URL of a function. Get a download URL for a function
|
|
236
|
+
* associated with the specified ID.
|
|
237
|
+
*
|
|
238
|
+
* @param request - The request {@link GetFunctionDownloadURLRequest}
|
|
239
|
+
* @returns A Promise of DownloadURL
|
|
240
|
+
*/
|
|
241
|
+
getFunctionDownloadURL = request => this.client.fetch({
|
|
242
|
+
method: 'GET',
|
|
243
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/functions/${validatePathParam('functionId', request.functionId)}/download-url`
|
|
244
|
+
}, unmarshalDownloadURL);
|
|
245
|
+
pageOfListCrons = request => this.client.fetch({
|
|
246
|
+
method: 'GET',
|
|
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 ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
249
|
+
}, unmarshalListCronsResponse);
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* List all crons. List all the cronjobs in a specified region.
|
|
253
|
+
*
|
|
254
|
+
* @param request - The request {@link ListCronsRequest}
|
|
255
|
+
* @returns A Promise of ListCronsResponse
|
|
256
|
+
*/
|
|
257
|
+
listCrons = request => enrichForPagination('crons', this.pageOfListCrons, request);
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Get a cron. Get the cron associated with the specified ID.
|
|
261
|
+
*
|
|
262
|
+
* @param request - The request {@link GetCronRequest}
|
|
263
|
+
* @returns A Promise of Cron
|
|
264
|
+
*/
|
|
265
|
+
getCron = request => this.client.fetch({
|
|
266
|
+
method: 'GET',
|
|
267
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
|
|
268
|
+
}, unmarshalCron);
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Waits for {@link Cron} to be in a final state.
|
|
272
|
+
*
|
|
273
|
+
* @param request - The request {@link GetCronRequest}
|
|
274
|
+
* @param options - The waiting options
|
|
275
|
+
* @returns A Promise of Cron
|
|
276
|
+
*/
|
|
277
|
+
waitForCron = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CRON_TRANSIENT_STATUSES.includes(res.status))), this.getCron, request, options);
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Create a new cron. Create a new cronjob for a function with the specified
|
|
281
|
+
* ID.
|
|
282
|
+
*
|
|
283
|
+
* @param request - The request {@link CreateCronRequest}
|
|
284
|
+
* @returns A Promise of Cron
|
|
285
|
+
*/
|
|
286
|
+
createCron = request => this.client.fetch({
|
|
287
|
+
body: JSON.stringify(marshalCreateCronRequest(request, this.client.settings)),
|
|
288
|
+
headers: jsonContentHeaders,
|
|
289
|
+
method: 'POST',
|
|
290
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons`
|
|
291
|
+
}, unmarshalCron);
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Update an existing cron. Update the cron associated with the specified ID.
|
|
295
|
+
*
|
|
296
|
+
* @param request - The request {@link UpdateCronRequest}
|
|
297
|
+
* @returns A Promise of Cron
|
|
298
|
+
*/
|
|
299
|
+
updateCron = request => this.client.fetch({
|
|
300
|
+
body: JSON.stringify(marshalUpdateCronRequest(request, this.client.settings)),
|
|
301
|
+
headers: jsonContentHeaders,
|
|
302
|
+
method: 'PATCH',
|
|
303
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
|
|
304
|
+
}, unmarshalCron);
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Delete an existing cron. Delete the cron associated with the specified ID.
|
|
308
|
+
*
|
|
309
|
+
* @param request - The request {@link DeleteCronRequest}
|
|
310
|
+
* @returns A Promise of Cron
|
|
311
|
+
*/
|
|
312
|
+
deleteCron = request => this.client.fetch({
|
|
313
|
+
method: 'DELETE',
|
|
314
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
|
|
315
|
+
}, unmarshalCron);
|
|
316
|
+
pageOfListLogs = request => this.client.fetch({
|
|
317
|
+
method: 'GET',
|
|
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 ?? 'timestamp_desc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
320
|
+
}, unmarshalListLogsResponse);
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* List application logs. List the application logs of the function with the
|
|
324
|
+
* specified ID.
|
|
325
|
+
*
|
|
326
|
+
* @param request - The request {@link ListLogsRequest}
|
|
327
|
+
* @returns A Promise of ListLogsResponse
|
|
328
|
+
*/
|
|
329
|
+
listLogs = request => enrichForPagination('logs', this.pageOfListLogs, request);
|
|
330
|
+
pageOfListDomains = request => this.client.fetch({
|
|
331
|
+
method: 'GET',
|
|
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 ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
334
|
+
}, unmarshalListDomainsResponse);
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* List all domain name bindings. List all domain name bindings in a specified
|
|
338
|
+
* region.
|
|
339
|
+
*
|
|
340
|
+
* @param request - The request {@link ListDomainsRequest}
|
|
341
|
+
* @returns A Promise of ListDomainsResponse
|
|
342
|
+
*/
|
|
343
|
+
listDomains = request => enrichForPagination('domains', this.pageOfListDomains, request);
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Get a domain name binding. Get a domain name binding for the function with
|
|
347
|
+
* the specified ID.
|
|
348
|
+
*
|
|
349
|
+
* @param request - The request {@link GetDomainRequest}
|
|
350
|
+
* @returns A Promise of Domain
|
|
351
|
+
*/
|
|
352
|
+
getDomain = request => this.client.fetch({
|
|
353
|
+
method: 'GET',
|
|
354
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}`
|
|
355
|
+
}, unmarshalDomain);
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Waits for {@link Domain} to be in a final state.
|
|
359
|
+
*
|
|
360
|
+
* @param request - The request {@link GetDomainRequest}
|
|
361
|
+
* @param options - The waiting options
|
|
362
|
+
* @returns A Promise of Domain
|
|
363
|
+
*/
|
|
364
|
+
waitForDomain = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Create a domain name binding. Create a domain name binding for the function
|
|
368
|
+
* with the specified ID.
|
|
369
|
+
*
|
|
370
|
+
* @param request - The request {@link CreateDomainRequest}
|
|
371
|
+
* @returns A Promise of Domain
|
|
372
|
+
*/
|
|
373
|
+
createDomain = request => this.client.fetch({
|
|
374
|
+
body: JSON.stringify(marshalCreateDomainRequest(request, this.client.settings)),
|
|
375
|
+
headers: jsonContentHeaders,
|
|
376
|
+
method: 'POST',
|
|
377
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`
|
|
378
|
+
}, unmarshalDomain);
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Delete a domain name binding. Delete a domain name binding for the function
|
|
382
|
+
* with the specified ID.
|
|
383
|
+
*
|
|
384
|
+
* @param request - The request {@link DeleteDomainRequest}
|
|
385
|
+
* @returns A Promise of Domain
|
|
386
|
+
*/
|
|
387
|
+
deleteDomain = request => this.client.fetch({
|
|
388
|
+
method: 'DELETE',
|
|
389
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}`
|
|
390
|
+
}, unmarshalDomain);
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* @deprecated
|
|
394
|
+
* @param request - The request {@link IssueJWTRequest}
|
|
395
|
+
* @returns A Promise of Token
|
|
396
|
+
*/
|
|
397
|
+
issueJWT = (() => {
|
|
398
|
+
var _this5 = this;
|
|
399
|
+
return function (request) {
|
|
359
400
|
if (request === void 0) {
|
|
360
401
|
request = {};
|
|
361
402
|
}
|
|
362
|
-
return
|
|
403
|
+
return _this5.client.fetch({
|
|
363
404
|
method: 'GET',
|
|
364
|
-
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ??
|
|
405
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this5.client.settings.defaultRegion)}/issue-jwt`,
|
|
365
406
|
urlParams: urlParams(['expires_at', request.expiresAt], ...Object.entries(resolveOneOf([{
|
|
366
407
|
param: 'function_id',
|
|
367
408
|
value: request.functionId
|
|
@@ -371,100 +412,118 @@ class API extends API$1 {
|
|
|
371
412
|
}])))
|
|
372
413
|
}, unmarshalToken);
|
|
373
414
|
};
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
415
|
+
})();
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Create a new revocable token.
|
|
419
|
+
*
|
|
420
|
+
* @param request - The request {@link CreateTokenRequest}
|
|
421
|
+
* @returns A Promise of Token
|
|
422
|
+
*/
|
|
423
|
+
createToken = (() => {
|
|
424
|
+
var _this6 = this;
|
|
425
|
+
return function (request) {
|
|
381
426
|
if (request === void 0) {
|
|
382
427
|
request = {};
|
|
383
428
|
}
|
|
384
|
-
return
|
|
385
|
-
body: JSON.stringify(marshalCreateTokenRequest(request,
|
|
429
|
+
return _this6.client.fetch({
|
|
430
|
+
body: JSON.stringify(marshalCreateTokenRequest(request, _this6.client.settings)),
|
|
386
431
|
headers: jsonContentHeaders,
|
|
387
432
|
method: 'POST',
|
|
388
|
-
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ??
|
|
433
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this6.client.settings.defaultRegion)}/tokens`
|
|
389
434
|
}, unmarshalToken);
|
|
390
435
|
};
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
436
|
+
})();
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Get a token.
|
|
440
|
+
*
|
|
441
|
+
* @param request - The request {@link GetTokenRequest}
|
|
442
|
+
* @returns A Promise of Token
|
|
443
|
+
*/
|
|
444
|
+
getToken = request => this.client.fetch({
|
|
445
|
+
method: 'GET',
|
|
446
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
447
|
+
}, unmarshalToken);
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Waits for {@link Token} to be in a final state.
|
|
451
|
+
*
|
|
452
|
+
* @param request - The request {@link GetTokenRequest}
|
|
453
|
+
* @param options - The waiting options
|
|
454
|
+
* @returns A Promise of Token
|
|
455
|
+
*/
|
|
456
|
+
waitForToken = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!TOKEN_TRANSIENT_STATUSES.includes(res.status))), this.getToken, request, options);
|
|
457
|
+
pageOfListTokens = (() => {
|
|
458
|
+
var _this7 = this;
|
|
459
|
+
return function (request) {
|
|
410
460
|
if (request === void 0) {
|
|
411
461
|
request = {};
|
|
412
462
|
}
|
|
413
|
-
return
|
|
463
|
+
return _this7.client.fetch({
|
|
414
464
|
method: 'GET',
|
|
415
|
-
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ??
|
|
416
|
-
urlParams: urlParams(['function_id', request.functionId], ['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ??
|
|
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 ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize])
|
|
417
467
|
}, unmarshalListTokensResponse);
|
|
418
468
|
};
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
469
|
+
})();
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* List all tokens.
|
|
473
|
+
*
|
|
474
|
+
* @param request - The request {@link ListTokensRequest}
|
|
475
|
+
* @returns A Promise of ListTokensResponse
|
|
476
|
+
*/
|
|
477
|
+
listTokens = (() => {
|
|
478
|
+
var _this8 = this;
|
|
479
|
+
return function (request) {
|
|
426
480
|
if (request === void 0) {
|
|
427
481
|
request = {};
|
|
428
482
|
}
|
|
429
|
-
return enrichForPagination('tokens',
|
|
483
|
+
return enrichForPagination('tokens', _this8.pageOfListTokens, request);
|
|
430
484
|
};
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
485
|
+
})();
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Delete a token.
|
|
489
|
+
*
|
|
490
|
+
* @param request - The request {@link DeleteTokenRequest}
|
|
491
|
+
* @returns A Promise of Token
|
|
492
|
+
*/
|
|
493
|
+
deleteToken = request => this.client.fetch({
|
|
494
|
+
method: 'DELETE',
|
|
495
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
|
|
496
|
+
}, unmarshalToken);
|
|
497
|
+
createTrigger = request => this.client.fetch({
|
|
498
|
+
body: JSON.stringify(marshalCreateTriggerRequest(request, this.client.settings)),
|
|
499
|
+
headers: jsonContentHeaders,
|
|
500
|
+
method: 'POST',
|
|
501
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers`
|
|
502
|
+
}, unmarshalTrigger);
|
|
503
|
+
getTrigger = request => this.client.fetch({
|
|
504
|
+
method: 'GET',
|
|
505
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
|
|
506
|
+
}, unmarshalTrigger);
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Waits for {@link Trigger} to be in a final state.
|
|
510
|
+
*
|
|
511
|
+
* @param request - The request {@link GetTriggerRequest}
|
|
512
|
+
* @param options - The waiting options
|
|
513
|
+
* @returns A Promise of Trigger
|
|
514
|
+
*/
|
|
515
|
+
waitForTrigger = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!TRIGGER_TRANSIENT_STATUSES.includes(res.status))), this.getTrigger, request, options);
|
|
516
|
+
pageOfListTriggers = (() => {
|
|
517
|
+
var _this9 = this;
|
|
518
|
+
return function (request) {
|
|
460
519
|
if (request === void 0) {
|
|
461
520
|
request = {};
|
|
462
521
|
}
|
|
463
|
-
return
|
|
522
|
+
return _this9.client.fetch({
|
|
464
523
|
method: 'GET',
|
|
465
|
-
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ??
|
|
466
|
-
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ??
|
|
467
|
-
default:
|
|
524
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? _this9.client.settings.defaultRegion)}/triggers`,
|
|
525
|
+
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? _this9.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([{
|
|
526
|
+
default: _this9.client.settings.defaultProjectId,
|
|
468
527
|
param: 'project_id',
|
|
469
528
|
value: request.projectId
|
|
470
529
|
}, {
|
|
@@ -476,25 +535,26 @@ class API extends API$1 {
|
|
|
476
535
|
}])))
|
|
477
536
|
}, unmarshalListTriggersResponse);
|
|
478
537
|
};
|
|
479
|
-
|
|
538
|
+
})();
|
|
539
|
+
listTriggers = (() => {
|
|
540
|
+
var _this10 = this;
|
|
541
|
+
return function (request) {
|
|
480
542
|
if (request === void 0) {
|
|
481
543
|
request = {};
|
|
482
544
|
}
|
|
483
|
-
return enrichForPagination('triggers',
|
|
545
|
+
return enrichForPagination('triggers', _this10.pageOfListTriggers, request);
|
|
484
546
|
};
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
},
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
},
|
|
495
|
-
}
|
|
496
|
-
/** Lists the available regions of the API. */
|
|
547
|
+
})();
|
|
548
|
+
updateTrigger = request => this.client.fetch({
|
|
549
|
+
body: JSON.stringify(marshalUpdateTriggerRequest(request, this.client.settings)),
|
|
550
|
+
headers: jsonContentHeaders,
|
|
551
|
+
method: 'PATCH',
|
|
552
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
|
|
553
|
+
}, unmarshalTrigger);
|
|
554
|
+
deleteTrigger = request => this.client.fetch({
|
|
555
|
+
method: 'DELETE',
|
|
556
|
+
path: `/functions/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
|
|
557
|
+
}, unmarshalTrigger);
|
|
497
558
|
}
|
|
498
|
-
API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
499
559
|
|
|
500
560
|
export { API };
|