@appwrite.io/console 15.3.0 → 15.5.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 (43) hide show
  1. package/README.md +3 -3
  2. package/dist/cjs/sdk.js +2568 -1656
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +2568 -1656
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +2568 -1656
  7. package/package.json +1 -1
  8. package/types/enums/database-status.d.ts +12 -1
  9. package/types/enums/database-type.d.ts +4 -1
  10. package/types/enums/o-auth-provider.d.ts +1 -0
  11. package/types/enums/organization-key-scopes.d.ts +2 -0
  12. package/types/enums/project-key-scopes.d.ts +5 -2
  13. package/types/enums/project-o-auth-provider-id.d.ts +1 -0
  14. package/types/enums/query-suggestion-resource.d.ts +8 -2
  15. package/types/enums/waf-rule-action.d.ts +7 -0
  16. package/types/index.d.ts +3 -5
  17. package/types/models.d.ts +3334 -3354
  18. package/types/services/account.d.ts +133 -4
  19. package/types/services/apps.d.ts +141 -11
  20. package/types/services/backups.d.ts +17 -8
  21. package/types/services/databases.d.ts +0 -70
  22. package/types/services/documents-db.d.ts +75 -2
  23. package/types/services/functions.d.ts +4 -43
  24. package/types/services/locale.d.ts +2 -2
  25. package/types/services/migrations.d.ts +30 -18
  26. package/types/services/mongo.d.ts +13 -4
  27. package/types/services/mysql.d.ts +13 -4
  28. package/types/services/oauth-2.d.ts +119 -15
  29. package/types/services/organization.d.ts +104 -0
  30. package/types/services/postgresql.d.ts +13 -4
  31. package/types/services/project.d.ts +32 -1
  32. package/types/services/projects.d.ts +0 -25
  33. package/types/services/sites.d.ts +4 -43
  34. package/types/services/storage.d.ts +0 -46
  35. package/types/services/tables-db.d.ts +75 -69
  36. package/types/services/teams.d.ts +119 -0
  37. package/types/services/usage.d.ts +10 -10
  38. package/types/services/vectors-db.d.ts +111 -2
  39. package/types/services/waf.d.ts +435 -0
  40. package/types/enums/health-antivirus-status.d.ts +0 -5
  41. package/types/enums/health-check-status.d.ts +0 -4
  42. package/types/enums/health-queue-name.d.ts +0 -16
  43. package/types/services/health.d.ts +0 -483
@@ -4,7 +4,6 @@ import { Framework } from '../enums/framework';
4
4
  import { BuildRuntime } from '../enums/build-runtime';
5
5
  import { Adapter } from '../enums/adapter';
6
6
  import { SiteTemplateUseCase } from '../enums/site-template-use-case';
7
- import { UsageRange } from '../enums/usage-range';
8
7
  import { TemplateReferenceType } from '../enums/template-reference-type';
9
8
  import { VCSReferenceType } from '../enums/vcs-reference-type';
10
9
  import { DeploymentDownloadType } from '../enums/deployment-download-type';
@@ -194,25 +193,6 @@ export declare class Sites {
194
193
  * @deprecated Use the object parameter style method for a better developer experience.
195
194
  */
196
195
  getTemplate(templateId: string): Promise<Models.TemplateSite>;
197
- /**
198
- * Get usage metrics and statistics for all sites in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
199
- *
200
- * @param {UsageRange} params.range - Date range.
201
- * @throws {AppwriteException}
202
- * @returns {Promise<Models.UsageSites>}
203
- */
204
- listUsage(params?: {
205
- range?: UsageRange;
206
- }): Promise<Models.UsageSites>;
207
- /**
208
- * Get usage metrics and statistics for all sites in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
209
- *
210
- * @param {UsageRange} range - Date range.
211
- * @throws {AppwriteException}
212
- * @returns {Promise<Models.UsageSites>}
213
- * @deprecated Use the object parameter style method for a better developer experience.
214
- */
215
- listUsage(range?: UsageRange): Promise<Models.UsageSites>;
216
196
  /**
217
197
  * Get a site by its unique ID.
218
198
  *
@@ -566,6 +546,7 @@ export declare class Sites {
566
546
  * @param {string} params.siteId - Site ID.
567
547
  * @param {string} params.deploymentId - Deployment ID.
568
548
  * @param {DeploymentDownloadType} params.type - Deployment file to download. Can be: "source", "output".
549
+ * @param {string} params.token - Presigned source-download token for accessing this deployment without a session (jobs-service).
569
550
  * @throws {AppwriteException}
570
551
  * @returns {string}
571
552
  */
@@ -573,6 +554,7 @@ export declare class Sites {
573
554
  siteId: string;
574
555
  deploymentId: string;
575
556
  type?: DeploymentDownloadType;
557
+ token?: string;
576
558
  }): string;
