@appwrite.io/console 16.0.0 → 16.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +5 -6
  2. package/dist/cjs/package.json +1 -1
  3. package/dist/cjs/sdk.js +8031 -4529
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/package.json +1 -1
  6. package/dist/esm/sdk.js +8032 -4530
  7. package/dist/esm/sdk.js.map +1 -1
  8. package/dist/iife/sdk.js +8031 -4529
  9. package/package.json +59 -50
  10. package/types/client.d.ts +2 -2
  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/build-runtime.d.ts +4 -1
  14. package/types/enums/embedding-model.d.ts +1 -3
  15. package/types/enums/execution-resource-type.d.ts +4 -0
  16. package/types/enums/image-gravity.d.ts +1 -0
  17. package/types/enums/o-auth-provider.d.ts +5 -0
  18. package/types/enums/project-key-scopes.d.ts +19 -3
  19. package/types/enums/project-o-auth-provider-id.d.ts +5 -0
  20. package/types/enums/project-policy-id.d.ts +1 -0
  21. package/types/enums/query-suggestion-resource.d.ts +2 -1
  22. package/types/enums/runtime.d.ts +4 -1
  23. package/types/enums/usage-event-dimension.d.ts +7 -1
  24. package/types/enums/usage-event-metric.d.ts +55 -0
  25. package/types/enums/usage-gauge-metric.d.ts +50 -0
  26. package/types/index.d.ts +10 -5
  27. package/types/models.d.ts +548 -276
  28. package/types/services/account.d.ts +14 -14
  29. package/types/services/apps.d.ts +6 -6
  30. package/types/services/avatars.d.ts +44 -0
  31. package/types/services/databases.d.ts +8 -8
  32. package/types/services/documents-db.d.ts +13 -7
  33. package/types/services/domains.d.ts +82 -54
  34. package/types/services/functions.d.ts +6 -6
  35. package/types/services/mongo.d.ts +17 -23
  36. package/types/services/mysql.d.ts +17 -23
  37. package/types/services/organizations.d.ts +5 -5
  38. package/types/services/postgresql.d.ts +17 -23
  39. package/types/services/project.d.ts +171 -15
  40. package/types/services/sites.d.ts +15 -8
  41. package/types/services/storage.d.ts +6 -6
  42. package/types/services/tables-db.d.ts +37 -12
  43. package/types/services/usage.d.ts +23 -14
  44. package/types/services/users.d.ts +24 -2
  45. package/types/services/vectors-db.d.ts +15 -9
  46. package/types/services/waf.d.ts +11 -2
@@ -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>}
@@ -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
  }
