node-appwrite 22.1.3 → 23.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 +2 -2
- package/dist/client.d.mts +33 -0
- package/dist/client.d.ts +33 -0
- package/dist/client.js +52 -4
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +52 -4
- package/dist/client.mjs.map +1 -1
- package/dist/enums/backup-services.d.mts +3 -0
- package/dist/enums/backup-services.d.ts +3 -0
- package/dist/enums/backup-services.js +3 -0
- package/dist/enums/backup-services.js.map +1 -1
- package/dist/enums/backup-services.mjs +3 -0
- package/dist/enums/backup-services.mjs.map +1 -1
- package/dist/enums/database-type.d.mts +3 -1
- package/dist/enums/database-type.d.ts +3 -1
- package/dist/enums/database-type.js +2 -0
- package/dist/enums/database-type.js.map +1 -1
- package/dist/enums/database-type.mjs +2 -0
- package/dist/enums/database-type.mjs.map +1 -1
- package/dist/enums/databases-index-type.d.mts +8 -0
- package/dist/enums/databases-index-type.d.ts +8 -0
- package/dist/enums/databases-index-type.js +13 -0
- package/dist/enums/databases-index-type.js.map +1 -0
- package/dist/enums/databases-index-type.mjs +12 -0
- package/dist/enums/databases-index-type.mjs.map +1 -0
- package/dist/enums/scopes.d.mts +4 -0
- package/dist/enums/scopes.d.ts +4 -0
- package/dist/enums/scopes.js +4 -0
- package/dist/enums/scopes.js.map +1 -1
- package/dist/enums/scopes.mjs +4 -0
- package/dist/enums/scopes.mjs.map +1 -1
- package/dist/enums/{index-type.d.mts → tables-db-index-type.d.mts} +2 -2
- package/dist/enums/{index-type.d.ts → tables-db-index-type.d.ts} +2 -2
- package/dist/enums/tables-db-index-type.js +13 -0
- package/dist/enums/tables-db-index-type.js.map +1 -0
- package/dist/enums/tables-db-index-type.mjs +12 -0
- package/dist/enums/tables-db-index-type.mjs.map +1 -0
- package/dist/enums/template-reference-type.d.mts +1 -1
- package/dist/enums/template-reference-type.d.ts +1 -1
- package/dist/enums/template-reference-type.js +1 -1
- package/dist/enums/template-reference-type.js.map +1 -1
- package/dist/enums/template-reference-type.mjs +1 -1
- package/dist/enums/template-reference-type.mjs.map +1 -1
- package/dist/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +18 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/dist/models.d.mts +107 -9
- package/dist/models.d.ts +107 -9
- package/dist/services/databases.d.mts +5 -5
- package/dist/services/databases.d.ts +5 -5
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/functions.d.mts +20 -8
- package/dist/services/functions.d.ts +20 -8
- package/dist/services/functions.js +28 -8
- package/dist/services/functions.js.map +1 -1
- package/dist/services/functions.mjs +28 -8
- package/dist/services/functions.mjs.map +1 -1
- package/dist/services/health.d.mts +0 -95
- package/dist/services/health.d.ts +0 -95
- package/dist/services/health.js +0 -120
- package/dist/services/health.js.map +1 -1
- package/dist/services/health.mjs +0 -120
- package/dist/services/health.mjs.map +1 -1
- package/dist/services/project.d.mts +136 -0
- package/dist/services/project.d.ts +136 -0
- package/dist/services/project.js +183 -0
- package/dist/services/project.js.map +1 -0
- package/dist/services/project.mjs +182 -0
- package/dist/services/project.mjs.map +1 -0
- package/dist/services/sites.d.mts +26 -8
- package/dist/services/sites.d.ts +26 -8
- package/dist/services/sites.js +55 -25
- package/dist/services/sites.js.map +1 -1
- package/dist/services/sites.mjs +55 -25
- package/dist/services/sites.mjs.map +1 -1
- package/dist/services/tables-db.d.mts +5 -5
- package/dist/services/tables-db.d.ts +5 -5
- package/dist/services/tables-db.js.map +1 -1
- package/dist/services/tables-db.mjs.map +1 -1
- package/dist/services/users.d.mts +26 -2
- package/dist/services/users.d.ts +26 -2
- package/dist/services/users.js +34 -0
- package/dist/services/users.js.map +1 -1
- package/dist/services/users.mjs +34 -0
- package/dist/services/users.mjs.map +1 -1
- package/dist/services/webhooks.d.mts +179 -0
- package/dist/services/webhooks.d.ts +179 -0
- package/dist/services/webhooks.js +261 -0
- package/dist/services/webhooks.js.map +1 -0
- package/dist/services/webhooks.mjs +260 -0
- package/dist/services/webhooks.mjs.map +1 -0
- package/package.json +5 -3
- package/dist/enums/index-type.js +0 -13
- package/dist/enums/index-type.js.map +0 -1
- package/dist/enums/index-type.mjs +0 -12
- package/dist/enums/index-type.mjs.map +0 -1
|
@@ -66,7 +66,9 @@ declare class Functions {
|
|
|
66
66
|
* @param {string} params.providerBranch - Production branch for the repo linked to the function.
|
|
67
67
|
* @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.
|
|
68
68
|
* @param {string} params.providerRootDirectory - Path to function code in the linked repo.
|
|
69
|
-
* @param {string} params.
|
|
69
|
+
* @param {string} params.buildSpecification - Build specification for the function deployments.
|
|
70
|
+
* @param {string} params.runtimeSpecification - Runtime specification for the function executions.
|
|
71
|
+
* @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
70
72
|
* @throws {AppwriteException}
|
|
71
73
|
* @returns {Promise<Models.Function>}
|
|
72
74
|
*/
|
|
@@ -88,7 +90,9 @@ declare class Functions {
|
|
|
88
90
|
providerBranch?: string;
|
|
89
91
|
providerSilentMode?: boolean;
|
|
90
92
|
providerRootDirectory?: string;
|
|
91
|
-
|
|
93
|
+
buildSpecification?: string;
|
|
94
|
+
runtimeSpecification?: string;
|
|
95
|
+
deploymentRetention?: number;
|
|
92
96
|
}): Promise<Models.Function>;
|
|
93
97
|
/**
|
|
94
98
|
* 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.
|
|
@@ -110,12 +114,14 @@ declare class Functions {
|
|
|
110
114
|
* @param {string} providerBranch - Production branch for the repo linked to the function.
|
|
111
115
|
* @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.
|
|
112
116
|
* @param {string} providerRootDirectory - Path to function code in the linked repo.
|
|
113
|
-
* @param {string}
|
|
117
|
+
* @param {string} buildSpecification - Build specification for the function deployments.
|
|
118
|
+
* @param {string} runtimeSpecification - Runtime specification for the function executions.
|
|
119
|
+
* @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
114
120
|
* @throws {AppwriteException}
|
|
115
121
|
* @returns {Promise<Models.Function>}
|
|
116
122
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
117
123
|
*/
|
|
118
|
-
create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
124
|
+
create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
|
|
119
125
|
/**
|
|
120
126
|
* Get a list of all runtimes that are currently active on your instance.
|
|
121
127
|
*
|
|
@@ -169,7 +175,9 @@ declare class Functions {
|
|
|
169
175
|
* @param {string} params.providerBranch - Production branch for the repo linked to the function
|
|
170
176
|
* @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.
|
|
171
177
|
* @param {string} params.providerRootDirectory - Path to function code in the linked repo.
|
|
172
|
-
* @param {string} params.
|
|
178
|
+
* @param {string} params.buildSpecification - Build specification for the function deployments.
|
|
179
|
+
* @param {string} params.runtimeSpecification - Runtime specification for the function executions.
|
|
180
|
+
* @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
173
181
|
* @throws {AppwriteException}
|
|
174
182
|
* @returns {Promise<Models.Function>}
|
|
175
183
|
*/
|
|
@@ -191,7 +199,9 @@ declare class Functions {
|
|
|
191
199
|
providerBranch?: string;
|
|
192
200
|
providerSilentMode?: boolean;
|
|
193
201
|
providerRootDirectory?: string;
|
|
194
|
-
|
|
202
|
+
buildSpecification?: string;
|
|
203
|
+
runtimeSpecification?: string;
|
|
204
|
+
deploymentRetention?: number;
|
|
195
205
|
}): Promise<Models.Function>;
|
|
196
206
|
/**
|
|
197
207
|
* Update function by its unique ID.
|
|
@@ -213,12 +223,14 @@ declare class Functions {
|
|
|
213
223
|
* @param {string} providerBranch - Production branch for the repo linked to the function
|
|
214
224
|
* @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.
|
|
215
225
|
* @param {string} providerRootDirectory - Path to function code in the linked repo.
|
|
216
|
-
* @param {string}
|
|
226
|
+
* @param {string} buildSpecification - Build specification for the function deployments.
|
|
227
|
+
* @param {string} runtimeSpecification - Runtime specification for the function executions.
|
|
228
|
+
* @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
217
229
|
* @throws {AppwriteException}
|
|
218
230
|
* @returns {Promise<Models.Function>}
|
|
219
231
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
220
232
|
*/
|
|
221
|
-
update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
233
|
+
update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
|
|
222
234
|
/**
|
|
223
235
|
* Delete a function by its unique ID.
|
|
224
236
|
*
|
|
@@ -66,7 +66,9 @@ declare class Functions {
|
|
|
66
66
|
* @param {string} params.providerBranch - Production branch for the repo linked to the function.
|
|
67
67
|
* @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.
|
|
68
68
|
* @param {string} params.providerRootDirectory - Path to function code in the linked repo.
|
|
69
|
-
* @param {string} params.
|
|
69
|
+
* @param {string} params.buildSpecification - Build specification for the function deployments.
|
|
70
|
+
* @param {string} params.runtimeSpecification - Runtime specification for the function executions.
|
|
71
|
+
* @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
70
72
|
* @throws {AppwriteException}
|
|
71
73
|
* @returns {Promise<Models.Function>}
|
|
72
74
|
*/
|
|
@@ -88,7 +90,9 @@ declare class Functions {
|
|
|
88
90
|
providerBranch?: string;
|
|
89
91
|
providerSilentMode?: boolean;
|
|
90
92
|
providerRootDirectory?: string;
|
|
91
|
-
|
|
93
|
+
buildSpecification?: string;
|
|
94
|
+
runtimeSpecification?: string;
|
|
95
|
+
deploymentRetention?: number;
|
|
92
96
|
}): Promise<Models.Function>;
|
|
93
97
|
/**
|
|
94
98
|
* 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.
|
|
@@ -110,12 +114,14 @@ declare class Functions {
|
|
|
110
114
|
* @param {string} providerBranch - Production branch for the repo linked to the function.
|
|
111
115
|
* @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.
|
|
112
116
|
* @param {string} providerRootDirectory - Path to function code in the linked repo.
|
|
113
|
-
* @param {string}
|
|
117
|
+
* @param {string} buildSpecification - Build specification for the function deployments.
|
|
118
|
+
* @param {string} runtimeSpecification - Runtime specification for the function executions.
|
|
119
|
+
* @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
114
120
|
* @throws {AppwriteException}
|
|
115
121
|
* @returns {Promise<Models.Function>}
|
|
116
122
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
117
123
|
*/
|
|
118
|
-
create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
124
|
+
create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
|
|
119
125
|
/**
|
|
120
126
|
* Get a list of all runtimes that are currently active on your instance.
|
|
121
127
|
*
|
|
@@ -169,7 +175,9 @@ declare class Functions {
|
|
|
169
175
|
* @param {string} params.providerBranch - Production branch for the repo linked to the function
|
|
170
176
|
* @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.
|
|
171
177
|
* @param {string} params.providerRootDirectory - Path to function code in the linked repo.
|
|
172
|
-
* @param {string} params.
|
|
178
|
+
* @param {string} params.buildSpecification - Build specification for the function deployments.
|
|
179
|
+
* @param {string} params.runtimeSpecification - Runtime specification for the function executions.
|
|
180
|
+
* @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
173
181
|
* @throws {AppwriteException}
|
|
174
182
|
* @returns {Promise<Models.Function>}
|
|
175
183
|
*/
|
|
@@ -191,7 +199,9 @@ declare class Functions {
|
|
|
191
199
|
providerBranch?: string;
|
|
192
200
|
providerSilentMode?: boolean;
|
|
193
201
|
providerRootDirectory?: string;
|
|
194
|
-
|
|
202
|
+
buildSpecification?: string;
|
|
203
|
+
runtimeSpecification?: string;
|
|
204
|
+
deploymentRetention?: number;
|
|
195
205
|
}): Promise<Models.Function>;
|
|
196
206
|
/**
|
|
197
207
|
* Update function by its unique ID.
|
|
@@ -213,12 +223,14 @@ declare class Functions {
|
|
|
213
223
|
* @param {string} providerBranch - Production branch for the repo linked to the function
|
|
214
224
|
* @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.
|
|
215
225
|
* @param {string} providerRootDirectory - Path to function code in the linked repo.
|
|
216
|
-
* @param {string}
|
|
226
|
+
* @param {string} buildSpecification - Build specification for the function deployments.
|
|
227
|
+
* @param {string} runtimeSpecification - Runtime specification for the function executions.
|
|
228
|
+
* @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
217
229
|
* @throws {AppwriteException}
|
|
218
230
|
* @returns {Promise<Models.Function>}
|
|
219
231
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
220
232
|
*/
|
|
221
|
-
update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
233
|
+
update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
|
|
222
234
|
/**
|
|
223
235
|
* Delete a function by its unique ID.
|
|
224
236
|
*
|
|
@@ -63,7 +63,9 @@ class Functions {
|
|
|
63
63
|
providerBranch: rest[13],
|
|
64
64
|
providerSilentMode: rest[14],
|
|
65
65
|
providerRootDirectory: rest[15],
|
|
66
|
-
|
|
66
|
+
buildSpecification: rest[16],
|
|
67
|
+
runtimeSpecification: rest[17],
|
|
68
|
+
deploymentRetention: rest[18]
|
|
67
69
|
};
|
|
68
70
|
}
|
|
69
71
|
const functionId = params.functionId;
|
|
@@ -83,7 +85,9 @@ class Functions {
|
|
|
83
85
|
const providerBranch = params.providerBranch;
|
|
84
86
|
const providerSilentMode = params.providerSilentMode;
|
|
85
87
|
const providerRootDirectory = params.providerRootDirectory;
|
|
86
|
-
const
|
|
88
|
+
const buildSpecification = params.buildSpecification;
|
|
89
|
+
const runtimeSpecification = params.runtimeSpecification;
|
|
90
|
+
const deploymentRetention = params.deploymentRetention;
|
|
87
91
|
if (typeof functionId === "undefined") {
|
|
88
92
|
throw new client.AppwriteException('Missing required parameter: "functionId"');
|
|
89
93
|
}
|
|
@@ -146,8 +150,14 @@ class Functions {
|
|
|
146
150
|
if (typeof providerRootDirectory !== "undefined") {
|
|
147
151
|
payload["providerRootDirectory"] = providerRootDirectory;
|
|
148
152
|
}
|
|
149
|
-
if (typeof
|
|
150
|
-
payload["
|
|
153
|
+
if (typeof buildSpecification !== "undefined") {
|
|
154
|
+
payload["buildSpecification"] = buildSpecification;
|
|
155
|
+
}
|
|
156
|
+
if (typeof runtimeSpecification !== "undefined") {
|
|
157
|
+
payload["runtimeSpecification"] = runtimeSpecification;
|
|
158
|
+
}
|
|
159
|
+
if (typeof deploymentRetention !== "undefined") {
|
|
160
|
+
payload["deploymentRetention"] = deploymentRetention;
|
|
151
161
|
}
|
|
152
162
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
153
163
|
const apiHeaders = {
|
|
@@ -243,7 +253,9 @@ class Functions {
|
|
|
243
253
|
providerBranch: rest[13],
|
|
244
254
|
providerSilentMode: rest[14],
|
|
245
255
|
providerRootDirectory: rest[15],
|
|
246
|
-
|
|
256
|
+
buildSpecification: rest[16],
|
|
257
|
+
runtimeSpecification: rest[17],
|
|
258
|
+
deploymentRetention: rest[18]
|
|
247
259
|
};
|
|
248
260
|
}
|
|
249
261
|
const functionId = params.functionId;
|
|
@@ -263,7 +275,9 @@ class Functions {
|
|
|
263
275
|
const providerBranch = params.providerBranch;
|
|
264
276
|
const providerSilentMode = params.providerSilentMode;
|
|
265
277
|
const providerRootDirectory = params.providerRootDirectory;
|
|
266
|
-
const
|
|
278
|
+
const buildSpecification = params.buildSpecification;
|
|
279
|
+
const runtimeSpecification = params.runtimeSpecification;
|
|
280
|
+
const deploymentRetention = params.deploymentRetention;
|
|
267
281
|
if (typeof functionId === "undefined") {
|
|
268
282
|
throw new client.AppwriteException('Missing required parameter: "functionId"');
|
|
269
283
|
}
|
|
@@ -320,8 +334,14 @@ class Functions {
|
|
|
320
334
|
if (typeof providerRootDirectory !== "undefined") {
|
|
321
335
|
payload["providerRootDirectory"] = providerRootDirectory;
|
|
322
336
|
}
|
|
323
|
-
if (typeof
|
|
324
|
-
payload["
|
|
337
|
+
if (typeof buildSpecification !== "undefined") {
|
|
338
|
+
payload["buildSpecification"] = buildSpecification;
|
|
339
|
+
}
|
|
340
|
+
if (typeof runtimeSpecification !== "undefined") {
|
|
341
|
+
payload["runtimeSpecification"] = runtimeSpecification;
|
|
342
|
+
}
|
|
343
|
+
if (typeof deploymentRetention !== "undefined") {
|
|
344
|
+
payload["deploymentRetention"] = deploymentRetention;
|
|
325
345
|
}
|
|
326
346
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
327
347
|
const apiHeaders = {
|