export interface Public_notification { /** Notification ID. */ _id?: string | null; } export 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; /** URL to navigate to when the `action` text is clicked. */ targetUrl?: string | null; /** Dashboard page to open when the notification action is clicked. */ targetDashboardPage?: DashboardPages; /** 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. */ channels?: Channel[]; } /** @oneof */ export 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; } /** @oneof */ export 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?: DashboardPages; } export 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?: Role; } export declare enum Role { /** All site contributors. */ All_Contributors = "All_Contributors", /** Site owner only. */ Owner = "Owner" } export interface ToContacts { /** Contacts that receive the notification. */ contactIds?: string[]; } export interface ToTopicsSubscribers { /** Notification topics to which the recipients have subscribed. Only contacts who subscribed to the specified topics receive the notification. */ topics?: string[]; /** Excluded contact IDs. Contacts with these IDs don't receive the notification. */ excludedContactIds?: string[]; } export 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" } export declare enum DashboardPages { Undefined_Page = "Undefined_Page", /** Site dashboard home. */ Home = "Home" } export 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 */ export declare function notify(body: string | null, channels: Channel[], options?: NotifyOptions): Promise; export interface NotifyOptions 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; /** 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?: DashboardPages; }