577
559
  /**
578
560
  * Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.
@@ -580,11 +562,12 @@ export declare class Sites {
580
562
  * @param {string} siteId - Site ID.
581
563
  * @param {string} deploymentId - Deployment ID.
582
564
  * @param {DeploymentDownloadType} type - Deployment file to download. Can be: "source", "output".
565
+ * @param {string} token - Presigned source-download token for accessing this deployment without a session (jobs-service).
583
566
  * @throws {AppwriteException}
584
567
  * @returns {string}
585
568
  * @deprecated Use the object parameter style method for a better developer experience.
586
569
  */
587
- getDeploymentDownload(siteId: string, deploymentId: string, type?: DeploymentDownloadType): string;
570
+ getDeploymentDownload(siteId: string, deploymentId: string, type?: DeploymentDownloadType, token?: string): string;
588
571
  /**
589
572
  * Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.
590
573
  *
@@ -676,28 +659,6 @@ export declare class Sites {
676
659
  * @deprecated Use the object parameter style method for a better developer experience.
677
660
  */
678
661
  deleteLog(siteId: string, logId: string): Promise<{}>;
679
- /**
680
- * Get usage metrics and statistics for a for a specific site. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
681
- *
682
- * @param {string} params.siteId - Site ID.
683
- * @param {UsageRange} params.range - Date range.
684
- * @throws {AppwriteException}
685
- * @returns {Promise<Models.UsageSite>}
686
- */
687
- getUsage(params: {
688
- siteId: string;
689
- range?: UsageRange;
690
- }): Promise<Models.UsageSite>;
691
- /**
692
- * Get usage metrics and statistics for a for a specific site. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
693
- *
694
- * @param {string} siteId - Site ID.
695
- * @param {UsageRange} range - Date range.
696
- * @throws {AppwriteException}
697
- * @returns {Promise<Models.UsageSite>}
698
- * @deprecated Use the object parameter style method for a better developer experience.
699
- */
700
- getUsage(siteId: string, range?: UsageRange): Promise<Models.UsageSite>;
701
662
  /**
702
663
  * Get a list of all variables of a specific site.
703
664
  *
@@ -3,7 +3,6 @@ import type { Models } from '../models';
3
3
  import { Compression } from '../enums/compression';
4
4
  import { ImageGravity } from '../enums/image-gravity';
5
5
  import { ImageFormat } from '../enums/image-format';
6
- import { UsageRange } from '../enums/usage-range';
7
6
  export declare class Storage {
8
7
  client: Client;
9
8
  constructor(client: Client);
@@ -419,49 +418,4 @@ export declare class Storage {
419
418
  * @deprecated Use the object parameter style method for a better developer experience.
420
419
  */
421
420
  getFileView(bucketId: string, fileId: string, token?: string): string;
422
- /**
423
- * Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
424
- *
425
- *
426
- * @param {UsageRange} params.range - Date range.
427
- * @throws {AppwriteException}
428
- * @returns {Promise<Models.UsageStorage>}
429
- */
430
- getUsage(params?: {
431
- range?: UsageRange;
432
- }): Promise<Models.UsageStorage>;
433
- /**
434
- * Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
435
- *
436
- *
437
- * @param {UsageRange} range - Date range.
438
- * @throws {AppwriteException}
439
- * @returns {Promise<Models.UsageStorage>}
440
- * @deprecated Use the object parameter style method for a better developer experience.
441
- */
442
- getUsage(range?: UsageRange): Promise<Models.UsageStorage>;
443
- /**
444
- * Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
445
- *
446
- *
447
- * @param {string} params.bucketId - Bucket ID.
448
- * @param {UsageRange} params.range - Date range.
449
- * @throws {AppwriteException}
450
- * @returns {Promise<Models.UsageBuckets>}
451
- */
452
- getBucketUsage(params: {
453
- bucketId: string;
454
- range?: UsageRange;
455
- }): Promise<Models.UsageBuckets>;
456
- /**
457
- * Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
458
- *
459
- *
460
- * @param {string} bucketId - Bucket ID.
461
- * @param {UsageRange} range - Date range.
462
- * @throws {AppwriteException}
463
- * @returns {Promise<Models.UsageBuckets>}
464
- * @deprecated Use the object parameter style method for a better developer experience.
465
- */
466
- getBucketUsage(bucketId: string, range?: UsageRange): Promise<Models.UsageBuckets>;
467
421
  }
@@ -1,6 +1,5 @@
1
1
  import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
- import { UsageRange } from '../enums/usage-range';
4
3
  import { RelationshipType } from '../enums/relationship-type';
5
4
  import { RelationMutate } from '../enums/relation-mutate';
6
5
  import { TablesDBIndexType } from '../enums/tables-db-index-type';
