@appwrite.io/console 2.1.1 → 2.1.3

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 (66) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -1
  3. package/dist/cjs/sdk.js +311 -17
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +310 -18
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +344 -70
  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 +3 -2
  15. package/src/channel.ts +134 -0
  16. package/src/client.ts +79 -9
  17. package/src/enums/billing-plan.ts +17 -0
  18. package/src/enums/filter-type.ts +4 -0
  19. package/src/enums/name.ts +1 -0
  20. package/src/enums/o-auth-provider.ts +0 -2
  21. package/src/index.ts +3 -0
  22. package/src/models.ts +437 -375
  23. package/src/query.ts +42 -0
  24. package/src/services/account.ts +20 -20
  25. package/src/services/avatars.ts +117 -117
  26. package/src/services/backups.ts +18 -18
  27. package/src/services/console.ts +24 -24
  28. package/src/services/databases.ts +89 -89
  29. package/src/services/domains.ts +295 -204
  30. package/src/services/functions.ts +30 -30
  31. package/src/services/health.ts +201 -152
  32. package/src/services/messaging.ts +54 -54
  33. package/src/services/migrations.ts +36 -36
  34. package/src/services/organizations.ts +67 -66
  35. package/src/services/projects.ts +81 -81
  36. package/src/services/realtime.ts +35 -12
  37. package/src/services/sites.ts +30 -30
  38. package/src/services/storage.ts +45 -45
  39. package/src/services/tables-db.ts +89 -89
  40. package/src/services/users.ts +39 -39
  41. package/types/channel.d.ts +71 -0
  42. package/types/client.d.ts +11 -3
  43. package/types/enums/billing-plan.d.ts +17 -0
  44. package/types/enums/filter-type.d.ts +4 -0
  45. package/types/enums/name.d.ts +1 -0
  46. package/types/enums/o-auth-provider.d.ts +0 -2
  47. package/types/index.d.ts +3 -0
  48. package/types/models.d.ts +434 -375
  49. package/types/query.d.ts +30 -0
  50. package/types/services/account.d.ts +11 -11
  51. package/types/services/avatars.d.ts +82 -82
  52. package/types/services/backups.d.ts +8 -8
  53. package/types/services/console.d.ts +14 -14
  54. package/types/services/databases.d.ts +50 -50
  55. package/types/services/domains.d.ts +139 -104
  56. package/types/services/functions.d.ts +15 -15
  57. package/types/services/health.d.ts +95 -78
  58. package/types/services/messaging.d.ts +24 -24
  59. package/types/services/migrations.d.ts +16 -16
  60. package/types/services/organizations.d.ts +37 -36
  61. package/types/services/projects.d.ts +36 -36
  62. package/types/services/realtime.d.ts +17 -8
  63. package/types/services/sites.d.ts +15 -15
  64. package/types/services/storage.d.ts +30 -30
  65. package/types/services/tables-db.d.ts +50 -50
  66. package/types/services/users.d.ts +24 -24
