import { NonNullablePaths } from '@wix/sdk-types'; interface Notification { /** * The id of the notification * @immutable */ _id?: string; } 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). * @format GUID */ 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; } interface DynamicValue extends DynamicValueOfTypeOneOf { /** Text to be integrated into the notification. */ text?: string; } /** @oneof */ 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. */ 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. * @format DECIMAL_VALUE */ value?: string; /** * Currency code. Must be valid ISO 4217 currency code (e.g., USD). * @format CURRENCY */ 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; } interface MapDynamicValue { /** items */ items?: Record; } interface ArrayDynamicValue { /** * items * @maxSize 100 */ items?: DynamicValue[]; } interface AttachmentDynamicValue { /** file name */ fileName?: string; /** download url */ downloadUrl?: string; } interface NotifyResponse { /** ID of the batch of notifications triggered by one request. */ notificationBatchId?: string; } interface NotifyByAppRequest { /** * notification_template_id * @format GUID */ notificationTemplateId?: string; /** * app_def_id * @format GUID */ appDefId?: string; /** dynamic_values */ dynamicValues?: Record; /** template tenant */ templateTenant?: string | null; /** overrides */ overrides?: Overrides; /** channels content */ channelsData?: ChannelsData; } interface Overrides { /** * excluded_channels * @maxSize 20 */ excludedChannels?: TemplateChannelWithLiterals[]; /** excluded_audiences */ excludedAudiences?: ExcludedAudiences; /** content overrides */ content?: ChannelsContent; } 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" } /** @enumType */ type TemplateChannelWithLiterals = TemplateChannel | 'WEB_FEED' | 'MOBILE_FEED' | 'MOBILE_PUSH' | 'BROWSER' | 'SMS' | 'EMAIL' | 'KAFKA' | 'VOICE'; interface ExcludedAudiences { /** * audience_key * @maxSize 20 */ audienceKey?: string[]; } interface ChannelsContent { /** mobile push override */ mobileContent?: MobileContent; } interface MobileContent { /** title override of mobile push content */ title?: string; /** body override of mobile push content */ body?: string; } interface ChannelsData { /** email data */ emailData?: EmailData; } interface EmailData { /** shoutout action config */ shoutoutActionConfig?: Record | null; } interface NotifyByAppResponse { /** notification_batch_id */ notificationBatchId?: string; } interface ResolveRequest { /** * template id * @format GUID */ notificationTemplateId?: string; /** values */ dynamicValues?: Record; } interface ResolveResponse { } /** * Sends notifications based on the template and dynamic values provided. * * > **Note**: An app can call this method 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 with a notification template ID. Call the Notify method 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 * @applicableIdentity APP * @fqn com.wixpress.ping.hub.api.v3.NotificationsServiceV3.Notify */ declare function notify(notificationTemplateId: string, options?: NotifyOptions): Promise>; 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; } export { type ArrayDynamicValue, type AttachmentDynamicValue, type ChannelsContent, type ChannelsData, type DynamicValue, type DynamicValueOfTypeOneOf, type EmailData, type ExcludedAudiences, type MapDynamicValue, type MobileContent, type Money, type Notification, type NotifyByAppRequest, type NotifyByAppResponse, type NotifyOptions, type NotifyRequest, type NotifyResponse, type Overrides, type ResolveRequest, type ResolveResponse, TemplateChannel, type TemplateChannelWithLiterals, notify };