@appwrite.io/console 3.1.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/sdk.js +516 -119
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +517 -120
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +516 -119
  8. package/docs/examples/databases/list-documents.md +2 -1
  9. package/docs/examples/domains/confirm-purchase.md +16 -0
  10. package/docs/examples/domains/confirm-transfer-in.md +16 -0
  11. package/docs/examples/domains/create-purchase.md +1 -1
  12. package/docs/examples/domains/create-transfer-in.md +18 -0
  13. package/docs/examples/domains/create-transfer-out.md +16 -0
  14. package/docs/examples/domains/get-transfer-status.md +15 -0
  15. package/docs/examples/functions/create.md +3 -1
  16. package/docs/examples/functions/update.md +3 -1
  17. package/docs/examples/health/get-console-pausing.md +16 -0
  18. package/docs/examples/migrations/create-appwrite-migration.md +2 -2
  19. package/docs/examples/migrations/create-firebase-migration.md +2 -2
  20. package/docs/examples/migrations/create-n-host-migration.md +2 -2
  21. package/docs/examples/migrations/create-supabase-migration.md +2 -2
  22. package/docs/examples/migrations/get-appwrite-report.md +2 -2
  23. package/docs/examples/migrations/get-firebase-report.md +2 -2
  24. package/docs/examples/migrations/get-n-host-report.md +2 -2
  25. package/docs/examples/migrations/get-supabase-report.md +2 -2
  26. package/docs/examples/projects/update-console-access.md +15 -0
  27. package/docs/examples/projects/update-status.md +16 -0
  28. package/docs/examples/sites/create-deployment.md +2 -2
  29. package/docs/examples/sites/create.md +4 -1
  30. package/docs/examples/sites/update.md +4 -1
  31. package/docs/examples/tablesdb/list-rows.md +2 -1
  32. package/package.json +1 -1
  33. package/src/channel.ts +19 -15
  34. package/src/client.ts +5 -1
  35. package/src/enums/appwrite-migration-resource.ts +25 -0
  36. package/src/enums/build-runtime.ts +3 -0
  37. package/src/enums/domain-purchase-payment-status.ts +10 -0
  38. package/src/enums/domain-transfer-status-status.ts +10 -0
  39. package/src/enums/firebase-migration-resource.ts +12 -0
  40. package/src/enums/{resources.ts → n-host-migration-resource.ts} +1 -1
  41. package/src/enums/runtime.ts +3 -0
  42. package/src/enums/runtimes.ts +3 -0
  43. package/src/enums/status.ts +3 -0
  44. package/src/enums/supabase-migration-resource.ts +13 -0
  45. package/src/index.ts +7 -1
  46. package/src/models.ts +209 -7
  47. package/src/services/account.ts +4 -4
  48. package/src/services/databases.ts +100 -93
  49. package/src/services/domains.ts +342 -13
  50. package/src/services/functions.ts +52 -24
  51. package/src/services/health.ts +61 -0
  52. package/src/services/messaging.ts +2 -2
  53. package/src/services/migrations.ts +68 -65
  54. package/src/services/organizations.ts +2 -2
  55. package/src/services/projects.ts +120 -0
  56. package/src/services/sites.ts +96 -57
  57. package/src/services/tables-db.ts +14 -7
  58. package/src/services/teams.ts +4 -4
  59. package/types/channel.d.ts +9 -9
  60. package/types/enums/appwrite-migration-resource.d.ts +25 -0
  61. package/types/enums/build-runtime.d.ts +3 -0
  62. package/types/enums/domain-purchase-payment-status.d.ts +10 -0
  63. package/types/enums/domain-transfer-status-status.d.ts +10 -0
  64. package/types/enums/firebase-migration-resource.d.ts +12 -0
  65. package/types/enums/{resources.d.ts → n-host-migration-resource.d.ts} +1 -1
  66. package/types/enums/runtime.d.ts +3 -0
  67. package/types/enums/runtimes.d.ts +3 -0
  68. package/types/enums/status.d.ts +3 -0
  69. package/types/enums/supabase-migration-resource.d.ts +13 -0
  70. package/types/index.d.ts +7 -1
  71. package/types/models.d.ts +207 -7
  72. package/types/services/account.d.ts +2 -2
  73. package/types/services/databases.d.ts +40 -37
  74. package/types/services/domains.d.ts +117 -4
  75. package/types/services/functions.d.ts +20 -8
  76. package/types/services/health.d.ts +24 -0
  77. package/types/services/messaging.d.ts +2 -2
  78. package/types/services/migrations.d.ts +36 -33
  79. package/types/services/organizations.d.ts +2 -2
  80. package/types/services/projects.d.ts +46 -0
  81. package/types/services/sites.d.ts +30 -12
  82. package/types/services/tables-db.d.ts +4 -1
  83. package/types/services/teams.d.ts +4 -4
