node-appwrite 22.0.0 → 22.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +1 -1
  2. package/dist/client.js +2 -2
  3. package/dist/client.js.map +1 -1
  4. package/dist/client.mjs +2 -2
  5. package/dist/client.mjs.map +1 -1
  6. package/dist/enums/backup-services.d.mts +7 -0
  7. package/dist/enums/backup-services.d.ts +7 -0
  8. package/dist/enums/backup-services.js +12 -0
  9. package/dist/enums/backup-services.js.map +1 -0
  10. package/dist/enums/backup-services.mjs +11 -0
  11. package/dist/enums/backup-services.mjs.map +1 -0
  12. package/dist/enums/build-runtime.d.mts +3 -4
  13. package/dist/enums/build-runtime.d.ts +3 -4
  14. package/dist/enums/build-runtime.js +2 -3
  15. package/dist/enums/build-runtime.js.map +1 -1
  16. package/dist/enums/build-runtime.mjs +2 -3
  17. package/dist/enums/build-runtime.mjs.map +1 -1
  18. package/dist/enums/runtime.d.mts +3 -4
  19. package/dist/enums/runtime.d.ts +3 -4
  20. package/dist/enums/runtime.js +2 -3
  21. package/dist/enums/runtime.js.map +1 -1
  22. package/dist/enums/runtime.mjs +2 -3
  23. package/dist/enums/runtime.mjs.map +1 -1
  24. package/dist/enums/scopes.d.mts +9 -1
  25. package/dist/enums/scopes.d.ts +9 -1
  26. package/dist/enums/scopes.js +8 -0
  27. package/dist/enums/scopes.js.map +1 -1
  28. package/dist/enums/scopes.mjs +8 -0
  29. package/dist/enums/scopes.mjs.map +1 -1
  30. package/dist/index.d.mts +2 -1
  31. package/dist/index.d.ts +2 -1
  32. package/dist/index.js +10 -5
  33. package/dist/index.js.map +1 -1
  34. package/dist/index.mjs +2 -1
  35. package/dist/index.mjs.map +1 -1
  36. package/dist/models.d.mts +216 -2
  37. package/dist/models.d.ts +216 -2
  38. package/dist/services/account.js +3 -3
  39. package/dist/services/account.js.map +1 -1
  40. package/dist/services/account.mjs +3 -3
  41. package/dist/services/account.mjs.map +1 -1
  42. package/dist/services/avatars.js +3 -3
  43. package/dist/services/avatars.js.map +1 -1
  44. package/dist/services/avatars.mjs +3 -3
  45. package/dist/services/avatars.mjs.map +1 -1
  46. package/dist/services/backups.d.mts +291 -0
  47. package/dist/services/backups.d.ts +291 -0
  48. package/dist/services/backups.js +404 -0
  49. package/dist/services/backups.js.map +1 -0
  50. package/dist/services/backups.mjs +403 -0
  51. package/dist/services/backups.mjs.map +1 -0
  52. package/dist/services/graphql.js.map +1 -1
  53. package/dist/services/graphql.mjs.map +1 -1
  54. package/dist/services/health.d.mts +95 -0
  55. package/dist/services/health.d.ts +95 -0
  56. package/dist/services/health.js +121 -1
  57. package/dist/services/health.js.map +1 -1
  58. package/dist/services/health.mjs +121 -1
  59. package/dist/services/health.mjs.map +1 -1
  60. package/dist/services/storage.d.mts +4 -4
  61. package/dist/services/storage.d.ts +4 -4
  62. package/dist/services/storage.js.map +1 -1
  63. package/dist/services/storage.mjs.map +1 -1
  64. package/dist/services/teams.d.mts +8 -9
  65. package/dist/services/teams.d.ts +8 -9
  66. package/dist/services/teams.js.map +1 -1
  67. package/dist/services/teams.mjs.map +1 -1
  68. package/package.json +1 -1
  69. package/dist/enums/roles.d.mts +0 -7
  70. package/dist/enums/roles.d.ts +0 -7
  71. package/dist/enums/roles.js +0 -12
  72. package/dist/enums/roles.js.map +0 -1
  73. package/dist/enums/roles.mjs +0 -11
  74. package/dist/enums/roles.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/services/storage.ts"],"names":[],"mappings":";AAAA,SAAS,yBAA+D;AAOjE,IAAM,UAAN,MAAc;AAAA,EAGjB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA,EAuBA,YACI,kBACG,MACuB;AAC1B,QAAI;AAEJ,QAAI,CAAC,iBAAkB,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,GAAI;AACzG,eAAU,iBAAiB,CAAC;AAAA,IAChC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AM,WAAW,OAAO;AACxB,UAAM,SAAS,OAAO;AACtB,UAAM,QAAQ,OAAO;AAErB,QAAI,OAAO,aAAa,aAAa;AACjC,YAAM,IAAI,kBAAkB,wCAAwC;AAAA,IACxE;AACA,QAAI,OAAO,WAAW,aAAa;AAC/B,YAAM,IAAI,kBAAkB,sCAAsC;AAAA,IACtE;AAEA,UAAM,UAAU,kDAAkD,QAAQ,cAAc,QAAQ,EAAE,QAAQ,YAAY,MAAM;AAC5H,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,UAAU,aAAa;AAC9B,cAAQ,OAAO,IAAI;AAAA,IACvB;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nimport { Compression } from '../enums/compression';\nimport { ImageGravity } from '../enums/image-gravity';\nimport { ImageFormat } from '../enums/image-format';\n\nexport class Storage {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Get a list of all the storage buckets. You can use the query params to filter your results.\n *\n * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations\n * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BucketList>}\n */\n listBuckets(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.BucketList>;\n /**\n * Get a list of all the storage buckets. You can use the query params to filter your results.\n *\n * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations\n * @param {string} search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BucketList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listBuckets(queries?: string[], search?: string, total?: boolean): Promise<Models.BucketList>;\n listBuckets(\n paramsOrFirst?: { queries?: string[], search?: string, total?: boolean } | string[],\n ...rest: [(string)?, (boolean)?] \n ): Promise<Models.BucketList> {\n let params: { queries?: string[], search?: string, total?: boolean };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { queries?: string[], search?: string, total?: boolean };\n } else {\n params = {\n queries: paramsOrFirst as string[],\n search: rest[0] as string,\n total: rest[1] as boolean \n };\n }\n \n const queries = params.queries;\n const search = params.search;\n const total = params.total;\n\n\n const apiPath = '/storage/buckets';\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n if (typeof total !== 'undefined') {\n payload['total'] = total;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Create a new storage bucket.\n *\n * @param {string} params.bucketId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {string} params.name - Bucket name\n * @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).\n * @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).\n * @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.\n * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 30MB.\n * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @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\n * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} params.transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n 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>;\n /**\n * Create a new storage bucket.\n *\n * @param {string} bucketId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {string} name - Bucket name\n * @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).\n * @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).\n * @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.\n * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 30MB.\n * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @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\n * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n 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>;\n createBucket(\n paramsOrFirst: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean } | string,\n ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (boolean)?, (boolean)?, (boolean)?] \n ): Promise<Models.Bucket> {\n let params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n 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 };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n name: rest[0] as string,\n permissions: rest[1] as string[],\n fileSecurity: rest[2] as boolean,\n enabled: rest[3] as boolean,\n maximumFileSize: rest[4] as number,\n allowedFileExtensions: rest[5] as string[],\n compression: rest[6] as Compression,\n encryption: rest[7] as boolean,\n antivirus: rest[8] as boolean,\n transformations: rest[9] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const name = params.name;\n const permissions = params.permissions;\n const fileSecurity = params.fileSecurity;\n const enabled = params.enabled;\n const maximumFileSize = params.maximumFileSize;\n const allowedFileExtensions = params.allowedFileExtensions;\n const compression = params.compression;\n const encryption = params.encryption;\n const antivirus = params.antivirus;\n const transformations = params.transformations;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/storage/buckets';\n const payload: Payload = {};\n if (typeof bucketId !== 'undefined') {\n payload['bucketId'] = bucketId;\n }\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n if (typeof fileSecurity !== 'undefined') {\n payload['fileSecurity'] = fileSecurity;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\n }\n if (typeof maximumFileSize !== 'undefined') {\n payload['maximumFileSize'] = maximumFileSize;\n }\n if (typeof allowedFileExtensions !== 'undefined') {\n payload['allowedFileExtensions'] = allowedFileExtensions;\n }\n if (typeof compression !== 'undefined') {\n payload['compression'] = compression;\n }\n if (typeof encryption !== 'undefined') {\n payload['encryption'] = encryption;\n }\n if (typeof antivirus !== 'undefined') {\n payload['antivirus'] = antivirus;\n }\n if (typeof transformations !== 'undefined') {\n payload['transformations'] = transformations;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n getBucket(params: { bucketId: string }): Promise<Models.Bucket>;\n /**\n * Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getBucket(bucketId: string): Promise<Models.Bucket>;\n getBucket(\n paramsOrFirst: { bucketId: string } | string \n ): Promise<Models.Bucket> {\n let params: { bucketId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string \n };\n }\n \n const bucketId = params.bucketId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Update a storage bucket by its unique ID.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @param {string} params.name - Bucket name\n * @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).\n * @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).\n * @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.\n * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 30MB.\n * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @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\n * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} params.transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n 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>;\n /**\n * Update a storage bucket by its unique ID.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @param {string} name - Bucket name\n * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @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).\n * @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.\n * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 30MB.\n * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @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\n * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n 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>;\n updateBucket(\n paramsOrFirst: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean } | string,\n ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (boolean)?, (boolean)?, (boolean)?] \n ): Promise<Models.Bucket> {\n let params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n 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 };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n name: rest[0] as string,\n permissions: rest[1] as string[],\n fileSecurity: rest[2] as boolean,\n enabled: rest[3] as boolean,\n maximumFileSize: rest[4] as number,\n allowedFileExtensions: rest[5] as string[],\n compression: rest[6] as Compression,\n encryption: rest[7] as boolean,\n antivirus: rest[8] as boolean,\n transformations: rest[9] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const name = params.name;\n const permissions = params.permissions;\n const fileSecurity = params.fileSecurity;\n const enabled = params.enabled;\n const maximumFileSize = params.maximumFileSize;\n const allowedFileExtensions = params.allowedFileExtensions;\n const compression = params.compression;\n const encryption = params.encryption;\n const antivirus = params.antivirus;\n const transformations = params.transformations;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n if (typeof fileSecurity !== 'undefined') {\n payload['fileSecurity'] = fileSecurity;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\n }\n if (typeof maximumFileSize !== 'undefined') {\n payload['maximumFileSize'] = maximumFileSize;\n }\n if (typeof allowedFileExtensions !== 'undefined') {\n payload['allowedFileExtensions'] = allowedFileExtensions;\n }\n if (typeof compression !== 'undefined') {\n payload['compression'] = compression;\n }\n if (typeof encryption !== 'undefined') {\n payload['encryption'] = encryption;\n }\n if (typeof antivirus !== 'undefined') {\n payload['antivirus'] = antivirus;\n }\n if (typeof transformations !== 'undefined') {\n payload['transformations'] = transformations;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Delete a storage bucket by its unique ID.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteBucket(params: { bucketId: string }): Promise<{}>;\n /**\n * Delete a storage bucket by its unique ID.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deleteBucket(bucketId: string): Promise<{}>;\n deleteBucket(\n paramsOrFirst: { bucketId: string } | string \n ): Promise<{}> {\n let params: { bucketId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string \n };\n }\n \n const bucketId = params.bucketId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a list of all the user files. You can use the query params to filter your results.\n *\n * @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).\n * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded\n * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.FileList>}\n */\n listFiles(params: { bucketId: string, queries?: string[], search?: string, total?: boolean }): Promise<Models.FileList>;\n /**\n * Get a list of all the user files. You can use the query params to filter your results.\n *\n * @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).\n * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded\n * @param {string} search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.FileList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listFiles(bucketId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.FileList>;\n listFiles(\n paramsOrFirst: { bucketId: string, queries?: string[], search?: string, total?: boolean } | string,\n ...rest: [(string[])?, (string)?, (boolean)?] \n ): Promise<Models.FileList> {\n let params: { bucketId: string, queries?: string[], search?: string, total?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, queries?: string[], search?: string, total?: boolean };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n queries: rest[0] as string[],\n search: rest[1] as string,\n total: rest[2] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const queries = params.queries;\n const search = params.search;\n const total = params.total;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n if (typeof total !== 'undefined') {\n payload['total'] = total;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.\n * \n * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n * \n * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n * \n * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n * \n *\n * @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).\n * @param {string} params.fileId - File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {File} params.file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).\n * @param {string[]} params.permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n createFile(params: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void }): Promise<Models.File>;\n /**\n * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.\n * \n * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n * \n * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n * \n * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n * \n *\n * @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).\n * @param {string} fileId - File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {File} file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).\n * @param {string[]} permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createFile(bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void): Promise<Models.File>;\n createFile(\n paramsOrFirst: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void } | string,\n ...rest: [(string)?, (File)?, (string[])?,((progress: UploadProgress) => void)?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string, file: File, permissions?: string[] };\n let onProgress: ((progress: UploadProgress) => void);\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, file: File, permissions?: string[] };\n onProgress = paramsOrFirst?.onProgress as ((progress: UploadProgress) => void);\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n file: rest[1] as File,\n permissions: rest[2] as string[] \n };\n onProgress = rest[3] as ((progress: UploadProgress) => void);\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const file = params.file;\n const permissions = params.permissions;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n if (typeof file === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"file\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof fileId !== 'undefined') {\n payload['fileId'] = fileId;\n }\n if (typeof file !== 'undefined') {\n payload['file'] = file;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'multipart/form-data',\n }\n\n return this.client.chunkedUpload(\n 'post',\n uri,\n apiHeaders,\n payload,\n onProgress\n );\n }\n\n /**\n * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.\n *\n * @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).\n * @param {string} params.fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n getFile(params: { bucketId: string, fileId: string }): Promise<Models.File>;\n /**\n * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.\n *\n * @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).\n * @param {string} fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFile(bucketId: string, fileId: string): Promise<Models.File>;\n getFile(\n paramsOrFirst: { bucketId: string, fileId: string } | string,\n ...rest: [(string)?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Update a file by its unique ID. Only users with write permissions have access to update this resource.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @param {string} params.fileId - File ID.\n * @param {string} params.name - File name.\n * @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).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n updateFile(params: { bucketId: string, fileId: string, name?: string, permissions?: string[] }): Promise<Models.File>;\n /**\n * Update a file by its unique ID. Only users with write permissions have access to update this resource.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @param {string} fileId - File ID.\n * @param {string} name - File name.\n * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updateFile(bucketId: string, fileId: string, name?: string, permissions?: string[]): Promise<Models.File>;\n updateFile(\n paramsOrFirst: { bucketId: string, fileId: string, name?: string, permissions?: string[] } | string,\n ...rest: [(string)?, (string)?, (string[])?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string, name?: string, permissions?: string[] };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, name?: string, permissions?: string[] };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n name: rest[1] as string,\n permissions: rest[2] as string[] \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const name = params.name;\n const permissions = params.permissions;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Delete a file by its unique ID. Only users with write permissions have access to delete this resource.\n *\n * @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).\n * @param {string} params.fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteFile(params: { bucketId: string, fileId: string }): Promise<{}>;\n /**\n * Delete a file by its unique ID. Only users with write permissions have access to delete this resource.\n *\n * @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).\n * @param {string} fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deleteFile(bucketId: string, fileId: string): Promise<{}>;\n deleteFile(\n paramsOrFirst: { bucketId: string, fileId: string } | string,\n ...rest: [(string)?] \n ): Promise<{}> {\n let params: { bucketId: string, fileId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.\n *\n * @param {string} params.bucketId - Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFileDownload(params: { bucketId: string, fileId: string, token?: string }): Promise<ArrayBuffer>;\n /**\n * Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.\n *\n * @param {string} bucketId - Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFileDownload(bucketId: string, fileId: string, token?: string): Promise<ArrayBuffer>;\n getFileDownload(\n paramsOrFirst: { bucketId: string, fileId: string, token?: string } | string,\n ...rest: [(string)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { bucketId: string, fileId: string, token?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, token?: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n token: rest[1] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * 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.\n *\n * @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).\n * @param {string} params.fileId - File ID\n * @param {number} params.width - Resize preview image width, Pass an integer between 0 to 4000.\n * @param {number} params.height - Resize preview image height, Pass an integer between 0 to 4000.\n * @param {ImageGravity} params.gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right\n * @param {number} params.quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @param {number} params.borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.\n * @param {string} params.borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.\n * @param {number} params.borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.\n * @param {number} params.opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.\n * @param {number} params.rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.\n * @param {string} params.background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.\n * @param {ImageFormat} params.output - Output format type (jpeg, jpg, png, gif and webp).\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n 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 }): Promise<ArrayBuffer>;\n /**\n * 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.\n *\n * @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).\n * @param {string} fileId - File ID\n * @param {number} width - Resize preview image width, Pass an integer between 0 to 4000.\n * @param {number} height - Resize preview image height, Pass an integer between 0 to 4000.\n * @param {ImageGravity} gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right\n * @param {number} quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @param {number} borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.\n * @param {string} borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.\n * @param {number} borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.\n * @param {number} opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.\n * @param {number} rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.\n * @param {string} background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.\n * @param {ImageFormat} output - Output format type (jpeg, jpg, png, gif and webp).\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n 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): Promise<ArrayBuffer>;\n getFilePreview(\n 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,\n ...rest: [(string)?, (number)?, (number)?, (ImageGravity)?, (number)?, (number)?, (string)?, (number)?, (number)?, (number)?, (string)?, (ImageFormat)?, (string)?] \n ): Promise<ArrayBuffer> {\n 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 };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n 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 };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n width: rest[1] as number,\n height: rest[2] as number,\n gravity: rest[3] as ImageGravity,\n quality: rest[4] as number,\n borderWidth: rest[5] as number,\n borderColor: rest[6] as string,\n borderRadius: rest[7] as number,\n opacity: rest[8] as number,\n rotation: rest[9] as number,\n background: rest[10] as string,\n output: rest[11] as ImageFormat,\n token: rest[12] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const width = params.width;\n const height = params.height;\n const gravity = params.gravity;\n const quality = params.quality;\n const borderWidth = params.borderWidth;\n const borderColor = params.borderColor;\n const borderRadius = params.borderRadius;\n const opacity = params.opacity;\n const rotation = params.rotation;\n const background = params.background;\n const output = params.output;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/preview'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof gravity !== 'undefined') {\n payload['gravity'] = gravity;\n }\n if (typeof quality !== 'undefined') {\n payload['quality'] = quality;\n }\n if (typeof borderWidth !== 'undefined') {\n payload['borderWidth'] = borderWidth;\n }\n if (typeof borderColor !== 'undefined') {\n payload['borderColor'] = borderColor;\n }\n if (typeof borderRadius !== 'undefined') {\n payload['borderRadius'] = borderRadius;\n }\n if (typeof opacity !== 'undefined') {\n payload['opacity'] = opacity;\n }\n if (typeof rotation !== 'undefined') {\n payload['rotation'] = rotation;\n }\n if (typeof background !== 'undefined') {\n payload['background'] = background;\n }\n if (typeof output !== 'undefined') {\n payload['output'] = output;\n }\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.\n *\n * @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).\n * @param {string} params.fileId - File ID.\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFileView(params: { bucketId: string, fileId: string, token?: string }): Promise<ArrayBuffer>;\n /**\n * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.\n *\n * @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).\n * @param {string} fileId - File ID.\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFileView(bucketId: string, fileId: string, token?: string): Promise<ArrayBuffer>;\n getFileView(\n paramsOrFirst: { bucketId: string, fileId: string, token?: string } | string,\n ...rest: [(string)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { bucketId: string, fileId: string, token?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, token?: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n token: rest[1] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/services/storage.ts"],"names":[],"mappings":";AAAA,SAAS,yBAA+D;AAOjE,IAAM,UAAN,MAAc;AAAA,EAGjB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA,EAuBA,YACI,kBACG,MACuB;AAC1B,QAAI;AAEJ,QAAI,CAAC,iBAAkB,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,GAAI;AACzG,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,SAAS;AAAA,QACT,QAAQ,KAAK,CAAC;AAAA,QACd,OAAO,KAAK,CAAC;AAAA,MACjB;AAAA,IACJ;AAEA,UAAM,UAAU,OAAO;AACvB,UAAM,SAAS,OAAO;AACtB,UAAM,QAAQ,OAAO;AAGrB,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,YAAY,aAAa;AAChC,cAAQ,SAAS,IAAI;AAAA,IACzB;AACA,QAAI,OAAO,WAAW,aAAa;AAC/B,cAAQ,QAAQ,IAAI;AAAA,IACxB;AACA,QAAI,OAAO,UAAU,aAAa;AAC9B,cAAQ,OAAO,IAAI;AAAA,IACvB;AAC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AO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nimport { Compression } from '../enums/compression';\nimport { ImageGravity } from '../enums/image-gravity';\nimport { ImageFormat } from '../enums/image-format';\n\nexport class Storage {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Get a list of all the storage buckets. You can use the query params to filter your results.\n *\n * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations\n * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BucketList>}\n */\n listBuckets(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.BucketList>;\n /**\n * Get a list of all the storage buckets. You can use the query params to filter your results.\n *\n * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations\n * @param {string} search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BucketList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listBuckets(queries?: string[], search?: string, total?: boolean): Promise<Models.BucketList>;\n listBuckets(\n paramsOrFirst?: { queries?: string[], search?: string, total?: boolean } | string[],\n ...rest: [(string)?, (boolean)?] \n ): Promise<Models.BucketList> {\n let params: { queries?: string[], search?: string, total?: boolean };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { queries?: string[], search?: string, total?: boolean };\n } else {\n params = {\n queries: paramsOrFirst as string[],\n search: rest[0] as string,\n total: rest[1] as boolean \n };\n }\n \n const queries = params.queries;\n const search = params.search;\n const total = params.total;\n\n\n const apiPath = '/storage/buckets';\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n if (typeof total !== 'undefined') {\n payload['total'] = total;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Create a new storage bucket.\n *\n * @param {string} params.bucketId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {string} params.name - Bucket name\n * @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).\n * @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).\n * @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.\n * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.\n * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @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\n * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} params.transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n 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>;\n /**\n * Create a new storage bucket.\n *\n * @param {string} bucketId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {string} name - Bucket name\n * @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).\n * @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).\n * @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.\n * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.\n * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @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\n * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n 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>;\n createBucket(\n paramsOrFirst: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean } | string,\n ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (boolean)?, (boolean)?, (boolean)?] \n ): Promise<Models.Bucket> {\n let params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n 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 };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n name: rest[0] as string,\n permissions: rest[1] as string[],\n fileSecurity: rest[2] as boolean,\n enabled: rest[3] as boolean,\n maximumFileSize: rest[4] as number,\n allowedFileExtensions: rest[5] as string[],\n compression: rest[6] as Compression,\n encryption: rest[7] as boolean,\n antivirus: rest[8] as boolean,\n transformations: rest[9] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const name = params.name;\n const permissions = params.permissions;\n const fileSecurity = params.fileSecurity;\n const enabled = params.enabled;\n const maximumFileSize = params.maximumFileSize;\n const allowedFileExtensions = params.allowedFileExtensions;\n const compression = params.compression;\n const encryption = params.encryption;\n const antivirus = params.antivirus;\n const transformations = params.transformations;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/storage/buckets';\n const payload: Payload = {};\n if (typeof bucketId !== 'undefined') {\n payload['bucketId'] = bucketId;\n }\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n if (typeof fileSecurity !== 'undefined') {\n payload['fileSecurity'] = fileSecurity;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\n }\n if (typeof maximumFileSize !== 'undefined') {\n payload['maximumFileSize'] = maximumFileSize;\n }\n if (typeof allowedFileExtensions !== 'undefined') {\n payload['allowedFileExtensions'] = allowedFileExtensions;\n }\n if (typeof compression !== 'undefined') {\n payload['compression'] = compression;\n }\n if (typeof encryption !== 'undefined') {\n payload['encryption'] = encryption;\n }\n if (typeof antivirus !== 'undefined') {\n payload['antivirus'] = antivirus;\n }\n if (typeof transformations !== 'undefined') {\n payload['transformations'] = transformations;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n getBucket(params: { bucketId: string }): Promise<Models.Bucket>;\n /**\n * Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getBucket(bucketId: string): Promise<Models.Bucket>;\n getBucket(\n paramsOrFirst: { bucketId: string } | string \n ): Promise<Models.Bucket> {\n let params: { bucketId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string \n };\n }\n \n const bucketId = params.bucketId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Update a storage bucket by its unique ID.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @param {string} params.name - Bucket name\n * @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).\n * @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).\n * @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.\n * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.\n * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @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\n * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} params.transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n 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>;\n /**\n * Update a storage bucket by its unique ID.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @param {string} name - Bucket name\n * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @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).\n * @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.\n * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.\n * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @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\n * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n 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>;\n updateBucket(\n paramsOrFirst: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean } | string,\n ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (boolean)?, (boolean)?, (boolean)?] \n ): Promise<Models.Bucket> {\n let params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n 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 };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n name: rest[0] as string,\n permissions: rest[1] as string[],\n fileSecurity: rest[2] as boolean,\n enabled: rest[3] as boolean,\n maximumFileSize: rest[4] as number,\n allowedFileExtensions: rest[5] as string[],\n compression: rest[6] as Compression,\n encryption: rest[7] as boolean,\n antivirus: rest[8] as boolean,\n transformations: rest[9] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const name = params.name;\n const permissions = params.permissions;\n const fileSecurity = params.fileSecurity;\n const enabled = params.enabled;\n const maximumFileSize = params.maximumFileSize;\n const allowedFileExtensions = params.allowedFileExtensions;\n const compression = params.compression;\n const encryption = params.encryption;\n const antivirus = params.antivirus;\n const transformations = params.transformations;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n if (typeof fileSecurity !== 'undefined') {\n payload['fileSecurity'] = fileSecurity;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\n }\n if (typeof maximumFileSize !== 'undefined') {\n payload['maximumFileSize'] = maximumFileSize;\n }\n if (typeof allowedFileExtensions !== 'undefined') {\n payload['allowedFileExtensions'] = allowedFileExtensions;\n }\n if (typeof compression !== 'undefined') {\n payload['compression'] = compression;\n }\n if (typeof encryption !== 'undefined') {\n payload['encryption'] = encryption;\n }\n if (typeof antivirus !== 'undefined') {\n payload['antivirus'] = antivirus;\n }\n if (typeof transformations !== 'undefined') {\n payload['transformations'] = transformations;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Delete a storage bucket by its unique ID.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteBucket(params: { bucketId: string }): Promise<{}>;\n /**\n * Delete a storage bucket by its unique ID.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deleteBucket(bucketId: string): Promise<{}>;\n deleteBucket(\n paramsOrFirst: { bucketId: string } | string \n ): Promise<{}> {\n let params: { bucketId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string \n };\n }\n \n const bucketId = params.bucketId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a list of all the user files. You can use the query params to filter your results.\n *\n * @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).\n * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded\n * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.FileList>}\n */\n listFiles(params: { bucketId: string, queries?: string[], search?: string, total?: boolean }): Promise<Models.FileList>;\n /**\n * Get a list of all the user files. You can use the query params to filter your results.\n *\n * @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).\n * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded\n * @param {string} search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.FileList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listFiles(bucketId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.FileList>;\n listFiles(\n paramsOrFirst: { bucketId: string, queries?: string[], search?: string, total?: boolean } | string,\n ...rest: [(string[])?, (string)?, (boolean)?] \n ): Promise<Models.FileList> {\n let params: { bucketId: string, queries?: string[], search?: string, total?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, queries?: string[], search?: string, total?: boolean };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n queries: rest[0] as string[],\n search: rest[1] as string,\n total: rest[2] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const queries = params.queries;\n const search = params.search;\n const total = params.total;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n if (typeof total !== 'undefined') {\n payload['total'] = total;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.\n * \n * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n * \n * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n * \n * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n * \n *\n * @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).\n * @param {string} params.fileId - File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {File} params.file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).\n * @param {string[]} params.permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n createFile(params: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void }): Promise<Models.File>;\n /**\n * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.\n * \n * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n * \n * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n * \n * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n * \n *\n * @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).\n * @param {string} fileId - File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {File} file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).\n * @param {string[]} permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createFile(bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void): Promise<Models.File>;\n createFile(\n paramsOrFirst: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void } | string,\n ...rest: [(string)?, (File)?, (string[])?,((progress: UploadProgress) => void)?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string, file: File, permissions?: string[] };\n let onProgress: ((progress: UploadProgress) => void);\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, file: File, permissions?: string[] };\n onProgress = paramsOrFirst?.onProgress as ((progress: UploadProgress) => void);\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n file: rest[1] as File,\n permissions: rest[2] as string[] \n };\n onProgress = rest[3] as ((progress: UploadProgress) => void);\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const file = params.file;\n const permissions = params.permissions;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n if (typeof file === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"file\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof fileId !== 'undefined') {\n payload['fileId'] = fileId;\n }\n if (typeof file !== 'undefined') {\n payload['file'] = file;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'multipart/form-data',\n }\n\n return this.client.chunkedUpload(\n 'post',\n uri,\n apiHeaders,\n payload,\n onProgress\n );\n }\n\n /**\n * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.\n *\n * @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).\n * @param {string} params.fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n getFile(params: { bucketId: string, fileId: string }): Promise<Models.File>;\n /**\n * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.\n *\n * @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).\n * @param {string} fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFile(bucketId: string, fileId: string): Promise<Models.File>;\n getFile(\n paramsOrFirst: { bucketId: string, fileId: string } | string,\n ...rest: [(string)?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Update a file by its unique ID. Only users with write permissions have access to update this resource.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @param {string} params.fileId - File ID.\n * @param {string} params.name - File name.\n * @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).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n updateFile(params: { bucketId: string, fileId: string, name?: string, permissions?: string[] }): Promise<Models.File>;\n /**\n * Update a file by its unique ID. Only users with write permissions have access to update this resource.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @param {string} fileId - File ID.\n * @param {string} name - File name.\n * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updateFile(bucketId: string, fileId: string, name?: string, permissions?: string[]): Promise<Models.File>;\n updateFile(\n paramsOrFirst: { bucketId: string, fileId: string, name?: string, permissions?: string[] } | string,\n ...rest: [(string)?, (string)?, (string[])?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string, name?: string, permissions?: string[] };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, name?: string, permissions?: string[] };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n name: rest[1] as string,\n permissions: rest[2] as string[] \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const name = params.name;\n const permissions = params.permissions;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Delete a file by its unique ID. Only users with write permissions have access to delete this resource.\n *\n * @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).\n * @param {string} params.fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteFile(params: { bucketId: string, fileId: string }): Promise<{}>;\n /**\n * Delete a file by its unique ID. Only users with write permissions have access to delete this resource.\n *\n * @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).\n * @param {string} fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deleteFile(bucketId: string, fileId: string): Promise<{}>;\n deleteFile(\n paramsOrFirst: { bucketId: string, fileId: string } | string,\n ...rest: [(string)?] \n ): Promise<{}> {\n let params: { bucketId: string, fileId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.\n *\n * @param {string} params.bucketId - Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFileDownload(params: { bucketId: string, fileId: string, token?: string }): Promise<ArrayBuffer>;\n /**\n * Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.\n *\n * @param {string} bucketId - Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFileDownload(bucketId: string, fileId: string, token?: string): Promise<ArrayBuffer>;\n getFileDownload(\n paramsOrFirst: { bucketId: string, fileId: string, token?: string } | string,\n ...rest: [(string)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { bucketId: string, fileId: string, token?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, token?: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n token: rest[1] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * 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.\n *\n * @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).\n * @param {string} params.fileId - File ID\n * @param {number} params.width - Resize preview image width, Pass an integer between 0 to 4000.\n * @param {number} params.height - Resize preview image height, Pass an integer between 0 to 4000.\n * @param {ImageGravity} params.gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right\n * @param {number} params.quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @param {number} params.borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.\n * @param {string} params.borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.\n * @param {number} params.borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.\n * @param {number} params.opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.\n * @param {number} params.rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.\n * @param {string} params.background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.\n * @param {ImageFormat} params.output - Output format type (jpeg, jpg, png, gif and webp).\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n 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 }): Promise<ArrayBuffer>;\n /**\n * 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.\n *\n * @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).\n * @param {string} fileId - File ID\n * @param {number} width - Resize preview image width, Pass an integer between 0 to 4000.\n * @param {number} height - Resize preview image height, Pass an integer between 0 to 4000.\n * @param {ImageGravity} gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right\n * @param {number} quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @param {number} borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.\n * @param {string} borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.\n * @param {number} borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.\n * @param {number} opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.\n * @param {number} rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.\n * @param {string} background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.\n * @param {ImageFormat} output - Output format type (jpeg, jpg, png, gif and webp).\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n 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): Promise<ArrayBuffer>;\n getFilePreview(\n 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,\n ...rest: [(string)?, (number)?, (number)?, (ImageGravity)?, (number)?, (number)?, (string)?, (number)?, (number)?, (number)?, (string)?, (ImageFormat)?, (string)?] \n ): Promise<ArrayBuffer> {\n 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 };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n 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 };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n width: rest[1] as number,\n height: rest[2] as number,\n gravity: rest[3] as ImageGravity,\n quality: rest[4] as number,\n borderWidth: rest[5] as number,\n borderColor: rest[6] as string,\n borderRadius: rest[7] as number,\n opacity: rest[8] as number,\n rotation: rest[9] as number,\n background: rest[10] as string,\n output: rest[11] as ImageFormat,\n token: rest[12] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const width = params.width;\n const height = params.height;\n const gravity = params.gravity;\n const quality = params.quality;\n const borderWidth = params.borderWidth;\n const borderColor = params.borderColor;\n const borderRadius = params.borderRadius;\n const opacity = params.opacity;\n const rotation = params.rotation;\n const background = params.background;\n const output = params.output;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/preview'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof gravity !== 'undefined') {\n payload['gravity'] = gravity;\n }\n if (typeof quality !== 'undefined') {\n payload['quality'] = quality;\n }\n if (typeof borderWidth !== 'undefined') {\n payload['borderWidth'] = borderWidth;\n }\n if (typeof borderColor !== 'undefined') {\n payload['borderColor'] = borderColor;\n }\n if (typeof borderRadius !== 'undefined') {\n payload['borderRadius'] = borderRadius;\n }\n if (typeof opacity !== 'undefined') {\n payload['opacity'] = opacity;\n }\n if (typeof rotation !== 'undefined') {\n payload['rotation'] = rotation;\n }\n if (typeof background !== 'undefined') {\n payload['background'] = background;\n }\n if (typeof output !== 'undefined') {\n payload['output'] = output;\n }\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.\n *\n * @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).\n * @param {string} params.fileId - File ID.\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFileView(params: { bucketId: string, fileId: string, token?: string }): Promise<ArrayBuffer>;\n /**\n * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.\n *\n * @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).\n * @param {string} fileId - File ID.\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFileView(bucketId: string, fileId: string, token?: string): Promise<ArrayBuffer>;\n getFileView(\n paramsOrFirst: { bucketId: string, fileId: string, token?: string } | string,\n ...rest: [(string)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { bucketId: string, fileId: string, token?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, token?: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n token: rest[1] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n}\n"]}
@@ -1,6 +1,5 @@
1
1
  import { Client } from '../client.mjs';
2
2
  import { Models } from '../models.mjs';
3
- import { Roles } from '../enums/roles.mjs';
4
3
  import '../query.mjs';
5
4
  import '../enums/database-type.mjs';
6
5
  import '../enums/attribute-status.mjs';
@@ -165,7 +164,7 @@ declare class Teams {
165
164
  *
166
165
  *
167
166
  * @param {string} params.teamId - Team ID.
168
- * @param {Roles[]} params.roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
167
+ * @param {string[]} params.roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
169
168
  * @param {string} params.email - Email of the new team member.
170
169
  * @param {string} params.userId - ID of the user to be added to a team.
171
170
  * @param {string} params.phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
@@ -176,7 +175,7 @@ declare class Teams {
176
175
  */
177
176
  createMembership(params: {
178
177
  teamId: string;
179
- roles: Roles[];
178
+ roles: string[];
180
179
  email?: string;
181
180
  userId?: string;
182
181
  phone?: string;
@@ -194,7 +193,7 @@ declare class Teams {
194
193
  *
195
194
  *
196
195
  * @param {string} teamId - Team ID.
197
- * @param {Roles[]} roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
196
+ * @param {string[]} roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
198
197
  * @param {string} email - Email of the new team member.
199
198
  * @param {string} userId - ID of the user to be added to a team.
200
199
  * @param {string} phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
@@ -204,7 +203,7 @@ declare class Teams {
204
203
  * @returns {Promise<Models.Membership>}
205
204
  * @deprecated Use the object parameter style method for a better developer experience.
206
205
  */
207
- createMembership(teamId: string, roles: Roles[], email?: string, userId?: string, phone?: string, url?: string, name?: string): Promise<Models.Membership>;
206
+ createMembership(teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string): Promise<Models.Membership>;
208
207
  /**
209
208
  * Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.
210
209
  *
@@ -233,14 +232,14 @@ declare class Teams {
233
232
  *
234
233
  * @param {string} params.teamId - Team ID.
235
234
  * @param {string} params.membershipId - Membership ID.
236
- * @param {Roles[]} params.roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
235
+ * @param {string[]} params.roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
237
236
  * @throws {AppwriteException}
238
237
  * @returns {Promise<Models.Membership>}
239
238
  */
240
239
  updateMembership(params: {
241
240
  teamId: string;
242
241
  membershipId: string;
243
- roles: Roles[];
242
+ roles: string[];
244
243
  }): Promise<Models.Membership>;
245
244
  /**
246
245
  * Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions).
@@ -248,12 +247,12 @@ declare class Teams {
248
247
  *
249
248
  * @param {string} teamId - Team ID.
250
249
  * @param {string} membershipId - Membership ID.
251
- * @param {Roles[]} roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
250
+ * @param {string[]} roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
252
251
  * @throws {AppwriteException}
253
252
  * @returns {Promise<Models.Membership>}
254
253
  * @deprecated Use the object parameter style method for a better developer experience.
255
254
  */
256
- updateMembership(teamId: string, membershipId: string, roles: Roles[]): Promise<Models.Membership>;
255
+ updateMembership(teamId: string, membershipId: string, roles: string[]): Promise<Models.Membership>;
257
256
  /**
258
257
  * This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.
259
258
  *
@@ -1,6 +1,5 @@
1
1
  import { Client } from '../client.js';
2
2
  import { Models } from '../models.js';
3
- import { Roles } from '../enums/roles.js';
4
3
  import '../query.js';
5
4
  import '../enums/database-type.js';
6
5
  import '../enums/attribute-status.js';
@@ -165,7 +164,7 @@ declare class Teams {
165
164
  *
166
165
  *
167
166
  * @param {string} params.teamId - Team ID.
168
- * @param {Roles[]} params.roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
167
+ * @param {string[]} params.roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
169
168
  * @param {string} params.email - Email of the new team member.
170
169
  * @param {string} params.userId - ID of the user to be added to a team.
171
170
  * @param {string} params.phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
@@ -176,7 +175,7 @@ declare class Teams {
176
175
  */
177
176
  createMembership(params: {
178
177
  teamId: string;
179
- roles: Roles[];
178
+ roles: string[];
180
179
  email?: string;
181
180
  userId?: string;
182
181
  phone?: string;
@@ -194,7 +193,7 @@ declare class Teams {
194
193
  *
195
194
  *
196
195
  * @param {string} teamId - Team ID.
197
- * @param {Roles[]} roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
196
+ * @param {string[]} roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
198
197
  * @param {string} email - Email of the new team member.
199
198
  * @param {string} userId - ID of the user to be added to a team.
200
199
  * @param {string} phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
@@ -204,7 +203,7 @@ declare class Teams {
204
203
  * @returns {Promise<Models.Membership>}
205
204
  * @deprecated Use the object parameter style method for a better developer experience.
206
205
  */
207
- createMembership(teamId: string, roles: Roles[], email?: string, userId?: string, phone?: string, url?: string, name?: string): Promise<Models.Membership>;
206
+ createMembership(teamId: string, roles: string[], email?: string, userId?: string, phone?: string, url?: string, name?: string): Promise<Models.Membership>;
208
207
  /**
209
208
  * Get a team member by the membership unique id. All team members have read access for this resource. Hide sensitive attributes from the response by toggling membership privacy in the Console.
210
209
  *
@@ -233,14 +232,14 @@ declare class Teams {
233
232
  *
234
233
  * @param {string} params.teamId - Team ID.
235
234
  * @param {string} params.membershipId - Membership ID.
236
- * @param {Roles[]} params.roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
235
+ * @param {string[]} params.roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
237
236
  * @throws {AppwriteException}
238
237
  * @returns {Promise<Models.Membership>}
239
238
  */
240
239
  updateMembership(params: {
241
240
  teamId: string;
242
241
  membershipId: string;
243
- roles: Roles[];
242
+ roles: string[];
244
243
  }): Promise<Models.Membership>;
245
244
  /**
246
245
  * Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions).
@@ -248,12 +247,12 @@ declare class Teams {
248
247
  *
249
248
  * @param {string} teamId - Team ID.
250
249
  * @param {string} membershipId - Membership ID.
251
- * @param {Roles[]} roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
250
+ * @param {string[]} roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long.
252
251
  * @throws {AppwriteException}
253
252
  * @returns {Promise<Models.Membership>}
254
253
  * @deprecated Use the object parameter style method for a better developer experience.
255
254
  */
256
- updateMembership(teamId: string, membershipId: string, roles: Roles[]): Promise<Models.Membership>;
255
+ updateMembership(teamId: string, membershipId: string, roles: string[]): Promise<Models.Membership>;
257
256
  /**
258
257
  * This endpoint allows a user to leave a team or for a team owner to delete the membership of any other team member. You can also use this endpoint to delete a user membership even if it is not accepted.
259
258
  *