import { Client } from '../client.mjs'; import { Models } from '../models.mjs'; import '../query.mjs'; import '../enums/database-type.mjs'; import '../enums/attribute-status.mjs'; import '../enums/column-status.mjs'; import '../enums/index-status.mjs'; import '../enums/deployment-status.mjs'; import '../enums/execution-trigger.mjs'; import '../enums/execution-status.mjs'; import '../enums/health-antivirus-status.mjs'; import '../enums/health-check-status.mjs'; import '../enums/message-status.mjs'; declare class Tokens { client: Client; constructor(client: Client); /** * List all the tokens created for a specific file or bucket. You can use the query params to filter your results. * * @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). * @param {string} params.fileId - File unique ID. * @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: expire * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} */ list(params: { bucketId: string; fileId: string; queries?: string[]; total?: boolean; }): Promise; /** * List all the tokens created for a specific file or bucket. You can use the query params to filter your results. * * @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). * @param {string} fileId - File unique ID. * @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: expire * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ list(bucketId: string, fileId: string, queries?: string[], total?: boolean): Promise; /** * Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter. * * @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). * @param {string} params.fileId - File unique ID. * @param {string} params.expire - Token expiry date * @throws {AppwriteException} * @returns {Promise} */ createFileToken(params: { bucketId: string; fileId: string; expire?: string; }): Promise; /** * Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter. * * @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). * @param {string} fileId - File unique ID. * @param {string} expire - Token expiry date * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ createFileToken(bucketId: string, fileId: string, expire?: string): Promise; /** * Get a token by its unique ID. * * @param {string} params.tokenId - Token ID. * @throws {AppwriteException} * @returns {Promise} */ get(params: { tokenId: string; }): Promise; /** * Get a token by its unique ID. * * @param {string} tokenId - Token ID. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ get(tokenId: string): Promise; /** * Update a token by its unique ID. Use this endpoint to update a token's expiry date. * * @param {string} params.tokenId - Token unique ID. * @param {string} params.expire - File token expiry date * @throws {AppwriteException} * @returns {Promise} */ update(params: { tokenId: string; expire?: string; }): Promise; /** * Update a token by its unique ID. Use this endpoint to update a token's expiry date. * * @param {string} tokenId - Token unique ID. * @param {string} expire - File token expiry date * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ update(tokenId: string, expire?: string): Promise; /** * Delete a token by its unique ID. * * @param {string} params.tokenId - Token ID. * @throws {AppwriteException} * @returns {Promise<{}>} */ delete(params: { tokenId: string; }): Promise<{}>; /** * Delete a token by its unique ID. * * @param {string} tokenId - Token ID. * @throws {AppwriteException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ delete(tokenId: string): Promise<{}>; } export { Tokens };