import { Client } from '../client.mjs'; import { Models } from '../models.mjs'; import 'undici'; 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-resource-type.mjs'; import '../enums/execution-trigger.mjs'; import '../enums/execution-status.mjs'; import '../enums/project-auth-method-id.mjs'; import '../enums/project-service-id.mjs'; import '../enums/project-protocol-id.mjs'; import '../enums/o-auth-2-google-prompt.mjs'; import '../enums/o-auth-2-oidc-prompt.mjs'; import '../enums/platform-type.mjs'; import '../enums/proxy-rule-deployment-resource-type.mjs'; import '../enums/proxy-rule-status.mjs'; import '../enums/message-status.mjs'; import '../enums/billing-plan-group.mjs'; declare class Presences { client: Client; constructor(client: Client); /** * List presence logs. Expired entries are filtered out automatically. * * * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated. * @param {number} params.ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours). * @throws {AppwriteException} * @returns {Promise} */ list(params?: { queries?: string[]; total?: boolean; ttl?: number; }): Promise; /** * List presence logs. Expired entries are filtered out automatically. * * * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated. * @param {number} ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours). * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ list(queries?: string[], total?: boolean, ttl?: number): Promise; /** * Get a presence log by its unique ID. Entries whose `expiresAt` is in the past are treated as not found. * * * @param {string} params.presenceId - Presence unique ID. * @throws {AppwriteException} * @returns {Promise} */ get(params: { presenceId: string; }): Promise; /** * Get a presence log by its unique ID. Entries whose `expiresAt` is in the past are treated as not found. * * * @param {string} presenceId - Presence unique ID. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ get(presenceId: string): Promise; /** * Create or update a presence log by its user ID. * * * @param {string} params.presenceId - Presence unique ID. * @param {string} params.userId - User ID. * @param {string} params.status - Presence status. * @param {string[]} params.permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @param {string} params.expiresAt - Presence expiry datetime. * @param {object} params.metadata - Presence metadata object. * @throws {AppwriteException} * @returns {Promise} */ upsert(params: { presenceId: string; userId: string; status: string; permissions?: string[]; expiresAt?: string; metadata?: object; }): Promise; /** * Create or update a presence log by its user ID. * * * @param {string} presenceId - Presence unique ID. * @param {string} userId - User ID. * @param {string} status - Presence status. * @param {string[]} permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @param {string} expiresAt - Presence expiry datetime. * @param {object} metadata - Presence metadata object. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ upsert(presenceId: string, userId: string, status: string, permissions?: string[], expiresAt?: string, metadata?: object): Promise; /** * Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated. * * * @param {string} params.presenceId - Presence unique ID. * @param {string} params.userId - User ID. * @param {string} params.status - Presence status. * @param {string} params.expiresAt - Presence expiry datetime. * @param {object} params.metadata - Presence metadata object. * @param {string[]} params.permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @param {boolean} params.purge - When true, purge cached responses used by list presences endpoint. * @throws {AppwriteException} * @returns {Promise} */ update(params: { presenceId: string; userId: string; status?: string; expiresAt?: string; metadata?: object; permissions?: string[]; purge?: boolean; }): Promise; /** * Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated. * * * @param {string} presenceId - Presence unique ID. * @param {string} userId - User ID. * @param {string} status - Presence status. * @param {string} expiresAt - Presence expiry datetime. * @param {object} metadata - Presence metadata object. * @param {string[]} permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions). * @param {boolean} purge - When true, purge cached responses used by list presences endpoint. * @throws {AppwriteException} * @returns {Promise} * @deprecated Use the object parameter style method for a better developer experience. */ update(presenceId: string, userId: string, status?: string, expiresAt?: string, metadata?: object, permissions?: string[], purge?: boolean): Promise; /** * Delete a presence log by its unique ID. * * * @param {string} params.presenceId - Presence unique ID. * @throws {AppwriteException} * @returns {Promise<{}>} */ delete(params: { presenceId: string; }): Promise<{}>; /** * Delete a presence log by its unique ID. * * * @param {string} presenceId - Presence unique ID. * @throws {AppwriteException} * @returns {Promise<{}>} * @deprecated Use the object parameter style method for a better developer experience. */ delete(presenceId: string): Promise<{}>; } export { Presences };