@appwrite.io/console 12.2.0 → 13.1.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/cjs/sdk.js +1719 -1204
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1717 -1205
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +1736 -1221
- package/package.json +1 -1
- package/types/channel.d.ts +8 -3
- package/types/client.d.ts +1 -1
- package/types/enums/account-key-scopes.d.ts +5 -0
- package/types/enums/appwrite-migration-resource.d.ts +1 -0
- package/types/enums/backup-services.d.ts +1 -0
- package/types/enums/{resource-type.d.ts → block-resource-type.d.ts} +2 -6
- package/types/enums/{theme.d.ts → browser-theme.d.ts} +1 -1
- package/types/enums/cache-database.d.ts +5 -0
- package/types/enums/cache-target.d.ts +8 -0
- package/types/enums/{registration-type.d.ts → domain-registration-type.d.ts} +1 -1
- package/types/enums/{filter-type.d.ts → domain-suggestion-type.d.ts} +1 -1
- package/types/enums/{model.d.ts → embedding-model.d.ts} +1 -1
- package/types/enums/{runtime.d.ts → function-runtime.d.ts} +4 -2
- package/types/enums/function-template-use-case.d.ts +9 -0
- package/types/enums/{name.d.ts → health-queue-name.d.ts} +1 -1
- package/types/enums/{on-duplicate.d.ts → migration-on-duplicate.d.ts} +1 -1
- package/types/enums/o-auth-2-google-prompt.d.ts +5 -0
- package/types/enums/o-auth-provider.d.ts +1 -3
- package/types/enums/organization-addon.d.ts +4 -0
- package/types/enums/organization-key-scopes.d.ts +12 -0
- package/types/enums/{auth-method.d.ts → project-auth-method-id.d.ts} +1 -1
- package/types/enums/{email-template-type.d.ts → project-email-template-id.d.ts} +1 -1
- package/types/enums/{email-template-locale.d.ts → project-email-template-locale.d.ts} +1 -1
- package/types/enums/{scopes.d.ts → project-key-scopes.d.ts} +10 -8
- package/types/enums/project-o-auth-2-google-prompt.d.ts +5 -0
- package/types/enums/project-o-auth-provider-id.d.ts +45 -0
- package/types/enums/{project-policy.d.ts → project-policy-id.d.ts} +1 -1
- package/types/enums/{protocol-id.d.ts → project-protocol-id.d.ts} +1 -1
- package/types/enums/{service-id.d.ts → project-service-id.d.ts} +3 -2
- package/types/enums/project-smtp-secure.d.ts +4 -0
- package/types/enums/project-status.d.ts +3 -0
- package/types/enums/query-suggestion-resource.d.ts +10 -1
- package/types/enums/redirect-status-code.d.ts +6 -0
- package/types/enums/schedule-resource-type.d.ts +6 -0
- package/types/enums/{adapter.d.ts → site-adapter.d.ts} +1 -1
- package/types/enums/{runtimes.d.ts → site-build-runtime.d.ts} +4 -2
- package/types/enums/{framework.d.ts → site-framework.d.ts} +1 -1
- package/types/enums/{use-cases.d.ts → site-template-use-case.d.ts} +3 -8
- package/types/index.d.ts +36 -26
- package/types/models.d.ts +1186 -1185
- package/types/services/account.d.ts +9 -9
- package/types/services/avatars.d.ts +5 -5
- package/types/services/console.d.ts +31 -0
- package/types/services/documents-db.d.ts +1 -4
- package/types/services/domains.d.ts +216 -216
- package/types/services/functions.d.ts +36 -25
- package/types/services/health.d.ts +5 -5
- package/types/services/manager.d.ts +49 -9
- package/types/services/migrations.d.ts +13 -13
- package/types/services/organization.d.ts +234 -0
- package/types/services/organizations.d.ts +5 -131
- package/types/services/presences.d.ts +166 -0
- package/types/services/project.d.ts +226 -215
- package/types/services/projects.d.ts +10 -159
- package/types/services/proxy.d.ts +5 -5
- package/types/services/realtime.d.ts +45 -3
- package/types/services/sites.d.ts +43 -32
- package/types/services/usage.d.ts +50 -0
- package/types/services/vectors-db.d.ts +6 -9
- package/types/enums/addon.d.ts +0 -3
- package/types/enums/build-runtime.d.ts +0 -91
- package/types/enums/frameworks.d.ts +0 -17
- package/types/enums/secure.d.ts +0 -4
- package/types/enums/status-code.d.ts +0 -6
- package/types/enums/status.d.ts +0 -3
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Client, UploadProgress } from '../client';
|
|
2
2
|
import type { Models } from '../models';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { UseCases } from '../enums/use-cases';
|
|
3
|
+
import { FunctionRuntime } from '../enums/function-runtime';
|
|
4
|
+
import { ProjectKeyScopes } from '../enums/project-key-scopes';
|
|
5
|
+
import { FunctionTemplateUseCase } from '../enums/function-template-use-case';
|
|
7
6
|
import { UsageRange } from '../enums/usage-range';
|
|
8
7
|
import { TemplateReferenceType } from '../enums/template-reference-type';
|
|
9
8
|
import { VCSReferenceType } from '../enums/vcs-reference-type';
|
|
@@ -42,7 +41,7 @@ export declare class Functions {
|
|
|
42
41
|
*
|
|
43
42
|
* @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.
|
|
44
43
|
* @param {string} params.name - Function name. Max length: 128 chars.
|
|
45
|
-
* @param {
|
|
44
|
+
* @param {FunctionRuntime} params.runtime - Execution runtime.
|
|
46
45
|
* @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.
|
|
47
46
|
* @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
|
|
48
47
|
* @param {string} params.schedule - Schedule CRON syntax.
|
|
@@ -51,12 +50,14 @@ export declare class Functions {
|
|
|
51
50
|
* @param {boolean} params.logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
|
|
52
51
|
* @param {string} params.entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
|
|
53
52
|
* @param {string} params.commands - Build Commands.
|
|
54
|
-
* @param {
|
|
53
|
+
* @param {ProjectKeyScopes[]} params.scopes - List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.
|
|
55
54
|
* @param {string} params.installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
|
|
56
55
|
* @param {string} params.providerRepositoryId - Repository ID of the repo linked to the function.
|
|
57
56
|
* @param {string} params.providerBranch - Production branch for the repo linked to the function.
|
|
58
57
|
* @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.
|
|
59
58
|
* @param {string} params.providerRootDirectory - Path to function code in the linked repo.
|
|
59
|
+
* @param {string[]} params.providerBranches - List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.
|
|
60
|
+
* @param {string[]} params.providerPaths - List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.
|
|
60
61
|
* @param {string} params.buildSpecification - Build specification for the function deployments.
|
|
61
62
|
* @param {string} params.runtimeSpecification - Runtime specification for the function executions.
|
|
62
63
|
* @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
@@ -66,7 +67,7 @@ export declare class Functions {
|
|
|
66
67
|
create(params: {
|
|
67
68
|
functionId: string;
|
|
68
69
|
name: string;
|
|
69
|
-
runtime:
|
|
70
|
+
runtime: FunctionRuntime;
|
|
70
71
|
execute?: string[];
|
|
71
72
|
events?: string[];
|
|
72
73
|
schedule?: string;
|
|
@@ -75,12 +76,14 @@ export declare class Functions {
|
|
|
75
76
|
logging?: boolean;
|
|
76
77
|
entrypoint?: string;
|
|
77
78
|
commands?: string;
|
|
78
|
-
scopes?:
|
|
79
|
+
scopes?: ProjectKeyScopes[];
|
|
79
80
|
installationId?: string;
|
|
80
81
|
providerRepositoryId?: string;
|
|
81
82
|
providerBranch?: string;
|
|
82
83
|
providerSilentMode?: boolean;
|
|
83
84
|
providerRootDirectory?: string;
|
|
85
|
+
providerBranches?: string[];
|
|
86
|
+
providerPaths?: string[];
|
|
84
87
|
buildSpecification?: string;
|
|
85
88
|
runtimeSpecification?: string;
|
|
86
89
|
deploymentRetention?: number;
|
|
@@ -90,7 +93,7 @@ export declare class Functions {
|
|
|
90
93
|
*
|
|
91
94
|
* @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.
|
|
92
95
|
* @param {string} name - Function name. Max length: 128 chars.
|
|
93
|
-
* @param {
|
|
96
|
+
* @param {FunctionRuntime} runtime - Execution runtime.
|
|
94
97
|
* @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.
|
|
95
98
|
* @param {string[]} events - Events list. Maximum of 100 events are allowed.
|
|
96
99
|
* @param {string} schedule - Schedule CRON syntax.
|
|
@@ -99,12 +102,14 @@ export declare class Functions {
|
|
|
99
102
|
* @param {boolean} logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
|
|
100
103
|
* @param {string} entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
|
|
101
104
|
* @param {string} commands - Build Commands.
|
|
102
|
-
* @param {
|
|
105
|
+
* @param {ProjectKeyScopes[]} scopes - List of scopes allowed for API key auto-generated for every execution. Maximum of 100 scopes are allowed.
|
|
103
106
|
* @param {string} installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
|
|
104
107
|
* @param {string} providerRepositoryId - Repository ID of the repo linked to the function.
|
|
105
108
|
* @param {string} providerBranch - Production branch for the repo linked to the function.
|
|
106
109
|
* @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.
|
|
107
110
|
* @param {string} providerRootDirectory - Path to function code in the linked repo.
|
|
111
|
+
* @param {string[]} providerBranches - List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.
|
|
112
|
+
* @param {string[]} providerPaths - List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.
|
|
108
113
|
* @param {string} buildSpecification - Build specification for the function deployments.
|
|
109
114
|
* @param {string} runtimeSpecification - Runtime specification for the function executions.
|
|
110
115
|
* @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
@@ -112,7 +117,7 @@ export declare class Functions {
|
|
|
112
117
|
* @returns {Promise<Models.Function>}
|
|
113
118
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
114
119
|
*/
|
|
115
|
-
create(functionId: string, name: string, runtime:
|
|
120
|
+
create(functionId: string, name: string, runtime: FunctionRuntime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: ProjectKeyScopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, providerBranches?: string[], providerPaths?: string[], buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
|
|
116
121
|
/**
|
|
117
122
|
* Get a list of all runtimes that are currently active on your instance.
|
|
118
123
|
*
|
|
@@ -130,8 +135,8 @@ export declare class Functions {
|
|
|
130
135
|
/**
|
|
131
136
|
* List available function templates. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
|
|
132
137
|
*
|
|
133
|
-
* @param {
|
|
134
|
-
* @param {
|
|
138
|
+
* @param {FunctionRuntime[]} params.runtimes - List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.
|
|
139
|
+
* @param {FunctionTemplateUseCase[]} params.useCases - List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.
|
|
135
140
|
* @param {number} params.limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
|
|
136
141
|
* @param {number} params.offset - Offset the list of returned templates. Maximum offset is 5000.
|
|
137
142
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
@@ -139,8 +144,8 @@ export declare class Functions {
|
|
|
139
144
|
* @returns {Promise<Models.TemplateFunctionList>}
|
|
140
145
|
*/
|
|
141
146
|
listTemplates(params?: {
|
|
142
|
-
runtimes?:
|
|
143
|
-
useCases?:
|
|
147
|
+
runtimes?: FunctionRuntime[];
|
|
148
|
+
useCases?: FunctionTemplateUseCase[];
|
|
144
149
|
limit?: number;
|
|
145
150
|
offset?: number;
|
|
146
151
|
total?: boolean;
|
|
@@ -148,8 +153,8 @@ export declare class Functions {
|
|
|
148
153
|
/**
|
|
149
154
|
* List available function templates. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
|
|
150
155
|
*
|
|
151
|
-
* @param {
|
|
152
|
-
* @param {
|
|
156
|
+
* @param {FunctionRuntime[]} runtimes - List of runtimes allowed for filtering function templates. Maximum of 100 runtimes are allowed.
|
|
157
|
+
* @param {FunctionTemplateUseCase[]} useCases - List of use cases allowed for filtering function templates. Maximum of 100 use cases are allowed.
|
|
153
158
|
* @param {number} limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
|
|
154
159
|
* @param {number} offset - Offset the list of returned templates. Maximum offset is 5000.
|
|
155
160
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
@@ -157,7 +162,7 @@ export declare class Functions {
|
|
|
157
162
|
* @returns {Promise<Models.TemplateFunctionList>}
|
|
158
163
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
159
164
|
*/
|
|
160
|
-
listTemplates(runtimes?:
|
|
165
|
+
listTemplates(runtimes?: FunctionRuntime[], useCases?: FunctionTemplateUseCase[], limit?: number, offset?: number, total?: boolean): Promise<Models.TemplateFunctionList>;
|
|
161
166
|
/**
|
|
162
167
|
* Get a function template using ID. You can use template details in [createFunction](/docs/references/cloud/server-nodejs/functions#create) method.
|
|
163
168
|
*
|
|
@@ -220,7 +225,7 @@ export declare class Functions {
|
|
|
220
225
|
*
|
|
221
226
|
* @param {string} params.functionId - Function ID.
|
|
222
227
|
* @param {string} params.name - Function name. Max length: 128 chars.
|
|
223
|
-
* @param {
|
|
228
|
+
* @param {FunctionRuntime} params.runtime - Execution runtime.
|
|
224
229
|
* @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.
|
|
225
230
|
* @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
|
|
226
231
|
* @param {string} params.schedule - Schedule CRON syntax.
|
|
@@ -229,12 +234,14 @@ export declare class Functions {
|
|
|
229
234
|
* @param {boolean} params.logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
|
|
230
235
|
* @param {string} params.entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
|
|
231
236
|
* @param {string} params.commands - Build Commands.
|
|
232
|
-
* @param {
|
|
237
|
+
* @param {ProjectKeyScopes[]} params.scopes - List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.
|
|
233
238
|
* @param {string} params.installationId - Appwrite Installation ID for VCS (Version Controle System) deployment.
|
|
234
239
|
* @param {string} params.providerRepositoryId - Repository ID of the repo linked to the function
|
|
235
240
|
* @param {string} params.providerBranch - Production branch for the repo linked to the function
|
|
236
241
|
* @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.
|
|
237
242
|
* @param {string} params.providerRootDirectory - Path to function code in the linked repo.
|
|
243
|
+
* @param {string[]} params.providerBranches - List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.
|
|
244
|
+
* @param {string[]} params.providerPaths - List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.
|
|
238
245
|
* @param {string} params.buildSpecification - Build specification for the function deployments.
|
|
239
246
|
* @param {string} params.runtimeSpecification - Runtime specification for the function executions.
|
|
240
247
|
* @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
@@ -244,7 +251,7 @@ export declare class Functions {
|
|
|
244
251
|
update(params: {
|
|
245
252
|
functionId: string;
|
|
246
253
|
name: string;
|
|
247
|
-
runtime?:
|
|
254
|
+
runtime?: FunctionRuntime;
|
|
248
255
|
execute?: string[];
|
|
249
256
|
events?: string[];
|
|
250
257
|
schedule?: string;
|
|
@@ -253,12 +260,14 @@ export declare class Functions {
|
|
|
253
260
|
logging?: boolean;
|
|
254
261
|
entrypoint?: string;
|
|
255
262
|
commands?: string;
|
|
256
|
-
scopes?:
|
|
263
|
+
scopes?: ProjectKeyScopes[];
|
|
257
264
|
installationId?: string;
|
|
258
265
|
providerRepositoryId?: string;
|
|
259
266
|
providerBranch?: string;
|
|
260
267
|
providerSilentMode?: boolean;
|
|
261
268
|
providerRootDirectory?: string;
|
|
269
|
+
providerBranches?: string[];
|
|
270
|
+
providerPaths?: string[];
|
|
262
271
|
buildSpecification?: string;
|
|
263
272
|
runtimeSpecification?: string;
|
|
264
273
|
deploymentRetention?: number;
|
|
@@ -268,7 +277,7 @@ export declare class Functions {
|
|
|
268
277
|
*
|
|
269
278
|
* @param {string} functionId - Function ID.
|
|
270
279
|
* @param {string} name - Function name. Max length: 128 chars.
|
|
271
|
-
* @param {
|
|
280
|
+
* @param {FunctionRuntime} runtime - Execution runtime.
|
|
272
281
|
* @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.
|
|
273
282
|
* @param {string[]} events - Events list. Maximum of 100 events are allowed.
|
|
274
283
|
* @param {string} schedule - Schedule CRON syntax.
|
|
@@ -277,12 +286,14 @@ export declare class Functions {
|
|
|
277
286
|
* @param {boolean} logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
|
|
278
287
|
* @param {string} entrypoint - Entrypoint File. This path is relative to the "providerRootDirectory".
|
|
279
288
|
* @param {string} commands - Build Commands.
|
|
280
|
-
* @param {
|
|
289
|
+
* @param {ProjectKeyScopes[]} scopes - List of scopes allowed for API Key auto-generated for every execution. Maximum of 100 scopes are allowed.
|
|
281
290
|
* @param {string} installationId - Appwrite Installation ID for VCS (Version Controle System) deployment.
|
|
282
291
|
* @param {string} providerRepositoryId - Repository ID of the repo linked to the function
|
|
283
292
|
* @param {string} providerBranch - Production branch for the repo linked to the function
|
|
284
293
|
* @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.
|
|
285
294
|
* @param {string} providerRootDirectory - Path to function code in the linked repo.
|
|
295
|
+
* @param {string[]} providerBranches - List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.
|
|
296
|
+
* @param {string[]} providerPaths - List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.
|
|
286
297
|
* @param {string} buildSpecification - Build specification for the function deployments.
|
|
287
298
|
* @param {string} runtimeSpecification - Runtime specification for the function executions.
|
|
288
299
|
* @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
@@ -290,7 +301,7 @@ export declare class Functions {
|
|
|
290
301
|
* @returns {Promise<Models.Function>}
|
|
291
302
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
292
303
|
*/
|
|
293
|
-
update(functionId: string, name: string, runtime?:
|
|
304
|
+
update(functionId: string, name: string, runtime?: FunctionRuntime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: ProjectKeyScopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, providerBranches?: string[], providerPaths?: string[], buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
|
|
294
305
|
/**
|
|
295
306
|
* Delete a function by its unique ID.
|
|
296
307
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Client } from '../client';
|
|
2
2
|
import type { Models } from '../models';
|
|
3
|
-
import {
|
|
3
|
+
import { HealthQueueName } from '../enums/health-queue-name';
|
|
4
4
|
export declare class Health {
|
|
5
5
|
client: Client;
|
|
6
6
|
constructor(client: Client);
|
|
@@ -243,26 +243,26 @@ export declare class Health {
|
|
|
243
243
|
* Returns the amount of failed jobs in a given queue.
|
|
244
244
|
*
|
|
245
245
|
*
|
|
246
|
-
* @param {
|
|
246
|
+
* @param {HealthQueueName} params.name - The name of the queue
|
|
247
247
|
* @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
248
248
|
* @throws {AppwriteException}
|
|
249
249
|
* @returns {Promise<Models.HealthQueue>}
|
|
250
250
|
*/
|
|
251
251
|
getFailedJobs(params: {
|
|
252
|
-
name:
|
|
252
|
+
name: HealthQueueName;
|
|
253
253
|
threshold?: number;
|
|
254
254
|
}): Promise<Models.HealthQueue>;
|
|
255
255
|
/**
|
|
256
256
|
* Returns the amount of failed jobs in a given queue.
|
|
257
257
|
*
|
|
258
258
|
*
|
|
259
|
-
* @param {
|
|
259
|
+
* @param {HealthQueueName} name - The name of the queue
|
|
260
260
|
* @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
261
261
|
* @throws {AppwriteException}
|
|
262
262
|
* @returns {Promise<Models.HealthQueue>}
|
|
263
263
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
264
264
|
*/
|
|
265
|
-
getFailedJobs(name:
|
|
265
|
+
getFailedJobs(name: HealthQueueName, threshold?: number): Promise<Models.HealthQueue>;
|
|
266
266
|
/**
|
|
267
267
|
* Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.
|
|
268
268
|
*
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Client } from '../client';
|
|
2
2
|
import type { Models } from '../models';
|
|
3
|
-
import {
|
|
3
|
+
import { BlockResourceType } from '../enums/block-resource-type';
|
|
4
|
+
import { Region } from '../enums/region';
|
|
5
|
+
import { CacheTarget } from '../enums/cache-target';
|
|
6
|
+
import { CacheDatabase } from '../enums/cache-database';
|
|
4
7
|
export declare class Manager {
|
|
5
8
|
client: Client;
|
|
6
9
|
constructor(client: Client);
|
|
@@ -8,7 +11,7 @@ export declare class Manager {
|
|
|
8
11
|
* Creates a new resource block.
|
|
9
12
|
*
|
|
10
13
|
* @param {string} params.projectId - Project ID
|
|
11
|
-
* @param {
|
|
14
|
+
* @param {BlockResourceType} params.resourceType - Resource type to block (e.g., projects, functions, databases, storage, etc.)
|
|
12
15
|
* @param {string} params.resourceId - Optional resource ID (if omitted, all resources of this type will be blocked)
|
|
13
16
|
* @param {string} params.reason - Optional reason why the resource is blocked
|
|
14
17
|
* @param {string} params.expiredAt - Optional expiration date for the block
|
|
@@ -17,7 +20,7 @@ export declare class Manager {
|
|
|
17
20
|
*/
|
|
18
21
|
createBlock(params: {
|
|
19
22
|
projectId: string;
|
|
20
|
-
resourceType:
|
|
23
|
+
resourceType: BlockResourceType;
|
|
21
24
|
resourceId?: string;
|
|
22
25
|
reason?: string;
|
|
23
26
|
expiredAt?: string;
|
|
@@ -26,7 +29,7 @@ export declare class Manager {
|
|
|
26
29
|
* Creates a new resource block.
|
|
27
30
|
*
|
|
28
31
|
* @param {string} projectId - Project ID
|
|
29
|
-
* @param {
|
|
32
|
+
* @param {BlockResourceType} resourceType - Resource type to block (e.g., projects, functions, databases, storage, etc.)
|
|
30
33
|
* @param {string} resourceId - Optional resource ID (if omitted, all resources of this type will be blocked)
|
|
31
34
|
* @param {string} reason - Optional reason why the resource is blocked
|
|
32
35
|
* @param {string} expiredAt - Optional expiration date for the block
|
|
@@ -34,32 +37,32 @@ export declare class Manager {
|
|
|
34
37
|
* @returns {Promise<Models.Block>}
|
|
35
38
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
36
39
|
*/
|
|
37
|
-
createBlock(projectId: string, resourceType:
|
|
40
|
+
createBlock(projectId: string, resourceType: BlockResourceType, resourceId?: string, reason?: string, expiredAt?: string): Promise<Models.Block>;
|
|
38
41
|
/**
|
|
39
42
|
* Deletes resource blocks for a project.
|
|
40
43
|
*
|
|
41
44
|
* @param {string} params.projectId - Project ID
|
|
42
|
-
* @param {
|
|
45
|
+
* @param {BlockResourceType} params.resourceType - Resource type to unblock
|
|
43
46
|
* @param {string} params.resourceId - Optional resource ID (if omitted, all blocks of this type will be removed)
|
|
44
47
|
* @throws {AppwriteException}
|
|
45
48
|
* @returns {Promise<Models.BlockDelete>}
|
|
46
49
|
*/
|
|
47
50
|
deleteBlock(params: {
|
|
48
51
|
projectId: string;
|
|
49
|
-
resourceType:
|
|
52
|
+
resourceType: BlockResourceType;
|
|
50
53
|
resourceId?: string;
|
|
51
54
|
}): Promise<Models.BlockDelete>;
|
|
52
55
|
/**
|
|
53
56
|
* Deletes resource blocks for a project.
|
|
54
57
|
*
|
|
55
58
|
* @param {string} projectId - Project ID
|
|
56
|
-
* @param {
|
|
59
|
+
* @param {BlockResourceType} resourceType - Resource type to unblock
|
|
57
60
|
* @param {string} resourceId - Optional resource ID (if omitted, all blocks of this type will be removed)
|
|
58
61
|
* @throws {AppwriteException}
|
|
59
62
|
* @returns {Promise<Models.BlockDelete>}
|
|
60
63
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
61
64
|
*/
|
|
62
|
-
deleteBlock(projectId: string, resourceType:
|
|
65
|
+
deleteBlock(projectId: string, resourceType: BlockResourceType, resourceId?: string): Promise<Models.BlockDelete>;
|
|
63
66
|
/**
|
|
64
67
|
* Lists all resource blocks for a project.
|
|
65
68
|
*
|
|
@@ -79,6 +82,43 @@ export declare class Manager {
|
|
|
79
82
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
80
83
|
*/
|
|
81
84
|
listBlocks(projectId: string): Promise<Models.BlockList>;
|
|
85
|
+
/**
|
|
86
|
+
* Clears internal cache.
|
|
87
|
+
*
|
|
88
|
+
* @param {Region} params.region - Target region.
|
|
89
|
+
* @param {CacheTarget} params.cache - Cache target.
|
|
90
|
+
* @param {boolean} params.all - Clear the entire selected cache target.
|
|
91
|
+
* @param {CacheDatabase} params.database - Database cache scope.
|
|
92
|
+
* @param {string} params.projectId - Project ID for project or logs database cache.
|
|
93
|
+
* @param {string} params.collectionId - Collection ID.
|
|
94
|
+
* @param {string} params.documentId - Document ID.
|
|
95
|
+
* @throws {AppwriteException}
|
|
96
|
+
* @returns {Promise<{}>}
|
|
97
|
+
*/
|
|
98
|
+
deleteCache(params?: {
|
|
99
|
+
region?: Region;
|
|
100
|
+
cache?: CacheTarget;
|
|
101
|
+
all?: boolean;
|
|
102
|
+
database?: CacheDatabase;
|
|
103
|
+
projectId?: string;
|
|
104
|
+
collectionId?: string;
|
|
105
|
+
documentId?: string;
|
|
106
|
+
}): Promise<{}>;
|
|
107
|
+
/**
|
|
108
|
+
* Clears internal cache.
|
|
109
|
+
*
|
|
110
|
+
* @param {Region} region - Target region.
|
|
111
|
+
* @param {CacheTarget} cache - Cache target.
|
|
112
|
+
* @param {boolean} all - Clear the entire selected cache target.
|
|
113
|
+
* @param {CacheDatabase} database - Database cache scope.
|
|
114
|
+
* @param {string} projectId - Project ID for project or logs database cache.
|
|
115
|
+
* @param {string} collectionId - Collection ID.
|
|
116
|
+
* @param {string} documentId - Document ID.
|
|
117
|
+
* @throws {AppwriteException}
|
|
118
|
+
* @returns {Promise<{}>}
|
|
119
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
120
|
+
*/
|
|
121
|
+
deleteCache(region?: Region, cache?: CacheTarget, all?: boolean, database?: CacheDatabase, projectId?: string, collectionId?: string, documentId?: string): Promise<{}>;
|
|
82
122
|
/**
|
|
83
123
|
* Updates a console user status using a user ID or email address.
|
|
84
124
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Client } from '../client';
|
|
2
2
|
import type { Models } from '../models';
|
|
3
3
|
import { AppwriteMigrationResource } from '../enums/appwrite-migration-resource';
|
|
4
|
-
import {
|
|
4
|
+
import { MigrationOnDuplicate } from '../enums/migration-on-duplicate';
|
|
5
5
|
import { FirebaseMigrationResource } from '../enums/firebase-migration-resource';
|
|
6
6
|
import { NHostMigrationResource } from '../enums/n-host-migration-resource';
|
|
7
7
|
import { SupabaseMigrationResource } from '../enums/supabase-migration-resource';
|
|
@@ -40,7 +40,7 @@ export declare class Migrations {
|
|
|
40
40
|
* @param {string} params.endpoint - Source Appwrite endpoint
|
|
41
41
|
* @param {string} params.projectId - Source Project ID
|
|
42
42
|
* @param {string} params.apiKey - Source API Key
|
|
43
|
-
* @param {
|
|
43
|
+
* @param {MigrationOnDuplicate} params.onDuplicate - Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
|
|
44
44
|
* @throws {AppwriteException}
|
|
45
45
|
* @returns {Promise<Models.Migration>}
|
|
46
46
|
*/
|
|
@@ -49,7 +49,7 @@ export declare class Migrations {
|
|
|
49
49
|
endpoint: string;
|
|
50
50
|
projectId: string;
|
|
51
51
|
apiKey: string;
|
|
52
|
-
onDuplicate?:
|
|
52
|
+
onDuplicate?: MigrationOnDuplicate;
|
|
53
53
|
}): Promise<Models.Migration>;
|
|
54
54
|
/**
|
|
55
55
|
* Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project.
|
|
@@ -58,12 +58,12 @@ export declare class Migrations {
|
|
|
58
58
|
* @param {string} endpoint - Source Appwrite endpoint
|
|
59
59
|
* @param {string} projectId - Source Project ID
|
|
60
60
|
* @param {string} apiKey - Source API Key
|
|
61
|
-
* @param {
|
|
61
|
+
* @param {MigrationOnDuplicate} onDuplicate - Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
|
|
62
62
|
* @throws {AppwriteException}
|
|
63
63
|
* @returns {Promise<Models.Migration>}
|
|
64
64
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
65
65
|
*/
|
|
66
|
-
createAppwriteMigration(resources: AppwriteMigrationResource[], endpoint: string, projectId: string, apiKey: string, onDuplicate?:
|
|
66
|
+
createAppwriteMigration(resources: AppwriteMigrationResource[], endpoint: string, projectId: string, apiKey: string, onDuplicate?: MigrationOnDuplicate): Promise<Models.Migration>;
|
|
67
67
|
/**
|
|
68
68
|
* Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
69
69
|
*
|
|
@@ -142,7 +142,7 @@ export declare class Migrations {
|
|
|
142
142
|
* @param {string} params.fileId - File ID.
|
|
143
143
|
* @param {string} params.resourceId - Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.
|
|
144
144
|
* @param {boolean} params.internalFile - Is the file stored in an internal bucket?
|
|
145
|
-
* @param {
|
|
145
|
+
* @param {MigrationOnDuplicate} params.onDuplicate - Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
|
|
146
146
|
* @throws {AppwriteException}
|
|
147
147
|
* @returns {Promise<Models.Migration>}
|
|
148
148
|
*/
|
|
@@ -151,7 +151,7 @@ export declare class Migrations {
|
|
|
151
151
|
fileId: string;
|
|
152
152
|
resourceId: string;
|
|
153
153
|
internalFile?: boolean;
|
|
154
|
-
onDuplicate?:
|
|
154
|
+
onDuplicate?: MigrationOnDuplicate;
|
|
155
155
|
}): Promise<Models.Migration>;
|
|
156
156
|
/**
|
|
157
157
|
* Import documents from a CSV file into your Appwrite database. This endpoint allows you to import documents from a CSV file uploaded to Appwrite Storage bucket.
|
|
@@ -160,12 +160,12 @@ export declare class Migrations {
|
|
|
160
160
|
* @param {string} fileId - File ID.
|
|
161
161
|
* @param {string} resourceId - Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.
|
|
162
162
|
* @param {boolean} internalFile - Is the file stored in an internal bucket?
|
|
163
|
-
* @param {
|
|
163
|
+
* @param {MigrationOnDuplicate} onDuplicate - Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
|
|
164
164
|
* @throws {AppwriteException}
|
|
165
165
|
* @returns {Promise<Models.Migration>}
|
|
166
166
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
167
167
|
*/
|
|
168
|
-
createCSVImport(bucketId: string, fileId: string, resourceId: string, internalFile?: boolean, onDuplicate?:
|
|
168
|
+
createCSVImport(bucketId: string, fileId: string, resourceId: string, internalFile?: boolean, onDuplicate?: MigrationOnDuplicate): Promise<Models.Migration>;
|
|
169
169
|
/**
|
|
170
170
|
* Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project.
|
|
171
171
|
*
|
|
@@ -251,7 +251,7 @@ export declare class Migrations {
|
|
|
251
251
|
* @param {string} params.fileId - File ID.
|
|
252
252
|
* @param {string} params.resourceId - Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.
|
|
253
253
|
* @param {boolean} params.internalFile - Is the file stored in an internal bucket?
|
|
254
|
-
* @param {
|
|
254
|
+
* @param {MigrationOnDuplicate} params.onDuplicate - Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
|
|
255
255
|
* @throws {AppwriteException}
|
|
256
256
|
* @returns {Promise<Models.Migration>}
|
|
257
257
|
*/
|
|
@@ -260,7 +260,7 @@ export declare class Migrations {
|
|
|
260
260
|
fileId: string;
|
|
261
261
|
resourceId: string;
|
|
262
262
|
internalFile?: boolean;
|
|
263
|
-
onDuplicate?:
|
|
263
|
+
onDuplicate?: MigrationOnDuplicate;
|
|
264
264
|
}): Promise<Models.Migration>;
|
|
265
265
|
/**
|
|
266
266
|
* Import documents from a JSON file into your Appwrite database. This endpoint allows you to import documents from a JSON file uploaded to Appwrite Storage bucket.
|
|
@@ -270,12 +270,12 @@ export declare class Migrations {
|
|
|
270
270
|
* @param {string} fileId - File ID.
|
|
271
271
|
* @param {string} resourceId - Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.
|
|
272
272
|
* @param {boolean} internalFile - Is the file stored in an internal bucket?
|
|
273
|
-
* @param {
|
|
273
|
+
* @param {MigrationOnDuplicate} onDuplicate - Behavior when a row with an existing $id is encountered. "fail" (default): abort on first conflict. "skip": silently ignore. "overwrite": replace existing row.
|
|
274
274
|
* @throws {AppwriteException}
|
|
275
275
|
* @returns {Promise<Models.Migration>}
|
|
276
276
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
277
277
|
*/
|
|
278
|
-
createJSONImport(bucketId: string, fileId: string, resourceId: string, internalFile?: boolean, onDuplicate?:
|
|
278
|
+
createJSONImport(bucketId: string, fileId: string, resourceId: string, internalFile?: boolean, onDuplicate?: MigrationOnDuplicate): Promise<Models.Migration>;
|
|
279
279
|
/**
|
|
280
280
|
* Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project.
|
|
281
281
|
*
|