@@ -41,6 +40,7 @@ export declare class TablesDB {
41
40
  * @param {string} params.name - Database name. Max length: 128 chars.
42
41
  * @param {boolean} params.enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
43
42
  * @param {string} params.specification - Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.
43
+ * @param {number} params.replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.
44
44
  * @throws {AppwriteException}
45
45
  * @returns {Promise<Models.Database>}
46
46
  */
@@ -49,6 +49,7 @@ export declare class TablesDB {
49
49
  name: string;
50
50
  enabled?: boolean;
51
51
  specification?: string;
52
+ replicas?: number;
52
53
  }): Promise<Models.Database>;
53
54
  /**
54
55
  * Create a new Database.
@@ -58,11 +59,19 @@ export declare class TablesDB {
58
59
  * @param {string} name - Database name. Max length: 128 chars.
59
60
  * @param {boolean} enabled - Is the database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
60
61
  * @param {string} specification - Database specification. Defaults to `serverless`, which creates the database on the shared pool. Any other value provisions a dedicated database on that specification.
62
+ * @param {number} replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Requires a dedicated `specification`; must be 0 for a serverless database. High availability is enabled when greater than 0.
61
63
  * @throws {AppwriteException}
62
64
  * @returns {Promise<Models.Database>}
63
65
  * @deprecated Use the object parameter style method for a better developer experience.
64
66
  */
65
- create(databaseId: string, name: string, enabled?: boolean, specification?: string): Promise<Models.Database>;
67
+ create(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number): Promise<Models.Database>;
68
+ /**
69
+ * List the dedicated database specifications available on the current plan. Each specification reports its resource limits, pricing, and whether it is enabled for the organization.
70
+ *
71
+ * @throws {AppwriteException}
72
+ * @returns {Promise<Models.DedicatedDatabaseSpecificationList>}
73
+ */
74
+ listSpecifications(): Promise<Models.DedicatedDatabaseSpecificationList>;
66
75
  /**
67
76
  * List transactions across all databases.
68
77
  *
@@ -186,25 +195,6 @@ export declare class TablesDB {
186
195
  * @deprecated Use the object parameter style method for a better developer experience.
187
196
  */
188
197
  createOperations(transactionId: string, operations?: object[]): Promise<Models.Transaction>;
189
- /**
190
- * List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
191
- *
192
- * @param {UsageRange} params.range - Date range.
193
- * @throws {AppwriteException}
194
- * @returns {Promise<Models.UsageDatabases>}
195
- */
196
- listUsage(params?: {
197
- range?: UsageRange;
198
- }): Promise<Models.UsageDatabases>;
199
- /**
200
- * List usage metrics and statistics for all databases in the project. You can view the total number of databases, tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
201
- *
202
- * @param {UsageRange} range - Date range.
203
- * @throws {AppwriteException}
204
- * @returns {Promise<Models.UsageDatabases>}
205
- * @deprecated Use the object parameter style method for a better developer experience.
206
- */
207
- listUsage(range?: UsageRange): Promise<Models.UsageDatabases>;
208
198
  /**
209
199
  * Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
210
200
  *
@@ -230,6 +220,7 @@ export declare class TablesDB {
230
220
  * @param {string} params.databaseId - Database ID.
231
221
  * @param {string} params.name - Database name. Max length: 128 chars.
232
222
  * @param {boolean} params.enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
223
+ * @param {number} params.replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.
233
224
  * @throws {AppwriteException}
234
225
  * @returns {Promise<Models.Database>}
235
226
  */
@@ -237,6 +228,7 @@ export declare class TablesDB {
237
228
  databaseId: string;
238
229
  name?: string;
239
230
  enabled?: boolean;
231
+ replicas?: number;
240
232
  }): Promise<Models.Database>;
241
233
  /**
242
234
  * Update a database by its unique ID.
@@ -244,11 +236,12 @@ export declare class TablesDB {
244
236
  * @param {string} databaseId - Database ID.
245
237
  * @param {string} name - Database name. Max length: 128 chars.
246
238
  * @param {boolean} enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
239
+ * @param {number} replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.
247
240
  * @throws {AppwriteException}
248
241
  * @returns {Promise<Models.Database>}
249
242
  * @deprecated Use the object parameter style method for a better developer experience.
250
243
  */
251
- update(databaseId: string, name?: string, enabled?: boolean): Promise<Models.Database>;
244
+ update(databaseId: string, name?: string, enabled?: boolean, replicas?: number): Promise<Models.Database>;
252
245
  /**
253
246
  * Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
254
247
  *
@@ -268,6 +261,28 @@ export declare class TablesDB {
268
261
  * @deprecated Use the object parameter style method for a better developer experience.
269
262
  */
