@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
@@ -31,7 +31,6 @@ export declare class Mongo {
31
31
  * @param {string} params.specification - Specification identifier. Drives the allocated CPU, memory, storage, storage class, and connection ceiling.
32
32
  * @param {number} params.replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
33
33
  * @param {string} params.syncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
34
- * @param {string} params.standbyRegion - Standby region for a cross-region replica. When set, a replica is provisioned in this region for cross-region high availability. Must differ from the database region.
35
34
  * @param {number} params.networkIdleTimeoutSeconds - Connection idle timeout in seconds.
36
35
  * @param {string[]} params.networkIPAllowlist - IP addresses/CIDR ranges allowed to connect.
37
36
  * @param {number} params.idleTimeoutMinutes - Minutes of inactivity before container scales to zero.
@@ -39,7 +38,7 @@ export declare class Mongo {
39
38
  * @param {number} params.pitrRetentionDays - Number of days to retain PITR data.
40
39
  * @param {boolean} params.storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
41
40
  * @param {number} params.storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
42
- * @param {number} params.storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
41
+ * @param {number} params.storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. Defaults to 3 times the specification's storage. 0 means no limit.
43
42
  * @throws {AppwriteException}
44
43
  * @returns {Promise<Models.DedicatedDatabase>}
45
44
  */
@@ -50,7 +49,6 @@ export declare class Mongo {
50
49
  specification?: string;
51
50
  replicas?: number;
52
51
  syncMode?: string;
53
- standbyRegion?: string;
54
52
  networkIdleTimeoutSeconds?: number;
55
53
  networkIPAllowlist?: string[];
56
54
  idleTimeoutMinutes?: number;
@@ -69,7 +67,6 @@ export declare class Mongo {
69
67
  * @param {string} specification - Specification identifier. Drives the allocated CPU, memory, storage, storage class, and connection ceiling.
70
68
  * @param {number} replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
71
69
  * @param {string} syncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
72
- * @param {string} standbyRegion - Standby region for a cross-region replica. When set, a replica is provisioned in this region for cross-region high availability. Must differ from the database region.
73
70
  * @param {number} networkIdleTimeoutSeconds - Connection idle timeout in seconds.
74
71
  * @param {string[]} networkIPAllowlist - IP addresses/CIDR ranges allowed to connect.
75
72
  * @param {number} idleTimeoutMinutes - Minutes of inactivity before container scales to zero.
@@ -77,14 +74,14 @@ export declare class Mongo {
77
74
  * @param {number} pitrRetentionDays - Number of days to retain PITR data.
78
75
  * @param {boolean} storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
79
76
  * @param {number} storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
80
- * @param {number} storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
77
+ * @param {number} storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. Defaults to 3 times the specification's storage. 0 means no limit.
81
78
  * @throws {AppwriteException}
82
79
  * @returns {Promise<Models.DedicatedDatabase>}
83
80
  * @deprecated Use the object parameter style method for a better developer experience.
84
81
  */
85
- create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number): Promise<Models.DedicatedDatabase>;
82
+ create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number): Promise<Models.DedicatedDatabase>;
86
83
  /**
87
- * 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.
84
+ * 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.
88
85
  *
89
86
  * @throws {AppwriteException}
90
87
  * @returns {Promise<Models.DedicatedDatabaseSpecificationList>}
@@ -118,8 +115,6 @@ export declare class Mongo {
118
115
  * @param {string} params.specification - Specification. Changes cpu, memory, storage, connection ceiling, and node pool based on specification config. Resource changes are applied via rolling cutover with zero downtime.
119
116
  * @param {number} params.replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
120
117
  * @param {string} params.syncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
121
- * @param {number} params.crossRegionReplicas - Number of cross-region standby replicas (0-1). Cross-region replication is enabled when greater than 0.
122
- * @param {string} params.standbyRegion - Standby region for the cross-region replica. Required when enabling cross-region replication and no standby region is already configured. Must differ from the database region.
123
118
  * @param {number} params.networkIdleTimeoutSeconds - Connection idle timeout in seconds (60-86400).
124
119
  * @param {string[]} params.networkIPAllowlist - IP addresses/CIDR ranges allowed to connect.
125
120
  * @param {number} params.idleTimeoutMinutes - Minutes before container scales to zero.
@@ -145,8 +140,6 @@ export declare class Mongo {
145
140
  specification?: string;
146
141
  replicas?: number;
147
142
  syncMode?: string;
148
- crossRegionReplicas?: number;
149
- standbyRegion?: string;
150
143
  networkIdleTimeoutSeconds?: number;
151
144
  networkIPAllowlist?: string[];
152
145
  idleTimeoutMinutes?: number;
@@ -172,8 +165,6 @@ export declare class Mongo {
172
165
  * @param {string} specification - Specification. Changes cpu, memory, storage, connection ceiling, and node pool based on specification config. Resource changes are applied via rolling cutover with zero downtime.
173
166
  * @param {number} replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
174
167
  * @param {string} syncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
175
- * @param {number} crossRegionReplicas - Number of cross-region standby replicas (0-1). Cross-region replication is enabled when greater than 0.
176
- * @param {string} standbyRegion - Standby region for the cross-region replica. Required when enabling cross-region replication and no standby region is already configured. Must differ from the database region.
177
168
  * @param {number} networkIdleTimeoutSeconds - Connection idle timeout in seconds (60-86400).
178
169
  * @param {string[]} networkIPAllowlist - IP addresses/CIDR ranges allowed to connect.
179
170
  * @param {number} idleTimeoutMinutes - Minutes before container scales to zero.
@@ -193,7 +184,7 @@ export declare class Mongo {
193
184
  * @returns {Promise<Models.DedicatedDatabase>}
194
185
  * @deprecated Use the object parameter style method for a better developer experience.
195
186
  */
196
- update(databaseId: string, name?: string, status?: string, specification?: string, replicas?: number, syncMode?: string, crossRegionReplicas?: number, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number, metricsTraceSampleRate?: number, metricsSlowQueryLogThresholdMs?: number, sqlApiEnabled?: boolean, sqlApiAllowedStatements?: string[], sqlApiMaxRows?: number, sqlApiMaxBytes?: number, sqlApiTimeoutSeconds?: number): Promise<Models.DedicatedDatabase>;
187
+ update(databaseId: string, name?: string, status?: string, specification?: string, replicas?: number, syncMode?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number, metricsTraceSampleRate?: number, metricsSlowQueryLogThresholdMs?: number, sqlApiEnabled?: boolean, sqlApiAllowedStatements?: string[], sqlApiMaxRows?: number, sqlApiMaxBytes?: number, sqlApiTimeoutSeconds?: number): Promise<Models.DedicatedDatabase>;
197
188
  /**
198
189
  * Delete a dedicated database. This action is irreversible. The database status will be set to 'deleting' and all resources will be cleaned up. Deletion is allowed from any state, and repeating the call re-dispatches the cleanup.
199
190
  *
@@ -545,26 +536,26 @@ export declare class Mongo {
545
536
  */
546
537
  deleteBranch(databaseId: string, branchId: string): Promise<Models.DedicatedDatabase>;
547
538
  /**
548
- * Rotate the primary connection credentials for a dedicated database. Generates a new password and updates the database atomically. Previous credentials stop working immediately. Returns the database with a refreshed connection string carrying the new password.
539
+ * Queue a rotation of the primary connection credentials for a dedicated database. A hibernated database is woken by the worker before rotation. List database operations until the returned operation reaches a terminal status, then fetch the database again for the refreshed connection string.
549
540
  *
550
541
  * @param {string} params.databaseId - Database ID.
551
542
  * @throws {AppwriteException}
552
- * @returns {Promise<Models.DedicatedDatabase>}
543
+ * @returns {Promise<Models.DedicatedDatabaseOperation>}
553
544
  */
554
545
  updateCredentials(params: {
555
546
  databaseId: string;
556
- }): Promise<Models.DedicatedDatabase>;
547
+ }): Promise<Models.DedicatedDatabaseOperation>;
557
548
  /**
558
- * Rotate the primary connection credentials for a dedicated database. Generates a new password and updates the database atomically. Previous credentials stop working immediately. Returns the database with a refreshed connection string carrying the new password.
549
+ * Queue a rotation of the primary connection credentials for a dedicated database. A hibernated database is woken by the worker before rotation. List database operations until the returned operation reaches a terminal status, then fetch the database again for the refreshed connection string.
559
550
  *
560
551
  * @param {string} databaseId - Database ID.
561
552
  * @throws {AppwriteException}
562
- * @returns {Promise<Models.DedicatedDatabase>}
553
+ * @returns {Promise<Models.DedicatedDatabaseOperation>}
563
554
  * @deprecated Use the object parameter style method for a better developer experience.
564
555
  */
565
- updateCredentials(databaseId: string): Promise<Models.DedicatedDatabase>;
556
+ updateCredentials(databaseId: string): Promise<Models.DedicatedDatabaseOperation>;
566
557
  /**
567
- * 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.
558
+ * 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.
568
559
  *
569
560
  * @param {string} params.databaseId - Database ID.
570
561
  * @param {string} params.targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -576,7 +567,7 @@ export declare class Mongo {
576
567
  targetReplicaId?: string;
577
568
  }): Promise<Models.DedicatedDatabase>;
578
569
  /**
579
- * 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.
570
+ * 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.
580
571
  *
581
572
  * @param {string} databaseId - Database ID.
582
573
  * @param {string} targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -738,6 +729,7 @@ export declare class Mongo {
738
729
  * @param {string} params.databaseId - Database ID.
739
730
  * @param {string} params.type - Restoration type. Allowed values: backup, pitr. Use "backup" to restore from a specific backup, or "pitr" for point-in-time recovery.
740
731
  * @param {string} params.backupId - Backup ID to restore from (required for backup type).
732
+ * @param {string} params.targetDatabaseId - Existing database ID to restore into. The target must be distinct, ready, and use the same engine and version.
741
733
  * @param {string} params.targetTime - Target time for PITR (required for pitr type) as an [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) datetime.
742
734
  * @throws {AppwriteException}
743
735
  * @returns {Promise<Models.DedicatedDatabaseRestoration>}
@@ -746,6 +738,7 @@ export declare class Mongo {
746
738
  databaseId: string;
747
739
  type?: string;
748
740
  backupId?: string;
741
+ targetDatabaseId?: string;
749
742
  targetTime?: string;
750
743
  }): Promise<Models.DedicatedDatabaseRestoration>;
751
744
  /**
@@ -754,12 +747,13 @@ export declare class Mongo {
754
747
  * @param {string} databaseId - Database ID.
755
748
  * @param {string} type - Restoration type. Allowed values: backup, pitr. Use "backup" to restore from a specific backup, or "pitr" for point-in-time recovery.
756
749
  * @param {string} backupId - Backup ID to restore from (required for backup type).
750
+ * @param {string} targetDatabaseId - Existing database ID to restore into. The target must be distinct, ready, and use the same engine and version.
757
751
  * @param {string} targetTime - Target time for PITR (required for pitr type) as an [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) datetime.
758
752
  * @throws {AppwriteException}
759
753
  * @returns {Promise<Models.DedicatedDatabaseRestoration>}
760
754
  * @deprecated Use the object parameter style method for a better developer experience.
761
755
  */
762
- createRestoration(databaseId: string, type?: string, backupId?: string, targetTime?: string): Promise<Models.DedicatedDatabaseRestoration>;
756
+ createRestoration(databaseId: string, type?: string, backupId?: string, targetDatabaseId?: string, targetTime?: string): Promise<Models.DedicatedDatabaseRestoration>;
763
757
  /**
764
758
  * Get details of a specific database restoration including its status, type, and timestamps.
765
759
  *
@@ -31,7 +31,6 @@ export declare class Mysql {
31
31
  * @param {string} params.specification - Specification identifier. Drives the allocated CPU, memory, storage, storage class, and connection ceiling.
32
32
  * @param {number} params.replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
33
33
  * @param {string} params.syncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
34
- * @param {string} params.standbyRegion - Standby region for a cross-region replica. When set, a replica is provisioned in this region for cross-region high availability. Must differ from the database region.
35
34
  * @param {number} params.networkIdleTimeoutSeconds - Connection idle timeout in seconds.
36
35
  * @param {string[]} params.networkIPAllowlist - IP addresses/CIDR ranges allowed to connect.
37
36
  * @param {number} params.idleTimeoutMinutes - Minutes of inactivity before container scales to zero.
@@ -39,7 +38,7 @@ export declare class Mysql {
39
38
  * @param {number} params.pitrRetentionDays - Number of days to retain PITR data.
40
39
  * @param {boolean} params.storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
41
40
  * @param {number} params.storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
42
- * @param {number} params.storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
41
+ * @param {number} params.storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. Defaults to 3 times the specification's storage. 0 means no limit.
43
42
  * @throws {AppwriteException}
44
43
  * @returns {Promise<Models.DedicatedDatabase>}
45
44
  */
@@ -50,7 +49,6 @@ export declare class Mysql {
50
49
  specification?: string;
51
50
  replicas?: number;
52
51
  syncMode?: string;
53
- standbyRegion?: string;
54
52
  networkIdleTimeoutSeconds?: number;
55
53
  networkIPAllowlist?: string[];
56
54
  idleTimeoutMinutes?: number;
@@ -69,7 +67,6 @@ export declare class Mysql {
69
67
  * @param {string} specification - Specification identifier. Drives the allocated CPU, memory, storage, storage class, and connection ceiling.
70
68
  * @param {number} replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
71
69
  * @param {string} syncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
72
- * @param {string} standbyRegion - Standby region for a cross-region replica. When set, a replica is provisioned in this region for cross-region high availability. Must differ from the database region.
73
70
  * @param {number} networkIdleTimeoutSeconds - Connection idle timeout in seconds.
74
71
  * @param {string[]} networkIPAllowlist - IP addresses/CIDR ranges allowed to connect.
75
72
  * @param {number} idleTimeoutMinutes - Minutes of inactivity before container scales to zero.
@@ -77,14 +74,14 @@ export declare class Mysql {
77
74
  * @param {number} pitrRetentionDays - Number of days to retain PITR data.
78
75
  * @param {boolean} storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
79
76
  * @param {number} storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
80
- * @param {number} storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
77
+ * @param {number} storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. Defaults to 3 times the specification's storage. 0 means no limit.
81
78
  * @throws {AppwriteException}
82
79
  * @returns {Promise<Models.DedicatedDatabase>}
83
80
  * @deprecated Use the object parameter style method for a better developer experience.
84
81
  */
85
- create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number): Promise<Models.DedicatedDatabase>;
82
+ create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number): Promise<Models.DedicatedDatabase>;
86
83
  /**
87
- * 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.
84
+ * 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.
88
85
  *
89
86
  * @throws {AppwriteException}
90
87
  * @returns {Promise<Models.DedicatedDatabaseSpecificationList>}
@@ -118,8 +115,6 @@ export declare class Mysql {
118
115
  * @param {string} params.specification - Specification. Changes cpu, memory, storage, connection ceiling, and node pool based on specification config. Resource changes are applied via rolling cutover with zero downtime.
119
116
  * @param {number} params.replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
120
117
  * @param {string} params.syncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
121
- * @param {number} params.crossRegionReplicas - Number of cross-region standby replicas (0-1). Cross-region replication is enabled when greater than 0.
122
- * @param {string} params.standbyRegion - Standby region for the cross-region replica. Required when enabling cross-region replication and no standby region is already configured. Must differ from the database region.
123
118
  * @param {number} params.networkIdleTimeoutSeconds - Connection idle timeout in seconds (60-86400).
124
119
  * @param {string[]} params.networkIPAllowlist - IP addresses/CIDR ranges allowed to connect.
125
120
  * @param {number} params.idleTimeoutMinutes - Minutes before container scales to zero.
@@ -145,8 +140,6 @@ export declare class Mysql {
145
140
  specification?: string;
146
141
  replicas?: number;
147
142
  syncMode?: string;
148
- crossRegionReplicas?: number;
149
- standbyRegion?: string;
150
143
  networkIdleTimeoutSeconds?: number;
151
144
  networkIPAllowlist?: string[];
152
145
  idleTimeoutMinutes?: number;
@@ -172,8 +165,6 @@ export declare class Mysql {
172
165
  * @param {string} specification - Specification. Changes cpu, memory, storage, connection ceiling, and node pool based on specification config. Resource changes are applied via rolling cutover with zero downtime.
173
166
  * @param {number} replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
174
167
  * @param {string} syncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
175
- * @param {number} crossRegionReplicas - Number of cross-region standby replicas (0-1). Cross-region replication is enabled when greater than 0.
176
- * @param {string} standbyRegion - Standby region for the cross-region replica. Required when enabling cross-region replication and no standby region is already configured. Must differ from the database region.
177
168
  * @param {number} networkIdleTimeoutSeconds - Connection idle timeout in seconds (60-86400).
178
169
  * @param {string[]} networkIPAllowlist - IP addresses/CIDR ranges allowed to connect.
179
170
  * @param {number} idleTimeoutMinutes - Minutes before container scales to zero.
@@ -193,7 +184,7 @@ export declare class Mysql {
193
184
  * @returns {Promise<Models.DedicatedDatabase>}
194
185
  * @deprecated Use the object parameter style method for a better developer experience.
195
186
  */
196
- update(databaseId: string, name?: string, status?: string, specification?: string, replicas?: number, syncMode?: string, crossRegionReplicas?: number, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number, metricsTraceSampleRate?: number, metricsSlowQueryLogThresholdMs?: number, sqlApiEnabled?: boolean, sqlApiAllowedStatements?: string[], sqlApiMaxRows?: number, sqlApiMaxBytes?: number, sqlApiTimeoutSeconds?: number): Promise<Models.DedicatedDatabase>;
187
+ update(databaseId: string, name?: string, status?: string, specification?: string, replicas?: number, syncMode?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number, metricsTraceSampleRate?: number, metricsSlowQueryLogThresholdMs?: number, sqlApiEnabled?: boolean, sqlApiAllowedStatements?: string[], sqlApiMaxRows?: number, sqlApiMaxBytes?: number, sqlApiTimeoutSeconds?: number): Promise<Models.DedicatedDatabase>;
197
188
  /**
198
189
  * Delete a dedicated database. This action is irreversible. The database status will be set to 'deleting' and all resources will be cleaned up. Deletion is allowed from any state, and repeating the call re-dispatches the cleanup.
199
190
  *
@@ -545,24 +536,24 @@ export declare class Mysql {
545
536
  */
546
537
  deleteBranch(databaseId: string, branchId: string): Promise<Models.DedicatedDatabase>;
547
538
  /**
548
- * Rotate the primary connection credentials for a dedicated database. Generates a new password and updates the database atomically. Previous credentials stop working immediately. Returns the database with a refreshed connection string carrying the new password.
539
+ * Queue a rotation of the primary connection credentials for a dedicated database. A hibernated database is woken by the worker before rotation. List database operations until the returned operation reaches a terminal status, then fetch the database again for the refreshed connection string.
549
540
  *
550
541
  * @param {string} params.databaseId - Database ID.
551
542
  * @throws {AppwriteException}
552
- * @returns {Promise<Models.DedicatedDatabase>}
543
+ * @returns {Promise<Models.DedicatedDatabaseOperation>}
553
544
  */
554
545
  updateCredentials(params: {
555
546
  databaseId: string;
556
- }): Promise<Models.DedicatedDatabase>;
547
+ }): Promise<Models.DedicatedDatabaseOperation>;
557
548
  /**
558
- * Rotate the primary connection credentials for a dedicated database. Generates a new password and updates the database atomically. Previous credentials stop working immediately. Returns the database with a refreshed connection string carrying the new password.
549
+ * Queue a rotation of the primary connection credentials for a dedicated database. A hibernated database is woken by the worker before rotation. List database operations until the returned operation reaches a terminal status, then fetch the database again for the refreshed connection string.
559
550
  *
560
551
  * @param {string} databaseId - Database ID.
561
552
  * @throws {AppwriteException}
562
- * @returns {Promise<Models.DedicatedDatabase>}
553
+ * @returns {Promise<Models.DedicatedDatabaseOperation>}
563
554
  * @deprecated Use the object parameter style method for a better developer experience.
564
555
  */
