node-appwrite 20.2.1 → 20.3.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 (95) hide show
  1. package/dist/client.js +2 -2
  2. package/dist/client.js.map +1 -1
  3. package/dist/client.mjs +2 -2
  4. package/dist/client.mjs.map +1 -1
  5. package/dist/enums/execution-status.d.mts +2 -1
  6. package/dist/enums/execution-status.d.ts +2 -1
  7. package/dist/enums/execution-status.js +1 -0
  8. package/dist/enums/execution-status.js.map +1 -1
  9. package/dist/enums/execution-status.mjs +1 -0
  10. package/dist/enums/execution-status.mjs.map +1 -1
  11. package/dist/enums/framework.d.mts +1 -0
  12. package/dist/enums/framework.d.ts +1 -0
  13. package/dist/enums/framework.js +1 -0
  14. package/dist/enums/framework.js.map +1 -1
  15. package/dist/enums/framework.mjs +1 -0
  16. package/dist/enums/framework.mjs.map +1 -1
  17. package/dist/index.d.mts +1 -0
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.js +9 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +1 -0
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/models.d.mts +1 -1
  24. package/dist/models.d.ts +1 -1
  25. package/dist/operator.d.mts +181 -0
  26. package/dist/operator.d.ts +181 -0
  27. package/dist/operator.js +268 -0
  28. package/dist/operator.js.map +1 -0
  29. package/dist/operator.mjs +266 -0
  30. package/dist/operator.mjs.map +1 -0
  31. package/dist/query.js +6 -6
  32. package/dist/query.js.map +1 -1
  33. package/dist/query.mjs +6 -6
  34. package/dist/query.mjs.map +1 -1
  35. package/dist/services/account.d.mts +8 -2
  36. package/dist/services/account.d.ts +8 -2
  37. package/dist/services/account.js +14 -4
  38. package/dist/services/account.js.map +1 -1
  39. package/dist/services/account.mjs +14 -4
  40. package/dist/services/account.mjs.map +1 -1
  41. package/dist/services/databases.d.mts +20 -5
  42. package/dist/services/databases.d.ts +20 -5
  43. package/dist/services/databases.js +30 -5
  44. package/dist/services/databases.js.map +1 -1
  45. package/dist/services/databases.mjs +30 -5
  46. package/dist/services/databases.mjs.map +1 -1
  47. package/dist/services/functions.d.mts +12 -3
  48. package/dist/services/functions.d.ts +12 -3
  49. package/dist/services/functions.js +18 -3
  50. package/dist/services/functions.js.map +1 -1
  51. package/dist/services/functions.mjs +18 -3
  52. package/dist/services/functions.mjs.map +1 -1
  53. package/dist/services/messaging.d.mts +116 -9
  54. package/dist/services/messaging.d.ts +116 -9
  55. package/dist/services/messaging.js +182 -9
  56. package/dist/services/messaging.js.map +1 -1
  57. package/dist/services/messaging.mjs +182 -9
  58. package/dist/services/messaging.mjs.map +1 -1
  59. package/dist/services/sites.d.mts +12 -3
  60. package/dist/services/sites.d.ts +12 -3
  61. package/dist/services/sites.js +18 -3
  62. package/dist/services/sites.js.map +1 -1
  63. package/dist/services/sites.mjs +18 -3
  64. package/dist/services/sites.mjs.map +1 -1
  65. package/dist/services/storage.d.mts +8 -2
  66. package/dist/services/storage.d.ts +8 -2
  67. package/dist/services/storage.js +12 -2
  68. package/dist/services/storage.js.map +1 -1
  69. package/dist/services/storage.mjs +12 -2
  70. package/dist/services/storage.mjs.map +1 -1
  71. package/dist/services/tables-db.d.mts +20 -5
  72. package/dist/services/tables-db.d.ts +20 -5
  73. package/dist/services/tables-db.js +30 -5
  74. package/dist/services/tables-db.js.map +1 -1
  75. package/dist/services/tables-db.mjs +30 -5
  76. package/dist/services/tables-db.mjs.map +1 -1
  77. package/dist/services/teams.d.mts +8 -2
  78. package/dist/services/teams.d.ts +8 -2
  79. package/dist/services/teams.js +12 -2
  80. package/dist/services/teams.js.map +1 -1
  81. package/dist/services/teams.mjs +12 -2
  82. package/dist/services/teams.mjs.map +1 -1
  83. package/dist/services/tokens.d.mts +4 -1
  84. package/dist/services/tokens.d.ts +4 -1
  85. package/dist/services/tokens.js +6 -1
  86. package/dist/services/tokens.js.map +1 -1
  87. package/dist/services/tokens.mjs +6 -1
  88. package/dist/services/tokens.mjs.map +1 -1
  89. package/dist/services/users.d.mts +24 -6
  90. package/dist/services/users.d.ts +24 -6
  91. package/dist/services/users.js +37 -7
  92. package/dist/services/users.js.map +1 -1
  93. package/dist/services/users.mjs +37 -7
  94. package/dist/services/users.mjs.map +1 -1
  95. package/package.json +1 -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,EAqBA,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,MAClB;AAAA,IACJ;AAEA,UAAM,UAAU,OAAO;AACvB,UAAM,SAAS,OAAO;AAGtB,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,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,IACJ;AAAA,EACJ;AAAA,EAqCA,aACI,kBACG,MACmB;AACtB,QAAI;AAEJ,QAAK,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,GAAI;AACvF,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,UAAU;AAAA,QACV,MAAM,KAAK,CAAC;AAAA,QACZ,aAAa,K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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\n * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BucketList>}\n */\n listBuckets(params?: { queries?: string[], search?: string }): 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\n * @param {string} search - Search term to filter your list results. Max length: 256 chars.\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): Promise<Models.BucketList>;\n listBuckets(\n paramsOrFirst?: { queries?: string[], search?: string } | string[],\n ...rest: [(string)?] \n ): Promise<Models.BucketList> {\n let params: { queries?: string[], search?: string };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { queries?: string[], search?: string };\n } else {\n params = {\n queries: paramsOrFirst as string[],\n search: rest[0] as string \n };\n }\n \n const queries = params.queries;\n const search = params.search;\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 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 choosen 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 * @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 }): 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 choosen 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 * @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): 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 } | string,\n ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (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 };\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 };\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 };\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\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 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 choosen 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 * @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 }): 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 choosen 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 * @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): 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 } | string,\n ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (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 };\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 };\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 };\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\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 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 * @throws {AppwriteException}\n * @returns {Promise<Models.FileList>}\n */\n listFiles(params: { bucketId: string, queries?: string[], search?: string }): 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 * @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): Promise<Models.FileList>;\n listFiles(\n paramsOrFirst: { bucketId: string, queries?: string[], search?: string } | string,\n ...rest: [(string[])?, (string)?] \n ): Promise<Models.FileList> {\n let params: { bucketId: string, queries?: string[], search?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, queries?: string[], search?: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n queries: rest[0] as string[],\n search: rest[1] as string \n };\n }\n \n const bucketId = params.bucketId;\n const queries = params.queries;\n const search = params.search;\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 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 - 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 unique ID.\n * @param {string} params.name - Name of the file\n * @param {string[]} params.permissions - An array of permission string. 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 - 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 unique ID.\n * @param {string} name - Name of the file\n * @param {string[]} permissions - An array of permission string. 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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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\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\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 choosen 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 * @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 }): 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 choosen 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 * @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): 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 } | string,\n ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (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 };\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 };\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 };\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\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 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 choosen 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 * @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 }): 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 choosen 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 * @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): 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 } | string,\n ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (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 };\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 };\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 };\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\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 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 - 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 unique ID.\n * @param {string} params.name - Name of the file\n * @param {string[]} params.permissions - An array of permission string. 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 - 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 unique ID.\n * @param {string} name - Name of the file\n * @param {string[]} permissions - An array of permission string. 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"]}
