import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import * as Whop from "../../../index.js"; import { TopicsClient } from "../resources/topics/client/Client.js"; export declare namespace NotificationsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * A Notification is a message delivered to a user, such as a new post, a payment, or a mention. Each one comes from an experience the user belongs to or a team they are on, and falls under a topic, like new sales, that users set preferences on. * * Use the Notifications API to list a user's feed, read and clear unread badges, send notifications from your app to an experience's users or an account's team, and list the topic catalog that notification preferences reference. */ export declare class NotificationsClient { protected readonly _options: NormalizedClientOptionsWithAuth; protected _topics: TopicsClient | undefined; constructor(options?: NotificationsClient.Options); get topics(): TopicsClient; /** * Lists the authenticated user's notifications, newest first. Without filters the feed spans every experience the user belongs to plus the teams they are a member of. Requires a user credential — an account API key has no notification feed. * * @param {Whop.ListNotificationsRequest} request * @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.notifications.list() */ list(request?: Whop.ListNotificationsRequest, requestOptions?: NotificationsClient.RequestOptions): Promise>; /** * Queues a notification to every user of an experience or to an account's team, processed asynchronously. Every send is attributed to an app: use an app API key, or a credential acting on behalf of an app. Narrow the audience with `user_ids` to send a mention. * * @param {Whop.CreateNotificationsRequest} request * @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.notifications.create({ * content: "Drop off at 4180 Burnet Rd. Plan on two days for the full coating.", * title: "Your ceramic coating is booked" * }) */ create(request: Whop.CreateNotificationsRequest, requestOptions?: NotificationsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Lists the authenticated user's per-experience unread badge state. Requires a user credential. Returns one row per experience the user belongs to (or per requested experience). * * @param {Whop.BadgesNotificationsRequest} request * @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.notifications.badges({ * experience_ids: ["exp_xxxxxxxxxxxxxx"] * }) */ badges(request?: Whop.BadgesNotificationsRequest, requestOptions?: NotificationsClient.RequestOptions): core.HttpResponsePromise; private __badges; /** * Marks the authenticated user's notifications as read, for one experience or all of them, and returns the refreshed badge rows for that scope. Requires a user credential. * * @param {Whop.MarkReadNotificationsRequest} request * @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.notifications.markRead() */ markRead(request?: Whop.MarkReadNotificationsRequest, requestOptions?: NotificationsClient.RequestOptions): core.HttpResponsePromise; private __markRead; /** * Retrieves a single notification, from the feed or from a push or websocket event. Requires a user credential. * * @param {Whop.RetrieveNotificationsRequest} request * @param {NotificationsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.notifications.retrieve({ * id: "id" * }) */ retrieve(request: Whop.RetrieveNotificationsRequest, requestOptions?: NotificationsClient.RequestOptions): core.HttpResponsePromise; private __retrieve; }