import { BaseResource } from './BaseResource.js'; import type { RequestOptions } from '../types/common.js'; import type { Webhook, WebhookCreateParams } from '../types/webhooks.js'; export declare class Webhooks extends BaseResource { /** * List all webhooks for a store. */ list(storeId: string, opts?: RequestOptions): Promise; /** * Create a new webhook endpoint. * * @example * const webhook = await tagada.webhooks.create({ * storeId: 'store_xxx', * url: 'https://example.com/webhooks/tagada', * eventTypes: ['payment/succeeded', 'subscription/created', 'order/paid'], * }); * console.log(webhook.secret); // Use this to verify signatures */ create(params: WebhookCreateParams, opts?: RequestOptions): Promise; /** * Delete a webhook endpoint. */ del(id: string, opts?: RequestOptions): Promise<{ success: boolean; id: string; }>; /** * Verify an incoming CRM webhook and parse its JSON payload. * Stripe-style ergonomics: pass the raw body string, the * `X-TagadaPay-Signature` header, and your endpoint secret. */ constructEvent(rawBody: string, signatureHeader: string | null | undefined, secret: string): T; } //# sourceMappingURL=Webhooks.d.ts.map