@@ -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>}
@@ -629,6 +629,28 @@ export declare class Users {
629
629
  * @deprecated Use the object parameter style method for a better developer experience.
630
630
  */
631
631
  deleteMFAAuthenticator(userId: string, type: AuthenticatorType): Promise<{}>;
632
+ /**
633
+ * Get a custom MFA challenge for a user, including the code to be delivered through your own channel.
634
+ *
635
+ * @param {string} params.userId - User ID.
636
+ * @param {string} params.challengeId - ID of the challenge.
637
+ * @throws {AppwriteException}
638
+ * @returns {Promise<Models.MfaChallengeSecret>}
639
+ */
640
+ getMFAChallenge(params: {
641
+ userId: string;
642
+ challengeId: string;
643
+ }): Promise<Models.MfaChallengeSecret>;
644
+ /**
645
+ * Get a custom MFA challenge for a user, including the code to be delivered through your own channel.
646
+ *
647
+ * @param {string} userId - User ID.
648
+ * @param {string} challengeId - ID of the challenge.
649
+ * @throws {AppwriteException}
650
+ * @returns {Promise<Models.MfaChallengeSecret>}
651
+ * @deprecated Use the object parameter style method for a better developer experience.
652
+ */
653
+ getMFAChallenge(userId: string, challengeId: string): Promise<Models.MfaChallengeSecret>;
632
654
  /**
633
655
  * List the factors available on the account to be used as a MFA challange.
634
656
  *
@@ -64,7 +64,7 @@ export declare class VectorsDB {
64
64
  */
65
65
  create(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number, syncMode?: string): Promise<Models.Database>;
66
66
  /**
67
- * 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.
67
+ * 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.
68
68
  *
69
69
  * @throws {AppwriteException}
70
70
  * @returns {Promise<Models.DedicatedDatabaseSpecificationList>}
@@ -416,7 +416,7 @@ export declare class VectorsDB {
416
416
  *
417
417
  * @param {string} params.databaseId - Database ID.
418
418
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
419
- * @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.
419
+ * @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 524288 characters long.
420
420
  * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
421
421
  * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
422
422
  * @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
@@ -436,7 +436,7 @@ export declare class VectorsDB {
436
436
  *
437
437
  * @param {string} databaseId - Database ID.
438
438
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
439
- * @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.
439
+ * @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 524288 characters long.
440
440
  * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
441
441
  * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
442
442
  * @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
@@ -453,6 +453,7 @@ export declare class VectorsDB {
453
453
  * @param {string} params.documentId - Document 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.
454
454
  * @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>} params.data - Document data as JSON object.
455
455
  * @param {string[]} params.permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
456
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
456
457
  * @throws {AppwriteException}
457
458
  * @returns {Promise<Document>}
458
459
  */
@@ -462,6 +463,7 @@ export declare class VectorsDB {
462
463
  documentId: string;
463
464
  data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>;
464
465
  permissions?: string[];
466
+ transactionId?: string;
465
467
  }): Promise<Document>;
466
468
  /**
467
469
  * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
@@ -471,17 +473,19 @@ export declare class VectorsDB {
471
473
  * @param {string} documentId - Document 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.
472
474
  * @param {Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>} data - Document data as JSON object.
473
475
  * @param {string[]} permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
476
+ * @param {string} transactionId - Transaction ID for staging the operation.
474
477
  * @throws {AppwriteException}
475
478
  * @returns {Promise<Document>}
476
479
  * @deprecated Use the object parameter style method for a better developer experience.
477
480
  */
478
- createDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>, permissions?: string[]): Promise<Document>;
481
+ createDocument<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, data: Document extends Models.DefaultDocument ? Partial<Models.Document> & Record<string, any> : Partial<Models.Document> & Omit<Document, keyof Models.Document>, permissions?: string[], transactionId?: string): Promise<Document>;
479
482
  /**
480
483
  * Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
481
484
  *
482
485
  * @param {string} params.databaseId - Database ID.
483
486
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
484
487
  * @param {object[]} params.documents - Array of documents data as JSON objects.
488
+ * @param {string} params.transactionId - Transaction ID for staging the operation.
485
489
  * @throws {AppwriteException}
486
490
  * @returns {Promise<Models.DocumentList<Document>>}
487
491
  */
@@ -489,6 +493,7 @@ export declare class VectorsDB {
489
493
  databaseId: string;
490
494
  collectionId: string;
491
495
  documents: object[];
496
+ transactionId?: string;
492
497
  }): Promise<Models.DocumentList<Document>>;
493
498
  /**
494
499
  * Create new Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
@@ -496,11 +501,12 @@ export declare class VectorsDB {
496
501
  * @param {string} databaseId - Database ID.
497
502
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.
498
503
  * @param {object[]} documents - Array of documents data as JSON objects.
504
+ * @param {string} transactionId - Transaction ID for staging the operation.
499
505
  * @throws {AppwriteException}
500
506
  * @returns {Promise<Models.DocumentList<Document>>}
501
507
  * @deprecated Use the object parameter style method for a better developer experience.
502
508
  */
