/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { notificationsList } from "../funcs/notificationsList.js"; import { notificationsRetrieve } from "../funcs/notificationsRetrieve.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Notifications extends ClientSDK { /** * List all events * * @remarks * List all notification events (triggered events) for the current environment. * This API supports filtering by **channels**, **templates**, **emails**, **subscriberIds**, **transactionId**, **topicKey**, **severity**, **contextKeys**. * Checkout all available filters in the query section. * This API returns event triggers, to list each channel notifications, check messages APIs. */ async list( request: operations.NotificationsControllerListNotificationsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(notificationsList( this, request, options, )); } /** * Retrieve an event * * @remarks * Retrieve an event by its unique key identifier **notificationId**. * Here **notificationId** is of mongodbId type. * This API returns the event details - execution logs, status, actual notification (message) generated by each workflow step. */ async retrieve( notificationId: string, idempotencyKey?: string | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(notificationsRetrieve( this, notificationId, idempotencyKey, options, )); } }