@appwrite.io/console 2.1.1 → 2.1.2

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 (59) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/sdk.js +99 -7
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +100 -8
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +99 -7
  8. package/docs/examples/domains/list-suggestions.md +18 -0
  9. package/docs/examples/health/get-queue-audits.md +13 -0
  10. package/docs/examples/organizations/create.md +2 -2
  11. package/docs/examples/organizations/estimation-create-organization.md +2 -2
  12. package/docs/examples/organizations/estimation-update-plan.md +2 -2
  13. package/docs/examples/organizations/update-plan.md +2 -2
  14. package/package.json +1 -1
  15. package/src/client.ts +1 -1
  16. package/src/enums/billing-plan.ts +17 -0
  17. package/src/enums/filter-type.ts +4 -0
  18. package/src/enums/name.ts +1 -0
  19. package/src/enums/o-auth-provider.ts +0 -2
  20. package/src/index.ts +2 -0
  21. package/src/models.ts +437 -375
  22. package/src/services/account.ts +20 -20
  23. package/src/services/avatars.ts +117 -117
  24. package/src/services/backups.ts +18 -18
  25. package/src/services/console.ts +24 -24
  26. package/src/services/databases.ts +89 -89
  27. package/src/services/domains.ts +295 -204
  28. package/src/services/functions.ts +30 -30
  29. package/src/services/health.ts +201 -152
  30. package/src/services/messaging.ts +54 -54
  31. package/src/services/migrations.ts +36 -36
  32. package/src/services/organizations.ts +67 -66
  33. package/src/services/projects.ts +81 -81
  34. package/src/services/sites.ts +30 -30
  35. package/src/services/storage.ts +45 -45
  36. package/src/services/tables-db.ts +89 -89
  37. package/src/services/users.ts +39 -39
  38. package/types/enums/billing-plan.d.ts +17 -0
  39. package/types/enums/filter-type.d.ts +4 -0
  40. package/types/enums/name.d.ts +1 -0
  41. package/types/enums/o-auth-provider.d.ts +0 -2
  42. package/types/index.d.ts +2 -0
  43. package/types/models.d.ts +434 -375
  44. package/types/services/account.d.ts +11 -11
  45. package/types/services/avatars.d.ts +82 -82
  46. package/types/services/backups.d.ts +8 -8
  47. package/types/services/console.d.ts +14 -14
  48. package/types/services/databases.d.ts +50 -50
  49. package/types/services/domains.d.ts +139 -104
  50. package/types/services/functions.d.ts +15 -15
  51. package/types/services/health.d.ts +95 -78
  52. package/types/services/messaging.d.ts +24 -24
  53. package/types/services/migrations.d.ts +16 -16
  54. package/types/services/organizations.d.ts +37 -36
  55. package/types/services/projects.d.ts +36 -36
  56. package/types/services/sites.d.ts +15 -15
  57. package/types/services/storage.d.ts +30 -30
  58. package/types/services/tables-db.d.ts +50 -50
  59. package/types/services/users.d.ts +24 -24