565
- updateCredentials(databaseId: string): Promise<Models.DedicatedDatabase>;
556
+ updateCredentials(databaseId: string): Promise<Models.DedicatedDatabaseOperation>;
566
557
  /**
567
558
  * Execute SQL through the console-facing Cloud endpoint. Cloud proxies through the edge platform to the per-database SQL API sidecar. Application traffic should bypass cloud entirely and POST directly to the per-database hostname: `https://db-{project}-{db}.{region}.appwrite.center/v1/sql/executions` with an `X-Appwrite-Key` header — that path scales to the whole DB fleet without a per-query cloud round-trip. The statement type must be on the database's configured allow-list. Use bound parameters for any user-supplied values — the API does not interpolate raw strings.
568
559
  *
@@ -592,7 +583,7 @@ export declare class Mysql {
592
583
  */
593
584
  createExecution(databaseId: string, sql: string, bindings?: object, timeoutSeconds?: number): Promise<Models.DedicatedDatabaseExecution>;
594
585
  /**
595
- * 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.
586
+ * 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.
596
587
  *
597
588
  * @param {string} params.databaseId - Database ID.
598
589
  * @param {string} params.targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -604,7 +595,7 @@ export declare class Mysql {
604
595
  targetReplicaId?: string;
605
596
  }): Promise<Models.DedicatedDatabase>;
606
597
  /**
607
- * 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.
598
+ * 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.
608
599
  *
609
600
  * @param {string} databaseId - Database ID.
610
601
  * @param {string} targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -828,6 +819,7 @@ export declare class Mysql {
828
819
  * @param {string} params.databaseId - Database ID.
829
820
  * @param {string} params.type - Restoration type. Allowed values: backup, pitr. Use "backup" to restore from a specific backup, or "pitr" for point-in-time recovery.
830
821
  * @param {string} params.backupId - Backup ID to restore from (required for backup type).
822
+ * @param {string} params.targetDatabaseId - Existing database ID to restore into. The target must be distinct, ready, and use the same engine and version.
831
823
  * @param {string} params.targetTime - Target time for PITR (required for pitr type) as an [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) datetime.
832
824
  * @throws {AppwriteException}
833
825
  * @returns {Promise<Models.DedicatedDatabaseRestoration>}
@@ -836,6 +828,7 @@ export declare class Mysql {
836
828
  databaseId: string;
837
829
  type?: string;
838
830
  backupId?: string;
831
+ targetDatabaseId?: string;
839
832
  targetTime?: string;
840
833
  }): Promise<Models.DedicatedDatabaseRestoration>;
841
834
  /**
@@ -844,12 +837,13 @@ export declare class Mysql {
844
837
  * @param {string} databaseId - Database ID.
845
838
  * @param {string} type - Restoration type. Allowed values: backup, pitr. Use "backup" to restore from a specific backup, or "pitr" for point-in-time recovery.
846
839
  * @param {string} backupId - Backup ID to restore from (required for backup type).
840
+ * @param {string} targetDatabaseId - Existing database ID to restore into. The target must be distinct, ready, and use the same engine and version.
847
841
  * @param {string} targetTime - Target time for PITR (required for pitr type) as an [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) datetime.
848
842
  * @throws {AppwriteException}
849
843
  * @returns {Promise<Models.DedicatedDatabaseRestoration>}
850
844
  * @deprecated Use the object parameter style method for a better developer experience.
851
845
  */
