import { type Client } from '../core.js'; import { type RequestOptions } from '../lib/types.js'; import type { CreateSubscriptionAddonRequest, CreateSubscriptionAddonResponse, UpdateSubscriptionAddonRequest, UpdateSubscriptionAddonResponse } from '../models/operations/subscriptions.js'; import type { ExecuteAppActionRequest, ExecuteAppActionResponse } from '../models/operations/apps.js'; import type { ListNotificationRulesRequest, ListNotificationRulesResponse, CreateNotificationRuleRequest, CreateNotificationRuleResponse, GetNotificationRuleRequest, GetNotificationRuleResponse, UpdateNotificationRuleRequest, UpdateNotificationRuleResponse, DeleteNotificationRuleRequest, DeleteNotificationRuleResponse, TestNotificationRuleRequest, TestNotificationRuleResponse, ListNotificationEventsRequest, ListNotificationEventsResponse, GetNotificationEventRequest, GetNotificationEventResponse, ResendNotificationEventRequest, ResendNotificationEventResponse } from '../models/operations/notifications.js'; import type { NotificationEvent, NotificationRule } from '../models/types.js'; /** * Operations marked internal in the API definition. They are not part of * the customer surface: they may require additional permissions, and they * can change or be removed without notice or semver consideration. */ export declare class Internal { private readonly _client; constructor(_client: Client); private _subscriptions?; get subscriptions(): InternalSubscriptions; private _apps?; get apps(): InternalApps; private _notifications?; get notifications(): InternalNotifications; } export declare class InternalSubscriptions { private readonly _client; constructor(_client: Client); /** * Create a new subscription add-on * * Add add-on to a subscription. * * POST /openmeter/subscriptions/{subscriptionId}/addons */ createAddon(request: CreateSubscriptionAddonRequest, options?: RequestOptions): Promise; /** * Update subscription addon * * Update a subscription add-on. Only the quantity is mutable; the timing controls * when the new quantity takes effect. A new entry is appended to the add-on's * timeline. * * PATCH /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId} */ updateAddon(request: UpdateSubscriptionAddonRequest, options?: RequestOptions): Promise; } export declare class InternalApps { private readonly _client; constructor(_client: Client); /** * Execute app action * * Execute an operator action on an installed app. The action must be listed in the * app's `actions`; otherwise the request is rejected. * * POST /openmeter/apps/{appId}/action */ executeAction(request: ExecuteAppActionRequest, options?: RequestOptions): Promise; } export declare class InternalNotifications { private readonly _client; constructor(_client: Client); /** * List notification rules * * List all notification rules. * * GET /openmeter/notification/rules */ listRules(request?: ListNotificationRulesRequest, options?: RequestOptions): Promise; /** * List notification rules * * List all notification rules. * * Iterates every item across all pages, fetching more as the returned iterable is consumed. * * GET /openmeter/notification/rules */ listRulesAll(request?: ListNotificationRulesRequest, options?: RequestOptions): AsyncIterable; /** * Create notification rule * * Create a notification rule. * * POST /openmeter/notification/rules */ createRule(request: CreateNotificationRuleRequest, options?: RequestOptions): Promise; /** * Get notification rule * * Get a notification rule by id. * * GET /openmeter/notification/rules/{notificationRuleId} */ getRule(request: GetNotificationRuleRequest, options?: RequestOptions): Promise; /** * Update notification rule * * Update a notification rule by id. * * PUT /openmeter/notification/rules/{notificationRuleId} */ updateRule(request: UpdateNotificationRuleRequest, options?: RequestOptions): Promise; /** * Delete notification rule * * Delete a notification rule by id. * * DELETE /openmeter/notification/rules/{notificationRuleId} */ deleteRule(request: DeleteNotificationRuleRequest, options?: RequestOptions): Promise; /** * Test notification rule * * Test a notification rule by generating an event with sample data and delivering * it to the rule's channels. The test event is persisted and listed like any other * event. * * POST /openmeter/notification/rules/{notificationRuleId}/test */ testRule(request: TestNotificationRuleRequest, options?: RequestOptions): Promise; /** * List notification events * * List all notification events. * * GET /openmeter/notification/events */ listEvents(request?: ListNotificationEventsRequest, options?: RequestOptions): Promise; /** * List notification events * * List all notification events. * * Iterates every item across all pages, fetching more as the returned iterable is consumed. * * GET /openmeter/notification/events */ listEventsAll(request?: ListNotificationEventsRequest, options?: RequestOptions): AsyncIterable; /** * Get notification event * * Get a notification event by id. * * GET /openmeter/notification/events/{notificationEventId} */ getEvent(request: GetNotificationEventRequest, options?: RequestOptions): Promise; /** * Resend notification event * * Resend a notification event to the channels of the rule that generated it. * * Delivery is asynchronous: the request marks the selected channels for redelivery * and returns immediately. Channels whose delivery is still pending or already * being resent are left untouched. * * POST /openmeter/notification/events/{notificationEventId}/resend */ resendEvent(request: ResendNotificationEventRequest, options?: RequestOptions): Promise; }