@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
@@ -78,7 +78,7 @@ export declare class Domains {
78
78
  * Create a domain purchase with registrant information.
79
79
  *
80
80
  * @param {string} params.domain - Fully qualified domain name to purchase (for example, example.com).
81
- * @param {string} params.teamId - Team ID that will own the domain.
81
+ * @param {string} params.organizationId - Team ID that will own the domain.
82
82
  * @param {string} params.firstName - Registrant first name used for domain registration.
83
83
  * @param {string} params.lastName - Registrant last name used for domain registration.
84
84
  * @param {string} params.email - Registrant email address for registration and notices.
@@ -93,7 +93,7 @@ export declare class Domains {
93
93
  */
94
94
  createPurchase(params: {
95
95
  domain: string;
96
- teamId: string;
96
+ organizationId: string;
97
97
  firstName: string;
98
98
  lastName: string;
99
99
  email: string;
@@ -108,7 +108,7 @@ export declare class Domains {
108
108
  * Create a domain purchase with registrant information.
109
109
  *
110
110
  * @param {string} domain - Fully qualified domain name to purchase (for example, example.com).
111
- * @param {string} teamId - Team ID that will own the domain.
111
+ * @param {string} organizationId - Team ID that will own the domain.
112
112
  * @param {string} firstName - Registrant first name used for domain registration.
113
113
  * @param {string} lastName - Registrant last name used for domain registration.
114
114
  * @param {string} email - Registrant email address for registration and notices.
@@ -122,7 +122,29 @@ export declare class Domains {
122
122
  * @returns {Promise<Models.Domain>}
123
123
  * @deprecated Use the object parameter style method for a better developer experience.
124
124
  */
125
- createPurchase(domain: string, teamId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number): Promise<Models.Domain>;
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>;
126
+ /**
127
+ * Confirm a domain purchase after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
128
+ *
129
+ * @param {string} params.domainId - Domain ID to confirm purchase for.
130
+ * @param {string} params.organizationId - Team ID that owns the domain.
131
+ * @throws {AppwriteException}
132
+ * @returns {Promise<Models.Domain>}
133
+ */
134
+ confirmPurchase(params: {
135
+ domainId: string;
136
+ organizationId: string;
137
+ }): Promise<Models.Domain>;
138
+ /**
139
+ * Confirm a domain purchase after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
140
+ *
141
+ * @param {string} domainId - Domain ID to confirm purchase for.
142
+ * @param {string} organizationId - Team ID that owns the domain.
143
+ * @throws {AppwriteException}
144
+ * @returns {Promise<Models.Domain>}
145
+ * @deprecated Use the object parameter style method for a better developer experience.
146
+ */
147
+ confirmPurchase(domainId: string, organizationId: string): Promise<Models.Domain>;
126
148
  /**
127
149
  * List domain suggestions.
128
150
  *
@@ -157,6 +179,78 @@ export declare class Domains {
157
179
  * @deprecated Use the object parameter style method for a better developer experience.
158
180
  */
159
181
  listSuggestions(query: string, tlds?: string[], limit?: number, filterType?: FilterType, priceMax?: number, priceMin?: number): Promise<Models.DomainSuggestionsList>;
182
+ /**
183
+ * Create a domain transfer in with authorization code and registrant information.
184
+ *
185
+ * @param {string} params.domain - Domain name to transfer in.
186
+ * @param {string} params.organizationId - Organization ID that this domain will belong to.
187
+ * @param {string} params.authCode - Authorization code for the domain transfer.
188
+ * @param {string} params.paymentMethodId - Payment method ID to authorize and capture the transfer.
189
+ * @throws {AppwriteException}
190
+ * @returns {Promise<Models.Domain>}
191
+ */
192
+ createTransferIn(params: {
193
+ domain: string;
194
+ organizationId: string;
195
+ authCode: string;
196
+ paymentMethodId: string;
197
+ }): Promise<Models.Domain>;
198
+ /**
199
+ * Create a domain transfer in with authorization code and registrant information.
200
+ *
201
+ * @param {string} domain - Domain name to transfer in.
202
+ * @param {string} organizationId - Organization ID that this domain will belong to.
203
+ * @param {string} authCode - Authorization code for the domain transfer.
204
+ * @param {string} paymentMethodId - Payment method ID to authorize and capture the transfer.
205
+ * @throws {AppwriteException}
206
+ * @returns {Promise<Models.Domain>}
207
+ * @deprecated Use the object parameter style method for a better developer experience.
208
+ */
209
+ createTransferIn(domain: string, organizationId: string, authCode: string, paymentMethodId: string): Promise<Models.Domain>;
210
+ /**
211
+ * Confirm a domain transfer in after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
212
+ *
213
+ * @param {string} params.domainId - Domain ID to confirm transfer for.
214
+ * @param {string} params.organizationId - Team ID that owns the domain.
215
+ * @throws {AppwriteException}
216
+ * @returns {Promise<Models.Domain>}
217
+ */
218
+ confirmTransferIn(params: {
219
+ domainId: string;
220
+ organizationId: string;
221
+ }): Promise<Models.Domain>;
222
+ /**
223
+ * Confirm a domain transfer in after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
224
+ *
225
+ * @param {string} domainId - Domain ID to confirm transfer for.
226
+ * @param {string} organizationId - Team ID that owns the domain.
227
+ * @throws {AppwriteException}
228
+ * @returns {Promise<Models.Domain>}
229
+ * @deprecated Use the object parameter style method for a better developer experience.
230
+ */
231
+ confirmTransferIn(domainId: string, organizationId: string): Promise<Models.Domain>;
232
+ /**
233
+ * Create a domain transfer out and return the authorization code.
234
+ *
235
+ * @param {string} params.domainId - Domain unique ID.
236
+ * @param {string} params.organizationId - Organization ID that this domain belongs to.
237
+ * @throws {AppwriteException}
238
+ * @returns {Promise<Models.DomainTransferOut>}
239
+ */
240
+ createTransferOut(params: {
241
+ domainId: string;
242
+ organizationId: string;
243
+ }): Promise<Models.DomainTransferOut>;
244
+ /**
245
+ * Create a domain transfer out and return the authorization code.
246
+ *
247
+ * @param {string} domainId - Domain unique ID.
248
+ * @param {string} organizationId - Organization ID that this domain belongs to.
249
+ * @throws {AppwriteException}
250
+ * @returns {Promise<Models.DomainTransferOut>}
251
+ * @deprecated Use the object parameter style method for a better developer experience.
252
+ */
253
+ createTransferOut(domainId: string, organizationId: string): Promise<Models.DomainTransferOut>;
160
254
  /**
161
255
  * Get a domain by its unique ID.
162
256
  *
@@ -1338,6 +1432,25 @@ export declare class Domains {
1338
1432
  * @deprecated Use the object parameter style method for a better developer experience.
1339
1433
  */
1340
1434
  updateTeam(domainId: string, teamId: string): Promise<Models.Domain>;
1435
+ /**
1436
+ * Get the transfer status for a domain.
1437
+ *
1438
+ * @param {string} params.domainId - Domain unique ID.
1439
+ * @throws {AppwriteException}
1440
+ * @returns {Promise<Models.DomainTransferStatus>}
1441
+ */
1442
+ getTransferStatus(params: {
1443
+ domainId: string;
1444
+ }): Promise<Models.DomainTransferStatus>;
1445
+ /**
1446
+ * Get the transfer status for a domain.
1447
+ *
1448
+ * @param {string} domainId - Domain unique ID.
1449
+ * @throws {AppwriteException}
1450
+ * @returns {Promise<Models.DomainTransferStatus>}
1451
+ * @deprecated Use the object parameter style method for a better developer experience.
1452
+ */
1453
+ getTransferStatus(domainId: string): Promise<Models.DomainTransferStatus>;
1341
1454
  /**
1342
1455
  * Retrieve the DNS zone file for the given domain. This endpoint will return the DNS
1343
1456
  * zone file in a standardized format that can be used to configure DNS servers.
@@ -57,7 +57,9 @@ export declare class Functions {
57
57
  * @param {string} params.providerBranch - Production branch for the repo linked to the function.
58
58
  * @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
59
59
  * @param {string} params.providerRootDirectory - Path to function code in the linked repo.
60
- * @param {string} params.specification - Runtime specification for the function and builds.
60
+ * @param {string} params.buildSpecification - Build specification for the function deployments.
61
+ * @param {string} params.runtimeSpecification - Runtime specification for the function executions.
62
+ * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
61
63
  * @throws {AppwriteException}
62
64
  * @returns {Promise<Models.Function>}
63
65
  */
@@ -79,7 +81,9 @@ export declare class Functions {
79
81
  providerBranch?: string;
80
82
  providerSilentMode?: boolean;
81
83
  providerRootDirectory?: string;
82
- specification?: string;
84
+ buildSpecification?: string;
85
+ runtimeSpecification?: string;
86
+ deploymentRetention?: number;
83
87
  }): Promise<Models.Function>;
84
88
  /**
85
89
  * Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.
@@ -101,12 +105,14 @@ export declare class Functions {
101
105
  * @param {string} providerBranch - Production branch for the repo linked to the function.
102
106
  * @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
103
107
  * @param {string} providerRootDirectory - Path to function code in the linked repo.
104
- * @param {string} specification - Runtime specification for the function and builds.
108
+ * @param {string} buildSpecification - Build specification for the function deployments.
109
+ * @param {string} runtimeSpecification - Runtime specification for the function executions.
110
+ * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
105
111
  * @throws {AppwriteException}
106
112
  * @returns {Promise<Models.Function>}
107
113
  * @deprecated Use the object parameter style method for a better developer experience.
108
114
  */
109
- create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function>;
115
+ create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
110
116
  /**
111
117
  * Get a list of all runtimes that are currently active on your instance.
112
118
  *
@@ -229,7 +235,9 @@ export declare class Functions {
229
235
  * @param {string} params.providerBranch - Production branch for the repo linked to the function
230
236
  * @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
231
237
  * @param {string} params.providerRootDirectory - Path to function code in the linked repo.
232
- * @param {string} params.specification - Runtime specification for the function and builds.
238
+ * @param {string} params.buildSpecification - Build specification for the function deployments.
239
+ * @param {string} params.runtimeSpecification - Runtime specification for the function executions.
240
+ * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
233
241
  * @throws {AppwriteException}
234
242
  * @returns {Promise<Models.Function>}
235
243
  */
@@ -251,7 +259,9 @@ export declare class Functions {
251
259
  providerBranch?: string;
252
260
  providerSilentMode?: boolean;
253
261
  providerRootDirectory?: string;
254
- specification?: string;
262
+ buildSpecification?: string;
263
+ runtimeSpecification?: string;
264
+ deploymentRetention?: number;
255
265
  }): Promise<Models.Function>;
256
266
  /**
257
267
  * Update function by its unique ID.
@@ -273,12 +283,14 @@ export declare class Functions {
273
283
  * @param {string} providerBranch - Production branch for the repo linked to the function
274
284
  * @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
275
285
  * @param {string} providerRootDirectory - Path to function code in the linked repo.
276
- * @param {string} specification - Runtime specification for the function and builds.
286
+ * @param {string} buildSpecification - Build specification for the function deployments.
287
+ * @param {string} runtimeSpecification - Runtime specification for the function executions.
288
+ * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
277
289
  * @throws {AppwriteException}
278
290
  * @returns {Promise<Models.Function>}
279
291
  * @deprecated Use the object parameter style method for a better developer experience.
280
292
  */
281
- update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Function>;
293
+ update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
282
294
  /**
283
295
  * Delete a function by its unique ID.
284
296
  *
@@ -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
  *
@@ -456,7 +456,7 @@ export declare class Organizations {
456
456
  * List all invoices for an organization.
457
457
  *
458
458
  * @param {string} params.organizationId - Organization ID
459
- * @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
459
+ * @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
460
460
  * @throws {AppwriteException}
461
461
  * @returns {Promise<Models.InvoiceList>}
462
462
  */
@@ -468,7 +468,7 @@ export declare class Organizations {
468
468
  * List all invoices for an organization.
469
469
  *
470
470
  * @param {string} organizationId - Organization ID
471
- * @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
471
+ * @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
472
472
  * @throws {AppwriteException}
473
473
  * @returns {Promise<Models.InvoiceList>}
474
474
  * @deprecated Use the object parameter style method for a better developer experience.
@@ -9,6 +9,7 @@ import { PlatformType } from '../enums/platform-type';
9
9
  import { ResourceType } from '../enums/resource-type';
10
10
  import { ApiService } from '../enums/api-service';
11
11
  import { SMTPSecure } from '../enums/smtp-secure';
12
+ import { Status } from '../enums/status';
12
13
  import { EmailTemplateType } from '../enums/email-template-type';
13
14
  import { EmailTemplateLocale } from '../enums/email-template-locale';
14
15
  import { SmsTemplateType } from '../enums/sms-template-type';
@@ -530,6 +531,27 @@ export declare class Projects {
530
531
  * @deprecated Use the object parameter style method for a better developer experience.
531
532
  */
532
533
  updateAuthStatus(projectId: string, method: AuthMethod, status: boolean): Promise<Models.Project>;
534
+ /**
535
+ * Record console access to a project. This endpoint updates the last accessed timestamp for the project to track console activity.
536
+ *
537
+ *
538
+ * @param {string} params.projectId - Project ID
539
+ * @throws {AppwriteException}
540
+ * @returns {Promise<{}>}
541
+ */
542
+ updateConsoleAccess(params: {
543
+ projectId: string;
544
+ }): Promise<{}>;
545
+ /**
546
+ * Record console access to a project. This endpoint updates the last accessed timestamp for the project to track console activity.
547
+ *
548
+ *
549
+ * @param {string} projectId - Project ID
550
+ * @throws {AppwriteException}
551
+ * @returns {Promise<{}>}
552
+ * @deprecated Use the object parameter style method for a better developer experience.
553
+ */
554
+ updateConsoleAccess(projectId: string): Promise<{}>;
533
555
  /**
534
556
  * List all the project\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'
535
557
  *
@@ -1306,6 +1328,30 @@ export declare class Projects {
1306
1328
  * @deprecated Use the object parameter style method for a better developer experience.
1307
1329
  */
1308
1330
  createSMTPTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
1331
+ /**
1332
+ * Update the status of a project. Can be used to archive/restore projects, and to restore paused projects. When restoring a paused project, the console fingerprint header must be provided and the project must not be blocked for any reason other than inactivity.
1333
+ *
1334
+ *
1335
+ * @param {string} params.projectId - Project ID
1336
+ * @param {Status} params.status - New status for the project
1337
+ * @throws {AppwriteException}
1338
+ * @returns {Promise<{}>}
1339
+ */
1340
+ updateStatus(params: {
1341
+ projectId: string;
1342
+ status: Status;
1343
+ }): Promise<{}>;
1344
+ /**
1345
+ * Update the status of a project. Can be used to archive/restore projects, and to restore paused projects. When restoring a paused project, the console fingerprint header must be provided and the project must not be blocked for any reason other than inactivity.
1346
+ *
1347
+ *
1348
+ * @param {string} projectId - Project ID
1349
+ * @param {Status} status - New status for the project
1350
+ * @throws {AppwriteException}
1351
+ * @returns {Promise<{}>}
1352
+ * @deprecated Use the object parameter style method for a better developer experience.
1353
+ */
1354
+ updateStatus(projectId: string, status: Status): Promise<{}>;
1309
1355
  /**
1310
1356
  * Update the team ID of a project allowing for it to be transferred to another team.
1311
1357
  *