node-appwrite 17.2.0 → 18.0.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 +67 -2
- package/dist/client.js +3 -3
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +3 -3
- package/dist/client.mjs.map +1 -1
- package/dist/enums/{v-c-s-deployment-type.js → vcs-deployment-type.js} +1 -1
- package/dist/enums/vcs-deployment-type.js.map +1 -0
- package/dist/enums/{v-c-s-deployment-type.mjs → vcs-deployment-type.mjs} +2 -2
- package/dist/enums/vcs-deployment-type.mjs.map +1 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/models.d.mts +717 -58
- package/dist/models.d.ts +717 -58
- package/dist/query.d.mts +70 -0
- package/dist/query.d.ts +70 -0
- package/dist/query.js +70 -0
- package/dist/query.js.map +1 -1
- package/dist/query.mjs +70 -0
- package/dist/query.mjs.map +1 -1
- package/dist/services/account.d.mts +625 -70
- package/dist/services/account.d.ts +625 -70
- package/dist/services/account.js +592 -292
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +592 -292
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/avatars.d.mts +157 -26
- package/dist/services/avatars.d.ts +157 -26
- package/dist/services/avatars.js +104 -93
- package/dist/services/avatars.js.map +1 -1
- package/dist/services/avatars.mjs +104 -93
- package/dist/services/avatars.mjs.map +1 -1
- package/dist/services/databases.d.mts +1224 -248
- package/dist/services/databases.d.ts +1224 -248
- package/dist/services/databases.js +877 -611
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +877 -611
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/functions.d.mts +530 -107
- package/dist/services/functions.d.ts +530 -107
- package/dist/services/functions.js +393 -276
- package/dist/services/functions.js.map +1 -1
- package/dist/services/functions.mjs +393 -276
- package/dist/services/functions.mjs.map +1 -1
- package/dist/services/graphql.d.mts +24 -2
- package/dist/services/graphql.d.ts +24 -2
- package/dist/services/graphql.js +20 -16
- package/dist/services/graphql.js.map +1 -1
- package/dist/services/graphql.mjs +20 -16
- package/dist/services/graphql.mjs.map +1 -1
- package/dist/services/health.d.mts +175 -16
- package/dist/services/health.d.ts +175 -16
- package/dist/services/health.js +144 -115
- package/dist/services/health.js.map +1 -1
- package/dist/services/health.mjs +144 -115
- package/dist/services/health.mjs.map +1 -1
- package/dist/services/locale.js.map +1 -1
- package/dist/services/locale.mjs.map +1 -1
- package/dist/services/messaging.d.mts +1544 -262
- package/dist/services/messaging.d.ts +1544 -262
- package/dist/services/messaging.js +1417 -592
- package/dist/services/messaging.js.map +1 -1
- package/dist/services/messaging.mjs +1417 -592
- package/dist/services/messaging.mjs.map +1 -1
- package/dist/services/sites.d.mts +495 -99
- package/dist/services/sites.d.ts +495 -99
- package/dist/services/sites.js +371 -258
- package/dist/services/sites.js.map +1 -1
- package/dist/services/sites.mjs +371 -258
- package/dist/services/sites.mjs.map +1 -1
- package/dist/services/storage.d.mts +306 -63
- package/dist/services/storage.d.ts +306 -63
- package/dist/services/storage.js +225 -158
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs +225 -158
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/tables-db.d.mts +1549 -0
- package/dist/services/tables-db.d.ts +1549 -0
- package/dist/services/tables-db.js +2374 -0
- package/dist/services/tables-db.js.map +1 -0
- package/dist/services/tables-db.mjs +2373 -0
- package/dist/services/tables-db.mjs.map +1 -0
- package/dist/services/teams.d.mts +233 -39
- package/dist/services/teams.d.ts +233 -39
- package/dist/services/teams.js +170 -135
- package/dist/services/teams.js.map +1 -1
- package/dist/services/teams.mjs +170 -135
- package/dist/services/teams.mjs.map +1 -1
- package/dist/services/tokens.d.mts +76 -11
- package/dist/services/tokens.d.ts +76 -11
- package/dist/services/tokens.js +60 -45
- package/dist/services/tokens.js.map +1 -1
- package/dist/services/tokens.mjs +60 -45
- package/dist/services/tokens.mjs.map +1 -1
- package/dist/services/users.d.mts +842 -115
- package/dist/services/users.d.ts +842 -115
- package/dist/services/users.js +719 -408
- package/dist/services/users.js.map +1 -1
- package/dist/services/users.mjs +719 -408
- package/dist/services/users.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/enums/v-c-s-deployment-type.js.map +0 -1
- package/dist/enums/v-c-s-deployment-type.mjs.map +0 -1
- /package/dist/enums/{v-c-s-deployment-type.d.mts → vcs-deployment-type.d.mts} +0 -0
- /package/dist/enums/{v-c-s-deployment-type.d.ts → vcs-deployment-type.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Client, UploadProgress } from '../client.js';
|
|
2
2
|
import { Models } from '../models.js';
|
|
3
3
|
import { Runtime } from '../enums/runtime.js';
|
|
4
|
-
import { VCSDeploymentType } from '../enums/
|
|
4
|
+
import { VCSDeploymentType } from '../enums/vcs-deployment-type.js';
|
|
5
5
|
import { DeploymentDownloadType } from '../enums/deployment-download-type.js';
|
|
6
6
|
import { ExecutionMethod } from '../enums/execution-method.js';
|
|
7
7
|
import '../query.js';
|
|
@@ -10,38 +10,96 @@ declare class Functions {
|
|
|
10
10
|
client: Client;
|
|
11
11
|
constructor(client: Client);
|
|
12
12
|
/**
|
|
13
|
-
* Get a list of all the project
|
|
13
|
+
* Get a list of all the project's functions. You can use the query params to filter your results.
|
|
14
14
|
*
|
|
15
|
-
* @param {string[]} queries
|
|
16
|
-
* @param {string} search
|
|
15
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId
|
|
16
|
+
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
17
17
|
* @throws {AppwriteException}
|
|
18
18
|
* @returns {Promise<Models.FunctionList>}
|
|
19
19
|
*/
|
|
20
|
+
list(params?: {
|
|
21
|
+
queries?: string[];
|
|
22
|
+
search?: string;
|
|
23
|
+
}): Promise<Models.FunctionList>;
|
|
24
|
+
/**
|
|
25
|
+
* Get a list of all the project's functions. You can use the query params to filter your results.
|
|
26
|
+
*
|
|
27
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, enabled, runtime, deploymentId, schedule, scheduleNext, schedulePrevious, timeout, entrypoint, commands, installationId
|
|
28
|
+
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
29
|
+
* @throws {AppwriteException}
|
|
30
|
+
* @returns {Promise<Models.FunctionList>}
|
|
31
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
32
|
+
*/
|
|
20
33
|
list(queries?: string[], search?: string): Promise<Models.FunctionList>;
|
|
21
34
|
/**
|
|
22
35
|
* Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.
|
|
23
36
|
*
|
|
24
|
-
* @param {string} functionId
|
|
25
|
-
* @param {string} name
|
|
26
|
-
* @param {Runtime} runtime
|
|
27
|
-
* @param {string[]} execute
|
|
28
|
-
* @param {string[]} events
|
|
29
|
-
* @param {string} schedule
|
|
30
|
-
* @param {number} timeout
|
|
31
|
-
* @param {boolean} enabled
|
|
32
|
-
* @param {boolean} logging
|
|
33
|
-
* @param {string} entrypoint
|
|
34
|
-
* @param {string} commands
|
|
35
|
-
* @param {string[]} scopes
|
|
36
|
-
* @param {string} installationId
|
|
37
|
-
* @param {string} providerRepositoryId
|
|
38
|
-
* @param {string} providerBranch
|
|
39
|
-
* @param {boolean} providerSilentMode
|
|
40
|
-
* @param {string} providerRootDirectory
|
|
41
|
-
* @param {string} specification
|
|
37
|
+
* @param {string} params.functionId - Function ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
38
|
+
* @param {string} params.name - Function name. Max length: 128 chars.
|
|
39
|
+
* @param {Runtime} params.runtime - Execution runtime.
|
|
40
|
+
* @param {string[]} params.execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
|
|
41
|
+
* @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
|
|
42
|
+
* @param {string} params.schedule - Schedule CRON syntax.
|
|
43
|
+
* @param {number} params.timeout - Function maximum execution time in seconds.
|
|
44
|
+
* @param {boolean} params.enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
|
|
45
|
+
* @param {boolean} params.logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
|
|
46
|
+
* @param {string} params.entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
|
|
47
|
+
* @param {string} params.commands - Build Commands.
|
|
48
|
+
* @param {string[]} params.scopes - List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.
|
|
49
|
+
* @param {string} params.installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
|
|
50
|
+
* @param {string} params.providerRepositoryId - Repository ID of the repo linked to the function.
|
|
51
|
+
* @param {string} params.providerBranch - Production branch for the repo linked to the function.
|
|
52
|
+
* @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
|
|
53
|
+
* @param {string} params.providerRootDirectory - Path to function code in the linked repo.
|
|
54
|
+
* @param {string} params.specification - Runtime specification for the function and builds.
|
|
42
55
|
* @throws {AppwriteException}
|
|
43
56
|
* @returns {Promise<Models.Function>}
|
|
44
57
|
*/
|
|
58
|
+
create(params: {
|
|
59
|
+
functionId: string;
|
|
60
|
+
name: string;
|
|
61
|
+
runtime: Runtime;
|
|
62
|
+
execute?: string[];
|
|
63
|
+
events?: string[];
|
|
64
|
+
schedule?: string;
|
|
65
|
+
timeout?: number;
|
|
66
|
+
enabled?: boolean;
|
|
67
|
+
logging?: boolean;
|
|
68
|
+
entrypoint?: string;
|
|
69
|
+
commands?: string;
|
|
70
|
+
scopes?: string[];
|
|
71
|
+
installationId?: string;
|
|
72
|
+
providerRepositoryId?: string;
|
|
73
|
+
providerBranch?: string;
|
|
74
|
+
providerSilentMode?: boolean;
|
|
75
|
+
providerRootDirectory?: string;
|
|
76
|
+
specification?: string;
|
|
77
|
+
}): Promise<Models.Function>;
|
|
78
|
+
/**
|
|
79
|
+
* Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.
|
|
80
|
+
*
|
|
81
|
+
* @param {string} functionId - Function ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
82
|
+
* @param {string} name - Function name. Max length: 128 chars.
|
|
83
|
+
* @param {Runtime} runtime - Execution runtime.
|
|
84
|
+
* @param {string[]} execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
|
|
85
|
+
* @param {string[]} events - Events list. Maximum of 100 events are allowed.
|
|
86
|
+
* @param {string} schedule - Schedule CRON syntax.
|
|
87
|
+
* @param {number} timeout - Function maximum execution time in seconds.
|
|
88
|
+
* @param {boolean} enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
|
|
89
|
+
* @param {boolean} logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
|
|
90
|
+
* @param {string} entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
|
|
91
|
+
* @param {string} commands - Build Commands.
|
|
92
|
+
* @param {string[]} scopes - List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.
|
|
93
|
+
* @param {string} installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
|
|
94
|
+
* @param {string} providerRepositoryId - Repository ID of the repo linked to the function.
|
|
95
|
+
* @param {string} providerBranch - Production branch for the repo linked to the function.
|
|
96
|
+
* @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
|
|
97
|
+
* @param {string} providerRootDirectory - Path to function code in the linked repo.
|
|
98
|
+
* @param {string} specification - Runtime specification for the function and builds.
|
|
99
|
+
* @throws {AppwriteException}
|
|
100
|
+
* @returns {Promise<Models.Function>}
|
|
101
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
102
|
+
*/
|
|
45
103
|
create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function>;
|
|
46
104
|
/**
|
|
47
105
|
* Get a list of all runtimes that are currently active on your instance.
|
|
@@ -60,102 +118,259 @@ declare class Functions {
|
|
|
60
118
|
/**
|
|
61
119
|
* Get a function by its unique ID.
|
|
62
120
|
*
|
|
63
|
-
* @param {string} functionId
|
|
121
|
+
* @param {string} params.functionId - Function ID.
|
|
64
122
|
* @throws {AppwriteException}
|
|
65
123
|
* @returns {Promise<Models.Function>}
|
|
66
124
|
*/
|
|
125
|
+
get(params: {
|
|
126
|
+
functionId: string;
|
|
127
|
+
}): Promise<Models.Function>;
|
|
128
|
+
/**
|
|
129
|
+
* Get a function by its unique ID.
|
|
130
|
+
*
|
|
131
|
+
* @param {string} functionId - Function ID.
|
|
132
|
+
* @throws {AppwriteException}
|
|
133
|
+
* @returns {Promise<Models.Function>}
|
|
134
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
135
|
+
*/
|
|
67
136
|
get(functionId: string): Promise<Models.Function>;
|
|
68
137
|
/**
|
|
69
138
|
* Update function by its unique ID.
|
|
70
139
|
*
|
|
71
|
-
* @param {string} functionId
|
|
72
|
-
* @param {string} name
|
|
73
|
-
* @param {Runtime} runtime
|
|
74
|
-
* @param {string[]} execute
|
|
75
|
-
* @param {string[]} events
|
|
76
|
-
* @param {string} schedule
|
|
77
|
-
* @param {number} timeout
|
|
78
|
-
* @param {boolean} enabled
|
|
79
|
-
* @param {boolean} logging
|
|
80
|
-
* @param {string} entrypoint
|
|
81
|
-
* @param {string} commands
|
|
82
|
-
* @param {string[]} scopes
|
|
83
|
-
* @param {string} installationId
|
|
84
|
-
* @param {string} providerRepositoryId
|
|
85
|
-
* @param {string} providerBranch
|
|
86
|
-
* @param {boolean} providerSilentMode
|
|
87
|
-
* @param {string} providerRootDirectory
|
|
88
|
-
* @param {string} specification
|
|
140
|
+
* @param {string} params.functionId - Function ID.
|
|
141
|
+
* @param {string} params.name - Function name. Max length: 128 chars.
|
|
142
|
+
* @param {Runtime} params.runtime - Execution runtime.
|
|
143
|
+
* @param {string[]} params.execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
|
|
144
|
+
* @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
|
|
145
|
+
* @param {string} params.schedule - Schedule CRON syntax.
|
|
146
|
+
* @param {number} params.timeout - Maximum execution time in seconds.
|
|
147
|
+
* @param {boolean} params.enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
|
|
148
|
+
* @param {boolean} params.logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
|
|
149
|
+
* @param {string} params.entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
|
|
150
|
+
* @param {string} params.commands - Build Commands.
|
|
151
|
+
* @param {string[]} params.scopes - List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.
|
|
152
|
+
* @param {string} params.installationId - Appwrite Installation ID for VCS (Version Controle System) deployment.
|
|
153
|
+
* @param {string} params.providerRepositoryId - Repository ID of the repo linked to the function
|
|
154
|
+
* @param {string} params.providerBranch - Production branch for the repo linked to the function
|
|
155
|
+
* @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
|
|
156
|
+
* @param {string} params.providerRootDirectory - Path to function code in the linked repo.
|
|
157
|
+
* @param {string} params.specification - Runtime specification for the function and builds.
|
|
89
158
|
* @throws {AppwriteException}
|
|
90
159
|
* @returns {Promise<Models.Function>}
|
|
91
160
|
*/
|
|
161
|
+
update(params: {
|
|
162
|
+
functionId: string;
|
|
163
|
+
name: string;
|
|
164
|
+
runtime?: Runtime;
|
|
165
|
+
execute?: string[];
|
|
166
|
+
events?: string[];
|
|
167
|
+
schedule?: string;
|
|
168
|
+
timeout?: number;
|
|
169
|
+
enabled?: boolean;
|
|
170
|
+
logging?: boolean;
|
|
171
|
+
entrypoint?: string;
|
|
172
|
+
commands?: string;
|
|
173
|
+
scopes?: string[];
|
|
174
|
+
installationId?: string;
|
|
175
|
+
providerRepositoryId?: string;
|
|
176
|
+
providerBranch?: string;
|
|
177
|
+
providerSilentMode?: boolean;
|
|
178
|
+
providerRootDirectory?: string;
|
|
179
|
+
specification?: string;
|
|
180
|
+
}): Promise<Models.Function>;
|
|
181
|
+
/**
|
|
182
|
+
* Update function by its unique ID.
|
|
183
|
+
*
|
|
184
|
+
* @param {string} functionId - Function ID.
|
|
185
|
+
* @param {string} name - Function name. Max length: 128 chars.
|
|
186
|
+
* @param {Runtime} runtime - Execution runtime.
|
|
187
|
+
* @param {string[]} execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
|
|
188
|
+
* @param {string[]} events - Events list. Maximum of 100 events are allowed.
|
|
189
|
+
* @param {string} schedule - Schedule CRON syntax.
|
|
190
|
+
* @param {number} timeout - Maximum execution time in seconds.
|
|
191
|
+
* @param {boolean} enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
|
|
192
|
+
* @param {boolean} logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
|
|
193
|
+
* @param {string} entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
|
|
194
|
+
* @param {string} commands - Build Commands.
|
|
195
|
+
* @param {string[]} scopes - List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.
|
|
196
|
+
* @param {string} installationId - Appwrite Installation ID for VCS (Version Controle System) deployment.
|
|
197
|
+
* @param {string} providerRepositoryId - Repository ID of the repo linked to the function
|
|
198
|
+
* @param {string} providerBranch - Production branch for the repo linked to the function
|
|
199
|
+
* @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
|
|
200
|
+
* @param {string} providerRootDirectory - Path to function code in the linked repo.
|
|
201
|
+
* @param {string} specification - Runtime specification for the function and builds.
|
|
202
|
+
* @throws {AppwriteException}
|
|
203
|
+
* @returns {Promise<Models.Function>}
|
|
204
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
205
|
+
*/
|
|
92
206
|
update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: string[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function>;
|
|
93
207
|
/**
|
|
94
208
|
* Delete a function by its unique ID.
|
|
95
209
|
*
|
|
96
|
-
* @param {string} functionId
|
|
210
|
+
* @param {string} params.functionId - Function ID.
|
|
211
|
+
* @throws {AppwriteException}
|
|
212
|
+
* @returns {Promise<{}>}
|
|
213
|
+
*/
|
|
214
|
+
delete(params: {
|
|
215
|
+
functionId: string;
|
|
216
|
+
}): Promise<{}>;
|
|
217
|
+
/**
|
|
218
|
+
* Delete a function by its unique ID.
|
|
219
|
+
*
|
|
220
|
+
* @param {string} functionId - Function ID.
|
|
97
221
|
* @throws {AppwriteException}
|
|
98
222
|
* @returns {Promise<{}>}
|
|
223
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
99
224
|
*/
|
|
100
225
|
delete(functionId: string): Promise<{}>;
|
|
101
226
|
/**
|
|
102
227
|
* Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.
|
|
103
228
|
*
|
|
104
|
-
* @param {string} functionId
|
|
105
|
-
* @param {string} deploymentId
|
|
229
|
+
* @param {string} params.functionId - Function ID.
|
|
230
|
+
* @param {string} params.deploymentId - Deployment ID.
|
|
106
231
|
* @throws {AppwriteException}
|
|
107
232
|
* @returns {Promise<Models.Function>}
|
|
108
233
|
*/
|
|
234
|
+
updateFunctionDeployment(params: {
|
|
235
|
+
functionId: string;
|
|
236
|
+
deploymentId: string;
|
|
237
|
+
}): Promise<Models.Function>;
|
|
238
|
+
/**
|
|
239
|
+
* Update the function active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your function.
|
|
240
|
+
*
|
|
241
|
+
* @param {string} functionId - Function ID.
|
|
242
|
+
* @param {string} deploymentId - Deployment ID.
|
|
243
|
+
* @throws {AppwriteException}
|
|
244
|
+
* @returns {Promise<Models.Function>}
|
|
245
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
246
|
+
*/
|
|
109
247
|
updateFunctionDeployment(functionId: string, deploymentId: string): Promise<Models.Function>;
|
|
110
248
|
/**
|
|
111
|
-
* Get a list of all the function
|
|
249
|
+
* Get a list of all the function's code deployments. You can use the query params to filter your results.
|
|
112
250
|
*
|
|
113
|
-
* @param {string} functionId
|
|
114
|
-
* @param {string[]} queries
|
|
115
|
-
* @param {string} search
|
|
251
|
+
* @param {string} params.functionId - Function ID.
|
|
252
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type
|
|
253
|
+
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
116
254
|
* @throws {AppwriteException}
|
|
117
255
|
* @returns {Promise<Models.DeploymentList>}
|
|
118
256
|
*/
|
|
257
|
+
listDeployments(params: {
|
|
258
|
+
functionId: string;
|
|
259
|
+
queries?: string[];
|
|
260
|
+
search?: string;
|
|
261
|
+
}): Promise<Models.DeploymentList>;
|
|
262
|
+
/**
|
|
263
|
+
* Get a list of all the function's code deployments. You can use the query params to filter your results.
|
|
264
|
+
*
|
|
265
|
+
* @param {string} functionId - Function ID.
|
|
266
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: buildSize, sourceSize, totalSize, buildDuration, status, activate, type
|
|
267
|
+
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
268
|
+
* @throws {AppwriteException}
|
|
269
|
+
* @returns {Promise<Models.DeploymentList>}
|
|
270
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
271
|
+
*/
|
|
119
272
|
listDeployments(functionId: string, queries?: string[], search?: string): Promise<Models.DeploymentList>;
|
|
120
273
|
/**
|
|
121
|
-
* Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you
|
|
274
|
+
* Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.
|
|
275
|
+
*
|
|
276
|
+
* This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions).
|
|
277
|
+
*
|
|
278
|
+
* Use the "command" param to set the entrypoint used to execute your code.
|
|
279
|
+
*
|
|
280
|
+
* @param {string} params.functionId - Function ID.
|
|
281
|
+
* @param {File} params.code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
|
|
282
|
+
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
283
|
+
* @param {string} params.entrypoint - Entrypoint File.
|
|
284
|
+
* @param {string} params.commands - Build Commands.
|
|
285
|
+
* @throws {AppwriteException}
|
|
286
|
+
* @returns {Promise<Models.Deployment>}
|
|
287
|
+
*/
|
|
288
|
+
createDeployment(params: {
|
|
289
|
+
functionId: string;
|
|
290
|
+
code: File;
|
|
291
|
+
activate: boolean;
|
|
292
|
+
entrypoint?: string;
|
|
293
|
+
commands?: string;
|
|
294
|
+
onProgress?: (progress: UploadProgress) => void;
|
|
295
|
+
}): Promise<Models.Deployment>;
|
|
296
|
+
/**
|
|
297
|
+
* Create a new function code deployment. Use this endpoint to upload a new version of your code function. To execute your newly uploaded code, you'll need to update the function's deployment to use your new deployment UID.
|
|
122
298
|
*
|
|
123
299
|
* This endpoint accepts a tar.gz file compressed with your code. Make sure to include any dependencies your code has within the compressed file. You can learn more about code packaging in the [Appwrite Cloud Functions tutorial](https://appwrite.io/docs/functions).
|
|
124
300
|
*
|
|
125
|
-
* Use the
|
|
301
|
+
* Use the "command" param to set the entrypoint used to execute your code.
|
|
126
302
|
*
|
|
127
|
-
* @param {string} functionId
|
|
128
|
-
* @param {File} code
|
|
129
|
-
* @param {boolean} activate
|
|
130
|
-
* @param {string} entrypoint
|
|
131
|
-
* @param {string} commands
|
|
303
|
+
* @param {string} functionId - Function ID.
|
|
304
|
+
* @param {File} code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
|
|
305
|
+
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
306
|
+
* @param {string} entrypoint - Entrypoint File.
|
|
307
|
+
* @param {string} commands - Build Commands.
|
|
132
308
|
* @throws {AppwriteException}
|
|
133
309
|
* @returns {Promise<Models.Deployment>}
|
|
310
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
134
311
|
*/
|
|
135
312
|
createDeployment(functionId: string, code: File, activate: boolean, entrypoint?: string, commands?: string, onProgress?: (progress: UploadProgress) => void): Promise<Models.Deployment>;
|
|
136
313
|
/**
|
|
137
|
-
* Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment
|
|
314
|
+
* Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.
|
|
138
315
|
*
|
|
139
|
-
* @param {string} functionId
|
|
140
|
-
* @param {string} deploymentId
|
|
141
|
-
* @param {string} buildId
|
|
316
|
+
* @param {string} params.functionId - Function ID.
|
|
317
|
+
* @param {string} params.deploymentId - Deployment ID.
|
|
318
|
+
* @param {string} params.buildId - Build unique ID.
|
|
142
319
|
* @throws {AppwriteException}
|
|
143
320
|
* @returns {Promise<Models.Deployment>}
|
|
144
321
|
*/
|
|
322
|
+
createDuplicateDeployment(params: {
|
|
323
|
+
functionId: string;
|
|
324
|
+
deploymentId: string;
|
|
325
|
+
buildId?: string;
|
|
326
|
+
}): Promise<Models.Deployment>;
|
|
327
|
+
/**
|
|
328
|
+
* Create a new build for an existing function deployment. This endpoint allows you to rebuild a deployment with the updated function configuration, including its entrypoint and build commands if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.
|
|
329
|
+
*
|
|
330
|
+
* @param {string} functionId - Function ID.
|
|
331
|
+
* @param {string} deploymentId - Deployment ID.
|
|
332
|
+
* @param {string} buildId - Build unique ID.
|
|
333
|
+
* @throws {AppwriteException}
|
|
334
|
+
* @returns {Promise<Models.Deployment>}
|
|
335
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
336
|
+
*/
|
|
145
337
|
createDuplicateDeployment(functionId: string, deploymentId: string, buildId?: string): Promise<Models.Deployment>;
|
|
146
338
|
/**
|
|
147
339
|
* Create a deployment based on a template.
|
|
148
340
|
*
|
|
149
341
|
* Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details.
|
|
150
342
|
*
|
|
151
|
-
* @param {string} functionId
|
|
152
|
-
* @param {string} repository
|
|
153
|
-
* @param {string} owner
|
|
154
|
-
* @param {string} rootDirectory
|
|
155
|
-
* @param {string} version
|
|
156
|
-
* @param {boolean} activate
|
|
343
|
+
* @param {string} params.functionId - Function ID.
|
|
344
|
+
* @param {string} params.repository - Repository name of the template.
|
|
345
|
+
* @param {string} params.owner - The name of the owner of the template.
|
|
346
|
+
* @param {string} params.rootDirectory - Path to function code in the template repo.
|
|
347
|
+
* @param {string} params.version - Version (tag) for the repo linked to the function template.
|
|
348
|
+
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
349
|
+
* @throws {AppwriteException}
|
|
350
|
+
* @returns {Promise<Models.Deployment>}
|
|
351
|
+
*/
|
|
352
|
+
createTemplateDeployment(params: {
|
|
353
|
+
functionId: string;
|
|
354
|
+
repository: string;
|
|
355
|
+
owner: string;
|
|
356
|
+
rootDirectory: string;
|
|
357
|
+
version: string;
|
|
358
|
+
activate?: boolean;
|
|
359
|
+
}): Promise<Models.Deployment>;
|
|
360
|
+
/**
|
|
361
|
+
* Create a deployment based on a template.
|
|
362
|
+
*
|
|
363
|
+
* Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details.
|
|
364
|
+
*
|
|
365
|
+
* @param {string} functionId - Function ID.
|
|
366
|
+
* @param {string} repository - Repository name of the template.
|
|
367
|
+
* @param {string} owner - The name of the owner of the template.
|
|
368
|
+
* @param {string} rootDirectory - Path to function code in the template repo.
|
|
369
|
+
* @param {string} version - Version (tag) for the repo linked to the function template.
|
|
370
|
+
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
157
371
|
* @throws {AppwriteException}
|
|
158
372
|
* @returns {Promise<Models.Deployment>}
|
|
373
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
159
374
|
*/
|
|
160
375
|
createTemplateDeployment(functionId: string, repository: string, owner: string, rootDirectory: string, version: string, activate?: boolean): Promise<Models.Deployment>;
|
|
161
376
|
/**
|
|
@@ -163,139 +378,347 @@ declare class Functions {
|
|
|
163
378
|
*
|
|
164
379
|
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
165
380
|
*
|
|
166
|
-
* @param {string} functionId
|
|
167
|
-
* @param {VCSDeploymentType} type
|
|
168
|
-
* @param {string} reference
|
|
169
|
-
* @param {boolean} activate
|
|
381
|
+
* @param {string} params.functionId - Function ID.
|
|
382
|
+
* @param {VCSDeploymentType} params.type - Type of reference passed. Allowed values are: branch, commit
|
|
383
|
+
* @param {string} params.reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
384
|
+
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
385
|
+
* @throws {AppwriteException}
|
|
386
|
+
* @returns {Promise<Models.Deployment>}
|
|
387
|
+
*/
|
|
388
|
+
createVcsDeployment(params: {
|
|
389
|
+
functionId: string;
|
|
390
|
+
type: VCSDeploymentType;
|
|
391
|
+
reference: string;
|
|
392
|
+
activate?: boolean;
|
|
393
|
+
}): Promise<Models.Deployment>;
|
|
394
|
+
/**
|
|
395
|
+
* Create a deployment when a function is connected to VCS.
|
|
396
|
+
*
|
|
397
|
+
* This endpoint lets you create deployment from a branch, commit, or a tag.
|
|
398
|
+
*
|
|
399
|
+
* @param {string} functionId - Function ID.
|
|
400
|
+
* @param {VCSDeploymentType} type - Type of reference passed. Allowed values are: branch, commit
|
|
401
|
+
* @param {string} reference - VCS reference to create deployment from. Depending on type this can be: branch name, commit hash
|
|
402
|
+
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
170
403
|
* @throws {AppwriteException}
|
|
171
404
|
* @returns {Promise<Models.Deployment>}
|
|
405
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
172
406
|
*/
|
|
173
407
|
createVcsDeployment(functionId: string, type: VCSDeploymentType, reference: string, activate?: boolean): Promise<Models.Deployment>;
|
|
174
408
|
/**
|
|
175
409
|
* Get a function deployment by its unique ID.
|
|
176
410
|
*
|
|
177
|
-
* @param {string} functionId
|
|
178
|
-
* @param {string} deploymentId
|
|
411
|
+
* @param {string} params.functionId - Function ID.
|
|
412
|
+
* @param {string} params.deploymentId - Deployment ID.
|
|
179
413
|
* @throws {AppwriteException}
|
|
180
414
|
* @returns {Promise<Models.Deployment>}
|
|
181
415
|
*/
|
|
416
|
+
getDeployment(params: {
|
|
417
|
+
functionId: string;
|
|
418
|
+
deploymentId: string;
|
|
419
|
+
}): Promise<Models.Deployment>;
|
|
420
|
+
/**
|
|
421
|
+
* Get a function deployment by its unique ID.
|
|
422
|
+
*
|
|
423
|
+
* @param {string} functionId - Function ID.
|
|
424
|
+
* @param {string} deploymentId - Deployment ID.
|
|
425
|
+
* @throws {AppwriteException}
|
|
426
|
+
* @returns {Promise<Models.Deployment>}
|
|
427
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
428
|
+
*/
|
|
182
429
|
getDeployment(functionId: string, deploymentId: string): Promise<Models.Deployment>;
|
|
183
430
|
/**
|
|
184
431
|
* Delete a code deployment by its unique ID.
|
|
185
432
|
*
|
|
186
|
-
* @param {string} functionId
|
|
187
|
-
* @param {string} deploymentId
|
|
433
|
+
* @param {string} params.functionId - Function ID.
|
|
434
|
+
* @param {string} params.deploymentId - Deployment ID.
|
|
188
435
|
* @throws {AppwriteException}
|
|
189
436
|
* @returns {Promise<{}>}
|
|
190
437
|
*/
|
|
438
|
+
deleteDeployment(params: {
|
|
439
|
+
functionId: string;
|
|
440
|
+
deploymentId: string;
|
|
441
|
+
}): Promise<{}>;
|
|
442
|
+
/**
|
|
443
|
+
* Delete a code deployment by its unique ID.
|
|
444
|
+
*
|
|
445
|
+
* @param {string} functionId - Function ID.
|
|
446
|
+
* @param {string} deploymentId - Deployment ID.
|
|
447
|
+
* @throws {AppwriteException}
|
|
448
|
+
* @returns {Promise<{}>}
|
|
449
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
450
|
+
*/
|
|
191
451
|
deleteDeployment(functionId: string, deploymentId: string): Promise<{}>;
|
|
192
452
|
/**
|
|
193
|
-
* Get a function deployment content by its unique ID. The endpoint response return with a
|
|
453
|
+
* Get a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.
|
|
454
|
+
*
|
|
455
|
+
* @param {string} params.functionId - Function ID.
|
|
456
|
+
* @param {string} params.deploymentId - Deployment ID.
|
|
457
|
+
* @param {DeploymentDownloadType} params.type - Deployment file to download. Can be: "source", "output".
|
|
458
|
+
* @throws {AppwriteException}
|
|
459
|
+
* @returns {Promise<ArrayBuffer>}
|
|
460
|
+
*/
|
|
461
|
+
getDeploymentDownload(params: {
|
|
462
|
+
functionId: string;
|
|
463
|
+
deploymentId: string;
|
|
464
|
+
type?: DeploymentDownloadType;
|
|
465
|
+
}): Promise<ArrayBuffer>;
|
|
466
|
+
/**
|
|
467
|
+
* Get a function deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.
|
|
194
468
|
*
|
|
195
|
-
* @param {string} functionId
|
|
196
|
-
* @param {string} deploymentId
|
|
197
|
-
* @param {DeploymentDownloadType} type
|
|
469
|
+
* @param {string} functionId - Function ID.
|
|
470
|
+
* @param {string} deploymentId - Deployment ID.
|
|
471
|
+
* @param {DeploymentDownloadType} type - Deployment file to download. Can be: "source", "output".
|
|
198
472
|
* @throws {AppwriteException}
|
|
199
473
|
* @returns {Promise<ArrayBuffer>}
|
|
474
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
200
475
|
*/
|
|
201
476
|
getDeploymentDownload(functionId: string, deploymentId: string, type?: DeploymentDownloadType): Promise<ArrayBuffer>;
|
|
202
477
|
/**
|
|
203
|
-
* Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn
|
|
478
|
+
* Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.
|
|
479
|
+
*
|
|
480
|
+
* @param {string} params.functionId - Function ID.
|
|
481
|
+
* @param {string} params.deploymentId - Deployment ID.
|
|
482
|
+
* @throws {AppwriteException}
|
|
483
|
+
* @returns {Promise<Models.Deployment>}
|
|
484
|
+
*/
|
|
485
|
+
updateDeploymentStatus(params: {
|
|
486
|
+
functionId: string;
|
|
487
|
+
deploymentId: string;
|
|
488
|
+
}): Promise<Models.Deployment>;
|
|
489
|
+
/**
|
|
490
|
+
* Cancel an ongoing function deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.
|
|
204
491
|
*
|
|
205
|
-
* @param {string} functionId
|
|
206
|
-
* @param {string} deploymentId
|
|
492
|
+
* @param {string} functionId - Function ID.
|
|
493
|
+
* @param {string} deploymentId - Deployment ID.
|
|
207
494
|
* @throws {AppwriteException}
|
|
208
495
|
* @returns {Promise<Models.Deployment>}
|
|
496
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
209
497
|
*/
|
|
210
498
|
updateDeploymentStatus(functionId: string, deploymentId: string): Promise<Models.Deployment>;
|
|
211
499
|
/**
|
|
212
500
|
* Get a list of all the current user function execution logs. You can use the query params to filter your results.
|
|
213
501
|
*
|
|
214
|
-
* @param {string} functionId
|
|
215
|
-
* @param {string[]} queries
|
|
502
|
+
* @param {string} params.functionId - Function ID.
|
|
503
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
|
|
216
504
|
* @throws {AppwriteException}
|
|
217
505
|
* @returns {Promise<Models.ExecutionList>}
|
|
218
506
|
*/
|
|
507
|
+
listExecutions(params: {
|
|
508
|
+
functionId: string;
|
|
509
|
+
queries?: string[];
|
|
510
|
+
}): Promise<Models.ExecutionList>;
|
|
511
|
+
/**
|
|
512
|
+
* Get a list of all the current user function execution logs. You can use the query params to filter your results.
|
|
513
|
+
*
|
|
514
|
+
* @param {string} functionId - Function ID.
|
|
515
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: trigger, status, responseStatusCode, duration, requestMethod, requestPath, deploymentId
|
|
516
|
+
* @throws {AppwriteException}
|
|
517
|
+
* @returns {Promise<Models.ExecutionList>}
|
|
518
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
519
|
+
*/
|
|
219
520
|
listExecutions(functionId: string, queries?: string[]): Promise<Models.ExecutionList>;
|
|
220
521
|
/**
|
|
221
522
|
* Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
|
|
222
523
|
*
|
|
223
|
-
* @param {string} functionId
|
|
224
|
-
* @param {string} body
|
|
225
|
-
* @param {boolean} async
|
|
226
|
-
* @param {string} xpath
|
|
227
|
-
* @param {ExecutionMethod} method
|
|
228
|
-
* @param {object} headers
|
|
229
|
-
* @param {string} scheduledAt
|
|
524
|
+
* @param {string} params.functionId - Function ID.
|
|
525
|
+
* @param {string} params.body - HTTP body of execution. Default value is empty string.
|
|
526
|
+
* @param {boolean} params.async - Execute code in the background. Default value is false.
|
|
527
|
+
* @param {string} params.xpath - HTTP path of execution. Path can include query params. Default value is /
|
|
528
|
+
* @param {ExecutionMethod} params.method - HTTP method of execution. Default value is GET.
|
|
529
|
+
* @param {object} params.headers - HTTP headers of execution. Defaults to empty.
|
|
530
|
+
* @param {string} params.scheduledAt - Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.
|
|
531
|
+
* @throws {AppwriteException}
|
|
532
|
+
* @returns {Promise<Models.Execution>}
|
|
533
|
+
*/
|
|
534
|
+
createExecution(params: {
|
|
535
|
+
functionId: string;
|
|
536
|
+
body?: string;
|
|
537
|
+
async?: boolean;
|
|
538
|
+
xpath?: string;
|
|
539
|
+
method?: ExecutionMethod;
|
|
540
|
+
headers?: object;
|
|
541
|
+
scheduledAt?: string;
|
|
542
|
+
}): Promise<Models.Execution>;
|
|
543
|
+
/**
|
|
544
|
+
* Trigger a function execution. The returned object will return you the current execution status. You can ping the `Get Execution` endpoint to get updates on the current execution status. Once this endpoint is called, your function execution process will start asynchronously.
|
|
545
|
+
*
|
|
546
|
+
* @param {string} functionId - Function ID.
|
|
547
|
+
* @param {string} body - HTTP body of execution. Default value is empty string.
|
|
548
|
+
* @param {boolean} async - Execute code in the background. Default value is false.
|
|
549
|
+
* @param {string} xpath - HTTP path of execution. Path can include query params. Default value is /
|
|
550
|
+
* @param {ExecutionMethod} method - HTTP method of execution. Default value is GET.
|
|
551
|
+
* @param {object} headers - HTTP headers of execution. Defaults to empty.
|
|
552
|
+
* @param {string} scheduledAt - Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.
|
|
230
553
|
* @throws {AppwriteException}
|
|
231
554
|
* @returns {Promise<Models.Execution>}
|
|
555
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
232
556
|
*/
|
|
233
557
|
createExecution(functionId: string, body?: string, async?: boolean, xpath?: string, method?: ExecutionMethod, headers?: object, scheduledAt?: string): Promise<Models.Execution>;
|
|
234
558
|
/**
|
|
235
559
|
* Get a function execution log by its unique ID.
|
|
236
560
|
*
|
|
237
|
-
* @param {string} functionId
|
|
238
|
-
* @param {string} executionId
|
|
561
|
+
* @param {string} params.functionId - Function ID.
|
|
562
|
+
* @param {string} params.executionId - Execution ID.
|
|
563
|
+
* @throws {AppwriteException}
|
|
564
|
+
* @returns {Promise<Models.Execution>}
|
|
565
|
+
*/
|
|
566
|
+
getExecution(params: {
|
|
567
|
+
functionId: string;
|
|
568
|
+
executionId: string;
|
|
569
|
+
}): Promise<Models.Execution>;
|
|
570
|
+
/**
|
|
571
|
+
* Get a function execution log by its unique ID.
|
|
572
|
+
*
|
|
573
|
+
* @param {string} functionId - Function ID.
|
|
574
|
+
* @param {string} executionId - Execution ID.
|
|
239
575
|
* @throws {AppwriteException}
|
|
240
576
|
* @returns {Promise<Models.Execution>}
|
|
577
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
241
578
|
*/
|
|
242
579
|
getExecution(functionId: string, executionId: string): Promise<Models.Execution>;
|
|
243
580
|
/**
|
|
244
581
|
* Delete a function execution by its unique ID.
|
|
245
582
|
*
|
|
246
|
-
* @param {string} functionId
|
|
247
|
-
* @param {string} executionId
|
|
583
|
+
* @param {string} params.functionId - Function ID.
|
|
584
|
+
* @param {string} params.executionId - Execution ID.
|
|
248
585
|
* @throws {AppwriteException}
|
|
249
586
|
* @returns {Promise<{}>}
|
|
250
587
|
*/
|
|
588
|
+
deleteExecution(params: {
|
|
589
|
+
functionId: string;
|
|
590
|
+
executionId: string;
|
|
591
|
+
}): Promise<{}>;
|
|
592
|
+
/**
|
|
593
|
+
* Delete a function execution by its unique ID.
|
|
594
|
+
*
|
|
595
|
+
* @param {string} functionId - Function ID.
|
|
596
|
+
* @param {string} executionId - Execution ID.
|
|
597
|
+
* @throws {AppwriteException}
|
|
598
|
+
* @returns {Promise<{}>}
|
|
599
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
600
|
+
*/
|
|
251
601
|
deleteExecution(functionId: string, executionId: string): Promise<{}>;
|
|
252
602
|
/**
|
|
253
603
|
* Get a list of all variables of a specific function.
|
|
254
604
|
*
|
|
255
|
-
* @param {string} functionId
|
|
605
|
+
* @param {string} params.functionId - Function unique ID.
|
|
606
|
+
* @throws {AppwriteException}
|
|
607
|
+
* @returns {Promise<Models.VariableList>}
|
|
608
|
+
*/
|
|
609
|
+
listVariables(params: {
|
|
610
|
+
functionId: string;
|
|
611
|
+
}): Promise<Models.VariableList>;
|
|
612
|
+
/**
|
|
613
|
+
* Get a list of all variables of a specific function.
|
|
614
|
+
*
|
|
615
|
+
* @param {string} functionId - Function unique ID.
|
|
256
616
|
* @throws {AppwriteException}
|
|
257
617
|
* @returns {Promise<Models.VariableList>}
|
|
618
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
258
619
|
*/
|
|
259
620
|
listVariables(functionId: string): Promise<Models.VariableList>;
|
|
260
621
|
/**
|
|
261
622
|
* Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
|
|
262
623
|
*
|
|
263
|
-
* @param {string} functionId
|
|
264
|
-
* @param {string} key
|
|
265
|
-
* @param {string} value
|
|
266
|
-
* @param {boolean} secret
|
|
624
|
+
* @param {string} params.functionId - Function unique ID.
|
|
625
|
+
* @param {string} params.key - Variable key. Max length: 255 chars.
|
|
626
|
+
* @param {string} params.value - Variable value. Max length: 8192 chars.
|
|
627
|
+
* @param {boolean} params.secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime.
|
|
628
|
+
* @throws {AppwriteException}
|
|
629
|
+
* @returns {Promise<Models.Variable>}
|
|
630
|
+
*/
|
|
631
|
+
createVariable(params: {
|
|
632
|
+
functionId: string;
|
|
633
|
+
key: string;
|
|
634
|
+
value: string;
|
|
635
|
+
secret?: boolean;
|
|
636
|
+
}): Promise<Models.Variable>;
|
|
637
|
+
/**
|
|
638
|
+
* Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
|
|
639
|
+
*
|
|
640
|
+
* @param {string} functionId - Function unique ID.
|
|
641
|
+
* @param {string} key - Variable key. Max length: 255 chars.
|
|
642
|
+
* @param {string} value - Variable value. Max length: 8192 chars.
|
|
643
|
+
* @param {boolean} secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime.
|
|
267
644
|
* @throws {AppwriteException}
|
|
268
645
|
* @returns {Promise<Models.Variable>}
|
|
646
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
269
647
|
*/
|
|
270
648
|
createVariable(functionId: string, key: string, value: string, secret?: boolean): Promise<Models.Variable>;
|
|
271
649
|
/**
|
|
272
650
|
* Get a variable by its unique ID.
|
|
273
651
|
*
|
|
274
|
-
* @param {string} functionId
|
|
275
|
-
* @param {string} variableId
|
|
652
|
+
* @param {string} params.functionId - Function unique ID.
|
|
653
|
+
* @param {string} params.variableId - Variable unique ID.
|
|
276
654
|
* @throws {AppwriteException}
|
|
277
655
|
* @returns {Promise<Models.Variable>}
|
|
278
656
|
*/
|
|
657
|
+
getVariable(params: {
|
|
658
|
+
functionId: string;
|
|
659
|
+
variableId: string;
|
|
660
|
+
}): Promise<Models.Variable>;
|
|
661
|
+
/**
|
|
662
|
+
* Get a variable by its unique ID.
|
|
663
|
+
*
|
|
664
|
+
* @param {string} functionId - Function unique ID.
|
|
665
|
+
* @param {string} variableId - Variable unique ID.
|
|
666
|
+
* @throws {AppwriteException}
|
|
667
|
+
* @returns {Promise<Models.Variable>}
|
|
668
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
669
|
+
*/
|
|
279
670
|
getVariable(functionId: string, variableId: string): Promise<Models.Variable>;
|
|
280
671
|
/**
|
|
281
672
|
* Update variable by its unique ID.
|
|
282
673
|
*
|
|
283
|
-
* @param {string} functionId
|
|
284
|
-
* @param {string} variableId
|
|
285
|
-
* @param {string} key
|
|
286
|
-
* @param {string} value
|
|
287
|
-
* @param {boolean} secret
|
|
674
|
+
* @param {string} params.functionId - Function unique ID.
|
|
675
|
+
* @param {string} params.variableId - Variable unique ID.
|
|
676
|
+
* @param {string} params.key - Variable key. Max length: 255 chars.
|
|
677
|
+
* @param {string} params.value - Variable value. Max length: 8192 chars.
|
|
678
|
+
* @param {boolean} params.secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime.
|
|
679
|
+
* @throws {AppwriteException}
|
|
680
|
+
* @returns {Promise<Models.Variable>}
|
|
681
|
+
*/
|
|
682
|
+
updateVariable(params: {
|
|
683
|
+
functionId: string;
|
|
684
|
+
variableId: string;
|
|
685
|
+
key: string;
|
|
686
|
+
value?: string;
|
|
687
|
+
secret?: boolean;
|
|
688
|
+
}): Promise<Models.Variable>;
|
|
689
|
+
/**
|
|
690
|
+
* Update variable by its unique ID.
|
|
691
|
+
*
|
|
692
|
+
* @param {string} functionId - Function unique ID.
|
|
693
|
+
* @param {string} variableId - Variable unique ID.
|
|
694
|
+
* @param {string} key - Variable key. Max length: 255 chars.
|
|
695
|
+
* @param {string} value - Variable value. Max length: 8192 chars.
|
|
696
|
+
* @param {boolean} secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime.
|
|
288
697
|
* @throws {AppwriteException}
|
|
289
698
|
* @returns {Promise<Models.Variable>}
|
|
699
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
290
700
|
*/
|
|
291
701
|
updateVariable(functionId: string, variableId: string, key: string, value?: string, secret?: boolean): Promise<Models.Variable>;
|
|
292
702
|
/**
|
|
293
703
|
* Delete a variable by its unique ID.
|
|
294
704
|
*
|
|
295
|
-
* @param {string} functionId
|
|
296
|
-
* @param {string} variableId
|
|
705
|
+
* @param {string} params.functionId - Function unique ID.
|
|
706
|
+
* @param {string} params.variableId - Variable unique ID.
|
|
707
|
+
* @throws {AppwriteException}
|
|
708
|
+
* @returns {Promise<{}>}
|
|
709
|
+
*/
|
|
710
|
+
deleteVariable(params: {
|
|
711
|
+
functionId: string;
|
|
712
|
+
variableId: string;
|
|
713
|
+
}): Promise<{}>;
|
|
714
|
+
/**
|
|
715
|
+
* Delete a variable by its unique ID.
|
|
716
|
+
*
|
|
717
|
+
* @param {string} functionId - Function unique ID.
|
|
718
|
+
* @param {string} variableId - Variable unique ID.
|
|
297
719
|
* @throws {AppwriteException}
|
|
298
720
|
* @returns {Promise<{}>}
|
|
721
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
299
722
|
*/
|
|
300
723
|
deleteVariable(functionId: string, variableId: string): Promise<{}>;
|
|
301
724
|
}
|