@appwrite.io/console 3.0.0 → 4.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 (69) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/sdk.js +470 -83
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +471 -84
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +470 -83
  8. package/docs/examples/databases/list-documents.md +2 -1
  9. package/docs/examples/domains/create-purchase.md +25 -0
  10. package/docs/examples/domains/create-transfer-in.md +18 -0
  11. package/docs/examples/domains/create-transfer-out.md +16 -0
  12. package/docs/examples/domains/get-transfer-status.md +15 -0
  13. package/docs/examples/health/get-console-pausing.md +16 -0
  14. package/docs/examples/migrations/create-appwrite-migration.md +2 -2
  15. package/docs/examples/migrations/create-firebase-migration.md +2 -2
  16. package/docs/examples/migrations/create-n-host-migration.md +2 -2
  17. package/docs/examples/migrations/create-supabase-migration.md +2 -2
  18. package/docs/examples/migrations/get-appwrite-report.md +2 -2
  19. package/docs/examples/migrations/get-firebase-report.md +2 -2
  20. package/docs/examples/migrations/get-n-host-report.md +2 -2
  21. package/docs/examples/migrations/get-supabase-report.md +2 -2
  22. package/docs/examples/organizations/get-scopes.md +2 -1
  23. package/docs/examples/projects/update-console-access.md +15 -0
  24. package/docs/examples/projects/update-status.md +16 -0
  25. package/docs/examples/sites/create-deployment.md +2 -2
  26. package/docs/examples/tablesdb/list-rows.md +2 -1
  27. package/package.json +1 -1
  28. package/src/channel.ts +19 -15
  29. package/src/client.ts +7 -2
  30. package/src/enums/appwrite-migration-resource.ts +21 -0
  31. package/src/enums/domain-transfer-status-status.ts +10 -0
  32. package/src/enums/firebase-migration-resource.ts +12 -0
  33. package/src/enums/{resources.ts → n-host-migration-resource.ts} +1 -1
  34. package/src/enums/status.ts +3 -0
  35. package/src/enums/supabase-migration-resource.ts +13 -0
  36. package/src/index.ts +6 -1
  37. package/src/models.ts +124 -3
  38. package/src/query.ts +26 -0
  39. package/src/services/account.ts +2 -2
  40. package/src/services/databases.ts +100 -93
  41. package/src/services/domains.ts +350 -0
  42. package/src/services/health.ts +61 -0
  43. package/src/services/messaging.ts +2 -2
  44. package/src/services/migrations.ts +68 -65
  45. package/src/services/organizations.ts +14 -6
  46. package/src/services/projects.ts +120 -0
  47. package/src/services/sites.ts +13 -16
  48. package/src/services/tables-db.ts +14 -7
  49. package/src/services/teams.ts +4 -4
  50. package/types/channel.d.ts +9 -9
  51. package/types/enums/appwrite-migration-resource.d.ts +21 -0
  52. package/types/enums/domain-transfer-status-status.d.ts +10 -0
  53. package/types/enums/firebase-migration-resource.d.ts +12 -0
  54. package/types/enums/{resources.d.ts → n-host-migration-resource.d.ts} +1 -1
  55. package/types/enums/status.d.ts +3 -0
  56. package/types/enums/supabase-migration-resource.d.ts +13 -0
  57. package/types/index.d.ts +6 -1
  58. package/types/models.d.ts +122 -3
  59. package/types/query.d.ts +22 -0
  60. package/types/services/databases.d.ts +40 -37
  61. package/types/services/domains.d.ts +118 -0
  62. package/types/services/health.d.ts +24 -0
  63. package/types/services/messaging.d.ts +2 -2
  64. package/types/services/migrations.d.ts +36 -33
  65. package/types/services/organizations.d.ts +4 -1
  66. package/types/services/projects.d.ts +46 -0
  67. package/types/services/sites.d.ts +4 -4
  68. package/types/services/tables-db.d.ts +4 -1
  69. package/types/services/teams.d.ts +4 -4
@@ -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
  *