503
- createDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[]): Promise<Models.DocumentList<Document>>;
509
+ createDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documents: object[], transactionId?: string): Promise<Models.DocumentList<Document>>;
504
510
  /**
505
511
  * Create or update Documents. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#documentsDBCreateCollection) API or directly from your database console.
506
512
  *
@@ -596,7 +602,7 @@ export declare class VectorsDB {
596
602
  *
597
603
  * @param {string} params.databaseId - Database ID.
598
604
  * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
599
- * @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.
605
+ * @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 524288 characters long.
600
606
  * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
601
607
  * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
602
608
  * @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
@@ -617,7 +623,7 @@ export declare class VectorsDB {
617
623
  *
618
624
  * @param {string} databaseId - Database ID.
619
625
  * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
620
- * @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.
626
+ * @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 524288 characters long.
621
627
  * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
622
628
  * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
623
629
  * @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
@@ -871,7 +877,7 @@ export declare class VectorsDB {
871
877
  */
872
878
  deleteIndex(databaseId: string, collectionId: string, key: string): Promise<{}>;
873
879
  /**
874
- * 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.
880
+ * 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.
875
881
  *
876
882
  * @param {string} params.databaseId - Database ID.
877
883
  * @param {string} params.targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -883,7 +889,7 @@ export declare class VectorsDB {
883
889
  targetReplicaId?: string;
884
890
  }): Promise<Models.DedicatedDatabase>;
885
891
  /**
886
- * 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.
892
+ * 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.
887
893
  *
888
894
  * @param {string} databaseId - Database ID.
889
895
  * @param {string} targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -312,6 +312,8 @@ export declare class Waf {
312
312
  * @param {string} params.resourceId - Resource identifier. Required for functions and sites.
313
313
  * @param {string} params.description - Optional description for the rule.
314
314
  * @param {string} params.key - Rate limit key. Use `ip` to limit per client IP or `userId` to limit per authenticated user. Requests without an authenticated user skip `userId` rules.
315
+ * @param {string} params.strategy - Rate limit strategy. `fixedWindow` counts requests in discrete intervals, `slidingWindow` weights the previous interval for smoother limiting, and `tokenBucket` refills allowance continuously to permit short bursts.
316
+ * @param {number} params.maxBucketSize - Maximum number of tokens the bucket can hold for the `tokenBucket` strategy, controlling how large a burst is allowed. The sustained refill rate is `limit / interval`. Defaults to `limit` when omitted. Ignored by other strategies.
315
317
  * @param {number} params.priority - Evaluation priority. Lower numbers run earlier.
316
318
  * @param {boolean} params.enabled - Set to false to create the rule in a disabled state.
317
319
  * @param {string} params.conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
@@ -327,6 +329,8 @@ export declare class Waf {
327
329
  resourceId?: string;
328
330
  description?: string;
329
331
  key?: string;
332
+ strategy?: string;
333
+ maxBucketSize?: number;
330
334
  priority?: number;
331
335
  enabled?: boolean;
332
336
  conditions?: string;
@@ -343,6 +347,8 @@ export declare class Waf {
343
347
  * @param {string} resourceId - Resource identifier. Required for functions and sites.
344
348
  * @param {string} description - Optional description for the rule.
345
349
  * @param {string} key - Rate limit key. Use `ip` to limit per client IP or `userId` to limit per authenticated user. Requests without an authenticated user skip `userId` rules.
350
+ * @param {string} strategy - Rate limit strategy. `fixedWindow` counts requests in discrete intervals, `slidingWindow` weights the previous interval for smoother limiting, and `tokenBucket` refills allowance continuously to permit short bursts.
351
+ * @param {number} maxBucketSize - Maximum number of tokens the bucket can hold for the `tokenBucket` strategy, controlling how large a burst is allowed. The sustained refill rate is `limit / interval`. Defaults to `limit` when omitted. Ignored by other strategies.
346
352
  * @param {number} priority - Evaluation priority. Lower numbers run earlier.
347
353
  * @param {boolean} enabled - Set to false to create the rule in a disabled state.
348
354
  * @param {string} conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
@@ -350,7 +356,7 @@ export declare class Waf {
350
356
  * @returns {Promise<Models.WafRuleRateLimit>}
351
357
  * @deprecated Use the object parameter style method for a better developer experience.
352
358
  */