package/types/index.d.ts CHANGED
@@ -71,7 +71,10 @@ export { ExecutionMethod } from './enums/execution-method';
71
71
  export { Name } from './enums/name';
72
72
  export { MessagePriority } from './enums/message-priority';
73
73
  export { SmtpEncryption } from './enums/smtp-encryption';
74
- export { Resources } from './enums/resources';
74
+ export { AppwriteMigrationResource } from './enums/appwrite-migration-resource';
75
+ export { FirebaseMigrationResource } from './enums/firebase-migration-resource';
76
+ export { NHostMigrationResource } from './enums/n-host-migration-resource';
77
+ export { SupabaseMigrationResource } from './enums/supabase-migration-resource';
75
78
  export { ProjectUsageRange } from './enums/project-usage-range';
76
79
  export { Region } from './enums/region';
77
80
  export { Api } from './enums/api';
@@ -80,6 +83,7 @@ export { PlatformType } from './enums/platform-type';
80
83
  export { ResourceType } from './enums/resource-type';
81
84
  export { ApiService } from './enums/api-service';
82
85
  export { SMTPSecure } from './enums/smtp-secure';
86
+ export { Status } from './enums/status';
83
87
  export { EmailTemplateType } from './enums/email-template-type';
84
88
  export { EmailTemplateLocale } from './enums/email-template-locale';
85
89
  export { SmsTemplateType } from './enums/sms-template-type';
@@ -108,3 +112,5 @@ export { ProxyRuleDeploymentResourceType } from './enums/proxy-rule-deployment-r
108
112
  export { ProxyRuleStatus } from './enums/proxy-rule-status';
109
113
  export { MessageStatus } from './enums/message-status';
110
114
  export { BillingPlanGroup } from './enums/billing-plan-group';
115
+ export { DomainPurchasePaymentStatus } from './enums/domain-purchase-payment-status';
116
+ export { DomainTransferStatusStatus } from './enums/domain-transfer-status-status';
package/types/models.d.ts CHANGED
@@ -12,6 +12,8 @@ import { ProxyRuleDeploymentResourceType } from "./enums/proxy-rule-deployment-r
12
12
  import { ProxyRuleStatus } from "./enums/proxy-rule-status";
13
13
  import { MessageStatus } from "./enums/message-status";
14
14
  import { BillingPlanGroup } from "./enums/billing-plan-group";
15
+ import { DomainPurchasePaymentStatus } from "./enums/domain-purchase-payment-status";
16
+ import { DomainTransferStatusStatus } from "./enums/domain-transfer-status-status";
15
17
  /**
16
18
  * Appwrite Models
17
19
  */