270
263
  delete(databaseId: string): Promise<{}>;
264
+ /**
265
+ * Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates.
266
+ *
267
+ * @param {string} params.databaseId - Database ID.
268
+ * @param {string} params.targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
269
+ * @throws {AppwriteException}
270
+ * @returns {Promise<Models.DedicatedDatabase>}
271
+ */
272
+ createFailover(params: {
273
+ databaseId: string;
274
+ targetReplicaId?: string;
275
+ }): Promise<Models.DedicatedDatabase>;
276
+ /**
277
+ * Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates.
278
+ *
279
+ * @param {string} databaseId - Database ID.
280
+ * @param {string} targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
281
+ * @throws {AppwriteException}
282
+ * @returns {Promise<Models.DedicatedDatabase>}
283
+ * @deprecated Use the object parameter style method for a better developer experience.
284
+ */
285
+ createFailover(databaseId: string, targetReplicaId?: string): Promise<Models.DedicatedDatabase>;
271
286
  /**
272
287
  * List the dedicated migrations for a TablesDB database. A database has at most one in-flight migration.
273
288
  *
@@ -353,6 +368,44 @@ export declare class TablesDB {
353
368
  * @deprecated Use the object parameter style method for a better developer experience.
354
369
  */
355
370
  deleteMigration(databaseId: string, migrationId: string): Promise<{}>;
371
+ /**
372
+ * Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.
373
+ *
374
+ * @param {string} params.databaseId - Database ID.
375
+ * @throws {AppwriteException}
376
+ * @returns {Promise<Models.DedicatedDatabaseReplicas>}
377
+ */
378
+ getReplicas(params: {
379
+ databaseId: string;
380
+ }): Promise<Models.DedicatedDatabaseReplicas>;
381
+ /**
382
+ * Get high availability status for a dedicated database. Returns replica statuses, replication lag, and sync mode.
383
+ *
384
+ * @param {string} databaseId - Database ID.
385
+ * @throws {AppwriteException}
386
+ * @returns {Promise<Models.DedicatedDatabaseReplicas>}
387
+ * @deprecated Use the object parameter style method for a better developer experience.
388
+ */
389
+ getReplicas(databaseId: string): Promise<Models.DedicatedDatabaseReplicas>;
390
+ /**
391
+ * Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.
392
+ *
393
+ * @param {string} params.databaseId - Database ID.
394
+ * @throws {AppwriteException}
395
+ * @returns {Promise<Models.DatabaseStatus>}
396
+ */
397
+ getStatus(params: {
398
+ databaseId: string;
399
+ }): Promise<Models.DatabaseStatus>;
400
+ /**
401
+ * Get real-time health and status information for a dedicated database. Returns health status, readiness, uptime, connection info, replica status, and volume information.
402
+ *
403
+ * @param {string} databaseId - Database ID.
404
+ * @throws {AppwriteException}
405
+ * @returns {Promise<Models.DatabaseStatus>}
406
+ * @deprecated Use the object parameter style method for a better developer experience.
407
+ */
408
+ getStatus(databaseId: string): Promise<Models.DatabaseStatus>;
356
409
  /**
357
410
  * Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.
358
411
  *
@@ -2424,51 +2477,4 @@ export declare class TablesDB {
2424
2477
  * @deprecated Use the object parameter style method for a better developer experience.
2425
2478
  */
2426
2479
  incrementRowColumn<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, rowId: string, column: string, value?: number, max?: number, transactionId?: string): Promise<Row>;
2427
- /**
2428
- * Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
2429
- *
2430
- * @param {string} params.databaseId - Database ID.
2431
- * @param {string} params.tableId - Table ID.
2432
- * @param {UsageRange} params.range - Date range.
2433
- * @throws {AppwriteException}
2434
- * @returns {Promise<Models.UsageTable>}
2435
- */
2436
- getTableUsage(params: {
2437
- databaseId: string;
2438
- tableId: string;
2439
- range?: UsageRange;
2440
- }): Promise<Models.UsageTable>;
2441
- /**
2442
- * Get usage metrics and statistics for a table. Returning the total number of rows. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
2443
- *
2444
- * @param {string} databaseId - Database ID.
2445
- * @param {string} tableId - Table ID.
2446
- * @param {UsageRange} range - Date range.
2447
- * @throws {AppwriteException}
2448
- * @returns {Promise<Models.UsageTable>}
2449
- * @deprecated Use the object parameter style method for a better developer experience.
2450
- */
2451
- getTableUsage(databaseId: string, tableId: string, range?: UsageRange): Promise<Models.UsageTable>;
2452
- /**
2453
- * Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
2454
- *
2455
- * @param {string} params.databaseId - Database ID.
2456
- * @param {UsageRange} params.range - Date range.
2457
- * @throws {AppwriteException}
2458
- * @returns {Promise<Models.UsageDatabase>}
2459
- */
2460
- getUsage(params: {
2461
- databaseId: string;
2462
- range?: UsageRange;
2463
- }): Promise<Models.UsageDatabase>;
2464
- /**
2465
- * Get usage metrics and statistics for a database. You can view the total number of tables, rows, and storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
2466
- *
2467
- * @param {string} databaseId - Database ID.
2468
- * @param {UsageRange} range - Date range.
2469
- * @throws {AppwriteException}
2470
- * @returns {Promise<Models.UsageDatabase>}
2471
- * @deprecated Use the object parameter style method for a better developer experience.
2472
- */
2473
- getUsage(databaseId: string, range?: UsageRange): Promise<Models.UsageDatabase>;
2474
2480
  }