852
- createRestoration(databaseId: string, type?: string, backupId?: string, targetTime?: string): Promise<Models.DedicatedDatabaseRestoration>;
846
+ createRestoration(databaseId: string, type?: string, backupId?: string, targetDatabaseId?: string, targetTime?: string): Promise<Models.DedicatedDatabaseRestoration>;
853
847
  /**
854
848
  * Get details of a specific database restoration including its status, type, and timestamps.
855
849
  *
@@ -1,7 +1,7 @@
1
1
  import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
3
  import { Platform } from '../enums/platform';
4
- import { Addon } from '../enums/addon';
4
+ import { AddonKey } from '../enums/addon-key';
5
5
  export declare class Organizations {
6
6
  client: Client;
7
7
  constructor(client: Client);
@@ -265,25 +265,25 @@ export declare class Organizations {
265
265
  *
266
266
  *
267
267
  * @param {string} params.organizationId - Organization ID
268
- * @param {Addon} params.addon - Addon key identifier (e.g. baa).
268
+ * @param {AddonKey} params.addon - Addon key identifier (e.g. baa).
269
269
  * @throws {AppwriteException}
270
270
  * @returns {Promise<Models.AddonPrice>}
271
271
  */
272
272
  getAddonPrice(params: {
273
273
  organizationId: string;
274
- addon: Addon;
274
+ addon: AddonKey;
275
275
  }): Promise<Models.AddonPrice>;
