{"version":3,"file":"client.eager.cjs","sources":["../../../../src/webhooks/client.eager.ts"],"sourcesContent":["import type {\n  CreateWebhookRequest,\n  UpdateWebhookRequest,\n  Webhook,\n} from \"../types/webhooks\";\nimport { createWebhook } from \"./createWebhook\";\nimport { getWebhook } from \"./getWebhook\";\nimport { getAllWebhooks } from \"./getAllWebhooks\";\nimport { updateWebhook } from \"./updateWebhook\";\nimport { deleteWebhook } from \"./deleteWebhook\";\n\nexport interface WebhookClient {\n  create(params: CreateWebhookRequest): Promise<Webhook>;\n  get(webhookID: string): Promise<Webhook>;\n  getAll(): Promise<Webhook[]>;\n  update(webhookID: string, params: UpdateWebhookRequest): Promise<Webhook>;\n  delete(webhookID: string): Promise<boolean>;\n}\n\nexport const makeWebhookClientEager = (\n  apiKey: string,\n  userAgent?: string\n): WebhookClient => ({\n  create: (p) => createWebhook(apiKey, p, userAgent),\n  get: (id) => getWebhook(apiKey, id, userAgent),\n  getAll: () => getAllWebhooks(apiKey, userAgent),\n  update: (id, p) => updateWebhook(apiKey, id, p, userAgent),\n  delete: (id) => deleteWebhook(apiKey, id, userAgent),\n});\n"],"names":["createWebhook","getWebhook","getAllWebhooks","updateWebhook","deleteWebhook"],"mappings":";;;;;;;;AAmBO,MAAM,sBAAsB,GAAG,CACpC,MAAc,EACd,SAAkB,MACC;AACnB,IAAA,MAAM,EAAE,CAAC,CAAC,KAAKA,2BAAa,CAAC,MAAM,EAAE,CAAC,EAAE,SAAS,CAAC;AAClD,IAAA,GAAG,EAAE,CAAC,EAAE,KAAKC,qBAAU,CAAC,MAAM,EAAE,EAAE,EAAE,SAAS,CAAC;IAC9C,MAAM,EAAE,MAAMC,6BAAc,CAAC,MAAM,EAAE,SAAS,CAAC;AAC/C,IAAA,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,KAAKC,2BAAa,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS,CAAC;AAC1D,IAAA,MAAM,EAAE,CAAC,EAAE,KAAKC,2BAAa,CAAC,MAAM,EAAE,EAAE,EAAE,SAAS,CAAC;AACrD,CAAA;;;;"}