{"version":3,"file":"client.cjs","sources":["../../../../src/webhooks/client.ts"],"sourcesContent":["import type {\n  CreateWebhookRequest,\n  UpdateWebhookRequest,\n  Webhook,\n} from \"../types/webhooks\";\n\n/** Client for managing Helius webhook subscriptions. */\nexport interface WebhookClient {\n  /** Create a new webhook subscription. */\n  create(params: CreateWebhookRequest): Promise<Webhook>;\n  /** Get a webhook by its ID. */\n  get(webhookID: string): Promise<Webhook>;\n  /** List all webhooks for the current API key. */\n  getAll(): Promise<Webhook[]>;\n  /** Update an existing webhook's configuration. */\n  update(webhookID: string, params: UpdateWebhookRequest): Promise<Webhook>;\n  /** Delete a webhook. Returns `true` on success. */\n  delete(webhookID: string): Promise<boolean>;\n}\n\nexport const makeWebhookClient = (\n  apiKey: string,\n  userAgent?: string\n): WebhookClient => ({\n  create: async (p) =>\n    (await import(\"./createWebhook.js\")).createWebhook(apiKey, p, userAgent),\n  get: async (id) =>\n    (await import(\"./getWebhook.js\")).getWebhook(apiKey, id, userAgent),\n  getAll: async () =>\n    (await import(\"./getAllWebhooks.js\")).getAllWebhooks(apiKey, userAgent),\n  update: async (id, p) =>\n    (await import(\"./updateWebhook.js\")).updateWebhook(\n      apiKey,\n      id,\n      p,\n      userAgent\n    ),\n  delete: async (id) =>\n    (await import(\"./deleteWebhook.js\")).deleteWebhook(apiKey, id, userAgent),\n});\n"],"names":[],"mappings":";;AAoBO,MAAM,iBAAiB,GAAG,CAC/B,MAAc,EACd,SAAkB,MACC;IACnB,MAAM,EAAE,OAAO,CAAC,KACd,CAAC,MAAM,oDAAO,qBAAoB,KAAC,EAAE,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC;IAC1E,GAAG,EAAE,OAAO,EAAE,KACZ,CAAC,MAAM,oDAAO,kBAAiB,KAAC,EAAE,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,SAAS,CAAC;AACrE,IAAA,MAAM,EAAE,YACN,CAAC,MAAM,oDAAO,sBAAqB,KAAC,EAAE,cAAc,CAAC,MAAM,EAAE,SAAS,CAAC;IACzE,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,KAClB,CAAC,MAAM,oDAAO,qBAAoB,KAAC,EAAE,aAAa,CAChD,MAAM,EACN,EAAE,EACF,CAAC,EACD,SAAS,CACV;IACH,MAAM,EAAE,OAAO,EAAE,KACf,CAAC,MAAM,oDAAO,qBAAoB,KAAC,EAAE,aAAa,CAAC,MAAM,EAAE,EAAE,EAAE,SAAS,CAAC;AAC5E,CAAA;;;;"}