import type { AcceptDateStrings } from '../../lib/wire.js'; import type { CreateNotificationChannelRequestInput, ListNotificationChannelsParamsFilter, ListNotificationEventsParamsFilter, ListNotificationRulesParamsFilter, NotificationChannel, NotificationChannelPagePaginatedResponse, NotificationEvent, NotificationEventPagePaginatedResponse, NotificationRule, NotificationRulePagePaginatedResponse, NotificationRuleRequestInput, ResendBillingNotificationEventRequest, SortQueryInput, UpdateBillingNotificationChannelRequestInput } from '../types.js'; export interface ListNotificationChannelsQuery { /** Determines which page of the collection to retrieve. */ page?: { size?: number; number?: number; }; /** * Sort notification channels returned in the response. Supported sort attributes * are: * * - `id` (default) * - `type` * - `created_at` * - `updated_at` * * The `asc` suffix is optional as the default sort order is ascending. The `desc` * suffix is used to specify a descending order. */ sort?: SortQueryInput; /** * Filter notification channels returned in the response. * * To filter notification channels by type add the following query param: * filter[type]=webhook */ filter?: ListNotificationChannelsParamsFilter; } export type ListNotificationChannelsRequest = AcceptDateStrings; export type ListNotificationChannelsResponse = NotificationChannelPagePaginatedResponse; export type CreateNotificationChannelRequest = AcceptDateStrings; export type CreateNotificationChannelResponse = NotificationChannel; export type GetNotificationChannelRequest = { notificationChannelId: string; }; export type GetNotificationChannelResponse = NotificationChannel; export type UpdateNotificationChannelRequest = AcceptDateStrings<{ notificationChannelId: string; body: UpdateBillingNotificationChannelRequestInput; }>; export type UpdateNotificationChannelResponse = NotificationChannel; export type DeleteNotificationChannelRequest = { notificationChannelId: string; }; export type DeleteNotificationChannelResponse = void; export interface ListNotificationRulesQuery { /** Determines which page of the collection to retrieve. */ page?: { size?: number; number?: number; }; /** * Sort notification rules returned in the response. Supported sort attributes are: * * - `id` (default) * - `type` * - `created_at` * - `updated_at` * * The `asc` suffix is optional as the default sort order is ascending. The `desc` * suffix is used to specify a descending order. */ sort?: SortQueryInput; /** * Filter notification rules returned in the response. * * Examples: * * - `filter[type]=entitlements.balance.threshold` * - `filter[disabled]=false` * - `filter[channel_id]=01ARZ3NDEKTSV4RRFFQ69G5FAV` */ filter?: ListNotificationRulesParamsFilter; } export type ListNotificationRulesRequest = AcceptDateStrings; export type ListNotificationRulesResponse = NotificationRulePagePaginatedResponse; export type CreateNotificationRuleRequest = AcceptDateStrings; export type CreateNotificationRuleResponse = NotificationRule; export type GetNotificationRuleRequest = { notificationRuleId: string; }; export type GetNotificationRuleResponse = NotificationRule; export type UpdateNotificationRuleRequest = AcceptDateStrings<{ notificationRuleId: string; body: NotificationRuleRequestInput; }>; export type UpdateNotificationRuleResponse = NotificationRule; export type DeleteNotificationRuleRequest = { notificationRuleId: string; }; export type DeleteNotificationRuleResponse = void; export type TestNotificationRuleRequest = { notificationRuleId: string; }; export type TestNotificationRuleResponse = NotificationEvent; export interface ListNotificationEventsQuery { /** Determines which page of the collection to retrieve. */ page?: { size?: number; number?: number; }; /** * Sort notification events returned in the response. Supported sort attributes * are: * * - `created_at` (default) * - `id` * - `type` * * The `asc` suffix is optional as the default sort order is ascending. The `desc` * suffix is used to specify a descending order. Without a `sort` parameter, events * are returned newest first. */ sort?: SortQueryInput; /** * Filter notification events returned in the response. * * Examples: * * - `filter[type]=invoice.created` * - `filter[delivery_status]=failed` * - `filter[subject_key]=customer-1` */ filter?: ListNotificationEventsParamsFilter; } export type ListNotificationEventsRequest = AcceptDateStrings; export type ListNotificationEventsResponse = NotificationEventPagePaginatedResponse; export type GetNotificationEventRequest = { notificationEventId: string; }; export type GetNotificationEventResponse = NotificationEvent; export type ResendNotificationEventRequest = AcceptDateStrings<{ notificationEventId: string; body: ResendBillingNotificationEventRequest; }>; export type ResendNotificationEventResponse = void;