@appwrite.io/console 16.0.0 → 17.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +5 -6
  2. package/dist/cjs/package.json +1 -1
  3. package/dist/cjs/sdk.js +8558 -4805
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/package.json +1 -1
  6. package/dist/esm/sdk.js +8559 -4806
  7. package/dist/esm/sdk.js.map +1 -1
  8. package/dist/iife/sdk.js +8558 -4805
  9. package/package.json +59 -50
  10. package/types/client.d.ts +2 -13
  11. package/types/enums/{addon.d.ts → addon-key.d.ts} +1 -1
  12. package/types/enums/authentication-factor.d.ts +2 -1
  13. package/types/enums/billing-plan-group.d.ts +2 -1
  14. package/types/enums/build-runtime.d.ts +4 -1
  15. package/types/enums/cache-database.d.ts +1 -2
  16. package/types/enums/embedding-model.d.ts +1 -3
  17. package/types/enums/execution-resource-type.d.ts +4 -0
  18. package/types/enums/framework.d.ts +1 -0
  19. package/types/enums/id-token-provider.d.ts +4 -0
  20. package/types/enums/image-gravity.d.ts +1 -0
  21. package/types/enums/o-auth-provider.d.ts +5 -0
  22. package/types/enums/organization-key-scopes.d.ts +2 -4
  23. package/types/enums/project-email-template-id.d.ts +2 -1
  24. package/types/enums/project-key-scopes.d.ts +20 -3
  25. package/types/enums/project-o-auth-provider-id.d.ts +5 -0
  26. package/types/enums/project-policy-id.d.ts +2 -0
  27. package/types/enums/query-suggestion-resource.d.ts +2 -3
  28. package/types/enums/runtime.d.ts +4 -1
  29. package/types/enums/usage-event-dimension.d.ts +7 -1
  30. package/types/enums/usage-event-metric.d.ts +55 -0
  31. package/types/enums/usage-gauge-metric.d.ts +50 -0
  32. package/types/index.d.ts +11 -6
  33. package/types/models.d.ts +696 -776
  34. package/types/services/account.d.ts +124 -36
  35. package/types/services/apps.d.ts +6 -6
  36. package/types/services/avatars.d.ts +44 -0
  37. package/types/services/console.d.ts +2 -2
  38. package/types/services/databases.d.ts +8 -8
  39. package/types/services/documents-db.d.ts +13 -7
  40. package/types/services/domains.d.ts +82 -54
  41. package/types/services/functions.d.ts +6 -6
  42. package/types/services/manager.d.ts +14 -14
  43. package/types/services/messaging.d.ts +80 -6
  44. package/types/services/mongo.d.ts +17 -23
  45. package/types/services/mysql.d.ts +17 -23
  46. package/types/services/organization.d.ts +165 -0
  47. package/types/services/organizations.d.ts +24 -24
  48. package/types/services/postgresql.d.ts +17 -23
  49. package/types/services/project.d.ts +218 -51
  50. package/types/services/projects.d.ts +0 -94
  51. package/types/services/sites.d.ts +15 -8
  52. package/types/services/storage.d.ts +2 -2
  53. package/types/services/tables-db.d.ts +37 -12
  54. package/types/services/teams.d.ts +0 -25
  55. package/types/services/usage.d.ts +23 -14
  56. package/types/services/users.d.ts +26 -29
  57. package/types/services/vectors-db.d.ts +15 -9
  58. package/types/services/waf.d.ts +11 -2
  59. package/types/enums/project-usage-range.d.ts +0 -4
@@ -3,6 +3,7 @@ import type { Models } from '../models';
3
3
  import { Framework } from '../enums/framework';
4
4
  import { BuildRuntime } from '../enums/build-runtime';
5
5
  import { Adapter } from '../enums/adapter';
6
+ import { ProjectKeyScopes } from '../enums/project-key-scopes';
6
7
  import { SiteTemplateUseCase } from '../enums/site-template-use-case';
7
8
  import { TemplateReferenceType } from '../enums/template-reference-type';
8
9
  import { VCSReferenceType } from '../enums/vcs-reference-type';
@@ -61,6 +62,7 @@ export declare class Sites {
61
62
  * @param {string} params.buildSpecification - Build specification for the site deployments.
62
63
  * @param {string} params.runtimeSpecification - Runtime specification for the SSR executions.
63
64
  * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
65
+ * @param {ProjectKeyScopes[]} params.scopes - List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed.
64
66
  * @throws {AppwriteException}
65
67
  * @returns {Promise<Models.Site>}
66
68
  */
@@ -88,6 +90,7 @@ export declare class Sites {
88
90
  buildSpecification?: string;
89
91
  runtimeSpecification?: string;
90
92
  deploymentRetention?: number;
93
+ scopes?: ProjectKeyScopes[];
91
94
  }): Promise<Models.Site>;
