node-appwrite
Version:
Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API
854 lines (853 loc) • 112 kB
text/typescript
import { Client } from '../client.mjs';
import { Models } from '../models.mjs';
import { MessagePriority } from '../enums/message-priority.mjs';
import { SmtpEncryption } from '../enums/smtp-encryption.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 Messaging {
client: Client;
constructor(client: Client);
/**
* Get a list of all messages from the current Appwrite project.
*
* @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: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise<Models.MessageList>}
*/
listMessages(params?: {
queries?: string[];
search?: string;
total?: boolean;
}): Promise<Models.MessageList>;
/**
* Get a list of all messages from the current Appwrite project.
*
* @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: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise<Models.MessageList>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
listMessages(queries?: string[], search?: string, total?: boolean): Promise<Models.MessageList>;
/**
* Create a new email message.
*
* @param {string} params.messageId - Message 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.
* @param {string} params.subject - Email Subject.
* @param {string} params.content - Email Content.
* @param {string[]} params.topics - List of Topic IDs.
* @param {string[]} params.users - List of User IDs.
* @param {string[]} params.targets - List of Targets IDs.
* @param {string[]} params.cc - Array of target IDs to be added as CC.
* @param {string[]} params.bcc - Array of target IDs to be added as BCC.
* @param {string[]} params.attachments - Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
* @param {boolean} params.draft - Is message a draft
* @param {boolean} params.html - Is content of type HTML
* @param {string} params.scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
*/
createEmail(params: {
messageId: string;
subject: string;
content: string;
topics?: string[];
users?: string[];
targets?: string[];
cc?: string[];
bcc?: string[];
attachments?: string[];
draft?: boolean;
html?: boolean;
scheduledAt?: string;
}): Promise<Models.Message>;
/**
* Create a new email message.
*
* @param {string} messageId - Message 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.
* @param {string} subject - Email Subject.
* @param {string} content - Email Content.
* @param {string[]} topics - List of Topic IDs.
* @param {string[]} users - List of User IDs.
* @param {string[]} targets - List of Targets IDs.
* @param {string[]} cc - Array of target IDs to be added as CC.
* @param {string[]} bcc - Array of target IDs to be added as BCC.
* @param {string[]} attachments - Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
* @param {boolean} draft - Is message a draft
* @param {boolean} html - Is content of type HTML
* @param {string} scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
createEmail(messageId: string, subject: string, content: string, topics?: string[], users?: string[], targets?: string[], cc?: string[], bcc?: string[], attachments?: string[], draft?: boolean, html?: boolean, scheduledAt?: string): Promise<Models.Message>;
/**
* Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
*
*
* @param {string} params.messageId - Message ID.
* @param {string[]} params.topics - List of Topic IDs.
* @param {string[]} params.users - List of User IDs.
* @param {string[]} params.targets - List of Targets IDs.
* @param {string} params.subject - Email Subject.
* @param {string} params.content - Email Content.
* @param {boolean} params.draft - Is message a draft
* @param {boolean} params.html - Is content of type HTML
* @param {string[]} params.cc - Array of target IDs to be added as CC.
* @param {string[]} params.bcc - Array of target IDs to be added as BCC.
* @param {string} params.scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
* @param {string[]} params.attachments - Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
*/
updateEmail(params: {
messageId: string;
topics?: string[];
users?: string[];
targets?: string[];
subject?: string;
content?: string;
draft?: boolean;
html?: boolean;
cc?: string[];
bcc?: string[];
scheduledAt?: string;
attachments?: string[];
}): Promise<Models.Message>;
/**
* Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
*
*
* @param {string} messageId - Message ID.
* @param {string[]} topics - List of Topic IDs.
* @param {string[]} users - List of User IDs.
* @param {string[]} targets - List of Targets IDs.
* @param {string} subject - Email Subject.
* @param {string} content - Email Content.
* @param {boolean} draft - Is message a draft
* @param {boolean} html - Is content of type HTML
* @param {string[]} cc - Array of target IDs to be added as CC.
* @param {string[]} bcc - Array of target IDs to be added as BCC.
* @param {string} scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
* @param {string[]} attachments - Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
updateEmail(messageId: string, topics?: string[], users?: string[], targets?: string[], subject?: string, content?: string, draft?: boolean, html?: boolean, cc?: string[], bcc?: string[], scheduledAt?: string, attachments?: string[]): Promise<Models.Message>;
/**
* Create a new push notification.
*
* @param {string} params.messageId - Message 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.
* @param {string} params.title - Title for push notification.
* @param {string} params.body - Body for push notification.
* @param {string[]} params.topics - List of Topic IDs.
* @param {string[]} params.users - List of User IDs.
* @param {string[]} params.targets - List of Targets IDs.
* @param {object} params.data - Additional key-value pair data for push notification.
* @param {string} params.action - Action for push notification.
* @param {string} params.image - Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.
* @param {string} params.icon - Icon for push notification. Available only for Android and Web Platform.
* @param {string} params.sound - Sound for push notification. Available only for Android and iOS Platform.
* @param {string} params.color - Color for push notification. Available only for Android Platform.
* @param {string} params.tag - Tag for push notification. Available only for Android Platform.
* @param {number} params.badge - Badge for push notification. Available only for iOS Platform.
* @param {boolean} params.draft - Is message a draft
* @param {string} params.scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
* @param {boolean} params.contentAvailable - If set to true, the notification will be delivered in the background. Available only for iOS Platform.
* @param {boolean} params.critical - If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.
* @param {MessagePriority} params.priority - Set the notification priority. "normal" will consider device state and may not deliver notifications immediately. "high" will always attempt to immediately deliver the notification.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
*/
createPush(params: {
messageId: string;
title?: string;
body?: string;
topics?: string[];
users?: string[];
targets?: string[];
data?: object;
action?: string;
image?: string;
icon?: string;
sound?: string;
color?: string;
tag?: string;
badge?: number;
draft?: boolean;
scheduledAt?: string;
contentAvailable?: boolean;
critical?: boolean;
priority?: MessagePriority;
}): Promise<Models.Message>;
/**
* Create a new push notification.
*
* @param {string} messageId - Message 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.
* @param {string} title - Title for push notification.
* @param {string} body - Body for push notification.
* @param {string[]} topics - List of Topic IDs.
* @param {string[]} users - List of User IDs.
* @param {string[]} targets - List of Targets IDs.
* @param {object} data - Additional key-value pair data for push notification.
* @param {string} action - Action for push notification.
* @param {string} image - Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.
* @param {string} icon - Icon for push notification. Available only for Android and Web Platform.
* @param {string} sound - Sound for push notification. Available only for Android and iOS Platform.
* @param {string} color - Color for push notification. Available only for Android Platform.
* @param {string} tag - Tag for push notification. Available only for Android Platform.
* @param {number} badge - Badge for push notification. Available only for iOS Platform.
* @param {boolean} draft - Is message a draft
* @param {string} scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
* @param {boolean} contentAvailable - If set to true, the notification will be delivered in the background. Available only for iOS Platform.
* @param {boolean} critical - If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.
* @param {MessagePriority} priority - Set the notification priority. "normal" will consider device state and may not deliver notifications immediately. "high" will always attempt to immediately deliver the notification.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
createPush(messageId: string, title?: string, body?: string, topics?: string[], users?: string[], targets?: string[], data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string, contentAvailable?: boolean, critical?: boolean, priority?: MessagePriority): Promise<Models.Message>;
/**
* Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
*
*
* @param {string} params.messageId - Message ID.
* @param {string[]} params.topics - List of Topic IDs.
* @param {string[]} params.users - List of User IDs.
* @param {string[]} params.targets - List of Targets IDs.
* @param {string} params.title - Title for push notification.
* @param {string} params.body - Body for push notification.
* @param {object} params.data - Additional Data for push notification.
* @param {string} params.action - Action for push notification.
* @param {string} params.image - Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.
* @param {string} params.icon - Icon for push notification. Available only for Android and Web platforms.
* @param {string} params.sound - Sound for push notification. Available only for Android and iOS platforms.
* @param {string} params.color - Color for push notification. Available only for Android platforms.
* @param {string} params.tag - Tag for push notification. Available only for Android platforms.
* @param {number} params.badge - Badge for push notification. Available only for iOS platforms.
* @param {boolean} params.draft - Is message a draft
* @param {string} params.scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
* @param {boolean} params.contentAvailable - If set to true, the notification will be delivered in the background. Available only for iOS Platform.
* @param {boolean} params.critical - If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.
* @param {MessagePriority} params.priority - Set the notification priority. "normal" will consider device battery state and may send notifications later. "high" will always attempt to immediately deliver the notification.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
*/
updatePush(params: {
messageId: string;
topics?: string[];
users?: string[];
targets?: string[];
title?: string;
body?: string;
data?: object;
action?: string;
image?: string;
icon?: string;
sound?: string;
color?: string;
tag?: string;
badge?: number;
draft?: boolean;
scheduledAt?: string;
contentAvailable?: boolean;
critical?: boolean;
priority?: MessagePriority;
}): Promise<Models.Message>;
/**
* Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
*
*
* @param {string} messageId - Message ID.
* @param {string[]} topics - List of Topic IDs.
* @param {string[]} users - List of User IDs.
* @param {string[]} targets - List of Targets IDs.
* @param {string} title - Title for push notification.
* @param {string} body - Body for push notification.
* @param {object} data - Additional Data for push notification.
* @param {string} action - Action for push notification.
* @param {string} image - Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.
* @param {string} icon - Icon for push notification. Available only for Android and Web platforms.
* @param {string} sound - Sound for push notification. Available only for Android and iOS platforms.
* @param {string} color - Color for push notification. Available only for Android platforms.
* @param {string} tag - Tag for push notification. Available only for Android platforms.
* @param {number} badge - Badge for push notification. Available only for iOS platforms.
* @param {boolean} draft - Is message a draft
* @param {string} scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
* @param {boolean} contentAvailable - If set to true, the notification will be delivered in the background. Available only for iOS Platform.
* @param {boolean} critical - If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.
* @param {MessagePriority} priority - Set the notification priority. "normal" will consider device battery state and may send notifications later. "high" will always attempt to immediately deliver the notification.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
updatePush(messageId: string, topics?: string[], users?: string[], targets?: string[], title?: string, body?: string, data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string, contentAvailable?: boolean, critical?: boolean, priority?: MessagePriority): Promise<Models.Message>;
/**
* Create a new SMS message.
*
* @param {string} params.messageId - Message 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.
* @param {string} params.content - SMS Content.
* @param {string[]} params.topics - List of Topic IDs.
* @param {string[]} params.users - List of User IDs.
* @param {string[]} params.targets - List of Targets IDs.
* @param {boolean} params.draft - Is message a draft
* @param {string} params.scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
* @deprecated This API has been deprecated since 1.8.0. Please use `Messaging.createSMS` instead.
*/
createSms(params: {
messageId: string;
content: string;
topics?: string[];
users?: string[];
targets?: string[];
draft?: boolean;
scheduledAt?: string;
}): Promise<Models.Message>;
/**
* Create a new SMS message.
*
* @param {string} messageId - Message 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.
* @param {string} content - SMS Content.
* @param {string[]} topics - List of Topic IDs.
* @param {string[]} users - List of User IDs.
* @param {string[]} targets - List of Targets IDs.
* @param {boolean} draft - Is message a draft
* @param {string} scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
createSms(messageId: string, content: string, topics?: string[], users?: string[], targets?: string[], draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
/**
* Create a new SMS message.
*
* @param {string} params.messageId - Message 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.
* @param {string} params.content - SMS Content.
* @param {string[]} params.topics - List of Topic IDs.
* @param {string[]} params.users - List of User IDs.
* @param {string[]} params.targets - List of Targets IDs.
* @param {boolean} params.draft - Is message a draft
* @param {string} params.scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
*/
createSMS(params: {
messageId: string;
content: string;
topics?: string[];
users?: string[];
targets?: string[];
draft?: boolean;
scheduledAt?: string;
}): Promise<Models.Message>;
/**
* Create a new SMS message.
*
* @param {string} messageId - Message 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.
* @param {string} content - SMS Content.
* @param {string[]} topics - List of Topic IDs.
* @param {string[]} users - List of User IDs.
* @param {string[]} targets - List of Targets IDs.
* @param {boolean} draft - Is message a draft
* @param {string} scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
createSMS(messageId: string, content: string, topics?: string[], users?: string[], targets?: string[], draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
/**
* Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
*
*
* @param {string} params.messageId - Message ID.
* @param {string[]} params.topics - List of Topic IDs.
* @param {string[]} params.users - List of User IDs.
* @param {string[]} params.targets - List of Targets IDs.
* @param {string} params.content - Email Content.
* @param {boolean} params.draft - Is message a draft
* @param {string} params.scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
* @deprecated This API has been deprecated since 1.8.0. Please use `Messaging.updateSMS` instead.
*/
updateSms(params: {
messageId: string;
topics?: string[];
users?: string[];
targets?: string[];
content?: string;
draft?: boolean;
scheduledAt?: string;
}): Promise<Models.Message>;
/**
* Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
*
*
* @param {string} messageId - Message ID.
* @param {string[]} topics - List of Topic IDs.
* @param {string[]} users - List of User IDs.
* @param {string[]} targets - List of Targets IDs.
* @param {string} content - Email Content.
* @param {boolean} draft - Is message a draft
* @param {string} scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
updateSms(messageId: string, topics?: string[], users?: string[], targets?: string[], content?: string, draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
/**
* Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
*
*
* @param {string} params.messageId - Message ID.
* @param {string[]} params.topics - List of Topic IDs.
* @param {string[]} params.users - List of User IDs.
* @param {string[]} params.targets - List of Targets IDs.
* @param {string} params.content - Email Content.
* @param {boolean} params.draft - Is message a draft
* @param {string} params.scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
*/
updateSMS(params: {
messageId: string;
topics?: string[];
users?: string[];
targets?: string[];
content?: string;
draft?: boolean;
scheduledAt?: string;
}): Promise<Models.Message>;
/**
* Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.
*
*
* @param {string} messageId - Message ID.
* @param {string[]} topics - List of Topic IDs.
* @param {string[]} users - List of User IDs.
* @param {string[]} targets - List of Targets IDs.
* @param {string} content - Email Content.
* @param {boolean} draft - Is message a draft
* @param {string} scheduledAt - Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
updateSMS(messageId: string, topics?: string[], users?: string[], targets?: string[], content?: string, draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
/**
* Get a message by its unique ID.
*
*
* @param {string} params.messageId - Message ID.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
*/
getMessage(params: {
messageId: string;
}): Promise<Models.Message>;
/**
* Get a message by its unique ID.
*
*
* @param {string} messageId - Message ID.
* @throws {AppwriteException}
* @returns {Promise<Models.Message>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
getMessage(messageId: string): Promise<Models.Message>;
/**
* Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.
*
* @param {string} params.messageId - Message ID.
* @throws {AppwriteException}
* @returns {Promise<{}>}
*/
delete(params: {
messageId: string;
}): Promise<{}>;
/**
* Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.
*
* @param {string} messageId - Message ID.
* @throws {AppwriteException}
* @returns {Promise<{}>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
delete(messageId: string): Promise<{}>;
/**
* Get the message activity logs listed by its unique ID.
*
* @param {string} params.messageId - Message 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). Only supported methods are limit and offset
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise<Models.LogList>}
*/
listMessageLogs(params: {
messageId: string;
queries?: string[];
total?: boolean;
}): Promise<Models.LogList>;
/**
* Get the message activity logs listed by its unique ID.
*
* @param {string} messageId - Message 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). Only supported methods are limit and offset
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise<Models.LogList>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
listMessageLogs(messageId: string, queries?: string[], total?: boolean): Promise<Models.LogList>;
/**
* Get a list of the targets associated with a message.
*
* @param {string} params.messageId - Message 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: userId, providerId, identifier, providerType
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise<Models.TargetList>}
*/
listTargets(params: {
messageId: string;
queries?: string[];
total?: boolean;
}): Promise<Models.TargetList>;
/**
* Get a list of the targets associated with a message.
*
* @param {string} messageId - Message 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: userId, providerId, identifier, providerType
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise<Models.TargetList>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
listTargets(messageId: string, queries?: string[], total?: boolean): Promise<Models.TargetList>;
/**
* Get a list of all providers from the current Appwrite project.
*
* @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, provider, type, enabled
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise<Models.ProviderList>}
*/
listProviders(params?: {
queries?: string[];
search?: string;
total?: boolean;
}): Promise<Models.ProviderList>;
/**
* Get a list of all providers from the current Appwrite project.
*
* @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, provider, type, enabled
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
* @returns {Promise<Models.ProviderList>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
listProviders(queries?: string[], search?: string, total?: boolean): Promise<Models.ProviderList>;
/**
* Create a new Apple Push Notification service provider.
*
* @param {string} params.providerId - Provider 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.
* @param {string} params.name - Provider name.
* @param {string} params.authKey - APNS authentication key.
* @param {string} params.authKeyId - APNS authentication key ID.
* @param {string} params.teamId - APNS team ID.
* @param {string} params.bundleId - APNS bundle ID.
* @param {boolean} params.sandbox - Use APNS sandbox environment.
* @param {boolean} params.enabled - Set as enabled.
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
* @deprecated This API has been deprecated since 1.8.0. Please use `Messaging.createAPNSProvider` instead.
*/
createApnsProvider(params: {
providerId: string;
name: string;
authKey?: string;
authKeyId?: string;
teamId?: string;
bundleId?: string;
sandbox?: boolean;
enabled?: boolean;
}): Promise<Models.Provider>;
/**
* Create a new Apple Push Notification service provider.
*
* @param {string} providerId - Provider 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.
* @param {string} name - Provider name.
* @param {string} authKey - APNS authentication key.
* @param {string} authKeyId - APNS authentication key ID.
* @param {string} teamId - APNS team ID.
* @param {string} bundleId - APNS bundle ID.
* @param {boolean} sandbox - Use APNS sandbox environment.
* @param {boolean} enabled - Set as enabled.
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
createApnsProvider(providerId: string, name: string, authKey?: string, authKeyId?: string, teamId?: string, bundleId?: string, sandbox?: boolean, enabled?: boolean): Promise<Models.Provider>;
/**
* Create a new Apple Push Notification service provider.
*
* @param {string} params.providerId - Provider 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.
* @param {string} params.name - Provider name.
* @param {string} params.authKey - APNS authentication key.
* @param {string} params.authKeyId - APNS authentication key ID.
* @param {string} params.teamId - APNS team ID.
* @param {string} params.bundleId - APNS bundle ID.
* @param {boolean} params.sandbox - Use APNS sandbox environment.
* @param {boolean} params.enabled - Set as enabled.
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
*/
createAPNSProvider(params: {
providerId: string;
name: string;
authKey?: string;
authKeyId?: string;
teamId?: string;
bundleId?: string;
sandbox?: boolean;
enabled?: boolean;
}): Promise<Models.Provider>;
/**
* Create a new Apple Push Notification service provider.
*
* @param {string} providerId - Provider 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.
* @param {string} name - Provider name.
* @param {string} authKey - APNS authentication key.
* @param {string} authKeyId - APNS authentication key ID.
* @param {string} teamId - APNS team ID.
* @param {string} bundleId - APNS bundle ID.
* @param {boolean} sandbox - Use APNS sandbox environment.
* @param {boolean} enabled - Set as enabled.
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
createAPNSProvider(providerId: string, name: string, authKey?: string, authKeyId?: string, teamId?: string, bundleId?: string, sandbox?: boolean, enabled?: boolean): Promise<Models.Provider>;
/**
* Update a Apple Push Notification service provider by its unique ID.
*
* @param {string} params.providerId - Provider ID.
* @param {string} params.name - Provider name.
* @param {boolean} params.enabled - Set as enabled.
* @param {string} params.authKey - APNS authentication key.
* @param {string} params.authKeyId - APNS authentication key ID.
* @param {string} params.teamId - APNS team ID.
* @param {string} params.bundleId - APNS bundle ID.
* @param {boolean} params.sandbox - Use APNS sandbox environment.
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
* @deprecated This API has been deprecated since 1.8.0. Please use `Messaging.updateAPNSProvider` instead.
*/
updateApnsProvider(params: {
providerId: string;
name?: string;
enabled?: boolean;
authKey?: string;
authKeyId?: string;
teamId?: string;
bundleId?: string;
sandbox?: boolean;
}): Promise<Models.Provider>;
/**
* Update a Apple Push Notification service provider by its unique ID.
*
* @param {string} providerId - Provider ID.
* @param {string} name - Provider name.
* @param {boolean} enabled - Set as enabled.
* @param {string} authKey - APNS authentication key.
* @param {string} authKeyId - APNS authentication key ID.
* @param {string} teamId - APNS team ID.
* @param {string} bundleId - APNS bundle ID.
* @param {boolean} sandbox - Use APNS sandbox environment.
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
updateApnsProvider(providerId: string, name?: string, enabled?: boolean, authKey?: string, authKeyId?: string, teamId?: string, bundleId?: string, sandbox?: boolean): Promise<Models.Provider>;
/**
* Update a Apple Push Notification service provider by its unique ID.
*
* @param {string} params.providerId - Provider ID.
* @param {string} params.name - Provider name.
* @param {boolean} params.enabled - Set as enabled.
* @param {string} params.authKey - APNS authentication key.
* @param {string} params.authKeyId - APNS authentication key ID.
* @param {string} params.teamId - APNS team ID.
* @param {string} params.bundleId - APNS bundle ID.
* @param {boolean} params.sandbox - Use APNS sandbox environment.
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
*/
updateAPNSProvider(params: {
providerId: string;
name?: string;
enabled?: boolean;
authKey?: string;
authKeyId?: string;
teamId?: string;
bundleId?: string;
sandbox?: boolean;
}): Promise<Models.Provider>;
/**
* Update a Apple Push Notification service provider by its unique ID.
*
* @param {string} providerId - Provider ID.
* @param {string} name - Provider name.
* @param {boolean} enabled - Set as enabled.
* @param {string} authKey - APNS authentication key.
* @param {string} authKeyId - APNS authentication key ID.
* @param {string} teamId - APNS team ID.
* @param {string} bundleId - APNS bundle ID.
* @param {boolean} sandbox - Use APNS sandbox environment.
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
updateAPNSProvider(providerId: string, name?: string, enabled?: boolean, authKey?: string, authKeyId?: string, teamId?: string, bundleId?: string, sandbox?: boolean): Promise<Models.Provider>;
/**
* Create a new Firebase Cloud Messaging provider.
*
* @param {string} params.providerId - Provider 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.
* @param {string} params.name - Provider name.
* @param {object} params.serviceAccountJSON - FCM service account JSON.
* @param {boolean} params.enabled - Set as enabled.
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
* @deprecated This API has been deprecated since 1.8.0. Please use `Messaging.createFCMProvider` instead.
*/
createFcmProvider(params: {
providerId: string;
name: string;
serviceAccountJSON?: object;
enabled?: boolean;
}): Promise<Models.Provider>;
/**
* Create a new Firebase Cloud Messaging provider.
*
* @param {string} providerId - Provider 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.
* @param {string} name - Provider name.
* @param {object} serviceAccountJSON - FCM service account JSON.
* @param {boolean} enabled - Set as enabled.
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
createFcmProvider(providerId: string, name: string, serviceAccountJSON?: object, enabled?: boolean): Promise<Models.Provider>;
/**
* Create a new Firebase Cloud Messaging provider.
*
* @param {string} params.providerId - Provider 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.
* @param {string} params.name - Provider name.
* @param {object} params.serviceAccountJSON - FCM service account JSON.
* @param {boolean} params.enabled - Set as enabled.
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
*/
createFCMProvider(params: {
providerId: string;
name: string;
serviceAccountJSON?: object;
enabled?: boolean;
}): Promise<Models.Provider>;
/**
* Create a new Firebase Cloud Messaging provider.
*
* @param {string} providerId - Provider 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.
* @param {string} name - Provider name.
* @param {object} serviceAccountJSON - FCM service account JSON.
* @param {boolean} enabled - Set as enabled.
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
createFCMProvider(providerId: string, name: string, serviceAccountJSON?: object, enabled?: boolean): Promise<Models.Provider>;
/**
* Update a Firebase Cloud Messaging provider by its unique ID.
*
* @param {string} params.providerId - Provider ID.
* @param {string} params.name - Provider name.
* @param {boolean} params.enabled - Set as enabled.
* @param {object} params.serviceAccountJSON - FCM service account JSON.
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
* @deprecated This API has been deprecated since 1.8.0. Please use `Messaging.updateFCMProvider` instead.
*/
updateFcmProvider(params: {
providerId: string;
name?: string;
enabled?: boolean;
serviceAccountJSON?: object;
}): Promise<Models.Provider>;
/**
* Update a Firebase Cloud Messaging provider by its unique ID.
*
* @param {string} providerId - Provider ID.
* @param {string} name - Provider name.
* @param {boolean} enabled - Set as enabled.
* @param {object} serviceAccountJSON - FCM service account JSON.
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
updateFcmProvider(providerId: string, name?: string, enabled?: boolean, serviceAccountJSON?: object): Promise<Models.Provider>;
/**
* Update a Firebase Cloud Messaging provider by its unique ID.
*
* @param {string} params.providerId - Provider ID.
* @param {string} params.name - Provider name.
* @param {boolean} params.enabled - Set as enabled.
* @param {object} params.serviceAccountJSON - FCM service account JSON.
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
*/
updateFCMProvider(params: {
providerId: string;
name?: string;
enabled?: boolean;
serviceAccountJSON?: object;
}): Promise<Models.Provider>;
/**
* Update a Firebase Cloud Messaging provider by its unique ID.
*
* @param {string} providerId - Provider ID.
* @param {string} name - Provider name.
* @param {boolean} enabled - Set as enabled.
* @param {object} serviceAccountJSON - FCM service account JSON.
* @throws {AppwriteException}
* @returns {Promise<Models.Provider>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
updateFCMProvider(providerId: string, name?: string, enabled?: boolean, serviceAccountJSON?: object): Promise<Models.Provider>;
/**
* Create a new Mailgun provider.
*
* @param {string} params.providerId - Provider 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.
* @param {string} params.name - Provider name.
* @param {string} params.apiKey - Mailgun API Key.
* @param {string} params.domain - Mailgun Domain.
* @param {boolean} params.isEuRegion - Set as EU region.
* @param {string} params.fromName - Sender Name.
* @param {string} params.fromEmail - Sender email address.
* @param {string} params.replyToName - Na