UNPKG

e-invoice-api

Version:

The official TypeScript library for the e-invoice API

56 lines 1.84 kB
import { APIResource } from "../core/resource.js"; import { APIPromise } from "../core/api-promise.js"; import { RequestOptions } from "../internal/request-options.js"; export declare class Webhooks extends APIResource { /** * Create a new webhook */ create(body: WebhookCreateParams, options?: RequestOptions): APIPromise<WebhookResponse>; /** * Get a webhook by ID */ retrieve(webhookID: string, options?: RequestOptions): APIPromise<WebhookResponse>; /** * Update a webhook by ID */ update(webhookID: string, body: WebhookUpdateParams, options?: RequestOptions): APIPromise<WebhookResponse>; /** * Get all webhooks for the current tenant */ list(options?: RequestOptions): APIPromise<WebhookListResponse>; /** * Delete a webhook */ delete(webhookID: string, options?: RequestOptions): APIPromise<WebhookDeleteResponse>; } /** * Response model for webhook API endpoints. */ export interface WebhookResponse { id: string; events: Array<string>; secret: string; url: string; enabled?: boolean; } export type WebhookListResponse = Array<WebhookResponse>; /** * Model for webhook deletion. */ export interface WebhookDeleteResponse { is_deleted: boolean; } export interface WebhookCreateParams { events: Array<string>; url: string; enabled?: boolean; } export interface WebhookUpdateParams { enabled?: boolean | null; events?: Array<string> | null; url?: string | null; } export declare namespace Webhooks { export { type WebhookResponse as WebhookResponse, type WebhookListResponse as WebhookListResponse, type WebhookDeleteResponse as WebhookDeleteResponse, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, }; } //# sourceMappingURL=webhooks.d.ts.map