92
95
  /**
93
96
  * Create a new site.
@@ -115,11 +118,12 @@ export declare class Sites {
115
118
  * @param {string} buildSpecification - Build specification for the site deployments.
116
119
  * @param {string} runtimeSpecification - Runtime specification for the SSR executions.
117
120
  * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
121
+ * @param {ProjectKeyScopes[]} scopes - List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed.
118
122
  * @throws {AppwriteException}
119
123
  * @returns {Promise<Models.Site>}
120
124
  * @deprecated Use the object parameter style method for a better developer experience.
121
125
  */
122
- create(siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, startCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, providerBranches?: string[], providerPaths?: string[], buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Site>;
126
+ create(siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, startCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, providerBranches?: string[], providerPaths?: string[], buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number, scopes?: ProjectKeyScopes[]): Promise<Models.Site>;
123
127
  /**
124
128
  * Get a list of all frameworks that are currently available on the server instance.
125
129
  *
@@ -130,7 +134,7 @@ export declare class Sites {
130
134
  /**
131
135
  * List allowed site specifications for this instance.
132
136
  *
133
- * @param {string} params.type - Specification type to list. Can be one of: runtimes, builds.
137
+ * @param {string} params.type - Specification type to list. Can be one of: runtimes, builds. Defaults to runtimes.
134
138
  * @throws {AppwriteException}
135
139
  * @returns {Promise<Models.SpecificationList>}
136
140
  */
@@ -140,7 +144,7 @@ export declare class Sites {
140
144
  /**
141
145
  * List allowed site specifications for this instance.
142
146
  *
143
- * @param {string} type - Specification type to list. Can be one of: runtimes, builds.
147
+ * @param {string} type - Specification type to list. Can be one of: runtimes, builds. Defaults to runtimes.
144
148
  * @throws {AppwriteException}
145
149
  * @returns {Promise<Models.SpecificationList>}
146
150
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -238,6 +242,7 @@ export declare class Sites {
238
242
  * @param {string} params.buildSpecification - Build specification for the site deployments.
239
243
  * @param {string} params.runtimeSpecification - Runtime specification for the SSR executions.
240
244
  * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
245
+ * @param {ProjectKeyScopes[]} params.scopes - List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed.
241
246
  * @throws {AppwriteException}
242
247
  * @returns {Promise<Models.Site>}
243
248
  */
@@ -265,6 +270,7 @@ export declare class Sites {
265
270
  buildSpecification?: string;
266
271
  runtimeSpecification?: string;
267
272
  deploymentRetention?: number;
273
+ scopes?: ProjectKeyScopes[];
268
274
  }): Promise<Models.Site>;
269
275
  /**
270
276
  * Update site by its unique ID.
@@ -292,11 +298,12 @@ export declare class Sites {
292
298
  * @param {string} buildSpecification - Build specification for the site deployments.
293
299
  * @param {string} runtimeSpecification - Runtime specification for the SSR executions.
294
300
  * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
301
+ * @param {ProjectKeyScopes[]} scopes - List of scopes allowed for API key auto-generated for every site build and SSR execution. Maximum of 200 scopes are allowed.
295
302
  * @throws {AppwriteException}
296
303
  * @returns {Promise<Models.Site>}
297
304
  * @deprecated Use the object parameter style method for a better developer experience.
298
305
  */
299
- update(siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, startCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, providerBranches?: string[], providerPaths?: string[], buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Site>;
306
+ update(siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, startCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, providerBranches?: string[], providerPaths?: string[], buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number, scopes?: ProjectKeyScopes[]): Promise<Models.Site>;
300
307
  /**
301
308
  * Delete a site by its unique ID.
302
309
  *
@@ -689,7 +696,7 @@ export declare class Sites {
689
696
  *
690
697
  * @param {string} params.siteId - Site unique ID.
691
698
  * @param {string} params.variableId - Variable 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.
692
- * @param {string} params.key - Variable key. Max length: 255 chars.
699
+ * @param {string} params.key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.
693
700
  * @param {string} params.value - Variable value. Max length: 8192 chars.
694
701
  * @param {boolean} params.secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime.
695
702
  * @throws {AppwriteException}
@@ -707,7 +714,7 @@ export declare class Sites {
707
714
  *
708
715
  * @param {string} siteId - Site unique ID.
709
716
  * @param {string} variableId - Variable 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.
710
- * @param {string} key - Variable key. Max length: 255 chars.
717
+ * @param {string} key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.
711
718
  * @param {string} value - Variable value. Max length: 8192 chars.
712
719
  * @param {boolean} secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime.
713
720
  * @throws {AppwriteException}
@@ -742,7 +749,7 @@ export declare class Sites {
742
749
  *
743
750
  * @param {string} params.siteId - Site unique ID.
744
751
  * @param {string} params.variableId - Variable unique ID.
745
- * @param {string} params.key - Variable key. Max length: 255 chars.
752
+ * @param {string} params.key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.
746
753
  * @param {string} params.value - Variable value. Max length: 8192 chars.
747
754
  * @param {boolean} params.secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime.
748
755
  * @throws {AppwriteException}
@@ -760,7 +767,7 @@ export declare class Sites {
760
767
  *
761
768
  * @param {string} siteId - Site unique ID.
762
769
  * @param {string} variableId - Variable unique ID.
763
- * @param {string} key - Variable key. Max length: 255 chars.
770
+ * @param {string} key - Variable key. Letters, digits and underscores only, must not start with a digit. Max length: 255 chars.
764
771
  * @param {string} value - Variable value. Max length: 8192 chars.
765
772
  * @param {boolean} secret - Secret variables can be updated or deleted, but only sites can read them during build and runtime.
766
773
  * @throws {AppwriteException}
@@ -345,7 +345,7 @@ export declare class Storage {
345
345
  * @param {string} params.fileId - File ID
346
346
  * @param {number} params.width - Resize preview image width, Pass an integer between 0 to 4000.
347
347
  * @param {number} params.height - Resize preview image height, Pass an integer between 0 to 4000.
348
- * @param {ImageGravity} params.gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right
348
+ * @param {ImageGravity} params.gravity - Image crop gravity. Can be one of auto,center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right
349
349
  * @param {number} params.quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
350
350
  * @param {number} params.borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.
351
351
  * @param {string} params.borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.
@@ -381,7 +381,7 @@ export declare class Storage {
381
381
  * @param {string} fileId - File ID
382
382
  * @param {number} width - Resize preview image width, Pass an integer between 0 to 4000.
383
383
  * @param {number} height - Resize preview image height, Pass an integer between 0 to 4000.
384
- * @param {ImageGravity} gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right
384
+ * @param {ImageGravity} gravity - Image crop gravity. Can be one of auto,center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right
385
385
  * @param {number} quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
386
386
  * @param {number} borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.
387
387
  * @param {string} borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.
@@ -69,7 +69,7 @@ export declare class TablesDB {
69
69
  */
70
70
  create(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number, syncMode?: string): Promise<Models.Database>;
71
71
  /**
72
- * 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.
72
+ * List the dedicated database specifications available on the current plan. Each specification reports its resource limits, its own prices and overage rates, and whether it is enabled for the organization.
73
73
  *
74
74
  * @throws {AppwriteException}
75
75
  * @returns {Promise<Models.DedicatedDatabaseSpecificationList>}
@@ -271,7 +271,7 @@ export declare class TablesDB {
271
271
  */
272
272
  delete(databaseId: string): Promise<{}>;
273
273
  /**
274
- * 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. A database left mid-operation by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.
274
+ * 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. A database left mid-operation also accepts this call as a repair once nothing is driving the operation it is stuck in. Repairing a failover that did not finish, a `failed` database, a stranded upgrade or migrate, or a stranded compute resize additionally requires `targetReplicaId` to name the member to promote, because the default target may be the member that operation already promoted.
275
275
  *
276
276
  * @param {string} params.databaseId - Database ID.
277
277
  * @param {string} params.targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -283,7 +283,7 @@ export declare class TablesDB {
283
283
  targetReplicaId?: string;
284
284
  }): Promise<Models.DedicatedDatabase>;
285
285
  /**
286
- * 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. A database left mid-operation by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.
286
+ * 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. A database left mid-operation also accepts this call as a repair once nothing is driving the operation it is stuck in. Repairing a failover that did not finish, a `failed` database, a stranded upgrade or migrate, or a stranded compute resize additionally requires `targetReplicaId` to name the member to promote, because the default target may be the member that operation already promoted.
287
287
  *
288
288
  * @param {string} databaseId - Database ID.
289
289
  * @param {string} targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -316,23 +316,26 @@ export declare class TablesDB {
316
316
  *
317
317
  * @param {string} params.databaseId - Database ID.
318
318
  * @param {string} params.specification - Dedicated compute specification to provision as the migration target (e.g. s-2vcpu-4gb). The migration always targets a dedicated compute, so `serverless` is not accepted.
319
+ * @param {boolean} params.autoCutover - Whether to cut over automatically once the copy is verified. When disabled the migration parks at ready_to_cutover and holds there until the cutover is performed manually.
319
320
  * @throws {AppwriteException}
320
321
  * @returns {Promise<Models.DatabaseMigration>}
321
322
  */
322
323
  createMigration(params: {
323
324
  databaseId: string;
324
325
  specification: string;
326
+ autoCutover?: boolean;
325
327
  }): Promise<Models.DatabaseMigration>;
326
328
  /**
327
329
  * Start migrating a serverless TablesDB database onto a dedicated MySQL compute. Data is copied to the target while the source stays live, with a brief read-only window during cutover.
328
330
  *
329
331
  * @param {string} databaseId - Database ID.
330
332
  * @param {string} specification - Dedicated compute specification to provision as the migration target (e.g. s-2vcpu-4gb). The migration always targets a dedicated compute, so `serverless` is not accepted.
333
+ * @param {boolean} autoCutover - Whether to cut over automatically once the copy is verified. When disabled the migration parks at ready_to_cutover and holds there until the cutover is performed manually.
331
334
  * @throws {AppwriteException}
332
335
  * @returns {Promise<Models.DatabaseMigration>}
333
336
  * @deprecated Use the object parameter style method for a better developer experience.
334
337
  */
335
- createMigration(databaseId: string, specification: string): Promise<Models.DatabaseMigration>;
338
+ createMigration(databaseId: string, specification: string, autoCutover?: boolean): Promise<Models.DatabaseMigration>;
336
339
  /**
337
340
  * Get a single dedicated migration for a TablesDB database by its ID.
338
341
  *
@@ -377,6 +380,28 @@ export declare class TablesDB {
377
380
  * @deprecated Use the object parameter style method for a better developer experience.
378
381
  */
379
382
  deleteMigration(databaseId: string, migrationId: string): Promise<{}>;
383
+ /**
384
+ * Cut a verified TablesDB migration over to its dedicated compute. Only applies to a migration created with `autoCutover` disabled, which waits at `ready_to_cutover` until this is called. The routing flip happens shortly after this returns, with a brief read-only window. One call buys one attempt: a cutover that fails a check returns the migration to `verifying` and parks it again, so call this once more to retry.
385
+ *
386
+ * @param {string} params.databaseId - Database ID.
387
+ * @param {string} params.migrationId - Migration ID.
388
+ * @throws {AppwriteException}
389
+ * @returns {Promise<Models.DatabaseMigration>}
390
+ */
391
+ createCutover(params: {
392
+ databaseId: string;
393
+ migrationId: string;
394
+ }): Promise<Models.DatabaseMigration>;
395
+ /**
396
+ * Cut a verified TablesDB migration over to its dedicated compute. Only applies to a migration created with `autoCutover` disabled, which waits at `ready_to_cutover` until this is called. The routing flip happens shortly after this returns, with a brief read-only window. One call buys one attempt: a cutover that fails a check returns the migration to `verifying` and parks it again, so call this once more to retry.
397
+ *
398
+ * @param {string} databaseId - Database ID.
399
+ * @param {string} migrationId - Migration ID.
400
+ * @throws {AppwriteException}
401
+ * @returns {Promise<Models.DatabaseMigration>}
402
+ * @deprecated Use the object parameter style method for a better developer experience.
403
+ */
404
+ createCutover(databaseId: string, migrationId: string): Promise<Models.DatabaseMigration>;
380
405
  /**
381
406
  * List the lifecycle operations recorded for a dedicated database, newest first. Every provision, update, restore, backup and replication action is recorded here with its outcome, including an attempt that was abandoned because another worker took over the database.
382
407
  *
@@ -480,7 +505,7 @@ export declare class TablesDB {
480
505
  * @param {string[]} params.permissions - An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
481
506
  * @param {boolean} params.rowSecurity - Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions).
482
507
  * @param {boolean} params.enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.
483
- * @param {object[]} params.columns - Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
508
+ * @param {object[]} params.columns - Array of column definitions to create. Each column should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
484
509
  * @param {object[]} params.indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).
485
510
  * @throws {AppwriteException}
486
511
  * @returns {Promise<Models.Table>}
@@ -504,7 +529,7 @@ export declare class TablesDB {
504
529
  * @param {string[]} permissions - An array of permissions strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
505
530
  * @param {boolean} rowSecurity - Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a row. [Learn more about permissions](https://appwrite.io/docs/permissions).
506
531
  * @param {boolean} enabled - Is table enabled? When set to 'disabled', users cannot access the table but Server SDKs with and API key can still read and write to the table. No data is lost when this is toggled.
507
- * @param {object[]} columns - Array of column definitions to create. Each column should contain: key (string), type (string: string, integer, float, boolean, datetime, relationship), size (integer, required for string type), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
532
+ * @param {object[]} columns - Array of column definitions to create. Each column should contain: key (string), type (string: string, varchar, text, mediumtext, longtext, integer, bigint, double, boolean, datetime, point, linestring, polygon, email, url, ip, enum), size (integer, required for string and varchar types), required (boolean, optional), default (mixed, optional), array (boolean, optional), and type-specific options.
508
533
  * @param {object[]} indexes - Array of index definitions to create. Each index should contain: key (string), type (string: key, fulltext, unique, spatial), attributes (array of column keys), orders (array of ASC/DESC, optional), and lengths (array of integers, optional).
509
534
  * @throws {AppwriteException}
510
535
  * @returns {Promise<Models.Table>}
@@ -1582,11 +1607,11 @@ export declare class TablesDB {
1582
1607
  * @param {string} params.databaseId - Database ID.
1583
1608
  * @param {string} params.tableId - Table ID.
1584
1609
  * @param {string} params.relatedTableId - Related Table ID.
1585
- * @param {RelationshipType} params.type - Relation type
1610
+ * @param {RelationshipType} params.type - Relationship type. Possible values are: oneToOne, oneToMany, manyToOne, manyToMany.
1586
1611
  * @param {boolean} params.twoWay - Is Two Way?
1587
1612
  * @param {string} params.key - Column Key.
1588
1613
  * @param {string} params.twoWayKey - Two Way Column Key.
1589
- * @param {RelationMutate} params.onDelete - Constraints option
1614
+ * @param {RelationMutate} params.onDelete - Delete constraint. Possible values are: cascade, restrict, setNull.
1590
1615
  * @throws {AppwriteException}
1591
1616
  * @returns {Promise<Models.ColumnRelationship>}
1592
1617
  */
@@ -1607,11 +1632,11 @@ export declare class TablesDB {
1607
1632
  * @param {string} databaseId - Database ID.
1608
1633
  * @param {string} tableId - Table ID.
1609
1634
  * @param {string} relatedTableId - Related Table ID.
1610
- * @param {RelationshipType} type - Relation type
1635
+ * @param {RelationshipType} type - Relationship type. Possible values are: oneToOne, oneToMany, manyToOne, manyToMany.
1611
1636
  * @param {boolean} twoWay - Is Two Way?
1612
1637
  * @param {string} key - Column Key.
1613
1638
  * @param {string} twoWayKey - Two Way Column Key.
1614
- * @param {RelationMutate} onDelete - Constraints option
1639
+ * @param {RelationMutate} onDelete - Delete constraint. Possible values are: cascade, restrict, setNull.
1615
1640
  * @throws {AppwriteException}
1616
1641
  * @returns {Promise<Models.ColumnRelationship>}
1617
1642
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -1985,7 +2010,7 @@ export declare class TablesDB {
1985
2010
  * @param {string} params.databaseId - Database ID.
1986
2011
  * @param {string} params.tableId - Table ID.
1987
2012
  * @param {string} params.key - Column Key.
1988
- * @param {RelationMutate} params.onDelete - Constraints option
2013
+ * @param {RelationMutate} params.onDelete - Delete constraint. Possible values are: cascade, restrict, setNull.
1989
2014
  * @param {string} params.newKey - New Column Key.
1990
2015
  * @throws {AppwriteException}
1991
2016
  * @returns {Promise<Models.ColumnRelationship>}
@@ -2004,7 +2029,7 @@ export declare class TablesDB {
2004
2029
  * @param {string} databaseId - Database ID.
2005
2030
  * @param {string} tableId - Table ID.
2006
2031
  * @param {string} key - Column Key.
2007
- * @param {RelationMutate} onDelete - Constraints option
2032
+ * @param {RelationMutate} onDelete - Delete constraint. Possible values are: cascade, restrict, setNull.
2008
2033
  * @param {string} newKey - New Column Key.
2009
2034
  * @throws {AppwriteException}
2010
2035
  * @returns {Promise<Models.ColumnRelationship>}
@@ -232,31 +232,6 @@ export declare class Teams {
232
232
  * @deprecated Use the object parameter style method for a better developer experience.
233
233
  */
234
234
  deleteInstallation(teamId: string, installationId: string): Promise<{}>;
235
- /**
236
- * Get the team activity logs list by its unique ID.
237
- *
238
- * @param {string} params.teamId - Team ID.
239
- * @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). Only supported methods are limit and offset
240
- * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
241
- * @throws {AppwriteException}
242
- * @returns {Promise<Models.LogList>}
243
- */
244
- listLogs(params: {
245
- teamId: string;
246
- queries?: string[];
247
- total?: boolean;
248
- }): Promise<Models.LogList>;
249
- /**
250
- * Get the team activity logs list by its unique ID.
251
- *
252
- * @param {string} teamId - Team ID.
253
- * @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). Only supported methods are limit and offset
254
- * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
255
- * @throws {AppwriteException}
256
- * @returns {Promise<Models.LogList>}
257
- * @deprecated Use the object parameter style method for a better developer experience.
258
- */
259
- listLogs(teamId: string, queries?: string[], total?: boolean): Promise<Models.LogList>;
260
235
  /**
261
236
  * Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.
262
237
  *
@@ -1,9 +1,11 @@
1
1
  import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
+ import { UsageEventMetric } from '../enums/usage-event-metric';
3
4
  import { UsageInterval } from '../enums/usage-interval';
4
5
  import { UsageEventDimension } from '../enums/usage-event-dimension';
5
6
  import { UsageOrderBy } from '../enums/usage-order-by';
6
7
  import { UsageOrderDirection } from '../enums/usage-order-direction';
8
+ import { UsageGaugeMetric } from '../enums/usage-gauge-metric';
7
9
  import { UsageGaugeDimension } from '../enums/usage-gauge-dimension';
8
10
  export declare class Usage {
9
11
  client: Client;
@@ -17,10 +19,10 @@ export declare class Usage {
17
19
  *
18
20
  * `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).
19
21
  *
20
- * @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. On console: `metrics[]=affiliates.clicks`.
21
- * @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"])`.
22
+ * @param {(UsageEventMetric | (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. On console: `metrics[]=affiliates.clicks`.
23
+ * @param {string[]} params.queries - Up to 10 filter queries in Utopia syntax. Allowed attributes, also published as the `UsageEventDimension` enum: path, method, status, service, resourceType, resourceId, teamId, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion, isp, autonomousSystemNumber, autonomousSystemOrganization, connectionType, connectionUsageType, connectionOrganization. Allowed methods: equal, notEqual, contains, startsWith, endsWith, isNull, isNotNull. Example: `queries[]=equal("resourceType", ["bucket"])`.
22
24
  * @param {UsageInterval} params.interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
23
- * @param {UsageEventDimension[]} 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.
25
+ * @param {UsageEventDimension[]} 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, isp, autonomousSystemNumber, autonomousSystemOrganization, connectionType, connectionUsageType, connectionOrganization.
24
26
  * @param {string} params.startAt - Range start in ISO 8601. Defaults adapt to interval (7d for the no-interval aggregate).
25
27
  * @param {string} params.endAt - Range end in ISO 8601. Defaults to the current time.
26
28
  * @param {UsageOrderBy} params.orderBy - Column to order by. Allowed: time, value. Default time when an interval is set; otherwise value.
@@ -31,7 +33,7 @@ export declare class Usage {
31
33
  * @returns {Promise<Models.UsageEventList>}
32
34
  */
33
35
  listEvents(params: {
34
- metrics: string[];
36
+ metrics: (UsageEventMetric | (string & {}))[];
35
37
  queries?: string[];
36
38
  interval?: UsageInterval;
37
39
  dimensions?: UsageEventDimension[];
@@ -51,10 +53,10 @@ export declare class Usage {
51
53
  *
52
54
  * `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).
53
55
  *
54
- * @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. On console: `metrics[]=affiliates.clicks`.
55
- * @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"])`.
56
+ * @param {(UsageEventMetric | (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. On console: `metrics[]=affiliates.clicks`.
57
+ * @param {string[]} queries - Up to 10 filter queries in Utopia syntax. Allowed attributes, also published as the `UsageEventDimension` enum: path, method, status, service, resourceType, resourceId, teamId, country, continentCode, city, region, hostname, ip, osName, clientType, clientName, deviceName, sdk, sdkVersion, isp, autonomousSystemNumber, autonomousSystemOrganization, connectionType, connectionUsageType, connectionOrganization. Allowed methods: equal, notEqual, contains, startsWith, endsWith, isNull, isNotNull. Example: `queries[]=equal("resourceType", ["bucket"])`.
56
58
  * @param {UsageInterval} interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
57
- * @param {UsageEventDimension[]} 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.
59
+ * @param {UsageEventDimension[]} 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, isp, autonomousSystemNumber, autonomousSystemOrganization, connectionType, connectionUsageType, connectionOrganization.
58
60
  * @param {string} startAt - Range start in ISO 8601. Defaults adapt to interval (7d for the no-interval aggregate).
59
61
  * @param {string} endAt - Range end in ISO 8601. Defaults to the current time.
60
62
  * @param {UsageOrderBy} orderBy - Column to order by. Allowed: time, value. Default time when an interval is set; otherwise value.
@@ -65,7 +67,7 @@ export declare class Usage {
65
67
  * @returns {Promise<Models.UsageEventList>}
66
68
  * @deprecated Use the object parameter style method for a better developer experience.
67
69
  */
68
- listEvents(metrics: string[], queries?: string[], interval?: UsageInterval, dimensions?: UsageEventDimension[], startAt?: string, endAt?: string, orderBy?: UsageOrderBy, orderDir?: UsageOrderDirection, limit?: number, offset?: number): Promise<Models.UsageEventList>;
70
+ listEvents(metrics: (UsageEventMetric | (string & {}))[], queries?: string[], interval?: UsageInterval, dimensions?: UsageEventDimension[], startAt?: string, endAt?: string, orderBy?: UsageOrderBy, orderDir?: UsageOrderDirection, limit?: number, offset?: number): Promise<Models.UsageEventList>;
69
71
  /**
70
72
  * Aggregate usage gauge snapshots. Gauges are point-in-time values (storage totals, resource counts, …); each point carries the latest snapshot in its interval via `argMax(value, time)`. `metrics[]` (1-10) is required; the response always contains one entry per requested metric, each with its own `points[]` time series.
71
73
  *
@@ -77,8 +79,10 @@ export declare class Usage {
77
79
  *
78
80
  * `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. It is a stable per-node identity, not a role — ordinal 0 is the first member created, and a failover can leave the primary on any ordinal, so read the role from the database's replicas endpoint rather than inferring it here. `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).
79
81
  *
80
- * @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.
81
- * @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"])`.
82
+ * `aggregate` selects how the samples in a bucket are combined: `last` (default) is the latest reading — correct for a snapshot such as storage — while `max` is the highest reading. Use `max` for a sampled level series: peak concurrent realtime connections is `metrics[]=realtime.connections&aggregate=max`, at whatever `interval` the chart needs, since the peak of a set of samples is just the max of their per-bucket maxima. `realtime.connections` is served only here - it is a concurrency level, not a countable event, so `/v1/usage/events` rejects it.
83
+ *
84
+ * @param {(UsageGaugeMetric | (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.
85
+ * @param {string[]} params.queries - Up to 10 filter queries in Utopia syntax. Allowed attributes, also published as the `UsageGaugeDimension` enum: service, resourceType, resourceId, teamId, ordinal. Allowed methods: equal, notEqual, isNull, isNotNull. Example: `queries[]=equal("resourceType", ["bucket"])`.
82
86
  * @param {UsageInterval} params.interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
83
87
  * @param {UsageGaugeDimension[]} params.dimensions - Break-down dimensions. Allowed: resourceId, teamId, service, resourceType, ordinal.
84
88
  * @param {string} params.startAt - Range start in ISO 8601. Defaults to endAt - 7d.
@@ -87,11 +91,12 @@ export declare class Usage {
87
91
  * @param {UsageOrderDirection} params.orderDir - Sort direction: asc or desc. Default desc — paired with the default limit, this returns the most recent groups first. Pass asc for chronological charting.
88
92
  * @param {number} params.limit - Maximum rows to return (1-5000).
89
93
  * @param {number} params.offset - Pagination offset (0-100000).
94
+ * @param {string} params.aggregate - How to combine the samples in each bucket. `last` (default) returns the latest reading — the right answer for a snapshot such as storage. `max` returns the highest reading, which is what a sampled level series needs: peak concurrent realtime connections is the max of `realtime.connections` over the window.
90
95
  * @throws {AppwriteException}
91
96
  * @returns {Promise<Models.UsageGaugeList>}
92
97
  */
93
98
  listGauges(params: {
94
- metrics: string[];
99
+ metrics: (UsageGaugeMetric | (string & {}))[];
95
100
  queries?: string[];
96
101
  interval?: UsageInterval;
97
102
  dimensions?: UsageGaugeDimension[];
@@ -101,6 +106,7 @@ export declare class Usage {
101
106
  orderDir?: UsageOrderDirection;
102
107
  limit?: number;
103
108
  offset?: number;
109
+ aggregate?: string;
104
110
  }): Promise<Models.UsageGaugeList>;
105
111
  /**
106
112
  * Aggregate usage gauge snapshots. Gauges are point-in-time values (storage totals, resource counts, …); each point carries the latest snapshot in its interval via `argMax(value, time)`. `metrics[]` (1-10) is required; the response always contains one entry per requested metric, each with its own `points[]` time series.
@@ -113,8 +119,10 @@ export declare class Usage {
113
119
  *
114
120
  * `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. It is a stable per-node identity, not a role — ordinal 0 is the first member created, and a failover can leave the primary on any ordinal, so read the role from the database's replicas endpoint rather than inferring it here. `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).
115
121
  *
116
- * @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.
117
- * @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"])`.
122
+ * `aggregate` selects how the samples in a bucket are combined: `last` (default) is the latest reading — correct for a snapshot such as storage — while `max` is the highest reading. Use `max` for a sampled level series: peak concurrent realtime connections is `metrics[]=realtime.connections&aggregate=max`, at whatever `interval` the chart needs, since the peak of a set of samples is just the max of their per-bucket maxima. `realtime.connections` is served only here - it is a concurrency level, not a countable event, so `/v1/usage/events` rejects it.
123
+ *
124
+ * @param {(UsageGaugeMetric | (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.
125
+ * @param {string[]} queries - Up to 10 filter queries in Utopia syntax. Allowed attributes, also published as the `UsageGaugeDimension` enum: service, resourceType, resourceId, teamId, ordinal. Allowed methods: equal, notEqual, isNull, isNotNull. Example: `queries[]=equal("resourceType", ["bucket"])`.
118
126
  * @param {UsageInterval} interval - Time interval size. Omit (null) for a flat aggregate over the whole window. Allowed: 1m, 15m, 30m, 1h, 1d.
119
127
  * @param {UsageGaugeDimension[]} dimensions - Break-down dimensions. Allowed: resourceId, teamId, service, resourceType, ordinal.
120
128
  * @param {string} startAt - Range start in ISO 8601. Defaults to endAt - 7d.
@@ -123,9 +131,10 @@ export declare class Usage {
123
131
  * @param {UsageOrderDirection} orderDir - Sort direction: asc or desc. Default desc — paired with the default limit, this returns the most recent groups first. Pass asc for chronological charting.
124
132
  * @param {number} limit - Maximum rows to return (1-5000).
125
133
  * @param {number} offset - Pagination offset (0-100000).
134
+ * @param {string} aggregate - How to combine the samples in each bucket. `last` (default) returns the latest reading — the right answer for a snapshot such as storage. `max` returns the highest reading, which is what a sampled level series needs: peak concurrent realtime connections is the max of `realtime.connections` over the window.
126
135
  * @throws {AppwriteException}
127
136
  * @returns {Promise<Models.UsageGaugeList>}
128
137
  * @deprecated Use the object parameter style method for a better developer experience.
129
138
  */
130
- listGauges(metrics: string[], queries?: string[], interval?: UsageInterval, dimensions?: UsageGaugeDimension[], startAt?: string, endAt?: string, orderBy?: UsageOrderBy, orderDir?: UsageOrderDirection, limit?: number, offset?: number): Promise<Models.UsageGaugeList>;
139
+ listGauges(metrics: (UsageGaugeMetric | (string & {}))[], queries?: string[], interval?: UsageInterval, dimensions?: UsageGaugeDimension[], startAt?: string, endAt?: string, orderBy?: UsageOrderBy, orderDir?: UsageOrderDirection, limit?: number, offset?: number, aggregate?: string): Promise<Models.UsageGaugeList>;
131
140
  }
@@ -10,7 +10,7 @@ export declare class Users {
10
10
  /**
11
11
  * Get a list of all the project's users. You can use the query params to filter your results.
12
12
  *
13
- * @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. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator, accessedAt
13
+ * @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. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, passwordPwned, labels, impersonator, accessedAt
14
14
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
15
15
  * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
16
16
  * @throws {AppwriteException}
@@ -24,7 +24,7 @@ export declare class Users {
24
24
  /**
25
25
  * Get a list of all the project's users. You can use the query params to filter your results.
26
26
  *
27
- * @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. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator, accessedAt
27
+ * @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. You may filter on the following attributes: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, passwordPwned, labels, impersonator, accessedAt
28
28
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
29
29
  * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
30
30
  * @throws {AppwriteException}
@@ -439,7 +439,7 @@ export declare class Users {
439
439
  * Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.
440
440
  *
441
441
  * @param {string} params.userId - User ID.
442
- * @param {string} params.sessionId - Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.
442
+ * @param {string} params.sessionId - Session ID. Use the string 'recent()' to use the most recent session, which is also the default.
443
443
  * @param {number} params.duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
444
444
  * @throws {AppwriteException}
445
445
  * @returns {Promise<Models.Jwt>}
@@ -453,7 +453,7 @@ export declare class Users {
453
453
  * Use this endpoint to create a JSON Web Token for user by its unique ID. You can use the resulting JWT to authenticate on behalf of the user. The JWT secret will become invalid if the session it uses gets deleted.
454
454
  *
455
455
  * @param {string} userId - User ID.
456
- * @param {string} sessionId - Session ID. Use the string 'recent' to use the most recent session. Defaults to the most recent session.
456
+ * @param {string} sessionId - Session ID. Use the string 'recent()' to use the most recent session, which is also the default.
457
457
  * @param {number} duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
458
458
  * @throws {AppwriteException}
459
459
  * @returns {Promise<Models.Jwt>}
@@ -486,31 +486,6 @@ export declare class Users {
486
486
  * @deprecated Use the object parameter style method for a better developer experience.
487
487
  */
488
488
  updateLabels<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, labels: string[]): Promise<Models.User<Preferences>>;
489
- /**
490
- * Get the user activity logs list by its unique ID.
491
- *
492
- * @param {string} params.userId - User ID.
493
- * @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). Only supported methods are limit and offset
494
- * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
495
- * @throws {AppwriteException}
496
- * @returns {Promise<Models.LogList>}
497
- */
498
- listLogs(params: {
499
- userId: string;
500
- queries?: string[];
501
- total?: boolean;
502
- }): Promise<Models.LogList>;
503
- /**
504
- * Get the user activity logs list by its unique ID.
505
- *
506
- * @param {string} userId - User ID.
507
- * @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). Only supported methods are limit and offset
508
- * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
509
- * @throws {AppwriteException}
510
- * @returns {Promise<Models.LogList>}
511
- * @deprecated Use the object parameter style method for a better developer experience.
512
- */
513
- listLogs(userId: string, queries?: string[], total?: boolean): Promise<Models.LogList>;
514
489
  /**
515
490
  * Get the user membership list by its unique ID.
516
491
  *
@@ -629,6 +604,28 @@ export declare class Users {
629
604
  * @deprecated Use the object parameter style method for a better developer experience.
630
605
  */
631
606
  deleteMFAAuthenticator(userId: string, type: AuthenticatorType): Promise<{}>;
607
+ /**
608
+ * Get a custom MFA challenge for a user, including the code to be delivered through your own channel.
609
+ *
610
+ * @param {string} params.userId - User ID.
611
+ * @param {string} params.challengeId - ID of the challenge.
612
+ * @throws {AppwriteException}
613
+ * @returns {Promise<Models.MfaChallengeSecret>}
614
+ */
615
+ getMFAChallenge(params: {
616
+ userId: string;
617
+ challengeId: string;
618
+ }): Promise<Models.MfaChallengeSecret>;
619
+ /**
620
+ * Get a custom MFA challenge for a user, including the code to be delivered through your own channel.
621
+ *
622
+ * @param {string} userId - User ID.
623
+ * @param {string} challengeId - ID of the challenge.
624
+ * @throws {AppwriteException}
625
+ * @returns {Promise<Models.MfaChallengeSecret>}
626
+ * @deprecated Use the object parameter style method for a better developer experience.
627
+ */
628
+ getMFAChallenge(userId: string, challengeId: string): Promise<Models.MfaChallengeSecret>;
632
629
  /**
633
630
  * List the factors available on the account to be used as a MFA challange.
634
631
  *