interface Public_notification { /** Notification ID. */ _id?: string | null; } interface PublicNotifyRequest extends PublicNotifyRequestRecipientsFilterOneOf, PublicNotifyRequestActionTargetOneOf { /** Send to [site contributors]((https://support.wix.com/en/article/roles-permissions-overview)). This includes site administrators, website managers, and back office managers. */ toSiteContributors?: ToSiteContributors; /** Send to [site contacts](https://support.wix.com/en/article/about-your-contact-list). */ toContacts?: ToContacts; /** * Send to site members who subscribed to a [notification topic](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/notifications/add-notification-extensions#step-1--create-a-notification-topic-extension). * @internal */ toTopicsSubscribers?: ToTopicsSubscribers; /** URL to navigate to when the `action` text is clicked. */ targetUrl?: string | null; /** Dashboard page to open when the notification action is clicked. */ targetDashboardPage?: DashboardPagesWithLiterals; /** Title of the notification. Max: 512 characters. */ title?: string | null; /** * Body of the notification. This contains the main content of the notification. * Max: 512 characters */ body?: string | null; /** Title of the notification action. Clicking the action refers the user to a target URL or a dashboard page. */ action?: string | null; /** * Channel through which users receive the notification. * - `"Mobile"`: Sends the notification to the Wix App. * - `"Dashboard"`: Sends the notification to the collaborator's Wix Dashboard. * - `"Browser"`: Sends the notification to the collaborator's browser. * @maxSize 20 */ channels?: ChannelWithLiterals[]; } /** @oneof */ interface PublicNotifyRequestRecipientsFilterOneOf { /** Send to [site contributors]((https://support.wix.com/en/article/roles-permissions-overview)). This includes site administrators, website managers, and back office managers. */ toSiteContributors?: ToSiteContributors; /** Send to [site contacts](https://support.wix.com/en/article/about-your-contact-list). */ toContacts?: ToContacts; /** * Notify contacts who are subscribed to specific topics. * @internal */ toTopicsSubscribers?: ToTopicsSubscribers; } /** @oneof */ interface PublicNotifyRequestActionTargetOneOf { /** URL to navigate to when the `action` text is clicked. */ targetUrl?: string | null; /** Dashboard page to open when the notification action is clicked. */ targetDashboardPage?: DashboardPagesWithLiterals; } interface ToSiteContributors { /** * Role assigned to site contributors. Only contributors with the specified roles receive the notification: * - `"All_Contributors"`: All site collaborators (default). * - `"Owner"`: Site owner only. */ withRole?: RoleWithLiterals; } declare enum Role { /** All site contributors. */ All_Contributors = "All_Contributors", /** Site owner only. */ Owner = "Owner" } /** @enumType */ type RoleWithLiterals = Role | 'All_Contributors' | 'Owner'; interface ToContacts { /** * Contacts that receive the notification. * @format GUID * @maxSize 1000 */ contactIds?: string[]; } interface ToTopicsSubscribers { /** * Notification topics to which the recipients have subscribed. Only contacts who subscribed to the specified topics receive the notification. * @maxSize 100 */ topics?: string[]; /** * Excluded contact IDs. Contacts with these IDs don't receive the notification. * @maxSize 1000 */ excludedContactIds?: string[]; } declare enum Channel { /** No default channel. */ Undefined = "Undefined", /** Site dashboard. */ Dashboard = "Dashboard", /** [Wix Owner](https://www.wix.com/mobile/wix-app) mobile app. */ Mobile = "Mobile", /** Active browser. Supported on Chrome and Safari only. */ Browser = "Browser" } /** @enumType */ type ChannelWithLiterals = Channel | 'Undefined' | 'Dashboard' | 'Mobile' | 'Browser'; declare enum DashboardPages { Undefined_Page = "Undefined_Page", /** Site dashboard home. */ Home = "Home" } /** @enumType */ type DashboardPagesWithLiterals = DashboardPages | 'Undefined_Page' | 'Home'; interface Empty { } /** * Sends a notification. * * * The `notify()` function sends a [notification](https://support.wix.com/en/article/about-your-dashboard-notifications) to the specified recipients on the specified channels. * * List the the channels for the notification in the `channels` parameter . * * List the recipients for the notification in the `toContacts`, `toSiteContributors`, and `toTopicsSubscribers` parameters. * @public * @documentationMaturity preview * @requiredField body * @requiredField channels * @param options - Notification options. * @param body - Body of the notification. This contains the main content of the notification. * @param channels - Channel through which users receive the notification. * - `"Mobile"`: Sends the notification to the Wix App. * - `"Dashboard"`: Sends the notification to the collaborator's Wix Dashboard. * - `"Browser"`: Sends the notification to the collaborator's browser. * @returns Fulfilled when the send notification request is received. * @fqn com.wixpress.ping.hub.api.PublicNotificationsService.Notify */ declare function notify(body: string, channels: ChannelWithLiterals[], options?: NotifyOptions): Promise; interface NotifyOptions extends NotifyOptionsRecipientsFilterOneOf, NotifyOptionsActionTargetOneOf { /** Send to [site contributors]((https://support.wix.com/en/article/roles-permissions-overview)). This includes site administrators, website managers, and back office managers. */ toSiteContributors?: ToSiteContributors; /** Send to [site contacts](https://support.wix.com/en/article/about-your-contact-list). */ toContacts?: ToContacts; /** Title of the notification. Max: 512 characters. */ title?: string | null; /** * Title of the notification action. Clicking the action refers the user to a target URL or a dashboard page. * * Max: 512 characters. */ action?: string | null; /** External URL to open when the notification action is clicked. */ targetUrl?: string | null; /** Dashboard page to open when the notification action is clicked. */ targetDashboardPage?: DashboardPagesWithLiterals; } /** @oneof */ interface NotifyOptionsRecipientsFilterOneOf { /** Send to [site contributors]((https://support.wix.com/en/article/roles-permissions-overview)). This includes site administrators, website managers, and back office managers. */ toSiteContributors?: ToSiteContributors; /** Send to [site contacts](https://support.wix.com/en/article/about-your-contact-list). */ toContacts?: ToContacts; /** * Notify contacts who are subscribed to specific topics. * @internal */ toTopicsSubscribers?: ToTopicsSubscribers; } /** @oneof */ interface NotifyOptionsActionTargetOneOf { /** URL to navigate to when the `action` text is clicked. */ targetUrl?: string | null; /** Dashboard page to open when the notification action is clicked. */ targetDashboardPage?: DashboardPagesWithLiterals; } export { Channel, type ChannelWithLiterals, DashboardPages, type DashboardPagesWithLiterals, type Empty, type NotifyOptions, type NotifyOptionsActionTargetOneOf, type NotifyOptionsRecipientsFilterOneOf, type PublicNotifyRequest, type PublicNotifyRequestActionTargetOneOf, type PublicNotifyRequestRecipientsFilterOneOf, type Public_notification, Role, type RoleWithLiterals, type ToContacts, type ToSiteContributors, type ToTopicsSubscribers, notify };