@scaleway/sdk-function 2.3.0 → 2.3.2

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.
@@ -1,3 +1,4 @@
1
+ //#region \0rolldown/runtime.js
1
2
  var __defProp = Object.defineProperty;
2
3
  var __exportAll = (all, no_symbols) => {
3
4
  let target = {};
@@ -8,4 +9,5 @@ var __exportAll = (all, no_symbols) => {
8
9
  if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
9
10
  return target;
10
11
  };
12
+ //#endregion
11
13
  export { __exportAll };
@@ -1,13 +1,14 @@
1
1
  import { CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, FUNCTION_TRANSIENT_STATUSES, NAMESPACE_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES, TRIGGER_TRANSIENT_STATUSES } from "./content.gen.js";
2
2
  import { 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 } from "./marshalling.gen.js";
3
- import { API, enrichForPagination, resolveOneOf, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
3
+ import { API as API$1, enrichForPagination, resolveOneOf, toApiLocality, urlParams, validatePathParam, waitForResource } from "@scaleway/sdk-client";
4
+ //#region src/v1beta1/api.gen.ts
4
5
  var jsonContentHeaders = { "Content-Type": "application/json; charset=utf-8" };
5
6
  /**
6
7
  * Serverless Functions API.
7
8
 
8
9
  This API allows you to manage your Serverless Functions.
9
10
  */
10
- var API$1 = class extends API {
11
+ var API = class extends API$1 {
11
12
  /**
12
13
  * Locality of this API.
13
14
  * type ∈ {'zone','region','global','unspecified'}
@@ -439,4 +440,5 @@ var API$1 = class extends API {
439
440
  path: `/functions/v1beta1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam("triggerId", request.triggerId)}`
440
441
  }, unmarshalTrigger);
441
442
  };
442
- export { API$1 as API };
443
+ //#endregion
444
+ export { API };
@@ -1,33 +1,35 @@
1
+ //#region src/v1beta1/content.gen.ts
1
2
  /** Lists transient statutes of the enum {@link CronStatus}. */
2
- const CRON_TRANSIENT_STATUSES = [
3
+ var CRON_TRANSIENT_STATUSES = [
3
4
  "deleting",
4
5
  "creating",
5
6
  "pending"
6
7
  ];
7
8
  /** Lists transient statutes of the enum {@link DomainStatus}. */
8
- const DOMAIN_TRANSIENT_STATUSES = [
9
+ var DOMAIN_TRANSIENT_STATUSES = [
9
10
  "deleting",
10
11
  "creating",
11
12
  "pending"
12
13
  ];
13
14
  /** Lists transient statutes of the enum {@link FunctionStatus}. */
14
- const FUNCTION_TRANSIENT_STATUSES = [
15
+ var FUNCTION_TRANSIENT_STATUSES = [
15
16
  "deleting",
16
17
  "creating",
17
18
  "pending"
18
19
  ];
19
20
  /** Lists transient statutes of the enum {@link NamespaceStatus}. */
20
- const NAMESPACE_TRANSIENT_STATUSES = [
21
+ var NAMESPACE_TRANSIENT_STATUSES = [
21
22
  "deleting",
22
23
  "creating",
23
24
  "pending"
24
25
  ];
25
26
  /** Lists transient statutes of the enum {@link TokenStatus}. */
26
- const TOKEN_TRANSIENT_STATUSES = ["deleting", "creating"];
27
+ var TOKEN_TRANSIENT_STATUSES = ["deleting", "creating"];
27
28
  /** Lists transient statutes of the enum {@link TriggerStatus}. */
28
- const TRIGGER_TRANSIENT_STATUSES = [
29
+ var TRIGGER_TRANSIENT_STATUSES = [
29
30
  "deleting",
30
31
  "creating",
31
32
  "pending"
32
33
  ];
34
+ //#endregion
33
35
  export { CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, FUNCTION_TRANSIENT_STATUSES, NAMESPACE_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES, TRIGGER_TRANSIENT_STATUSES };
@@ -3,6 +3,7 @@ import { CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, FUNCTION_TRANSIENT_
3
3
  import { 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 } from "./marshalling.gen.js";
4
4
  import { API } from "./api.gen.js";
5
5
  import { validation_rules_gen_exports } from "./validation-rules.gen.js";
6
+ //#region src/v1beta1/index.gen.ts
6
7
  var index_gen_exports = /* @__PURE__ */ __exportAll({
7
8
  API: () => API,
8
9
  CRON_TRANSIENT_STATUSES: () => CRON_TRANSIENT_STATUSES,
@@ -38,4 +39,5 @@ var index_gen_exports = /* @__PURE__ */ __exportAll({
38
39
  unmarshalTrigger: () => unmarshalTrigger,
39
40
  unmarshalUploadURL: () => unmarshalUploadURL
40
41
  });
41
- export { index_gen_exports };
42
+ //#endregion
43
+ export { API, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, FUNCTION_TRANSIENT_STATUSES, NAMESPACE_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES, TRIGGER_TRANSIENT_STATUSES, validation_rules_gen_exports as ValidationRules, index_gen_exports, 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 };
@@ -1,6 +1,7 @@
1
1
  import { isJSONObject, resolveOneOf, unmarshalArrayOfObject, unmarshalDate } from "@scaleway/sdk-client";
2
2
  import randomName from "@scaleway/random-name";
3
- const unmarshalCron = (data) => {
3
+ //#region src/v1beta1/marshalling.gen.ts
4
+ var unmarshalCron = (data) => {
4
5
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Cron' failed as data isn't a dictionary.`);
5
6
  return {
6
7
  args: data.args,
@@ -11,7 +12,7 @@ const unmarshalCron = (data) => {
11
12
  status: data.status
12
13
  };
13
14
  };
14
- const unmarshalDomain = (data) => {
15
+ var unmarshalDomain = (data) => {
15
16
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Domain' failed as data isn't a dictionary.`);
16
17
  return {
17
18
  errorMessage: data.error_message,
@@ -29,7 +30,7 @@ var unmarshalSecretHashedValue = (data) => {
29
30
  key: data.key
30
31
  };
31
32
  };
32
- const unmarshalFunction = (data) => {
33
+ var unmarshalFunction = (data) => {
33
34
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Function' failed as data isn't a dictionary.`);
34
35
  return {
35
36
  buildMessage: data.build_message,
@@ -61,7 +62,7 @@ const unmarshalFunction = (data) => {
61
62
  updatedAt: unmarshalDate(data.updated_at)
62
63
  };
63
64
  };
64
- const unmarshalNamespace = (data) => {
65
+ var unmarshalNamespace = (data) => {
65
66
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Namespace' failed as data isn't a dictionary.`);
66
67
  return {
67
68
  createdAt: unmarshalDate(data.created_at),
@@ -82,7 +83,7 @@ const unmarshalNamespace = (data) => {
82
83
  vpcIntegrationActivated: data.vpc_integration_activated
83
84
  };
84
85
  };
85
- const unmarshalToken = (data) => {
86
+ var unmarshalToken = (data) => {
86
87
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Token' failed as data isn't a dictionary.`);
87
88
  return {
88
89
  description: data.description,
@@ -123,7 +124,7 @@ var unmarshalTriggerSqsClientConfig = (data) => {
123
124
  secretKey: data.secret_key
124
125
  };
125
126
  };
126
- const unmarshalTrigger = (data) => {
127
+ var unmarshalTrigger = (data) => {
127
128
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'Trigger' failed as data isn't a dictionary.`);
128
129
  return {
129
130
  description: data.description,
@@ -138,21 +139,21 @@ const unmarshalTrigger = (data) => {
138
139
  status: data.status
139
140
  };
140
141
  };
141
- const unmarshalDownloadURL = (data) => {
142
+ var unmarshalDownloadURL = (data) => {
142
143
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'DownloadURL' failed as data isn't a dictionary.`);
143
144
  return {
144
145
  headers: data.headers,
145
146
  url: data.url
146
147
  };
147
148
  };
148
- const unmarshalListCronsResponse = (data) => {
149
+ var unmarshalListCronsResponse = (data) => {
149
150
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListCronsResponse' failed as data isn't a dictionary.`);
150
151
  return {
151
152
  crons: unmarshalArrayOfObject(data.crons, unmarshalCron),
152
153
  totalCount: data.total_count
153
154
  };
154
155
  };
155
- const unmarshalListDomainsResponse = (data) => {
156
+ var unmarshalListDomainsResponse = (data) => {
156
157
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListDomainsResponse' failed as data isn't a dictionary.`);
157
158
  return {
158
159
  domains: unmarshalArrayOfObject(data.domains, unmarshalDomain),
@@ -174,55 +175,55 @@ var unmarshalRuntime = (data) => {
174
175
  version: data.version
175
176
  };
176
177
  };
177
- const unmarshalListFunctionRuntimesResponse = (data) => {
178
+ var unmarshalListFunctionRuntimesResponse = (data) => {
178
179
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListFunctionRuntimesResponse' failed as data isn't a dictionary.`);
179
180
  return {
180
181
  runtimes: unmarshalArrayOfObject(data.runtimes, unmarshalRuntime),
181
182
  totalCount: data.total_count
182
183
  };
183
184
  };
184
- const unmarshalListFunctionsResponse = (data) => {
185
+ var unmarshalListFunctionsResponse = (data) => {
185
186
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListFunctionsResponse' failed as data isn't a dictionary.`);
186
187
  return {
187
188
  functions: unmarshalArrayOfObject(data.functions, unmarshalFunction),
188
189
  totalCount: data.total_count
189
190
  };
190
191
  };
191
- const unmarshalListNamespacesResponse = (data) => {
192
+ var unmarshalListNamespacesResponse = (data) => {
192
193
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListNamespacesResponse' failed as data isn't a dictionary.`);
193
194
  return {
194
195
  namespaces: unmarshalArrayOfObject(data.namespaces, unmarshalNamespace),
195
196
  totalCount: data.total_count
196
197
  };
197
198
  };
198
- const unmarshalListTokensResponse = (data) => {
199
+ var unmarshalListTokensResponse = (data) => {
199
200
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListTokensResponse' failed as data isn't a dictionary.`);
200
201
  return {
201
202
  tokens: unmarshalArrayOfObject(data.tokens, unmarshalToken),
202
203
  totalCount: data.total_count
203
204
  };
204
205
  };
205
- const unmarshalListTriggersResponse = (data) => {
206
+ var unmarshalListTriggersResponse = (data) => {
206
207
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListTriggersResponse' failed as data isn't a dictionary.`);
207
208
  return {
208
209
  totalCount: data.total_count,
209
210
  triggers: unmarshalArrayOfObject(data.triggers, unmarshalTrigger)
210
211
  };
211
212
  };
212
- const unmarshalUploadURL = (data) => {
213
+ var unmarshalUploadURL = (data) => {
213
214
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'UploadURL' failed as data isn't a dictionary.`);
214
215
  return {
215
216
  headers: data.headers,
216
217
  url: data.url
217
218
  };
218
219
  };
219
- const marshalCreateCronRequest = (request, defaults) => ({
220
+ var marshalCreateCronRequest = (request, defaults) => ({
220
221
  args: request.args,
221
222
  function_id: request.functionId,
222
223
  name: request.name,
223
224
  schedule: request.schedule
224
225
  });
225
- const marshalCreateDomainRequest = (request, defaults) => ({
226
+ var marshalCreateDomainRequest = (request, defaults) => ({
226
227
  function_id: request.functionId,
227
228
  hostname: request.hostname
228
229
  });
@@ -230,7 +231,7 @@ var marshalSecret = (request, defaults) => ({
230
231
  key: request.key,
231
232
  value: request.value
232
233
  });
233
- const marshalCreateFunctionRequest = (request, defaults) => ({
234
+ var marshalCreateFunctionRequest = (request, defaults) => ({
234
235
  description: request.description,
235
236
  environment_variables: request.environmentVariables,
236
237
  handler: request.handler,
@@ -248,7 +249,7 @@ const marshalCreateFunctionRequest = (request, defaults) => ({
248
249
  tags: request.tags,
249
250
  timeout: request.timeout
250
251
  });
251
- const marshalCreateNamespaceRequest = (request, defaults) => ({
252
+ var marshalCreateNamespaceRequest = (request, defaults) => ({
252
253
  activate_vpc_integration: request.activateVpcIntegration,
253
254
  description: request.description,
254
255
  environment_variables: request.environmentVariables,
@@ -257,7 +258,7 @@ const marshalCreateNamespaceRequest = (request, defaults) => ({
257
258
  secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map((elt) => marshalSecret(elt, defaults)) : void 0,
258
259
  tags: request.tags
259
260
  });
260
- const marshalCreateTokenRequest = (request, defaults) => ({
261
+ var marshalCreateTokenRequest = (request, defaults) => ({
261
262
  description: request.description,
262
263
  expires_at: request.expiresAt,
263
264
  ...resolveOneOf([{
@@ -285,7 +286,7 @@ var marshalCreateTriggerRequestSqsClientConfig = (request, defaults) => ({
285
286
  queue_url: request.queueUrl,
286
287
  secret_key: request.secretKey
287
288
  });
288
- const marshalCreateTriggerRequest = (request, defaults) => ({
289
+ var marshalCreateTriggerRequest = (request, defaults) => ({
289
290
  description: request.description,
290
291
  function_id: request.functionId,
291
292
  name: request.name,
@@ -304,13 +305,13 @@ const marshalCreateTriggerRequest = (request, defaults) => ({
304
305
  }
305
306
  ])
306
307
  });
307
- const marshalUpdateCronRequest = (request, defaults) => ({
308
+ var marshalUpdateCronRequest = (request, defaults) => ({
308
309
  args: request.args,
309
310
  function_id: request.functionId,
310
311
  name: request.name,
311
312
  schedule: request.schedule
312
313
  });
313
- const marshalUpdateFunctionRequest = (request, defaults) => ({
314
+ var marshalUpdateFunctionRequest = (request, defaults) => ({
314
315
  description: request.description,
315
316
  environment_variables: request.environmentVariables,
316
317
  handler: request.handler,
@@ -327,7 +328,7 @@ const marshalUpdateFunctionRequest = (request, defaults) => ({
327
328
  tags: request.tags,
328
329
  timeout: request.timeout
329
330
  });
330
- const marshalUpdateNamespaceRequest = (request, defaults) => ({
331
+ var marshalUpdateNamespaceRequest = (request, defaults) => ({
331
332
  description: request.description,
332
333
  environment_variables: request.environmentVariables,
333
334
  secret_environment_variables: request.secretEnvironmentVariables !== void 0 ? request.secretEnvironmentVariables.map((elt) => marshalSecret(elt, defaults)) : void 0,
@@ -337,7 +338,7 @@ var marshalUpdateTriggerRequestSqsClientConfig = (request, defaults) => ({
337
338
  access_key: request.accessKey,
338
339
  secret_key: request.secretKey
339
340
  });
340
- const marshalUpdateTriggerRequest = (request, defaults) => ({
341
+ var marshalUpdateTriggerRequest = (request, defaults) => ({
341
342
  description: request.description,
342
343
  name: request.name,
343
344
  ...resolveOneOf([{
@@ -345,4 +346,5 @@ const marshalUpdateTriggerRequest = (request, defaults) => ({
345
346
  value: request.sqsConfig !== void 0 ? marshalUpdateTriggerRequestSqsClientConfig(request.sqsConfig, defaults) : void 0
346
347
  }])
347
348
  });
349
+ //#endregion
348
350
  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 };
File without changes
@@ -1,4 +1,5 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ //#region src/v1beta1/validation-rules.gen.ts
2
3
  var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
3
4
  CreateFunctionRequest: () => CreateFunctionRequest,
4
5
  CreateTriggerRequest: () => CreateTriggerRequest,
@@ -7,15 +8,15 @@ var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({
7
8
  UpdateFunctionRequest: () => UpdateFunctionRequest,
8
9
  UpdateTriggerRequest: () => UpdateTriggerRequest
9
10
  });
10
- const CreateFunctionRequest = { privateNetworkId: { ignoreEmpty: true } };
11
- const CreateTriggerRequest = {
11
+ var CreateFunctionRequest = { privateNetworkId: { ignoreEmpty: true } };
12
+ var CreateTriggerRequest = {
12
13
  description: { maxLength: 255 },
13
14
  name: {
14
15
  maxLength: 50,
15
16
  minLength: 1
16
17
  }
17
18
  };
18
- const CreateTriggerRequestMnqNatsClientConfig = {
19
+ var CreateTriggerRequestMnqNatsClientConfig = {
19
20
  mnqRegion: {
20
21
  maxLength: 20,
21
22
  minLength: 1
@@ -26,7 +27,7 @@ const CreateTriggerRequestMnqNatsClientConfig = {
26
27
  pattern: /^[^\s]+$/
27
28
  }
28
29
  };
29
- const CreateTriggerRequestMnqSqsClientConfig = {
30
+ var CreateTriggerRequestMnqSqsClientConfig = {
30
31
  mnqRegion: {
31
32
  maxLength: 20,
32
33
  minLength: 1
@@ -36,12 +37,13 @@ const CreateTriggerRequestMnqSqsClientConfig = {
36
37
  minLength: 1
37
38
  }
38
39
  };
39
- const UpdateFunctionRequest = { privateNetworkId: { ignoreEmpty: true } };
40
- const UpdateTriggerRequest = {
40
+ var UpdateFunctionRequest = { privateNetworkId: { ignoreEmpty: true } };
41
+ var UpdateTriggerRequest = {
41
42
  description: { maxLength: 255 },
42
43
  name: {
43
44
  maxLength: 50,
44
45
  minLength: 1
45
46
  }
46
47
  };
47
- export { validation_rules_gen_exports };
48
+ //#endregion
49
+ export { CreateFunctionRequest, CreateTriggerRequest, CreateTriggerRequestMnqNatsClientConfig, CreateTriggerRequestMnqSqsClientConfig, UpdateFunctionRequest, UpdateTriggerRequest, validation_rules_gen_exports };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-function",
3
- "version": "2.3.0",
3
+ "version": "2.3.2",
4
4
  "description": "Scaleway SDK function",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -26,14 +26,14 @@
26
26
  "node": ">=20.19.6"
27
27
  },
28
28
  "dependencies": {
29
- "@scaleway/random-name": "5.1.2",
30
- "@scaleway/sdk-std": "2.2.0"
29
+ "@scaleway/random-name": "5.1.4",
30
+ "@scaleway/sdk-std": "2.2.2"
31
31
  },
32
32
  "peerDependencies": {
33
- "@scaleway/sdk-client": "^2.2.0"
33
+ "@scaleway/sdk-client": "^2.2.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@scaleway/sdk-client": "^2.2.0"
36
+ "@scaleway/sdk-client": "^2.2.2"
37
37
  },
38
38
  "scripts": {
39
39
  "package:check": "pnpm publint",