@@ -74,6 +74,55 @@ export declare class Domains {
74
74
  * @deprecated Use the object parameter style method for a better developer experience.
75
75
  */
76
76
  getPrice(domain: string, periodYears?: number, registrationType?: RegistrationType): Promise<Models.DomainPrice>;
77
+ /**
78
+ * Create a domain purchase with registrant information.
79
+ *
80
+ * @param {string} params.domain - Fully qualified domain name to purchase (for example, example.com).
81
+ * @param {string} params.organizationId - Team ID that will own the domain.
82
+ * @param {string} params.firstName - Registrant first name used for domain registration.
83
+ * @param {string} params.lastName - Registrant last name used for domain registration.
84
+ * @param {string} params.email - Registrant email address for registration and notices.
85
+ * @param {string} params.phone - Registrant phone number in E.164 format (for example, +15555551234).
86
+ * @param {string} params.billingAddressId - Billing address ID used for registration contact details.
87
+ * @param {string} params.paymentMethodId - Payment method ID to authorize and capture the purchase.
88
+ * @param {string} params.addressLine3 - Additional address line for the registrant (line 3).
89
+ * @param {string} params.companyName - Company or organization name for the registrant.
90
+ * @param {number} params.periodYears - Registration term in years (1-10).
91
+ * @throws {AppwriteException}
92
+ * @returns {Promise<Models.Domain>}
93
+ */
94
+ createPurchase(params: {
95
+ domain: string;
96
+ organizationId: string;
97
+ firstName: string;
98
+ lastName: string;
99
+ email: string;
100
+ phone: string;
101
+ billingAddressId: string;
102
+ paymentMethodId: string;
103
+ addressLine3?: string;
104
+ companyName?: string;
105
+ periodYears?: number;
106
+ }): Promise<Models.Domain>;
107
+ /**
108
+ * Create a domain purchase with registrant information.
109
+ *
110
+ * @param {string} domain - Fully qualified domain name to purchase (for example, example.com).
111
+ * @param {string} organizationId - Team ID that will own the domain.
112
+ * @param {string} firstName - Registrant first name used for domain registration.
113
+ * @param {string} lastName - Registrant last name used for domain registration.
114
+ * @param {string} email - Registrant email address for registration and notices.
115
+ * @param {string} phone - Registrant phone number in E.164 format (for example, +15555551234).
116
+ * @param {string} billingAddressId - Billing address ID used for registration contact details.
117
+ * @param {string} paymentMethodId - Payment method ID to authorize and capture the purchase.
118
+ * @param {string} addressLine3 - Additional address line for the registrant (line 3).
119
+ * @param {string} companyName - Company or organization name for the registrant.
120
+ * @param {number} periodYears - Registration term in years (1-10).
121
+ * @throws {AppwriteException}
122
+ * @returns {Promise<Models.Domain>}
123
+ * @deprecated Use the object parameter style method for a better developer experience.
124
+ */
125
+ createPurchase(domain: string, organizationId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number): Promise<Models.Domain>;
77
126
  /**
78
127
  * List domain suggestions.
79
128
  *
@@ -108,6 +157,56 @@ export declare class Domains {
108
157
  * @deprecated Use the object parameter style method for a better developer experience.
109
158
  */
110
159
  listSuggestions(query: string, tlds?: string[], limit?: number, filterType?: FilterType, priceMax?: number, priceMin?: number): Promise<Models.DomainSuggestionsList>;
160
+ /**
161
+ * Create a domain transfer in with authorization code and registrant information.
162
+ *
163
+ * @param {string} params.domain - Domain name to transfer in.
164
+ * @param {string} params.organizationId - Organization ID that this domain will belong to.
165
+ * @param {string} params.authCode - Authorization code for the domain transfer.
166
+ * @param {string} params.paymentMethodId - Payment method ID to authorize and capture the transfer.
167
+ * @throws {AppwriteException}
168
+ * @returns {Promise<Models.Domain>}
169
+ */
170
+ createTransferIn(params: {
171
+ domain: string;
172
+ organizationId: string;
173
+ authCode: string;
174
+ paymentMethodId: string;
175
+ }): Promise<Models.Domain>;
176
+ /**
177
+ * Create a domain transfer in with authorization code and registrant information.
178
+ *
179
+ * @param {string} domain - Domain name to transfer in.
180
+ * @param {string} organizationId - Organization ID that this domain will belong to.
181
+ * @param {string} authCode - Authorization code for the domain transfer.
182
+ * @param {string} paymentMethodId - Payment method ID to authorize and capture the transfer.
183
+ * @throws {AppwriteException}
184
+ * @returns {Promise<Models.Domain>}
185
+ * @deprecated Use the object parameter style method for a better developer experience.
186
+ */
187
+ createTransferIn(domain: string, organizationId: string, authCode: string, paymentMethodId: string): Promise<Models.Domain>;
188
+ /**
189
+ * Create a domain transfer out and return the authorization code.
190
+ *
191
+ * @param {string} params.domainId - Domain unique ID.
192
+ * @param {string} params.organizationId - Organization ID that this domain belongs to.
193
+ * @throws {AppwriteException}
194
+ * @returns {Promise<Models.DomainTransferOut>}
195
+ */
196
+ createTransferOut(params: {
197
+ domainId: string;
198
+ organizationId: string;
199
+ }): Promise<Models.DomainTransferOut>;
200
+ /**
201
+ * Create a domain transfer out and return the authorization code.
202
+ *
203
+ * @param {string} domainId - Domain unique ID.
204
+ * @param {string} organizationId - Organization ID that this domain belongs to.
205
+ * @throws {AppwriteException}
206
+ * @returns {Promise<Models.DomainTransferOut>}
207
+ * @deprecated Use the object parameter style method for a better developer experience.
208
+ */
209
+ createTransferOut(domainId: string, organizationId: string): Promise<Models.DomainTransferOut>;
111
210
  /**
112
211
  * Get a domain by its unique ID.
113
212
  *
@@ -1289,6 +1388,25 @@ export declare class Domains {
1289
1388
  * @deprecated Use the object parameter style method for a better developer experience.
1290
1389
  */
1291
1390
  updateTeam(domainId: string, teamId: string): Promise<Models.Domain>;
1391
+ /**
1392
+ * Get the transfer status for a domain.
1393
+ *
1394
+ * @param {string} params.domainId - Domain unique ID.
1395
+ * @throws {AppwriteException}
1396
+ * @returns {Promise<Models.DomainTransferStatus>}
1397
+ */
1398
+ getTransferStatus(params: {
1399
+ domainId: string;
1400
+ }): Promise<Models.DomainTransferStatus>;
1401
+ /**
1402
+ * Get the transfer status for a domain.
1403
+ *
1404
+ * @param {string} domainId - Domain unique ID.
1405
+ * @throws {AppwriteException}
1406
+ * @returns {Promise<Models.DomainTransferStatus>}
1407
+ * @deprecated Use the object parameter style method for a better developer experience.
1408
+ */
1409
+ getTransferStatus(domainId: string): Promise<Models.DomainTransferStatus>;
1292
1410
  /**
1293
1411
  * Retrieve the DNS zone file for the given domain. This endpoint will return the DNS
1294
1412
  * zone file in a standardized format that can be used to configure DNS servers.
@@ -44,6 +44,30 @@ export declare class Health {
44
44
  * @deprecated Use the object parameter style method for a better developer experience.
45
45
  */
46
46
  getCertificate(domain?: string): Promise<Models.HealthCertificate>;
47
+ /**
48
+ * Get console pausing health status. Monitors projects approaching the pause threshold to detect potential issues with console access tracking.
49
+ *
50
+ *
51
+ * @param {number} params.threshold - Percentage threshold of projects approaching pause. When hit (equal or higher), endpoint returns server error. Default value is 10.
52
+ * @param {number} params.inactivityDays - Number of days of inactivity before a project is paused. Should match the plan's projectInactivityDays setting. Default value is 7.
53
+ * @throws {AppwriteException}
54
+ * @returns {Promise<Models.HealthStatus>}
55
+ */
56
+ getConsolePausing(params?: {
57
+ threshold?: number;
58
+ inactivityDays?: number;
59
+ }): Promise<Models.HealthStatus>;
60
+ /**
61
+ * Get console pausing health status. Monitors projects approaching the pause threshold to detect potential issues with console access tracking.
62
+ *
63
+ *
64
+ * @param {number} threshold - Percentage threshold of projects approaching pause. When hit (equal or higher), endpoint returns server error. Default value is 10.
65
+ * @param {number} inactivityDays - Number of days of inactivity before a project is paused. Should match the plan's projectInactivityDays setting. Default value is 7.
66
+ * @throws {AppwriteException}
67
+ * @returns {Promise<Models.HealthStatus>}
68
+ * @deprecated Use the object parameter style method for a better developer experience.
69
+ */
70
+ getConsolePausing(threshold?: number, inactivityDays?: number): Promise<Models.HealthStatus>;
47
71
  /**
48
72
  * Check the Appwrite database servers are up and connection is successful.
49
73
  *
@@ -1891,7 +1891,7 @@ export declare class Messaging {
1891
1891
  * Get a list of all subscribers from the current Appwrite project.
1892
1892
  *
1893
1893
  * @param {string} params.topicId - Topic ID. The topic ID subscribed to.
1894
- * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled
1894
+ * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType
1895
1895
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
1896
1896
  * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1897
1897
  * @throws {AppwriteException}
@@ -1907,7 +1907,7 @@ export declare class Messaging {
1907
1907
  * Get a list of all subscribers from the current Appwrite project.
1908
1908
  *
1909
1909
  * @param {string} topicId - Topic ID. The topic ID subscribed to.
1910
- * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled
1910
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType
1911
1911
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
1912
1912
  * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1913
1913
  * @throws {AppwriteException}
@@ -1,6 +1,9 @@
1
1
  import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
- import { Resources } from '../enums/resources';
3
+ import { AppwriteMigrationResource } from '../enums/appwrite-migration-resource';
4
+ import { FirebaseMigrationResource } from '../enums/firebase-migration-resource';
5
+ import { NHostMigrationResource } from '../enums/n-host-migration-resource';
6
+ import { SupabaseMigrationResource } from '../enums/supabase-migration-resource';
4
7
  export declare class Migrations {
5
8
  client: Client;
6
9
  constructor(client: Client);
@@ -32,7 +35,7 @@ export declare class Migrations {
32
35
  /**
33
36
  * Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project.
34
37
  *
35
- * @param {Resources[]} params.resources - List of resources to migrate
38
+ * @param {AppwriteMigrationResource[]} params.resources - List of resources to migrate
36
39
  * @param {string} params.endpoint - Source Appwrite endpoint
37
40
  * @param {string} params.projectId - Source Project ID
38
41
  * @param {string} params.apiKey - Source API Key
@@ -40,7 +43,7 @@ export declare class Migrations {
40
43
  * @returns {Promise<Models.Migration>}
41
44
  */
42
45
  createAppwriteMigration(params: {
43
- resources: Resources[];
46
+ resources: AppwriteMigrationResource[];
44
47
  endpoint: string;
45
48
  projectId: string;
46
49
  apiKey: string;
@@ -48,7 +51,7 @@ export declare class Migrations {
48
51
  /**
49
52
  * Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project.
50
53
  *
51
- * @param {Resources[]} resources - List of resources to migrate
54
+ * @param {AppwriteMigrationResource[]} resources - List of resources to migrate
52
55
  * @param {string} endpoint - Source Appwrite endpoint
53
56
  * @param {string} projectId - Source Project ID
54
57
  * @param {string} apiKey - Source API Key
@@ -56,11 +59,11 @@ export declare class Migrations {
56
59
  * @returns {Promise<Models.Migration>}
57
60
  * @deprecated Use the object parameter style method for a better developer experience.
58
61
  */
59
- createAppwriteMigration(resources: Resources[], endpoint: string, projectId: string, apiKey: string): Promise<Models.Migration>;
62
+ createAppwriteMigration(resources: AppwriteMigrationResource[], endpoint: string, projectId: string, apiKey: string): Promise<Models.Migration>;
60
63
  /**
61
64
  * Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
62
65
  *
63
- * @param {Resources[]} params.resources - List of resources to migrate
66
+ * @param {AppwriteMigrationResource[]} params.resources - List of resources to migrate
64
67
  * @param {string} params.endpoint - Source's Appwrite Endpoint
65
68
  * @param {string} params.projectID - Source's Project ID
66
69
  * @param {string} params.key - Source's API Key
@@ -68,7 +71,7 @@ export declare class Migrations {
68
71
  * @returns {Promise<Models.MigrationReport>}
69
72
  */
70
73
  getAppwriteReport(params: {
71
- resources: Resources[];
74
+ resources: AppwriteMigrationResource[];
72
75
  endpoint: string;
73
76
  projectID: string;
74
77
  key: string;
@@ -76,7 +79,7 @@ export declare class Migrations {
76
79
  /**
77
80
  * Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
78
81
  *
79
- * @param {Resources[]} resources - List of resources to migrate
82
+ * @param {AppwriteMigrationResource[]} resources - List of resources to migrate
80
83
  * @param {string} endpoint - Source's Appwrite Endpoint
81
84
  * @param {string} projectID - Source's Project ID
82
85
  * @param {string} key - Source's API Key
@@ -84,7 +87,7 @@ export declare class Migrations {
84
87
  * @returns {Promise<Models.MigrationReport>}
85
88
  * @deprecated Use the object parameter style method for a better developer experience.
86
89
  */
87
- getAppwriteReport(resources: Resources[], endpoint: string, projectID: string, key: string): Promise<Models.MigrationReport>;
90
+ getAppwriteReport(resources: AppwriteMigrationResource[], endpoint: string, projectID: string, key: string): Promise<Models.MigrationReport>;
88
91
  /**
89
92
  * Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.
90
93
  *
@@ -159,51 +162,51 @@ export declare class Migrations {
159
162
  /**
160
163
  * Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project.
161
164
  *
162
- * @param {Resources[]} params.resources - List of resources to migrate
165
+ * @param {FirebaseMigrationResource[]} params.resources - List of resources to migrate
163
166
  * @param {string} params.serviceAccount - JSON of the Firebase service account credentials
164
167
  * @throws {AppwriteException}
165
168
  * @returns {Promise<Models.Migration>}
166
169
  */
167
170
  createFirebaseMigration(params: {
168
- resources: Resources[];
171
+ resources: FirebaseMigrationResource[];
169
172
  serviceAccount: string;
170
173
  }): Promise<Models.Migration>;
171
174
  /**
172
175
  * Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project.
173
176
  *
174
- * @param {Resources[]} resources - List of resources to migrate
177
+ * @param {FirebaseMigrationResource[]} resources - List of resources to migrate
175
178
  * @param {string} serviceAccount - JSON of the Firebase service account credentials
176
179
  * @throws {AppwriteException}
177
180
  * @returns {Promise<Models.Migration>}
178
181
  * @deprecated Use the object parameter style method for a better developer experience.
179
182
  */
180
- createFirebaseMigration(resources: Resources[], serviceAccount: string): Promise<Models.Migration>;
183
+ createFirebaseMigration(resources: FirebaseMigrationResource[], serviceAccount: string): Promise<Models.Migration>;
181
184
  /**
182
185
  * Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
183
186
  *
184
- * @param {Resources[]} params.resources - List of resources to migrate
187
+ * @param {FirebaseMigrationResource[]} params.resources - List of resources to migrate
185
188
  * @param {string} params.serviceAccount - JSON of the Firebase service account credentials
186
189
  * @throws {AppwriteException}
187
190
  * @returns {Promise<Models.MigrationReport>}
188
191
  */
189
192
  getFirebaseReport(params: {
190
- resources: Resources[];
193
+ resources: FirebaseMigrationResource[];
191
194
  serviceAccount: string;
192
195
  }): Promise<Models.MigrationReport>;
193
196
  /**
194
197
  * Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
195
198
  *
196
- * @param {Resources[]} resources - List of resources to migrate
199
+ * @param {FirebaseMigrationResource[]} resources - List of resources to migrate
197
200
  * @param {string} serviceAccount - JSON of the Firebase service account credentials
198
201
  * @throws {AppwriteException}
199
202
  * @returns {Promise<Models.MigrationReport>}
200
203
  * @deprecated Use the object parameter style method for a better developer experience.
201
204
  */
202
- getFirebaseReport(resources: Resources[], serviceAccount: string): Promise<Models.MigrationReport>;
205
+ getFirebaseReport(resources: FirebaseMigrationResource[], serviceAccount: string): Promise<Models.MigrationReport>;
203
206
  /**
204
207
  * Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project.
205
208
  *
206
- * @param {Resources[]} params.resources - List of resources to migrate
209
+ * @param {NHostMigrationResource[]} params.resources - List of resources to migrate
207
210
  * @param {string} params.subdomain - Source's Subdomain
208
211
  * @param {string} params.region - Source's Region
209
212
  * @param {string} params.adminSecret - Source's Admin Secret
@@ -215,7 +218,7 @@ export declare class Migrations {
215
218
  * @returns {Promise<Models.Migration>}
216
219
  */
217
220
  createNHostMigration(params: {
218
- resources: Resources[];
221
+ resources: NHostMigrationResource[];
219
222
  subdomain: string;
220
223
  region: string;
221
224
  adminSecret: string;
@@ -227,7 +230,7 @@ export declare class Migrations {
227
230
  /**
228
231
  * Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project.
229
232
  *
230
- * @param {Resources[]} resources - List of resources to migrate
233
+ * @param {NHostMigrationResource[]} resources - List of resources to migrate
231
234
  * @param {string} subdomain - Source's Subdomain
232
235
  * @param {string} region - Source's Region
233
236
  * @param {string} adminSecret - Source's Admin Secret
@@ -239,11 +242,11 @@ export declare class Migrations {
239
242
  * @returns {Promise<Models.Migration>}
240
243
  * @deprecated Use the object parameter style method for a better developer experience.
241
244
  */
242
- createNHostMigration(resources: Resources[], subdomain: string, region: string, adminSecret: string, database: string, username: string, password: string, port?: number): Promise<Models.Migration>;
245
+ createNHostMigration(resources: NHostMigrationResource[], subdomain: string, region: string, adminSecret: string, database: string, username: string, password: string, port?: number): Promise<Models.Migration>;
243
246
  /**
244
247
  * Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
245
248
  *
246
- * @param {Resources[]} params.resources - List of resources to migrate.
249
+ * @param {NHostMigrationResource[]} params.resources - List of resources to migrate.
247
250
  * @param {string} params.subdomain - Source's Subdomain.
248
251
  * @param {string} params.region - Source's Region.
249
252
  * @param {string} params.adminSecret - Source's Admin Secret.
@@ -255,7 +258,7 @@ export declare class Migrations {
255
258
  * @returns {Promise<Models.MigrationReport>}
256
259
  */
257
260
  getNHostReport(params: {
258
- resources: Resources[];
261
+ resources: NHostMigrationResource[];
259
262
  subdomain: string;
260
263
  region: string;
261
264
  adminSecret: string;
@@ -267,7 +270,7 @@ export declare class Migrations {
267
270
  /**
268
271
  * Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
269
272
  *
270
- * @param {Resources[]} resources - List of resources to migrate.
273
+ * @param {NHostMigrationResource[]} resources - List of resources to migrate.
271
274
  * @param {string} subdomain - Source's Subdomain.
272
275
  * @param {string} region - Source's Region.
273
276
  * @param {string} adminSecret - Source's Admin Secret.
@@ -279,11 +282,11 @@ export declare class Migrations {
279
282
  * @returns {Promise<Models.MigrationReport>}
280
283
  * @deprecated Use the object parameter style method for a better developer experience.
281
284
  */
282
- getNHostReport(resources: Resources[], subdomain: string, region: string, adminSecret: string, database: string, username: string, password: string, port?: number): Promise<Models.MigrationReport>;
285
+ getNHostReport(resources: NHostMigrationResource[], subdomain: string, region: string, adminSecret: string, database: string, username: string, password: string, port?: number): Promise<Models.MigrationReport>;
283
286
  /**
284
287
  * Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project.
285
288
  *
286
- * @param {Resources[]} params.resources - List of resources to migrate
289
+ * @param {SupabaseMigrationResource[]} params.resources - List of resources to migrate
287
290
  * @param {string} params.endpoint - Source's Supabase Endpoint
288
291
  * @param {string} params.apiKey - Source's API Key
289
292
  * @param {string} params.databaseHost - Source's Database Host
@@ -294,7 +297,7 @@ export declare class Migrations {
294
297
  * @returns {Promise<Models.Migration>}
295
298
  */
296
299
  createSupabaseMigration(params: {
297
- resources: Resources[];
300
+ resources: SupabaseMigrationResource[];
298
301
  endpoint: string;
299
302
  apiKey: string;
300
303
  databaseHost: string;
@@ -305,7 +308,7 @@ export declare class Migrations {
305
308
  /**
306
309
  * Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project.
307
310
  *
308
- * @param {Resources[]} resources - List of resources to migrate
311
+ * @param {SupabaseMigrationResource[]} resources - List of resources to migrate
309
312
  * @param {string} endpoint - Source's Supabase Endpoint
310
313
  * @param {string} apiKey - Source's API Key
311
314
  * @param {string} databaseHost - Source's Database Host
@@ -316,11 +319,11 @@ export declare class Migrations {
316
319
  * @returns {Promise<Models.Migration>}
317
320
  * @deprecated Use the object parameter style method for a better developer experience.
318
321
  */
319
- createSupabaseMigration(resources: Resources[], endpoint: string, apiKey: string, databaseHost: string, username: string, password: string, port?: number): Promise<Models.Migration>;
322
+ createSupabaseMigration(resources: SupabaseMigrationResource[], endpoint: string, apiKey: string, databaseHost: string, username: string, password: string, port?: number): Promise<Models.Migration>;
320
323
  /**
321
324
  * Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
322
325
  *
323
- * @param {Resources[]} params.resources - List of resources to migrate
326
+ * @param {SupabaseMigrationResource[]} params.resources - List of resources to migrate
324
327
  * @param {string} params.endpoint - Source's Supabase Endpoint.
325
328
  * @param {string} params.apiKey - Source's API Key.
326
329
  * @param {string} params.databaseHost - Source's Database Host.
@@ -331,7 +334,7 @@ export declare class Migrations {
331
334
  * @returns {Promise<Models.MigrationReport>}
332
335
  */
333
336
  getSupabaseReport(params: {
334
- resources: Resources[];
337
+ resources: SupabaseMigrationResource[];
335
338
  endpoint: string;
336
339
  apiKey: string;
337
340
  databaseHost: string;
@@ -342,7 +345,7 @@ export declare class Migrations {
342
345
  /**
343
346
  * Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
344
347
  *
345
- * @param {Resources[]} resources - List of resources to migrate
348
+ * @param {SupabaseMigrationResource[]} resources - List of resources to migrate
346
349
  * @param {string} endpoint - Source's Supabase Endpoint.
347
350
  * @param {string} apiKey - Source's API Key.
348
351
  * @param {string} databaseHost - Source's Database Host.
@@ -353,7 +356,7 @@ export declare class Migrations {
353
356
  * @returns {Promise<Models.MigrationReport>}
354
357
  * @deprecated Use the object parameter style method for a better developer experience.
355
358
  */
356
- getSupabaseReport(resources: Resources[], endpoint: string, apiKey: string, databaseHost: string, username: string, password: string, port?: number): Promise<Models.MigrationReport>;
359
+ getSupabaseReport(resources: SupabaseMigrationResource[], endpoint: string, apiKey: string, databaseHost: string, username: string, password: string, port?: number): Promise<Models.MigrationReport>;
357
360
  /**
358
361
  * Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process.
359
362
  *
@@ -919,21 +919,24 @@ export declare class Organizations {
919
919
  * Get Scopes
920
920
  *
921
921
  * @param {string} params.organizationId - Organization id
922
+ * @param {string} params.projectId - Project id
922
923
  * @throws {AppwriteException}
923
924
  * @returns {Promise<Models.Roles>}
924
925
  */
925
926
  getScopes(params: {
926
927
  organizationId: string;
928
+ projectId?: string;
927
929
  }): Promise<Models.Roles>;
928
930
  /**
929
931
  * Get Scopes
930
932
  *
931
933
  * @param {string} organizationId - Organization id
934
+ * @param {string} projectId - Project id
932
935
  * @throws {AppwriteException}
933
936
  * @returns {Promise<Models.Roles>}
934
937
  * @deprecated Use the object parameter style method for a better developer experience.
935
938
  */
936
- getScopes(organizationId: string): Promise<Models.Roles>;
939
+ getScopes(organizationId: string, projectId?: string): Promise<Models.Roles>;
937
940
  /**
938
941
  * Set an organization's billing tax ID.
939
942
  *