@beel_es/sdk 2.1.0 → 2.2.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,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.2.0] - 2026-09-28
11
+
12
+ Contract resynced with the API as it runs in production today and types regenerated.
13
+
14
+ ### Added
15
+ - **The VeriFactu status webhook says which record changed.** The `verifactu.status.updated`
16
+ payload (`WebhookEventDataVeriFactuStatusUpdated`) carries `operation`: `REGISTRATION` for
17
+ the invoice's registration, `VOID` for the cancellation of a voided invoice. The API always
18
+ sends it. The enum is exported as `VeriFactuRecordOperation`.
19
+
20
+ ### Changed
21
+ - **`province` is optional in the `Address` you send.** It is only required for an address in
22
+ Spain (`country_code` `ES`, or no country); the API rejects a Spanish address without it with
23
+ a `422`. Code that sets it still compiles.
24
+ - Recurring invoices: `payment_term_days` documents how the due date of each generated invoice
25
+ is computed.
26
+
10
27
  ## [2.1.0] - 2026-09-28
11
28
 
12
29
  ### Fixed
package/dist/index.d.mts CHANGED
@@ -6482,10 +6482,12 @@ interface components {
6482
6482
  */
6483
6483
  city: string;
6484
6484
  /**
6485
- * @description Province or state - Latin characters only
6485
+ * @description Province or state - Latin characters only. Required for an address in Spain
6486
+ * (`country_code` `ES`, or no country at all); optional elsewhere, where many addresses
6487
+ * have none. A Spanish address without it is rejected with a `422`.
6486
6488
  * @example Madrid
6487
6489
  */
6488
- province: string;
6490
+ province?: string;
6489
6491
  /**
6490
6492
  * @description Country of the address, as its ISO 3166-1 alpha-2 code (`GB`) or its official name
6491
6493
  * in Spanish, English or Catalan (`Reino Unido`, `United Kingdom`, `Regne Unit`;
@@ -6545,7 +6547,7 @@ interface components {
6545
6547
  */
6546
6548
  city?: string;
6547
6549
  /**
6548
- * @description Province or state
6550
+ * @description Province or state. Outside Spain an address may have none.
6549
6551
  * @example Madrid
6550
6552
  */
6551
6553
  province?: string;
@@ -9880,6 +9882,10 @@ interface components {
9880
9882
  /**
9881
9883
  * @description Payment term, in days, of the template's own payment method. `null` when the template
9882
9884
  * has no payment method, or when it has one without a declared term.
9885
+ *
9886
+ * Each generated invoice is due on its issue date plus this term. When it is `null`, the
9887
+ * company's default `payment_term_days` (tax configuration) applies, or 30 days if the
9888
+ * company has none.
9883
9889
  */
9884
9890
  payment_term_days?: number | null;
9885
9891
  notes?: string | null;
@@ -15348,6 +15354,12 @@ interface components {
15348
15354
  invoice_number?: string | null;
15349
15355
  /** Format: uuid */
15350
15356
  verifactu_registration_id: string;
15357
+ /**
15358
+ * @description Which record changed status: the registration (`REGISTRATION`) or the cancellation of a
15359
+ * voided invoice (`VOID`). It is the record `verifactu_registration_id` identifies, the
15360
+ * same one `verifactu-records` lists with that `operation`.
15361
+ */
15362
+ operation: components["schemas"]["VeriFactuRecordOperation"];
15351
15363
  /**
15352
15364
  * @description Status of this registration before the change. Omitted on the first notification of a
15353
15365
  * registration, because there is no earlier status: the submission was just accepted for
@@ -34719,7 +34731,7 @@ declare class CompanyCustomersResource {
34719
34731
  door?: string | undefined;
34720
34732
  postal_code: string;
34721
34733
  city: string;
34722
- province: string;
34734
+ province?: string | undefined;
34723
34735
  country?: string | undefined;
34724
34736
  country_code?: string | undefined;
34725
34737
  } | undefined;
@@ -36372,6 +36384,19 @@ type WebhookEventDataRepresentationSigned = (WebhookEventDataAccountBase & {
36372
36384
  signed_at: string;
36373
36385
  });
36374
36386
 
36387
+ /**
36388
+ * Which record changed status: the invoice's registration or, if it was voided, its
36389
+ * cancellation. The same value as `operation` in the invoice's `verifactu-records`.
36390
+ *
36391
+ * * `REGISTRATION` — registration of the invoice.
36392
+ * * `VOID` — cancellation of a previously registered invoice.
36393
+ *
36394
+ */
36395
+ declare enum VeriFactuRecordOperation {
36396
+ REGISTRATION = "REGISTRATION",
36397
+ VOID = "VOID"
36398
+ }
36399
+
36375
36400
  /**
36376
36401
  * VeriFactu registration status. Every value is also a value of `verifactu.submission_status`
36377
36402
  * on the invoice resource, so a status read from a webhook can be fed straight back into the
@@ -36408,6 +36433,7 @@ type WebhookEventDataVeriFactuStatusUpdated = {
36408
36433
  * BeeL. VeriFactu registration identifier.
36409
36434
  */
36410
36435
  verifactu_registration_id: string;
36436
+ operation: VeriFactuRecordOperation;
36411
36437
  /**
36412
36438
  * Status of this registration before the change. Omitted on the first notification of a
36413
36439
  * registration, because there is no earlier status: the submission was just accepted for
@@ -36837,4 +36863,4 @@ type VeriFactuStatusUpdatedData = WebhookEventDataVeriFactuStatusUpdated;
36837
36863
  /** @deprecated Renamed in the contract — use `VeriFactuSubmissionStatus`. */
36838
36864
  type VeriFactuStatus = VeriFactuSubmissionStatus;
36839
36865
 
36840
- export { type AccountClaimedEvent, AccountCompaniesResource, AccountInvitationsResource, AccountMembersResource, AccountScope, AccountWebhooksResource, AccountsResource, BeeL, BeeLApiError, BeeLAuthError, type BeeLConfig, BeeLConflictError, type BeeLErrorCode, BeeLErrorCodes, BeeLNotFoundError, BeeLRateLimitError, BeeLValidationError, CatalogsResource, type CompanyCreatedEvent, CompanyCustomersResource, CompanyInvoiceScheduleResource, CompanyInvoicesResource, CompanyPaymentConnectionsResource, CompanyPaymentEventsResource, CompanyProductsResource, CompanyRecurringInvoicesResource, CompanyScope, CompanySeriesResource, CompanyTaxConfigurationResource, CompanyVeriFactuConfigurationResource, type CreateInvoiceOnceParams, type CreateInvoiceOnceRequest, CustomerBuilder, EXTERNAL_REF_UNIQUE_INVOICE_TYPES, type ExternalRefUniqueInvoiceType, InvoiceBuilder, type InvoiceEmailSentEvent, type InvoiceIssuedEvent, type InvoicePdfGeneratedEvent, type InvoiceScheduleFailedEvent, type InvoiceVoidedEvent, type RecurringInvoicePausedEvent, type RepresentationSignedEvent, type RequestOptions, type VeriFactuStatus, type VeriFactuStatusUpdatedData, type VeriFactuStatusUpdatedEvent, VeriFactuSubmissionStatus, type WebhookEvent, type WebhookEventDataAccountClaimed, type WebhookEventDataCompanyCreated, type WebhookEventDataInvoiceEmailSent, type WebhookEventDataInvoiceIssued, type WebhookEventDataInvoicePdfGenerated, type WebhookEventDataInvoiceScheduleFailed, type WebhookEventDataInvoiceVoided, type WebhookEventDataRecurringInvoicePaused, type WebhookEventDataRepresentationSigned, type WebhookEventDataTest, type WebhookEventDataVeriFactuStatusUpdated, type WebhookEventEnvelope, WebhookEventType, type WebhookTestEvent, WebhookVerificationError, WebhookVerifier, type components, type operations, type paths };
36866
+ export { type AccountClaimedEvent, AccountCompaniesResource, AccountInvitationsResource, AccountMembersResource, AccountScope, AccountWebhooksResource, AccountsResource, BeeL, BeeLApiError, BeeLAuthError, type BeeLConfig, BeeLConflictError, type BeeLErrorCode, BeeLErrorCodes, BeeLNotFoundError, BeeLRateLimitError, BeeLValidationError, CatalogsResource, type CompanyCreatedEvent, CompanyCustomersResource, CompanyInvoiceScheduleResource, CompanyInvoicesResource, CompanyPaymentConnectionsResource, CompanyPaymentEventsResource, CompanyProductsResource, CompanyRecurringInvoicesResource, CompanyScope, CompanySeriesResource, CompanyTaxConfigurationResource, CompanyVeriFactuConfigurationResource, type CreateInvoiceOnceParams, type CreateInvoiceOnceRequest, CustomerBuilder, EXTERNAL_REF_UNIQUE_INVOICE_TYPES, type ExternalRefUniqueInvoiceType, InvoiceBuilder, type InvoiceEmailSentEvent, type InvoiceIssuedEvent, type InvoicePdfGeneratedEvent, type InvoiceScheduleFailedEvent, type InvoiceVoidedEvent, type RecurringInvoicePausedEvent, type RepresentationSignedEvent, type RequestOptions, VeriFactuRecordOperation, type VeriFactuStatus, type VeriFactuStatusUpdatedData, type VeriFactuStatusUpdatedEvent, VeriFactuSubmissionStatus, type WebhookEvent, type WebhookEventDataAccountClaimed, type WebhookEventDataCompanyCreated, type WebhookEventDataInvoiceEmailSent, type WebhookEventDataInvoiceIssued, type WebhookEventDataInvoicePdfGenerated, type WebhookEventDataInvoiceScheduleFailed, type WebhookEventDataInvoiceVoided, type WebhookEventDataRecurringInvoicePaused, type WebhookEventDataRepresentationSigned, type WebhookEventDataTest, type WebhookEventDataVeriFactuStatusUpdated, type WebhookEventEnvelope, WebhookEventType, type WebhookTestEvent, WebhookVerificationError, WebhookVerifier, type components, type operations, type paths };
package/dist/index.d.ts CHANGED
@@ -6482,10 +6482,12 @@ interface components {
6482
6482
  */
6483
6483
  city: string;
6484
6484
  /**
6485
- * @description Province or state - Latin characters only
6485
+ * @description Province or state - Latin characters only. Required for an address in Spain
6486
+ * (`country_code` `ES`, or no country at all); optional elsewhere, where many addresses
6487
+ * have none. A Spanish address without it is rejected with a `422`.
6486
6488
  * @example Madrid
6487
6489
  */
6488
- province: string;
6490
+ province?: string;
6489
6491
  /**
6490
6492
  * @description Country of the address, as its ISO 3166-1 alpha-2 code (`GB`) or its official name
6491
6493
  * in Spanish, English or Catalan (`Reino Unido`, `United Kingdom`, `Regne Unit`;
@@ -6545,7 +6547,7 @@ interface components {
6545
6547
  */
6546
6548
  city?: string;
6547
6549
  /**
6548
- * @description Province or state
6550
+ * @description Province or state. Outside Spain an address may have none.
6549
6551
  * @example Madrid
6550
6552
  */
6551
6553
  province?: string;
@@ -9880,6 +9882,10 @@ interface components {
9880
9882
  /**
9881
9883
  * @description Payment term, in days, of the template's own payment method. `null` when the template
9882
9884
  * has no payment method, or when it has one without a declared term.
9885
+ *
9886
+ * Each generated invoice is due on its issue date plus this term. When it is `null`, the
9887
+ * company's default `payment_term_days` (tax configuration) applies, or 30 days if the
9888
+ * company has none.
9883
9889
  */
9884
9890
  payment_term_days?: number | null;
9885
9891
  notes?: string | null;
@@ -15348,6 +15354,12 @@ interface components {
15348
15354
  invoice_number?: string | null;
15349
15355
  /** Format: uuid */
15350
15356
  verifactu_registration_id: string;
15357
+ /**
15358
+ * @description Which record changed status: the registration (`REGISTRATION`) or the cancellation of a
15359
+ * voided invoice (`VOID`). It is the record `verifactu_registration_id` identifies, the
15360
+ * same one `verifactu-records` lists with that `operation`.
15361
+ */
15362
+ operation: components["schemas"]["VeriFactuRecordOperation"];
15351
15363
  /**
15352
15364
  * @description Status of this registration before the change. Omitted on the first notification of a
15353
15365
  * registration, because there is no earlier status: the submission was just accepted for
@@ -34719,7 +34731,7 @@ declare class CompanyCustomersResource {
34719
34731
  door?: string | undefined;
34720
34732
  postal_code: string;
34721
34733
  city: string;
34722
- province: string;
34734
+ province?: string | undefined;
34723
34735
  country?: string | undefined;
34724
34736
  country_code?: string | undefined;
34725
34737
  } | undefined;
@@ -36372,6 +36384,19 @@ type WebhookEventDataRepresentationSigned = (WebhookEventDataAccountBase & {
36372
36384
  signed_at: string;
36373
36385
  });
36374
36386
 
36387
+ /**
36388
+ * Which record changed status: the invoice's registration or, if it was voided, its
36389
+ * cancellation. The same value as `operation` in the invoice's `verifactu-records`.
36390
+ *
36391
+ * * `REGISTRATION` — registration of the invoice.
36392
+ * * `VOID` — cancellation of a previously registered invoice.
36393
+ *
36394
+ */
36395
+ declare enum VeriFactuRecordOperation {
36396
+ REGISTRATION = "REGISTRATION",
36397
+ VOID = "VOID"
36398
+ }
36399
+
36375
36400
  /**
36376
36401
  * VeriFactu registration status. Every value is also a value of `verifactu.submission_status`
36377
36402
  * on the invoice resource, so a status read from a webhook can be fed straight back into the
@@ -36408,6 +36433,7 @@ type WebhookEventDataVeriFactuStatusUpdated = {
36408
36433
  * BeeL. VeriFactu registration identifier.
36409
36434
  */
36410
36435
  verifactu_registration_id: string;
36436
+ operation: VeriFactuRecordOperation;
36411
36437
  /**
36412
36438
  * Status of this registration before the change. Omitted on the first notification of a
36413
36439
  * registration, because there is no earlier status: the submission was just accepted for
@@ -36837,4 +36863,4 @@ type VeriFactuStatusUpdatedData = WebhookEventDataVeriFactuStatusUpdated;
36837
36863
  /** @deprecated Renamed in the contract — use `VeriFactuSubmissionStatus`. */
36838
36864
  type VeriFactuStatus = VeriFactuSubmissionStatus;
36839
36865
 
36840
- export { type AccountClaimedEvent, AccountCompaniesResource, AccountInvitationsResource, AccountMembersResource, AccountScope, AccountWebhooksResource, AccountsResource, BeeL, BeeLApiError, BeeLAuthError, type BeeLConfig, BeeLConflictError, type BeeLErrorCode, BeeLErrorCodes, BeeLNotFoundError, BeeLRateLimitError, BeeLValidationError, CatalogsResource, type CompanyCreatedEvent, CompanyCustomersResource, CompanyInvoiceScheduleResource, CompanyInvoicesResource, CompanyPaymentConnectionsResource, CompanyPaymentEventsResource, CompanyProductsResource, CompanyRecurringInvoicesResource, CompanyScope, CompanySeriesResource, CompanyTaxConfigurationResource, CompanyVeriFactuConfigurationResource, type CreateInvoiceOnceParams, type CreateInvoiceOnceRequest, CustomerBuilder, EXTERNAL_REF_UNIQUE_INVOICE_TYPES, type ExternalRefUniqueInvoiceType, InvoiceBuilder, type InvoiceEmailSentEvent, type InvoiceIssuedEvent, type InvoicePdfGeneratedEvent, type InvoiceScheduleFailedEvent, type InvoiceVoidedEvent, type RecurringInvoicePausedEvent, type RepresentationSignedEvent, type RequestOptions, type VeriFactuStatus, type VeriFactuStatusUpdatedData, type VeriFactuStatusUpdatedEvent, VeriFactuSubmissionStatus, type WebhookEvent, type WebhookEventDataAccountClaimed, type WebhookEventDataCompanyCreated, type WebhookEventDataInvoiceEmailSent, type WebhookEventDataInvoiceIssued, type WebhookEventDataInvoicePdfGenerated, type WebhookEventDataInvoiceScheduleFailed, type WebhookEventDataInvoiceVoided, type WebhookEventDataRecurringInvoicePaused, type WebhookEventDataRepresentationSigned, type WebhookEventDataTest, type WebhookEventDataVeriFactuStatusUpdated, type WebhookEventEnvelope, WebhookEventType, type WebhookTestEvent, WebhookVerificationError, WebhookVerifier, type components, type operations, type paths };
36866
+ export { type AccountClaimedEvent, AccountCompaniesResource, AccountInvitationsResource, AccountMembersResource, AccountScope, AccountWebhooksResource, AccountsResource, BeeL, BeeLApiError, BeeLAuthError, type BeeLConfig, BeeLConflictError, type BeeLErrorCode, BeeLErrorCodes, BeeLNotFoundError, BeeLRateLimitError, BeeLValidationError, CatalogsResource, type CompanyCreatedEvent, CompanyCustomersResource, CompanyInvoiceScheduleResource, CompanyInvoicesResource, CompanyPaymentConnectionsResource, CompanyPaymentEventsResource, CompanyProductsResource, CompanyRecurringInvoicesResource, CompanyScope, CompanySeriesResource, CompanyTaxConfigurationResource, CompanyVeriFactuConfigurationResource, type CreateInvoiceOnceParams, type CreateInvoiceOnceRequest, CustomerBuilder, EXTERNAL_REF_UNIQUE_INVOICE_TYPES, type ExternalRefUniqueInvoiceType, InvoiceBuilder, type InvoiceEmailSentEvent, type InvoiceIssuedEvent, type InvoicePdfGeneratedEvent, type InvoiceScheduleFailedEvent, type InvoiceVoidedEvent, type RecurringInvoicePausedEvent, type RepresentationSignedEvent, type RequestOptions, VeriFactuRecordOperation, type VeriFactuStatus, type VeriFactuStatusUpdatedData, type VeriFactuStatusUpdatedEvent, VeriFactuSubmissionStatus, type WebhookEvent, type WebhookEventDataAccountClaimed, type WebhookEventDataCompanyCreated, type WebhookEventDataInvoiceEmailSent, type WebhookEventDataInvoiceIssued, type WebhookEventDataInvoicePdfGenerated, type WebhookEventDataInvoiceScheduleFailed, type WebhookEventDataInvoiceVoided, type WebhookEventDataRecurringInvoicePaused, type WebhookEventDataRepresentationSigned, type WebhookEventDataTest, type WebhookEventDataVeriFactuStatusUpdated, type WebhookEventEnvelope, WebhookEventType, type WebhookTestEvent, WebhookVerificationError, WebhookVerifier, type components, type operations, type paths };
package/dist/index.js CHANGED
@@ -59,6 +59,7 @@ __export(index_exports, {
59
59
  CustomerBuilder: () => CustomerBuilder,
60
60
  EXTERNAL_REF_UNIQUE_INVOICE_TYPES: () => EXTERNAL_REF_UNIQUE_INVOICE_TYPES,
61
61
  InvoiceBuilder: () => InvoiceBuilder,
62
+ VeriFactuRecordOperation: () => VeriFactuRecordOperation,
62
63
  VeriFactuSubmissionStatus: () => VeriFactuSubmissionStatus,
63
64
  WebhookEventType: () => WebhookEventType,
64
65
  WebhookVerificationError: () => WebhookVerificationError,
@@ -2761,6 +2762,13 @@ var RepresentationSignedEvent;
2761
2762
  })(type = RepresentationSignedEvent2.type || (RepresentationSignedEvent2.type = {}));
2762
2763
  })(RepresentationSignedEvent || (RepresentationSignedEvent = {}));
2763
2764
 
2765
+ // src/generated-webhooks/models/VeriFactuRecordOperation.ts
2766
+ var VeriFactuRecordOperation = /* @__PURE__ */ ((VeriFactuRecordOperation2) => {
2767
+ VeriFactuRecordOperation2["REGISTRATION"] = "REGISTRATION";
2768
+ VeriFactuRecordOperation2["VOID"] = "VOID";
2769
+ return VeriFactuRecordOperation2;
2770
+ })(VeriFactuRecordOperation || {});
2771
+
2764
2772
  // src/generated-webhooks/models/VeriFactuStatusUpdatedEvent.ts
2765
2773
  var VeriFactuStatusUpdatedEvent;
2766
2774
  ((VeriFactuStatusUpdatedEvent2) => {
@@ -3079,6 +3087,7 @@ var InvoiceBuilder = class _InvoiceBuilder {
3079
3087
  CustomerBuilder,
3080
3088
  EXTERNAL_REF_UNIQUE_INVOICE_TYPES,
3081
3089
  InvoiceBuilder,
3090
+ VeriFactuRecordOperation,
3082
3091
  VeriFactuSubmissionStatus,
3083
3092
  WebhookEventType,
3084
3093
  WebhookVerificationError,