import { app } from "./api"; interface NotificationRequestTargets { experience?: string; company?: string; company_team?: string; users?: string[]; } interface NotificationRequestBody { all?: { title?: string; content?: string; }; mobile?: { title?: string; subtitle?: string; content?: string; }; in_app?: { title?: string; content?: string; }; } export interface NotificationRequest { /** The unique topic identifier for this notification topic */ topic_identifier: string; /** The user ID that this notification request is being sent on behalf of. If specified, this user will be ignored when aggregating targets. */ sender_user_id?: string; /** The experience ID that this notification is being sent in the context of. It is required when targeting users. */ experience_id?: string; /** The ID that ties a notification back to an external ID. This could be any ID from any source. */ external_id?: string; /** The absolute URL that this notification links to. example: https://google.com */ link?: string; /** The relative URL that this notification links to. example: `/customer/${post.id}` */ rest_path?: string; /** * The targets to deliver these notifications to. For example, sending a notification to an experience will send a notification * to all users who have access to that experience. Sending a notification to a company team will send a notification to * all authorized users of that company. Sending a notification to a company will send a notification to all members of that whop. */ targets: NotificationRequestTargets; /** * The content that should be displayed to users who receive these notifications. Sending to "all" channels will default to these values for both `in_app` * and `mobile` channels. These values can also be overridden per channel. Additionally, the `mobile` channel supports a specific `subtitle` field, which is * a row of content between the title and content. */ body: NotificationRequestBody; } type NotificationRequestTarget = { experience: string; } | { company: string; } | { company_team: string; }; interface NotificationRequestBody2 { title: string; subtitle?: string; content: string; } interface NotificationRequestTopic { /** The topic_identifier for the notification topic you want to target */ topic_identifier: string; /** A list of users (up to 100) that you want to mention with this topic */ users?: string[]; } export interface NotificationRequest2 { /** The user ID that this notification request is being sent on behalf of. If specified, this user will be ignored when aggregating targets. */ sender_user_id?: string; /** The ID that ties a notification back to an external ID. This could be any ID from any source. */ external_id?: string; /** The absolute URL that this notification links to. example: https://google.com */ link?: string; /** The relative URL that this notification links to. example: `/customer/${post.id}` */ rest_path?: string; /** * The targets to deliver these notifications to. For example, sending a notification to an experience will send a notification * to all users who have access to that experience. Sending a notification to a company team will send a notification to * all authorized users of that company. Sending a notification to a company will send a notification to all members of that whop. */ target: NotificationRequestTarget; /** * The content that should be displayed to users who receive these notifications. Sending to "all" channels will default to these values for both `in_app` * and `mobile` channels. These values can also be overridden per channel. Additionally, the `mobile` channel supports a specific `subtitle` field, which is * a row of content between the title and content. */ body: NotificationRequestBody2; /** The list of topics you want to send to for this notification request */ topics: NotificationRequestTopic[]; } export declare function notifications(...args: Parameters): { send(notificationRequest: NotificationRequest): Promise<{ status?: string | undefined; message?: string | undefined; }>; createRequest(notificationRequest: NotificationRequest2): Promise<{ status?: string | undefined; message?: string | undefined; }>; }; export {}; //# sourceMappingURL=notifications.d.ts.map