@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
@@ -92,7 +92,7 @@ export class Sites {
92
92
  * @param {BuildRuntime} params.buildRuntime - Runtime to use during build step.
93
93
  * @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.
94
94
  * @param {boolean} params.logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
95
- * @param {number | bigint} params.timeout - Maximum request time in seconds.
95
+ * @param {number} params.timeout - Maximum request time in seconds.
96
96
  * @param {string} params.installCommand - Install Command.
97
97
  * @param {string} params.buildCommand - Build Command.
98
98
  * @param {string} params.outputDirectory - Output Directory for site.
@@ -107,7 +107,7 @@ export class Sites {
107
107
  * @throws {AppwriteException}
108
108
  * @returns {Promise<Models.Site>}
109
109
  */
110
- create(params: { 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>;
110
+ create(params: { 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>;
111
111
  /**
112
112
  * Create a new site.
113
113
  *
@@ -117,7 +117,7 @@ export class Sites {
117
117
  * @param {BuildRuntime} buildRuntime - Runtime to use during build step.
118
118
  * @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.
119
119
  * @param {boolean} logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
120
- * @param {number | bigint} timeout - Maximum request time in seconds.
120
+ * @param {number} timeout - Maximum request time in seconds.
121
121
  * @param {string} installCommand - Install Command.
122
122
  * @param {string} buildCommand - Build Command.
123
123
  * @param {string} outputDirectory - Output Directory for site.
@@ -133,15 +133,15 @@ export class Sites {
133
133
  * @returns {Promise<Models.Site>}
134
134
  * @deprecated Use the object parameter style method for a better developer experience.
135
135
  */
136
- 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>;
136
+ 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>;
137
137
  create(
138
- paramsOrFirst: { 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 } | string,
139
- ...rest: [(string)?, (Framework)?, (BuildRuntime)?, (boolean)?, (boolean)?, (number | bigint)?, (string)?, (string)?, (string)?, (Adapter)?, (string)?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
138
+ paramsOrFirst: { 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 } | string,
139
+ ...rest: [(string)?, (Framework)?, (BuildRuntime)?, (boolean)?, (boolean)?, (number)?, (string)?, (string)?, (string)?, (Adapter)?, (string)?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
140
140
  ): Promise<Models.Site> {
141
- let params: { 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 };
141
+ let params: { 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 };
142
142
 
143
143
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
144
- params = (paramsOrFirst || {}) as { 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 };
144
+ params = (paramsOrFirst || {}) as { 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 };
145
145
  } else {
146
146
  params = {
147
147
  siteId: paramsOrFirst as string,
@@ -150,7 +150,7 @@ export class Sites {
150
150
  buildRuntime: rest[2] as BuildRuntime,
151
151
  enabled: rest[3] as boolean,
152
152
  logging: rest[4] as boolean,
153
- timeout: rest[5] as number | bigint,
153
+ timeout: rest[5] as number,
154
154
  installCommand: rest[6] as string,
155
155
  buildCommand: rest[7] as string,
156
156
  outputDirectory: rest[8] as string,
@@ -318,38 +318,38 @@ export class Sites {
318
318
  *
319
319
  * @param {string[]} params.frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
320
320
  * @param {string[]} params.useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
321
- * @param {number | bigint} params.limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
322
- * @param {number | bigint} params.offset - Offset the list of returned templates. Maximum offset is 5000.
321
+ * @param {number} params.limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
322
+ * @param {number} params.offset - Offset the list of returned templates. Maximum offset is 5000.
323
323
  * @throws {AppwriteException}
324
324
  * @returns {Promise<Models.TemplateSiteList>}
325
325
  */
326
- listTemplates(params?: { frameworks?: string[], useCases?: string[], limit?: number | bigint, offset?: number | bigint }): Promise<Models.TemplateSiteList>;
326
+ listTemplates(params?: { frameworks?: string[], useCases?: string[], limit?: number, offset?: number }): Promise<Models.TemplateSiteList>;
327
327
  /**
328
328
  * List available site templates. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
329
329
  *
330
330
  * @param {string[]} frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
331
331
  * @param {string[]} useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
332
- * @param {number | bigint} limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
333
- * @param {number | bigint} offset - Offset the list of returned templates. Maximum offset is 5000.
332
+ * @param {number} limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
333
+ * @param {number} offset - Offset the list of returned templates. Maximum offset is 5000.
334
334
  * @throws {AppwriteException}
335
335
  * @returns {Promise<Models.TemplateSiteList>}
336
336
  * @deprecated Use the object parameter style method for a better developer experience.
337
337
  */
338
- listTemplates(frameworks?: string[], useCases?: string[], limit?: number | bigint, offset?: number | bigint): Promise<Models.TemplateSiteList>;
338
+ listTemplates(frameworks?: string[], useCases?: string[], limit?: number, offset?: number): Promise<Models.TemplateSiteList>;
339
339
  listTemplates(
340
- paramsOrFirst?: { frameworks?: string[], useCases?: string[], limit?: number | bigint, offset?: number | bigint } | string[],
341
- ...rest: [(string[])?, (number | bigint)?, (number | bigint)?]
340
+ paramsOrFirst?: { frameworks?: string[], useCases?: string[], limit?: number, offset?: number } | string[],
341
+ ...rest: [(string[])?, (number)?, (number)?]
342
342
  ): Promise<Models.TemplateSiteList> {
343
- let params: { frameworks?: string[], useCases?: string[], limit?: number | bigint, offset?: number | bigint };
343
+ let params: { frameworks?: string[], useCases?: string[], limit?: number, offset?: number };
344
344
 
345
345
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
346
- params = (paramsOrFirst || {}) as { frameworks?: string[], useCases?: string[], limit?: number | bigint, offset?: number | bigint };
346
+ params = (paramsOrFirst || {}) as { frameworks?: string[], useCases?: string[], limit?: number, offset?: number };
347
347
  } else {
348
348
  params = {
349
349
  frameworks: paramsOrFirst as string[],
350
350
  useCases: rest[0] as string[],
351
- limit: rest[1] as number | bigint,
352
- offset: rest[2] as number | bigint
351
+ limit: rest[1] as number,
352
+ offset: rest[2] as number
353
353
  };
354
354
  }
355
355
 
@@ -547,7 +547,7 @@ export class Sites {
547
547
  * @param {Framework} params.framework - Sites framework.
548
548
  * @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.
549
549
  * @param {boolean} params.logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
550
- * @param {number | bigint} params.timeout - Maximum request time in seconds.
550
+ * @param {number} params.timeout - Maximum request time in seconds.
551
551
  * @param {string} params.installCommand - Install Command.
552
552
  * @param {string} params.buildCommand - Build Command.
553
553
  * @param {string} params.outputDirectory - Output Directory for site.
@@ -563,7 +563,7 @@ export class Sites {
563
563
  * @throws {AppwriteException}
564
564
  * @returns {Promise<Models.Site>}
565
565
  */
566
- update(params: { 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>;
566
+ update(params: { 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>;
567
567
  /**
568
568
  * Update site by its unique ID.
569
569
  *
@@ -572,7 +572,7 @@ export class Sites {
572
572
  * @param {Framework} framework - Sites framework.
573
573
  * @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.
574
574
  * @param {boolean} logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
575
- * @param {number | bigint} timeout - Maximum request time in seconds.
575
+ * @param {number} timeout - Maximum request time in seconds.
576
576
  * @param {string} installCommand - Install Command.
577
577
  * @param {string} buildCommand - Build Command.
578
578
  * @param {string} outputDirectory - Output Directory for site.
@@ -589,15 +589,15 @@ export class Sites {
589
589
  * @returns {Promise<Models.Site>}
590
590
  * @deprecated Use the object parameter style method for a better developer experience.
591
591
  */
592
- 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>;
592
+ 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>;
593
593
  update(
594
- paramsOrFirst: { 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 } | string,
595
- ...rest: [(string)?, (Framework)?, (boolean)?, (boolean)?, (number | bigint)?, (string)?, (string)?, (string)?, (BuildRuntime)?, (Adapter)?, (string)?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
594
+ paramsOrFirst: { 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 } | string,
595
+ ...rest: [(string)?, (Framework)?, (boolean)?, (boolean)?, (number)?, (string)?, (string)?, (string)?, (BuildRuntime)?, (Adapter)?, (string)?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
596
596
  ): Promise<Models.Site> {
597
- let params: { 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 };
597
+ let params: { 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 };
598
598
 
599
599
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
600
- params = (paramsOrFirst || {}) as { 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 };
600
+ params = (paramsOrFirst || {}) as { 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 };
601
601
  } else {
602
602
  params = {
603
603
  siteId: paramsOrFirst as string,
@@ -605,7 +605,7 @@ export class Sites {
605
605
  framework: rest[1] as Framework,
606
606
  enabled: rest[2] as boolean,
607
607
  logging: rest[3] as boolean,
608
- timeout: rest[4] as number | bigint,
608
+ timeout: rest[4] as number,
609
609
  installCommand: rest[5] as string,
610
610
  buildCommand: rest[6] as string,
611
611
  outputDirectory: rest[7] as string,
@@ -88,7 +88,7 @@ export class Storage {
88
88
  * @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).
89
89
  * @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).
90
90
  * @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.
91
- * @param {number | bigint} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
91
+ * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
92
92
  * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
93
93
  * @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
94
94
  * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
@@ -97,7 +97,7 @@ export class Storage {
97
97
  * @throws {AppwriteException}
98
98
  * @returns {Promise<Models.Bucket>}
99
99
  */
100
- createBucket(params: { 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>;
100
+ createBucket(params: { 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>;
101
101
  /**
102
102
  * Create a new storage bucket.
103
103
  *
@@ -106,7 +106,7 @@ export class Storage {
106
106
  * @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).
107
107
  * @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).
108
108
  * @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.
109
- * @param {number | bigint} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
109
+ * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
110
110
  * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
111
111
  * @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
112
112
  * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
@@ -116,15 +116,15 @@ export class Storage {
116
116
  * @returns {Promise<Models.Bucket>}
117
117
  * @deprecated Use the object parameter style method for a better developer experience.
118
118
  */
119
- 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>;
119
+ 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>;
120
120
  createBucket(
121
- paramsOrFirst: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number | bigint, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean } | string,
122
- ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number | bigint)?, (string[])?, (Compression)?, (boolean)?, (boolean)?, (boolean)?]
121
+ paramsOrFirst: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean } | string,
122
+ ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (boolean)?, (boolean)?, (boolean)?]
123
123
  ): Promise<Models.Bucket> {
124
- let params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number | bigint, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };
124
+ let params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };
125
125
 
126
126
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
127
- params = (paramsOrFirst || {}) as { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number | bigint, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };
127
+ params = (paramsOrFirst || {}) as { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };
128
128
  } else {
129
129
  params = {
130
130
  bucketId: paramsOrFirst as string,
@@ -132,7 +132,7 @@ export class Storage {
132
132
  permissions: rest[1] as string[],
133
133
  fileSecurity: rest[2] as boolean,
134
134
  enabled: rest[3] as boolean,
135
- maximumFileSize: rest[4] as number | bigint,
135
+ maximumFileSize: rest[4] as number,
136
136
  allowedFileExtensions: rest[5] as string[],
137
137
  compression: rest[6] as Compression,
138
138
  encryption: rest[7] as boolean,
@@ -268,7 +268,7 @@ export class Storage {
268
268
  * @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).
269
269
  * @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).
270
270
  * @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.
271
- * @param {number | bigint} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
271
+ * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
272
272
  * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
273
273
  * @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
274
274
  * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
@@ -277,7 +277,7 @@ export class Storage {
277
277
  * @throws {AppwriteException}
278
278
  * @returns {Promise<Models.Bucket>}
279
279
  */
280
- updateBucket(params: { 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>;
280
+ updateBucket(params: { 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>;
281
281
  /**
282
282
  * Update a storage bucket by its unique ID.
283
283
  *
@@ -286,7 +286,7 @@ export class Storage {
286
286
  * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
287
287
  * @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).
288
288
  * @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.
289
- * @param {number | bigint} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
289
+ * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
290
290
  * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
291
291
  * @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
292
292
  * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
@@ -296,15 +296,15 @@ export class Storage {
296
296
  * @returns {Promise<Models.Bucket>}
297
297
  * @deprecated Use the object parameter style method for a better developer experience.
298
298
  */
299
- 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>;
299
+ 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>;
300
300
  updateBucket(
301
- paramsOrFirst: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number | bigint, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean } | string,
302
- ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number | bigint)?, (string[])?, (Compression)?, (boolean)?, (boolean)?, (boolean)?]
301
+ paramsOrFirst: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean } | string,
302
+ ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (boolean)?, (boolean)?, (boolean)?]
303
303
  ): Promise<Models.Bucket> {
304
- let params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number | bigint, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };
304
+ let params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };
305
305
 
306
306
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
307
- params = (paramsOrFirst || {}) as { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number | bigint, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };
307
+ params = (paramsOrFirst || {}) as { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };
308
308
  } else {
309
309
  params = {
310
310
  bucketId: paramsOrFirst as string,
@@ -312,7 +312,7 @@ export class Storage {
312
312
  permissions: rest[1] as string[],
313
313
  fileSecurity: rest[2] as boolean,
314
314
  enabled: rest[3] as boolean,
315
- maximumFileSize: rest[4] as number | bigint,
315
+ maximumFileSize: rest[4] as number,
316
316
  allowedFileExtensions: rest[5] as string[],
317
317
  compression: rest[6] as Compression,
318
318
  encryption: rest[7] as boolean,
@@ -874,36 +874,36 @@ export class Storage {
874
874
  *
875
875
  * @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).
876
876
  * @param {string} params.fileId - File ID
877
- * @param {number | bigint} params.width - Resize preview image width, Pass an integer between 0 to 4000.
878
- * @param {number | bigint} params.height - Resize preview image height, Pass an integer between 0 to 4000.
877
+ * @param {number} params.width - Resize preview image width, Pass an integer between 0 to 4000.
878
+ * @param {number} params.height - Resize preview image height, Pass an integer between 0 to 4000.
879
879
  * @param {ImageGravity} params.gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right
880
- * @param {number | bigint} params.quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
881
- * @param {number | bigint} params.borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.
880
+ * @param {number} params.quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
881
+ * @param {number} params.borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.
882
882
  * @param {string} params.borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.
883
- * @param {number | bigint} params.borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.
884
- * @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.
885
- * @param {number | bigint} params.rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.
883
+ * @param {number} params.borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.
884
+ * @param {number} params.opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.
885
+ * @param {number} params.rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.
886
886
  * @param {string} params.background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.
887
887
  * @param {ImageFormat} params.output - Output format type (jpeg, jpg, png, gif and webp).
888
888
  * @param {string} params.token - File token for accessing this file.
889
889
  * @throws {AppwriteException}
890
890
  * @returns {string}
891
891
  */
892
- getFilePreview(params: { 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;
892
+ getFilePreview(params: { 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;
893
893
  /**
894
894
  * Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.
895
895
  *
896
896
  * @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).
897
897
  * @param {string} fileId - File ID
898
- * @param {number | bigint} width - Resize preview image width, Pass an integer between 0 to 4000.
899
- * @param {number | bigint} height - Resize preview image height, Pass an integer between 0 to 4000.
898
+ * @param {number} width - Resize preview image width, Pass an integer between 0 to 4000.
899
+ * @param {number} height - Resize preview image height, Pass an integer between 0 to 4000.
900
900
  * @param {ImageGravity} gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right
901
- * @param {number | bigint} quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
902
- * @param {number | bigint} borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.
901
+ * @param {number} quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
902
+ * @param {number} borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.
903
903
  * @param {string} borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.
904
- * @param {number | bigint} borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.
905
- * @param {number | bigint} opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.
906
- * @param {number | bigint} rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.
904
+ * @param {number} borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.
905
+ * @param {number} opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.
906
+ * @param {number} rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.
907
907
  * @param {string} background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.
908
908
  * @param {ImageFormat} output - Output format type (jpeg, jpg, png, gif and webp).
909
909
  * @param {string} token - File token for accessing this file.
@@ -911,28 +911,28 @@ export class Storage {
911
911
  * @returns {string}
912
912
  * @deprecated Use the object parameter style method for a better developer experience.
913
913
  */
914
- 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;
914
+ 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;
915
915
  getFilePreview(
916
- paramsOrFirst: { 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,
917
- ...rest: [(string)?, (number | bigint)?, (number | bigint)?, (ImageGravity)?, (number | bigint)?, (number | bigint)?, (string)?, (number | bigint)?, (number | bigint)?, (number | bigint)?, (string)?, (ImageFormat)?, (string)?]
916
+ paramsOrFirst: { 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,
917
+ ...rest: [(string)?, (number)?, (number)?, (ImageGravity)?, (number)?, (number)?, (string)?, (number)?, (number)?, (number)?, (string)?, (ImageFormat)?, (string)?]
918
918
  ): string {
919
- let params: { 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 };
919
+ let params: { 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 };
920
920
 
921
921
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
922
- params = (paramsOrFirst || {}) as { 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 };
922
+ params = (paramsOrFirst || {}) as { 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 };
923
923
  } else {
924
924
  params = {
925
925
  bucketId: paramsOrFirst as string,
926
926
  fileId: rest[0] as string,
927
- width: rest[1] as number | bigint,
928
- height: rest[2] as number | bigint,
927
+ width: rest[1] as number,
928
+ height: rest[2] as number,
929
929
  gravity: rest[3] as ImageGravity,
930
- quality: rest[4] as number | bigint,
931
- borderWidth: rest[5] as number | bigint,
930
+ quality: rest[4] as number,
931
+ borderWidth: rest[5] as number,
932
932
  borderColor: rest[6] as string,
933
- borderRadius: rest[7] as number | bigint,
934
- opacity: rest[8] as number | bigint,
935
- rotation: rest[9] as number | bigint,
933
+ borderRadius: rest[7] as number,
934
+ opacity: rest[8] as number,
935
+ rotation: rest[9] as number,
936
936
  background: rest[10] as string,
937
937
  output: rest[11] as ImageFormat,
938
938
  token: rest[12] as string