@@ -282,68 +282,68 @@ export declare class Projects {
282
282
  * Update how long sessions created within a project should stay active for.
283
283
  *
284
284
  * @param {string} params.projectId - Project unique ID.
285
- * @param {number | bigint} params.duration - Project session length in seconds. Max length: 31536000 seconds.
285
+ * @param {number} params.duration - Project session length in seconds. Max length: 31536000 seconds.
286
286
  * @throws {AppwriteException}
287
287
  * @returns {Promise<Models.Project>}
288
288
  */
289
289
  updateAuthDuration(params: {
290
290
  projectId: string;
291
- duration: number | bigint;
291
+ duration: number;
292
292
  }): Promise<Models.Project>;
293
293
  /**
294
294
  * Update how long sessions created within a project should stay active for.
295
295
  *
296
296
  * @param {string} projectId - Project unique ID.
297
- * @param {number | bigint} duration - Project session length in seconds. Max length: 31536000 seconds.
297
+ * @param {number} duration - Project session length in seconds. Max length: 31536000 seconds.
298
298
  * @throws {AppwriteException}
299
299
  * @returns {Promise<Models.Project>}
300
300
  * @deprecated Use the object parameter style method for a better developer experience.
301
301
  */
302
- updateAuthDuration(projectId: string, duration: number | bigint): Promise<Models.Project>;
302
+ updateAuthDuration(projectId: string, duration: number): Promise<Models.Project>;
303
303
  /**
304
304
  * Update the maximum number of users allowed in this project. Set to 0 for unlimited users.
305
305
  *
306
306
  * @param {string} params.projectId - Project unique ID.
307
- * @param {number | bigint} params.limit - Set the max number of users allowed in this project. Use 0 for unlimited.
307
+ * @param {number} params.limit - Set the max number of users allowed in this project. Use 0 for unlimited.
308
308
  * @throws {AppwriteException}
309
309
  * @returns {Promise<Models.Project>}
310
310
  */
311
311
  updateAuthLimit(params: {
312
312
  projectId: string;
313
- limit: number | bigint;
313
+ limit: number;
314
314
  }): Promise<Models.Project>;
315
315
  /**
316
316
  * Update the maximum number of users allowed in this project. Set to 0 for unlimited users.
317
317
  *
318
318
  * @param {string} projectId - Project unique ID.
319
- * @param {number | bigint} limit - Set the max number of users allowed in this project. Use 0 for unlimited.
319
+ * @param {number} limit - Set the max number of users allowed in this project. Use 0 for unlimited.
320
320
  * @throws {AppwriteException}
321
321
  * @returns {Promise<Models.Project>}
322
322
  * @deprecated Use the object parameter style method for a better developer experience.
323
323
  */
324
- updateAuthLimit(projectId: string, limit: number | bigint): Promise<Models.Project>;
324
+ updateAuthLimit(projectId: string, limit: number): Promise<Models.Project>;
325
325
  /**
326
326
  * Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.
327
327
  *
328
328
  * @param {string} params.projectId - Project unique ID.
329
- * @param {number | bigint} params.limit - Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10
329
+ * @param {number} params.limit - Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10
330
330
  * @throws {AppwriteException}
331
331
  * @returns {Promise<Models.Project>}
332
332
  */
333
333
  updateAuthSessionsLimit(params: {
334
334
  projectId: string;
335
- limit: number | bigint;
335
+ limit: number;
336
336
  }): Promise<Models.Project>;
337
337
  /**
338
338
  * Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.
339
339
  *
340
340
  * @param {string} projectId - Project unique ID.
341
- * @param {number | bigint} limit - Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10
341
+ * @param {number} limit - Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10
342
342
  * @throws {AppwriteException}
343
343
  * @returns {Promise<Models.Project>}
344
344
  * @deprecated Use the object parameter style method for a better developer experience.
345
345
  */
346
- updateAuthSessionsLimit(projectId: string, limit: number | bigint): Promise<Models.Project>;
346
+ updateAuthSessionsLimit(projectId: string, limit: number): Promise<Models.Project>;
347
347
  /**
348
348
  * Update project membership privacy settings. Use this endpoint to control what user information is visible to other team members, such as user name, email, and MFA status.
349
349
  *
@@ -420,24 +420,24 @@ export declare class Projects {
420
420
  * Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.
421
421
  *
422
422
  * @param {string} params.projectId - Project unique ID.
423
- * @param {number | bigint} params.limit - Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0
423
+ * @param {number} params.limit - Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0
424
424
  * @throws {AppwriteException}
425
425
  * @returns {Promise<Models.Project>}
426
426
  */
427
427
  updateAuthPasswordHistory(params: {
428
428
  projectId: string;
429
- limit: number | bigint;
429
+ limit: number;
430
430
  }): Promise<Models.Project>;
431
431
  /**
432
432
  * Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.
433
433
  *
434
434
  * @param {string} projectId - Project unique ID.
435
- * @param {number | bigint} limit - Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0
435
+ * @param {number} limit - Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0
436
436
  * @throws {AppwriteException}
437
437
  * @returns {Promise<Models.Project>}
438
438
  * @deprecated Use the object parameter style method for a better developer experience.
439
439
  */
440
- updateAuthPasswordHistory(projectId: string, limit: number | bigint): Promise<Models.Project>;
440
+ updateAuthPasswordHistory(projectId: string, limit: number): Promise<Models.Project>;
441
441
  /**
442
442
  * Enable or disable checking user passwords against their personal data. This helps prevent users from using personal information in their passwords.
443
443
  *
@@ -653,26 +653,26 @@ export declare class Projects {
653
653
  *
654
654
  * @param {string} params.projectId - Project unique ID.
655
655
  * @param {string[]} params.scopes - List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
656
- * @param {number | bigint} params.duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
656
+ * @param {number} params.duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
657
657
  * @throws {AppwriteException}
658
658
  * @returns {Promise<Models.Jwt>}
659
659
  */
660
660
  createJWT(params: {
661
661
  projectId: string;
662
662
  scopes: string[];
663
- duration?: number | bigint;
663
+ duration?: number;
664
664
  }): Promise<Models.Jwt>;
665
665
  /**
666
666
  * Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time.
667
667
  *
668
668
  * @param {string} projectId - Project unique ID.
669
669
  * @param {string[]} scopes - List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
670
- * @param {number | bigint} duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
670
+ * @param {number} duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
671
671
  * @throws {AppwriteException}
672
672
  * @returns {Promise<Models.Jwt>}
673
673
  * @deprecated Use the object parameter style method for a better developer experience.
674
674
  */
675
- createJWT(projectId: string, scopes: string[], duration?: number | bigint): Promise<Models.Jwt>;
675
+ createJWT(projectId: string, scopes: string[], duration?: number): Promise<Models.Jwt>;
676
676
  /**
677
677
  * Get a list of all API keys from the current project.
678
678
  *
@@ -1041,7 +1041,7 @@ export declare class Projects {
1041
1041
  * @param {string} params.senderEmail - Email of the sender
1042
1042
  * @param {string} params.replyTo - Reply to email
1043
1043
  * @param {string} params.host - SMTP server host name
1044
- * @param {number | bigint} params.port - SMTP server port
1044
+ * @param {number} params.port - SMTP server port
1045
1045
  * @param {string} params.username - SMTP server username
1046
1046
  * @param {string} params.password - SMTP server password
1047
1047
  * @param {SMTPSecure} params.secure - Does SMTP server use secure connection
@@ -1056,7 +1056,7 @@ export declare class Projects {
1056
1056
  senderEmail?: string;
1057
1057
  replyTo?: string;
1058
1058
  host?: string;
1059
- port?: number | bigint;
1059
+ port?: number;
1060
1060
  username?: string;
1061
1061
  password?: string;
1062
1062
  secure?: SMTPSecure;
@@ -1070,7 +1070,7 @@ export declare class Projects {
1070
1070
  * @param {string} senderEmail - Email of the sender
1071
1071
  * @param {string} replyTo - Reply to email
1072
1072
  * @param {string} host - SMTP server host name
1073
- * @param {number | bigint} port - SMTP server port
1073
+ * @param {number} port - SMTP server port
1074
1074
  * @param {string} username - SMTP server username
1075
1075
  * @param {string} password - SMTP server password
1076
1076
  * @param {SMTPSecure} secure - Does SMTP server use secure connection
@@ -1078,7 +1078,7 @@ export declare class Projects {
1078
1078
  * @returns {Promise<Models.Project>}
1079
1079
  * @deprecated Use the object parameter style method for a better developer experience.
1080
1080
  */
1081
- updateSmtp(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project>;
1081
+ updateSmtp(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project>;
1082
1082
  /**
1083
1083
  * Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.
1084
1084
  *
@@ -1088,7 +1088,7 @@ export declare class Projects {
1088
1088
  * @param {string} params.senderEmail - Email of the sender
1089
1089
  * @param {string} params.replyTo - Reply to email
1090
1090
  * @param {string} params.host - SMTP server host name
1091
- * @param {number | bigint} params.port - SMTP server port
1091
+ * @param {number} params.port - SMTP server port
1092
1092
  * @param {string} params.username - SMTP server username
1093
1093
  * @param {string} params.password - SMTP server password
1094
1094
  * @param {SMTPSecure} params.secure - Does SMTP server use secure connection
@@ -1102,7 +1102,7 @@ export declare class Projects {
1102
1102
  senderEmail?: string;
1103
1103
  replyTo?: string;
1104
1104
  host?: string;
1105
- port?: number | bigint;
1105
+ port?: number;
1106
1106
  username?: string;
1107
1107
  password?: string;
1108
1108
  secure?: SMTPSecure;
@@ -1116,7 +1116,7 @@ export declare class Projects {
1116
1116
  * @param {string} senderEmail - Email of the sender
1117
1117
  * @param {string} replyTo - Reply to email
1118
1118
  * @param {string} host - SMTP server host name
1119
- * @param {number | bigint} port - SMTP server port
1119
+ * @param {number} port - SMTP server port
1120
1120
  * @param {string} username - SMTP server username
1121
1121
  * @param {string} password - SMTP server password
1122
1122
  * @param {SMTPSecure} secure - Does SMTP server use secure connection
@@ -1124,7 +1124,7 @@ export declare class Projects {
1124
1124
  * @returns {Promise<Models.Project>}
1125
1125
  * @deprecated Use the object parameter style method for a better developer experience.
1126
1126
  */
1127
- updateSMTP(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project>;
1127
+ updateSMTP(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project>;
1128
1128
  /**
1129
1129
  * Send a test email to verify SMTP configuration.
1130
1130
  *
@@ -1134,7 +1134,7 @@ export declare class Projects {
1134
1134
  * @param {string} params.senderEmail - Email of the sender
1135
1135
  * @param {string} params.host - SMTP server host name
1136
1136
  * @param {string} params.replyTo - Reply to email
1137
- * @param {number | bigint} params.port - SMTP server port
1137
+ * @param {number} params.port - SMTP server port
1138
1138
  * @param {string} params.username - SMTP server username
1139
1139
  * @param {string} params.password - SMTP server password
1140
1140
  * @param {SMTPSecure} params.secure - Does SMTP server use secure connection
@@ -1149,7 +1149,7 @@ export declare class Projects {
1149
1149
  senderEmail: string;
1150
1150
  host: string;
1151
1151
  replyTo?: string;
1152
- port?: number | bigint;
1152
+ port?: number;
1153
1153
  username?: string;
1154
1154
  password?: string;
1155
1155
  secure?: SMTPSecure;
@@ -1163,7 +1163,7 @@ export declare class Projects {
1163
1163
  * @param {string} senderEmail - Email of the sender
1164
1164
  * @param {string} host - SMTP server host name
1165
1165
  * @param {string} replyTo - Reply to email
1166
- * @param {number | bigint} port - SMTP server port
1166
+ * @param {number} port - SMTP server port
1167
1167
  * @param {string} username - SMTP server username
1168
1168
  * @param {string} password - SMTP server password
1169
1169
  * @param {SMTPSecure} secure - Does SMTP server use secure connection
@@ -1171,7 +1171,7 @@ export declare class Projects {
1171
1171
  * @returns {Promise<{}>}
1172
1172
  * @deprecated Use the object parameter style method for a better developer experience.
1173
1173
  */
1174
- createSmtpTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
1174
+ createSmtpTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
1175
1175
  /**
1176
1176
  * Send a test email to verify SMTP configuration.
1177
1177
  *
@@ -1181,7 +1181,7 @@ export declare class Projects {
1181
1181
  * @param {string} params.senderEmail - Email of the sender
1182
1182
  * @param {string} params.host - SMTP server host name
1183
1183
  * @param {string} params.replyTo - Reply to email
1184
- * @param {number | bigint} params.port - SMTP server port
1184
+ * @param {number} params.port - SMTP server port
1185
1185
  * @param {string} params.username - SMTP server username
1186
1186
  * @param {string} params.password - SMTP server password
1187
1187
  * @param {SMTPSecure} params.secure - Does SMTP server use secure connection
@@ -1195,7 +1195,7 @@ export declare class Projects {
1195
1195
  senderEmail: string;
1196
1196
  host: string;
1197
1197
  replyTo?: string;
1198
- port?: number | bigint;
1198
+ port?: number;
1199
1199
  username?: string;
1200
1200
  password?: string;
1201
1201
  secure?: SMTPSecure;
@@ -1209,7 +1209,7 @@ export declare class Projects {
1209
1209
  * @param {string} senderEmail - Email of the sender
1210
1210
  * @param {string} host - SMTP server host name
1211
1211
  * @param {string} replyTo - Reply to email
1212
- * @param {number | bigint} port - SMTP server port
1212
+ * @param {number} port - SMTP server port
1213
1213
  * @param {string} username - SMTP server username
1214
1214
  * @param {string} password - SMTP server password
1215
1215
  * @param {SMTPSecure} secure - Does SMTP server use secure connection
@@ -1217,7 +1217,7 @@ export declare class Projects {
1217
1217
  * @returns {Promise<{}>}
1218
1218
  * @deprecated Use the object parameter style method for a better developer experience.
1219
1219
  */
1220
- createSMTPTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
1220
+ createSMTPTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
1221
1221
  /**
1222
1222
  * Update the status of a project
1223
1223
  *
@@ -1,4 +1,5 @@
1
1
  import { Client } from '../client';
2
+ import { Channel, ActionableChannel, ResolvedChannel } from '../channel';
2
3
  export declare type RealtimeSubscription = {
3
4
  close: () => Promise<void>;
4
5
  };
@@ -78,38 +79,46 @@ export declare class Realtime {
78
79
  private closeSocket;
79
80
  private getTimeout;
80
81
  private sleep;
82
+ /**
83
+ * Convert a channel value to a string
84
+ *
85
+ * @private
86
+ * @param {string | Channel<any> | ActionableChannel | ResolvedChannel} channel - Channel value (string or Channel builder instance)
87
+ * @returns {string} Channel string representation
88
+ */
89
+ private channelToString;
81
90
  /**
82
91
  * Subscribe to a single channel
83
92
  *
84
- * @param {string} channel - Channel name to subscribe to
93
+ * @param {string | Channel<any> | ActionableChannel | ResolvedChannel} channel - Channel name to subscribe to (string or Channel builder instance)
85
94
  * @param {Function} callback - Callback function to handle events
86
95
  * @returns {Promise<RealtimeSubscription>} Subscription object with close method
87
96
  */
88
- subscribe(channel: string, callback: (event: RealtimeResponseEvent<any>) => void): Promise<RealtimeSubscription>;
97
+ subscribe(channel: string | Channel<any> | ActionableChannel | ResolvedChannel, callback: (event: RealtimeResponseEvent<any>) => void): Promise<RealtimeSubscription>;
89
98
  /**
90
99
  * Subscribe to multiple channels
91
100
  *
92
- * @param {string[]} channels - Array of channel names to subscribe to
101
+ * @param {(string | Channel<any> | ActionableChannel | ResolvedChannel)[]} channels - Array of channel names to subscribe to (strings or Channel builder instances)
93
102
  * @param {Function} callback - Callback function to handle events
94
103
  * @returns {Promise<RealtimeSubscription>} Subscription object with close method
95
104
  */
96
- subscribe(channels: string[], callback: (event: RealtimeResponseEvent<any>) => void): Promise<RealtimeSubscription>;
105
+ subscribe(channels: (string | Channel<any> | ActionableChannel | ResolvedChannel)[], callback: (event: RealtimeResponseEvent<any>) => void): Promise<RealtimeSubscription>;
97
106
  /**
98
107
  * Subscribe to a single channel with typed payload
99
108
  *
100
- * @param {string} channel - Channel name to subscribe to
109
+ * @param {string | Channel<any> | ActionableChannel | ResolvedChannel} channel - Channel name to subscribe to (string or Channel builder instance)
101
110
  * @param {Function} callback - Callback function to handle events with typed payload
102
111
  * @returns {Promise<RealtimeSubscription>} Subscription object with close method
103
112
  */
104
- subscribe<T>(channel: string, callback: (event: RealtimeResponseEvent<T>) => void): Promise<RealtimeSubscription>;
113
+ subscribe<T>(channel: string | Channel<any> | ActionableChannel | ResolvedChannel, callback: (event: RealtimeResponseEvent<T>) => void): Promise<RealtimeSubscription>;
105
114
  /**
106
115
  * Subscribe to multiple channels with typed payload
107
116
  *
108
- * @param {string[]} channels - Array of channel names to subscribe to
117
+ * @param {(string | Channel<any> | ActionableChannel | ResolvedChannel)[]} channels - Array of channel names to subscribe to (strings or Channel builder instances)
109
118
  * @param {Function} callback - Callback function to handle events with typed payload
110
119
  * @returns {Promise<RealtimeSubscription>} Subscription object with close method
111
120
  */
112
- subscribe<T>(channels: string[], callback: (event: RealtimeResponseEvent<T>) => void): Promise<RealtimeSubscription>;
121
+ subscribe<T>(channels: (string | Channel<any> | ActionableChannel | ResolvedChannel)[], callback: (event: RealtimeResponseEvent<T>) => void): Promise<RealtimeSubscription>;
113
122
  private cleanUp;
114
123
  private handleMessage;
115
124
  private handleResponseConnected;
@@ -44,7 +44,7 @@ export declare class Sites {
44
44
  * @param {BuildRuntime} params.buildRuntime - Runtime to use during build step.
45
45
  * @param {boolean} params.enabled - Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.
46
46
  * @param {boolean} params.logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
47
- * @param {number | bigint} params.timeout - Maximum request time in seconds.
47
+ * @param {number} params.timeout - Maximum request time in seconds.
48
48
  * @param {string} params.installCommand - Install Command.
49
49
  * @param {string} params.buildCommand - Build Command.
50
50
  * @param {string} params.outputDirectory - Output Directory for site.
@@ -66,7 +66,7 @@ export declare class Sites {
66
66
  buildRuntime: BuildRuntime;
67
67
  enabled?: boolean;
68
68
  logging?: boolean;
69
- timeout?: number | bigint;
69
+ timeout?: number;
70
70
  installCommand?: string;
71
71
  buildCommand?: string;
72
72
  outputDirectory?: string;
@@ -88,7 +88,7 @@ export declare class Sites {
88
88
  * @param {BuildRuntime} buildRuntime - Runtime to use during build step.
89
89
  * @param {boolean} enabled - Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.
90
90
  * @param {boolean} logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
91
- * @param {number | bigint} timeout - Maximum request time in seconds.
91
+ * @param {number} timeout - Maximum request time in seconds.
92
92
  * @param {string} installCommand - Install Command.
93
93
  * @param {string} buildCommand - Build Command.
94
94
  * @param {string} outputDirectory - Output Directory for site.
@@ -104,7 +104,7 @@ export declare class Sites {
104
104
  * @returns {Promise<Models.Site>}
105
105
  * @deprecated Use the object parameter style method for a better developer experience.
106
106
  */
107
- create(siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number | bigint, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Site>;
107
+ create(siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Site>;
108
108
  /**
109
109
  * Get a list of all frameworks that are currently available on the server instance.
110
110
  *
@@ -124,29 +124,29 @@ export declare class Sites {
124
124
  *
125
125
  * @param {string[]} params.frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
126
126
  * @param {string[]} params.useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
127
- * @param {number | bigint} params.limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
128
- * @param {number | bigint} params.offset - Offset the list of returned templates. Maximum offset is 5000.
127
+ * @param {number} params.limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
128
+ * @param {number} params.offset - Offset the list of returned templates. Maximum offset is 5000.
129
129
  * @throws {AppwriteException}
130
130
  * @returns {Promise<Models.TemplateSiteList>}
131
131
  */
132
132
  listTemplates(params?: {
133
133
  frameworks?: string[];
134
134
  useCases?: string[];
135
- limit?: number | bigint;
136
- offset?: number | bigint;
135
+ limit?: number;
136
+ offset?: number;
137
137
  }): Promise<Models.TemplateSiteList>;
138
138
  /**
139
139
  * List available site templates. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
140
140
  *
141
141
  * @param {string[]} frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
142
142
  * @param {string[]} useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
143
- * @param {number | bigint} limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
144
- * @param {number | bigint} offset - Offset the list of returned templates. Maximum offset is 5000.
143
+ * @param {number} limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
144
+ * @param {number} offset - Offset the list of returned templates. Maximum offset is 5000.
145
145
  * @throws {AppwriteException}
146
146
  * @returns {Promise<Models.TemplateSiteList>}
147
147
  * @deprecated Use the object parameter style method for a better developer experience.
148
148
  */
149
- listTemplates(frameworks?: string[], useCases?: string[], limit?: number | bigint, offset?: number | bigint): Promise<Models.TemplateSiteList>;
149
+ listTemplates(frameworks?: string[], useCases?: string[], limit?: number, offset?: number): Promise<Models.TemplateSiteList>;
150
150
  /**
151
151
  * Get a site template using ID. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
152
152
  *
@@ -212,7 +212,7 @@ export declare class Sites {
212
212
  * @param {Framework} params.framework - Sites framework.
213
213
  * @param {boolean} params.enabled - Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.
214
214
  * @param {boolean} params.logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
215
- * @param {number | bigint} params.timeout - Maximum request time in seconds.
215
+ * @param {number} params.timeout - Maximum request time in seconds.
216
216
  * @param {string} params.installCommand - Install Command.
217
217
  * @param {string} params.buildCommand - Build Command.
218
218
  * @param {string} params.outputDirectory - Output Directory for site.
@@ -234,7 +234,7 @@ export declare class Sites {
234
234
  framework: Framework;
235
235
  enabled?: boolean;
236
236
  logging?: boolean;
237
- timeout?: number | bigint;
237
+ timeout?: number;
238
238
  installCommand?: string;
239
239
  buildCommand?: string;
240
240
  outputDirectory?: string;
@@ -256,7 +256,7 @@ export declare class Sites {
256
256
  * @param {Framework} framework - Sites framework.
257
257
  * @param {boolean} enabled - Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.
258
258
  * @param {boolean} logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
259
- * @param {number | bigint} timeout - Maximum request time in seconds.
259
+ * @param {number} timeout - Maximum request time in seconds.
260
260
  * @param {string} installCommand - Install Command.
261
261
  * @param {string} buildCommand - Build Command.
262
262
  * @param {string} outputDirectory - Output Directory for site.
@@ -273,7 +273,7 @@ export declare class Sites {
273
273
  * @returns {Promise<Models.Site>}
274
274
  * @deprecated Use the object parameter style method for a better developer experience.
275
275
  */
276
- update(siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number | bigint, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Site>;
276
+ update(siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string): Promise<Models.Site>;
277
277
  /**
278
278
  * Delete a site by its unique ID.
279
279
  *
@@ -40,7 +40,7 @@ export declare class Storage {
40
40
  * @param {string[]} params.permissions - An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
41
41
  * @param {boolean} params.fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).
42
42
  * @param {boolean} params.enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
43
- * @param {number | bigint} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
43
+ * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
44
44
  * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
45
45
  * @param {Compression} params.compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
46
46
  * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
@@ -55,7 +55,7 @@ export declare class Storage {
55
55
  permissions?: string[];
56
56
  fileSecurity?: boolean;
57
57
  enabled?: boolean;
58
- maximumFileSize?: number | bigint;
58
+ maximumFileSize?: number;
59
59
  allowedFileExtensions?: string[];
60
60
  compression?: Compression;
61
61
  encryption?: boolean;
@@ -70,7 +70,7 @@ export declare class Storage {
70
70
  * @param {string[]} permissions - An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
71
71
  * @param {boolean} fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).
72
72
  * @param {boolean} enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
73
- * @param {number | bigint} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
73
+ * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
74
74
  * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
75
75
  * @param {Compression} compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
76
76
  * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
@@ -80,7 +80,7 @@ export declare class Storage {
80
80
  * @returns {Promise<Models.Bucket>}
81
81
  * @deprecated Use the object parameter style method for a better developer experience.
82
82
  */
83
- createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number | bigint, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean): Promise<Models.Bucket>;
83
+ createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean): Promise<Models.Bucket>;
84
84
  /**
85
85
  * Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.
86
86
  *
@@ -108,7 +108,7 @@ export declare class Storage {
108
108
  * @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
109
109
  * @param {boolean} params.fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).
110
110
  * @param {boolean} params.enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
111
- * @param {number | bigint} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
111
+ * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
112
112
  * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
113
113
  * @param {Compression} params.compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
114
114
  * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
@@ -123,7 +123,7 @@ export declare class Storage {
123
123
  permissions?: string[];
124
124
  fileSecurity?: boolean;
125
125
  enabled?: boolean;
126
- maximumFileSize?: number | bigint;
126
+ maximumFileSize?: number;
127
127
  allowedFileExtensions?: string[];
128
128
  compression?: Compression;
129
129
  encryption?: boolean;
@@ -138,7 +138,7 @@ export declare class Storage {
138
138
  * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
139
139
  * @param {boolean} fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).
140
140
  * @param {boolean} enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
141
- * @param {number | bigint} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
141
+ * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
142
142
  * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
143
143
  * @param {Compression} compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
144
144
  * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
@@ -148,7 +148,7 @@ export declare class Storage {
148
148
  * @returns {Promise<Models.Bucket>}
149
149
  * @deprecated Use the object parameter style method for a better developer experience.
150
150
  */
151
- updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number | bigint, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean): Promise<Models.Bucket>;
151
+ updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean): Promise<Models.Bucket>;
152
152
  /**
153
153
  * Delete a storage bucket by its unique ID.
154
154
  *
@@ -341,15 +341,15 @@ export declare class Storage {
341
341
  *
342
342
  * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
343
343
  * @param {string} params.fileId - File ID
344
- * @param {number | bigint} params.width - Resize preview image width, Pass an integer between 0 to 4000.
345
- * @param {number | bigint} params.height - Resize preview image height, Pass an integer between 0 to 4000.
344
+ * @param {number} params.width - Resize preview image width, Pass an integer between 0 to 4000.
345
+ * @param {number} params.height - Resize preview image height, Pass an integer between 0 to 4000.
346
346
  * @param {ImageGravity} params.gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right
347
- * @param {number | bigint} params.quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
348
- * @param {number | bigint} params.borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.
347
+ * @param {number} params.quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
348
+ * @param {number} params.borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.
349
349
  * @param {string} params.borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.
350
- * @param {number | bigint} params.borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.
351
- * @param {number | bigint} params.opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.
352
- * @param {number | bigint} params.rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.
350
+ * @param {number} params.borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.
351
+ * @param {number} params.opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.
352
+ * @param {number} params.rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.
353
353
  * @param {string} params.background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.
354
354
  * @param {ImageFormat} params.output - Output format type (jpeg, jpg, png, gif and webp).
355
355
  * @param {string} params.token - File token for accessing this file.
@@ -359,15 +359,15 @@ export declare class Storage {
359
359
  getFilePreview(params: {
360
360
  bucketId: string;
361
361
  fileId: string;
362
- width?: number | bigint;
363
- height?: number | bigint;
362
+ width?: number;
363
+ height?: number;
364
364
  gravity?: ImageGravity;
365
- quality?: number | bigint;
366
- borderWidth?: number | bigint;
365
+ quality?: number;
366
+ borderWidth?: number;
367
367
  borderColor?: string;
368
- borderRadius?: number | bigint;
369
- opacity?: number | bigint;
370
- rotation?: number | bigint;
368
+ borderRadius?: number;
369
+ opacity?: number;
370
+ rotation?: number;
371
371
  background?: string;
372
372
  output?: ImageFormat;
373
373
  token?: string;
@@ -377,15 +377,15 @@ export declare class Storage {
377
377
  *
378
378
  * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
379
379
  * @param {string} fileId - File ID
380
- * @param {number | bigint} width - Resize preview image width, Pass an integer between 0 to 4000.
381
- * @param {number | bigint} height - Resize preview image height, Pass an integer between 0 to 4000.
380
+ * @param {number} width - Resize preview image width, Pass an integer between 0 to 4000.
381
+ * @param {number} height - Resize preview image height, Pass an integer between 0 to 4000.
382
382
  * @param {ImageGravity} gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right
383
- * @param {number | bigint} quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
384
- * @param {number | bigint} borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.
383
+ * @param {number} quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
384
+ * @param {number} borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.
385
385
  * @param {string} borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.
386
- * @param {number | bigint} borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.
387
- * @param {number | bigint} opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.
388
- * @param {number | bigint} rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.
386
+ * @param {number} borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.
387
+ * @param {number} opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.
388
+ * @param {number} rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.
389
389
  * @param {string} background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.
390
390
  * @param {ImageFormat} output - Output format type (jpeg, jpg, png, gif and webp).
391
391
  * @param {string} token - File token for accessing this file.
@@ -393,7 +393,7 @@ export declare class Storage {
393
393
  * @returns {string}
394
394
  * @deprecated Use the object parameter style method for a better developer experience.
395
395
  */
396
- getFilePreview(bucketId: string, fileId: string, width?: number | bigint, height?: number | bigint, gravity?: ImageGravity, quality?: number | bigint, borderWidth?: number | bigint, borderColor?: string, borderRadius?: number | bigint, opacity?: number | bigint, rotation?: number | bigint, background?: string, output?: ImageFormat, token?: string): string;
396
+ getFilePreview(bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string): string;
397
397
  /**
398
398
  * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.
399
399
  *