@beel_es/sdk 2.0.0 → 2.1.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +227 -0
  2. package/README.md +216 -25
  3. package/dist/index.d.mts +1450 -181
  4. package/dist/index.d.ts +1450 -181
  5. package/dist/index.js +1411 -188
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +1409 -188
  8. package/dist/index.mjs.map +1 -1
  9. package/docs/reference/README.md +233 -0
  10. package/docs/reference/account-companies.md +55 -0
  11. package/docs/reference/account-invitations.md +57 -0
  12. package/docs/reference/account-members.md +97 -0
  13. package/docs/reference/account-webhooks.md +123 -0
  14. package/docs/reference/account.md +94 -0
  15. package/docs/reference/accounts.md +72 -0
  16. package/docs/reference/catalogs.md +68 -0
  17. package/docs/reference/client.md +113 -0
  18. package/docs/reference/company-customers.md +85 -0
  19. package/docs/reference/company-invoices-schedule.md +52 -0
  20. package/docs/reference/company-invoices.md +316 -0
  21. package/docs/reference/company-payment-connections-events.md +103 -0
  22. package/docs/reference/company-payment-connections.md +87 -0
  23. package/docs/reference/company-products.md +72 -0
  24. package/docs/reference/company-recurring-invoices.md +136 -0
  25. package/docs/reference/company-series.md +94 -0
  26. package/docs/reference/company-tax-configuration.md +36 -0
  27. package/docs/reference/company-verifactu-configuration.md +41 -0
  28. package/docs/reference/company.md +94 -0
  29. package/docs/reference/configuration.md +90 -0
  30. package/docs/reference/customer-builder.md +107 -0
  31. package/docs/reference/customers.md +91 -0
  32. package/docs/reference/errors.md +72 -0
  33. package/docs/reference/invoice-builder.md +149 -0
  34. package/docs/reference/invoices.md +250 -0
  35. package/docs/reference/nif.md +31 -0
  36. package/docs/reference/products.md +111 -0
  37. package/docs/reference/series.md +81 -0
  38. package/docs/reference/types.md +222 -0
  39. package/docs/reference/webhook-verifier.md +95 -0
  40. package/llms.txt +52 -0
  41. package/package.json +10 -4