353
- createRateLimitRule(ruleId: string, resourceType: string, name: string, limit: number, interval: number, resourceId?: string, description?: string, key?: string, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleRateLimit>;
359
+ createRateLimitRule(ruleId: string, resourceType: string, name: string, limit: number, interval: number, resourceId?: string, description?: string, key?: string, strategy?: string, maxBucketSize?: number, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleRateLimit>;
354
360
  /**
355
361
  * Update a rate limit WAF rule. Use `key` to choose the counter: `ip` limits per client IP, while `userId` limits per authenticated user (requests without an authenticated user skip `userId` rules). Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
356
362
  *
@@ -363,6 +369,7 @@ export declare class Waf {
363
369
  * @param {number} params.limit - Maximum number of matching requests allowed in the configured interval.
364
370
  * @param {number} params.interval - Interval in seconds used for rate limiting.
365
371
  * @param {string} params.key - Rate limit key. Use `ip` to limit per client IP or `userId` to limit per authenticated user. Requests without an authenticated user skip `userId` rules.
372
+ * @param {number} params.maxBucketSize - Maximum number of tokens the bucket can hold for the `tokenBucket` strategy, controlling how large a burst is allowed. The sustained refill rate is `limit / interval`. Ignored by other strategies. The strategy itself cannot be changed after creation.
366
373
  * @param {number} params.priority - Evaluation priority. Lower numbers run earlier.
367
374
  * @param {boolean} params.enabled - Set to false to disable the rule.
368
375
  * @param {string} params.conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
@@ -378,6 +385,7 @@ export declare class Waf {
378
385
  limit?: number;
379
386
  interval?: number;
380
387
  key?: string;
388
+ maxBucketSize?: number;
381
389
  priority?: number;
382
390
  enabled?: boolean;
383
391
  conditions?: string;
@@ -394,6 +402,7 @@ export declare class Waf {
394
402
  * @param {number} limit - Maximum number of matching requests allowed in the configured interval.
395
403
  * @param {number} interval - Interval in seconds used for rate limiting.
396
404
  * @param {string} key - Rate limit key. Use `ip` to limit per client IP or `userId` to limit per authenticated user. Requests without an authenticated user skip `userId` rules.
405
+ * @param {number} maxBucketSize - Maximum number of tokens the bucket can hold for the `tokenBucket` strategy, controlling how large a burst is allowed. The sustained refill rate is `limit / interval`. Ignored by other strategies. The strategy itself cannot be changed after creation.
397
406
  * @param {number} priority - Evaluation priority. Lower numbers run earlier.
398
407
  * @param {boolean} enabled - Set to false to disable the rule.
399
408
  * @param {string} conditions - Array of condition strings generated using the WAF Condition builder. Maximum of 100 conditions are allowed, each 4096 characters long.
@@ -401,7 +410,7 @@ export declare class Waf {
401
410
  * @returns {Promise<Models.WafRuleRateLimit>}
402
411
  * @deprecated Use the object parameter style method for a better developer experience.
403
412
  */
404
- updateRateLimitRule(ruleId: string, resourceType?: string, resourceId?: string, name?: string, description?: string, limit?: number, interval?: number, key?: string, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleRateLimit>;
413
+ updateRateLimitRule(ruleId: string, resourceType?: string, resourceId?: string, name?: string, description?: string, limit?: number, interval?: number, key?: string, maxBucketSize?: number, priority?: number, enabled?: boolean, conditions?: string): Promise<Models.WafRuleRateLimit>;
405
414
  /**
406
415
  * Create a redirect WAF rule. Conditions can match request attributes including `ip` (plain IPs or CIDR blocks like `10.0.0.0/8`), `method`, `path`, `host`, `country`, `continent`, `headers.<name>`, `query.<key>`, `queryKeys`, `userAgent`, `os`, `osVersion`, `browser`, and `browserVersion`. Conditions on `city` and `state` require the premium Geo DB addon.
407
416
  *