@scaleway/sdk-function 1.4.0 → 1.6.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/index.gen.d.ts +1 -1
- package/dist/v1beta1/api.gen.cjs +9 -6
- package/dist/v1beta1/api.gen.d.ts +5 -2
- package/dist/v1beta1/api.gen.js +9 -6
- package/dist/v1beta1/content.gen.d.ts +1 -1
- package/dist/v1beta1/index.gen.d.ts +5 -5
- package/dist/v1beta1/marshalling.gen.d.ts +1 -1
- package/dist/v1beta1/types.gen.d.ts +15 -9
- package/dist/v1beta1/validation-rules.gen.cjs +6 -0
- package/dist/v1beta1/validation-rules.gen.d.ts +5 -0
- package/dist/v1beta1/validation-rules.gen.js +6 -0
- package/package.json +6 -6
package/dist/index.gen.d.ts
CHANGED
package/dist/v1beta1/api.gen.cjs
CHANGED
|
@@ -73,7 +73,7 @@ class API extends sdkClient.API {
|
|
|
73
73
|
* @param request - The request {@link CreateNamespaceRequest}
|
|
74
74
|
* @returns A Promise of Namespace
|
|
75
75
|
*/
|
|
76
|
-
createNamespace = (request) => this.client.fetch(
|
|
76
|
+
createNamespace = (request = {}) => this.client.fetch(
|
|
77
77
|
{
|
|
78
78
|
body: JSON.stringify(
|
|
79
79
|
marshalling_gen.marshalCreateNamespaceRequest(request, this.client.settings)
|
|
@@ -186,11 +186,14 @@ class API extends sdkClient.API {
|
|
|
186
186
|
marshalling_gen.unmarshalFunction
|
|
187
187
|
);
|
|
188
188
|
/**
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
189
|
+
* Update an existing function. Update the function associated with the specified ID.
|
|
190
|
+
|
|
191
|
+
When updating a function, the function is automatically redeployed to apply the changes.
|
|
192
|
+
This behavior can be changed by setting the `redeploy` field to `false` in the request.
|
|
193
|
+
*
|
|
194
|
+
* @param request - The request {@link UpdateFunctionRequest}
|
|
195
|
+
* @returns A Promise of Function
|
|
196
|
+
*/
|
|
194
197
|
updateFunction = (request) => this.client.fetch(
|
|
195
198
|
{
|
|
196
199
|
body: JSON.stringify(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '@scaleway/sdk-client';
|
|
2
2
|
import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client';
|
|
3
|
-
import type { CreateCronRequest, CreateDomainRequest, CreateFunctionRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, Cron, DeleteCronRequest, DeleteDomainRequest, DeleteFunctionRequest, DeleteNamespaceRequest, DeleteTokenRequest, DeleteTriggerRequest, DeployFunctionRequest, Domain, DownloadURL, Function, GetCronRequest, GetDomainRequest, GetFunctionDownloadURLRequest, GetFunctionRequest, GetFunctionUploadURLRequest, GetNamespaceRequest, GetTokenRequest, GetTriggerRequest, ListCronsRequest, ListCronsResponse, ListDomainsRequest, ListDomainsResponse, ListFunctionRuntimesRequest, ListFunctionRuntimesResponse, ListFunctionsRequest, ListFunctionsResponse, ListNamespacesRequest, ListNamespacesResponse, ListTokensRequest, ListTokensResponse, ListTriggersRequest, ListTriggersResponse, Namespace, Token, Trigger, UpdateCronRequest, UpdateFunctionRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UploadURL } from './types.gen';
|
|
3
|
+
import type { CreateCronRequest, CreateDomainRequest, CreateFunctionRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, Cron, DeleteCronRequest, DeleteDomainRequest, DeleteFunctionRequest, DeleteNamespaceRequest, DeleteTokenRequest, DeleteTriggerRequest, DeployFunctionRequest, Domain, DownloadURL, Function, GetCronRequest, GetDomainRequest, GetFunctionDownloadURLRequest, GetFunctionRequest, GetFunctionUploadURLRequest, GetNamespaceRequest, GetTokenRequest, GetTriggerRequest, ListCronsRequest, ListCronsResponse, ListDomainsRequest, ListDomainsResponse, ListFunctionRuntimesRequest, ListFunctionRuntimesResponse, ListFunctionsRequest, ListFunctionsResponse, ListNamespacesRequest, ListNamespacesResponse, ListTokensRequest, ListTokensResponse, ListTriggersRequest, ListTriggersResponse, Namespace, Token, Trigger, UpdateCronRequest, UpdateFunctionRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UploadURL } from './types.gen.js';
|
|
4
4
|
/**
|
|
5
5
|
* Serverless Functions API.
|
|
6
6
|
|
|
@@ -44,7 +44,7 @@ export declare class API extends ParentAPI {
|
|
|
44
44
|
* @param request - The request {@link CreateNamespaceRequest}
|
|
45
45
|
* @returns A Promise of Namespace
|
|
46
46
|
*/
|
|
47
|
-
createNamespace: (request
|
|
47
|
+
createNamespace: (request?: Readonly<CreateNamespaceRequest>) => Promise<Namespace>;
|
|
48
48
|
/**
|
|
49
49
|
* Update an existing namespace. Update the namespace associated with the specified ID.
|
|
50
50
|
*
|
|
@@ -94,6 +94,9 @@ export declare class API extends ParentAPI {
|
|
|
94
94
|
createFunction: (request: Readonly<CreateFunctionRequest>) => Promise<Function>;
|
|
95
95
|
/**
|
|
96
96
|
* Update an existing function. Update the function associated with the specified ID.
|
|
97
|
+
|
|
98
|
+
When updating a function, the function is automatically redeployed to apply the changes.
|
|
99
|
+
This behavior can be changed by setting the `redeploy` field to `false` in the request.
|
|
97
100
|
*
|
|
98
101
|
* @param request - The request {@link UpdateFunctionRequest}
|
|
99
102
|
* @returns A Promise of Function
|
package/dist/v1beta1/api.gen.js
CHANGED
|
@@ -71,7 +71,7 @@ class API extends API$1 {
|
|
|
71
71
|
* @param request - The request {@link CreateNamespaceRequest}
|
|
72
72
|
* @returns A Promise of Namespace
|
|
73
73
|
*/
|
|
74
|
-
createNamespace = (request) => this.client.fetch(
|
|
74
|
+
createNamespace = (request = {}) => this.client.fetch(
|
|
75
75
|
{
|
|
76
76
|
body: JSON.stringify(
|
|
77
77
|
marshalCreateNamespaceRequest(request, this.client.settings)
|
|
@@ -184,11 +184,14 @@ class API extends API$1 {
|
|
|
184
184
|
unmarshalFunction
|
|
185
185
|
);
|
|
186
186
|
/**
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
187
|
+
* Update an existing function. Update the function associated with the specified ID.
|
|
188
|
+
|
|
189
|
+
When updating a function, the function is automatically redeployed to apply the changes.
|
|
190
|
+
This behavior can be changed by setting the `redeploy` field to `false` in the request.
|
|
191
|
+
*
|
|
192
|
+
* @param request - The request {@link UpdateFunctionRequest}
|
|
193
|
+
* @returns A Promise of Function
|
|
194
|
+
*/
|
|
192
195
|
updateFunction = (request) => this.client.fetch(
|
|
193
196
|
{
|
|
194
197
|
body: JSON.stringify(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CronStatus, DomainStatus, FunctionStatus, NamespaceStatus, TokenStatus, TriggerStatus } from './types.gen';
|
|
1
|
+
import type { CronStatus, DomainStatus, FunctionStatus, NamespaceStatus, TokenStatus, TriggerStatus } from './types.gen.js';
|
|
2
2
|
/** Lists transient statutes of the enum {@link CronStatus}. */
|
|
3
3
|
export declare const CRON_TRANSIENT_STATUSES: CronStatus[];
|
|
4
4
|
/** Lists transient statutes of the enum {@link DomainStatus}. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { API } from './api.gen';
|
|
2
|
-
export * from './content.gen';
|
|
3
|
-
export * from './marshalling.gen';
|
|
4
|
-
export type { CreateCronRequest, CreateDomainRequest, CreateFunctionRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, CreateTriggerRequestMnqNatsClientConfig, CreateTriggerRequestMnqSqsClientConfig, CreateTriggerRequestSqsClientConfig, Cron, CronStatus, DeleteCronRequest, DeleteDomainRequest, DeleteFunctionRequest, DeleteNamespaceRequest, DeleteTokenRequest, DeleteTriggerRequest, DeployFunctionRequest, Domain, DomainStatus, DownloadURL, Function, FunctionHttpOption, FunctionPrivacy, FunctionRuntime, FunctionSandbox, FunctionStatus, GetCronRequest, GetDomainRequest, GetFunctionDownloadURLRequest, GetFunctionRequest, GetFunctionUploadURLRequest, GetNamespaceRequest, GetTokenRequest, GetTriggerRequest, ListCronsRequest, ListCronsRequestOrderBy, ListCronsResponse, ListDomainsRequest, ListDomainsRequestOrderBy, ListDomainsResponse, ListFunctionRuntimesRequest, ListFunctionRuntimesResponse, ListFunctionsRequest, ListFunctionsRequestOrderBy, ListFunctionsResponse, ListNamespacesRequest, ListNamespacesRequestOrderBy, ListNamespacesResponse, ListTokensRequest, ListTokensRequestOrderBy, ListTokensResponse, ListTriggersRequest, ListTriggersRequestOrderBy, ListTriggersResponse, Namespace, NamespaceStatus, Runtime, RuntimeStatus, Secret, SecretHashedValue, Token, TokenStatus, Trigger, TriggerInputType, TriggerMnqNatsClientConfig, TriggerMnqSqsClientConfig, TriggerSqsClientConfig, TriggerStatus, UpdateCronRequest, UpdateFunctionRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UpdateTriggerRequestSqsClientConfig, UploadURL, } from './types.gen';
|
|
5
|
-
export * as ValidationRules from './validation-rules.gen';
|
|
1
|
+
export { API } from './api.gen.js';
|
|
2
|
+
export * from './content.gen.js';
|
|
3
|
+
export * from './marshalling.gen.js';
|
|
4
|
+
export type { CreateCronRequest, CreateDomainRequest, CreateFunctionRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, CreateTriggerRequestMnqNatsClientConfig, CreateTriggerRequestMnqSqsClientConfig, CreateTriggerRequestSqsClientConfig, Cron, CronStatus, DeleteCronRequest, DeleteDomainRequest, DeleteFunctionRequest, DeleteNamespaceRequest, DeleteTokenRequest, DeleteTriggerRequest, DeployFunctionRequest, Domain, DomainStatus, DownloadURL, Function, FunctionHttpOption, FunctionPrivacy, FunctionRuntime, FunctionSandbox, FunctionStatus, GetCronRequest, GetDomainRequest, GetFunctionDownloadURLRequest, GetFunctionRequest, GetFunctionUploadURLRequest, GetNamespaceRequest, GetTokenRequest, GetTriggerRequest, ListCronsRequest, ListCronsRequestOrderBy, ListCronsResponse, ListDomainsRequest, ListDomainsRequestOrderBy, ListDomainsResponse, ListFunctionRuntimesRequest, ListFunctionRuntimesResponse, ListFunctionsRequest, ListFunctionsRequestOrderBy, ListFunctionsResponse, ListNamespacesRequest, ListNamespacesRequestOrderBy, ListNamespacesResponse, ListTokensRequest, ListTokensRequestOrderBy, ListTokensResponse, ListTriggersRequest, ListTriggersRequestOrderBy, ListTriggersResponse, Namespace, NamespaceStatus, Runtime, RuntimeStatus, Secret, SecretHashedValue, Token, TokenStatus, Trigger, TriggerInputType, TriggerMnqNatsClientConfig, TriggerMnqSqsClientConfig, TriggerSqsClientConfig, TriggerStatus, UpdateCronRequest, UpdateFunctionRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UpdateTriggerRequestSqsClientConfig, UploadURL, } from './types.gen.js';
|
|
5
|
+
export * as ValidationRules from './validation-rules.gen.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultValues } from '@scaleway/sdk-client';
|
|
2
|
-
import type { CreateCronRequest, CreateDomainRequest, CreateFunctionRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, Cron, Domain, DownloadURL, Function, ListCronsResponse, ListDomainsResponse, ListFunctionRuntimesResponse, ListFunctionsResponse, ListNamespacesResponse, ListTokensResponse, ListTriggersResponse, Namespace, Token, Trigger, UpdateCronRequest, UpdateFunctionRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UploadURL } from './types.gen';
|
|
2
|
+
import type { CreateCronRequest, CreateDomainRequest, CreateFunctionRequest, CreateNamespaceRequest, CreateTokenRequest, CreateTriggerRequest, Cron, Domain, DownloadURL, Function, ListCronsResponse, ListDomainsResponse, ListFunctionRuntimesResponse, ListFunctionsResponse, ListNamespacesResponse, ListTokensResponse, ListTriggersResponse, Namespace, Token, Trigger, UpdateCronRequest, UpdateFunctionRequest, UpdateNamespaceRequest, UpdateTriggerRequest, UploadURL } from './types.gen.js';
|
|
3
3
|
export declare const unmarshalCron: (data: unknown) => Cron;
|
|
4
4
|
export declare const unmarshalDomain: (data: unknown) => Domain;
|
|
5
5
|
export declare const unmarshalFunction: (data: unknown) => Function;
|
|
@@ -344,8 +344,7 @@ export interface Namespace {
|
|
|
344
344
|
*/
|
|
345
345
|
updatedAt?: Date;
|
|
346
346
|
/**
|
|
347
|
-
* @deprecated
|
|
348
|
-
Note that activating the VPC integration can only be done when creating a new namespace.
|
|
347
|
+
* @deprecated The value of this field doesn't matter anymore, and will be removed in a near future.
|
|
349
348
|
*/
|
|
350
349
|
vpcIntegrationActivated?: boolean;
|
|
351
350
|
}
|
|
@@ -541,8 +540,6 @@ export type CreateFunctionRequest = {
|
|
|
541
540
|
tags?: string[];
|
|
542
541
|
/**
|
|
543
542
|
* When connected to a Private Network, the function can access other Scaleway resources in this Private Network.
|
|
544
|
-
|
|
545
|
-
Note: this feature is currently in beta and requires a namespace with VPC integration activated, using the `activate_vpc_integration` flag.
|
|
546
543
|
*/
|
|
547
544
|
privateNetworkId?: string;
|
|
548
545
|
};
|
|
@@ -573,9 +570,9 @@ export type CreateNamespaceRequest = {
|
|
|
573
570
|
*/
|
|
574
571
|
tags?: string[];
|
|
575
572
|
/**
|
|
576
|
-
*
|
|
573
|
+
* @deprecated Setting this field to true doesn't matter anymore. It will be removed in a near future.
|
|
577
574
|
*/
|
|
578
|
-
activateVpcIntegration
|
|
575
|
+
activateVpcIntegration?: boolean;
|
|
579
576
|
};
|
|
580
577
|
export type CreateTokenRequest = {
|
|
581
578
|
/**
|
|
@@ -1110,7 +1107,18 @@ export type UpdateFunctionRequest = {
|
|
|
1110
1107
|
*/
|
|
1111
1108
|
description?: string;
|
|
1112
1109
|
/**
|
|
1113
|
-
*
|
|
1110
|
+
* During an update, secret environment variables that are not specified in this field will be kept unchanged.
|
|
1111
|
+
|
|
1112
|
+
In order to delete a specific secret environment variable, you must reference its key, but not provide any value for it.
|
|
1113
|
+
For example, the following payload will delete the `TO_DELETE` secret environment variable:
|
|
1114
|
+
|
|
1115
|
+
```json
|
|
1116
|
+
{
|
|
1117
|
+
"secret_environment_variables":[
|
|
1118
|
+
{"key":"TO_DELETE"}
|
|
1119
|
+
]
|
|
1120
|
+
}
|
|
1121
|
+
```.
|
|
1114
1122
|
*/
|
|
1115
1123
|
secretEnvironmentVariables?: Secret[];
|
|
1116
1124
|
/**
|
|
@@ -1129,8 +1137,6 @@ export type UpdateFunctionRequest = {
|
|
|
1129
1137
|
tags?: string[];
|
|
1130
1138
|
/**
|
|
1131
1139
|
* When connected to a Private Network, the function can access other Scaleway resources in this Private Network.
|
|
1132
|
-
|
|
1133
|
-
Note: this feature is currently in beta and requires a namespace with VPC integration activated, using the `activate_vpc_integration` flag.
|
|
1134
1140
|
*/
|
|
1135
1141
|
privateNetworkId?: string;
|
|
1136
1142
|
};
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const CreateFunctionRequest = {
|
|
4
|
+
privateNetworkId: {
|
|
5
|
+
ignoreEmpty: true
|
|
6
|
+
}
|
|
7
|
+
};
|
|
3
8
|
const CreateTriggerRequest = {
|
|
4
9
|
description: {
|
|
5
10
|
maxLength: 255
|
|
@@ -44,6 +49,7 @@ const UpdateTriggerRequest = {
|
|
|
44
49
|
minLength: 1
|
|
45
50
|
}
|
|
46
51
|
};
|
|
52
|
+
exports.CreateFunctionRequest = CreateFunctionRequest;
|
|
47
53
|
exports.CreateTriggerRequest = CreateTriggerRequest;
|
|
48
54
|
exports.CreateTriggerRequestMnqNatsClientConfig = CreateTriggerRequestMnqNatsClientConfig;
|
|
49
55
|
exports.CreateTriggerRequestMnqSqsClientConfig = CreateTriggerRequestMnqSqsClientConfig;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
const CreateFunctionRequest = {
|
|
2
|
+
privateNetworkId: {
|
|
3
|
+
ignoreEmpty: true
|
|
4
|
+
}
|
|
5
|
+
};
|
|
1
6
|
const CreateTriggerRequest = {
|
|
2
7
|
description: {
|
|
3
8
|
maxLength: 255
|
|
@@ -43,6 +48,7 @@ const UpdateTriggerRequest = {
|
|
|
43
48
|
}
|
|
44
49
|
};
|
|
45
50
|
export {
|
|
51
|
+
CreateFunctionRequest,
|
|
46
52
|
CreateTriggerRequest,
|
|
47
53
|
CreateTriggerRequestMnqNatsClientConfig,
|
|
48
54
|
CreateTriggerRequestMnqSqsClientConfig,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-function",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Scaleway SDK function",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
@@ -26,17 +26,17 @@
|
|
|
26
26
|
"directory": "packages_generated/function"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
|
-
"node": ">=20.19.
|
|
29
|
+
"node": ">=20.19.4"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@scaleway/random-name": "5.1.
|
|
33
|
-
"@scaleway/sdk-std": "1.0
|
|
32
|
+
"@scaleway/random-name": "5.1.2",
|
|
33
|
+
"@scaleway/sdk-std": "1.1.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^1.3.
|
|
36
|
+
"@scaleway/sdk-client": "^1.3.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@scaleway/sdk-client": "^1.3.
|
|
39
|
+
"@scaleway/sdk-client": "^1.3.2"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"package:check": "pnpm publint",
|