/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { subscribersMessagesMarkAll } from "../funcs/subscribersMessagesMarkAll.js"; import { subscribersMessagesMarkAllAs } from "../funcs/subscribersMessagesMarkAllAs.js"; import { subscribersMessagesUpdateAsSeen } from "../funcs/subscribersMessagesUpdateAsSeen.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class NovuMessages extends ClientSDK { /** * Update notification action status * * @remarks * Update in-app (inbox) notification's action status by its unique key identifier **messageId** and type field **type**. * **type** field can be **primary** or **secondary** */ async updateAsSeen( request: operations.SubscribersV1ControllerMarkActionAsSeenRequest, options?: RequestOptions, ): Promise { return unwrapAsync(subscribersMessagesUpdateAsSeen( this, request, options, )); } /** * Update all notifications state * * @remarks * Update all subscriber in-app (inbox) notifications state such as read, unread, seen or unseen by **subscriberId**. */ async markAll( markAllMessageAsRequestDto: components.MarkAllMessageAsRequestDto, subscriberId: string, idempotencyKey?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(subscribersMessagesMarkAll( this, markAllMessageAsRequestDto, subscriberId, idempotencyKey, options, )); } /** * Update notifications state * * @remarks * Update subscriber's multiple in-app (inbox) notifications state such as seen, read, unseen or unread by **subscriberId**. * **messageId** is of type mongodbId of notifications */ async markAllAs( messageMarkAsRequestDto: components.MessageMarkAsRequestDto, subscriberId: string, idempotencyKey?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(subscribersMessagesMarkAllAs( this, messageMarkAsRequestDto, subscriberId, idempotencyKey, options, )); } }