node-appwrite 22.0.0 → 22.1.1
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.
- package/dist/client.js +6 -5
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +6 -1477
- package/dist/client.mjs.map +1 -1
- package/dist/enums/backup-services.d.mts +7 -0
- package/dist/enums/backup-services.d.ts +7 -0
- package/dist/enums/backup-services.js +12 -0
- package/dist/enums/backup-services.js.map +1 -0
- package/dist/enums/backup-services.mjs +11 -0
- package/dist/enums/backup-services.mjs.map +1 -0
- package/dist/enums/build-runtime.d.mts +23 -4
- package/dist/enums/build-runtime.d.ts +23 -4
- package/dist/enums/build-runtime.js +22 -3
- package/dist/enums/build-runtime.js.map +1 -1
- package/dist/enums/build-runtime.mjs +22 -3
- package/dist/enums/build-runtime.mjs.map +1 -1
- package/dist/enums/runtime.d.mts +23 -4
- package/dist/enums/runtime.d.ts +23 -4
- package/dist/enums/runtime.js +22 -3
- package/dist/enums/runtime.js.map +1 -1
- package/dist/enums/runtime.mjs +22 -3
- package/dist/enums/runtime.mjs.map +1 -1
- package/dist/enums/scopes.d.mts +12 -1
- package/dist/enums/scopes.d.ts +12 -1
- package/dist/enums/scopes.js +11 -0
- package/dist/enums/scopes.js.map +1 -1
- package/dist/enums/scopes.mjs +11 -0
- package/dist/enums/scopes.mjs.map +1 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/dist/models.d.mts +396 -4
- package/dist/models.d.ts +396 -4
- package/dist/query.d.mts +22 -0
- package/dist/query.d.ts +22 -0
- package/dist/query.js +22 -0
- package/dist/query.js.map +1 -1
- package/dist/query.mjs +22 -0
- package/dist/query.mjs.map +1 -1
- package/dist/services/account.js +3 -3
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +3 -3
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/activities.d.mts +60 -0
- package/dist/services/activities.d.ts +60 -0
- package/dist/services/activities.js +61 -0
- package/dist/services/activities.js.map +1 -0
- package/dist/services/activities.mjs +60 -0
- package/dist/services/activities.mjs.map +1 -0
- package/dist/services/avatars.js +3 -3
- package/dist/services/avatars.js.map +1 -1
- package/dist/services/avatars.mjs +3 -3
- package/dist/services/avatars.mjs.map +1 -1
- package/dist/services/backups.d.mts +291 -0
- package/dist/services/backups.d.ts +291 -0
- package/dist/services/backups.js +404 -0
- package/dist/services/backups.js.map +1 -0
- package/dist/services/backups.mjs +403 -0
- package/dist/services/backups.mjs.map +1 -0
- package/dist/services/databases.d.mts +16 -4
- package/dist/services/databases.d.ts +16 -4
- package/dist/services/databases.js +24 -4
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +24 -4
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/graphql.js.map +1 -1
- package/dist/services/graphql.mjs.map +1 -1
- package/dist/services/health.d.mts +95 -0
- package/dist/services/health.d.ts +95 -0
- package/dist/services/health.js +121 -1
- package/dist/services/health.js.map +1 -1
- package/dist/services/health.mjs +121 -1
- package/dist/services/health.mjs.map +1 -1
- package/dist/services/storage.d.mts +4 -4
- package/dist/services/storage.d.ts +4 -4
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/tables-db.d.mts +16 -4
- package/dist/services/tables-db.d.ts +16 -4
- package/dist/services/tables-db.js +24 -4
- package/dist/services/tables-db.js.map +1 -1
- package/dist/services/tables-db.mjs +24 -4
- package/dist/services/tables-db.mjs.map +1 -1
- package/dist/services/teams.d.mts +8 -9
- package/dist/services/teams.d.ts +8 -9
- package/dist/services/teams.js.map +1 -1
- package/dist/services/teams.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/enums/roles.d.mts +0 -7
- package/dist/enums/roles.d.ts +0 -7
- package/dist/enums/roles.js +0 -12
- package/dist/enums/roles.js.map +0 -1
- package/dist/en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,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA,EAuBA,YACI,kBACG,MACiB;AACpB,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,QAAQ,KAAK,CAAC;AAAA,QACd,OAAO,KAAK,CAAC;AAAA,MACjB;AAAA,IACJ;AAEA,UAAM,WAAW,OAAO;AACxB,UAAM,SAAS,OAAO;AACtB,UAAM,QAAQ,OAAO;AAErB,QAAI,OAAO,aAAa,aAAa;AACjC,YAAM,IAAI,kBAAkB,wCAAwC;AAAA,IACxE;AACA,QAAI,OAAO,WAAW,aAAa;AAC/B,YAAM,IAAI,kBAAkB,sCAAsC;AAAA,IACtE;AAEA,UAAM,UAAU,kDAAkD,QAAQ,cAAc,QAAQ,EAAE,QAAQ,YAAY,MAAM;AAC5H,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,UAAU,aAAa;AAC9B,cAAQ,OAAO,IAAI;AAAA,IACvB;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nimport { Compression } from '../enums/compression';\nimport { ImageGravity } from '../enums/image-gravity';\nimport { ImageFormat } from '../enums/image-format';\n\nexport class Storage {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Get a list of all the storage buckets. You can use the query params to filter your results.\n *\n * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations\n * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BucketList>}\n */\n listBuckets(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.BucketList>;\n /**\n * Get a list of all the storage buckets. You can use the query params to filter your results.\n *\n * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations\n * @param {string} search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BucketList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listBuckets(queries?: string[], search?: string, total?: boolean): Promise<Models.BucketList>;\n listBuckets(\n paramsOrFirst?: { queries?: string[], search?: string, total?: boolean } | string[],\n ...rest: [(string)?, (boolean)?] \n ): Promise<Models.BucketList> {\n let params: { queries?: string[], search?: string, total?: boolean };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { queries?: string[], search?: string, total?: boolean };\n } else {\n params = {\n queries: paramsOrFirst as string[],\n search: rest[0] as string,\n total: rest[1] as boolean \n };\n }\n \n const queries = params.queries;\n const search = params.search;\n const total = params.total;\n\n\n const apiPath = '/storage/buckets';\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n if (typeof total !== 'undefined') {\n payload['total'] = total;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Create a new storage bucket.\n *\n * @param {string} params.bucketId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {string} params.name - Bucket name\n * @param {string[]} params.permissions - An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} params.fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} params.enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.\n * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 30MB.\n * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @param {Compression} params.compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled\n * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} params.transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n createBucket(params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean }): Promise<Models.Bucket>;\n /**\n * Create a new storage bucket.\n *\n * @param {string} bucketId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {string} name - Bucket name\n * @param {string[]} permissions - An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.\n * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 30MB.\n * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @param {Compression} compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled\n * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean): Promise<Models.Bucket>;\n createBucket(\n paramsOrFirst: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean } | string,\n ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (boolean)?, (boolean)?, (boolean)?] \n ): Promise<Models.Bucket> {\n let params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n name: rest[0] as string,\n permissions: rest[1] as string[],\n fileSecurity: rest[2] as boolean,\n enabled: rest[3] as boolean,\n maximumFileSize: rest[4] as number,\n allowedFileExtensions: rest[5] as string[],\n compression: rest[6] as Compression,\n encryption: rest[7] as boolean,\n antivirus: rest[8] as boolean,\n transformations: rest[9] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const name = params.name;\n const permissions = params.permissions;\n const fileSecurity = params.fileSecurity;\n const enabled = params.enabled;\n const maximumFileSize = params.maximumFileSize;\n const allowedFileExtensions = params.allowedFileExtensions;\n const compression = params.compression;\n const encryption = params.encryption;\n const antivirus = params.antivirus;\n const transformations = params.transformations;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/storage/buckets';\n const payload: Payload = {};\n if (typeof bucketId !== 'undefined') {\n payload['bucketId'] = bucketId;\n }\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n if (typeof fileSecurity !== 'undefined') {\n payload['fileSecurity'] = fileSecurity;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\n }\n if (typeof maximumFileSize !== 'undefined') {\n payload['maximumFileSize'] = maximumFileSize;\n }\n if (typeof allowedFileExtensions !== 'undefined') {\n payload['allowedFileExtensions'] = allowedFileExtensions;\n }\n if (typeof compression !== 'undefined') {\n payload['compression'] = compression;\n }\n if (typeof encryption !== 'undefined') {\n payload['encryption'] = encryption;\n }\n if (typeof antivirus !== 'undefined') {\n payload['antivirus'] = antivirus;\n }\n if (typeof transformations !== 'undefined') {\n payload['transformations'] = transformations;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n getBucket(params: { bucketId: string }): Promise<Models.Bucket>;\n /**\n * Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getBucket(bucketId: string): Promise<Models.Bucket>;\n getBucket(\n paramsOrFirst: { bucketId: string } | string \n ): Promise<Models.Bucket> {\n let params: { bucketId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string \n };\n }\n \n const bucketId = params.bucketId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Update a storage bucket by its unique ID.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @param {string} params.name - Bucket name\n * @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} params.fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} params.enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.\n * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 30MB.\n * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @param {Compression} params.compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled\n * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} params.transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n updateBucket(params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean }): Promise<Models.Bucket>;\n /**\n * Update a storage bucket by its unique ID.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @param {string} name - Bucket name\n * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.\n * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 30MB.\n * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @param {Compression} compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled\n * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean): Promise<Models.Bucket>;\n updateBucket(\n paramsOrFirst: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean } | string,\n ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (boolean)?, (boolean)?, (boolean)?] \n ): Promise<Models.Bucket> {\n let params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n name: rest[0] as string,\n permissions: rest[1] as string[],\n fileSecurity: rest[2] as boolean,\n enabled: rest[3] as boolean,\n maximumFileSize: rest[4] as number,\n allowedFileExtensions: rest[5] as string[],\n compression: rest[6] as Compression,\n encryption: rest[7] as boolean,\n antivirus: rest[8] as boolean,\n transformations: rest[9] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const name = params.name;\n const permissions = params.permissions;\n const fileSecurity = params.fileSecurity;\n const enabled = params.enabled;\n const maximumFileSize = params.maximumFileSize;\n const allowedFileExtensions = params.allowedFileExtensions;\n const compression = params.compression;\n const encryption = params.encryption;\n const antivirus = params.antivirus;\n const transformations = params.transformations;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n if (typeof fileSecurity !== 'undefined') {\n payload['fileSecurity'] = fileSecurity;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\n }\n if (typeof maximumFileSize !== 'undefined') {\n payload['maximumFileSize'] = maximumFileSize;\n }\n if (typeof allowedFileExtensions !== 'undefined') {\n payload['allowedFileExtensions'] = allowedFileExtensions;\n }\n if (typeof compression !== 'undefined') {\n payload['compression'] = compression;\n }\n if (typeof encryption !== 'undefined') {\n payload['encryption'] = encryption;\n }\n if (typeof antivirus !== 'undefined') {\n payload['antivirus'] = antivirus;\n }\n if (typeof transformations !== 'undefined') {\n payload['transformations'] = transformations;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Delete a storage bucket by its unique ID.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteBucket(params: { bucketId: string }): Promise<{}>;\n /**\n * Delete a storage bucket by its unique ID.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deleteBucket(bucketId: string): Promise<{}>;\n deleteBucket(\n paramsOrFirst: { bucketId: string } | string \n ): Promise<{}> {\n let params: { bucketId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string \n };\n }\n \n const bucketId = params.bucketId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a list of all the user files. You can use the query params to filter your results.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded\n * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.FileList>}\n */\n listFiles(params: { bucketId: string, queries?: string[], search?: string, total?: boolean }): Promise<Models.FileList>;\n /**\n * Get a list of all the user files. You can use the query params to filter your results.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded\n * @param {string} search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.FileList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listFiles(bucketId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.FileList>;\n listFiles(\n paramsOrFirst: { bucketId: string, queries?: string[], search?: string, total?: boolean } | string,\n ...rest: [(string[])?, (string)?, (boolean)?] \n ): Promise<Models.FileList> {\n let params: { bucketId: string, queries?: string[], search?: string, total?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, queries?: string[], search?: string, total?: boolean };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n queries: rest[0] as string[],\n search: rest[1] as string,\n total: rest[2] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const queries = params.queries;\n const search = params.search;\n const total = params.total;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n if (typeof total !== 'undefined') {\n payload['total'] = total;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.\n * \n * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n * \n * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n * \n * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n * \n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {File} params.file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).\n * @param {string[]} params.permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n createFile(params: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void }): Promise<Models.File>;\n /**\n * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.\n * \n * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n * \n * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n * \n * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n * \n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {File} file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).\n * @param {string[]} permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createFile(bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void): Promise<Models.File>;\n createFile(\n paramsOrFirst: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void } | string,\n ...rest: [(string)?, (File)?, (string[])?,((progress: UploadProgress) => void)?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string, file: File, permissions?: string[] };\n let onProgress: ((progress: UploadProgress) => void);\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, file: File, permissions?: string[] };\n onProgress = paramsOrFirst?.onProgress as ((progress: UploadProgress) => void);\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n file: rest[1] as File,\n permissions: rest[2] as string[] \n };\n onProgress = rest[3] as ((progress: UploadProgress) => void);\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const file = params.file;\n const permissions = params.permissions;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n if (typeof file === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"file\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof fileId !== 'undefined') {\n payload['fileId'] = fileId;\n }\n if (typeof file !== 'undefined') {\n payload['file'] = file;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'multipart/form-data',\n }\n\n return this.client.chunkedUpload(\n 'post',\n uri,\n apiHeaders,\n payload,\n onProgress\n );\n }\n\n /**\n * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n getFile(params: { bucketId: string, fileId: string }): Promise<Models.File>;\n /**\n * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFile(bucketId: string, fileId: string): Promise<Models.File>;\n getFile(\n paramsOrFirst: { bucketId: string, fileId: string } | string,\n ...rest: [(string)?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Update a file by its unique ID. Only users with write permissions have access to update this resource.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @param {string} params.fileId - File ID.\n * @param {string} params.name - File name.\n * @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n updateFile(params: { bucketId: string, fileId: string, name?: string, permissions?: string[] }): Promise<Models.File>;\n /**\n * Update a file by its unique ID. Only users with write permissions have access to update this resource.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @param {string} fileId - File ID.\n * @param {string} name - File name.\n * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updateFile(bucketId: string, fileId: string, name?: string, permissions?: string[]): Promise<Models.File>;\n updateFile(\n paramsOrFirst: { bucketId: string, fileId: string, name?: string, permissions?: string[] } | string,\n ...rest: [(string)?, (string)?, (string[])?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string, name?: string, permissions?: string[] };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, name?: string, permissions?: string[] };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n name: rest[1] as string,\n permissions: rest[2] as string[] \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const name = params.name;\n const permissions = params.permissions;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Delete a file by its unique ID. Only users with write permissions have access to delete this resource.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteFile(params: { bucketId: string, fileId: string }): Promise<{}>;\n /**\n * Delete a file by its unique ID. Only users with write permissions have access to delete this resource.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deleteFile(bucketId: string, fileId: string): Promise<{}>;\n deleteFile(\n paramsOrFirst: { bucketId: string, fileId: string } | string,\n ...rest: [(string)?] \n ): Promise<{}> {\n let params: { bucketId: string, fileId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.\n *\n * @param {string} params.bucketId - Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFileDownload(params: { bucketId: string, fileId: string, token?: string }): Promise<ArrayBuffer>;\n /**\n * Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.\n *\n * @param {string} bucketId - Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFileDownload(bucketId: string, fileId: string, token?: string): Promise<ArrayBuffer>;\n getFileDownload(\n paramsOrFirst: { bucketId: string, fileId: string, token?: string } | string,\n ...rest: [(string)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { bucketId: string, fileId: string, token?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, token?: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n token: rest[1] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID\n * @param {number} params.width - Resize preview image width, Pass an integer between 0 to 4000.\n * @param {number} params.height - Resize preview image height, Pass an integer between 0 to 4000.\n * @param {ImageGravity} params.gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right\n * @param {number} params.quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @param {number} params.borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.\n * @param {string} params.borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.\n * @param {number} params.borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.\n * @param {number} params.opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.\n * @param {number} params.rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.\n * @param {string} params.background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.\n * @param {ImageFormat} params.output - Output format type (jpeg, jpg, png, gif and webp).\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFilePreview(params: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string }): Promise<ArrayBuffer>;\n /**\n * Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID\n * @param {number} width - Resize preview image width, Pass an integer between 0 to 4000.\n * @param {number} height - Resize preview image height, Pass an integer between 0 to 4000.\n * @param {ImageGravity} gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right\n * @param {number} quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @param {number} borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.\n * @param {string} borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.\n * @param {number} borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.\n * @param {number} opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.\n * @param {number} rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.\n * @param {string} background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.\n * @param {ImageFormat} output - Output format type (jpeg, jpg, png, gif and webp).\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFilePreview(bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string): Promise<ArrayBuffer>;\n getFilePreview(\n paramsOrFirst: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string } | string,\n ...rest: [(string)?, (number)?, (number)?, (ImageGravity)?, (number)?, (number)?, (string)?, (number)?, (number)?, (number)?, (string)?, (ImageFormat)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n width: rest[1] as number,\n height: rest[2] as number,\n gravity: rest[3] as ImageGravity,\n quality: rest[4] as number,\n borderWidth: rest[5] as number,\n borderColor: rest[6] as string,\n borderRadius: rest[7] as number,\n opacity: rest[8] as number,\n rotation: rest[9] as number,\n background: rest[10] as string,\n output: rest[11] as ImageFormat,\n token: rest[12] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const width = params.width;\n const height = params.height;\n const gravity = params.gravity;\n const quality = params.quality;\n const borderWidth = params.borderWidth;\n const borderColor = params.borderColor;\n const borderRadius = params.borderRadius;\n const opacity = params.opacity;\n const rotation = params.rotation;\n const background = params.background;\n const output = params.output;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/preview'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof gravity !== 'undefined') {\n payload['gravity'] = gravity;\n }\n if (typeof quality !== 'undefined') {\n payload['quality'] = quality;\n }\n if (typeof borderWidth !== 'undefined') {\n payload['borderWidth'] = borderWidth;\n }\n if (typeof borderColor !== 'undefined') {\n payload['borderColor'] = borderColor;\n }\n if (typeof borderRadius !== 'undefined') {\n payload['borderRadius'] = borderRadius;\n }\n if (typeof opacity !== 'undefined') {\n payload['opacity'] = opacity;\n }\n if (typeof rotation !== 'undefined') {\n payload['rotation'] = rotation;\n }\n if (typeof background !== 'undefined') {\n payload['background'] = background;\n }\n if (typeof output !== 'undefined') {\n payload['output'] = output;\n }\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFileView(params: { bucketId: string, fileId: string, token?: string }): Promise<ArrayBuffer>;\n /**\n * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFileView(bucketId: string, fileId: string, token?: string): Promise<ArrayBuffer>;\n getFileView(\n paramsOrFirst: { bucketId: string, fileId: string, token?: string } | string,\n ...rest: [(string)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { bucketId: string, fileId: string, token?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, token?: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n token: rest[1] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/services/storage.ts"],"names":[],"mappings":";AAAA,SAAS,yBAA+D;AAOjE,IAAM,UAAN,MAAc;AAAA,EAGjB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA,EAuBA,YACI,kBACG,MACuB;AAC1B,QAAI;AAEJ,QAAI,CAAC,iBAAkB,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,GAAI;AACzG,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,SAAS;AAAA,QACT,Q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AAM,QAAQ,OAAO;AAErB,QAAI,OAAO,aAAa,aAAa;AACjC,YAAM,IAAI,kBAAkB,wCAAwC;AAAA,IACxE;AACA,QAAI,OAAO,WAAW,aAAa;AAC/B,YAAM,IAAI,kBAAkB,sCAAsC;AAAA,IACtE;AAEA,UAAM,UAAU,kDAAkD,QAAQ,cAAc,QAAQ,EAAE,QAAQ,YAAY,MAAM;AAC5H,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,UAAU,aAAa;AAC9B,cAAQ,OAAO,IAAI;AAAA,IACvB;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nimport { Compression } from '../enums/compression';\nimport { ImageGravity } from '../enums/image-gravity';\nimport { ImageFormat } from '../enums/image-format';\n\nexport class Storage {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Get a list of all the storage buckets. You can use the query params to filter your results.\n *\n * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations\n * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BucketList>}\n */\n listBuckets(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.BucketList>;\n /**\n * Get a list of all the storage buckets. You can use the query params to filter your results.\n *\n * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations\n * @param {string} search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.BucketList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listBuckets(queries?: string[], search?: string, total?: boolean): Promise<Models.BucketList>;\n listBuckets(\n paramsOrFirst?: { queries?: string[], search?: string, total?: boolean } | string[],\n ...rest: [(string)?, (boolean)?] \n ): Promise<Models.BucketList> {\n let params: { queries?: string[], search?: string, total?: boolean };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { queries?: string[], search?: string, total?: boolean };\n } else {\n params = {\n queries: paramsOrFirst as string[],\n search: rest[0] as string,\n total: rest[1] as boolean \n };\n }\n \n const queries = params.queries;\n const search = params.search;\n const total = params.total;\n\n\n const apiPath = '/storage/buckets';\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n if (typeof total !== 'undefined') {\n payload['total'] = total;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Create a new storage bucket.\n *\n * @param {string} params.bucketId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {string} params.name - Bucket name\n * @param {string[]} params.permissions - An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} params.fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} params.enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.\n * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.\n * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @param {Compression} params.compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled\n * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} params.transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n createBucket(params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean }): Promise<Models.Bucket>;\n /**\n * Create a new storage bucket.\n *\n * @param {string} bucketId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {string} name - Bucket name\n * @param {string[]} permissions - An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.\n * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.\n * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @param {Compression} compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled\n * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean): Promise<Models.Bucket>;\n createBucket(\n paramsOrFirst: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean } | string,\n ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (boolean)?, (boolean)?, (boolean)?] \n ): Promise<Models.Bucket> {\n let params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n name: rest[0] as string,\n permissions: rest[1] as string[],\n fileSecurity: rest[2] as boolean,\n enabled: rest[3] as boolean,\n maximumFileSize: rest[4] as number,\n allowedFileExtensions: rest[5] as string[],\n compression: rest[6] as Compression,\n encryption: rest[7] as boolean,\n antivirus: rest[8] as boolean,\n transformations: rest[9] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const name = params.name;\n const permissions = params.permissions;\n const fileSecurity = params.fileSecurity;\n const enabled = params.enabled;\n const maximumFileSize = params.maximumFileSize;\n const allowedFileExtensions = params.allowedFileExtensions;\n const compression = params.compression;\n const encryption = params.encryption;\n const antivirus = params.antivirus;\n const transformations = params.transformations;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/storage/buckets';\n const payload: Payload = {};\n if (typeof bucketId !== 'undefined') {\n payload['bucketId'] = bucketId;\n }\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n if (typeof fileSecurity !== 'undefined') {\n payload['fileSecurity'] = fileSecurity;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\n }\n if (typeof maximumFileSize !== 'undefined') {\n payload['maximumFileSize'] = maximumFileSize;\n }\n if (typeof allowedFileExtensions !== 'undefined') {\n payload['allowedFileExtensions'] = allowedFileExtensions;\n }\n if (typeof compression !== 'undefined') {\n payload['compression'] = compression;\n }\n if (typeof encryption !== 'undefined') {\n payload['encryption'] = encryption;\n }\n if (typeof antivirus !== 'undefined') {\n payload['antivirus'] = antivirus;\n }\n if (typeof transformations !== 'undefined') {\n payload['transformations'] = transformations;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n getBucket(params: { bucketId: string }): Promise<Models.Bucket>;\n /**\n * Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getBucket(bucketId: string): Promise<Models.Bucket>;\n getBucket(\n paramsOrFirst: { bucketId: string } | string \n ): Promise<Models.Bucket> {\n let params: { bucketId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string \n };\n }\n \n const bucketId = params.bucketId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Update a storage bucket by its unique ID.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @param {string} params.name - Bucket name\n * @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} params.fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} params.enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.\n * @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.\n * @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @param {Compression} params.compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled\n * @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} params.transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n */\n updateBucket(params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean }): Promise<Models.Bucket>;\n /**\n * Update a storage bucket by its unique ID.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @param {string} name - Bucket name\n * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @param {boolean} enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.\n * @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.\n * @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.\n * @param {Compression} compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled\n * @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled\n * @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled\n * @param {boolean} transformations - Are image transformations enabled?\n * @throws {AppwriteException}\n * @returns {Promise<Models.Bucket>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean): Promise<Models.Bucket>;\n updateBucket(\n paramsOrFirst: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean } | string,\n ...rest: [(string)?, (string[])?, (boolean)?, (boolean)?, (number)?, (string[])?, (Compression)?, (boolean)?, (boolean)?, (boolean)?] \n ): Promise<Models.Bucket> {\n let params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n name: rest[0] as string,\n permissions: rest[1] as string[],\n fileSecurity: rest[2] as boolean,\n enabled: rest[3] as boolean,\n maximumFileSize: rest[4] as number,\n allowedFileExtensions: rest[5] as string[],\n compression: rest[6] as Compression,\n encryption: rest[7] as boolean,\n antivirus: rest[8] as boolean,\n transformations: rest[9] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const name = params.name;\n const permissions = params.permissions;\n const fileSecurity = params.fileSecurity;\n const enabled = params.enabled;\n const maximumFileSize = params.maximumFileSize;\n const allowedFileExtensions = params.allowedFileExtensions;\n const compression = params.compression;\n const encryption = params.encryption;\n const antivirus = params.antivirus;\n const transformations = params.transformations;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n if (typeof fileSecurity !== 'undefined') {\n payload['fileSecurity'] = fileSecurity;\n }\n if (typeof enabled !== 'undefined') {\n payload['enabled'] = enabled;\n }\n if (typeof maximumFileSize !== 'undefined') {\n payload['maximumFileSize'] = maximumFileSize;\n }\n if (typeof allowedFileExtensions !== 'undefined') {\n payload['allowedFileExtensions'] = allowedFileExtensions;\n }\n if (typeof compression !== 'undefined') {\n payload['compression'] = compression;\n }\n if (typeof encryption !== 'undefined') {\n payload['encryption'] = encryption;\n }\n if (typeof antivirus !== 'undefined') {\n payload['antivirus'] = antivirus;\n }\n if (typeof transformations !== 'undefined') {\n payload['transformations'] = transformations;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Delete a storage bucket by its unique ID.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteBucket(params: { bucketId: string }): Promise<{}>;\n /**\n * Delete a storage bucket by its unique ID.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deleteBucket(bucketId: string): Promise<{}>;\n deleteBucket(\n paramsOrFirst: { bucketId: string } | string \n ): Promise<{}> {\n let params: { bucketId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string \n };\n }\n \n const bucketId = params.bucketId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a list of all the user files. You can use the query params to filter your results.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded\n * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.FileList>}\n */\n listFiles(params: { bucketId: string, queries?: string[], search?: string, total?: boolean }): Promise<Models.FileList>;\n /**\n * Get a list of all the user files. You can use the query params to filter your results.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded\n * @param {string} search - Search term to filter your list results. Max length: 256 chars.\n * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.\n * @throws {AppwriteException}\n * @returns {Promise<Models.FileList>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n listFiles(bucketId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.FileList>;\n listFiles(\n paramsOrFirst: { bucketId: string, queries?: string[], search?: string, total?: boolean } | string,\n ...rest: [(string[])?, (string)?, (boolean)?] \n ): Promise<Models.FileList> {\n let params: { bucketId: string, queries?: string[], search?: string, total?: boolean };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, queries?: string[], search?: string, total?: boolean };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n queries: rest[0] as string[],\n search: rest[1] as string,\n total: rest[2] as boolean \n };\n }\n \n const bucketId = params.bucketId;\n const queries = params.queries;\n const search = params.search;\n const total = params.total;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof queries !== 'undefined') {\n payload['queries'] = queries;\n }\n if (typeof search !== 'undefined') {\n payload['search'] = search;\n }\n if (typeof total !== 'undefined') {\n payload['total'] = total;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.\n * \n * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n * \n * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n * \n * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n * \n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {File} params.file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).\n * @param {string[]} params.permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n createFile(params: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void }): Promise<Models.File>;\n /**\n * Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.\n * \n * Larger files should be uploaded using multiple requests with the [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range) header to send a partial request with a maximum supported chunk of `5MB`. The `content-range` header values should always be in bytes.\n * \n * When the first request is sent, the server will return the **File** object, and the subsequent part request must include the file's **id** in `x-appwrite-id` header to allow the server to know that the partial upload is for the existing file and not for a new one.\n * \n * If you're creating a new file using one of the Appwrite SDKs, all the chunking logic will be managed by the SDK internally.\n * \n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.\n * @param {File} file - Binary file. Appwrite SDKs provide helpers to handle file input. [Learn about file input](https://appwrite.io/docs/products/storage/upload-download#input-file).\n * @param {string[]} permissions - An array of permission strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n createFile(bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void): Promise<Models.File>;\n createFile(\n paramsOrFirst: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void } | string,\n ...rest: [(string)?, (File)?, (string[])?,((progress: UploadProgress) => void)?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string, file: File, permissions?: string[] };\n let onProgress: ((progress: UploadProgress) => void);\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, file: File, permissions?: string[] };\n onProgress = paramsOrFirst?.onProgress as ((progress: UploadProgress) => void);\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n file: rest[1] as File,\n permissions: rest[2] as string[] \n };\n onProgress = rest[3] as ((progress: UploadProgress) => void);\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const file = params.file;\n const permissions = params.permissions;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n if (typeof file === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"file\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files'.replace('{bucketId}', bucketId);\n const payload: Payload = {};\n if (typeof fileId !== 'undefined') {\n payload['fileId'] = fileId;\n }\n if (typeof file !== 'undefined') {\n payload['file'] = file;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'multipart/form-data',\n }\n\n return this.client.chunkedUpload(\n 'post',\n uri,\n apiHeaders,\n payload,\n onProgress\n );\n }\n\n /**\n * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n getFile(params: { bucketId: string, fileId: string }): Promise<Models.File>;\n /**\n * Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFile(bucketId: string, fileId: string): Promise<Models.File>;\n getFile(\n paramsOrFirst: { bucketId: string, fileId: string } | string,\n ...rest: [(string)?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Update a file by its unique ID. Only users with write permissions have access to update this resource.\n *\n * @param {string} params.bucketId - Bucket unique ID.\n * @param {string} params.fileId - File ID.\n * @param {string} params.name - File name.\n * @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n */\n updateFile(params: { bucketId: string, fileId: string, name?: string, permissions?: string[] }): Promise<Models.File>;\n /**\n * Update a file by its unique ID. Only users with write permissions have access to update this resource.\n *\n * @param {string} bucketId - Bucket unique ID.\n * @param {string} fileId - File ID.\n * @param {string} name - File name.\n * @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).\n * @throws {AppwriteException}\n * @returns {Promise<Models.File>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n updateFile(bucketId: string, fileId: string, name?: string, permissions?: string[]): Promise<Models.File>;\n updateFile(\n paramsOrFirst: { bucketId: string, fileId: string, name?: string, permissions?: string[] } | string,\n ...rest: [(string)?, (string)?, (string[])?] \n ): Promise<Models.File> {\n let params: { bucketId: string, fileId: string, name?: string, permissions?: string[] };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, name?: string, permissions?: string[] };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n name: rest[1] as string,\n permissions: rest[2] as string[] \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const name = params.name;\n const permissions = params.permissions;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof permissions !== 'undefined') {\n payload['permissions'] = permissions;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'put',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Delete a file by its unique ID. Only users with write permissions have access to delete this resource.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n deleteFile(params: { bucketId: string, fileId: string }): Promise<{}>;\n /**\n * Delete a file by its unique ID. Only users with write permissions have access to delete this resource.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n deleteFile(bucketId: string, fileId: string): Promise<{}>;\n deleteFile(\n paramsOrFirst: { bucketId: string, fileId: string } | string,\n ...rest: [(string)?] \n ): Promise<{}> {\n let params: { bucketId: string, fileId: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'delete',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.\n *\n * @param {string} params.bucketId - Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFileDownload(params: { bucketId: string, fileId: string, token?: string }): Promise<ArrayBuffer>;\n /**\n * Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.\n *\n * @param {string} bucketId - Storage bucket ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFileDownload(bucketId: string, fileId: string, token?: string): Promise<ArrayBuffer>;\n getFileDownload(\n paramsOrFirst: { bucketId: string, fileId: string, token?: string } | string,\n ...rest: [(string)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { bucketId: string, fileId: string, token?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, token?: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n token: rest[1] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID\n * @param {number} params.width - Resize preview image width, Pass an integer between 0 to 4000.\n * @param {number} params.height - Resize preview image height, Pass an integer between 0 to 4000.\n * @param {ImageGravity} params.gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right\n * @param {number} params.quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @param {number} params.borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.\n * @param {string} params.borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.\n * @param {number} params.borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.\n * @param {number} params.opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.\n * @param {number} params.rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.\n * @param {string} params.background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.\n * @param {ImageFormat} params.output - Output format type (jpeg, jpg, png, gif and webp).\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFilePreview(params: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string }): Promise<ArrayBuffer>;\n /**\n * Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID\n * @param {number} width - Resize preview image width, Pass an integer between 0 to 4000.\n * @param {number} height - Resize preview image height, Pass an integer between 0 to 4000.\n * @param {ImageGravity} gravity - Image crop gravity. Can be one of center,top-left,top,top-right,left,right,bottom-left,bottom,bottom-right\n * @param {number} quality - Preview image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.\n * @param {number} borderWidth - Preview image border in pixels. Pass an integer between 0 to 100. Defaults to 0.\n * @param {string} borderColor - Preview image border color. Use a valid HEX color, no # is needed for prefix.\n * @param {number} borderRadius - Preview image border radius in pixels. Pass an integer between 0 to 4000.\n * @param {number} opacity - Preview image opacity. Only works with images having an alpha channel (like png). Pass a number between 0 to 1.\n * @param {number} rotation - Preview image rotation in degrees. Pass an integer between -360 and 360.\n * @param {string} background - Preview image background color. Only works with transparent images (png). Use a valid HEX color, no # is needed for prefix.\n * @param {ImageFormat} output - Output format type (jpeg, jpg, png, gif and webp).\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFilePreview(bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string): Promise<ArrayBuffer>;\n getFilePreview(\n paramsOrFirst: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string } | string,\n ...rest: [(string)?, (number)?, (number)?, (ImageGravity)?, (number)?, (number)?, (string)?, (number)?, (number)?, (number)?, (string)?, (ImageFormat)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n width: rest[1] as number,\n height: rest[2] as number,\n gravity: rest[3] as ImageGravity,\n quality: rest[4] as number,\n borderWidth: rest[5] as number,\n borderColor: rest[6] as string,\n borderRadius: rest[7] as number,\n opacity: rest[8] as number,\n rotation: rest[9] as number,\n background: rest[10] as string,\n output: rest[11] as ImageFormat,\n token: rest[12] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const width = params.width;\n const height = params.height;\n const gravity = params.gravity;\n const quality = params.quality;\n const borderWidth = params.borderWidth;\n const borderColor = params.borderColor;\n const borderRadius = params.borderRadius;\n const opacity = params.opacity;\n const rotation = params.rotation;\n const background = params.background;\n const output = params.output;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/preview'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof width !== 'undefined') {\n payload['width'] = width;\n }\n if (typeof height !== 'undefined') {\n payload['height'] = height;\n }\n if (typeof gravity !== 'undefined') {\n payload['gravity'] = gravity;\n }\n if (typeof quality !== 'undefined') {\n payload['quality'] = quality;\n }\n if (typeof borderWidth !== 'undefined') {\n payload['borderWidth'] = borderWidth;\n }\n if (typeof borderColor !== 'undefined') {\n payload['borderColor'] = borderColor;\n }\n if (typeof borderRadius !== 'undefined') {\n payload['borderRadius'] = borderRadius;\n }\n if (typeof opacity !== 'undefined') {\n payload['opacity'] = opacity;\n }\n if (typeof rotation !== 'undefined') {\n payload['rotation'] = rotation;\n }\n if (typeof background !== 'undefined') {\n payload['background'] = background;\n }\n if (typeof output !== 'undefined') {\n payload['output'] = output;\n }\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n\n /**\n * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.\n *\n * @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} params.fileId - File ID.\n * @param {string} params.token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n */\n getFileView(params: { bucketId: string, fileId: string, token?: string }): Promise<ArrayBuffer>;\n /**\n * Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.\n *\n * @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).\n * @param {string} fileId - File ID.\n * @param {string} token - File token for accessing this file.\n * @throws {AppwriteException}\n * @returns {Promise<ArrayBuffer>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFileView(bucketId: string, fileId: string, token?: string): Promise<ArrayBuffer>;\n getFileView(\n paramsOrFirst: { bucketId: string, fileId: string, token?: string } | string,\n ...rest: [(string)?, (string)?] \n ): Promise<ArrayBuffer> {\n let params: { bucketId: string, fileId: string, token?: string };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { bucketId: string, fileId: string, token?: string };\n } else {\n params = {\n bucketId: paramsOrFirst as string,\n fileId: rest[0] as string,\n token: rest[1] as string \n };\n }\n \n const bucketId = params.bucketId;\n const fileId = params.fileId;\n const token = params.token;\n\n if (typeof bucketId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"bucketId\"');\n }\n if (typeof fileId === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"fileId\"');\n }\n\n const apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view'.replace('{bucketId}', bucketId).replace('{fileId}', fileId);\n const payload: Payload = {};\n if (typeof token !== 'undefined') {\n payload['token'] = token;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n 'arrayBuffer'\n );\n }\n}\n"]}
|
|
@@ -1032,6 +1032,7 @@ declare class TablesDB {
|
|
|
1032
1032
|
* @param {boolean} params.required - Is column required?
|
|
1033
1033
|
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
1034
1034
|
* @param {boolean} params.array - Is column an array?
|
|
1035
|
+
* @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1035
1036
|
* @throws {AppwriteException}
|
|
1036
1037
|
* @returns {Promise<Models.ColumnLongtext>}
|
|
1037
1038
|
*/
|
|
@@ -1042,6 +1043,7 @@ declare class TablesDB {
|
|
|
1042
1043
|
required: boolean;
|
|
1043
1044
|
xdefault?: string;
|
|
1044
1045
|
array?: boolean;
|
|
1046
|
+
encrypt?: boolean;
|
|
1045
1047
|
}): Promise<Models.ColumnLongtext>;
|
|
1046
1048
|
/**
|
|
1047
1049
|
* Create a longtext column.
|
|
@@ -1053,11 +1055,12 @@ declare class TablesDB {
|
|
|
1053
1055
|
* @param {boolean} required - Is column required?
|
|
1054
1056
|
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
1055
1057
|
* @param {boolean} array - Is column an array?
|
|
1058
|
+
* @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1056
1059
|
* @throws {AppwriteException}
|
|
1057
1060
|
* @returns {Promise<Models.ColumnLongtext>}
|
|
1058
1061
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1059
1062
|
*/
|
|
1060
|
-
createLongtextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnLongtext>;
|
|
1063
|
+
createLongtextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.ColumnLongtext>;
|
|
1061
1064
|
/**
|
|
1062
1065
|
* Update a longtext column. Changing the `default` value will not update already existing rows.
|
|
1063
1066
|
*
|
|
@@ -1104,6 +1107,7 @@ declare class TablesDB {
|
|
|
1104
1107
|
* @param {boolean} params.required - Is column required?
|
|
1105
1108
|
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
1106
1109
|
* @param {boolean} params.array - Is column an array?
|
|
1110
|
+
* @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1107
1111
|
* @throws {AppwriteException}
|
|
1108
1112
|
* @returns {Promise<Models.ColumnMediumtext>}
|
|
1109
1113
|
*/
|
|
@@ -1114,6 +1118,7 @@ declare class TablesDB {
|
|
|
1114
1118
|
required: boolean;
|
|
1115
1119
|
xdefault?: string;
|
|
1116
1120
|
array?: boolean;
|
|
1121
|
+
encrypt?: boolean;
|
|
1117
1122
|
}): Promise<Models.ColumnMediumtext>;
|
|
1118
1123
|
/**
|
|
1119
1124
|
* Create a mediumtext column.
|
|
@@ -1125,11 +1130,12 @@ declare class TablesDB {
|
|
|
1125
1130
|
* @param {boolean} required - Is column required?
|
|
1126
1131
|
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
1127
1132
|
* @param {boolean} array - Is column an array?
|
|
1133
|
+
* @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1128
1134
|
* @throws {AppwriteException}
|
|
1129
1135
|
* @returns {Promise<Models.ColumnMediumtext>}
|
|
1130
1136
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1131
1137
|
*/
|
|
1132
|
-
createMediumtextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnMediumtext>;
|
|
1138
|
+
createMediumtextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.ColumnMediumtext>;
|
|
1133
1139
|
/**
|
|
1134
1140
|
* Update a mediumtext column. Changing the `default` value will not update already existing rows.
|
|
1135
1141
|
*
|
|
@@ -1431,6 +1437,7 @@ declare class TablesDB {
|
|
|
1431
1437
|
* @param {boolean} params.required - Is column required?
|
|
1432
1438
|
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
1433
1439
|
* @param {boolean} params.array - Is column an array?
|
|
1440
|
+
* @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1434
1441
|
* @throws {AppwriteException}
|
|
1435
1442
|
* @returns {Promise<Models.ColumnText>}
|
|
1436
1443
|
*/
|
|
@@ -1441,6 +1448,7 @@ declare class TablesDB {
|
|
|
1441
1448
|
required: boolean;
|
|
1442
1449
|
xdefault?: string;
|
|
1443
1450
|
array?: boolean;
|
|
1451
|
+
encrypt?: boolean;
|
|
1444
1452
|
}): Promise<Models.ColumnText>;
|
|
1445
1453
|
/**
|
|
1446
1454
|
* Create a text column.
|
|
@@ -1452,11 +1460,12 @@ declare class TablesDB {
|
|
|
1452
1460
|
* @param {boolean} required - Is column required?
|
|
1453
1461
|
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
1454
1462
|
* @param {boolean} array - Is column an array?
|
|
1463
|
+
* @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1455
1464
|
* @throws {AppwriteException}
|
|
1456
1465
|
* @returns {Promise<Models.ColumnText>}
|
|
1457
1466
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1458
1467
|
*/
|
|
1459
|
-
createTextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnText>;
|
|
1468
|
+
createTextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.ColumnText>;
|
|
1460
1469
|
/**
|
|
1461
1470
|
* Update a text column. Changing the `default` value will not update already existing rows.
|
|
1462
1471
|
*
|
|
@@ -1576,6 +1585,7 @@ declare class TablesDB {
|
|
|
1576
1585
|
* @param {boolean} params.required - Is column required?
|
|
1577
1586
|
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
1578
1587
|
* @param {boolean} params.array - Is column an array?
|
|
1588
|
+
* @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1579
1589
|
* @throws {AppwriteException}
|
|
1580
1590
|
* @returns {Promise<Models.ColumnVarchar>}
|
|
1581
1591
|
*/
|
|
@@ -1587,6 +1597,7 @@ declare class TablesDB {
|
|
|
1587
1597
|
required: boolean;
|
|
1588
1598
|
xdefault?: string;
|
|
1589
1599
|
array?: boolean;
|
|
1600
|
+
encrypt?: boolean;
|
|
1590
1601
|
}): Promise<Models.ColumnVarchar>;
|
|
1591
1602
|
/**
|
|
1592
1603
|
* Create a varchar column.
|
|
@@ -1599,11 +1610,12 @@ declare class TablesDB {
|
|
|
1599
1610
|
* @param {boolean} required - Is column required?
|
|
1600
1611
|
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
1601
1612
|
* @param {boolean} array - Is column an array?
|
|
1613
|
+
* @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1602
1614
|
* @throws {AppwriteException}
|
|
1603
1615
|
* @returns {Promise<Models.ColumnVarchar>}
|
|
1604
1616
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1605
1617
|
*/
|
|
1606
|
-
createVarcharColumn(databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnVarchar>;
|
|
1618
|
+
createVarcharColumn(databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.ColumnVarchar>;
|
|
1607
1619
|
/**
|
|
1608
1620
|
* Update a varchar column. Changing the `default` value will not update already existing rows.
|
|
1609
1621
|
*
|
|
@@ -1032,6 +1032,7 @@ declare class TablesDB {
|
|
|
1032
1032
|
* @param {boolean} params.required - Is column required?
|
|
1033
1033
|
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
1034
1034
|
* @param {boolean} params.array - Is column an array?
|
|
1035
|
+
* @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1035
1036
|
* @throws {AppwriteException}
|
|
1036
1037
|
* @returns {Promise<Models.ColumnLongtext>}
|
|
1037
1038
|
*/
|
|
@@ -1042,6 +1043,7 @@ declare class TablesDB {
|
|
|
1042
1043
|
required: boolean;
|
|
1043
1044
|
xdefault?: string;
|
|
1044
1045
|
array?: boolean;
|
|
1046
|
+
encrypt?: boolean;
|
|
1045
1047
|
}): Promise<Models.ColumnLongtext>;
|
|
1046
1048
|
/**
|
|
1047
1049
|
* Create a longtext column.
|
|
@@ -1053,11 +1055,12 @@ declare class TablesDB {
|
|
|
1053
1055
|
* @param {boolean} required - Is column required?
|
|
1054
1056
|
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
1055
1057
|
* @param {boolean} array - Is column an array?
|
|
1058
|
+
* @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1056
1059
|
* @throws {AppwriteException}
|
|
1057
1060
|
* @returns {Promise<Models.ColumnLongtext>}
|
|
1058
1061
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1059
1062
|
*/
|
|
1060
|
-
createLongtextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnLongtext>;
|
|
1063
|
+
createLongtextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.ColumnLongtext>;
|
|
1061
1064
|
/**
|
|
1062
1065
|
* Update a longtext column. Changing the `default` value will not update already existing rows.
|
|
1063
1066
|
*
|
|
@@ -1104,6 +1107,7 @@ declare class TablesDB {
|
|
|
1104
1107
|
* @param {boolean} params.required - Is column required?
|
|
1105
1108
|
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
1106
1109
|
* @param {boolean} params.array - Is column an array?
|
|
1110
|
+
* @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1107
1111
|
* @throws {AppwriteException}
|
|
1108
1112
|
* @returns {Promise<Models.ColumnMediumtext>}
|
|
1109
1113
|
*/
|
|
@@ -1114,6 +1118,7 @@ declare class TablesDB {
|
|
|
1114
1118
|
required: boolean;
|
|
1115
1119
|
xdefault?: string;
|
|
1116
1120
|
array?: boolean;
|
|
1121
|
+
encrypt?: boolean;
|
|
1117
1122
|
}): Promise<Models.ColumnMediumtext>;
|
|
1118
1123
|
/**
|
|
1119
1124
|
* Create a mediumtext column.
|
|
@@ -1125,11 +1130,12 @@ declare class TablesDB {
|
|
|
1125
1130
|
* @param {boolean} required - Is column required?
|
|
1126
1131
|
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
1127
1132
|
* @param {boolean} array - Is column an array?
|
|
1133
|
+
* @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1128
1134
|
* @throws {AppwriteException}
|
|
1129
1135
|
* @returns {Promise<Models.ColumnMediumtext>}
|
|
1130
1136
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1131
1137
|
*/
|
|
1132
|
-
createMediumtextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnMediumtext>;
|
|
1138
|
+
createMediumtextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.ColumnMediumtext>;
|
|
1133
1139
|
/**
|
|
1134
1140
|
* Update a mediumtext column. Changing the `default` value will not update already existing rows.
|
|
1135
1141
|
*
|
|
@@ -1431,6 +1437,7 @@ declare class TablesDB {
|
|
|
1431
1437
|
* @param {boolean} params.required - Is column required?
|
|
1432
1438
|
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
1433
1439
|
* @param {boolean} params.array - Is column an array?
|
|
1440
|
+
* @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1434
1441
|
* @throws {AppwriteException}
|
|
1435
1442
|
* @returns {Promise<Models.ColumnText>}
|
|
1436
1443
|
*/
|
|
@@ -1441,6 +1448,7 @@ declare class TablesDB {
|
|
|
1441
1448
|
required: boolean;
|
|
1442
1449
|
xdefault?: string;
|
|
1443
1450
|
array?: boolean;
|
|
1451
|
+
encrypt?: boolean;
|
|
1444
1452
|
}): Promise<Models.ColumnText>;
|
|
1445
1453
|
/**
|
|
1446
1454
|
* Create a text column.
|
|
@@ -1452,11 +1460,12 @@ declare class TablesDB {
|
|
|
1452
1460
|
* @param {boolean} required - Is column required?
|
|
1453
1461
|
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
1454
1462
|
* @param {boolean} array - Is column an array?
|
|
1463
|
+
* @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1455
1464
|
* @throws {AppwriteException}
|
|
1456
1465
|
* @returns {Promise<Models.ColumnText>}
|
|
1457
1466
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1458
1467
|
*/
|
|
1459
|
-
createTextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnText>;
|
|
1468
|
+
createTextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.ColumnText>;
|
|
1460
1469
|
/**
|
|
1461
1470
|
* Update a text column. Changing the `default` value will not update already existing rows.
|
|
1462
1471
|
*
|
|
@@ -1576,6 +1585,7 @@ declare class TablesDB {
|
|
|
1576
1585
|
* @param {boolean} params.required - Is column required?
|
|
1577
1586
|
* @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
1578
1587
|
* @param {boolean} params.array - Is column an array?
|
|
1588
|
+
* @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1579
1589
|
* @throws {AppwriteException}
|
|
1580
1590
|
* @returns {Promise<Models.ColumnVarchar>}
|
|
1581
1591
|
*/
|
|
@@ -1587,6 +1597,7 @@ declare class TablesDB {
|
|
|
1587
1597
|
required: boolean;
|
|
1588
1598
|
xdefault?: string;
|
|
1589
1599
|
array?: boolean;
|
|
1600
|
+
encrypt?: boolean;
|
|
1590
1601
|
}): Promise<Models.ColumnVarchar>;
|
|
1591
1602
|
/**
|
|
1592
1603
|
* Create a varchar column.
|
|
@@ -1599,11 +1610,12 @@ declare class TablesDB {
|
|
|
1599
1610
|
* @param {boolean} required - Is column required?
|
|
1600
1611
|
* @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
|
|
1601
1612
|
* @param {boolean} array - Is column an array?
|
|
1613
|
+
* @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
|
|
1602
1614
|
* @throws {AppwriteException}
|
|
1603
1615
|
* @returns {Promise<Models.ColumnVarchar>}
|
|
1604
1616
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1605
1617
|
*/
|
|
1606
|
-
createVarcharColumn(databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnVarchar>;
|
|
1618
|
+
createVarcharColumn(databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.ColumnVarchar>;
|
|
1607
1619
|
/**
|
|
1608
1620
|
* Update a varchar column. Changing the `default` value will not update already existing rows.
|
|
1609
1621
|
*
|