import type { Client } from 'openapi-fetch'; import type { RequestOptions } from './common.cjs'; import type { NotificationChannel, NotificationRuleCreateRequest, operations, paths } from './schemas.cjs'; /** * Notifications * @description Notifications provide automated triggers when specific entitlement balances and usage thresholds are reached, ensuring that your customers and sales teams are always informed. Notify customers and internal teams when specific conditions are met, like reaching 75%, 100%, and 150% of their monthly usage allowance. */ export declare class Notifications { private client; channels: NotificationChannels; rules: NotificationRules; events: NotificationEvents; constructor(client: Client); } /** * Notification Channels * @description Notification channels are the destinations for notifications. */ export declare class NotificationChannels { private client; constructor(client: Client); /** * Create a notification channel * @param notification - The notification to create * @param signal - An optional abort signal * @returns The created notification */ create(notification: NotificationChannel, options?: RequestOptions): Promise<{ readonly createdAt: Date; readonly updatedAt: Date; readonly deletedAt?: Date; readonly id: string; type: "WEBHOOK"; name: string; disabled?: boolean; readonly annotations?: import("./schemas.cjs").components["schemas"]["Annotations"]; metadata?: import("./schemas.cjs").components["schemas"]["Metadata"] | null; url: string; customHeaders?: { [key: string]: string; }; signingSecret?: string; } | undefined>; /** * Get a notification channel by ID * @param id - The ID of the notification channel * @param signal - An optional abort signal * @returns The notification channel */ get(id: operations['getNotificationChannel']['parameters']['path']['channelId'], options?: RequestOptions): Promise<{ readonly createdAt: Date; readonly updatedAt: Date; readonly deletedAt?: Date; readonly id: string; type: "WEBHOOK"; name: string; disabled?: boolean; readonly annotations?: import("./schemas.cjs").components["schemas"]["Annotations"]; metadata?: import("./schemas.cjs").components["schemas"]["Metadata"] | null; url: string; customHeaders?: { [key: string]: string; }; signingSecret?: string; } | undefined>; /** * Update a notification channel * @param id - The ID of the notification channel * @param notification - The notification to update * @param signal - An optional abort signal * @returns The updated notification */ update(id: operations['updateNotificationChannel']['parameters']['path']['channelId'], notification: NotificationChannel, options?: RequestOptions): Promise<{ readonly createdAt: Date; readonly updatedAt: Date; readonly deletedAt?: Date; readonly id: string; type: "WEBHOOK"; name: string; disabled?: boolean; readonly annotations?: import("./schemas.cjs").components["schemas"]["Annotations"]; metadata?: import("./schemas.cjs").components["schemas"]["Metadata"] | null; url: string; customHeaders?: { [key: string]: string; }; signingSecret?: string; } | undefined>; /** * List notification channels * @param query - The query parameters * @param signal - An optional abort signal * @returns The list of notification channels */ list(query?: operations['listNotificationChannels']['parameters']['query'], options?: RequestOptions): Promise<{ totalCount: number; page: number; pageSize: number; items: import("./schemas.cjs").components["schemas"]["NotificationChannel"][]; } | undefined>; /** * Delete a notification channel * @param id - The ID of the notification channel * @param signal - An optional abort signal * @returns The deleted notification */ delete(id: operations['deleteNotificationChannel']['parameters']['path']['channelId'], options?: RequestOptions): Promise; } /** * Notification Rules * @description Notification rules are the conditions that trigger notifications. */ export declare class NotificationRules { private client; constructor(client: Client); /** * Create a notification rule * @param rule - The rule to create * @param signal - An optional abort signal * @returns The created rule */ create(rule: NotificationRuleCreateRequest, options?: RequestOptions): Promise | undefined>; /** * Get a notification rule by ID * @param id - The ID of the notification rule * @param signal - An optional abort signal * @returns The notification rule */ get(id: operations['getNotificationRule']['parameters']['path']['ruleId'], options?: RequestOptions): Promise | undefined>; /** * Update a notification rule * @param id - The ID of the notification rule * @param rule - The rule to update * @param signal - An optional abort signal * @returns The updated rule */ update(id: operations['updateNotificationRule']['parameters']['path']['ruleId'], rule: NotificationRuleCreateRequest, options?: RequestOptions): Promise | undefined>; /** * List notification rules * @param query - The query parameters * @param signal - An optional abort signal * @returns The list of notification rules */ list(query?: operations['listNotificationRules']['parameters']['query'], options?: RequestOptions): Promise<{ totalCount: number; page: number; pageSize: number; items: import("./schemas.cjs").components["schemas"]["NotificationRule"][]; } | undefined>; /** * Delete a notification rule * @param id - The ID of the notification rule * @param signal - An optional abort signal * @returns The deleted notification */ delete(id: operations['deleteNotificationRule']['parameters']['path']['ruleId'], options?: RequestOptions): Promise; } /** * Notification Events * @description Notification events are the events that trigger notifications. */ export declare class NotificationEvents { private client; constructor(client: Client); /** * Get a notification event by ID * @param id - The ID of the notification event * @param signal - An optional abort signal * @returns The notification event */ get(id: operations['getNotificationEvent']['parameters']['path']['eventId'], options?: RequestOptions): Promise<{ readonly id: string; readonly type: import("./schemas.cjs").components["schemas"]["NotificationEventType"]; readonly createdAt: Date; readonly rule: import("./schemas.cjs").components["schemas"]["NotificationRule"]; readonly deliveryStatus: import("./schemas.cjs").components["schemas"]["NotificationEventDeliveryStatus"][]; readonly payload: import("./schemas.cjs").components["schemas"]["NotificationEventPayload"]; readonly annotations?: import("./schemas.cjs").components["schemas"]["Annotations"]; } | undefined>; /** * List notification events * @param query - The query parameters * @param signal - An optional abort signal * @returns The list of notification events */ list(query?: operations['listNotificationEvents']['parameters']['query'], options?: RequestOptions): Promise<{ totalCount: number; page: number; pageSize: number; items: import("./schemas.cjs").components["schemas"]["NotificationEvent"][]; } | undefined>; /** * Resend a notification event * @description Resend a notification event that has already been sent. * @param id - The ID of the notification event * @param channels - The channels to resend the notification event to, if not provided it will resend to all channels * @param signal - An optional abort signal * @returns The resent notification event */ resend(id: operations['resendNotificationEvent']['parameters']['path']['eventId'], body?: operations['resendNotificationEvent']['requestBody']['content']['application/json'], options?: RequestOptions): Promise; }