@@ -23,23 +23,26 @@ declare class TablesDB {
23
23
  *
24
24
  * @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 columns: name
25
25
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
26
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
26
27
  * @throws {AppwriteException}
27
28
  * @returns {Promise<Models.DatabaseList>}
28
29
  */
29
30
  list(params?: {
30
31
  queries?: string[];
31
32
  search?: string;
33
+ total?: boolean;
32
34
  }): Promise<Models.DatabaseList>;
33
35
  /**
34
36
  * Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
35
37
  *
36
38
  * @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 columns: name
37
39
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
40
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
38
41
  * @throws {AppwriteException}
39
42
  * @returns {Promise<Models.DatabaseList>}
40
43
  * @deprecated Use the object parameter style method for a better developer experience.
41
44
  */
42
- list(queries?: string[], search?: string): Promise<Models.DatabaseList>;
45
+ list(queries?: string[], search?: string, total?: boolean): Promise<Models.DatabaseList>;
43
46
  /**
44
47
  * Create a new Database.
45
48
  *
@@ -259,6 +262,7 @@ declare class TablesDB {
259
262
  * @param {string} params.databaseId - Database ID.
260
263
  * @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 columns: name, enabled, rowSecurity
261
264
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
265
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
262
266
  * @throws {AppwriteException}
263
267
  * @returns {Promise<Models.TableList>}
264
268
  */
@@ -266,6 +270,7 @@ declare class TablesDB {
266
270
  databaseId: string;
267
271
  queries?: string[];
268
272
  search?: string;
273
+ total?: boolean;
269
274
  }): Promise<Models.TableList>;
270
275
  /**
271
276
  * Get a list of all tables that belong to the provided databaseId. You can use the search parameter to filter your results.
@@ -273,11 +278,12 @@ declare class TablesDB {
273
278
  * @param {string} databaseId - Database ID.
274
279
  * @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 columns: name, enabled, rowSecurity
275
280
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
281
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
276
282
  * @throws {AppwriteException}
277
283
  * @returns {Promise<Models.TableList>}
278
284
  * @deprecated Use the object parameter style method for a better developer experience.
279
285
  */
