@appwrite.io/console 2.1.2 → 2.2.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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +2099 -520
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +2098 -521
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +2003 -444
- package/docs/examples/account/create-key.md +15 -0
- package/docs/examples/account/delete-key.md +13 -0
- package/docs/examples/account/get-key.md +13 -0
- package/docs/examples/account/list-keys.md +13 -0
- package/docs/examples/account/update-key.md +16 -0
- package/docs/examples/avatars/get-screenshot.md +5 -5
- package/docs/examples/backups/create-archive.md +2 -2
- package/docs/examples/backups/create-policy.md +2 -2
- package/docs/examples/backups/create-restoration.md +2 -2
- package/docs/examples/console/{get-regions.md → list-regions.md} +1 -3
- package/docs/examples/databases/create-index.md +2 -2
- package/docs/examples/databases/create-longtext-attribute.md +18 -0
- package/docs/examples/databases/create-mediumtext-attribute.md +18 -0
- package/docs/examples/databases/create-text-attribute.md +18 -0
- package/docs/examples/databases/create-varchar-attribute.md +19 -0
- package/docs/examples/databases/update-collection.md +1 -1
- package/docs/examples/databases/update-longtext-attribute.md +18 -0
- package/docs/examples/databases/update-mediumtext-attribute.md +18 -0
- package/docs/examples/databases/update-text-attribute.md +18 -0
- package/docs/examples/databases/update-varchar-attribute.md +19 -0
- package/docs/examples/databases/update.md +1 -1
- package/docs/examples/functions/create.md +2 -2
- package/docs/examples/functions/list-templates.md +3 -3
- package/docs/examples/functions/update.md +2 -2
- package/docs/examples/migrations/create-appwrite-migration.md +2 -2
- package/docs/examples/migrations/create-firebase-migration.md +2 -2
- package/docs/examples/migrations/create-n-host-migration.md +2 -2
- package/docs/examples/migrations/create-supabase-migration.md +2 -2
- package/docs/examples/migrations/get-appwrite-report.md +2 -2
- package/docs/examples/migrations/get-firebase-report.md +2 -2
- package/docs/examples/migrations/get-n-host-report.md +2 -2
- package/docs/examples/migrations/get-supabase-report.md +2 -2
- package/docs/examples/organizations/create-key.md +16 -0
- package/docs/examples/organizations/create.md +2 -2
- package/docs/examples/organizations/delete-key.md +14 -0
- package/docs/examples/organizations/estimation-create-organization.md +2 -2
- package/docs/examples/organizations/estimation-update-plan.md +2 -2
- package/docs/examples/organizations/get-key.md +14 -0
- package/docs/examples/organizations/list-keys.md +14 -0
- package/docs/examples/organizations/list-regions.md +13 -0
- package/docs/examples/organizations/update-key.md +17 -0
- package/docs/examples/organizations/update-plan.md +2 -2
- package/docs/examples/projects/create-jwt.md +2 -2
- package/docs/examples/projects/create-key.md +2 -2
- package/docs/examples/projects/update-key.md +2 -2
- package/docs/examples/sites/list-templates.md +3 -3
- package/docs/examples/tablesdb/create-index.md +2 -2
- package/docs/examples/tablesdb/create-longtext-column.md +18 -0
- package/docs/examples/tablesdb/create-mediumtext-column.md +18 -0
- package/docs/examples/tablesdb/create-text-column.md +18 -0
- package/docs/examples/tablesdb/create-varchar-column.md +19 -0
- package/docs/examples/tablesdb/update-longtext-column.md +18 -0
- package/docs/examples/tablesdb/update-mediumtext-column.md +18 -0
- package/docs/examples/tablesdb/update-table.md +1 -1
- package/docs/examples/tablesdb/update-text-column.md +18 -0
- package/docs/examples/tablesdb/update-varchar-column.md +19 -0
- package/docs/examples/tablesdb/update.md +1 -1
- package/docs/examples/teams/create-membership.md +2 -2
- package/docs/examples/teams/update-membership.md +2 -2
- package/package.json +3 -2
- package/src/channel.ts +138 -0
- package/src/client.ts +54 -9
- package/src/enums/browser-permission.ts +22 -0
- package/src/enums/deployment-status.ts +1 -0
- package/src/enums/frameworks.ts +17 -0
- package/src/enums/order-by.ts +4 -0
- package/src/enums/resources.ts +13 -0
- package/src/enums/roles.ts +7 -0
- package/src/enums/runtimes.ts +66 -0
- package/src/enums/scopes.ts +65 -0
- package/src/enums/services.ts +5 -0
- package/src/enums/use-cases.ts +11 -0
- package/src/index.ts +10 -1
- package/src/models.ts +349 -1
- package/src/query.ts +42 -0
- package/src/services/account.ts +364 -56
- package/src/services/assistant.ts +1 -1
- package/src/services/avatars.ts +17 -16
- package/src/services/backups.ts +37 -36
- package/src/services/console.ts +11 -42
- package/src/services/databases.ts +1060 -280
- package/src/services/domains.ts +44 -44
- package/src/services/functions.ts +60 -57
- package/src/services/graphql.ts +2 -2
- package/src/services/health.ts +22 -20
- package/src/services/messaging.ts +56 -56
- package/src/services/migrations.ts +79 -78
- package/src/services/organizations.ts +466 -70
- package/src/services/project.ts +5 -5
- package/src/services/projects.ts +86 -85
- package/src/services/proxy.ts +8 -8
- package/src/services/realtime.ts +35 -12
- package/src/services/sites.ts +42 -40
- package/src/services/storage.ts +16 -16
- package/src/services/tables-db.ts +1050 -268
- package/src/services/teams.ts +31 -30
- package/src/services/tokens.ts +5 -5
- package/src/services/users.ts +49 -49
- package/src/services/vcs.ts +10 -10
- package/types/channel.d.ts +72 -0
- package/types/client.d.ts +11 -3
- package/types/enums/browser-permission.d.ts +22 -0
- package/types/enums/deployment-status.d.ts +1 -0
- package/types/enums/frameworks.d.ts +17 -0
- package/types/enums/order-by.d.ts +4 -0
- package/types/enums/resources.d.ts +13 -0
- package/types/enums/roles.d.ts +7 -0
- package/types/enums/runtimes.d.ts +66 -0
- package/types/enums/scopes.d.ts +65 -0
- package/types/enums/services.d.ts +5 -0
- package/types/enums/use-cases.d.ts +11 -0
- package/types/index.d.ts +10 -1
- package/types/models.d.ts +341 -1
- package/types/query.d.ts +30 -0
- package/types/services/account.d.ts +111 -0
- package/types/services/avatars.d.ts +5 -4
- package/types/services/backups.d.ts +13 -12
- package/types/services/console.d.ts +1 -13
- package/types/services/databases.d.ts +303 -8
- package/types/services/functions.d.ts +18 -15
- package/types/services/health.d.ts +2 -0
- package/types/services/migrations.d.ts +33 -32
- package/types/services/organizations.d.ts +161 -17
- package/types/services/projects.d.ts +13 -12
- package/types/services/realtime.d.ts +17 -8
- package/types/services/sites.d.ts +9 -7
- package/types/services/tables-db.d.ts +305 -8
- package/types/services/teams.d.ts +9 -8
- package/src/enums/billing-plan.ts +0 -17
- package/types/enums/billing-plan.d.ts +0 -17
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Client } from '../client';
|
|
2
2
|
import type { Models } from '../models';
|
|
3
|
+
import { Resources } from '../enums/resources';
|
|
3
4
|
export declare class Migrations {
|
|
4
5
|
client: Client;
|
|
5
6
|
constructor(client: Client);
|
|
@@ -31,7 +32,7 @@ export declare class Migrations {
|
|
|
31
32
|
/**
|
|
32
33
|
* 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.
|
|
33
34
|
*
|
|
34
|
-
* @param {
|
|
35
|
+
* @param {Resources[]} params.resources - List of resources to migrate
|
|
35
36
|
* @param {string} params.endpoint - Source Appwrite endpoint
|
|
36
37
|
* @param {string} params.projectId - Source Project ID
|
|
37
38
|
* @param {string} params.apiKey - Source API Key
|
|
@@ -39,7 +40,7 @@ export declare class Migrations {
|
|
|
39
40
|
* @returns {Promise<Models.Migration>}
|
|
40
41
|
*/
|
|
41
42
|
createAppwriteMigration(params: {
|
|
42
|
-
resources:
|
|
43
|
+
resources: Resources[];
|
|
43
44
|
endpoint: string;
|
|
44
45
|
projectId: string;
|
|
45
46
|
apiKey: string;
|
|
@@ -47,7 +48,7 @@ export declare class Migrations {
|
|
|
47
48
|
/**
|
|
48
49
|
* 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.
|
|
49
50
|
*
|
|
50
|
-
* @param {
|
|
51
|
+
* @param {Resources[]} resources - List of resources to migrate
|
|
51
52
|
* @param {string} endpoint - Source Appwrite endpoint
|
|
52
53
|
* @param {string} projectId - Source Project ID
|
|
53
54
|
* @param {string} apiKey - Source API Key
|
|
@@ -55,11 +56,11 @@ export declare class Migrations {
|
|
|
55
56
|
* @returns {Promise<Models.Migration>}
|
|
56
57
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
57
58
|
*/
|
|
58
|
-
createAppwriteMigration(resources:
|
|
59
|
+
createAppwriteMigration(resources: Resources[], endpoint: string, projectId: string, apiKey: string): Promise<Models.Migration>;
|
|
59
60
|
/**
|
|
60
61
|
* 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.
|
|
61
62
|
*
|
|
62
|
-
* @param {
|
|
63
|
+
* @param {Resources[]} params.resources - List of resources to migrate
|
|
63
64
|
* @param {string} params.endpoint - Source's Appwrite Endpoint
|
|
64
65
|
* @param {string} params.projectID - Source's Project ID
|
|
65
66
|
* @param {string} params.key - Source's API Key
|
|
@@ -67,7 +68,7 @@ export declare class Migrations {
|
|
|
67
68
|
* @returns {Promise<Models.MigrationReport>}
|
|
68
69
|
*/
|
|
69
70
|
getAppwriteReport(params: {
|
|
70
|
-
resources:
|
|
71
|
+
resources: Resources[];
|
|
71
72
|
endpoint: string;
|
|
72
73
|
projectID: string;
|
|
73
74
|
key: string;
|
|
@@ -75,7 +76,7 @@ export declare class Migrations {
|
|
|
75
76
|
/**
|
|
76
77
|
* 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.
|
|
77
78
|
*
|
|
78
|
-
* @param {
|
|
79
|
+
* @param {Resources[]} resources - List of resources to migrate
|
|
79
80
|
* @param {string} endpoint - Source's Appwrite Endpoint
|
|
80
81
|
* @param {string} projectID - Source's Project ID
|
|
81
82
|
* @param {string} key - Source's API Key
|
|
@@ -83,7 +84,7 @@ export declare class Migrations {
|
|
|
83
84
|
* @returns {Promise<Models.MigrationReport>}
|
|
84
85
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
85
86
|
*/
|
|
86
|
-
getAppwriteReport(resources:
|
|
87
|
+
getAppwriteReport(resources: Resources[], endpoint: string, projectID: string, key: string): Promise<Models.MigrationReport>;
|
|
87
88
|
/**
|
|
88
89
|
* Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.
|
|
89
90
|
*
|
|
@@ -158,51 +159,51 @@ export declare class Migrations {
|
|
|
158
159
|
/**
|
|
159
160
|
* 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.
|
|
160
161
|
*
|
|
161
|
-
* @param {
|
|
162
|
+
* @param {Resources[]} params.resources - List of resources to migrate
|
|
162
163
|
* @param {string} params.serviceAccount - JSON of the Firebase service account credentials
|
|
163
164
|
* @throws {AppwriteException}
|
|
164
165
|
* @returns {Promise<Models.Migration>}
|
|
165
166
|
*/
|
|
166
167
|
createFirebaseMigration(params: {
|
|
167
|
-
resources:
|
|
168
|
+
resources: Resources[];
|
|
168
169
|
serviceAccount: string;
|
|
169
170
|
}): Promise<Models.Migration>;
|
|
170
171
|
/**
|
|
171
172
|
* 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.
|
|
172
173
|
*
|
|
173
|
-
* @param {
|
|
174
|
+
* @param {Resources[]} resources - List of resources to migrate
|
|
174
175
|
* @param {string} serviceAccount - JSON of the Firebase service account credentials
|
|
175
176
|
* @throws {AppwriteException}
|
|
176
177
|
* @returns {Promise<Models.Migration>}
|
|
177
178
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
178
179
|
*/
|
|
179
|
-
createFirebaseMigration(resources:
|
|
180
|
+
createFirebaseMigration(resources: Resources[], serviceAccount: string): Promise<Models.Migration>;
|
|
180
181
|
/**
|
|
181
182
|
* Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
182
183
|
*
|
|
183
|
-
* @param {
|
|
184
|
+
* @param {Resources[]} params.resources - List of resources to migrate
|
|
184
185
|
* @param {string} params.serviceAccount - JSON of the Firebase service account credentials
|
|
185
186
|
* @throws {AppwriteException}
|
|
186
187
|
* @returns {Promise<Models.MigrationReport>}
|
|
187
188
|
*/
|
|
188
189
|
getFirebaseReport(params: {
|
|
189
|
-
resources:
|
|
190
|
+
resources: Resources[];
|
|
190
191
|
serviceAccount: string;
|
|
191
192
|
}): Promise<Models.MigrationReport>;
|
|
192
193
|
/**
|
|
193
194
|
* Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
194
195
|
*
|
|
195
|
-
* @param {
|
|
196
|
+
* @param {Resources[]} resources - List of resources to migrate
|
|
196
197
|
* @param {string} serviceAccount - JSON of the Firebase service account credentials
|
|
197
198
|
* @throws {AppwriteException}
|
|
198
199
|
* @returns {Promise<Models.MigrationReport>}
|
|
199
200
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
200
201
|
*/
|
|
201
|
-
getFirebaseReport(resources:
|
|
202
|
+
getFirebaseReport(resources: Resources[], serviceAccount: string): Promise<Models.MigrationReport>;
|
|
202
203
|
/**
|
|
203
204
|
* 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.
|
|
204
205
|
*
|
|
205
|
-
* @param {
|
|
206
|
+
* @param {Resources[]} params.resources - List of resources to migrate
|
|
206
207
|
* @param {string} params.subdomain - Source's Subdomain
|
|
207
208
|
* @param {string} params.region - Source's Region
|
|
208
209
|
* @param {string} params.adminSecret - Source's Admin Secret
|
|
@@ -214,7 +215,7 @@ export declare class Migrations {
|
|
|
214
215
|
* @returns {Promise<Models.Migration>}
|
|
215
216
|
*/
|
|
216
217
|
createNHostMigration(params: {
|
|
217
|
-
resources:
|
|
218
|
+
resources: Resources[];
|
|
218
219
|
subdomain: string;
|
|
219
220
|
region: string;
|
|
220
221
|
adminSecret: string;
|
|
@@ -226,7 +227,7 @@ export declare class Migrations {
|
|
|
226
227
|
/**
|
|
227
228
|
* 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.
|
|
228
229
|
*
|
|
229
|
-
* @param {
|
|
230
|
+
* @param {Resources[]} resources - List of resources to migrate
|
|
230
231
|
* @param {string} subdomain - Source's Subdomain
|
|
231
232
|
* @param {string} region - Source's Region
|
|
232
233
|
* @param {string} adminSecret - Source's Admin Secret
|
|
@@ -238,11 +239,11 @@ export declare class Migrations {
|
|
|
238
239
|
* @returns {Promise<Models.Migration>}
|
|
239
240
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
240
241
|
*/
|
|
241
|
-
createNHostMigration(resources:
|
|
242
|
+
createNHostMigration(resources: Resources[], subdomain: string, region: string, adminSecret: string, database: string, username: string, password: string, port?: number): Promise<Models.Migration>;
|
|
242
243
|
/**
|
|
243
244
|
* Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
244
245
|
*
|
|
245
|
-
* @param {
|
|
246
|
+
* @param {Resources[]} params.resources - List of resources to migrate.
|
|
246
247
|
* @param {string} params.subdomain - Source's Subdomain.
|
|
247
248
|
* @param {string} params.region - Source's Region.
|
|
248
249
|
* @param {string} params.adminSecret - Source's Admin Secret.
|
|
@@ -254,7 +255,7 @@ export declare class Migrations {
|
|
|
254
255
|
* @returns {Promise<Models.MigrationReport>}
|
|
255
256
|
*/
|
|
256
257
|
getNHostReport(params: {
|
|
257
|
-
resources:
|
|
258
|
+
resources: Resources[];
|
|
258
259
|
subdomain: string;
|
|
259
260
|
region: string;
|
|
260
261
|
adminSecret: string;
|
|
@@ -266,7 +267,7 @@ export declare class Migrations {
|
|
|
266
267
|
/**
|
|
267
268
|
* Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
268
269
|
*
|
|
269
|
-
* @param {
|
|
270
|
+
* @param {Resources[]} resources - List of resources to migrate.
|
|
270
271
|
* @param {string} subdomain - Source's Subdomain.
|
|
271
272
|
* @param {string} region - Source's Region.
|
|
272
273
|
* @param {string} adminSecret - Source's Admin Secret.
|
|
@@ -278,11 +279,11 @@ export declare class Migrations {
|
|
|
278
279
|
* @returns {Promise<Models.MigrationReport>}
|
|
279
280
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
280
281
|
*/
|
|
281
|
-
getNHostReport(resources:
|
|
282
|
+
getNHostReport(resources: Resources[], subdomain: string, region: string, adminSecret: string, database: string, username: string, password: string, port?: number): Promise<Models.MigrationReport>;
|
|
282
283
|
/**
|
|
283
284
|
* Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project.
|
|
284
285
|
*
|
|
285
|
-
* @param {
|
|
286
|
+
* @param {Resources[]} params.resources - List of resources to migrate
|
|
286
287
|
* @param {string} params.endpoint - Source's Supabase Endpoint
|
|
287
288
|
* @param {string} params.apiKey - Source's API Key
|
|
288
289
|
* @param {string} params.databaseHost - Source's Database Host
|
|
@@ -293,7 +294,7 @@ export declare class Migrations {
|
|
|
293
294
|
* @returns {Promise<Models.Migration>}
|
|
294
295
|
*/
|
|
295
296
|
createSupabaseMigration(params: {
|
|
296
|
-
resources:
|
|
297
|
+
resources: Resources[];
|
|
297
298
|
endpoint: string;
|
|
298
299
|
apiKey: string;
|
|
299
300
|
databaseHost: string;
|
|
@@ -304,7 +305,7 @@ export declare class Migrations {
|
|
|
304
305
|
/**
|
|
305
306
|
* Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project.
|
|
306
307
|
*
|
|
307
|
-
* @param {
|
|
308
|
+
* @param {Resources[]} resources - List of resources to migrate
|
|
308
309
|
* @param {string} endpoint - Source's Supabase Endpoint
|
|
309
310
|
* @param {string} apiKey - Source's API Key
|
|
310
311
|
* @param {string} databaseHost - Source's Database Host
|
|
@@ -315,11 +316,11 @@ export declare class Migrations {
|
|
|
315
316
|
* @returns {Promise<Models.Migration>}
|
|
316
317
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
317
318
|
*/
|
|
318
|
-
createSupabaseMigration(resources:
|
|
319
|
+
createSupabaseMigration(resources: Resources[], endpoint: string, apiKey: string, databaseHost: string, username: string, password: string, port?: number): Promise<Models.Migration>;
|
|
319
320
|
/**
|
|
320
321
|
* Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
321
322
|
*
|
|
322
|
-
* @param {
|
|
323
|
+
* @param {Resources[]} params.resources - List of resources to migrate
|
|
323
324
|
* @param {string} params.endpoint - Source's Supabase Endpoint.
|
|
324
325
|
* @param {string} params.apiKey - Source's API Key.
|
|
325
326
|
* @param {string} params.databaseHost - Source's Database Host.
|
|
@@ -330,7 +331,7 @@ export declare class Migrations {
|
|
|
330
331
|
* @returns {Promise<Models.MigrationReport>}
|
|
331
332
|
*/
|
|
332
333
|
getSupabaseReport(params: {
|
|
333
|
-
resources:
|
|
334
|
+
resources: Resources[];
|
|
334
335
|
endpoint: string;
|
|
335
336
|
apiKey: string;
|
|
336
337
|
databaseHost: string;
|
|
@@ -341,7 +342,7 @@ export declare class Migrations {
|
|
|
341
342
|
/**
|
|
342
343
|
* Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
343
344
|
*
|
|
344
|
-
* @param {
|
|
345
|
+
* @param {Resources[]} resources - List of resources to migrate
|
|
345
346
|
* @param {string} endpoint - Source's Supabase Endpoint.
|
|
346
347
|
* @param {string} apiKey - Source's API Key.
|
|
347
348
|
* @param {string} databaseHost - Source's Database Host.
|
|
@@ -352,7 +353,7 @@ export declare class Migrations {
|
|
|
352
353
|
* @returns {Promise<Models.MigrationReport>}
|
|
353
354
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
354
355
|
*/
|
|
355
|
-
getSupabaseReport(resources:
|
|
356
|
+
getSupabaseReport(resources: Resources[], endpoint: string, apiKey: string, databaseHost: string, username: string, password: string, port?: number): Promise<Models.MigrationReport>;
|
|
356
357
|
/**
|
|
357
358
|
* Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process.
|
|
358
359
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Client } from '../client';
|
|
2
2
|
import type { Models } from '../models';
|
|
3
|
-
import { BillingPlan } from '../enums/billing-plan';
|
|
4
3
|
import { Platform } from '../enums/platform';
|
|
4
|
+
import { Scopes } from '../enums/scopes';
|
|
5
5
|
export declare class Organizations {
|
|
6
6
|
client: Client;
|
|
7
7
|
constructor(client: Client);
|
|
@@ -33,7 +33,7 @@ export declare class Organizations {
|
|
|
33
33
|
*
|
|
34
34
|
* @param {string} params.organizationId - Organization 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.
|
|
35
35
|
* @param {string} params.name - Organization name. Max length: 128 chars.
|
|
36
|
-
* @param {
|
|
36
|
+
* @param {string} params.billingPlan - Organization billing plan chosen
|
|
37
37
|
* @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
|
|
38
38
|
* @param {string} params.billingAddressId - Unique ID of billing address
|
|
39
39
|
* @param {string[]} params.invites - Additional member invites
|
|
@@ -47,7 +47,7 @@ export declare class Organizations {
|
|
|
47
47
|
create<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
|
|
48
48
|
organizationId: string;
|
|
49
49
|
name: string;
|
|
50
|
-
billingPlan:
|
|
50
|
+
billingPlan: string;
|
|
51
51
|
paymentMethodId?: string;
|
|
52
52
|
billingAddressId?: string;
|
|
53
53
|
invites?: string[];
|
|
@@ -62,7 +62,7 @@ export declare class Organizations {
|
|
|
62
62
|
*
|
|
63
63
|
* @param {string} organizationId - Organization 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.
|
|
64
64
|
* @param {string} name - Organization name. Max length: 128 chars.
|
|
65
|
-
* @param {
|
|
65
|
+
* @param {string} billingPlan - Organization billing plan chosen
|
|
66
66
|
* @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
|
|
67
67
|
* @param {string} billingAddressId - Unique ID of billing address
|
|
68
68
|
* @param {string[]} invites - Additional member invites
|
|
@@ -74,11 +74,11 @@ export declare class Organizations {
|
|
|
74
74
|
* @returns {Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>}
|
|
75
75
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
76
76
|
*/
|
|
77
|
-
create<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, name: string, billingPlan:
|
|
77
|
+
create<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>;
|
|
78
78
|
/**
|
|
79
79
|
* Get estimation for creating an organization.
|
|
80
80
|
*
|
|
81
|
-
* @param {
|
|
81
|
+
* @param {string} params.billingPlan - Organization billing plan chosen
|
|
82
82
|
* @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
|
|
83
83
|
* @param {string[]} params.invites - Additional member invites
|
|
84
84
|
* @param {string} params.couponId - Coupon id
|
|
@@ -87,7 +87,7 @@ export declare class Organizations {
|
|
|
87
87
|
* @returns {Promise<Models.Estimation>}
|
|
88
88
|
*/
|
|
89
89
|
estimationCreateOrganization(params: {
|
|
90
|
-
billingPlan:
|
|
90
|
+
billingPlan: string;
|
|
91
91
|
paymentMethodId?: string;
|
|
92
92
|
invites?: string[];
|
|
93
93
|
couponId?: string;
|
|
@@ -96,7 +96,7 @@ export declare class Organizations {
|
|
|
96
96
|
/**
|
|
97
97
|
* Get estimation for creating an organization.
|
|
98
98
|
*
|
|
99
|
-
* @param {
|
|
99
|
+
* @param {string} billingPlan - Organization billing plan chosen
|
|
100
100
|
* @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
|
|
101
101
|
* @param {string[]} invites - Additional member invites
|
|
102
102
|
* @param {string} couponId - Coupon id
|
|
@@ -105,7 +105,7 @@ export declare class Organizations {
|
|
|
105
105
|
* @returns {Promise<Models.Estimation>}
|
|
106
106
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
107
107
|
*/
|
|
108
|
-
estimationCreateOrganization(billingPlan:
|
|
108
|
+
estimationCreateOrganization(billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform): Promise<Models.Estimation>;
|
|
109
109
|
/**
|
|
110
110
|
* Delete an organization.
|
|
111
111
|
*
|
|
@@ -395,7 +395,7 @@ export declare class Organizations {
|
|
|
395
395
|
* Get estimation for updating the organization plan.
|
|
396
396
|
*
|
|
397
397
|
* @param {string} params.organizationId - Organization ID
|
|
398
|
-
* @param {
|
|
398
|
+
* @param {string} params.billingPlan - Organization billing plan chosen
|
|
399
399
|
* @param {string[]} params.invites - Additional member invites
|
|
400
400
|
* @param {string} params.couponId - Coupon id
|
|
401
401
|
* @throws {AppwriteException}
|
|
@@ -403,7 +403,7 @@ export declare class Organizations {
|
|
|
403
403
|
*/
|
|
404
404
|
estimationUpdatePlan(params: {
|
|
405
405
|
organizationId: string;
|
|
406
|
-
billingPlan:
|
|
406
|
+
billingPlan: string;
|
|
407
407
|
invites?: string[];
|
|
408
408
|
couponId?: string;
|
|
409
409
|
}): Promise<Models.EstimationUpdatePlan>;
|
|
@@ -411,14 +411,14 @@ export declare class Organizations {
|
|
|
411
411
|
* Get estimation for updating the organization plan.
|
|
412
412
|
*
|
|
413
413
|
* @param {string} organizationId - Organization ID
|
|
414
|
-
* @param {
|
|
414
|
+
* @param {string} billingPlan - Organization billing plan chosen
|
|
415
415
|
* @param {string[]} invites - Additional member invites
|
|
416
416
|
* @param {string} couponId - Coupon id
|
|
417
417
|
* @throws {AppwriteException}
|
|
418
418
|
* @returns {Promise<Models.EstimationUpdatePlan>}
|
|
419
419
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
420
420
|
*/
|
|
421
|
-
estimationUpdatePlan(organizationId: string, billingPlan:
|
|
421
|
+
estimationUpdatePlan(organizationId: string, billingPlan: string, invites?: string[], couponId?: string): Promise<Models.EstimationUpdatePlan>;
|
|
422
422
|
/**
|
|
423
423
|
* Submit feedback about downgrading from a paid plan to a lower tier. This helps the team understand user experience and improve the platform.
|
|
424
424
|
*
|
|
@@ -587,6 +587,131 @@ export declare class Organizations {
|
|
|
587
587
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
588
588
|
*/
|
|
589
589
|
getInvoiceView(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod>;
|
|
590
|
+
/**
|
|
591
|
+
* Get a list of all API keys from the current organization.
|
|
592
|
+
*
|
|
593
|
+
* @param {string} params.organizationId - Organization Unique ID
|
|
594
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
595
|
+
* @throws {AppwriteException}
|
|
596
|
+
* @returns {Promise<Models.KeyList>}
|
|
597
|
+
*/
|
|
598
|
+
listKeys(params: {
|
|
599
|
+
organizationId: string;
|
|
600
|
+
total?: boolean;
|
|
601
|
+
}): Promise<Models.KeyList>;
|
|
602
|
+
/**
|
|
603
|
+
* Get a list of all API keys from the current organization.
|
|
604
|
+
*
|
|
605
|
+
* @param {string} organizationId - Organization Unique ID
|
|
606
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
607
|
+
* @throws {AppwriteException}
|
|
608
|
+
* @returns {Promise<Models.KeyList>}
|
|
609
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
610
|
+
*/
|
|
611
|
+
listKeys(organizationId: string, total?: boolean): Promise<Models.KeyList>;
|
|
612
|
+
/**
|
|
613
|
+
* Create a new organization API key.
|
|
614
|
+
*
|
|
615
|
+
* @param {string} params.organizationId - Organization Unique ID
|
|
616
|
+
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
617
|
+
* @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
618
|
+
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
619
|
+
* @throws {AppwriteException}
|
|
620
|
+
* @returns {Promise<Models.Key>}
|
|
621
|
+
*/
|
|
622
|
+
createKey(params: {
|
|
623
|
+
organizationId: string;
|
|
624
|
+
name: string;
|
|
625
|
+
scopes: Scopes[];
|
|
626
|
+
expire?: string;
|
|
627
|
+
}): Promise<Models.Key>;
|
|
628
|
+
/**
|
|
629
|
+
* Create a new organization API key.
|
|
630
|
+
*
|
|
631
|
+
* @param {string} organizationId - Organization Unique ID
|
|
632
|
+
* @param {string} name - Key name. Max length: 128 chars.
|
|
633
|
+
* @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
634
|
+
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
635
|
+
* @throws {AppwriteException}
|
|
636
|
+
* @returns {Promise<Models.Key>}
|
|
637
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
638
|
+
*/
|
|
639
|
+
createKey(organizationId: string, name: string, scopes: Scopes[], expire?: string): Promise<Models.Key>;
|
|
640
|
+
/**
|
|
641
|
+
* Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including it's scopes.
|
|
642
|
+
*
|
|
643
|
+
* @param {string} params.organizationId - Organization Unique ID
|
|
644
|
+
* @param {string} params.keyId - Key unique ID.
|
|
645
|
+
* @throws {AppwriteException}
|
|
646
|
+
* @returns {Promise<Models.Key>}
|
|
647
|
+
*/
|
|
648
|
+
getKey(params: {
|
|
649
|
+
organizationId: string;
|
|
650
|
+
keyId: string;
|
|
651
|
+
}): Promise<Models.Key>;
|
|
652
|
+
/**
|
|
653
|
+
* Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including it's scopes.
|
|
654
|
+
*
|
|
655
|
+
* @param {string} organizationId - Organization Unique ID
|
|
656
|
+
* @param {string} keyId - Key unique ID.
|
|
657
|
+
* @throws {AppwriteException}
|
|
658
|
+
* @returns {Promise<Models.Key>}
|
|
659
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
660
|
+
*/
|
|
661
|
+
getKey(organizationId: string, keyId: string): Promise<Models.Key>;
|
|
662
|
+
/**
|
|
663
|
+
* Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
|
|
664
|
+
*
|
|
665
|
+
* @param {string} params.organizationId - Organization Unique ID
|
|
666
|
+
* @param {string} params.keyId - Key unique ID.
|
|
667
|
+
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
668
|
+
* @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
669
|
+
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
670
|
+
* @throws {AppwriteException}
|
|
671
|
+
* @returns {Promise<Models.Key>}
|
|
672
|
+
*/
|
|
673
|
+
updateKey(params: {
|
|
674
|
+
organizationId: string;
|
|
675
|
+
keyId: string;
|
|
676
|
+
name: string;
|
|
677
|
+
scopes: Scopes[];
|
|
678
|
+
expire?: string;
|
|
679
|
+
}): Promise<Models.Key>;
|
|
680
|
+
/**
|
|
681
|
+
* Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
|
|
682
|
+
*
|
|
683
|
+
* @param {string} organizationId - Organization Unique ID
|
|
684
|
+
* @param {string} keyId - Key unique ID.
|
|
685
|
+
* @param {string} name - Key name. Max length: 128 chars.
|
|
686
|
+
* @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
687
|
+
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
688
|
+
* @throws {AppwriteException}
|
|
689
|
+
* @returns {Promise<Models.Key>}
|
|
690
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
691
|
+
*/
|
|
692
|
+
updateKey(organizationId: string, keyId: string, name: string, scopes: Scopes[], expire?: string): Promise<Models.Key>;
|
|
693
|
+
/**
|
|
694
|
+
* Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
|
|
695
|
+
*
|
|
696
|
+
* @param {string} params.organizationId - Organization Unique ID
|
|
697
|
+
* @param {string} params.keyId - Key unique ID.
|
|
698
|
+
* @throws {AppwriteException}
|
|
699
|
+
* @returns {Promise<{}>}
|
|
700
|
+
*/
|
|
701
|
+
deleteKey(params: {
|
|
702
|
+
organizationId: string;
|
|
703
|
+
keyId: string;
|
|
704
|
+
}): Promise<{}>;
|
|
705
|
+
/**
|
|
706
|
+
* Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
|
|
707
|
+
*
|
|
708
|
+
* @param {string} organizationId - Organization Unique ID
|
|
709
|
+
* @param {string} keyId - Key unique ID.
|
|
710
|
+
* @throws {AppwriteException}
|
|
711
|
+
* @returns {Promise<{}>}
|
|
712
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
713
|
+
*/
|
|
714
|
+
deleteKey(organizationId: string, keyId: string): Promise<{}>;
|
|
590
715
|
/**
|
|
591
716
|
* Set a organization's default payment method.
|
|
592
717
|
*
|
|
@@ -716,7 +841,7 @@ export declare class Organizations {
|
|
|
716
841
|
* Update the billing plan for an organization.
|
|
717
842
|
*
|
|
718
843
|
* @param {string} params.organizationId - Organization Unique ID
|
|
719
|
-
* @param {
|
|
844
|
+
* @param {string} params.billingPlan - Organization billing plan chosen
|
|
720
845
|
* @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
|
|
721
846
|
* @param {string} params.billingAddressId - Unique ID of billing address
|
|
722
847
|
* @param {string[]} params.invites - Additional member invites
|
|
@@ -728,7 +853,7 @@ export declare class Organizations {
|
|
|
728
853
|
*/
|
|
729
854
|
updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
|
|
730
855
|
organizationId: string;
|
|
731
|
-
billingPlan:
|
|
856
|
+
billingPlan: string;
|
|
732
857
|
paymentMethodId?: string;
|
|
733
858
|
billingAddressId?: string;
|
|
734
859
|
invites?: string[];
|
|
@@ -740,7 +865,7 @@ export declare class Organizations {
|
|
|
740
865
|
* Update the billing plan for an organization.
|
|
741
866
|
*
|
|
742
867
|
* @param {string} organizationId - Organization Unique ID
|
|
743
|
-
* @param {
|
|
868
|
+
* @param {string} billingPlan - Organization billing plan chosen
|
|
744
869
|
* @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
|
|
745
870
|
* @param {string} billingAddressId - Unique ID of billing address
|
|
746
871
|
* @param {string[]} invites - Additional member invites
|
|
@@ -751,7 +876,7 @@ export declare class Organizations {
|
|
|
751
876
|
* @returns {Promise<Models.Organization<Preferences>>}
|
|
752
877
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
753
878
|
*/
|
|
754
|
-
updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingPlan:
|
|
879
|
+
updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number): Promise<Models.Organization<Preferences>>;
|
|
755
880
|
/**
|
|
756
881
|
* Cancel the downgrade initiated for an organization.
|
|
757
882
|
*
|
|
@@ -793,6 +918,25 @@ export declare class Organizations {
|
|
|
793
918
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
794
919
|
*/
|
|
795
920
|
updateProjects<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, projects?: string[]): Promise<Models.Organization<Preferences>>;
|
|
921
|
+
/**
|
|
922
|
+
* Get all available regions for an organization.
|
|
923
|
+
*
|
|
924
|
+
* @param {string} params.organizationId - Team ID.
|
|
925
|
+
* @throws {AppwriteException}
|
|
926
|
+
* @returns {Promise<Models.ConsoleRegionList>}
|
|
927
|
+
*/
|
|
928
|
+
listRegions(params: {
|
|
929
|
+
organizationId: string;
|
|
930
|
+
}): Promise<Models.ConsoleRegionList>;
|
|
931
|
+
/**
|
|
932
|
+
* Get all available regions for an organization.
|
|
933
|
+
*
|
|
934
|
+
* @param {string} organizationId - Team ID.
|
|
935
|
+
* @throws {AppwriteException}
|
|
936
|
+
* @returns {Promise<Models.ConsoleRegionList>}
|
|
937
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
938
|
+
*/
|
|
939
|
+
listRegions(organizationId: string): Promise<Models.ConsoleRegionList>;
|
|
796
940
|
/**
|
|
797
941
|
* Get Scopes
|
|
798
942
|
*
|
|
@@ -3,6 +3,7 @@ import type { Models } from '../models';
|
|
|
3
3
|
import { Region } from '../enums/region';
|
|
4
4
|
import { Api } from '../enums/api';
|
|
5
5
|
import { AuthMethod } from '../enums/auth-method';
|
|
6
|
+
import { Scopes } from '../enums/scopes';
|
|
6
7
|
import { OAuthProvider } from '../enums/o-auth-provider';
|
|
7
8
|
import { PlatformType } from '../enums/platform-type';
|
|
8
9
|
import { ApiService } from '../enums/api-service';
|
|
@@ -652,27 +653,27 @@ export declare class Projects {
|
|
|
652
653
|
* Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time.
|
|
653
654
|
*
|
|
654
655
|
* @param {string} params.projectId - Project unique ID.
|
|
655
|
-
* @param {
|
|
656
|
+
* @param {Scopes[]} params.scopes - List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
|
|
656
657
|
* @param {number} params.duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
|
|
657
658
|
* @throws {AppwriteException}
|
|
658
659
|
* @returns {Promise<Models.Jwt>}
|
|
659
660
|
*/
|
|
660
661
|
createJWT(params: {
|
|
661
662
|
projectId: string;
|
|
662
|
-
scopes:
|
|
663
|
+
scopes: Scopes[];
|
|
663
664
|
duration?: number;
|
|
664
665
|
}): Promise<Models.Jwt>;
|
|
665
666
|
/**
|
|
666
667
|
* Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time.
|
|
667
668
|
*
|
|
668
669
|
* @param {string} projectId - Project unique ID.
|
|
669
|
-
* @param {
|
|
670
|
+
* @param {Scopes[]} scopes - List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
|
|
670
671
|
* @param {number} duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
|
|
671
672
|
* @throws {AppwriteException}
|
|
672
673
|
* @returns {Promise<Models.Jwt>}
|
|
673
674
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
674
675
|
*/
|
|
675
|
-
createJWT(projectId: string, scopes:
|
|
676
|
+
createJWT(projectId: string, scopes: Scopes[], duration?: number): Promise<Models.Jwt>;
|
|
676
677
|
/**
|
|
677
678
|
* Get a list of all API keys from the current project.
|
|
678
679
|
*
|
|
@@ -700,7 +701,7 @@ export declare class Projects {
|
|
|
700
701
|
*
|
|
701
702
|
* @param {string} params.projectId - Project unique ID.
|
|
702
703
|
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
703
|
-
* @param {
|
|
704
|
+
* @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
704
705
|
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
705
706
|
* @throws {AppwriteException}
|
|
706
707
|
* @returns {Promise<Models.Key>}
|
|
@@ -708,7 +709,7 @@ export declare class Projects {
|
|
|
708
709
|
createKey(params: {
|
|
709
710
|
projectId: string;
|
|
710
711
|
name: string;
|
|
711
|
-
scopes?:
|
|
712
|
+
scopes?: Scopes[];
|
|
712
713
|
expire?: string;
|
|
713
714
|
}): Promise<Models.Key>;
|
|
714
715
|
/**
|
|
@@ -716,13 +717,13 @@ export declare class Projects {
|
|
|
716
717
|
*
|
|
717
718
|
* @param {string} projectId - Project unique ID.
|
|
718
719
|
* @param {string} name - Key name. Max length: 128 chars.
|
|
719
|
-
* @param {
|
|
720
|
+
* @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
720
721
|
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
721
722
|
* @throws {AppwriteException}
|
|
722
723
|
* @returns {Promise<Models.Key>}
|
|
723
724
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
724
725
|
*/
|
|
725
|
-
createKey(projectId: string, name: string, scopes?:
|
|
726
|
+
createKey(projectId: string, name: string, scopes?: Scopes[], expire?: string): Promise<Models.Key>;
|
|
726
727
|
/**
|
|
727
728
|
* Get a key by its unique ID. This endpoint returns details about a specific API key in your project including it's scopes.
|
|
728
729
|
*
|
|
@@ -751,7 +752,7 @@ export declare class Projects {
|
|
|
751
752
|
* @param {string} params.projectId - Project unique ID.
|
|
752
753
|
* @param {string} params.keyId - Key unique ID.
|
|
753
754
|
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
754
|
-
* @param {
|
|
755
|
+
* @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 events are allowed.
|
|
755
756
|
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
756
757
|
* @throws {AppwriteException}
|
|
757
758
|
* @returns {Promise<Models.Key>}
|
|
@@ -760,7 +761,7 @@ export declare class Projects {
|
|
|
760
761
|
projectId: string;
|
|
761
762
|
keyId: string;
|
|
762
763
|
name: string;
|
|
763
|
-
scopes?:
|
|
764
|
+
scopes?: Scopes[];
|
|
764
765
|
expire?: string;
|
|
765
766
|
}): Promise<Models.Key>;
|
|
766
767
|
/**
|
|
@@ -769,13 +770,13 @@ export declare class Projects {
|
|
|
769
770
|
* @param {string} projectId - Project unique ID.
|
|
770
771
|
* @param {string} keyId - Key unique ID.
|
|
771
772
|
* @param {string} name - Key name. Max length: 128 chars.
|
|
772
|
-
* @param {
|
|
773
|
+
* @param {Scopes[]} scopes - Key scopes list. Maximum of 100 events are allowed.
|
|
773
774
|
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
774
775
|
* @throws {AppwriteException}
|
|
775
776
|
* @returns {Promise<Models.Key>}
|
|
776
777
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
777
778
|
*/
|
|
778
|
-
updateKey(projectId: string, keyId: string, name: string, scopes?:
|
|
779
|
+
updateKey(projectId: string, keyId: string, name: string, scopes?: Scopes[], expire?: string): Promise<Models.Key>;
|
|
779
780
|
/**
|
|
780
781
|
* Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
|
|
781
782
|
*
|