@appwrite.io/console 1.5.1 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +4 -4
  2. package/dist/cjs/sdk.js +7714 -9758
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +7714 -9758
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +7714 -9758
  7. package/docs/examples/databases/update-float-attribute.md +2 -2
  8. package/docs/examples/databases/update-integer-attribute.md +2 -2
  9. package/docs/examples/health/{get-queue-usage-count.md → get-queue-stats-resources.md} +1 -1
  10. package/docs/examples/health/{get-queue-usage-dump.md → get-queue-stats-usage-dump.md} +1 -1
  11. package/docs/examples/organizations/create.md +5 -1
  12. package/docs/examples/organizations/update-plan.md +5 -1
  13. package/docs/examples/organizations/validate-invoice.md +14 -0
  14. package/package.json +1 -1
  15. package/src/client.ts +21 -4
  16. package/src/enums/credit-card.ts +1 -0
  17. package/src/enums/name.ts +3 -2
  18. package/src/enums/o-auth-provider.ts +1 -0
  19. package/src/enums/runtime.ts +3 -0
  20. package/src/models.ts +202 -5
  21. package/src/services/account.ts +126 -430
  22. package/src/services/assistant.ts +2 -7
  23. package/src/services/avatars.ts +7 -21
  24. package/src/services/backups.ts +24 -84
  25. package/src/services/console.ts +14 -49
  26. package/src/services/databases.ts +99 -350
  27. package/src/services/functions.ts +55 -192
  28. package/src/services/graphql.ts +4 -14
  29. package/src/services/health.ts +55 -207
  30. package/src/services/locale.ts +16 -56
  31. package/src/services/messaging.ts +92 -322
  32. package/src/services/migrations.ts +24 -84
  33. package/src/services/organizations.ts +118 -196
  34. package/src/services/project.ts +12 -42
  35. package/src/services/projects.ts +92 -322
  36. package/src/services/proxy.ts +10 -35
  37. package/src/services/storage.ts +27 -93
  38. package/src/services/teams.ts +28 -98
  39. package/src/services/users.ts +86 -301
  40. package/src/services/vcs.ts +20 -70
  41. package/types/enums/credit-card.d.ts +2 -1
  42. package/types/enums/name.d.ts +3 -2
  43. package/types/enums/o-auth-provider.d.ts +1 -0
  44. package/types/enums/runtime.d.ts +3 -0
  45. package/types/models.d.ts +202 -5
  46. package/types/services/account.d.ts +4 -128
  47. package/types/services/assistant.d.ts +0 -2
  48. package/types/services/avatars.d.ts +0 -14
  49. package/types/services/backups.d.ts +0 -24
  50. package/types/services/console.d.ts +0 -14
  51. package/types/services/databases.d.ts +5 -100
  52. package/types/services/functions.d.ts +0 -56
  53. package/types/services/graphql.d.ts +0 -4
  54. package/types/services/health.d.ts +5 -64
  55. package/types/services/locale.d.ts +0 -16
  56. package/types/services/messaging.d.ts +0 -92
  57. package/types/services/migrations.d.ts +0 -24
  58. package/types/services/organizations.d.ts +21 -60
  59. package/types/services/project.d.ts +0 -12
  60. package/types/services/projects.d.ts +0 -92
  61. package/types/services/proxy.d.ts +0 -10
  62. package/types/services/storage.d.ts +0 -30
  63. package/types/services/teams.d.ts +0 -28
  64. package/types/services/users.d.ts +0 -86
  65. package/types/services/vcs.d.ts +0 -20
  66. package/docs/examples/health/get-queue.md +0 -11
@@ -10,8 +10,6 @@ export class Migrations {
10
10
  }
11
11
 
12
12
  /**
13
- * List migrations
14
- *
15
13
  * List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.
16
14
  *
17
15
  * @param {string[]} queries
@@ -19,7 +17,7 @@ export class Migrations {
19
17
  * @throws {AppwriteException}
20
18
  * @returns {Promise<Models.MigrationList>}
21
19
  */