276
276
  /**
277
277
  * Get the price details for a billing addon for an organization.
278
278
  *
279
279
  *
280
280
  * @param {string} organizationId - Organization ID
281
- * @param {Addon} addon - Addon key identifier (e.g. baa).
281
+ * @param {AddonKey} addon - Addon key identifier (e.g. baa).
282
282
  * @throws {AppwriteException}
283
283
  * @returns {Promise<Models.AddonPrice>}
284
284
  * @deprecated Use the object parameter style method for a better developer experience.
285
285
  */
286
- getAddonPrice(organizationId: string, addon: Addon): Promise<Models.AddonPrice>;
286
+ getAddonPrice(organizationId: string, addon: AddonKey): Promise<Models.AddonPrice>;
287
287
  /**
288
288
  * Get a list of all aggregations for an organization.
289
289
  *
@@ -31,7 +31,6 @@ export declare class Postgresql {
31
31
  * @param {string} params.specification - Specification identifier. Drives the allocated CPU, memory, storage, storage class, and connection ceiling.
32
32
  * @param {number} params.replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
33
33
  * @param {string} params.syncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
34
- * @param {string} params.standbyRegion - Standby region for a cross-region replica. When set, a replica is provisioned in this region for cross-region high availability. Must differ from the database region.
35
34
  * @param {number} params.networkIdleTimeoutSeconds - Connection idle timeout in seconds.
36
35
  * @param {string[]} params.networkIPAllowlist - IP addresses/CIDR ranges allowed to connect.
37
36
  * @param {number} params.idleTimeoutMinutes - Minutes of inactivity before container scales to zero.
@@ -39,7 +38,7 @@ export declare class Postgresql {
39
38
  * @param {number} params.pitrRetentionDays - Number of days to retain PITR data.
40
39
  * @param {boolean} params.storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
41
40
  * @param {number} params.storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
42
- * @param {number} params.storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
41
+ * @param {number} params.storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. Defaults to 3 times the specification's storage. 0 means no limit.
43
42
  * @throws {AppwriteException}
44
43
  * @returns {Promise<Models.DedicatedDatabase>}
45
44
  */