280
- listTables(databaseId: string, queries?: string[], search?: string): Promise<Models.TableList>;
286
+ listTables(databaseId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.TableList>;
281
287
  /**
282
288
  * Create a new Table. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
283
289
  *
@@ -396,6 +402,7 @@ declare class TablesDB {
396
402
  * @param {string} params.databaseId - Database ID.
397
403
  * @param {string} params.tableId - Table ID.
398
404
  * @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 columns: key, type, size, required, array, status, error
405
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
399
406
  * @throws {AppwriteException}
400
407
  * @returns {Promise<Models.ColumnList>}
401
408
  */
@@ -403,6 +410,7 @@ declare class TablesDB {
403
410
  databaseId: string;
404
411
  tableId: string;
405
412
  queries?: string[];
413
+ total?: boolean;
406
414
  }): Promise<Models.ColumnList>;
407
415
  /**
408
416
  * List columns in the table.
@@ -410,11 +418,12 @@ declare class TablesDB {
410
418
  * @param {string} databaseId - Database ID.
411
419
  * @param {string} tableId - Table ID.
412
420
  * @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 columns: key, type, size, required, array, status, error
421
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
413
422
  * @throws {AppwriteException}
414
423
  * @returns {Promise<Models.ColumnList>}
415
424
  * @deprecated Use the object parameter style method for a better developer experience.
416
425
  */
417
- listColumns(databaseId: string, tableId: string, queries?: string[]): Promise<Models.ColumnList>;
426
+ listColumns(databaseId: string, tableId: string, queries?: string[], total?: boolean): Promise<Models.ColumnList>;
418
427
  /**
419
428
  * Create a boolean column.
420
429
  *
@@ -1420,6 +1429,7 @@ declare class TablesDB {
1420
1429
  * @param {string} params.databaseId - Database ID.
1421
1430
  * @param {string} params.tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1422
1431
  * @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 columns: key, type, status, attributes, error
1432
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1423
1433
  * @throws {AppwriteException}
1424
1434
  * @returns {Promise<Models.ColumnIndexList>}
1425
1435
  */
@@ -1427,6 +1437,7 @@ declare class TablesDB {
1427
1437
  databaseId: string;
1428
1438
  tableId: string;
1429
1439
  queries?: string[];
1440
+ total?: boolean;
1430
1441
  }): Promise<Models.ColumnIndexList>;
1431
1442
  /**
1432
1443
  * List indexes on the table.
@@ -1434,11 +1445,12 @@ declare class TablesDB {
1434
1445
  * @param {string} databaseId - Database ID.
1435
1446
  * @param {string} tableId - Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable).
1436
1447
  * @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 columns: key, type, status, attributes, error
1448
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1437
1449
  * @throws {AppwriteException}
1438
1450
  * @returns {Promise<Models.ColumnIndexList>}
1439
1451
  * @deprecated Use the object parameter style method for a better developer experience.
1440
1452
  */
1441
- listIndexes(databaseId: string, tableId: string, queries?: string[]): Promise<Models.ColumnIndexList>;
1453
+ listIndexes(databaseId: string, tableId: string, queries?: string[], total?: boolean): Promise<Models.ColumnIndexList>;
1442
1454
  /**
1443
1455
  * Creates an index on the columns listed. Your index should include all the columns you will query in a single request.
1444
1456
  * Type can be `key`, `fulltext`, or `unique`.
@@ -1535,6 +1547,7 @@ declare class TablesDB {
1535
1547
  * @param {string} params.tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table).
1536
1548
  * @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.
1537
1549
  * @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
1550
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1538
1551
  * @throws {AppwriteException}
1539
1552
  * @returns {Promise<Models.RowList<Row>>}
1540
1553
  */
@@ -1543,6 +1556,7 @@ declare class TablesDB {
1543
1556
  tableId: string;
1544
1557
  queries?: string[];
1545
1558
  transactionId?: string;
1559
+ total?: boolean;
1546
1560
  }): Promise<Models.RowList<Row>>;
1547
1561
  /**
1548
1562
  * Get a list of all the user's rows in a given table. You can use the query params to filter your results.
@@ -1551,11 +1565,12 @@ declare class TablesDB {
1551
1565
  * @param {string} tableId - Table ID. You can create a new table using the TablesDB service [server integration](https://appwrite.io/docs/products/databases/tables#create-table).
1552
1566
  * @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.
1553
1567
  * @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
1568
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1554
1569
  * @throws {AppwriteException}
1555
1570
  * @returns {Promise<Models.RowList<Row>>}
1556
1571
  * @deprecated Use the object parameter style method for a better developer experience.
1557
1572
  */
1558
- listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string): Promise<Models.RowList<Row>>;
1573
+ listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.RowList<Row>>;
1559
1574
  /**
1560
1575
  * Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
1561
1576
  *