@@ -152,7 +152,7 @@ export declare class Messaging {
152
152
  * @param {string} params.sound - Sound for push notification. Available only for Android and iOS Platform.
153
153
  * @param {string} params.color - Color for push notification. Available only for Android Platform.
154
154
  * @param {string} params.tag - Tag for push notification. Available only for Android Platform.
155
- * @param {number | bigint} params.badge - Badge for push notification. Available only for iOS Platform.
155
+ * @param {number} params.badge - Badge for push notification. Available only for iOS Platform.
156
156
  * @param {boolean} params.draft - Is message a draft
157
157
  * @param {string} params.scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
158
158
  * @param {boolean} params.contentAvailable - If set to true, the notification will be delivered in the background. Available only for iOS Platform.
@@ -175,7 +175,7 @@ export declare class Messaging {
175
175
  sound?: string;
176
176
  color?: string;
177
177
  tag?: string;
178
- badge?: number | bigint;
178
+ badge?: number;
179
179
  draft?: boolean;
180
180
  scheduledAt?: string;
181
181
  contentAvailable?: boolean;
@@ -198,7 +198,7 @@ export declare class Messaging {
198
198
  * @param {string} sound - Sound for push notification. Available only for Android and iOS Platform.
199
199
  * @param {string} color - Color for push notification. Available only for Android Platform.
200
200
  * @param {string} tag - Tag for push notification. Available only for Android Platform.
201
- * @param {number | bigint} badge - Badge for push notification. Available only for iOS Platform.
201
+ * @param {number} badge - Badge for push notification. Available only for iOS Platform.
202
202
  * @param {boolean} draft - Is message a draft
203
203
  * @param {string} scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
204
204
  * @param {boolean} contentAvailable - If set to true, the notification will be delivered in the background. Available only for iOS Platform.
@@ -208,7 +208,7 @@ export declare class Messaging {
208
208
  * @returns {Promise<Models.Message>}
209
209
  * @deprecated Use the object parameter style method for a better developer experience.
210
210
  */
211
- createPush(messageId: string, title?: string, body?: string, topics?: string[], users?: string[], targets?: string[], data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number | bigint, draft?: boolean, scheduledAt?: string, contentAvailable?: boolean, critical?: boolean, priority?: MessagePriority): Promise<Models.Message>;
211
+ createPush(messageId: string, title?: string, body?: string, topics?: string[], users?: string[], targets?: string[], data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string, contentAvailable?: boolean, critical?: boolean, priority?: MessagePriority): Promise<Models.Message>;
212
212
  /**
213
213
  * Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
214
214
  *
@@ -226,7 +226,7 @@ export declare class Messaging {
226
226
  * @param {string} params.sound - Sound for push notification. Available only for Android and iOS platforms.
227
227
  * @param {string} params.color - Color for push notification. Available only for Android platforms.
228
228
  * @param {string} params.tag - Tag for push notification. Available only for Android platforms.
229
- * @param {number | bigint} params.badge - Badge for push notification. Available only for iOS platforms.
229
+ * @param {number} params.badge - Badge for push notification. Available only for iOS platforms.
230
230
  * @param {boolean} params.draft - Is message a draft
231
231
  * @param {string} params.scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
232
232
  * @param {boolean} params.contentAvailable - If set to true, the notification will be delivered in the background. Available only for iOS Platform.
@@ -249,7 +249,7 @@ export declare class Messaging {
249
249
  sound?: string;
250
250
  color?: string;
251
251
  tag?: string;
252
- badge?: number | bigint;
252
+ badge?: number;
253
253
  draft?: boolean;
254
254
  scheduledAt?: string;
255
255
  contentAvailable?: boolean;
@@ -273,7 +273,7 @@ export declare class Messaging {
273
273
  * @param {string} sound - Sound for push notification. Available only for Android and iOS platforms.
274
274
  * @param {string} color - Color for push notification. Available only for Android platforms.
275
275
  * @param {string} tag - Tag for push notification. Available only for Android platforms.
276
- * @param {number | bigint} badge - Badge for push notification. Available only for iOS platforms.
276
+ * @param {number} badge - Badge for push notification. Available only for iOS platforms.
277
277
  * @param {boolean} draft - Is message a draft
278
278
  * @param {string} scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
279
279
  * @param {boolean} contentAvailable - If set to true, the notification will be delivered in the background. Available only for iOS Platform.
@@ -283,7 +283,7 @@ export declare class Messaging {
283
283
  * @returns {Promise<Models.Message>}
284
284
  * @deprecated Use the object parameter style method for a better developer experience.
285
285
  */
286
- updatePush(messageId: string, topics?: string[], users?: string[], targets?: string[], title?: string, body?: string, data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number | bigint, draft?: boolean, scheduledAt?: string, contentAvailable?: boolean, critical?: boolean, priority?: MessagePriority): Promise<Models.Message>;
286
+ updatePush(messageId: string, topics?: string[], users?: string[], targets?: string[], title?: string, body?: string, data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string, contentAvailable?: boolean, critical?: boolean, priority?: MessagePriority): Promise<Models.Message>;
287
287
  /**
288
288
  * Create a new SMS message.
289
289
  *
@@ -1155,7 +1155,7 @@ export declare class Messaging {
1155
1155
  * @param {string} params.providerId - Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
1156
1156
  * @param {string} params.name - Provider name.
1157
1157
  * @param {string} params.host - SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465"`. Hosts will be tried in order.
1158
- * @param {number | bigint} params.port - The default SMTP server port.
1158
+ * @param {number} params.port - The default SMTP server port.
1159
1159
  * @param {string} params.username - Authentication username.
1160
1160
  * @param {string} params.password - Authentication password.
1161
1161
  * @param {SmtpEncryption} params.encryption - Encryption type. Can be omitted, 'ssl', or 'tls'
@@ -1174,7 +1174,7 @@ export declare class Messaging {
1174
1174
  providerId: string;
1175
1175
  name: string;
1176
1176
  host: string;
1177
- port?: number | bigint;
1177
+ port?: number;
1178
1178
  username?: string;
1179
1179
  password?: string;
1180
1180
  encryption?: SmtpEncryption;
@@ -1192,7 +1192,7 @@ export declare class Messaging {
1192
1192
  * @param {string} providerId - Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
1193
1193
  * @param {string} name - Provider name.
1194
1194
  * @param {string} host - SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465"`. Hosts will be tried in order.
1195
- * @param {number | bigint} port - The default SMTP server port.
1195
+ * @param {number} port - The default SMTP server port.
1196
1196
  * @param {string} username - Authentication username.
1197
1197
  * @param {string} password - Authentication password.
1198
1198
  * @param {SmtpEncryption} encryption - Encryption type. Can be omitted, 'ssl', or 'tls'
@@ -1207,14 +1207,14 @@ export declare class Messaging {
1207
1207
  * @returns {Promise<Models.Provider>}
1208
1208
  * @deprecated Use the object parameter style method for a better developer experience.
1209
1209
  */
1210
- createSmtpProvider(providerId: string, name: string, host: string, port?: number | bigint, username?: string, password?: string, encryption?: SmtpEncryption, autoTLS?: boolean, mailer?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider>;
1210
+ createSmtpProvider(providerId: string, name: string, host: string, port?: number, username?: string, password?: string, encryption?: SmtpEncryption, autoTLS?: boolean, mailer?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider>;
1211
1211
  /**
1212
1212
  * Create a new SMTP provider.
1213
1213
  *
1214
1214
  * @param {string} params.providerId - Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
1215
1215
  * @param {string} params.name - Provider name.
1216
1216
  * @param {string} params.host - SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465"`. Hosts will be tried in order.
1217
- * @param {number | bigint} params.port - The default SMTP server port.
1217
+ * @param {number} params.port - The default SMTP server port.
1218
1218
  * @param {string} params.username - Authentication username.
1219
1219
  * @param {string} params.password - Authentication password.
1220
1220
  * @param {SmtpEncryption} params.encryption - Encryption type. Can be omitted, 'ssl', or 'tls'
@@ -1232,7 +1232,7 @@ export declare class Messaging {
1232
1232
  providerId: string;
1233
1233
  name: string;
1234
1234
  host: string;
1235
- port?: number | bigint;
1235
+ port?: number;
1236
1236
  username?: string;
1237
1237
  password?: string;
1238
1238
  encryption?: SmtpEncryption;
@@ -1250,7 +1250,7 @@ export declare class Messaging {
1250
1250
  * @param {string} providerId - Provider ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
1251
1251
  * @param {string} name - Provider name.
1252
1252
  * @param {string} host - SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465"`. Hosts will be tried in order.
1253
- * @param {number | bigint} port - The default SMTP server port.
1253
+ * @param {number} port - The default SMTP server port.
1254
1254
  * @param {string} username - Authentication username.
1255
1255
  * @param {string} password - Authentication password.
1256
1256
  * @param {SmtpEncryption} encryption - Encryption type. Can be omitted, 'ssl', or 'tls'
@@ -1265,14 +1265,14 @@ export declare class Messaging {
1265
1265
  * @returns {Promise<Models.Provider>}
1266
1266
  * @deprecated Use the object parameter style method for a better developer experience.
1267
1267
  */
1268
- createSMTPProvider(providerId: string, name: string, host: string, port?: number | bigint, username?: string, password?: string, encryption?: SmtpEncryption, autoTLS?: boolean, mailer?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider>;
1268
+ createSMTPProvider(providerId: string, name: string, host: string, port?: number, username?: string, password?: string, encryption?: SmtpEncryption, autoTLS?: boolean, mailer?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider>;
1269
1269
  /**
1270
1270
  * Update a SMTP provider by its unique ID.
1271
1271
  *
1272
1272
  * @param {string} params.providerId - Provider ID.
1273
1273
  * @param {string} params.name - Provider name.
1274
1274
  * @param {string} params.host - SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465"`. Hosts will be tried in order.
1275
- * @param {number | bigint} params.port - SMTP port.
1275
+ * @param {number} params.port - SMTP port.
1276
1276
  * @param {string} params.username - Authentication username.
1277
1277
  * @param {string} params.password - Authentication password.
1278
1278
  * @param {SmtpEncryption} params.encryption - Encryption type. Can be 'ssl' or 'tls'
@@ -1291,7 +1291,7 @@ export declare class Messaging {
1291
1291
  providerId: string;
1292
1292
  name?: string;
1293
1293
  host?: string;
1294
- port?: number | bigint;
1294
+ port?: number;
1295
1295
  username?: string;
1296
1296
  password?: string;
1297
1297
  encryption?: SmtpEncryption;
@@ -1309,7 +1309,7 @@ export declare class Messaging {
1309
1309
  * @param {string} providerId - Provider ID.
1310
1310
  * @param {string} name - Provider name.
1311
1311
  * @param {string} host - SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465"`. Hosts will be tried in order.
1312
- * @param {number | bigint} port - SMTP port.
1312
+ * @param {number} port - SMTP port.
1313
1313
  * @param {string} username - Authentication username.
1314
1314
  * @param {string} password - Authentication password.
1315
1315
  * @param {SmtpEncryption} encryption - Encryption type. Can be 'ssl' or 'tls'
@@ -1324,14 +1324,14 @@ export declare class Messaging {
1324
1324
  * @returns {Promise<Models.Provider>}
1325
1325
  * @deprecated Use the object parameter style method for a better developer experience.
1326
1326
  */
1327
- updateSmtpProvider(providerId: string, name?: string, host?: string, port?: number | bigint, username?: string, password?: string, encryption?: SmtpEncryption, autoTLS?: boolean, mailer?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider>;
1327
+ updateSmtpProvider(providerId: string, name?: string, host?: string, port?: number, username?: string, password?: string, encryption?: SmtpEncryption, autoTLS?: boolean, mailer?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider>;
1328
1328
  /**
1329
1329
  * Update a SMTP provider by its unique ID.
1330
1330
  *
1331
1331
  * @param {string} params.providerId - Provider ID.
1332
1332
  * @param {string} params.name - Provider name.
1333
1333
  * @param {string} params.host - SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465"`. Hosts will be tried in order.
1334
- * @param {number | bigint} params.port - SMTP port.
1334
+ * @param {number} params.port - SMTP port.
1335
1335
  * @param {string} params.username - Authentication username.
1336
1336
  * @param {string} params.password - Authentication password.
1337
1337
  * @param {SmtpEncryption} params.encryption - Encryption type. Can be 'ssl' or 'tls'
@@ -1349,7 +1349,7 @@ export declare class Messaging {
1349
1349
  providerId: string;
1350
1350
  name?: string;
1351
1351
  host?: string;
1352
- port?: number | bigint;
1352
+ port?: number;
1353
1353
  username?: string;
1354
1354
  password?: string;
1355
1355
  encryption?: SmtpEncryption;
@@ -1367,7 +1367,7 @@ export declare class Messaging {
1367
1367
  * @param {string} providerId - Provider ID.
1368
1368
  * @param {string} name - Provider name.
1369
1369
  * @param {string} host - SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as `smtp1.example.com:25;smtp2.example.com`. You can also specify encryption type, for example: `tls://smtp1.example.com:587;ssl://smtp2.example.com:465"`. Hosts will be tried in order.
1370
- * @param {number | bigint} port - SMTP port.
1370
+ * @param {number} port - SMTP port.
1371
1371
  * @param {string} username - Authentication username.
1372
1372
  * @param {string} password - Authentication password.
1373
1373
  * @param {SmtpEncryption} encryption - Encryption type. Can be 'ssl' or 'tls'
@@ -1382,7 +1382,7 @@ export declare class Messaging {
1382
1382
  * @returns {Promise<Models.Provider>}
1383
1383
  * @deprecated Use the object parameter style method for a better developer experience.
1384
1384
  */
1385
- updateSMTPProvider(providerId: string, name?: string, host?: string, port?: number | bigint, username?: string, password?: string, encryption?: SmtpEncryption, autoTLS?: boolean, mailer?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider>;
1385
+ updateSMTPProvider(providerId: string, name?: string, host?: string, port?: number, username?: string, password?: string, encryption?: SmtpEncryption, autoTLS?: boolean, mailer?: string, fromName?: string, fromEmail?: string, replyToName?: string, replyToEmail?: string, enabled?: boolean): Promise<Models.Provider>;
1386
1386
  /**
1387
1387
  * Create a new Telesign provider.
1388
1388
  *
@@ -209,7 +209,7 @@ export declare class Migrations {
209
209
  * @param {string} params.database - Source's Database Name
210
210
  * @param {string} params.username - Source's Database Username
211
211
  * @param {string} params.password - Source's Database Password
212
- * @param {number | bigint} params.port - Source's Database Port
212
+ * @param {number} params.port - Source's Database Port
213
213
  * @throws {AppwriteException}
214
214
  * @returns {Promise<Models.Migration>}
215
215
  */
@@ -221,7 +221,7 @@ export declare class Migrations {
221
221
  database: string;
222
222
  username: string;
223
223
  password: string;
224
- port?: number | bigint;
224
+ port?: number;
225
225
  }): Promise<Models.Migration>;
226
226
  /**
227
227
  * 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.
@@ -233,12 +233,12 @@ export declare class Migrations {
233
233
  * @param {string} database - Source's Database Name
234
234
  * @param {string} username - Source's Database Username
235
235
  * @param {string} password - Source's Database Password
236
- * @param {number | bigint} port - Source's Database Port
236
+ * @param {number} port - Source's Database Port
237
237
  * @throws {AppwriteException}
238
238
  * @returns {Promise<Models.Migration>}
239
239
  * @deprecated Use the object parameter style method for a better developer experience.
240
240
  */
241
- createNHostMigration(resources: string[], subdomain: string, region: string, adminSecret: string, database: string, username: string, password: string, port?: number | bigint): Promise<Models.Migration>;
241
+ createNHostMigration(resources: string[], subdomain: string, region: string, adminSecret: string, database: string, username: string, password: string, port?: number): Promise<Models.Migration>;
242
242
  /**
243
243
  * 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.
244
244
  *
@@ -249,7 +249,7 @@ export declare class Migrations {
249
249
  * @param {string} params.database - Source's Database Name.
250
250
  * @param {string} params.username - Source's Database Username.
251
251
  * @param {string} params.password - Source's Database Password.
252
- * @param {number | bigint} params.port - Source's Database Port.
252
+ * @param {number} params.port - Source's Database Port.
253
253
  * @throws {AppwriteException}
254
254
  * @returns {Promise<Models.MigrationReport>}
255
255
  */
@@ -261,7 +261,7 @@ export declare class Migrations {
261
261
  database: string;
262
262
  username: string;
263
263
  password: string;
264
- port?: number | bigint;
264
+ port?: number;
265
265
  }): Promise<Models.MigrationReport>;
266
266
  /**
267
267
  * 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.
@@ -273,12 +273,12 @@ export declare class Migrations {
273
273
  * @param {string} database - Source's Database Name.
274
274
  * @param {string} username - Source's Database Username.
275
275
  * @param {string} password - Source's Database Password.
276
- * @param {number | bigint} port - Source's Database Port.
276
+ * @param {number} port - Source's Database Port.
277
277
  * @throws {AppwriteException}
278
278
  * @returns {Promise<Models.MigrationReport>}
279
279
  * @deprecated Use the object parameter style method for a better developer experience.
280
280
  */
281
- getNHostReport(resources: string[], subdomain: string, region: string, adminSecret: string, database: string, username: string, password: string, port?: number | bigint): Promise<Models.MigrationReport>;
281
+ getNHostReport(resources: string[], subdomain: string, region: string, adminSecret: string, database: string, username: string, password: string, port?: number): Promise<Models.MigrationReport>;
282
282
  /**
283
283
  * 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.
284
284
  *
@@ -288,7 +288,7 @@ export declare class Migrations {
288
288
  * @param {string} params.databaseHost - Source's Database Host
289
289
  * @param {string} params.username - Source's Database Username
290
290
  * @param {string} params.password - Source's Database Password
291
- * @param {number | bigint} params.port - Source's Database Port
291
+ * @param {number} params.port - Source's Database Port
292
292
  * @throws {AppwriteException}
293
293
  * @returns {Promise<Models.Migration>}
294
294
  */
@@ -299,7 +299,7 @@ export declare class Migrations {
299
299
  databaseHost: string;
300
300
  username: string;
301
301
  password: string;
302
- port?: number | bigint;
302
+ port?: number;
303
303
  }): Promise<Models.Migration>;
304
304
  /**
305
305
  * 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.
@@ -310,12 +310,12 @@ export declare class Migrations {
310
310
  * @param {string} databaseHost - Source's Database Host
311
311
  * @param {string} username - Source's Database Username
312
312
  * @param {string} password - Source's Database Password
313
- * @param {number | bigint} port - Source's Database Port
313
+ * @param {number} port - Source's Database Port
314
314
  * @throws {AppwriteException}
315
315
  * @returns {Promise<Models.Migration>}
316
316
  * @deprecated Use the object parameter style method for a better developer experience.
317
317
  */
318
- createSupabaseMigration(resources: string[], endpoint: string, apiKey: string, databaseHost: string, username: string, password: string, port?: number | bigint): Promise<Models.Migration>;
318
+ createSupabaseMigration(resources: string[], endpoint: string, apiKey: string, databaseHost: string, username: string, password: string, port?: number): Promise<Models.Migration>;
319
319
  /**
320
320
  * 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.
321
321
  *
@@ -325,7 +325,7 @@ export declare class Migrations {
325
325
  * @param {string} params.databaseHost - Source's Database Host.
326
326
  * @param {string} params.username - Source's Database Username.
327
327
  * @param {string} params.password - Source's Database Password.
328
- * @param {number | bigint} params.port - Source's Database Port.
328
+ * @param {number} params.port - Source's Database Port.
329
329
  * @throws {AppwriteException}
330
330
  * @returns {Promise<Models.MigrationReport>}
331
331
  */
@@ -336,7 +336,7 @@ export declare class Migrations {
336
336
  databaseHost: string;
337
337
  username: string;
338
338
  password: string;
339
- port?: number | bigint;
339
+ port?: number;
340
340
  }): Promise<Models.MigrationReport>;
341
341
  /**
342
342
  * 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.
@@ -347,12 +347,12 @@ export declare class Migrations {
347
347
  * @param {string} databaseHost - Source's Database Host.
348
348
  * @param {string} username - Source's Database Username.
349
349
  * @param {string} password - Source's Database Password.
350
- * @param {number | bigint} port - Source's Database Port.
350
+ * @param {number} port - Source's Database Port.
351
351
  * @throws {AppwriteException}
352
352
  * @returns {Promise<Models.MigrationReport>}
353
353
  * @deprecated Use the object parameter style method for a better developer experience.
354
354
  */
355
- getSupabaseReport(resources: string[], endpoint: string, apiKey: string, databaseHost: string, username: string, password: string, port?: number | bigint): Promise<Models.MigrationReport>;
355
+ getSupabaseReport(resources: string[], endpoint: string, apiKey: string, databaseHost: string, username: string, password: string, port?: number): Promise<Models.MigrationReport>;
356
356
  /**
357
357
  * 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.
358
358
  *
@@ -1,5 +1,6 @@
1
1
  import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
+ import { BillingPlan } from '../enums/billing-plan';
3
4
  import { Platform } from '../enums/platform';
4
5
  export declare class Organizations {
5
6
  client: Client;
@@ -32,13 +33,13 @@ export declare class Organizations {
32
33
  *
33
34
  * @param {string} params.organizationId - Organization ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
34
35
  * @param {string} params.name - Organization name. Max length: 128 chars.
35
- * @param {string} params.billingPlan - Organization billing plan chosen
36
+ * @param {BillingPlan} params.billingPlan - Organization billing plan chosen
36
37
  * @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
37
38
  * @param {string} params.billingAddressId - Unique ID of billing address
38
39
  * @param {string[]} params.invites - Additional member invites
39
40
  * @param {string} params.couponId - Coupon id
40
41
  * @param {string} params.taxId - Tax Id associated to billing.
41
- * @param {number | bigint} params.budget - Budget limit for additional usage set for the organization
42
+ * @param {number} params.budget - Budget limit for additional usage set for the organization
42
43
  * @param {Platform} params.platform - Platform type
43
44
  * @throws {AppwriteException}
44
45
  * @returns {Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>}
@@ -46,13 +47,13 @@ export declare class Organizations {
46
47
  create<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
47
48
  organizationId: string;
48
49
  name: string;
49
- billingPlan: string;
50
+ billingPlan: BillingPlan;
50
51
  paymentMethodId?: string;
51
52
  billingAddressId?: string;
52
53
  invites?: string[];
53
54
  couponId?: string;
54
55
  taxId?: string;
55
- budget?: number | bigint;
56
+ budget?: number;
56
57
  platform?: Platform;
57
58
  }): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>;
58
59
  /**
@@ -61,23 +62,23 @@ export declare class Organizations {
61
62
  *
62
63
  * @param {string} organizationId - Organization ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
63
64
  * @param {string} name - Organization name. Max length: 128 chars.
64
- * @param {string} billingPlan - Organization billing plan chosen
65
+ * @param {BillingPlan} billingPlan - Organization billing plan chosen
65
66
  * @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
66
67
  * @param {string} billingAddressId - Unique ID of billing address
67
68
  * @param {string[]} invites - Additional member invites
68
69
  * @param {string} couponId - Coupon id
69
70
  * @param {string} taxId - Tax Id associated to billing.
70
- * @param {number | bigint} budget - Budget limit for additional usage set for the organization
71
+ * @param {number} budget - Budget limit for additional usage set for the organization
71
72
  * @param {Platform} platform - Platform type
72
73
  * @throws {AppwriteException}
73
74
  * @returns {Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>}
74
75
  * @deprecated Use the object parameter style method for a better developer experience.
75
76
  */
76
- create<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, name: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number | bigint, platform?: Platform): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>;
77
+ create<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, name: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number, platform?: Platform): Promise<Models.Organization<Preferences> | Models.PaymentAuthentication>;
77
78
  /**
78
79
  * Get estimation for creating an organization.
79
80
  *
80
- * @param {string} params.billingPlan - Organization billing plan chosen
81
+ * @param {BillingPlan} params.billingPlan - Organization billing plan chosen
81
82
  * @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
82
83
  * @param {string[]} params.invites - Additional member invites
83
84
  * @param {string} params.couponId - Coupon id
@@ -86,7 +87,7 @@ export declare class Organizations {
86
87
  * @returns {Promise<Models.Estimation>}
87
88
  */
88
89
  estimationCreateOrganization(params: {
89
- billingPlan: string;
90
+ billingPlan: BillingPlan;
90
91
  paymentMethodId?: string;
91
92
  invites?: string[];
92
93
  couponId?: string;
@@ -95,7 +96,7 @@ export declare class Organizations {
95
96
  /**
96
97
  * Get estimation for creating an organization.
97
98
  *
98
- * @param {string} billingPlan - Organization billing plan chosen
99
+ * @param {BillingPlan} billingPlan - Organization billing plan chosen
99
100
  * @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
100
101
  * @param {string[]} invites - Additional member invites
101
102
  * @param {string} couponId - Coupon id
@@ -104,7 +105,7 @@ export declare class Organizations {
104
105
  * @returns {Promise<Models.Estimation>}
105
106
  * @deprecated Use the object parameter style method for a better developer experience.
106
107
  */
107
- estimationCreateOrganization(billingPlan: string, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform): Promise<Models.Estimation>;
108
+ estimationCreateOrganization(billingPlan: BillingPlan, paymentMethodId?: string, invites?: string[], couponId?: string, platform?: Platform): Promise<Models.Estimation>;
108
109
  /**
109
110
  * Delete an organization.
110
111
  *
@@ -151,29 +152,29 @@ export declare class Organizations {
151
152
  *
152
153
  * @param {string} params.organizationId - Organization ID
153
154
  * @param {string} params.aggregationId - Invoice unique ID
154
- * @param {number | bigint} params.limit - Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.
155
- * @param {number | bigint} params.offset - Offset value. The default value is 0. Use this param to manage pagination.
155
+ * @param {number} params.limit - Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.
156
+ * @param {number} params.offset - Offset value. The default value is 0. Use this param to manage pagination.
156
157
  * @throws {AppwriteException}
157
158
  * @returns {Promise<Models.AggregationTeam>}
158
159
  */
159
160
  getAggregation(params: {
160
161
  organizationId: string;
161
162
  aggregationId: string;
162
- limit?: number | bigint;
163
- offset?: number | bigint;
163
+ limit?: number;
164
+ offset?: number;
164
165
  }): Promise<Models.AggregationTeam>;
165
166
  /**
166
167
  * Get a specific aggregation using it's aggregation ID.
167
168
  *
168
169
  * @param {string} organizationId - Organization ID
169
170
  * @param {string} aggregationId - Invoice unique ID
170
- * @param {number | bigint} limit - Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.
171
- * @param {number | bigint} offset - Offset value. The default value is 0. Use this param to manage pagination.
171
+ * @param {number} limit - Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.
172
+ * @param {number} offset - Offset value. The default value is 0. Use this param to manage pagination.
172
173
  * @throws {AppwriteException}
173
174
  * @returns {Promise<Models.AggregationTeam>}
174
175
  * @deprecated Use the object parameter style method for a better developer experience.
175
176
  */
176
- getAggregation(organizationId: string, aggregationId: string, limit?: number | bigint, offset?: number | bigint): Promise<Models.AggregationTeam>;
177
+ getAggregation(organizationId: string, aggregationId: string, limit?: number, offset?: number): Promise<Models.AggregationTeam>;
177
178
  /**
178
179
  * Set a billing address for an organization.
179
180
  *
@@ -263,27 +264,27 @@ export declare class Organizations {
263
264
  * Update the budget limit for an organization.
264
265
  *
265
266
  * @param {string} params.organizationId - Organization Unique ID
266
- * @param {number | bigint} params.budget - Budget limit for additional usage set for the organization
267
- * @param {number | bigint[]} params.alerts - Budget alert limit percentage
267
+ * @param {number} params.budget - Budget limit for additional usage set for the organization
268
+ * @param {number[]} params.alerts - Budget alert limit percentage
268
269
  * @throws {AppwriteException}
269
270
  * @returns {Promise<Models.Organization<Preferences>>}
270
271
  */
271
272
  updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
272
273
  organizationId: string;
273
- budget?: number | bigint;
274
- alerts?: number | bigint[];
274
+ budget?: number;
275
+ alerts?: number[];
275
276
  }): Promise<Models.Organization<Preferences>>;
276
277
  /**
277
278
  * Update the budget limit for an organization.
278
279
  *
279
280
  * @param {string} organizationId - Organization Unique ID
280
- * @param {number | bigint} budget - Budget limit for additional usage set for the organization
281
- * @param {number | bigint[]} alerts - Budget alert limit percentage
281
+ * @param {number} budget - Budget limit for additional usage set for the organization
282
+ * @param {number[]} alerts - Budget alert limit percentage
282
283
  * @throws {AppwriteException}
283
284
  * @returns {Promise<Models.Organization<Preferences>>}
284
285
  * @deprecated Use the object parameter style method for a better developer experience.
285
286
  */
286
- updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, budget?: number | bigint, alerts?: number | bigint[]): Promise<Models.Organization<Preferences>>;
287
+ updateBudget<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, budget?: number, alerts?: number[]): Promise<Models.Organization<Preferences>>;
287
288
  /**
288
289
  * List all credits for an organization.
289
290
  *
@@ -394,7 +395,7 @@ export declare class Organizations {
394
395
  * Get estimation for updating the organization plan.
395
396
  *
396
397
  * @param {string} params.organizationId - Organization ID
397
- * @param {string} params.billingPlan - Organization billing plan chosen
398
+ * @param {BillingPlan} params.billingPlan - Organization billing plan chosen
398
399
  * @param {string[]} params.invites - Additional member invites
399
400
  * @param {string} params.couponId - Coupon id
400
401
  * @throws {AppwriteException}
@@ -402,7 +403,7 @@ export declare class Organizations {
402
403
  */
403
404
  estimationUpdatePlan(params: {
404
405
  organizationId: string;
405
- billingPlan: string;
406
+ billingPlan: BillingPlan;
406
407
  invites?: string[];
407
408
  couponId?: string;
408
409
  }): Promise<Models.EstimationUpdatePlan>;
@@ -410,14 +411,14 @@ export declare class Organizations {
410
411
  * Get estimation for updating the organization plan.
411
412
  *
412
413
  * @param {string} organizationId - Organization ID
413
- * @param {string} billingPlan - Organization billing plan chosen
414
+ * @param {BillingPlan} billingPlan - Organization billing plan chosen
414
415
  * @param {string[]} invites - Additional member invites
415
416
  * @param {string} couponId - Coupon id
416
417
  * @throws {AppwriteException}
417
418
  * @returns {Promise<Models.EstimationUpdatePlan>}
418
419
  * @deprecated Use the object parameter style method for a better developer experience.
419
420
  */
420
- estimationUpdatePlan(organizationId: string, billingPlan: string, invites?: string[], couponId?: string): Promise<Models.EstimationUpdatePlan>;
421
+ estimationUpdatePlan(organizationId: string, billingPlan: BillingPlan, invites?: string[], couponId?: string): Promise<Models.EstimationUpdatePlan>;
421
422
  /**
422
423
  * Submit feedback about downgrading from a paid plan to a lower tier. This helps the team understand user experience and improve the platform.
423
424
  *
@@ -715,42 +716,42 @@ export declare class Organizations {
715
716
  * Update the billing plan for an organization.
716
717
  *
717
718
  * @param {string} params.organizationId - Organization Unique ID
718
- * @param {string} params.billingPlan - Organization billing plan chosen
719
+ * @param {BillingPlan} params.billingPlan - Organization billing plan chosen
719
720
  * @param {string} params.paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
720
721
  * @param {string} params.billingAddressId - Unique ID of billing address
721
722
  * @param {string[]} params.invites - Additional member invites
722
723
  * @param {string} params.couponId - Coupon id
723
724
  * @param {string} params.taxId - Tax Id associated to billing.
724
- * @param {number | bigint} params.budget - Budget limit for additional usage set for the organization
725
+ * @param {number} params.budget - Budget limit for additional usage set for the organization
725
726
  * @throws {AppwriteException}
726
727
  * @returns {Promise<Models.Organization<Preferences>>}
727
728
  */
728
729
  updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(params: {
729
730
  organizationId: string;
730
- billingPlan: string;
731
+ billingPlan: BillingPlan;
731
732
  paymentMethodId?: string;
732
733
  billingAddressId?: string;
733
734
  invites?: string[];
734
735
  couponId?: string;
735
736
  taxId?: string;
736
- budget?: number | bigint;
737
+ budget?: number;
737
738
  }): Promise<Models.Organization<Preferences>>;
738
739
  /**
739
740
  * Update the billing plan for an organization.
740
741
  *
741
742
  * @param {string} organizationId - Organization Unique ID
742
- * @param {string} billingPlan - Organization billing plan chosen
743
+ * @param {BillingPlan} billingPlan - Organization billing plan chosen
743
744
  * @param {string} paymentMethodId - Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.
744
745
  * @param {string} billingAddressId - Unique ID of billing address
745
746
  * @param {string[]} invites - Additional member invites
746
747
  * @param {string} couponId - Coupon id
747
748
  * @param {string} taxId - Tax Id associated to billing.
748
- * @param {number | bigint} budget - Budget limit for additional usage set for the organization
749
+ * @param {number} budget - Budget limit for additional usage set for the organization
749
750
  * @throws {AppwriteException}
750
751
  * @returns {Promise<Models.Organization<Preferences>>}
751
752
  * @deprecated Use the object parameter style method for a better developer experience.
752
753
  */
753
- updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingPlan: string, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number | bigint): Promise<Models.Organization<Preferences>>;
754
+ updatePlan<Preferences extends Models.Preferences = Models.DefaultPreferences>(organizationId: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number): Promise<Models.Organization<Preferences>>;
754
755
  /**
755
756
  * Cancel the downgrade initiated for an organization.
756
757
  *