import { APIResource } from "../core/resource.mjs"; import { APIPromise } from "../core/api-promise.mjs"; import { RequestOptions } from "../internal/request-options.mjs"; export declare class WebhookSubscriptions extends APIResource { /** * Create a new webhook subscription */ create(body?: WebhookSubscriptionCreateParams | null | undefined, options?: RequestOptions): APIPromise; /** * Get all webhook subscriptions for the authenticated user */ list(options?: RequestOptions): APIPromise; /** * Delete a webhook subscription */ delete(webhookSubscriptionID: string, options?: RequestOptions): APIPromise; /** * Test a webhook subscription by sending a test event */ test(webhookSubscriptionID: string, body?: WebhookSubscriptionTestParams | null | undefined, options?: RequestOptions): APIPromise; } export interface WebhookSubscriptionCreateResponse { data?: WebhookSubscriptionCreateResponse.Data; message?: string; status?: string; } export declare namespace WebhookSubscriptionCreateResponse { interface Data { id?: string; created_at?: string; event_types?: Array; is_active?: boolean; secret_key?: string; updated_at?: string; user_id?: string; webhook_url?: string; } } export interface WebhookSubscriptionListResponse { data?: Array; message?: string; status?: string; } export declare namespace WebhookSubscriptionListResponse { interface Data { id?: string; created_at?: string; event_types?: Array; is_active?: boolean; updated_at?: string; webhook_url?: string; } } export interface WebhookSubscriptionDeleteResponse { data?: Array; message?: string; request_id?: string; status?: string; } export interface WebhookSubscriptionTestResponse { data?: WebhookSubscriptionTestResponse.Data; message?: string; status?: string; } export declare namespace WebhookSubscriptionTestResponse { interface Data { event_sent?: boolean; response_body?: string; response_status?: number; } } export interface WebhookSubscriptionCreateParams { /** * Array of event types to subscribe to */ event_types?: Array; /** * URL where webhook events will be sent */ webhook_url?: string; } export interface WebhookSubscriptionTestParams { /** * Type of event to test */ event_type?: string; } export declare namespace WebhookSubscriptions { export { type WebhookSubscriptionCreateResponse as WebhookSubscriptionCreateResponse, type WebhookSubscriptionListResponse as WebhookSubscriptionListResponse, type WebhookSubscriptionDeleteResponse as WebhookSubscriptionDeleteResponse, type WebhookSubscriptionTestResponse as WebhookSubscriptionTestResponse, type WebhookSubscriptionCreateParams as WebhookSubscriptionCreateParams, type WebhookSubscriptionTestParams as WebhookSubscriptionTestParams, }; } //# sourceMappingURL=webhook-subscriptions.d.mts.map