@@ -50,7 +49,6 @@ export declare class Postgresql {
50
49
  specification?: string;
51
50
  replicas?: number;
52
51
  syncMode?: string;
53
- standbyRegion?: string;
54
52
  networkIdleTimeoutSeconds?: number;
55
53
  networkIPAllowlist?: string[];
56
54
  idleTimeoutMinutes?: number;
@@ -69,7 +67,6 @@ export declare class Postgresql {
69
67
  * @param {string} specification - Specification identifier. Drives the allocated CPU, memory, storage, storage class, and connection ceiling.
70
68
  * @param {number} replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
71
69
  * @param {string} syncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
72
- * @param {string} standbyRegion - Standby region for a cross-region replica. When set, a replica is provisioned in this region for cross-region high availability. Must differ from the database region.
73
70
  * @param {number} networkIdleTimeoutSeconds - Connection idle timeout in seconds.
74
71
  * @param {string[]} networkIPAllowlist - IP addresses/CIDR ranges allowed to connect.
75
72
  * @param {number} idleTimeoutMinutes - Minutes of inactivity before container scales to zero.
@@ -77,14 +74,14 @@ export declare class Postgresql {
77
74
  * @param {number} pitrRetentionDays - Number of days to retain PITR data.
78
75
  * @param {boolean} storageAutoscaling - Enable automatic storage expansion when usage exceeds threshold.
79
76
  * @param {number} storageAutoscalingThresholdPercent - Storage usage percentage (50-95) that triggers automatic expansion.
80
- * @param {number} storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. 0 means no limit.
77
+ * @param {number} storageAutoscalingMaxGb - Maximum storage size in GB for autoscaling. Defaults to 3 times the specification's storage. 0 means no limit.
81
78
  * @throws {AppwriteException}
82
79
  * @returns {Promise<Models.DedicatedDatabase>}
83
80
  * @deprecated Use the object parameter style method for a better developer experience.
84
81
  */
85
- create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number): Promise<Models.DedicatedDatabase>;
82
+ create(databaseId: string, name: string, version?: string, specification?: string, replicas?: number, syncMode?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number): Promise<Models.DedicatedDatabase>;
86
83
  /**
87
- * 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.
84
+ * 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.
88
85
  *
89
86
  * @throws {AppwriteException}
90
87
  * @returns {Promise<Models.DedicatedDatabaseSpecificationList>}
@@ -118,8 +115,6 @@ export declare class Postgresql {
118
115
  * @param {string} params.specification - Specification. Changes cpu, memory, storage, connection ceiling, and node pool based on specification config. Resource changes are applied via rolling cutover with zero downtime.
119
116
  * @param {number} params.replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
120
117
  * @param {string} params.syncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
121
- * @param {number} params.crossRegionReplicas - Number of cross-region standby replicas (0-1). Cross-region replication is enabled when greater than 0.
122
- * @param {string} params.standbyRegion - Standby region for the cross-region replica. Required when enabling cross-region replication and no standby region is already configured. Must differ from the database region.
123
118
  * @param {number} params.networkIdleTimeoutSeconds - Connection idle timeout in seconds (60-86400).
124
119
  * @param {string[]} params.networkIPAllowlist - IP addresses/CIDR ranges allowed to connect.
125
120
  * @param {number} params.idleTimeoutMinutes - Minutes before container scales to zero.
@@ -145,8 +140,6 @@ export declare class Postgresql {
145
140
  specification?: string;
146
141
  replicas?: number;
147
142
  syncMode?: string;
148
- crossRegionReplicas?: number;
149
- standbyRegion?: string;
150
143
  networkIdleTimeoutSeconds?: number;
151
144
  networkIPAllowlist?: string[];
152
145
  idleTimeoutMinutes?: number;
@@ -172,8 +165,6 @@ export declare class Postgresql {
172
165
  * @param {string} specification - Specification. Changes cpu, memory, storage, connection ceiling, and node pool based on specification config. Resource changes are applied via rolling cutover with zero downtime.
173
166
  * @param {number} replicas - Number of high availability replicas (0-5). High availability is enabled when greater than 0.
174
167
  * @param {string} syncMode - Replication sync mode preference. Allowed values: async, sync, quorum.
175
- * @param {number} crossRegionReplicas - Number of cross-region standby replicas (0-1). Cross-region replication is enabled when greater than 0.
176
- * @param {string} standbyRegion - Standby region for the cross-region replica. Required when enabling cross-region replication and no standby region is already configured. Must differ from the database region.
177
168
  * @param {number} networkIdleTimeoutSeconds - Connection idle timeout in seconds (60-86400).
178
169
  * @param {string[]} networkIPAllowlist - IP addresses/CIDR ranges allowed to connect.
179
170
  * @param {number} idleTimeoutMinutes - Minutes before container scales to zero.
@@ -193,7 +184,7 @@ export declare class Postgresql {
193
184
  * @returns {Promise<Models.DedicatedDatabase>}
194
185
  * @deprecated Use the object parameter style method for a better developer experience.
195
186
  */
196
- update(databaseId: string, name?: string, status?: string, specification?: string, replicas?: number, syncMode?: string, crossRegionReplicas?: number, standbyRegion?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number, metricsTraceSampleRate?: number, metricsSlowQueryLogThresholdMs?: number, sqlApiEnabled?: boolean, sqlApiAllowedStatements?: string[], sqlApiMaxRows?: number, sqlApiMaxBytes?: number, sqlApiTimeoutSeconds?: number): Promise<Models.DedicatedDatabase>;
187
+ update(databaseId: string, name?: string, status?: string, specification?: string, replicas?: number, syncMode?: string, networkIdleTimeoutSeconds?: number, networkIPAllowlist?: string[], idleTimeoutMinutes?: number, pitr?: boolean, pitrRetentionDays?: number, storageAutoscaling?: boolean, storageAutoscalingThresholdPercent?: number, storageAutoscalingMaxGb?: number, metricsTraceSampleRate?: number, metricsSlowQueryLogThresholdMs?: number, sqlApiEnabled?: boolean, sqlApiAllowedStatements?: string[], sqlApiMaxRows?: number, sqlApiMaxBytes?: number, sqlApiTimeoutSeconds?: number): Promise<Models.DedicatedDatabase>;
197
188
  /**
198
189
  * Delete a dedicated database. This action is irreversible. The database status will be set to 'deleting' and all resources will be cleaned up. Deletion is allowed from any state, and repeating the call re-dispatches the cleanup.
199
190
  *
@@ -545,24 +536,24 @@ export declare class Postgresql {
545
536
  */
546
537
  deleteBranch(databaseId: string, branchId: string): Promise<Models.DedicatedDatabase>;
547
538
  /**
548
- * Rotate the primary connection credentials for a dedicated database. Generates a new password and updates the database atomically. Previous credentials stop working immediately. Returns the database with a refreshed connection string carrying the new password.
539
+ * Queue a rotation of the primary connection credentials for a dedicated database. A hibernated database is woken by the worker before rotation. List database operations until the returned operation reaches a terminal status, then fetch the database again for the refreshed connection string.
549
540
  *
550
541
  * @param {string} params.databaseId - Database ID.
551
542
  * @throws {AppwriteException}
552
- * @returns {Promise<Models.DedicatedDatabase>}
543
+ * @returns {Promise<Models.DedicatedDatabaseOperation>}
553
544
  */
554
545
  updateCredentials(params: {
555
546
  databaseId: string;
556
- }): Promise<Models.DedicatedDatabase>;
547
+ }): Promise<Models.DedicatedDatabaseOperation>;
557
548
  /**
558
- * Rotate the primary connection credentials for a dedicated database. Generates a new password and updates the database atomically. Previous credentials stop working immediately. Returns the database with a refreshed connection string carrying the new password.
549
+ * Queue a rotation of the primary connection credentials for a dedicated database. A hibernated database is woken by the worker before rotation. List database operations until the returned operation reaches a terminal status, then fetch the database again for the refreshed connection string.
559
550
  *
560
551
  * @param {string} databaseId - Database ID.
561
552
  * @throws {AppwriteException}
562
- * @returns {Promise<Models.DedicatedDatabase>}
553
+ * @returns {Promise<Models.DedicatedDatabaseOperation>}
563
554
  * @deprecated Use the object parameter style method for a better developer experience.
564
555
  */
