@appwrite.io/console 15.6.0 → 15.7.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.
package/dist/iife/sdk.js CHANGED
@@ -4445,7 +4445,7 @@
4445
4445
  'x-sdk-name': 'Console',
4446
4446
  'x-sdk-platform': 'console',
4447
4447
  'x-sdk-language': 'web',
4448
- 'x-sdk-version': '15.6.0',
4448
+ 'x-sdk-version': '15.7.0',
4449
4449
  'X-Appwrite-Response-Format': '1.9.5',
4450
4450
  };
4451
4451
  this.realtime = {
@@ -13530,12 +13530,14 @@
13530
13530
  databaseId: paramsOrFirst,
13531
13531
  name: rest[0],
13532
13532
  enabled: rest[1],
13533
- replicas: rest[2]
13533
+ specification: rest[2],
13534
+ replicas: rest[3]
13534
13535
  };
13535
13536
  }
13536
13537
  const databaseId = params.databaseId;
13537
13538
  const name = params.name;
13538
13539
  const enabled = params.enabled;
13540
+ const specification = params.specification;
13539
13541
  const replicas = params.replicas;
13540
13542
  if (typeof databaseId === 'undefined') {
13541
13543
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -13551,6 +13553,9 @@
13551
13553
  if (typeof enabled !== 'undefined') {
13552
13554
  payload['enabled'] = enabled;
13553
13555
  }
13556
+ if (typeof specification !== 'undefined') {
13557
+ payload['specification'] = specification;
13558
+ }
13554
13559
  if (typeof replicas !== 'undefined') {
13555
13560
  payload['replicas'] = replicas;
13556
13561
  }
@@ -35175,14 +35180,16 @@
35175
35180
  bucketId: paramsOrFirst,
35176
35181
  fileId: rest[0],
35177
35182
  file: rest[1],
35178
- permissions: rest[2]
35183
+ permissions: rest[2],
35184
+ folder: rest[3]
35179
35185
  };
35180
- onProgress = rest[3];
35186
+ onProgress = rest[4];
35181
35187
  }
35182
35188
  const bucketId = params.bucketId;
35183
35189
  const fileId = params.fileId;
35184
35190
  const file = params.file;
35185
35191
  const permissions = params.permissions;
35192
+ const folder = params.folder;
35186
35193
  if (typeof bucketId === 'undefined') {
35187
35194
  throw new AppwriteException('Missing required parameter: "bucketId"');
35188
35195
  }
@@ -35203,6 +35210,9 @@
35203
35210
  if (typeof permissions !== 'undefined') {
35204
35211
  payload['permissions'] = permissions;
35205
35212
  }
35213
+ if (typeof folder !== 'undefined') {
35214
+ payload['folder'] = folder;
35215
+ }
35206
35216
  const uri = new URL(this.client.config.endpoint + apiPath);
35207
35217
  const apiHeaders = {
35208
35218
  'X-Appwrite-Project': this.client.config.project,
@@ -35763,12 +35773,14 @@
35763
35773
  databaseId: paramsOrFirst,
35764
35774
  name: rest[0],
35765
35775
  enabled: rest[1],
35766
- replicas: rest[2]
35776
+ specification: rest[2],
35777
+ replicas: rest[3]
35767
35778
  };
35768
35779
  }
35769
35780
  const databaseId = params.databaseId;
35770
35781
  const name = params.name;
35771
35782
  const enabled = params.enabled;
35783
+ const specification = params.specification;
35772
35784
  const replicas = params.replicas;
35773
35785
  if (typeof databaseId === 'undefined') {
35774
35786
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -35781,6 +35793,9 @@
35781
35793
  if (typeof enabled !== 'undefined') {
35782
35794
  payload['enabled'] = enabled;
35783
35795
  }
35796
+ if (typeof specification !== 'undefined') {
35797
+ payload['specification'] = specification;
35798
+ }
35784
35799
  if (typeof replicas !== 'undefined') {
35785
35800
  payload['replicas'] = replicas;
35786
35801
  }
@@ -42514,12 +42529,14 @@
42514
42529
  databaseId: paramsOrFirst,
42515
42530
  name: rest[0],
42516
42531
  enabled: rest[1],
42517
- replicas: rest[2]
42532
+ specification: rest[2],
42533
+ replicas: rest[3]
42518
42534
  };