@@ -113,6 +113,125 @@ export declare class Teams {
113
113
  * @deprecated Use the object parameter style method for a better developer experience.
114
114
  */
115
115
  delete(teamId: string): Promise<{}>;
116
+ /**
117
+ * List app installations on a team. Any team member can read installations.
118
+ *
119
+ * @param {string} params.teamId - Team ID.
120
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
121
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
122
+ * @throws {AppwriteException}
123
+ * @returns {Promise<Models.AppInstallationList>}
124
+ */
125
+ listInstallations(params: {
126
+ teamId: string;
127
+ queries?: string[];
128
+ total?: boolean;
129
+ }): Promise<Models.AppInstallationList>;
130
+ /**
131
+ * List app installations on a team. Any team member can read installations.
132
+ *
133
+ * @param {string} teamId - Team ID.
134
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
135
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
136
+ * @throws {AppwriteException}
137
+ * @returns {Promise<Models.AppInstallationList>}
138
+ * @deprecated Use the object parameter style method for a better developer experience.
139
+ */
140
+ listInstallations(teamId: string, queries?: string[], total?: boolean): Promise<Models.AppInstallationList>;
141
+ /**
142
+ * Install an app on a team. When authenticated as a user, only team members with the owner role can install apps. Requests using an API key or in admin mode can install apps on any team. The installation is granted the scopes the app currently requests.
143
+ *
144
+ * @param {string} params.teamId - Team ID.
145
+ * @param {string} params.appId - Application unique ID.
146
+ * @param {string} params.authorizationDetails - Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.
147
+ * @throws {AppwriteException}
148
+ * @returns {Promise<Models.AppInstallation>}
149
+ */
150
+ createInstallation(params: {
151
+ teamId: string;
152
+ appId: string;
153
+ authorizationDetails?: string;
154
+ }): Promise<Models.AppInstallation>;
155
+ /**
156
+ * Install an app on a team. When authenticated as a user, only team members with the owner role can install apps. Requests using an API key or in admin mode can install apps on any team. The installation is granted the scopes the app currently requests.
157
+ *
158
+ * @param {string} teamId - Team ID.
159
+ * @param {string} appId - Application unique ID.
160
+ * @param {string} authorizationDetails - Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. The Appwrite Console stores authorized project IDs here.
161
+ * @throws {AppwriteException}
162
+ * @returns {Promise<Models.AppInstallation>}
163
+ * @deprecated Use the object parameter style method for a better developer experience.
164
+ */
165
+ createInstallation(teamId: string, appId: string, authorizationDetails?: string): Promise<Models.AppInstallation>;
166
+ /**
167
+ * Get an app installation on a team by its unique ID. Any team member can read installations.
168
+ *
169
+ * @param {string} params.teamId - Team ID.
170
+ * @param {string} params.installationId - Installation unique ID.
171
+ * @throws {AppwriteException}
172
+ * @returns {Promise<Models.AppInstallation>}
173
+ */
174
+ getInstallation(params: {
175
+ teamId: string;
176
+ installationId: string;
177
+ }): Promise<Models.AppInstallation>;
178
+ /**
179
+ * Get an app installation on a team by its unique ID. Any team member can read installations.
180
+ *
181
+ * @param {string} teamId - Team ID.
182
+ * @param {string} installationId - Installation unique ID.
183
+ * @throws {AppwriteException}
184
+ * @returns {Promise<Models.AppInstallation>}
185
+ * @deprecated Use the object parameter style method for a better developer experience.
186
+ */
187
+ getInstallation(teamId: string, installationId: string): Promise<Models.AppInstallation>;
188
+ /**
189
+ * Update an app installation on a team. Only team members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.
190
+ *
191
+ * @param {string} params.teamId - Team ID.
192
+ * @param {string} params.installationId - Installation unique ID.
193
+ * @param {string} params.authorizationDetails - Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.
194
+ * @throws {AppwriteException}
195
+ * @returns {Promise<Models.AppInstallation>}
196
+ */
197
+ updateInstallation(params: {
198
+ teamId: string;
199
+ installationId: string;
200
+ authorizationDetails?: string;
201
+ }): Promise<Models.AppInstallation>;
202
+ /**
203
+ * Update an app installation on a team. Only team members with the owner role can update installations. The installation's granted scopes are refreshed to the scopes the app currently requests; previously issued installation access tokens are revoked.
204
+ *
205
+ * @param {string} teamId - Team ID.
206
+ * @param {string} installationId - Installation unique ID.
207
+ * @param {string} authorizationDetails - Authorization details granted to the installation as a JSON array of objects, each with a `type` and app-defined fields. Omit to keep the current value.
208
+ * @throws {AppwriteException}
209
+ * @returns {Promise<Models.AppInstallation>}
210
+ * @deprecated Use the object parameter style method for a better developer experience.
211
+ */
212
+ updateInstallation(teamId: string, installationId: string, authorizationDetails?: string): Promise<Models.AppInstallation>;
213
+ /**
214
+ * Uninstall an app from a team by its installation ID. Only team members with the owner role can remove installations. Previously issued installation access tokens are revoked.
215
+ *
216
+ * @param {string} params.teamId - Team ID.
217
+ * @param {string} params.installationId - Installation unique ID.
218
+ * @throws {AppwriteException}
219
+ * @returns {Promise<{}>}
220
+ */
221
+ deleteInstallation(params: {
222
+ teamId: string;
223
+ installationId: string;
224
+ }): Promise<{}>;
225
+ /**
226
+ * Uninstall an app from a team by its installation ID. Only team members with the owner role can remove installations. Previously issued installation access tokens are revoked.
227
+ *
228
+ * @param {string} teamId - Team ID.
229
+ * @param {string} installationId - Installation unique ID.
230
+ * @throws {AppwriteException}
231
+ * @returns {Promise<{}>}
232
+ * @deprecated Use the object parameter style method for a better developer experience.
233
+ */
234
+ deleteInstallation(teamId: string, installationId: string): Promise<{}>;
116
235
  /**
117
236
  * Get the team activity logs list by its unique ID.
118
237
  *
@@ -13,9 +13,9 @@ export declare class Usage {
13
13
  * `dimensions[]` breaks each point down by one or more attributes (service, path, status, country, …). `queries[]` filters the underlying events using the standard Utopia query syntax — `equal("path", ["/v1/storage/files"])`, `equal("resourceType", ["bucket"])`, `equal("resourceId", ["abc123"])`, `startsWith("path", ["/v1/storage"])`, `equal("status", ["200", "201"])`, `isNotNull("resourceId")`. Supported attributes: see `queries[]` param. Supported methods: `equal`, `notEqual`, `contains`, `startsWith`, `endsWith`, `isNull`, `isNotNull`. Pass multiple metrics to render stacked charts in one round-trip. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N by aggregated value. When `startAt` is omitted, the default window adapts to `interval` (or 7d when interval is omitted).
14
14
  *
15
15
  * @param {string[]} params.metrics - One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=executions` or `metrics[]=executions&metrics[]=executions.compute` for stacked charts.
16
- * @param {string[]} params.queries - Up to 10 filter queries in Utopia syntax. Allowed attributes: path, method, status, service, resourceType, resourceId, teamId, country, region, hostname, ip, osName, clientType, clientName, deviceName. Allowed methods: equal, notEqual, contains, startsWith, endsWith, isNull, isNotNull. Example: `queries[]=equal("resourceType", ["bucket"])`.
16
+ * @param {string[]} params.queries - Up to 10 filter queries in Utopia syntax. Allowed attributes: path, method, status, service, resourceType, resourceId, teamId, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion. Allowed methods: equal, notEqual, contains, startsWith, endsWith, isNull, isNotNull. Example: `queries[]=equal("resourceType", ["bucket"])`.
17
17
  * @param {string} params.interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
18
- * @param {string[]} params.dimensions - Break-down dimensions (max 10). Allowed: path, method, status, service, resourceType, country, region, hostname, ip, osName, clientType, clientName, deviceName, teamId, resourceId.
18
+ * @param {string[]} params.dimensions - Break-down dimensions (max 10). Allowed: path, method, status, service, resourceType, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion, teamId, resourceId.
19
19
  * @param {string} params.startAt - Range start in ISO 8601. Defaults adapt to interval (7d for the no-interval aggregate).
20
20
  * @param {string} params.endAt - Range end in ISO 8601. Defaults to the current time.
21
21
  * @param {string} params.orderBy - Column to order by. Allowed: time, value. Default time when an interval is set; otherwise value.
@@ -47,9 +47,9 @@ export declare class Usage {
47
47
  * `dimensions[]` breaks each point down by one or more attributes (service, path, status, country, …). `queries[]` filters the underlying events using the standard Utopia query syntax — `equal("path", ["/v1/storage/files"])`, `equal("resourceType", ["bucket"])`, `equal("resourceId", ["abc123"])`, `startsWith("path", ["/v1/storage"])`, `equal("status", ["200", "201"])`, `isNotNull("resourceId")`. Supported attributes: see `queries[]` param. Supported methods: `equal`, `notEqual`, `contains`, `startsWith`, `endsWith`, `isNull`, `isNotNull`. Pass multiple metrics to render stacked charts in one round-trip. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N by aggregated value. When `startAt` is omitted, the default window adapts to `interval` (or 7d when interval is omitted).
48
48
  *
49
49
  * @param {string[]} metrics - One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=executions` or `metrics[]=executions&metrics[]=executions.compute` for stacked charts.
50
- * @param {string[]} queries - Up to 10 filter queries in Utopia syntax. Allowed attributes: path, method, status, service, resourceType, resourceId, teamId, country, region, hostname, ip, osName, clientType, clientName, deviceName. Allowed methods: equal, notEqual, contains, startsWith, endsWith, isNull, isNotNull. Example: `queries[]=equal("resourceType", ["bucket"])`.
50
+ * @param {string[]} queries - Up to 10 filter queries in Utopia syntax. Allowed attributes: path, method, status, service, resourceType, resourceId, teamId, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion. Allowed methods: equal, notEqual, contains, startsWith, endsWith, isNull, isNotNull. Example: `queries[]=equal("resourceType", ["bucket"])`.
51
51
  * @param {string} interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
52
- * @param {string[]} dimensions - Break-down dimensions (max 10). Allowed: path, method, status, service, resourceType, country, region, hostname, ip, osName, clientType, clientName, deviceName, teamId, resourceId.
52
+ * @param {string[]} dimensions - Break-down dimensions (max 10). Allowed: path, method, status, service, resourceType, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion, teamId, resourceId.
53
53
  * @param {string} startAt - Range start in ISO 8601. Defaults adapt to interval (7d for the no-interval aggregate).
54
54
  * @param {string} endAt - Range end in ISO 8601. Defaults to the current time.
55
55
  * @param {string} orderBy - Column to order by. Allowed: time, value. Default time when an interval is set; otherwise value.
@@ -68,12 +68,12 @@ export declare class Usage {
68
68
  * - Omit `interval` for a flat top-N table — `argMax(value, time)` per dimension combination over the whole window, no time axis. Useful for "top 10 resources by current storage".
69
69
  * - Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series — one snapshot per (time bucket × dimension combination).
70
70
  *
71
- * `dimensions[]` breaks each point down further. Supported on gauges: `resourceId`, `teamId`, `service`, `resourceType`. `service` and `resourceType` enable per-service / per-resource-type panels (e.g. storage-by-service: group `files.storage`, `deployments.storage`, `builds.storage`, `databases.storage` by `service`). `queries[]` filters the underlying rows using the standard Utopia query syntax — `equal("resourceType", ["bucket"])`, `equal("resourceId", ["abc123"])`, `equal("teamId", ["team_x"])`, `isNotNull("teamId")`. Supported attributes: see `queries[]` param. Supported methods: `equal`, `notEqual`, `isNull`, `isNotNull`. Pass multiple metrics to render stacked charts in one round-trip. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N. When `startAt` is omitted, the default window adapts to interval (or 7d when interval is omitted).
71
+ * `dimensions[]` breaks each point down further. Supported on gauges: `resourceId`, `teamId`, `service`, `resourceType`, `ordinal`. `service` and `resourceType` enable per-service / per-resource-type panels (e.g. storage-by-service: group `files.storage`, `deployments.storage`, `builds.storage`, `databases.storage` by `service`). `ordinal` separates per-node series for multi-node resources such as dedicated databases (0 is the primary; 1+ are replicas). `queries[]` filters the underlying rows using the standard Utopia query syntax — `equal("resourceType", ["bucket"])`, `equal("resourceId", ["abc123"])`, `equal("teamId", ["team_x"])`, `equal("ordinal", ["0"])`, `isNotNull("teamId")`. Supported attributes: see `queries[]` param. Supported methods: `equal`, `notEqual`, `isNull`, `isNotNull`. Pass multiple metrics to render stacked charts in one round-trip. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N. When `startAt` is omitted, the default window adapts to interval (or 7d when interval is omitted).
72
72
  *
73
73
  * @param {string[]} params.metrics - One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=files.storage` or `metrics[]=files.storage&metrics[]=deployments.storage` for stacked charts.
74
- * @param {string[]} params.queries - Up to 10 filter queries in Utopia syntax. Allowed attributes: service, resourceType, resourceId, teamId. Allowed methods: equal, notEqual, isNull, isNotNull. Example: `queries[]=equal("resourceType", ["bucket"])`.
74
+ * @param {string[]} params.queries - Up to 10 filter queries in Utopia syntax. Allowed attributes: service, resourceType, resourceId, teamId, ordinal. Allowed methods: equal, notEqual, isNull, isNotNull. Example: `queries[]=equal("resourceType", ["bucket"])`.
75
75
  * @param {string} params.interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
76
- * @param {string[]} params.dimensions - Break-down dimensions. Allowed: resourceId, teamId, service, resourceType.
76
+ * @param {string[]} params.dimensions - Break-down dimensions. Allowed: resourceId, teamId, service, resourceType, ordinal.
77
77
  * @param {string} params.startAt - Range start in ISO 8601. Defaults to endAt - 7d.
78
78
  * @param {string} params.endAt - Range end in ISO 8601. Defaults to the current time.
79
79
  * @param {string} params.orderBy - Column to order by. Allowed: time, value. Default time.
@@ -102,12 +102,12 @@ export declare class Usage {
102
102
  * - Omit `interval` for a flat top-N table — `argMax(value, time)` per dimension combination over the whole window, no time axis. Useful for "top 10 resources by current storage".
103
103
  * - Pass `interval` (`1m`, `15m`, `30m`, `1h`, `1d`) for a time series — one snapshot per (time bucket × dimension combination).
104
104
  *
105
- * `dimensions[]` breaks each point down further. Supported on gauges: `resourceId`, `teamId`, `service`, `resourceType`. `service` and `resourceType` enable per-service / per-resource-type panels (e.g. storage-by-service: group `files.storage`, `deployments.storage`, `builds.storage`, `databases.storage` by `service`). `queries[]` filters the underlying rows using the standard Utopia query syntax — `equal("resourceType", ["bucket"])`, `equal("resourceId", ["abc123"])`, `equal("teamId", ["team_x"])`, `isNotNull("teamId")`. Supported attributes: see `queries[]` param. Supported methods: `equal`, `notEqual`, `isNull`, `isNotNull`. Pass multiple metrics to render stacked charts in one round-trip. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N. When `startAt` is omitted, the default window adapts to interval (or 7d when interval is omitted).
105
+ * `dimensions[]` breaks each point down further. Supported on gauges: `resourceId`, `teamId`, `service`, `resourceType`, `ordinal`. `service` and `resourceType` enable per-service / per-resource-type panels (e.g. storage-by-service: group `files.storage`, `deployments.storage`, `builds.storage`, `databases.storage` by `service`). `ordinal` separates per-node series for multi-node resources such as dedicated databases (0 is the primary; 1+ are replicas). `queries[]` filters the underlying rows using the standard Utopia query syntax — `equal("resourceType", ["bucket"])`, `equal("resourceId", ["abc123"])`, `equal("teamId", ["team_x"])`, `equal("ordinal", ["0"])`, `isNotNull("teamId")`. Supported attributes: see `queries[]` param. Supported methods: `equal`, `notEqual`, `isNull`, `isNotNull`. Pass multiple metrics to render stacked charts in one round-trip. `orderBy=value`+`orderDir=desc`+`limit=N` returns the top-N. When `startAt` is omitted, the default window adapts to interval (or 7d when interval is omitted).
106
106
  *
107
107
  * @param {string[]} metrics - One to ten metric names. Single-metric callers pass a one-element array. Example: `metrics[]=files.storage` or `metrics[]=files.storage&metrics[]=deployments.storage` for stacked charts.
108
- * @param {string[]} queries - Up to 10 filter queries in Utopia syntax. Allowed attributes: service, resourceType, resourceId, teamId. Allowed methods: equal, notEqual, isNull, isNotNull. Example: `queries[]=equal("resourceType", ["bucket"])`.
108
+ * @param {string[]} queries - Up to 10 filter queries in Utopia syntax. Allowed attributes: service, resourceType, resourceId, teamId, ordinal. Allowed methods: equal, notEqual, isNull, isNotNull. Example: `queries[]=equal("resourceType", ["bucket"])`.
109
109
  * @param {string} interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
110
- * @param {string[]} dimensions - Break-down dimensions. Allowed: resourceId, teamId, service, resourceType.
110
+ * @param {string[]} dimensions - Break-down dimensions. Allowed: resourceId, teamId, service, resourceType, ordinal.
111
111
  * @param {string} startAt - Range start in ISO 8601. Defaults to endAt - 7d.
112
112
  * @param {string} endAt - Range end in ISO 8601. Defaults to the current time.
113
113
  * @param {string} orderBy - Column to order by. Allowed: time, value. Default time.