@@ -2531,7 +2533,7 @@ export declare namespace Models {
2531
2533
  */
2532
2534
  $id: string;
2533
2535
  /**
2534
- * Row automatically incrementing ID.
2536
+ * Row sequence ID.
2535
2537
  */
2536
2538
  $sequence: number;
2537
2539
  /**
@@ -2568,7 +2570,7 @@ export declare namespace Models {
2568
2570
  */
2569
2571
  $id: string;
2570
2572
  /**
2571
- * Document automatically incrementing ID.
2573
+ * Document sequence ID.
2572
2574
  */
2573
2575
  $sequence: number;
2574
2576
  /**
@@ -3400,6 +3402,10 @@ export declare namespace Models {
3400
3402
  * Site framework.
3401
3403
  */
3402
3404
  framework: string;
3405
+ /**
3406
+ * How many days to keep the non-active deployments before they will be automatically deleted.
3407
+ */
3408
+ deploymentRetention: number;
3403
3409
  /**
3404
3410
  * Site's active deployment ID.
3405
3411
  */
@@ -3444,6 +3450,10 @@ export declare namespace Models {
3444
3450
  * The build command used to build the site.
3445
3451
  */
3446
3452
  buildCommand: string;
3453
+ /**
3454
+ * Custom command to use when starting site runtime.
3455
+ */
3456
+ startCommand: string;
3447
3457
  /**
3448
3458
  * The directory where the site build output is located.
3449
3459
  */
@@ -3469,9 +3479,13 @@ export declare namespace Models {
3469
3479
  */
3470
3480
  providerSilentMode: boolean;
3471
3481
  /**
3472
- * Machine specification for builds and executions.
3482
+ * Machine specification for deployment builds.
3473
3483
  */
3474
- specification: string;
3484
+ buildSpecification: string;
3485
+ /**
3486
+ * Machine specification for SSR executions.
3487
+ */
3488
+ runtimeSpecification: string;
3475
3489
  /**
3476
3490
  * Site build runtime.
3477
3491
  */
@@ -3623,6 +3637,10 @@ export declare namespace Models {
3623
3637
  * Function execution and build runtime.
3624
3638
  */
3625
3639
  runtime: string;
3640
+ /**
3641
+ * How many days to keep the non-active deployments before they will be automatically deleted.
3642
+ */
3643
+ deploymentRetention: number;
3626
3644
  /**
3627
3645
  * Function's active deployment ID.
3628
3646
  */
@@ -3696,9 +3714,13 @@ export declare namespace Models {
3696
3714
  */
3697
3715
  providerSilentMode: boolean;
3698
3716
  /**
3699
- * Machine specification for builds and executions.
3717
+ * Machine specification for deployment builds.
3718
+ */
3719
+ buildSpecification: string;
3720
+ /**
3721
+ * Machine specification for executions.
3700
3722
  */
3701
- specification: string;
3723
+ runtimeSpecification: string;
3702
3724
  };
3703
3725
  /**
3704
3726
  * Template Function
@@ -3884,6 +3906,14 @@ export declare namespace Models {
3884
3906
  * VCS (Version Control System) repository's default branch name.
3885
3907
  */
3886
3908
  defaultBranch: string;
3909
+ /**
3910
+ * VCS (Version Control System) installation ID.
3911
+ */
3912
+ providerInstallationId: string;
3913
+ /**
3914
+ * Is VCS (Version Control System) repository authorized for the installation?
3915
+ */
3916
+ authorized: boolean;
3887
3917
  /**
3888
3918
  * Last commit date in ISO 8601 format.
3889
3919
  */
@@ -3921,6 +3951,14 @@ export declare namespace Models {
3921
3951
  * VCS (Version Control System) repository's default branch name.
3922
3952
  */
3923
3953
  defaultBranch: string;
3954
+ /**
3955
+ * VCS (Version Control System) installation ID.
3956
+ */
3957
+ providerInstallationId: string;
3958
+ /**
3959
+ * Is VCS (Version Control System) repository authorized for the installation?
3960
+ */
3961
+ authorized: boolean;
3924
3962
  /**
3925
3963
  * Last commit date in ISO 8601 format.
3926
3964
  */
@@ -3962,6 +4000,14 @@ export declare namespace Models {
3962
4000
  * VCS (Version Control System) repository's default branch name.
3963
4001
  */
3964
4002
  defaultBranch: string;
4003
+ /**
4004
+ * VCS (Version Control System) installation ID.
4005
+ */
4006
+ providerInstallationId: string;
4007
+ /**
4008
+ * Is VCS (Version Control System) repository authorized for the installation?
4009
+ */
4010
+ authorized: boolean;
3965
4011
  /**
3966
4012
  * Last commit date in ISO 8601 format.
3967
4013
  */
@@ -4609,6 +4655,10 @@ export declare namespace Models {
4609
4655
  * Project blocks information
4610
4656
  */
4611
4657
  blocks: Block[];
4658
+ /**
4659
+ * Last time the project was accessed via console. Used with plan's projectInactivityDays to determine if project is paused.
4660
+ */
4661
+ consoleAccessedAt: string;
4612
4662
  };
4613
4663
  /**
4614
4664
  * Webhook
@@ -5932,6 +5982,22 @@ export declare namespace Models {
5932
5982
  * Total aggregated number of image transformations.
5933
5983
  */
5934
5984
  imageTransformationsTotal: number;
5985
+ /**
5986
+ * Aggregated number of function executions per period.
5987
+ */
5988
+ functionsExecutions: Metric[];
5989
+ /**
5990
+ * Total aggregated number of function executions.
5991
+ */
5992
+ functionsExecutionsTotal: number;
5993
+ /**
5994
+ * Aggregated number of site executions per period.
5995
+ */
5996
+ sitesExecutions: Metric[];
5997
+ /**
5998
+ * Total aggregated number of site executions.
5999
+ */
6000
+ sitesExecutionsTotal: number;
5935
6001
  /**
5936
6002
  * Aggregated stats for total network bandwidth.
5937
6003
  */
@@ -5956,6 +6022,30 @@ export declare namespace Models {
5956
6022
  * Total aggregated number of Imagine credits.
5957
6023
  */
5958
6024
  imagineCreditsTotal: number;
6025
+ /**
6026
+ * Current aggregated number of open Realtime connections.
6027
+ */
6028
+ realtimeConnectionsTotal: number;
6029
+ /**
6030
+ * Total number of Realtime messages sent to clients.
6031
+ */
6032
+ realtimeMessagesTotal: number;
6033
+ /**
6034
+ * Total consumed Realtime bandwidth (in bytes).
6035
+ */
6036
+ realtimeBandwidthTotal: number;
6037
+ /**
6038
+ * Aggregated number of open Realtime connections per period.
6039
+ */
6040
+ realtimeConnections: Metric[];
6041
+ /**
6042
+ * Aggregated number of Realtime messages sent to clients per period.
6043
+ */
6044
+ realtimeMessages: Metric[];
6045
+ /**
6046
+ * Aggregated consumed Realtime bandwidth (in bytes) per period.
6047
+ */
6048
+ realtimeBandwidth: Metric[];
5959
6049
  };
5960
6050
  /**
5961
6051
  * Headers
@@ -6219,6 +6309,50 @@ export declare namespace Models {
6219
6309
  * Comma-separated list of nameservers.
6220
6310
  */
6221
6311
  _APP_DOMAINS_NAMESERVERS: string;
6312
+ /**
6313
+ * Database adapter in use.
6314
+ */
6315
+ _APP_DB_ADAPTER: string;
6316
+ /**
6317
+ * Whether the database adapter supports relationships.
6318
+ */
6319
+ supportForRelationships: boolean;
6320
+ /**
6321
+ * Whether the database adapter supports operators.
6322
+ */
6323
+ supportForOperators: boolean;
6324
+ /**
6325
+ * Whether the database adapter supports spatial attributes.
6326
+ */
6327
+ supportForSpatials: boolean;
6328
+ /**
6329
+ * Whether the database adapter supports spatial indexes on nullable columns.
6330
+ */
6331
+ supportForSpatialIndexNull: boolean;
6332
+ /**
6333
+ * Whether the database adapter supports fulltext wildcard search.
6334
+ */
6335
+ supportForFulltextWildcard: boolean;
6336
+ /**
6337
+ * Whether the database adapter supports multiple fulltext indexes per collection.
6338
+ */
6339
+ supportForMultipleFulltextIndexes: boolean;
6340
+ /**
6341
+ * Whether the database adapter supports resizing attributes.
6342
+ */
6343
+ supportForAttributeResizing: boolean;
6344
+ /**
6345
+ * Whether the database adapter supports fixed schemas with row width limits.
6346
+ */
6347
+ supportForSchemas: boolean;
6348
+ /**
6349
+ * Maximum index length supported by the database adapter.
6350
+ */
6351
+ maxIndexLength: number;
6352
+ /**
6353
+ * Whether the database adapter uses integer sequence IDs.
6354
+ */
6355
+ supportForIntegerIds: boolean;
6222
6356
  };
6223
6357
  /**
6224
6358
  * MFA Challenge
@@ -6619,6 +6753,26 @@ export declare namespace Models {
6619
6753
  * Number of functions to be migrated.
6620
6754
  */
6621
6755
  function: number;
6756
+ /**
6757
+ * Number of sites to be migrated.
6758
+ */
6759
+ site: number;
6760
+ /**
6761
+ * Number of providers to be migrated.
6762
+ */
6763
+ provider: number;
6764
+ /**
6765
+ * Number of topics to be migrated.
6766
+ */
6767
+ topic: number;
6768
+ /**
6769
+ * Number of subscribers to be migrated.
6770
+ */
6771
+ subscriber: number;
6772
+ /**
6773
+ * Number of messages to be migrated.
6774
+ */
6775
+ message: number;
6622
6776
  /**
6623
6777
  * Size of files to be migrated in mb.
6624
6778
  */
@@ -7154,6 +7308,10 @@ export declare namespace Models {
7154
7308
  * Log days
7155
7309
  */
7156
7310
  logs: number;
7311
+ /**
7312
+ * Number of days of console inactivity before a project is paused. 0 means pausing is disabled.
7313
+ */
7314
+ projectInactivityDays: number;
7157
7315
  /**
7158
7316
  * Alert threshold percentage
7159
7317
  */
@@ -8345,7 +8503,11 @@ export declare namespace Models {
8345
8503
  /**
8346
8504
  * Payment status for domain purchase.
8347
8505
  */
8348
- paymentStatus: string;
8506
+ paymentStatus: DomainPurchasePaymentStatus;
8507
+ /**
8508
+ * Client secret for payment confirmation. Present only when paymentStatus is pending_confirmation.
8509
+ */
8510
+ clientSecret: string;
8349
8511
  /**
8350
8512
  * Nameservers setting. "Appwrite" or empty string.
8351
8513
  */
@@ -8374,6 +8536,14 @@ export declare namespace Models {
8374
8536
  * Dns records
8375
8537
  */
8376
8538
  dnsRecords: DnsRecord[];
8539
+ /**
8540
+ * Domain transfer status (e.g., "pending", "completed", "failed").
8541
+ */
8542
+ transferStatus: string;
8543
+ /**
8544
+ * Retry attempts for the current domain payment flow. Development only.
8545
+ */
8546
+ attempts: number;
8377
8547
  };
8378
8548
  /**
8379
8549
  * DNSRecord
@@ -8622,6 +8792,10 @@ export declare namespace Models {
8622
8792
  * Price period in years.
8623
8793
  */
8624
8794
  periodYears: number;
8795
+ /**
8796
+ * Whether the domain is a premium domain.
8797
+ */
8798
+ premium: boolean;
8625
8799
  };
8626
8800
  /**
8627
8801
  * DomainSuggestion
@@ -8644,6 +8818,32 @@ export declare namespace Models {
8644
8818
  */
8645
8819
  available: boolean;
8646
8820
  };
8821
+ /**
8822
+ * domainTransferOut
8823
+ */
8824
+ export type DomainTransferOut = {
8825
+ /**
8826
+ * Domain transfer authorization code.
8827
+ */
8828
+ authCode: string;
8829
+ };
8830
+ /**
8831
+ * domainTransferStatus
8832
+ */
8833
+ export type DomainTransferStatus = {
8834
+ /**
8835
+ * Transfer status.
8836
+ */
8837
+ status: DomainTransferStatusStatus;
8838
+ /**
8839
+ * Additional transfer status information.
8840
+ */
8841
+ reason: string;
8842
+ /**
8843
+ * Transfer status timestamp in ISO 8601 format.
8844
+ */
8845
+ timestamp: string;
8846
+ };
8647
8847
  /**
8648
8848
  * Activity event list
8649
8849
  */
@@ -266,7 +266,7 @@ export declare class Account {
266
266
  /**
267
267
  * List all invoices tied to an account.
268
268
  *
269
- * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, amount, currency, from, to, dueAt, attempts, status, grossAmount
269
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount
270
270
  * @throws {AppwriteException}
271
271
  * @returns {Promise<Models.InvoiceList>}
272
272
  */
@@ -276,7 +276,7 @@ export declare class Account {
276
276
  /**
277
277
  * List all invoices tied to an account.
278
278
  *
279
- * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, amount, currency, from, to, dueAt, attempts, status, grossAmount
279
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount
280
280
  * @throws {AppwriteException}
281
281
  * @returns {Promise<Models.InvoiceList>}
282
282
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -456,7 +456,7 @@ export declare class Databases {
456
456
  *
457
457
  *
458
458
  * @param {string} params.databaseId - Database ID.
459
- * @param {string} params.collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
459
+ * @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
460
460
  * @param {string} params.key - Attribute Key.
461
461
  * @param {boolean} params.required - Is attribute required?
462
462
  * @param {boolean} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
@@ -478,7 +478,7 @@ export declare class Databases {
478
478
  *
479
479
  *
480
480
  * @param {string} databaseId - Database ID.
481
- * @param {string} collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
481
+ * @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
482
482
  * @param {string} key - Attribute Key.
483
483
  * @param {boolean} required - Is attribute required?
484
484
  * @param {boolean} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
@@ -1387,6 +1387,40 @@ export declare class Databases {
1387
1387
  * @deprecated Use the object parameter style method for a better developer experience.
1388
1388
  */
1389
1389
  createRelationshipAttribute(databaseId: string, collectionId: string, relatedCollectionId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate): Promise<Models.AttributeRelationship>;
1390
+ /**
1391
+ * Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
1392
+ *
1393
+ *
1394
+ * @param {string} params.databaseId - Database ID.
1395
+ * @param {string} params.collectionId - Collection ID.
1396
+ * @param {string} params.key - Attribute Key.
1397
+ * @param {RelationMutate} params.onDelete - Constraints option
1398
+ * @param {string} params.newKey - New Attribute Key.
1399
+ * @throws {AppwriteException}
1400
+ * @returns {Promise<Models.AttributeRelationship>}
1401
+ * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRelationshipColumn` instead.
1402
+ */
1403
+ updateRelationshipAttribute(params: {
1404
+ databaseId: string;
1405
+ collectionId: string;
1406
+ key: string;
1407
+ onDelete?: RelationMutate;
1408
+ newKey?: string;
1409
+ }): Promise<Models.AttributeRelationship>;
1410
+ /**
1411
+ * Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
1412
+ *
1413
+ *
1414
+ * @param {string} databaseId - Database ID.
1415
+ * @param {string} collectionId - Collection ID.
1416
+ * @param {string} key - Attribute Key.
1417
+ * @param {RelationMutate} onDelete - Constraints option
1418
+ * @param {string} newKey - New Attribute Key.
1419
+ * @throws {AppwriteException}
1420
+ * @returns {Promise<Models.AttributeRelationship>}
1421
+ * @deprecated Use the object parameter style method for a better developer experience.
1422
+ */
1423
+ updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string): Promise<Models.AttributeRelationship>;
1390
1424
  /**
1391
1425
  * Create a string attribute.
1392
1426
  *
@@ -1752,40 +1786,6 @@ export declare class Databases {
1752
1786
  * @deprecated Use the object parameter style method for a better developer experience.
1753
1787
  */
1754
1788
  deleteAttribute(databaseId: string, collectionId: string, key: string): Promise<{}>;
1755
- /**
1756
- * Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
1757
- *
1758
- *
1759
- * @param {string} params.databaseId - Database ID.
1760
- * @param {string} params.collectionId - Collection ID.
1761
- * @param {string} params.key - Attribute Key.
1762
- * @param {RelationMutate} params.onDelete - Constraints option
1763
- * @param {string} params.newKey - New Attribute Key.
1764
- * @throws {AppwriteException}
1765
- * @returns {Promise<Models.AttributeRelationship>}
1766
- * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRelationshipColumn` instead.
1767
- */
1768
- updateRelationshipAttribute(params: {
1769
- databaseId: string;
1770
- collectionId: string;
1771
- key: string;
1772
- onDelete?: RelationMutate;
1773
- newKey?: string;
1774
- }): Promise<Models.AttributeRelationship>;
1775
- /**
1776
- * Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
1777
- *
1778
- *
1779
- * @param {string} databaseId - Database ID.
1780
- * @param {string} collectionId - Collection ID.
1781
- * @param {string} key - Attribute Key.
1782
- * @param {RelationMutate} onDelete - Constraints option
1783
- * @param {string} newKey - New Attribute Key.
1784
- * @throws {AppwriteException}
1785
- * @returns {Promise<Models.AttributeRelationship>}
1786
- * @deprecated Use the object parameter style method for a better developer experience.
1787
- */
1788
- updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string): Promise<Models.AttributeRelationship>;
1789
1789
  /**
1790
1790
  * Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
1791
1791
  *
@@ -1794,6 +1794,7 @@ export declare class Databases {
1794
1794
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1795
1795
  * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
1796
1796
  * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1797
+ * @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
1797
1798
  * @throws {AppwriteException}
1798
1799
  * @returns {Promise<Models.DocumentList<Document>>}
1799
1800
  * @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.
@@ -1804,6 +1805,7 @@ export declare class Databases {
1804
1805
  queries?: string[];
1805
1806
  transactionId?: string;
1806
1807
  total?: boolean;
1808
+ ttl?: number;
1807
1809
  }): Promise<Models.DocumentList<Document>>;
1808
1810
  /**
1809
1811
  * Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
@@ -1813,11 +1815,12 @@ export declare class Databases {
1813
1815
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
1814
1816
  * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
1815
1817
  * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1818
+ * @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
1816
1819
  * @throws {AppwriteException}
1817
1820
  * @returns {Promise<Models.DocumentList<Document>>}
1818
1821
  * @deprecated Use the object parameter style method for a better developer experience.
1819
1822
  */
1820
- listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.DocumentList<Document>>;
1823
+ listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number): Promise<Models.DocumentList<Document>>;
1821
1824
  /**
1822
1825
  * Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
1823
1826
  *