export interface Notification { /** The id of the notification */ _id?: string; } export interface NotifyRequest { /** * Notification template ID. A notification template specifies the text and recipients for notifications. * To obtain a notification template ID, create a notification template in your [app's dashboard](https://dev.wix.com/docs/build-apps/develop-your-app/app-dashboard-setup/about-the-app-dashboard). */ notificationTemplateId: string; /** * Each key is a placeholder name you specify when creating a notification template. * The value is an object containing the text to replace the placeholder in the notifications. */ dynamicValues?: Record; } export interface DynamicValue extends DynamicValueOfTypeOneOf { /** Text to be integrated into the notification. */ text?: string; } /** @oneof */ export interface DynamicValueOfTypeOneOf { /** Text to be integrated into the notification. */ text?: string; } /** * Money. * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003. */ export interface Money { /** Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative. */ value?: string; /** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */ currency?: string; /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */ formattedValue?: string | null; } export interface MapDynamicValue { /** items */ items?: Record; } export interface ArrayDynamicValue { /** items */ items?: DynamicValue[]; } export interface AttachmentDynamicValue { /** file name */ fileName?: string; /** download url */ downloadUrl?: string; } export interface NotifyResponse { /** ID of the batch of notifications triggered by one request. */ notificationBatchId?: string; } export interface NotifyByAppRequest { /** notification_template_id */ notificationTemplateId?: string; /** app_def_id */ appDefId?: string; /** dynamic_values */ dynamicValues?: Record; /** template tenant */ templateTenant?: string | null; /** overrides */ overrides?: Overrides; /** channels content */ channelsData?: ChannelsData; } export interface Overrides { /** excluded_channels */ excludedChannels?: TemplateChannel[]; /** excluded_audiences */ excludedAudiences?: ExcludedAudiences; /** content overrides */ content?: ChannelsContent; } export declare enum TemplateChannel { WEB_FEED = "WEB_FEED", MOBILE_FEED = "MOBILE_FEED", MOBILE_PUSH = "MOBILE_PUSH", BROWSER = "BROWSER", SMS = "SMS", EMAIL = "EMAIL", KAFKA = "KAFKA", VOICE = "VOICE" } export interface ExcludedAudiences { /** audience_key */ audienceKey?: string[]; } export interface ChannelsContent { /** mobile push override */ mobileContent?: MobileContent; } export interface MobileContent { /** title override of mobile push content */ title?: string; /** body override of mobile push content */ body?: string; } export interface ChannelsData { /** email data */ emailData?: EmailData; } export interface EmailData { /** shoutout action config */ shoutoutActionConfig?: Record | null; } export interface NotifyByAppResponse { /** notification_batch_id */ notificationBatchId?: string; } export interface ResolveRequest { /** template id */ notificationTemplateId?: string; /** values */ dynamicValues?: Record; } export interface ResolveResponse { } export interface NotifyResponseNonNullableFields { notificationBatchId: string; } /** * Sends notifications based on the template and dynamic values provided. * * > **Note**: An app can call this endpoint up to 100,000 times per month for each site. * * When you [create a notification template](https://dev.wix.com/docs/rest/business-management/notifications/notifications/creating-a-notification-template), you are provided a notification template ID. Call the Notify endpoint with this ID as `notificationTemplateID` to trigger notifications based on that template. * * If the notification template contains placeholders for dynamic values, provide those values as key-value pairs in the `dynamicValues` array. The values you specify are incorporated in the notifications sent out. * @param notificationTemplateId - Notification template ID. A notification template specifies the text and recipients for notifications. * To obtain a notification template ID, create a notification template in your [app's dashboard](https://dev.wix.com/docs/build-apps/develop-your-app/app-dashboard-setup/about-the-app-dashboard). * @public * @requiredField notificationTemplateId * @permissionId NOTIFICATIONS.SEND_NOTIFICATION * @permissionScope Manage Notifications * @permissionScopeId SCOPE.DC-NOTIFICATIONS.MANAGE-NOTIFICATIONS * @applicableIdentity APP * @fqn com.wixpress.ping.hub.api.v3.NotificationsServiceV3.Notify */ export declare function notify(notificationTemplateId: string, options?: NotifyOptions): Promise; export interface NotifyOptions { /** * Each key is a placeholder name you specify when creating a notification template. * The value is an object containing the text to replace the placeholder in the notifications. */ dynamicValues?: Record; }