@@ -0,0 +1,233 @@
1
+ <!-- Generated by `npm run docs:reference` from the SDK source and openapi/public-api.yaml. Do not edit. -->
2
+
3
+ # @beel_es/sdk API reference
4
+
5
+ Typed reference of the SDK, generated from its source and the OpenAPI contract (version `1.9.0`).
6
+ Start with the [README](../../README.md) for setup and common tasks.
7
+
8
+ ## How this reference is organised
9
+
10
+ - **One page per resource**, named after how you reach it: `beel.company(companyId).invoices`
11
+ is `company-invoices.md`. The client is `client.md`, errors `errors.md`, exported types
12
+ `types.md`.
13
+ - **One stable anchor per method**: `<page>-<method-in-kebab-case>`, for example
14
+ `company-invoices.md#company-invoices-create-once`. Anchors and file names only change when
15
+ the SDK renames the resource or the method.
16
+ - **Every method** lists its HTTP operation, the scopes it needs, whether it accepts an
17
+ `Idempotency-Key`, its parameters (with the exact type to import), what it returns (the
18
+ `data` of the successful response, as the contract names it), the error class thrown per
19
+ status, and an example where one helps.
20
+ - **Types**: `components['schemas'][Name]` and `operations[operationId]` are exported by the
21
+ package: `import type { components, operations } from '@beel_es/sdk'`. A schema name in
22
+ a *Returns* line is `components['schemas'][Name]`.
23
+ - The table below lists every method of every page: method, HTTP operation, one line.
24
+
25
+ ## Pages
26
+
27
+ | Page | Reached as | Summary |
28
+ |---|---|---|
29
+ | [`BeeL`](client.md) | `beel` | The BeeL API client. |
30
+ | [`AccountScope`](account.md) | `beel.account(accountId)` | Operations scoped to one account: its companies (NIFs), members, invitations, webhooks and usage. |
31
+ | [`AccountCompaniesResource`](account-companies.md) | `beel.account(accountId).companies` | Companies (NIFs) of an account — where the `companyId` of `beel.company(companyId)` comes from. |
32
+ | [`AccountInvitationsResource`](account-invitations.md) | `beel.account(accountId).invitations` | Invitations to join an account. |
33
+ | [`AccountMembersResource`](account-members.md) | `beel.account(accountId).members` | Members of an account and their per-company grants. |
34
+ | [`AccountWebhooksResource`](account-webhooks.md) | `beel.account(accountId).webhooks` | Webhook subscriptions of an account. |
35
+ | [`AccountsResource`](accounts.md) | `beel.accounts` | Accounts you provisioned and manage (multi-account provisioning for platforms and advisory firms). |
36
+ | [`CatalogsResource`](catalogs.md) | `beel.catalogs` | Account-wide catalogs, the credential's identity and personal preferences, on their canonical paths. |
37
+ | [`CompanyScope`](company.md) | `beel.company(companyId)` | Operations scoped to a single company (NIF). |
38
+ | [`CompanyCustomersResource`](company-customers.md) | `beel.company(companyId).customers` | Customers of one company. |
39
+ | [`CompanyInvoicesResource`](company-invoices.md) | `beel.company(companyId).invoices` | Invoice lifecycle of one company: create a draft (or issue it directly), issue, void, correct, list and read, PDF and email. |
40
+ | [`CompanyInvoiceScheduleResource`](company-invoices-schedule.md) | `beel.company(companyId).invoices.schedule` | Scheduled issuing of one invoice: read it, set it, clear it. |
41
+ | [`CompanyPaymentConnectionsResource`](company-payment-connections.md) | `beel.company(companyId).paymentConnections` | Payment connections of a company (NIF): the Stripe Connect link whose charges auto-generate invoices under that NIF. |
42
+ | [`CompanyPaymentEventsResource`](company-payment-connections-events.md) | `beel.company(companyId).paymentConnections.events(connectionId)` | Payment events received through a connection, and the recovery levers for the ones that did not produce an invoice. |
43
+ | [`CompanyProductsResource`](company-products.md) | `beel.company(companyId).products` | Products and services of one company. |
44
+ | [`CompanyRecurringInvoicesResource`](company-recurring-invoices.md) | `beel.company(companyId).recurringInvoices` | Recurring invoice templates of one company. |
45
+ | [`CompanySeriesResource`](company-series.md) | `beel.company(companyId).series` | Invoice series (numbering) of one company. |
46
+ | [`CompanyTaxConfigurationResource`](company-tax-configuration.md) | `beel.company(companyId).taxConfiguration` | Tax defaults of one company (main tax, IRPF, equivalence surcharge). |
47
+ | [`CompanyVeriFactuConfigurationResource`](company-verifactu-configuration.md) | `beel.company(companyId).verifactuConfiguration` | VeriFactu configuration of one company. |
48
+ | [`NifResource`](nif.md) | `beel.nif` | NIF validation against the AEAT register. |
49
+ | [`CustomerBuilder`](customer-builder.md) | — | Fluent builder for the body of `customers.create`. |
50
+ | [`InvoiceBuilder`](invoice-builder.md) | — | Fluent builder for the body of `invoices.create`. |
51
+ | [`WebhookVerifier`](webhook-verifier.md) | — | Webhook signature verification for BeeL webhooks |
52
+ | [`ConfigurationResource`](configuration.md) | `beel.configuration` | **Deprecated.** Account-wide configuration on the flat `/v1/configuration/*` routes. |
53
+ | [`CustomersResource`](customers.md) | `beel.customers` | **Deprecated.** Customers of the focused company, on the flat `/v1/customers` routes. |
54
+ | [`InvoicesResource`](invoices.md) | `beel.invoices` | **Deprecated.** Invoices of the focused company, on the flat `/v1/invoices` routes. |
55
+ | [`ProductsResource`](products.md) | `beel.products` | **Deprecated.** Products of the focused company, on the flat `/v1/products` routes. |
56
+ | [`SeriesResource`](series.md) | `beel.series` | **Deprecated.** Invoice series of the focused company, on the flat `/v1/configuration/series` routes. |
57
+ | [Errors](errors.md) | — | Error classes and the API error codes the SDK reacts to. |
58
+ | [Types](types.md) | — | Interfaces, type aliases and constants exported by the package. |
59
+
60
+ ## Every method
61
+
62
+ | Method | HTTP | Summary |
63
+ |---|---|---|
64
+ | [`beel.company(companyId)`](client.md#client-company) | — | Returns a facade scoped to one company (NIF) — the explicit multi-NIF surface. |
65
+ | [`beel.account(accountId)`](client.md#client-account) | — | Returns a facade scoped to one account — companies, members, invitations, account webhooks, usage. |
66
+ | [`beel.downloadPdf(invoiceId)`](client.md#client-download-pdf) | — | **Deprecated.** Download an invoice PDF as a Buffer. |
67
+ | [`beel.account(accountId).get()`](account.md#account-get) | `GET /v1/accounts/{account_id}` | Get the account summary. |
68
+ | [`beel.account(accountId).usage()`](account.md#account-usage) | `GET /v1/accounts/{account_id}/usage` | Provisioning usage counters for billing: provisioned accounts and NIFs. |
69
+ | [`beel.account(accountId).changeAccessLevel(body)`](account.md#account-change-access-level) | `PATCH /v1/accounts/{account_id}/access-level` | Change the access level you keep over this account. |
70
+ | [`beel.account(accountId).endManagement()`](account.md#account-end-management) | `DELETE /v1/accounts/{account_id}/management` | End your management of this account: you lose access, and the holder keeps the account, its NIFs and its invoices. |
71
+ | [`beel.account(accountId).createClaimToken(body?)`](account.md#account-create-claim-token) | `POST /v1/accounts/{account_id}/claim-tokens` | Issue a single-use claim token so the account's holder can take ownership. |
72
+ | [`beel.account(accountId).setOwner(body)`](account.md#account-set-owner) | `PUT /v1/accounts/{account_id}/owner` | Make an existing member the account's owner. |
73
+ | [`beel.account(accountId).companies.list(params?)`](account-companies.md#account-companies-list) | `GET /v1/accounts/{account_id}/companies` | List the account's companies, primary first. |
74
+ | [`beel.account(accountId).companies.create(body)`](account-companies.md#account-companies-create) | `POST /v1/accounts/{account_id}/companies` | Register a new company (NIF) under the account. |
75
+ | [`beel.account(accountId).companies.stats()`](account-companies.md#account-companies-stats) | `GET /v1/accounts/{account_id}/companies/stats` | Per-company invoice stats: how many fiscal documents each issued, and when last. |
76
+ | [`beel.account(accountId).invitations.list()`](account-invitations.md#account-invitations-list) | `GET /v1/accounts/{account_id}/invitations` | List the account's invitations. |
77
+ | [`beel.account(accountId).invitations.create(body)`](account-invitations.md#account-invitations-create) | `POST /v1/accounts/{account_id}/invitations` | Invite someone to join the account. |
78
+ | [`beel.account(accountId).invitations.get(invitationId)`](account-invitations.md#account-invitations-get) | `GET /v1/accounts/{account_id}/invitations/{invitation_id}` | Get one invitation. |
79
+ | [`beel.account(accountId).invitations.revoke(invitationId)`](account-invitations.md#account-invitations-revoke) | `DELETE /v1/accounts/{account_id}/invitations/{invitation_id}` | Revoke a `PENDING` invitation, so its link stops working. |
80
+ | [`beel.account(accountId).members.list()`](account-members.md#account-members-list) | `GET /v1/accounts/{account_id}/members` | List the account's members. |
81
+ | [`beel.account(accountId).members.get(memberId)`](account-members.md#account-members-get) | `GET /v1/accounts/{account_id}/members/{member_id}` | Get one member. |
82
+ | [`beel.account(accountId).members.update(memberId, body)`](account-members.md#account-members-update) | `PATCH /v1/accounts/{account_id}/members/{member_id}` | Change a member's account role. |
83
+ | [`beel.account(accountId).members.remove(memberId)`](account-members.md#account-members-remove) | `DELETE /v1/accounts/{account_id}/members/{member_id}` | Remove a member from the account. |
84
+ | [`beel.account(accountId).members.listGrants(memberId)`](account-members.md#account-members-list-grants) | `GET /v1/accounts/{account_id}/members/{member_id}/grants` | List a member's per-company grants. |
85
+ | [`beel.account(accountId).members.putGrant(memberId, companyId, body)`](account-members.md#account-members-put-grant) | `PUT /v1/accounts/{account_id}/members/{member_id}/grants/{company_id}` | Grant a member access to one company, or replace the grant it has. |
86
+ | [`beel.account(accountId).members.removeGrant(memberId, companyId)`](account-members.md#account-members-remove-grant) | `DELETE /v1/accounts/{account_id}/members/{member_id}/grants/{company_id}` | Revoke a member's access to one company. |
87
+ | [`beel.account(accountId).webhooks.list(params?)`](account-webhooks.md#account-webhooks-list) | `GET /v1/accounts/{account_id}/webhooks` | List the webhook subscriptions. |
88
+ | [`beel.account(accountId).webhooks.create(body)`](account-webhooks.md#account-webhooks-create) | `POST /v1/accounts/{account_id}/webhooks` | Subscribe an HTTPS endpoint to events. |
89
+ | [`beel.account(accountId).webhooks.get(webhookId)`](account-webhooks.md#account-webhooks-get) | `GET /v1/accounts/{account_id}/webhooks/{webhook_id}` | Get one webhook subscription. |
90
+ | [`beel.account(accountId).webhooks.update(webhookId, body)`](account-webhooks.md#account-webhooks-update) | `PATCH /v1/accounts/{account_id}/webhooks/{webhook_id}` | Update a webhook subscription. |
91
+ | [`beel.account(accountId).webhooks.delete(webhookId)`](account-webhooks.md#account-webhooks-delete) | `DELETE /v1/accounts/{account_id}/webhooks/{webhook_id}` | Delete a webhook subscription. |
92
+ | [`beel.account(accountId).webhooks.test(webhookId)`](account-webhooks.md#account-webhooks-test) | `POST /v1/accounts/{account_id}/webhooks/{webhook_id}/test` | Send a test event to the endpoint. |
93
+ | [`beel.account(accountId).webhooks.rotateSecret(webhookId)`](account-webhooks.md#account-webhooks-rotate-secret) | `POST /v1/accounts/{account_id}/webhooks/{webhook_id}/secret` | Rotate the signing secret. |
94
+ | [`beel.account(accountId).webhooks.listDeliveries(webhookId, params?)`](account-webhooks.md#account-webhooks-list-deliveries) | `GET /v1/accounts/{account_id}/webhooks/{webhook_id}/deliveries` | List the delivery attempts of a subscription. |
95
+ | [`beel.account(accountId).webhooks.retryDelivery(webhookId, deliveryId)`](account-webhooks.md#account-webhooks-retry-delivery) | `POST /v1/accounts/{account_id}/webhooks/{webhook_id}/deliveries/{delivery_id}/retry` | Retry a failed delivery. |
96
+ | [`beel.accounts.list(params?)`](accounts.md#accounts-list) | `GET /v1/accounts` | List the accounts you provisioned, newest first. |
97
+ | [`beel.accounts.provision(body)`](accounts.md#accounts-provision) | `POST /v1/accounts` | Provision a new managed account. |
98
+ | [`beel.accounts.get(accountId)`](accounts.md#accounts-get) | `GET /v1/accounts/{account_id}` | Get a managed account. |
99
+ | [`beel.accounts.scope(accountId)`](accounts.md#accounts-scope) | — | Alias of `beel.account(accountId)`: the operations scoped to one account. |
100
+ | [`beel.catalogs.identity()`](catalogs.md#catalogs-identity) | `GET /v1/me/identity` | Who the API key belongs to: its `account_id` — the starting point to list the account's companies — plus the person's email, name and language, and the credential. |
101
+ | [`beel.catalogs.taxTypes()`](catalogs.md#catalogs-tax-types) | `GET /v1/tax-types` | Tax types the API accepts. |
102
+ | [`beel.catalogs.invoiceCustomizationOptions()`](catalogs.md#catalogs-invoice-customization-options) | `GET /v1/invoice-customization-options` | Invoice PDF templates and customization options. |
103
+ | [`beel.catalogs.updateMe(body)`](catalogs.md#catalogs-update-me) | `PATCH /v1/me` | Update the signed-in person's preferences. |
104
+ | [`beel.company(companyId).get(params?)`](company.md#company-get) | `GET /v1/companies/{company_id}` | Get the company: its fiscal identity, address and settings. |
105
+ | [`beel.company(companyId).update(body)`](company.md#company-update) | `PATCH /v1/companies/{company_id}` | Update the company's data. |
106
+ | [`beel.company(companyId).delete()`](company.md#company-delete) | `DELETE /v1/companies/{company_id}` | Remove the company from its account. |
107
+ | [`beel.company(companyId).fiscalSummary(params?)`](company.md#company-fiscal-summary) | `GET /v1/companies/{company_id}/fiscal-summary` | Fiscal summary of the company for a period: taxable base, VAT and IRPF aggregates. |
108
+ | [`beel.company(companyId).issuingReadiness()`](company.md#company-issuing-readiness) | `GET /v1/companies/{company_id}/issuing-readiness` | Whether the company can issue invoices now, and what blocks it if not. |
109
+ | [`beel.company(companyId).customers.list(params?)`](company-customers.md#company-customers-list) | `GET /v1/companies/{company_id}/customers` | List the company's customers, paginated and searchable. |
110
+ | [`beel.company(companyId).customers.create(body)`](company-customers.md#company-customers-create) | `POST /v1/companies/{company_id}/customers` | Create a customer. |
111
+ | [`beel.company(companyId).customers.createBulk(body)`](company-customers.md#company-customers-create-bulk) | `POST /v1/companies/{company_id}/customers/bulk` | Create several customers in one call. |
112
+ | [`beel.company(companyId).customers.get(customerId)`](company-customers.md#company-customers-get) | `GET /v1/companies/{company_id}/customers/{customer_id}` | Get one customer. |
113
+ | [`beel.company(companyId).customers.update(customerId, body)`](company-customers.md#company-customers-update) | `PATCH /v1/companies/{company_id}/customers/{customer_id}` | Update a customer. |
114
+ | [`beel.company(companyId).customers.delete(customerId)`](company-customers.md#company-customers-delete) | `DELETE /v1/companies/{company_id}/customers/{customer_id}` | Delete a customer that has no invoices. |
115
+ | [`beel.company(companyId).invoices.derive(body, options?)`](company-invoices.md#company-invoices-derive) | `POST /v1/companies/{company_id}/invoices/derivations` | Derive a new draft invoice from an existing one — the canonical form of `duplicate`. |
116
+ | [`beel.company(companyId).invoices.list(params?, options?)`](company-invoices.md#company-invoices-list) | `GET /v1/companies/{company_id}/invoices` | List the company's invoices, paginated, with filters: status, type, customer, dates, `external_ref` (exact match), VeriFactu status and more. |
117
+ | [`beel.company(companyId).invoices.create(body, params?, options?)`](company-invoices.md#company-invoices-create) | `POST /v1/companies/{company_id}/invoices` | Create an invoice: a `DRAFT` by default, or numbered and issued in the same call with `options.issue_directly: true`. |
118
+ | [`beel.company(companyId).invoices.createOnce(body, params?, options?)`](company-invoices.md#company-invoices-create-once) | via `list`, `create` | Create a standard or simplified invoice once per `external_ref`, safe to call again after any failure. |
119
+ | [`beel.company(companyId).invoices.get(invoiceId, options?)`](company-invoices.md#company-invoices-get) | `GET /v1/companies/{company_id}/invoices/{invoice_id}` | Get one invoice, including its `status` and its `verifactu` block (`submission_status`, `qr_url`, `error_code`…). |
120
+ | [`beel.company(companyId).invoices.update(invoiceId, body, options?)`](company-invoices.md#company-invoices-update) | `PATCH /v1/companies/{company_id}/invoices/{invoice_id}` | Update a `DRAFT` or `SCHEDULED` invoice (or an `ACTIVE` proforma). |
121
+ | [`beel.company(companyId).invoices.delete(invoiceId, options?)`](company-invoices.md#company-invoices-delete) | `DELETE /v1/companies/{company_id}/invoices/{invoice_id}` | Delete a draft invoice. |
122
+ | [`beel.company(companyId).invoices.issue(invoiceId, params?, options?)`](company-invoices.md#company-invoices-issue) | `POST /v1/companies/{company_id}/invoices/{invoice_id}/issue` | Issue a draft: assigns its definitive number and makes it immutable. |
123
+ | [`beel.company(companyId).invoices.void(invoiceId, body, options?)`](company-invoices.md#company-invoices-void) | `POST /v1/companies/{company_id}/invoices/{invoice_id}/void` | Void an invoice issued by mistake. |
124
+ | [`beel.company(companyId).invoices.createCorrective(invoiceId, body, options?)`](company-invoices.md#company-invoices-create-corrective) | `POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective` | Create a corrective invoice (rectificativa) for an issued invoice. |
125
+ | [`beel.company(companyId).invoices.convertToInvoice(invoiceId, body?, options?)`](company-invoices.md#company-invoices-convert-to-invoice) | `POST /v1/companies/{company_id}/invoices/{invoice_id}/convert-to-invoice` | Convert a proforma into an invoice. |
126
+ | [`beel.company(companyId).invoices.createSimplifiedExchange(body, options?)`](company-invoices.md#company-invoices-create-simplified-exchange) | `POST /v1/companies/{company_id}/invoices/simplified-exchanges` | Issue a full invoice in exchange for one or more issued simplified invoices, when the customer asks for an invoice with their details. |
127
+ | [`beel.company(companyId).invoices.verifactuRecords(invoiceId, options?)`](company-invoices.md#company-invoices-verifactu-records) | `GET /v1/companies/{company_id}/invoices/{invoice_id}/verifactu-records` | The VeriFactu records of an invoice, oldest first: its registration and, if it was voided, its cancellation. |
128
+ | [`beel.company(companyId).invoices.setStatus(invoiceId, body, options?)`](company-invoices.md#company-invoices-set-status) | `PUT /v1/companies/{company_id}/invoices/{invoice_id}/status` | Set the commercial status: `PAID` (from `ISSUED`, `SENT`, `OVERDUE`), `SENT` (from `ISSUED`) or back to `ISSUED` (from `SENT`). |
129
+ | [`beel.company(companyId).invoices.getPdf(invoiceId, options?)`](company-invoices.md#company-invoices-get-pdf) | `GET /v1/companies/{company_id}/invoices/{invoice_id}/pdf` | Get a short-lived download URL for the invoice PDF. |
130
+ | [`beel.company(companyId).invoices.send(invoiceId, body, options?)`](company-invoices.md#company-invoices-send) | `POST /v1/companies/{company_id}/invoices/{invoice_id}/send` | Send the invoice by email with its PDF. |
131
+ | [`beel.company(companyId).invoices.schedule.get(invoiceId)`](company-invoices-schedule.md#company-invoices-schedule-get) | `GET /v1/companies/{company_id}/invoices/{invoice_id}/schedule` | Get the schedule of an invoice. |
132
+ | [`beel.company(companyId).invoices.schedule.set(invoiceId, body)`](company-invoices-schedule.md#company-invoices-schedule-set) | `PUT /v1/companies/{company_id}/invoices/{invoice_id}/schedule` | Set or move the schedule. |
133
+ | [`beel.company(companyId).invoices.schedule.clear(invoiceId)`](company-invoices-schedule.md#company-invoices-schedule-clear) | `DELETE /v1/companies/{company_id}/invoices/{invoice_id}/schedule` | Clear the schedule, returning the invoice to a plain draft — the canonical form of `unschedule`. |
134
+ | [`beel.company(companyId).paymentConnections.list()`](company-payment-connections.md#company-payment-connections-list) | `GET /v1/companies/{company_id}/payment-connections` | Every payment connection of this company. |
135
+ | [`beel.company(companyId).paymentConnections.authorize(body)`](company-payment-connections.md#company-payment-connections-authorize) | `POST /v1/companies/{company_id}/payment-connections/authorizations` | Start an authorization and get the URL where the NIF's holder approves it. |
136
+ | [`beel.company(companyId).paymentConnections.update(connectionId, body)`](company-payment-connections.md#company-payment-connections-update) | `PATCH /v1/companies/{company_id}/payment-connections/{connection_id}` | Update the settings of one connection, addressed by its UUID. |
137
+ | [`beel.company(companyId).paymentConnections.disconnect(connectionId)`](company-payment-connections.md#company-payment-connections-disconnect) | `DELETE /v1/companies/{company_id}/payment-connections/{connection_id}` | Disconnect one connection. |
138
+ | [`beel.company(companyId).paymentConnections.events(connectionId)`](company-payment-connections.md#company-payment-connections-events) | — | The payment events of one connection — where you audit what did and didn't invoice. |
139
+ | [`beel.company(companyId).paymentConnections.events(connectionId).list(params?)`](company-payment-connections-events.md#company-payment-connections-events-list) | `GET /v1/companies/{company_id}/payment-connections/{connection_id}/events` | Events of the connection, most recent first. |
140
+ | [`beel.company(companyId).paymentConnections.events(connectionId).get(eventId)`](company-payment-connections-events.md#company-payment-connections-events-get) | `GET /v1/companies/{company_id}/payment-connections/{connection_id}/events/{event_id}` | Get one event. |
141
+ | [`beel.company(companyId).paymentConnections.events(connectionId).retry(eventId)`](company-payment-connections-events.md#company-payment-connections-events-retry) | `POST /v1/companies/{company_id}/payment-connections/{connection_id}/events/{event_id}/retry` | Reprocess an event whose automatic invoicing didn't complete, applying the NIF's **current** configuration. |
142
+ | [`beel.company(companyId).paymentConnections.events(connectionId).draft(eventId)`](company-payment-connections-events.md#company-payment-connections-events-draft) | `POST /v1/companies/{company_id}/payment-connections/{connection_id}/events/{event_id}/draft` | Build a **draft** invoice from an event that couldn't be invoiced automatically, so you can review it before issuing. |
143
+ | [`beel.company(companyId).paymentConnections.events(connectionId).resolve(eventId)`](company-payment-connections-events.md#company-payment-connections-events-resolve) | `POST /v1/companies/{company_id}/payment-connections/{connection_id}/events/{event_id}/resolve` | Mark an event as dealt with outside the automatic flow. |
144
+ | [`beel.company(companyId).paymentConnections.events(connectionId).discard(eventId)`](company-payment-connections-events.md#company-payment-connections-events-discard) | `POST /v1/companies/{company_id}/payment-connections/{connection_id}/events/{event_id}/discard` | Discard an event so it stops asking for attention. |
145
+ | [`beel.company(companyId).paymentConnections.events(connectionId).restore(eventId)`](company-payment-connections-events.md#company-payment-connections-events-restore) | `POST /v1/companies/{company_id}/payment-connections/{connection_id}/events/{event_id}/restore` | Bring a discarded event back into the list. |
146
+ | [`beel.company(companyId).products.list(params?)`](company-products.md#company-products-list) | `GET /v1/companies/{company_id}/products` | List the company's products, paginated and searchable. |
147
+ | [`beel.company(companyId).products.create(body)`](company-products.md#company-products-create) | `POST /v1/companies/{company_id}/products` | Create a product or service. |
148
+ | [`beel.company(companyId).products.get(productId)`](company-products.md#company-products-get) | `GET /v1/companies/{company_id}/products/{product_id}` | Get one product. |
149
+ | [`beel.company(companyId).products.update(productId, body)`](company-products.md#company-products-update) | `PATCH /v1/companies/{company_id}/products/{product_id}` | Update a product. |
150
+ | [`beel.company(companyId).products.delete(productId)`](company-products.md#company-products-delete) | `DELETE /v1/companies/{company_id}/products/{product_id}` | Delete a product from the catalog. |
151
+ | [`beel.company(companyId).recurringInvoices.list(params?)`](company-recurring-invoices.md#company-recurring-invoices-list) | `GET /v1/companies/{company_id}/recurring-invoices` | List the recurring invoices. |
152
+ | [`beel.company(companyId).recurringInvoices.create(body)`](company-recurring-invoices.md#company-recurring-invoices-create) | `POST /v1/companies/{company_id}/recurring-invoices` | Create a recurring invoice template. |
153
+ | [`beel.company(companyId).recurringInvoices.get(recurringInvoiceId)`](company-recurring-invoices.md#company-recurring-invoices-get) | `GET /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}` | Get one recurring invoice. |
154
+ | [`beel.company(companyId).recurringInvoices.update(recurringInvoiceId, body)`](company-recurring-invoices.md#company-recurring-invoices-update) | `PATCH /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}` | Update a recurring invoice. |
155
+ | [`beel.company(companyId).recurringInvoices.delete(recurringInvoiceId)`](company-recurring-invoices.md#company-recurring-invoices-delete) | `DELETE /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}` | Delete a recurring invoice and cancel its pending generations. |
156
+ | [`beel.company(companyId).recurringInvoices.setStatus(recurringInvoiceId, body)`](company-recurring-invoices.md#company-recurring-invoices-set-status) | `PUT /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/status` | Pause, resume or end the template. |
157
+ | [`beel.company(companyId).recurringInvoices.skip(recurringInvoiceId)`](company-recurring-invoices.md#company-recurring-invoices-skip) | `POST /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/skip` | Skip the next scheduled occurrence. |
158
+ | [`beel.company(companyId).recurringInvoices.generateNow(recurringInvoiceId)`](company-recurring-invoices.md#company-recurring-invoices-generate-now) | `POST /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/generate` | Generate the next invoice now instead of waiting for the schedule. |
159
+ | [`beel.company(companyId).recurringInvoices.nextOccurrence(recurringInvoiceId)`](company-recurring-invoices.md#company-recurring-invoices-next-occurrence) | `GET /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/next-occurrence` | Preview the next invoice the template will generate. |
160
+ | [`beel.company(companyId).recurringInvoices.history(recurringInvoiceId, params?)`](company-recurring-invoices.md#company-recurring-invoices-history) | `GET /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/history` | The generation history of the template: generated, skipped and failed occurrences. |
161
+ | [`beel.company(companyId).series.list(params?)`](company-series.md#company-series-list) | `GET /v1/companies/{company_id}/series` | List the company's series. |
162
+ | [`beel.company(companyId).series.create(body)`](company-series.md#company-series-create) | `POST /v1/companies/{company_id}/series` | Create a series. |
163
+ | [`beel.company(companyId).series.update(seriesId, body)`](company-series.md#company-series-update) | `PATCH /v1/companies/{company_id}/series/{series_id}` | Update a series. |
164
+ | [`beel.company(companyId).series.delete(seriesId)`](company-series.md#company-series-delete) | `DELETE /v1/companies/{company_id}/series/{series_id}` | Delete (soft-delete) a series. |
165
+ | [`beel.company(companyId).series.getDefaults()`](company-series.md#company-series-get-defaults) | `GET /v1/companies/{company_id}/series/defaults` | The current default series per document type. |
166
+ | [`beel.company(companyId).series.ensureDefaults()`](company-series.md#company-series-ensure-defaults) | `PUT /v1/companies/{company_id}/series/defaults` | Ensure a default series exists per document type, creating the missing ones. |
167
+ | [`beel.company(companyId).series.setDefault(seriesId)`](company-series.md#company-series-set-default) | `PUT /v1/companies/{company_id}/series/{series_id}/default` | Mark a series as the default for its document type. |
168
+ | [`beel.company(companyId).taxConfiguration.get()`](company-tax-configuration.md#company-tax-configuration-get) | `GET /v1/companies/{company_id}/tax-configuration` | Get the tax configuration. |
169
+ | [`beel.company(companyId).taxConfiguration.update(body)`](company-tax-configuration.md#company-tax-configuration-update) | `PUT /v1/companies/{company_id}/tax-configuration` | Replace the tax configuration — this is a `PUT`, not a merge: send the whole state. |
170
+ | [`beel.company(companyId).verifactuConfiguration.get()`](company-verifactu-configuration.md#company-verifactu-configuration-get) | `GET /v1/companies/{company_id}/verifactu-configuration` | Get the VeriFactu configuration of this NIF. |
171
+ | [`beel.company(companyId).verifactuConfiguration.update(body)`](company-verifactu-configuration.md#company-verifactu-configuration-update) | `PUT /v1/companies/{company_id}/verifactu-configuration` | Turn VeriFactu on or off for this NIF. |
172
+ | [`beel.nif.validate(nif)`](nif.md#nif-validate) | `POST /v1/nif/validate` | Validate a Spanish NIF/CIF against the AEAT tax registry. |
173
+ | [`CustomerBuilder.create()`](customer-builder.md#customer-builder-create) | — | Start a new builder. |
174
+ | [`CustomerBuilder.name(name)`](customer-builder.md#customer-builder-name) | — | Legal name of the customer. |
175
+ | [`CustomerBuilder.nif(nif)`](customer-builder.md#customer-builder-nif) | — | NIF/CIF of the customer. |
176
+ | [`CustomerBuilder.email(email)`](customer-builder.md#customer-builder-email) | — | Contact email. |
177
+ | [`CustomerBuilder.phone(phone)`](customer-builder.md#customer-builder-phone) | — | Contact phone: 9 to 20 characters of digits, spaces, dashes, parentheses and a leading `+`. |
178
+ | [`CustomerBuilder.address(street, number, postalCode, city, province, country, countryCode?)`](customer-builder.md#customer-builder-address) | — | Fiscal address. |
179
+ | [`CustomerBuilder.notes(notes)`](customer-builder.md#customer-builder-notes) | — | Internal notes about the customer. |
180
+ | [`CustomerBuilder.build()`](customer-builder.md#customer-builder-build) | — | Build the request body. |
181
+ | [`InvoiceBuilder.create()`](invoice-builder.md#invoice-builder-create) | — | Start a new builder. |
182
+ | [`InvoiceBuilder.type(type)`](invoice-builder.md#invoice-builder-type) | — | Set the invoice type. |
183
+ | [`InvoiceBuilder.forCustomer(customerId)`](invoice-builder.md#invoice-builder-for-customer) | — | Invoice a registered customer. |
184
+ | [`InvoiceBuilder.operationDate(date)`](invoice-builder.md#invoice-builder-operation-date) | — | Date the operation took place, when it differs from the issue date. |
185
+ | [`InvoiceBuilder.dueDate(date)`](invoice-builder.md#invoice-builder-due-date) | — | Payment due date. |
186
+ | [`InvoiceBuilder.mainTax(tax)`](invoice-builder.md#invoice-builder-main-tax) | — | Main tax applied to every line added with `addLine` after this call, unless the line passes its own. |
187
+ | [`InvoiceBuilder.addLine(description, quantity, unitPrice, discountPercentage?, mainTax?)`](invoice-builder.md#invoice-builder-add-line) | — | Add a `NORMAL` line. |
188
+ | [`InvoiceBuilder.addLineObject(line)`](invoice-builder.md#invoice-builder-add-line-object) | — | Add a line exactly as given — any line type or pricing mode. |
189
+ | [`InvoiceBuilder.notes(notes)`](invoice-builder.md#invoice-builder-notes) | — | Notes printed on the invoice. |
190
+ | [`InvoiceBuilder.series(id)`](invoice-builder.md#invoice-builder-series) | — | Number the invoice in this series instead of the default one. |
191
+ | [`InvoiceBuilder.metadata(data)`](invoice-builder.md#invoice-builder-metadata) | — | Your own key/value pairs, filterable when listing. |
192
+ | [`InvoiceBuilder.build()`](invoice-builder.md#invoice-builder-build) | — | Build the request body. |
193
+ | [`WebhookVerifier.verify(rawBody, signatureHeader)`](webhook-verifier.md#webhook-verifier-verify) | via `parseSignatureHeader`, `computeSignature`, `secureCompare` | Verify a webhook signature and return the parsed event |
194
+ | [`beel.configuration.getTaxConfig()`](configuration.md#configuration-get-tax-config) | `GET /v1/configuration/taxes` | Get the tax configuration (default VAT, IRPF…) of the focused company. |
195
+ | [`beel.configuration.updateTaxConfig(body)`](configuration.md#configuration-update-tax-config) | `PUT /v1/configuration/taxes` | Replace the tax configuration of the focused company. |
196
+ | [`beel.configuration.getTaxTypes()`](configuration.md#configuration-get-tax-types) | `GET /v1/configuration/tax-types` | Tax types the API accepts (IVA/IGIC rates, IRPF types, equivalence surcharges). |
197
+ | [`beel.configuration.getInvoiceCustomizationOptions()`](configuration.md#configuration-get-invoice-customization-options) | `GET /v1/configuration/invoice-customization-options` | Invoice customization options (templates, colors…). |
198
+ | [`beel.configuration.updateLanguage(language)`](configuration.md#configuration-update-language) | `PUT /v1/configuration/language` | Update the preferred language of the signed-in person. |
199
+ | [`beel.configuration.getVerifactu()`](configuration.md#configuration-get-verifactu) | `GET /v1/configuration/verifactu` | Get the VeriFactu configuration of the focused company. |
200
+ | [`beel.configuration.updateVerifactu(body)`](configuration.md#configuration-update-verifactu) | `PUT /v1/configuration/verifactu` | Update the VeriFactu configuration of the focused company. |
201
+ | [`beel.customers.list(params?)`](customers.md#customers-list) | `GET /v1/customers` | List customers with optional filters and pagination. |
202
+ | [`beel.customers.create(body)`](customers.md#customers-create) | `POST /v1/customers` | Create a new customer. |
203
+ | [`beel.customers.get(id)`](customers.md#customers-get) | `GET /v1/customers/{customer_id}` | Get a customer by ID. |
204
+ | [`beel.customers.update(id, body)`](customers.md#customers-update) | `PUT /v1/customers/{customer_id}` | Update a customer. |
205
+ | [`beel.customers.deactivate(id)`](customers.md#customers-deactivate) | `DELETE /v1/customers/{customer_id}` | Deactivate (soft-delete) a customer. |
206
+ | [`beel.invoices.list(params?)`](invoices.md#invoices-list) | `GET /v1/invoices` | List invoices with optional filters and pagination. |
207
+ | [`beel.invoices.create(body)`](invoices.md#invoices-create) | `POST /v1/invoices` | Create a new invoice. |
208
+ | [`beel.invoices.get(id)`](invoices.md#invoices-get) | `GET /v1/invoices/{invoice_id}` | Get an invoice by ID. |
209
+ | [`beel.invoices.update(id, body)`](invoices.md#invoices-update) | `PUT /v1/invoices/{invoice_id}` | Update a draft invoice. |
210
+ | [`beel.invoices.delete(id)`](invoices.md#invoices-delete) | `DELETE /v1/invoices/{invoice_id}` | Delete a draft invoice. |
211
+ | [`beel.invoices.duplicate(id, options?)`](invoices.md#invoices-duplicate) | `POST /v1/invoices/{invoice_id}/duplicate` | Duplicate an invoice, optionally into a different series. |
212
+ | [`beel.invoices.issue(id, options?)`](invoices.md#invoices-issue) | `POST /v1/invoices/{invoice_id}/issue` | Issue a draft invoice. |
213
+ | [`beel.invoices.markPaid(id, options?)`](invoices.md#invoices-mark-paid) | `POST /v1/invoices/{invoice_id}/mark-paid` | Mark an invoice as paid. |
214
+ | [`beel.invoices.markSent(id, options?)`](invoices.md#invoices-mark-sent) | `POST /v1/invoices/{invoice_id}/mark-sent` | Mark an invoice as sent (e.g. delivered by other means). |
215
+ | [`beel.invoices.revertToIssued(id)`](invoices.md#invoices-revert-to-issued) | `POST /v1/invoices/{invoice_id}/revert-to-issued` | Revert a paid/sent invoice back to issued status. |
216
+ | [`beel.invoices.void(id, params)`](invoices.md#invoices-void) | `POST /v1/invoices/{invoice_id}/void` | Void an issued invoice. |
217
+ | [`beel.invoices.createCorrective(id, body)`](invoices.md#invoices-create-corrective) | `POST /v1/invoices/{invoice_id}/corrective` | Create a corrective invoice that references the original. |
218
+ | [`beel.invoices.schedule(id, params)`](invoices.md#invoices-schedule) | `POST /v1/invoices/{invoice_id}/schedule` | Schedule a draft invoice to be issued on a future date. |
219
+ | [`beel.invoices.unschedule(id)`](invoices.md#invoices-unschedule) | `POST /v1/invoices/{invoice_id}/unschedule` | Cancel a scheduled invoice, returning it to draft. |
220
+ | [`beel.invoices.reschedule(id, params)`](invoices.md#invoices-reschedule) | `PATCH /v1/invoices/{invoice_id}/reschedule` | Change the scheduled date of a scheduled invoice. |
221
+ | [`beel.invoices.getPdf(id)`](invoices.md#invoices-get-pdf) | `GET /v1/invoices/{invoice_id}/pdf` | Get a pre-signed URL to download the invoice PDF. |
222
+ | [`beel.invoices.sendEmail(id, options?)`](invoices.md#invoices-send-email) | `POST /v1/invoices/{invoice_id}/send` | Send an invoice by email. |
223
+ | [`beel.products.list(params?)`](products.md#products-list) | `GET /v1/products` | List products with optional filters and pagination. |
224
+ | [`beel.products.create(body)`](products.md#products-create) | `POST /v1/products` | Create a new product or service. |
225
+ | [`beel.products.get(id)`](products.md#products-get) | `GET /v1/products/{product_id}` | Get a product by ID. |
226
+ | [`beel.products.update(id, body)`](products.md#products-update) | `PUT /v1/products/{product_id}` | Update a product. |
227
+ | [`beel.products.delete(id)`](products.md#products-delete) | `DELETE /v1/products/{product_id}` | Delete a product permanently. |
228
+ | [`beel.products.search(q, limit?)`](products.md#products-search) | `GET /v1/products/search` | Search products by name or code. |
229
+ | [`beel.series.list(active?)`](series.md#series-list) | `GET /v1/configuration/series` | List all invoice series. |
230
+ | [`beel.series.create(body)`](series.md#series-create) | `POST /v1/configuration/series` | Create a new invoice series (e.g. "A-2026", "RECT"). |
231
+ | [`beel.series.update(id, body)`](series.md#series-update) | `PUT /v1/configuration/series/{series_id}` | Update a series (name, description, etc.). |
232
+ | [`beel.series.delete(id)`](series.md#series-delete) | `DELETE /v1/configuration/series/{series_id}` | Delete an invoice series. |
233
+ | [`beel.series.setDefault(id)`](series.md#series-set-default) | `POST /v1/configuration/series/{series_id}/default` | Set a series as the default for new invoices. |
@@ -0,0 +1,55 @@
1
+ <!-- Generated by `npm run docs:reference` from the SDK source and openapi/public-api.yaml. Do not edit. -->
2
+
3
+ # `beel.account(accountId).companies` — `AccountCompaniesResource`
4
+
5
+ [Reference index](README.md)
6
+
7
+ Companies (NIFs) of an account — where the `companyId` of `beel.company(companyId)`
8
+ comes from. Reach it as `beel.account(accountId).companies`.
9
+
10
+ ## Methods
11
+
12
+ | Method | HTTP | Summary |
13
+ |---|---|---|
14
+ | [`beel.account(accountId).companies.list(params?)`](#account-companies-list) | `GET /v1/accounts/{account_id}/companies` | List the account's companies, primary first. |
15
+ | [`beel.account(accountId).companies.create(body)`](#account-companies-create) | `POST /v1/accounts/{account_id}/companies` | Register a new company (NIF) under the account. |
16
+ | [`beel.account(accountId).companies.stats()`](#account-companies-stats) | `GET /v1/accounts/{account_id}/companies/stats` | Per-company invoice stats: how many fiscal documents each issued, and when last. |
17
+
18
+ <a id="account-companies-list"></a>
19
+ ### `list(params?)`
20
+
21
+ List the account's companies, primary first. Always paginated (20 by default).
22
+
23
+ - **HTTP:** `GET /v1/accounts/{account_id}/companies` · operation `listCompanies` · scopes `companies:list`
24
+ - **Parameters:**
25
+ - `params?: operations['listCompanies']['parameters']['query']` — `search`, `include`, `page`, `limit`.
26
+ - **Returns:** The `companies` of the page and its `pagination`. Response `200` `data`: `{ companies: CompanyData[]; pagination: Pagination }`.
27
+ - **Throws:** `400`/`500` `BeeLApiError` · `401`/`403` `BeeLAuthError` · `422` `BeeLValidationError` · `429` `BeeLRateLimitError`
28
+
29
+ **Example**
30
+
31
+ ```typescript
32
+ const { account_id } = await beel.catalogs.identity();
33
+ const { companies } = await beel.account(account_id).companies.list({ search: 'B12345678' });
34
+ const company = beel.company(companies[0].id!);
35
+ ```
36
+
37
+ <a id="account-companies-create"></a>
38
+ ### `create(body)`
39
+
40
+ Register a new company (NIF) under the account.
41
+
42
+ - **HTTP:** `POST /v1/accounts/{account_id}/companies` · operation `createCompany` · scopes `companies:write` · accepts `Idempotency-Key`
43
+ - **Parameters:**
44
+ - `body: components['schemas']['CreateCompanyRequest']` — NIF, legal name, entity type and address.
45
+ - **Returns:** The created company. Response `201` `data`: `CompanyCreatedData`.
46
+ - **Throws:** `400`/`402`/`500`/`502` `BeeLApiError` · `401`/`403` `BeeLAuthError` · `409` `BeeLConflictError` · `422` `BeeLValidationError` · `429` `BeeLRateLimitError`
47
+
48
+ <a id="account-companies-stats"></a>
49
+ ### `stats()`
50
+
51
+ Per-company invoice stats: how many fiscal documents each issued, and when last.
52
+
53
+ - **HTTP:** `GET /v1/accounts/{account_id}/companies/stats` · operation `listCompanyStats` · scopes `companies:list`
54
+ - **Returns:** One entry per company. Response `200` `data`: `{ stats: CompanyStatsData[]; pagination: Pagination }`.
55
+ - **Throws:** `400`/`500` `BeeLApiError` · `401`/`403` `BeeLAuthError` · `422` `BeeLValidationError` · `429` `BeeLRateLimitError`
@@ -0,0 +1,57 @@
1
+ <!-- Generated by `npm run docs:reference` from the SDK source and openapi/public-api.yaml. Do not edit. -->
2
+
3
+ # `beel.account(accountId).invitations` — `AccountInvitationsResource`
4
+
5
+ [Reference index](README.md)
6
+
7
+ Invitations to join an account. Reach it as `beel.account(accountId).invitations`.
8
+
9
+ ## Methods
10
+
11
+ | Method | HTTP | Summary |
12
+ |---|---|---|
13
+ | [`beel.account(accountId).invitations.list()`](#account-invitations-list) | `GET /v1/accounts/{account_id}/invitations` | List the account's invitations. |
14
+ | [`beel.account(accountId).invitations.create(body)`](#account-invitations-create) | `POST /v1/accounts/{account_id}/invitations` | Invite someone to join the account. |
15
+ | [`beel.account(accountId).invitations.get(invitationId)`](#account-invitations-get) | `GET /v1/accounts/{account_id}/invitations/{invitation_id}` | Get one invitation. |
16
+ | [`beel.account(accountId).invitations.revoke(invitationId)`](#account-invitations-revoke) | `DELETE /v1/accounts/{account_id}/invitations/{invitation_id}` | Revoke a `PENDING` invitation, so its link stops working. |
17
+
18
+ <a id="account-invitations-list"></a>
19
+ ### `list()`
20
+
21
+ List the account's invitations.
22
+
23
+ - **HTTP:** `GET /v1/accounts/{account_id}/invitations` · operation `listAccountInvitations` · scopes `members:read`
24
+ - **Returns:** The invitations. Response `200` `data`: `{ invitations: InvitationSummary[]; pagination: Pagination }`.
25
+ - **Throws:** `400`/`500` `BeeLApiError` · `401`/`403` `BeeLAuthError` · `422` `BeeLValidationError` · `429` `BeeLRateLimitError`
26
+
27
+ <a id="account-invitations-create"></a>
28
+ ### `create(body)`
29
+
30
+ Invite someone to join the account.
31
+
32
+ - **HTTP:** `POST /v1/accounts/{account_id}/invitations` · operation `createAccountInvitation` · scopes `members:write` · accepts `Idempotency-Key`
33
+ - **Parameters:**
34
+ - `body: operations['createAccountInvitation']['requestBody']['content']['application/json']` — `invited_email` and the `account_role` to grant.
35
+ - **Returns:** The invitation. Response `201` `data`: `Invitation`.
36
+ - **Throws:** `400`/`500` `BeeLApiError` · `401`/`403` `BeeLAuthError` · `409` `BeeLConflictError` · `422` `BeeLValidationError` · `429` `BeeLRateLimitError`
37
+
38
+ <a id="account-invitations-get"></a>
39
+ ### `get(invitationId)`
40
+
41
+ Get one invitation.
42
+
43
+ - **HTTP:** `GET /v1/accounts/{account_id}/invitations/{invitation_id}` · operation `getAccountInvitation` · scopes `members:read`
44
+ - **Parameters:**
45
+ - `invitationId: string` — Invitation UUID.
46
+ - **Returns:** The invitation. Response `200` `data`: `InvitationSummary`.
47
+ - **Throws:** `401`/`403` `BeeLAuthError` · `404` `BeeLNotFoundError` · `429` `BeeLRateLimitError` · `500` `BeeLApiError`
48
+
49
+ <a id="account-invitations-revoke"></a>
50
+ ### `revoke(invitationId)`
51
+
52
+ Revoke a `PENDING` invitation, so its link stops working.
53
+
54
+ - **HTTP:** `DELETE /v1/accounts/{account_id}/invitations/{invitation_id}` · operation `deleteAccountInvitation` · scopes `members:write`
55
+ - **Parameters:**
56
+ - `invitationId: string` — Invitation UUID.
57
+ - **Throws:** `401`/`403` `BeeLAuthError` · `404` `BeeLNotFoundError` · `429` `BeeLRateLimitError` · `500` `BeeLApiError`
@@ -0,0 +1,97 @@
1
+ <!-- Generated by `npm run docs:reference` from the SDK source and openapi/public-api.yaml. Do not edit. -->
2
+
3
+ # `beel.account(accountId).members` — `AccountMembersResource`
4
+
5
+ [Reference index](README.md)
6
+
7
+ Members of an account and their per-company grants. Reach it as
8
+ `beel.account(accountId).members`.
9
+
10
+ ## Methods
11
+
12
+ | Method | HTTP | Summary |
13
+ |---|---|---|
14
+ | [`beel.account(accountId).members.list()`](#account-members-list) | `GET /v1/accounts/{account_id}/members` | List the account's members. |
15
+ | [`beel.account(accountId).members.get(memberId)`](#account-members-get) | `GET /v1/accounts/{account_id}/members/{member_id}` | Get one member. |
16
+ | [`beel.account(accountId).members.update(memberId, body)`](#account-members-update) | `PATCH /v1/accounts/{account_id}/members/{member_id}` | Change a member's account role. |
17
+ | [`beel.account(accountId).members.remove(memberId)`](#account-members-remove) | `DELETE /v1/accounts/{account_id}/members/{member_id}` | Remove a member from the account. |
18
+ | [`beel.account(accountId).members.listGrants(memberId)`](#account-members-list-grants) | `GET /v1/accounts/{account_id}/members/{member_id}/grants` | List a member's per-company grants. |
19
+ | [`beel.account(accountId).members.putGrant(memberId, companyId, body)`](#account-members-put-grant) | `PUT /v1/accounts/{account_id}/members/{member_id}/grants/{company_id}` | Grant a member access to one company, or replace the grant it has. |
20
+ | [`beel.account(accountId).members.removeGrant(memberId, companyId)`](#account-members-remove-grant) | `DELETE /v1/accounts/{account_id}/members/{member_id}/grants/{company_id}` | Revoke a member's access to one company. |
21
+
22
+ <a id="account-members-list"></a>
23
+ ### `list()`
24
+
25
+ List the account's members.
26
+
27
+ - **HTTP:** `GET /v1/accounts/{account_id}/members` · operation `listAccountMembers` · scopes `members:read`
28
+ - **Returns:** The members (`data.members` of the response), as an array. Response `200` `data`: `{ members: AccountMember[]; pagination: Pagination }`.
29
+ - **Throws:** `400`/`500` `BeeLApiError` · `401`/`403` `BeeLAuthError` · `422` `BeeLValidationError` · `429` `BeeLRateLimitError`
30
+
31
+ <a id="account-members-get"></a>
32
+ ### `get(memberId)`
33
+
34
+ Get one member.
35
+
36
+ - **HTTP:** `GET /v1/accounts/{account_id}/members/{member_id}` · operation `getAccountMember` · scopes `members:read`
37
+ - **Parameters:**
38
+ - `memberId: string` — Member UUID.
39
+ - **Returns:** The member. Response `200` `data`: `AccountMember`.
40
+ - **Throws:** `400`/`500` `BeeLApiError` · `401`/`403` `BeeLAuthError` · `404` `BeeLNotFoundError` · `429` `BeeLRateLimitError`
41
+
42
+ <a id="account-members-update"></a>
43
+ ### `update(memberId, body)`
44
+
45
+ Change a member's account role.
46
+
47
+ - **HTTP:** `PATCH /v1/accounts/{account_id}/members/{member_id}` · operation `patchAccountMember` · scopes `members:write`
48
+ - **Parameters:**
49
+ - `memberId: string` — Member UUID.
50
+ - `body: operations['patchAccountMember']['requestBody']['content']['application/json']` — The new `account_role`.
51
+ - **Returns:** The updated member. Response `200` `data`: `AccountMember`.
52
+ - **Throws:** `400`/`500` `BeeLApiError` · `401`/`403` `BeeLAuthError` · `404` `BeeLNotFoundError` · `422` `BeeLValidationError` · `429` `BeeLRateLimitError`
53
+
54
+ <a id="account-members-remove"></a>
55
+ ### `remove(memberId)`
56
+
57
+ Remove a member from the account.
58
+
59
+ - **HTTP:** `DELETE /v1/accounts/{account_id}/members/{member_id}` · operation `deleteAccountMember` · scopes `members:write`
60
+ - **Parameters:**
61
+ - `memberId: string` — Member UUID.
62
+ - **Throws:** `400`/`500` `BeeLApiError` · `401`/`403` `BeeLAuthError` · `404` `BeeLNotFoundError` · `429` `BeeLRateLimitError`
63
+
64
+ <a id="account-members-list-grants"></a>
65
+ ### `listGrants(memberId)`
66
+
67
+ List a member's per-company grants.
68
+
69
+ - **HTTP:** `GET /v1/accounts/{account_id}/members/{member_id}/grants` · operation `listAccountMemberGrants` · scopes `members:read`
70
+ - **Parameters:**
71
+ - `memberId: string` — Member UUID.
72
+ - **Returns:** The `grants` and their `pagination`. Response `200` `data`: `{ grants: MemberGrant[]; pagination: Pagination }`.
73
+ - **Throws:** `401`/`403` `BeeLAuthError` · `404` `BeeLNotFoundError` · `422` `BeeLValidationError` · `429` `BeeLRateLimitError` · `500` `BeeLApiError`
74
+
75
+ <a id="account-members-put-grant"></a>
76
+ ### `putGrant(memberId, companyId, body)`
77
+
78
+ Grant a member access to one company, or replace the grant it has.
79
+
80
+ - **HTTP:** `PUT /v1/accounts/{account_id}/members/{member_id}/grants/{company_id}` · operation `putAccountMemberGrant` · scopes `members:write`
81
+ - **Parameters:**
82
+ - `memberId: string` — Member UUID.
83
+ - `companyId: string` — Company UUID.
84
+ - `body: operations['putAccountMemberGrant']['requestBody']['content']['application/json']` — The `access_level` to grant.
85
+ - **Returns:** The grant. Response `200` `data`: `GrantAssignment`.
86
+ - **Throws:** `400`/`500` `BeeLApiError` · `401`/`403` `BeeLAuthError` · `404` `BeeLNotFoundError` · `422` `BeeLValidationError` · `429` `BeeLRateLimitError`
87
+
88
+ <a id="account-members-remove-grant"></a>
89
+ ### `removeGrant(memberId, companyId)`
90
+
91
+ Revoke a member's access to one company.
92
+
93
+ - **HTTP:** `DELETE /v1/accounts/{account_id}/members/{member_id}/grants/{company_id}` · operation `deleteAccountMemberGrant` · scopes `members:write`
94
+ - **Parameters:**
95
+ - `memberId: string` — Member UUID.
96
+ - `companyId: string` — Company UUID.
97
+ - **Throws:** `401`/`403` `BeeLAuthError` · `404` `BeeLNotFoundError` · `429` `BeeLRateLimitError` · `500` `BeeLApiError`
@@ -0,0 +1,123 @@
1
+ <!-- Generated by `npm run docs:reference` from the SDK source and openapi/public-api.yaml. Do not edit. -->
2
+
3
+ # `beel.account(accountId).webhooks` — `AccountWebhooksResource`
4
+
5
+ [Reference index](README.md)
6
+
7
+ Webhook subscriptions of an account. Reach it as `beel.account(accountId).webhooks`;
8
+ verify deliveries with `WebhookVerifier`.
9
+
10
+ ## Methods
11
+
12
+ | Method | HTTP | Summary |
13
+ |---|---|---|
14
+ | [`beel.account(accountId).webhooks.list(params?)`](#account-webhooks-list) | `GET /v1/accounts/{account_id}/webhooks` | List the webhook subscriptions. |
15
+ | [`beel.account(accountId).webhooks.create(body)`](#account-webhooks-create) | `POST /v1/accounts/{account_id}/webhooks` | Subscribe an HTTPS endpoint to events. |
16
+ | [`beel.account(accountId).webhooks.get(webhookId)`](#account-webhooks-get) | `GET /v1/accounts/{account_id}/webhooks/{webhook_id}` | Get one webhook subscription. |
17
+ | [`beel.account(accountId).webhooks.update(webhookId, body)`](#account-webhooks-update) | `PATCH /v1/accounts/{account_id}/webhooks/{webhook_id}` | Update a webhook subscription. |
18
+ | [`beel.account(accountId).webhooks.delete(webhookId)`](#account-webhooks-delete) | `DELETE /v1/accounts/{account_id}/webhooks/{webhook_id}` | Delete a webhook subscription. |
19
+ | [`beel.account(accountId).webhooks.test(webhookId)`](#account-webhooks-test) | `POST /v1/accounts/{account_id}/webhooks/{webhook_id}/test` | Send a test event to the endpoint. |
20
+ | [`beel.account(accountId).webhooks.rotateSecret(webhookId)`](#account-webhooks-rotate-secret) | `POST /v1/accounts/{account_id}/webhooks/{webhook_id}/secret` | Rotate the signing secret. |
21
+ | [`beel.account(accountId).webhooks.listDeliveries(webhookId, params?)`](#account-webhooks-list-deliveries) | `GET /v1/accounts/{account_id}/webhooks/{webhook_id}/deliveries` | List the delivery attempts of a subscription. |
22
+ | [`beel.account(accountId).webhooks.retryDelivery(webhookId, deliveryId)`](#account-webhooks-retry-delivery) | `POST /v1/accounts/{account_id}/webhooks/{webhook_id}/deliveries/{delivery_id}/retry` | Retry a failed delivery. |
23
+
24
+ <a id="account-webhooks-list"></a>
25
+ ### `list(params?)`
26
+
27
+ List the webhook subscriptions.
28
+
29
+ - **HTTP:** `GET /v1/accounts/{account_id}/webhooks` · operation `listAccountWebhookSubscriptions` · scopes `webhooks:read`
30
+ - **Parameters:**
31
+ - `params?: operations['listAccountWebhookSubscriptions']['parameters']['query']` — Pagination.
32
+ - **Returns:** The `webhooks` and their `pagination`. Response `200` `data`: `{ webhooks?: WebhookSubscription[]; pagination?: Pagination }`.
33
+ - **Throws:** `400`/`500` `BeeLApiError` · `401`/`403` `BeeLAuthError` · `422` `BeeLValidationError` · `429` `BeeLRateLimitError`
34
+
35
+ <a id="account-webhooks-create"></a>
36
+ ### `create(body)`
37
+
38
+ Subscribe an HTTPS endpoint to events.
39
+
40
+ - **HTTP:** `POST /v1/accounts/{account_id}/webhooks` · operation `createAccountWebhookSubscription` · scopes `webhooks:write` · accepts `Idempotency-Key`
41
+ - **Parameters:**
42
+ - `body: operations['createAccountWebhookSubscription']['requestBody']['content']['application/json']` — `url` and the `events` to receive.
43
+ - **Returns:** The subscription, with its signing secret. Response `201` `data`: `WebhookSubscriptionWithSecret`.
44
+ - **Throws:** `400`/`500` `BeeLApiError` · `401`/`403` `BeeLAuthError` · `422` `BeeLValidationError` · `429` `BeeLRateLimitError`
45
+
46
+ <a id="account-webhooks-get"></a>
47
+ ### `get(webhookId)`
48
+
49
+ Get one webhook subscription.
50
+
51
+ - **HTTP:** `GET /v1/accounts/{account_id}/webhooks/{webhook_id}` · operation `getAccountWebhookSubscription` · scopes `webhooks:read`
52
+ - **Parameters:**
53
+ - `webhookId: string` — Subscription UUID.
54
+ - **Returns:** The subscription. Response `200` `data`: `WebhookSubscription`.
55
+ - **Throws:** `401`/`403` `BeeLAuthError` · `404` `BeeLNotFoundError` · `429` `BeeLRateLimitError` · `500` `BeeLApiError`
56
+
57
+ <a id="account-webhooks-update"></a>
58
+ ### `update(webhookId, body)`
59
+
60
+ Update a webhook subscription. Only the fields present in `body` change.
61
+
62
+ - **HTTP:** `PATCH /v1/accounts/{account_id}/webhooks/{webhook_id}` · operation `patchAccountWebhookSubscription` · scopes `webhooks:write`
63
+ - **Parameters:**
64
+ - `webhookId: string` — Subscription UUID.
65
+ - `body: operations['patchAccountWebhookSubscription']['requestBody']['content']['application/json']` — Fields to change.
66
+ - **Returns:** The updated subscription. Response `200` `data`: `WebhookSubscription`.
67
+ - **Throws:** `400`/`500` `BeeLApiError` · `401`/`403` `BeeLAuthError` · `404` `BeeLNotFoundError` · `422` `BeeLValidationError` · `429` `BeeLRateLimitError`
68
+
69
+ <a id="account-webhooks-delete"></a>
70
+ ### `delete(webhookId)`
71
+
72
+ Delete a webhook subscription.
73
+
74
+ - **HTTP:** `DELETE /v1/accounts/{account_id}/webhooks/{webhook_id}` · operation `deleteAccountWebhookSubscription` · scopes `webhooks:write`
75
+ - **Parameters:**
76
+ - `webhookId: string` — Subscription UUID.
77
+ - **Throws:** `401`/`403` `BeeLAuthError` · `404` `BeeLNotFoundError` · `429` `BeeLRateLimitError` · `500` `BeeLApiError`
78
+
79
+ <a id="account-webhooks-test"></a>
80
+ ### `test(webhookId)`
81
+
82
+ Send a test event to the endpoint. Test deliveries carry `test: true`.
83
+
84
+ - **HTTP:** `POST /v1/accounts/{account_id}/webhooks/{webhook_id}/test` · operation `testAccountWebhookSubscription` · scopes `webhooks:write` · accepts `Idempotency-Key`
85
+ - **Parameters:**
86
+ - `webhookId: string` — Subscription UUID.
87
+ - **Returns:** The outcome of the delivery. Response `200` `data`: `WebhookTestResult`.
88
+ - **Throws:** `401`/`403` `BeeLAuthError` · `404` `BeeLNotFoundError` · `429` `BeeLRateLimitError` · `500` `BeeLApiError`
89
+
90
+ <a id="account-webhooks-rotate-secret"></a>
91
+ ### `rotateSecret(webhookId)`
92
+
93
+ Rotate the signing secret. The old secret stops working immediately.
94
+
95
+ - **HTTP:** `POST /v1/accounts/{account_id}/webhooks/{webhook_id}/secret` · operation `rotateAccountWebhookSecret` · scopes `webhooks:write` · accepts `Idempotency-Key`
96
+ - **Parameters:**
97
+ - `webhookId: string` — Subscription UUID.
98
+ - **Returns:** The subscription with its new secret. Response `200` `data`: `WebhookSubscriptionWithSecret`.
99
+ - **Throws:** `401`/`403` `BeeLAuthError` · `404` `BeeLNotFoundError` · `429` `BeeLRateLimitError` · `500` `BeeLApiError`
100
+
101
+ <a id="account-webhooks-list-deliveries"></a>
102
+ ### `listDeliveries(webhookId, params?)`
103
+
104
+ List the delivery attempts of a subscription.
105
+
106
+ - **HTTP:** `GET /v1/accounts/{account_id}/webhooks/{webhook_id}/deliveries` · operation `listAccountWebhookDeliveries` · scopes `webhooks:read`
107
+ - **Parameters:**
108
+ - `webhookId: string` — Subscription UUID.
109
+ - `params?: operations['listAccountWebhookDeliveries']['parameters']['query']` — Filters and pagination.
110
+ - **Returns:** The deliveries. Response `200` `data`: `{ deliveries?: WebhookDeliveryLog[]; pagination?: Pagination }`.
111
+ - **Throws:** `401`/`403` `BeeLAuthError` · `404` `BeeLNotFoundError` · `422` `BeeLValidationError` · `429` `BeeLRateLimitError` · `500` `BeeLApiError`
112
+
113
+ <a id="account-webhooks-retry-delivery"></a>
114
+ ### `retryDelivery(webhookId, deliveryId)`
115
+
116
+ Retry a failed delivery.
117
+
118
+ - **HTTP:** `POST /v1/accounts/{account_id}/webhooks/{webhook_id}/deliveries/{delivery_id}/retry` · operation `retryAccountWebhookDelivery` · scopes `webhooks:write` · accepts `Idempotency-Key`
119
+ - **Parameters:**
120
+ - `webhookId: string` — Subscription UUID.
121
+ - `deliveryId: string` — Delivery UUID.
122
+ - **Returns:** The new delivery attempt. Response `200` `data`: `WebhookDeliveryLog`.
123
+ - **Throws:** `401`/`403` `BeeLAuthError` · `404` `BeeLNotFoundError` · `429` `BeeLRateLimitError` · `500` `BeeLApiError`