22
- async list(queries?: string[], search?: string): Promise<Models.MigrationList> {
20
+ list(queries?: string[], search?: string): Promise<Models.MigrationList> {
23
21
  const apiPath = '/migrations';
24
22
  const payload: Payload = {};
25
23
  if (typeof queries !== 'undefined') {
@@ -34,10 +32,7 @@ export class Migrations {
34
32
  'content-type': 'application/json',
35
33
  }
36
34
 
37
- payload['project'] = this.client.config.project;
38
-
39
-
40
- return await this.client.call(
35
+ return this.client.call(
41
36
  'get',
42
37
  uri,
43
38
  apiHeaders,
@@ -45,8 +40,6 @@ export class Migrations {
45
40
  );
46
41
  }
47
42
  /**
48
- * Migrate Appwrite data
49
- *
50
43
  * 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.
51
44
  *
52
45
  * @param {string[]} resources
@@ -56,7 +49,7 @@ export class Migrations {
56
49
  * @throws {AppwriteException}
57
50
  * @returns {Promise<Models.Migration>}
58
51
  */
59
- async createAppwriteMigration(resources: string[], endpoint: string, projectId: string, apiKey: string): Promise<Models.Migration> {
52
+ createAppwriteMigration(resources: string[], endpoint: string, projectId: string, apiKey: string): Promise<Models.Migration> {
60
53
  if (typeof resources === 'undefined') {
61
54
  throw new AppwriteException('Missing required parameter: "resources"');
62
55
  }
@@ -89,10 +82,7 @@ export class Migrations {
89
82
  'content-type': 'application/json',
90
83
  }
91
84
 
92
- payload['project'] = this.client.config.project;
93
-
94
-
95
- return await this.client.call(
85
+ return this.client.call(
96
86
  'post',
97
87
  uri,
98
88
  apiHeaders,
@@ -100,8 +90,6 @@ export class Migrations {
100
90
  );
101
91
  }
102
92
  /**
103
- * Generate a report on Appwrite data
104
- *
105
93
  * 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.
106
94
  *
107
95
  * @param {string[]} resources
@@ -111,7 +99,7 @@ export class Migrations {
111
99
  * @throws {AppwriteException}
112
100
  * @returns {Promise<Models.MigrationReport>}
113
101
  */
114
- async getAppwriteReport(resources: string[], endpoint: string, projectID: string, key: string): Promise<Models.MigrationReport> {
102
+ getAppwriteReport(resources: string[], endpoint: string, projectID: string, key: string): Promise<Models.MigrationReport> {
115
103
  if (typeof resources === 'undefined') {
116
104
  throw new AppwriteException('Missing required parameter: "resources"');
117
105
  }
@@ -144,10 +132,7 @@ export class Migrations {
144
132
  'content-type': 'application/json',
145
133
  }
146
134
 
147
- payload['project'] = this.client.config.project;
148
-
149
-
150
- return await this.client.call(
135
+ return this.client.call(
151
136
  'get',
152
137
  uri,
153
138
  apiHeaders,
@@ -155,8 +140,6 @@ export class Migrations {
155
140
  );
156
141
  }
157
142
  /**
158
- * Migrate Firebase data
159
- *
160
143
  * 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.
161
144
  *
162
145
  * @param {string[]} resources
@@ -164,7 +147,7 @@ export class Migrations {
164
147
  * @throws {AppwriteException}
165
148
  * @returns {Promise<Models.Migration>}
166
149
  */
167
- async createFirebaseMigration(resources: string[], serviceAccount: string): Promise<Models.Migration> {
150
+ createFirebaseMigration(resources: string[], serviceAccount: string): Promise<Models.Migration> {
168
151
  if (typeof resources === 'undefined') {
169
152
  throw new AppwriteException('Missing required parameter: "resources"');
170
153
  }
@@ -185,10 +168,7 @@ export class Migrations {
185
168
  'content-type': 'application/json',
186
169
  }
187
170
 
188
- payload['project'] = this.client.config.project;
189
-
190
-
191
- return await this.client.call(
171
+ return this.client.call(
192
172
  'post',
193
173
  uri,
194
174
  apiHeaders,
@@ -196,8 +176,6 @@ export class Migrations {
196
176
  );
197
177
  }
198
178
  /**
199
- * Generate a report on Firebase data
200
- *
201
179
  * 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.
202
180
  *
203
181
  * @param {string[]} resources
@@ -205,7 +183,7 @@ export class Migrations {
205
183
  * @throws {AppwriteException}
206
184
  * @returns {Promise<Models.MigrationReport>}
207
185
  */
208
- async getFirebaseReport(resources: string[], serviceAccount: string): Promise<Models.MigrationReport> {
186
+ getFirebaseReport(resources: string[], serviceAccount: string): Promise<Models.MigrationReport> {
209
187
  if (typeof resources === 'undefined') {
210
188
  throw new AppwriteException('Missing required parameter: "resources"');
211
189
  }
@@ -226,10 +204,7 @@ export class Migrations {
226
204
  'content-type': 'application/json',
227
205
  }
228
206
 
229
- payload['project'] = this.client.config.project;
230
-
231
-
232
- return await this.client.call(
207
+ return this.client.call(
233
208
  'get',
234
209
  uri,
235
210
  apiHeaders,
@@ -237,8 +212,6 @@ export class Migrations {
237
212
  );
238
213
  }
239
214
  /**
240
- * Migrate NHost data
241
- *
242
215
  * 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.
243
216
  *
244
217
  * @param {string[]} resources
@@ -252,7 +225,7 @@ export class Migrations {
252
225
  * @throws {AppwriteException}
253
226
  * @returns {Promise<Models.Migration>}
254
227
  */
255
- async createNHostMigration(resources: string[], subdomain: string, region: string, adminSecret: string, database: string, username: string, password: string, port?: number): Promise<Models.Migration> {
228
+ createNHostMigration(resources: string[], subdomain: string, region: string, adminSecret: string, database: string, username: string, password: string, port?: number): Promise<Models.Migration> {
256
229
  if (typeof resources === 'undefined') {
257
230
  throw new AppwriteException('Missing required parameter: "resources"');
258
231
  }
@@ -306,10 +279,7 @@ export class Migrations {
306
279
  'content-type': 'application/json',
307
280
  }
308
281
 
309
- payload['project'] = this.client.config.project;
310
-
311
-
312
- return await this.client.call(
282
+ return this.client.call(
313
283
  'post',
314
284
  uri,
315
285
  apiHeaders,
@@ -317,8 +287,6 @@ export class Migrations {
317
287
  );
318
288
  }
319
289
  /**
320
- * Generate a report on NHost Data
321
- *
322
290
  * 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.
323
291
  *
324
292
  * @param {string[]} resources
@@ -332,7 +300,7 @@ export class Migrations {
332
300
  * @throws {AppwriteException}
333
301
  * @returns {Promise<Models.MigrationReport>}
334
302
  */
335
- async getNHostReport(resources: string[], subdomain: string, region: string, adminSecret: string, database: string, username: string, password: string, port?: number): Promise<Models.MigrationReport> {
303
+ getNHostReport(resources: string[], subdomain: string, region: string, adminSecret: string, database: string, username: string, password: string, port?: number): Promise<Models.MigrationReport> {
336
304
  if (typeof resources === 'undefined') {
337
305
  throw new AppwriteException('Missing required parameter: "resources"');
338
306
  }
@@ -386,10 +354,7 @@ export class Migrations {
386
354
  'content-type': 'application/json',
387
355
  }
388
356
 
389
- payload['project'] = this.client.config.project;
390
-
391
-
392
- return await this.client.call(
357
+ return this.client.call(
393
358
  'get',
394
359
  uri,
395
360
  apiHeaders,
@@ -397,8 +362,6 @@ export class Migrations {
397
362
  );
398
363
  }
399
364
  /**
400
- * Migrate Supabase data
401
- *
402
365
  * 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.
403
366
  *
404
367
  * @param {string[]} resources
@@ -411,7 +374,7 @@ export class Migrations {
411
374
  * @throws {AppwriteException}
412
375
  * @returns {Promise<Models.Migration>}
413
376
  */
414
- async createSupabaseMigration(resources: string[], endpoint: string, apiKey: string, databaseHost: string, username: string, password: string, port?: number): Promise<Models.Migration> {
377
+ createSupabaseMigration(resources: string[], endpoint: string, apiKey: string, databaseHost: string, username: string, password: string, port?: number): Promise<Models.Migration> {
415
378
  if (typeof resources === 'undefined') {
416
379
  throw new AppwriteException('Missing required parameter: "resources"');
417
380
  }
@@ -459,10 +422,7 @@ export class Migrations {
459
422
  'content-type': 'application/json',
460
423
  }
461
424
 
462
- payload['project'] = this.client.config.project;
463
-
464
-
465
- return await this.client.call(
425
+ return this.client.call(
466
426
  'post',
467
427
  uri,
468
428
  apiHeaders,
@@ -470,8 +430,6 @@ export class Migrations {
470
430
  );
471
431
  }
472
432
  /**
473
- * Generate a report on Supabase Data
474
- *
475
433
  * 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.
476
434
  *
477
435
  * @param {string[]} resources
@@ -484,7 +442,7 @@ export class Migrations {
484
442
  * @throws {AppwriteException}
485
443
  * @returns {Promise<Models.MigrationReport>}
486
444
  */
487
- async getSupabaseReport(resources: string[], endpoint: string, apiKey: string, databaseHost: string, username: string, password: string, port?: number): Promise<Models.MigrationReport> {
445
+ getSupabaseReport(resources: string[], endpoint: string, apiKey: string, databaseHost: string, username: string, password: string, port?: number): Promise<Models.MigrationReport> {
488
446
  if (typeof resources === 'undefined') {
489
447
  throw new AppwriteException('Missing required parameter: "resources"');
490
448
  }
@@ -532,10 +490,7 @@ export class Migrations {
532
490
  'content-type': 'application/json',
533
491
  }
534
492
 
535
- payload['project'] = this.client.config.project;
536
-
537
-
538
- return await this.client.call(
493
+ return this.client.call(
539
494
  'get',
540
495
  uri,
541
496
  apiHeaders,
@@ -543,15 +498,13 @@ export class Migrations {
543
498
  );
544
499
  }
545
500
  /**
546
- * Get migration
547
- *
548
501
  * 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.
549
502
  *
550
503
  * @param {string} migrationId
551
504
  * @throws {AppwriteException}
552
505
  * @returns {Promise<Models.Migration>}
553
506
  */
554
- async get(migrationId: string): Promise<Models.Migration> {
507
+ get(migrationId: string): Promise<Models.Migration> {
555
508
  if (typeof migrationId === 'undefined') {
556
509
  throw new AppwriteException('Missing required parameter: "migrationId"');
557
510
  }
@@ -563,10 +516,7 @@ export class Migrations {
563
516
  'content-type': 'application/json',
564
517
  }
565
518
 
566
- payload['project'] = this.client.config.project;
567
-
568
-
569
- return await this.client.call(
519
+ return this.client.call(
570
520
  'get',
571
521
  uri,
572
522
  apiHeaders,
@@ -574,15 +524,13 @@ export class Migrations {
574
524
  );
575
525
  }
576
526
  /**
577
- * Retry migration
578
- *
579
527
  * Retry a failed migration. This endpoint allows you to retry a migration that has previously failed.
580
528
  *
581
529
  * @param {string} migrationId
582
530
  * @throws {AppwriteException}
583
531
  * @returns {Promise<Models.Migration>}
584
532
  */
585
- async retry(migrationId: string): Promise<Models.Migration> {
533
+ retry(migrationId: string): Promise<Models.Migration> {
586
534
  if (typeof migrationId === 'undefined') {
587
535
  throw new AppwriteException('Missing required parameter: "migrationId"');
588
536
  }
@@ -594,10 +542,7 @@ export class Migrations {
594
542
  'content-type': 'application/json',
595
543
  }
596
544
 
597
- payload['project'] = this.client.config.project;
598
-
599
-
600
- return await this.client.call(
545
+ return this.client.call(
601
546
  'patch',
602
547
  uri,
603
548
  apiHeaders,
@@ -605,15 +550,13 @@ export class Migrations {
605
550
  );
606
551
  }
607
552
  /**
608
- * Delete migration
609
- *
610
553
  * Delete a migration by its unique ID. This endpoint allows you to remove a migration from your project&#039;s migration history.
611
554
  *
612
555
  * @param {string} migrationId
613
556
  * @throws {AppwriteException}
614
557
  * @returns {Promise<{}>}
615
558
  */
616
- async delete(migrationId: string): Promise<{}> {
559
+ delete(migrationId: string): Promise<{}> {
617
560
  if (typeof migrationId === 'undefined') {
618
561
  throw new AppwriteException('Missing required parameter: "migrationId"');
619
562
  }
@@ -625,10 +568,7 @@ export class Migrations {
625
568
  'content-type': 'application/json',
626
569
  }
627
570
 
628
- payload['project'] = this.client.config.project;
629
-
630
-
631
- return await this.client.call(
571
+ return this.client.call(
632
572
  'delete',
633
573
  uri,
634
574
  apiHeaders,