42519
42535
  }
42520
42536
  const databaseId = params.databaseId;
42521
42537
  const name = params.name;
42522
42538
  const enabled = params.enabled;
42539
+ const specification = params.specification;
42523
42540
  const replicas = params.replicas;
42524
42541
  if (typeof databaseId === 'undefined') {
42525
42542
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -42535,6 +42552,9 @@
42535
42552
  if (typeof enabled !== 'undefined') {
42536
42553
  payload['enabled'] = enabled;
42537
42554
  }
42555
+ if (typeof specification !== 'undefined') {
42556
+ payload['specification'] = specification;
42557
+ }
42538
42558
  if (typeof replicas !== 'undefined') {
42539
42559
  payload['replicas'] = replicas;
42540
42560
  }
@@ -43717,6 +43737,143 @@
43717
43737
  };
43718
43738
  return this.client.call('patch', uri, apiHeaders, payload);
43719
43739
  }
43740
+ createChallengeRule(paramsOrFirst, ...rest) {
43741
+ let params;
43742
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
43743
+ params = (paramsOrFirst || {});
43744
+ }
43745
+ else {
43746
+ params = {
43747
+ ruleId: paramsOrFirst,
43748
+ resourceType: rest[0],
43749
+ name: rest[1],
43750
+ resourceId: rest[2],
43751
+ description: rest[3],
43752
+ challengeType: rest[4],
43753
+ priority: rest[5],
43754
+ enabled: rest[6],
43755
+ conditions: rest[7]
43756
+ };
43757
+ }
43758
+ const ruleId = params.ruleId;
43759
+ const resourceType = params.resourceType;
43760
+ const name = params.name;
43761
+ const resourceId = params.resourceId;
43762
+ const description = params.description;
43763
+ const challengeType = params.challengeType;
43764
+ const priority = params.priority;
43765
+ const enabled = params.enabled;
43766
+ const conditions = params.conditions;
43767
+ if (typeof ruleId === 'undefined') {
43768
+ throw new AppwriteException('Missing required parameter: "ruleId"');
43769
+ }
43770
+ if (typeof resourceType === 'undefined') {
43771
+ throw new AppwriteException('Missing required parameter: "resourceType"');
43772
+ }
43773
+ if (typeof name === 'undefined') {
43774
+ throw new AppwriteException('Missing required parameter: "name"');
43775
+ }
43776
+ const apiPath = '/waf/rules/challenge';
43777
+ const payload = {};
43778
+ if (typeof ruleId !== 'undefined') {
43779
+ payload['ruleId'] = ruleId;
43780
+ }
43781
+ if (typeof resourceType !== 'undefined') {
43782
+ payload['resourceType'] = resourceType;
43783
+ }
43784
+ if (typeof resourceId !== 'undefined') {
43785
+ payload['resourceId'] = resourceId;
43786
+ }
43787
+ if (typeof name !== 'undefined') {
43788
+ payload['name'] = name;
43789
+ }
43790
+ if (typeof description !== 'undefined') {
43791
+ payload['description'] = description;
43792
+ }
43793
+ if (typeof challengeType !== 'undefined') {
43794
+ payload['challengeType'] = challengeType;
43795
+ }
43796
+ if (typeof priority !== 'undefined') {
43797
+ payload['priority'] = priority;
43798
+ }
43799
+ if (typeof enabled !== 'undefined') {
43800
+ payload['enabled'] = enabled;
43801
+ }
43802
+ if (typeof conditions !== 'undefined') {
43803
+ payload['conditions'] = conditions;
43804
+ }
43805
+ const uri = new URL(this.client.config.endpoint + apiPath);
43806
+ const apiHeaders = {
43807
+ 'X-Appwrite-Project': this.client.config.project,
43808
+ 'content-type': 'application/json',
43809
+ 'accept': 'application/json',
43810
+ };
43811
+ return this.client.call('post', uri, apiHeaders, payload);
43812
+ }
43813
+ updateChallengeRule(paramsOrFirst, ...rest) {
43814
+ let params;
43815
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
43816
+ params = (paramsOrFirst || {});
43817
+ }
43818
+ else {
43819
+ params = {
43820
+ ruleId: paramsOrFirst,
43821
+ resourceType: rest[0],
43822
+ resourceId: rest[1],
43823
+ name: rest[2],
43824
+ description: rest[3],
43825
+ challengeType: rest[4],
43826
+ priority: rest[5],
43827
+ enabled: rest[6],
43828
+ conditions: rest[7]
43829
+ };
43830
+ }
43831
+ const ruleId = params.ruleId;
43832
+ const resourceType = params.resourceType;
43833
+ const resourceId = params.resourceId;
43834
+ const name = params.name;
43835
+ const description = params.description;
43836
+ const challengeType = params.challengeType;
43837
+ const priority = params.priority;
43838
+ const enabled = params.enabled;
43839
+ const conditions = params.conditions;
43840
+ if (typeof ruleId === 'undefined') {
43841
+ throw new AppwriteException('Missing required parameter: "ruleId"');
43842
+ }
43843
+ const apiPath = '/waf/rules/challenge/{ruleId}'.replace('{ruleId}', encodeURIComponent(String(ruleId)));
43844
+ const payload = {};
43845
+ if (typeof resourceType !== 'undefined') {
43846
+ payload['resourceType'] = resourceType;
43847
+ }
43848
+ if (typeof resourceId !== 'undefined') {
43849
+ payload['resourceId'] = resourceId;
43850
+ }
43851
+ if (typeof name !== 'undefined') {
43852
+ payload['name'] = name;
43853
+ }
43854
+ if (typeof description !== 'undefined') {
43855
+ payload['description'] = description;
43856
+ }
43857
+ if (typeof challengeType !== 'undefined') {
43858
+ payload['challengeType'] = challengeType;
43859
+ }
43860
+ if (typeof priority !== 'undefined') {
43861
+ payload['priority'] = priority;
43862
+ }
43863
+ if (typeof enabled !== 'undefined') {
43864
+ payload['enabled'] = enabled;
43865
+ }
43866
+ if (typeof conditions !== 'undefined') {
43867
+ payload['conditions'] = conditions;
43868
+ }
43869
+ const uri = new URL(this.client.config.endpoint + apiPath);
43870
+ const apiHeaders = {
43871
+ 'X-Appwrite-Project': this.client.config.project,
43872
+ 'content-type': 'application/json',
43873
+ 'accept': 'application/json',
43874
+ };
43875
+ return this.client.call('patch', uri, apiHeaders, payload);
43876
+ }
43720
43877
  createDenyRule(paramsOrFirst, ...rest) {
43721
43878
  let params;
43722
43879
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@appwrite.io/console",
3
3
  "homepage": "https://appwrite.io/support",
4
4
  "description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
5
- "version": "15.6.0",
5
+ "version": "15.7.0",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "dist/cjs/sdk.js",
8
8
  "exports": {
package/types/models.d.ts CHANGED
@@ -12681,6 +12681,71 @@ export declare namespace Models {
12681
12681
  */
12682
12682
  config: object;
12683
12683
  };
12684
+ /**
12685
+ * WafRuleChallenge
12686
+ */
12687
+ export type WafRuleChallenge = {
12688
+ /**
12689
+ * Rule ID.
12690
+ */
12691
+ $id: string;
12692
+ /**
12693
+ * WAF rule creation time in ISO 8601 format.
12694
+ */
12695
+ $createdAt: string;
12696
+ /**
12697
+ * WAF rule last update time in ISO 8601 format.
12698
+ */
12699
+ $updatedAt: string;
12700
+ /**
12701
+ * Human friendly rule name.
12702
+ */
12703
+ name: string;
12704
+ /**
12705
+ * Optional description for the rule.
12706
+ */
12707
+ description: string;
12708
+ /**
12709
+ * Team ID.
12710
+ */
12711
+ teamId: string;
12712
+ /**
12713
+ * Project ID.
12714
+ */
12715
+ projectId: string;
12716
+ /**
12717
+ * Resource type the rule is scoped to.
12718
+ */
12719
+ resourceType: string;
12720
+ /**
12721
+ * Resource identifier. Empty for API-wide rules.
12722
+ */
12723
+ resourceId: string;
12724
+ /**
12725
+ * Action performed when the rule matches.
12726
+ */
12727
+ action: WafRuleAction;
12728
+ /**
12729
+ * Evaluation priority. Lower values execute earlier.
12730
+ */
12731
+ priority: number;
12732
+ /**
12733
+ * Whether the rule is active.
12734
+ */
12735
+ enabled: boolean;
12736
+ /**
12737
+ * List of conditions evaluated for this rule.
12738
+ */
12739
+ conditions: object;
12740
+ /**
12741
+ * Action specific configuration.
12742
+ */
12743
+ config: object;
12744
+ /**
12745
+ * Challenge type enforced when the rule matches.
12746
+ */
12747
+ challengeType: string;
12748
+ };
12684
12749
  /**
12685
12750
  * WafRuleRateLimit
12686
12751
  */
@@ -211,18 +211,18 @@ export declare class Backups {
211
211
  /**
212
212
  * Create and trigger a new restoration for a backup on a project.
213
213
  *
214
- * For a backup of one database, the restoration resolves its destination before it is queued. Pass `newResourceId` to restore into that database ID, including the archived database ID to overwrite it. When `newResourceId` is omitted, a new database ID is generated and returned in `options`.
214
+ * For a backup of one database, the restoration resolves its destination before it is queued. When `newResourceId` is omitted, the archived database is restored in place and its own ID is returned in `options`. Pass a different `newResourceId` to restore alongside it as a new database instead.
215
215
  *
216
216
  * The restoration migration records the archived database in `resourceId` and `resourceType`, and the resolved database in `destinationResourceId` and `destinationResourceType`. Database types are stored canonically as `database`, `documentsdb`, or `vectorsdb`. Project-wide restorations leave these fields empty because they do not have a single source or destination database.
217
217
  *
218
218
  * To list every migration related to one database, use its canonical type in a nested `OR(AND(...), AND(...), AND(...))` across the root, parent, and destination relation pairs: `(resourceType, resourceId)`, `(parentResourceType, parentResourceId)`, and `(destinationResourceType, destinationResourceId)`. Legacy and TablesDB databases use `database`; the operational `resourceType` of a table migration is not rewritten to `tablesdb`.
219
219
  *
220
- * When restoring a DocumentsDB or VectorsDB database to a new resource from a dedicated source, the restore provisions a fresh dedicated backing database at the source database's own specification.
220
+ * When restoring a DocumentsDB or VectorsDB database from a dedicated source, the restore provisions a fresh dedicated backing database at the source database's own specification and lands the data there. An in-place restore swaps the database onto that backing only once the restore has succeeded, and retires the backing it displaced only once that swap is confirmed, so the source keeps serving its own data until the restored data is in place and any failure leaves it untouched. A serverless source has no dedicated backing to clone and restores onto the archived database instead.
221
221
  *
222
222
  *
223
223
  * @param {string} params.archiveId - Backup archive ID to restore
224
224
  * @param {BackupServices[]} params.services - Array of services to restore
225
- * @param {string} params.newResourceId - Destination resource ID. Omit to generate a new ID, or pass the archived resource ID to overwrite it. 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.
225
+ * @param {string} params.newResourceId - Destination resource ID. Omit to restore the archived resource in place, or pass a different ID to restore alongside it as a new resource. 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.
226
226
  * @param {string} params.newResourceName - Database name. Max length: 128 chars.
227
227
  * @throws {AppwriteException}
228
228
  * @returns {Promise<Models.BackupRestoration>}
@@ -236,18 +236,18 @@ export declare class Backups {
236
236
  /**
237
237
  * Create and trigger a new restoration for a backup on a project.
238
238
  *
239
- * For a backup of one database, the restoration resolves its destination before it is queued. Pass `newResourceId` to restore into that database ID, including the archived database ID to overwrite it. When `newResourceId` is omitted, a new database ID is generated and returned in `options`.
239
+ * For a backup of one database, the restoration resolves its destination before it is queued. When `newResourceId` is omitted, the archived database is restored in place and its own ID is returned in `options`. Pass a different `newResourceId` to restore alongside it as a new database instead.
240
240
  *
241
241
  * The restoration migration records the archived database in `resourceId` and `resourceType`, and the resolved database in `destinationResourceId` and `destinationResourceType`. Database types are stored canonically as `database`, `documentsdb`, or `vectorsdb`. Project-wide restorations leave these fields empty because they do not have a single source or destination database.
242
242
  *
243
243
  * To list every migration related to one database, use its canonical type in a nested `OR(AND(...), AND(...), AND(...))` across the root, parent, and destination relation pairs: `(resourceType, resourceId)`, `(parentResourceType, parentResourceId)`, and `(destinationResourceType, destinationResourceId)`. Legacy and TablesDB databases use `database`; the operational `resourceType` of a table migration is not rewritten to `tablesdb`.
244
244
  *
245
- * When restoring a DocumentsDB or VectorsDB database to a new resource from a dedicated source, the restore provisions a fresh dedicated backing database at the source database's own specification.
245
+ * When restoring a DocumentsDB or VectorsDB database from a dedicated source, the restore provisions a fresh dedicated backing database at the source database's own specification and lands the data there. An in-place restore swaps the database onto that backing only once the restore has succeeded, and retires the backing it displaced only once that swap is confirmed, so the source keeps serving its own data until the restored data is in place and any failure leaves it untouched. A serverless source has no dedicated backing to clone and restores onto the archived database instead.
246
246
  *
247
247
  *
248
248
  * @param {string} archiveId - Backup archive ID to restore
249
249
  * @param {BackupServices[]} services - Array of services to restore
250
- * @param {string} newResourceId - Destination resource ID. Omit to generate a new ID, or pass the archived resource ID to overwrite it. 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.
250
+ * @param {string} newResourceId - Destination resource ID. Omit to restore the archived resource in place, or pass a different ID to restore alongside it as a new resource. 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.
251
251
  * @param {string} newResourceName - Database name. Max length: 128 chars.
252
252
  * @throws {AppwriteException}
253
253
  * @returns {Promise<Models.BackupRestoration>}
@@ -193,6 +193,7 @@ export declare class DocumentsDB {
193
193
  * @param {string} params.databaseId - Database ID.
194
194
  * @param {string} params.name - Database name. Max length: 128 chars.
195
195
  * @param {boolean} params.enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
196
+ * @param {string} params.specification - Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.
196
197
  * @param {number} params.replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.
197
198
  * @throws {AppwriteException}
198
199
  * @returns {Promise<Models.Database>}
@@ -201,6 +202,7 @@ export declare class DocumentsDB {
201
202
  databaseId: string;
202
203
  name: string;
203
204
  enabled?: boolean;
205
+ specification?: string;
204
206
  replicas?: number;
205
207
  }): Promise<Models.Database>;
206
208
  /**
@@ -209,12 +211,13 @@ export declare class DocumentsDB {
209
211
  * @param {string} databaseId - Database ID.
210
212
  * @param {string} name - Database name. Max length: 128 chars.
211
213
  * @param {boolean} enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
214
+ * @param {string} specification - Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.
212
215
  * @param {number} replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.
213
216
  * @throws {AppwriteException}
214
217
  * @returns {Promise<Models.Database>}
215
218
  * @deprecated Use the object parameter style method for a better developer experience.
216
219
  */
217
- update(databaseId: string, name: string, enabled?: boolean, replicas?: number): Promise<Models.Database>;
220
+ update(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number): Promise<Models.Database>;
218
221
  /**
219
222
  * Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
220
223
  *
@@ -881,7 +884,7 @@ export declare class DocumentsDB {
881
884
  */
882
885
  deleteIndex(databaseId: string, collectionId: string, key: string): Promise<{}>;
883
886
  /**
884
- * 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.
887
+ * 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.
885
888
  *
886
889
  * @param {string} params.databaseId - Database ID.
887
890
  * @param {string} params.targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -893,7 +896,7 @@ export declare class DocumentsDB {
893
896
  targetReplicaId?: string;
894
897
  }): Promise<Models.DedicatedDatabase>;
895
898
  /**
896
- * 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.
899
+ * 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.
897
900
  *
898
901
  * @param {string} databaseId - Database ID.
899
902
  * @param {string} targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -567,7 +567,7 @@ export declare class Mongo {
567
567
  */
568
568
  updateCredentials(databaseId: string): Promise<Models.DedicatedDatabase>;
569
569
  /**
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.
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 by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.
571
571
  *
572
572
  * @param {string} params.databaseId - Database ID.
573
573
  * @param {string} params.targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -579,7 +579,7 @@ export declare class Mongo {
579
579
  targetReplicaId?: string;
580
580
  }): Promise<Models.DedicatedDatabase>;
581
581
  /**
582
- * 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.
582
+ * 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.
583
583
  *
584
584
  * @param {string} databaseId - Database ID.
585
585
  * @param {string} targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -595,7 +595,7 @@ export declare class Mysql {
595
595
  */
596
596
  createExecution(databaseId: string, sql: string, bindings?: object, timeoutSeconds?: number): Promise<Models.DedicatedDatabaseExecution>;
597
597
  /**
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.
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 by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.
599
599
  *
600
600
  * @param {string} params.databaseId - Database ID.
601
601
  * @param {string} params.targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -607,7 +607,7 @@ export declare class Mysql {
607
607
  targetReplicaId?: string;
608
608
  }): Promise<Models.DedicatedDatabase>;
609
609
  /**
610
- * 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.
610
+ * 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.
611
611
  *
612
612
  * @param {string} databaseId - Database ID.
613
613
  * @param {string} targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -658,7 +658,7 @@ export declare class Postgresql {
658
658
  */
659
659
  deleteExtension(databaseId: string, extensionName: string): Promise<Models.DedicatedDatabase>;
660
660
  /**
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.
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 by a failover that did not finish also accepts this call as a repair, provided `targetReplicaId` names the member to promote.
662
662
  *
663
663
  * @param {string} params.databaseId - Database ID.
664
664
  * @param {string} params.targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -670,7 +670,7 @@ export declare class Postgresql {
670
670
  targetReplicaId?: string;
671
671
  }): Promise<Models.DedicatedDatabase>;
672
672
  /**
673
- * 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.
673
+ * 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.
674
674
  *
675
675
  * @param {string} databaseId - Database ID.
676
676
  * @param {string} targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -209,6 +209,7 @@ export declare class Storage {
209
209
  * @param {string} params.fileId - File 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.
210
210
  * @param {File} params.file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).
211
211
  * @param {string[]} params.permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
212
+ * @param {string} params.folder - Virtual folder to place the file in, for example "photos/2026". Nest folders with `/`. Defaults to the bucket root.
212
213
  * @throws {AppwriteException}
213
214
  * @returns {Promise<Models.File>}
214
215
  */
@@ -217,6 +218,7 @@ export declare class Storage {
217
218
  fileId: string;
218
219
  file: File;
219
220
  permissions?: string[];
221
+ folder?: string;
220
222
  onProgress?: (progress: UploadProgress) => void;
221
223
  }): Promise<Models.File>;
222
224
  /**
@@ -233,11 +235,12 @@ export declare class Storage {
233
235
  * @param {string} fileId - File 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.
234
236
  * @param {File} file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).
235
237
  * @param {string[]} permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
238
+ * @param {string} folder - Virtual folder to place the file in, for example "photos/2026". Nest folders with `/`. Defaults to the bucket root.
236
239
  * @throws {AppwriteException}
237
240
  * @returns {Promise<Models.File>}
238
241
  * @deprecated Use the object parameter style method for a better developer experience.
239
242
  */
240
- createFile(bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void): Promise<Models.File>;
243
+ createFile(bucketId: string, fileId: string, file: File, permissions?: string[], folder?: string, onProgress?: (progress: UploadProgress) => void): Promise<Models.File>;
241
244
  /**
242
245
  * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.
243
246
  *
@@ -220,6 +220,7 @@ export declare class TablesDB {
220
220
  * @param {string} params.databaseId - Database ID.
221
221
  * @param {string} params.name - Database name. Max length: 128 chars.
222
222
  * @param {boolean} params.enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
223
+ * @param {string} params.specification - Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.
223
224
  * @param {number} params.replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.
224
225
  * @throws {AppwriteException}
225
226
  * @returns {Promise<Models.Database>}
@@ -228,6 +229,7 @@ export declare class TablesDB {
228
229
  databaseId: string;
229
230
  name?: string;
230
231
  enabled?: boolean;
232
+ specification?: string;
231
233
  replicas?: number;
232
234
  }): Promise<Models.Database>;
233
235
  /**
@@ -236,12 +238,13 @@ export declare class TablesDB {
236
238
  * @param {string} databaseId - Database ID.
237
239
  * @param {string} name - Database name. Max length: 128 chars.
238
240
  * @param {boolean} enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
241
+ * @param {string} specification - Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.
239
242
  * @param {number} replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.
240
243
  * @throws {AppwriteException}
241
244
  * @returns {Promise<Models.Database>}
242
245
  * @deprecated Use the object parameter style method for a better developer experience.
243
246
  */
244
- update(databaseId: string, name?: string, enabled?: boolean, replicas?: number): Promise<Models.Database>;
247
+ update(databaseId: string, name?: string, enabled?: boolean, specification?: string, replicas?: number): Promise<Models.Database>;
245
248
  /**
246
249
  * Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
247
250
  *
@@ -262,7 +265,7 @@ export declare class TablesDB {
262
265
  */
263
266
  delete(databaseId: string): Promise<{}>;
264
267
  /**
265
- * Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates.
268
+ * 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.
266
269
  *
267
270
  * @param {string} params.databaseId - Database ID.
268
271
  * @param {string} params.targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -274,7 +277,7 @@ export declare class TablesDB {
274
277
  targetReplicaId?: string;
275
278
  }): Promise<Models.DedicatedDatabase>;
276
279
  /**
277
- * Trigger a manual failover for a dedicated database with high availability enabled. Promotes a replica to primary. The failover runs asynchronously; poll the database document for status updates.
280
+ * 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.
278
281
  *
279
282
  * @param {string} databaseId - Database ID.
280
283
  * @param {string} targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -240,6 +240,7 @@ export declare class VectorsDB {
240
240
  * @param {string} params.databaseId - Database ID.
241
241
  * @param {string} params.name - Database name. Max length: 128 chars.
242
242
  * @param {boolean} params.enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
243
+ * @param {string} params.specification - Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.
243
244
  * @param {number} params.replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.
244
245
  * @throws {AppwriteException}
245
246
  * @returns {Promise<Models.Database>}
@@ -248,6 +249,7 @@ export declare class VectorsDB {
248
249
  databaseId: string;
249
250
  name: string;
250
251
  enabled?: boolean;
252
+ specification?: string;
251
253
  replicas?: number;
252
254
  }): Promise<Models.Database>;
253
255
  /**
@@ -256,12 +258,13 @@ export declare class VectorsDB {
256
258
  * @param {string} databaseId - Database ID.
257
259
  * @param {string} name - Database name. Max length: 128 chars.
258
260
  * @param {boolean} enabled - Is database enabled? When set to 'disabled', users cannot access the database but Server SDKs with an API key can still read and write to the database. No data is lost when this is toggled.
261
+ * @param {string} specification - Database specification. Resizing between dedicated specifications changes cpu, memory, storage and the connection ceiling via a rolling cutover with zero downtime. Moving a `serverless` database onto a dedicated specification is a data migration, not a resize.
259
262
  * @param {number} replicas - Number of high availability replicas (0-5) for the dedicated database backing this database. Only valid when the database is backed by a dedicated specification. High availability is enabled when greater than 0.
260
263
  * @throws {AppwriteException}
261
264
  * @returns {Promise<Models.Database>}
262
265
  * @deprecated Use the object parameter style method for a better developer experience.
263
266
  */
264
- update(databaseId: string, name: string, enabled?: boolean, replicas?: number): Promise<Models.Database>;
267
+ update(databaseId: string, name: string, enabled?: boolean, specification?: string, replicas?: number): Promise<Models.Database>;
265
268
  /**
266
269
  * Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
267
270
  *
@@ -887,7 +890,7 @@ export declare class VectorsDB {
887
890
  */
888
891
  deleteIndex(databaseId: string, collectionId: string, key: string): Promise<{}>;
889
892
  /**
890
- * 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.
893
+ * 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.
891
894
  *
892
895
  * @param {string} params.databaseId - Database ID.
893
896
  * @param {string} params.targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.
@@ -899,7 +902,7 @@ export declare class VectorsDB {
899
902
  targetReplicaId?: string;
900
903
  }): Promise<Models.DedicatedDatabase>;
901
904
  /**
902
- * 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.
905
+ * 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.
903
906
  *
904
907
  * @param {string} databaseId - Database ID.
905
908
  * @param {string} targetReplicaId - Target replica ID to promote. If not specified, the healthiest replica is selected.