565
- updateCredentials(databaseId: string): Promise<Models.DedicatedDatabase>;
556
+ updateCredentials(databaseId: string): Promise<Models.DedicatedDatabaseOperation>;
566
557
  /**
567
558
  * Execute SQL through the console-facing Cloud endpoint. Cloud proxies through the edge platform to the per-database SQL API sidecar. Application traffic should bypass cloud entirely and POST directly to the per-database hostname: `https://db-{project}-{db}.{region}.appwrite.center/v1/sql/executions` with an `X-Appwrite-Key` header — that path scales to the whole DB fleet without a per-query cloud round-trip. The statement type must be on the database's configured allow-list. Use bound parameters for any user-supplied values — the API does not interpolate raw strings.
568
559
  *
@@ -655,7 +646,7 @@ export declare class Postgresql {
655
646
  */
656
647
  deleteExtension(databaseId: string, extensionName: string): Promise<Models.DedicatedDatabase>;
657
648
  /**
658
- * 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.
649
+ * 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.
659
650
  *
660
651
  * @param {string} params.databaseId - Database ID.
661
652
  * @param {string} params.targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -667,7 +658,7 @@ export declare class Postgresql {
667
658
  targetReplicaId?: string;
668
659
  }): Promise<Models.DedicatedDatabase>;
669
660
  /**
670
- * 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.
661
+ * 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.
671
662
  *
672
663
  * @param {string} databaseId - Database ID.
673
664
  * @param {string} targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -891,6 +882,7 @@ export declare class Postgresql {
891
882
  * @param {string} params.databaseId - Database ID.
892
883
  * @param {string} params.type - Restoration type. Allowed values: backup, pitr. Use "backup" to restore from a specific backup, or "pitr" for point-in-time recovery.
893
884
  * @param {string} params.backupId - Backup ID to restore from (required for backup type).
885
+ * @param {string} params.targetDatabaseId - Existing database ID to restore into. The target must be distinct, ready, and use the same engine and version.
894
886
  * @param {string} params.targetTime - Target time for PITR (required for pitr type) as an [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) datetime.
895
887
  * @throws {AppwriteException}
896
888
  * @returns {Promise<Models.DedicatedDatabaseRestoration>}
@@ -899,6 +891,7 @@ export declare class Postgresql {
899
891
  databaseId: string;
900
892
  type?: string;
901
893
  backupId?: string;
894
+ targetDatabaseId?: string;
902
895
  targetTime?: string;
903
896
  }): Promise<Models.DedicatedDatabaseRestoration>;
904
897
  /**
@@ -907,12 +900,13 @@ export declare class Postgresql {
907
900
  * @param {string} databaseId - Database ID.
908
901
  * @param {string} type - Restoration type. Allowed values: backup, pitr. Use "backup" to restore from a specific backup, or "pitr" for point-in-time recovery.
909
902
  * @param {string} backupId - Backup ID to restore from (required for backup type).
903
+ * @param {string} targetDatabaseId - Existing database ID to restore into. The target must be distinct, ready, and use the same engine and version.
910
904
  * @param {string} targetTime - Target time for PITR (required for pitr type) as an [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) datetime.
911
905
  * @throws {AppwriteException}
912
906
  * @returns {Promise<Models.DedicatedDatabaseRestoration>}
913
907
  * @deprecated Use the object parameter style method for a better developer experience.
914
908
  */
915
- createRestoration(databaseId: string, type?: string, backupId?: string, targetTime?: string): Promise<Models.DedicatedDatabaseRestoration>;
909
+ createRestoration(databaseId: string, type?: string, backupId?: string, targetDatabaseId?: string, targetTime?: string): Promise<Models.DedicatedDatabaseRestoration>;
916
910
  /**
917
911
  * Get details of a specific database restoration including its status, type, and timestamps.
918
912
  *