@beel_es/sdk 2.5.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.6.0] - 2026-11-09
11
+
12
+ Contract resynced with the API contract of the next release and types regenerated. Publish it
13
+ once that contract is in production: until then the new routes answer `404`.
14
+
15
+ ### Added
16
+ - **Invoice replies.** `beel.company(companyId).invoiceReplies` with `list`, `create`, `get`,
17
+ `delete` and `getAttachment`, over `/v1/companies/{company_id}/invoice-replies`. Each
18
+ attachment carries `id`, a relative `url` and `file_expires_at`; `getAttachment` returns a
19
+ temporary `download_url` and its `download_url_expires_at`, both `null` when there is no file
20
+ to download.
21
+ - Webhook events `invoice.reply.received` and `invoice.reply.deleted` are typed
22
+ (`InvoiceReplyReceivedEvent`, `InvoiceReplyDeletedEvent`) and narrow on `event.type`.
23
+ - The webhook contract is resynced too: `WebhookEventType` gains `invoice.reply.*`,
24
+ `connection.*` and `email_domain.*`. Only the reply events have their own event type so far.
25
+ - **Company connections.** Typed routes for `/v1/companies/{company_id}/connections` (list,
26
+ create, get, delete). Not yet wrapped as resource methods.
27
+
10
28
  ## [2.5.0] - 2026-11-07
11
29
 
12
30
  Contract resynced with the API as it runs in production today and types regenerated.
package/README.md CHANGED
@@ -311,6 +311,34 @@ await events.resolve('event-uuid');
311
311
  await company.paymentConnections.disconnect(connections[0].id);
312
312
  ```
313
313
 
314
+ ### Invoice replies
315
+
316
+ Replies of your customers about an invoice, on any channel. The list masks personal data;
317
+ `get` returns the full text. An attachment gives a temporary `download_url` for its file,
318
+ requested on each call: ask again rather than storing it. It is `null` when there is no file
319
+ to download.
320
+
321
+ ```typescript
322
+ const { replies } = await company.invoiceReplies.list({ invoice_id: 'invoice-uuid' });
323
+ const reply = await company.invoiceReplies.get(replies[0].id);
324
+
325
+ const attachment = await company.invoiceReplies.getAttachment(reply.id, reply.attachments![0].id);
326
+ if (attachment.download_url) {
327
+ const file = await fetch(attachment.download_url); // expires at download_url_expires_at
328
+ }
329
+
330
+ // A message received on a channel of your own
331
+ await company.invoiceReplies.create({
332
+ invoice_id: 'invoice-uuid',
333
+ channel: 'WHATSAPP',
334
+ external_id: 'wamid.EXAMPLE0001',
335
+ sender: { address: '+34600123456' },
336
+ text: 'Can you send it to Distribuciones Ejemplo S.L.?',
337
+ });
338
+
339
+ await company.invoiceReplies.delete(reply.id); // erases its content
340
+ ```
341
+
314
342
  ## Catalogs and preferences
315
343
 
316
344
  ```typescript