@spaceinvoices/js-sdk 12.17.0 → 12.18.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.
@@ -9,9 +9,9 @@
9
9
  * EU-specific tax rules for automatic VAT handling and cross-border transactions
10
10
  */
11
11
  export interface EuTaxRules {
12
- /** Validate EU VAT numbers against the VIES API. When enabled, customer VAT numbers are checked for validity before creating invoices. Validation results are cached on customer records. If VIES is unavailable, invoice creation continues with a warning. */
12
+ /** Validate EU VAT numbers against the VIES API. When enabled, customer VAT numbers are checked for validity before creating invoices. Validation results are cached on customer records. If VIES is unavailable, invoice creation continues with a warning. When disabled, no VIES request is made and customer tax numbers are trusted as provided. */
13
13
  vies_validate_vat?: boolean;
14
- /** Automatically apply 0% tax (reverse charge) for intra-EU B2B transactions. When enabled, taxes are removed and replaced with reverse charge note for valid VIES-validated cross-border B2B sales. Requires vies_validate_vat to be enabled for VAT validation. */
14
+ /** Automatically apply 0% tax (reverse charge) for intra-EU B2B transactions. When enabled, taxes are marked reverse charged for cross-border B2B sales to a customer with a tax number: VIES-valid (or VIES unavailable) when vies_validate_vat is enabled, or the tax number as provided when vies_validate_vat is disabled. */
15
15
  auto_reverse_charge?: boolean;
16
16
  /** Automatically remove all taxes for exports to non-EU countries. When enabled, invoices to customers outside the EU will have all tax lines removed. */
17
17
  auto_remove_tax_export?: boolean;
@@ -9,9 +9,9 @@
9
9
  * EU-specific tax rules for automatic VAT handling and cross-border transactions
10
10
  */
11
11
  export interface EuTaxRules {
12
- /** Validate EU VAT numbers against the VIES API. When enabled, customer VAT numbers are checked for validity before creating invoices. Validation results are cached on customer records. If VIES is unavailable, invoice creation continues with a warning. */
12
+ /** Validate EU VAT numbers against the VIES API. When enabled, customer VAT numbers are checked for validity before creating invoices. Validation results are cached on customer records. If VIES is unavailable, invoice creation continues with a warning. When disabled, no VIES request is made and customer tax numbers are trusted as provided. */
13
13
  vies_validate_vat?: boolean;
14
- /** Automatically apply 0% tax (reverse charge) for intra-EU B2B transactions. When enabled, taxes are removed and replaced with reverse charge note for valid VIES-validated cross-border B2B sales. Requires vies_validate_vat to be enabled for VAT validation. */
14
+ /** Automatically apply 0% tax (reverse charge) for intra-EU B2B transactions. When enabled, taxes are marked reverse charged for cross-border B2B sales to a customer with a tax number: VIES-valid (or VIES unavailable) when vies_validate_vat is enabled, or the tax number as provided when vies_validate_vat is disabled. */
15
15
  auto_reverse_charge?: boolean;
16
16
  /** Automatically remove all taxes for exports to non-EU countries. When enabled, invoices to customers outside the EU will have all tax lines removed. */
17
17
  auto_remove_tax_export?: boolean;
@@ -30,6 +30,9 @@ When customer.is_end_consumer is true, forces B2C classification for non-EU tran
30
30
 
31
31
  **Non-Tax Subjects:**
32
32
  When issuer.is_tax_subject is false, all transactions are treated as B2C (no VIES validation, no reverse charge).
33
+
34
+ **Entity VIES setting:**
35
+ When the request selects an entity (X-Entity-Id header or an entity-scoped API key) whose `tax_rules.eu.vies_validate_vat` is false, no VIES request is made and the customer tax number is trusted as provided, the same as when saving a document for that entity. Without an entity, VIES validation runs as before.
33
36
  * @summary Check transaction type
34
37
  */
35
38
  export type checkTransactionTypeResponse200 = {
@@ -30,6 +30,9 @@ When customer.is_end_consumer is true, forces B2C classification for non-EU tran
30
30
 
31
31
  **Non-Tax Subjects:**
32
32
  When issuer.is_tax_subject is false, all transactions are treated as B2C (no VIES validation, no reverse charge).
33
+
34
+ **Entity VIES setting:**
35
+ When the request selects an entity (X-Entity-Id header or an entity-scoped API key) whose `tax_rules.eu.vies_validate_vat` is false, no VIES request is made and the customer tax number is trusted as provided, the same as when saving a document for that entity. Without an entity, VIES validation runs as before.
33
36
  * @summary Check transaction type
34
37
  */
35
38
  export type checkTransactionTypeResponse200 = {
@@ -30,8 +30,14 @@ When customer.is_end_consumer is true, forces B2C classification for non-EU tran
30
30
 
31
31
  **Non-Tax Subjects:**
32
32
  When issuer.is_tax_subject is false, all transactions are treated as B2C (no VIES validation, no reverse charge).
33
+
34
+ **Entity VIES setting:**
35
+ When the request selects an entity (X-Entity-Id header or an entity-scoped API key) whose `tax_rules.eu.vies_validate_vat` is false, no VIES request is made and the customer tax number is trusted as provided, the same as when saving a document for that entity. Without an entity, VIES validation runs as before.
33
36
  * @summary Check transaction type
34
37
  */
38
+ export declare const CheckTransactionTypeHeader: zod.ZodObject<{
39
+ "x-entity-id": zod.ZodOptional<zod.ZodString>;
40
+ }, zod.z.core.$strip>;
35
41
  export declare const checkTransactionTypeBodyIssuerCountryCodeMin = 2;
36
42
  export declare const checkTransactionTypeBodyIssuerCountryCodeMax = 2;
37
43
  export declare const checkTransactionTypeBodyIssuerIsTaxSubjectDefault = true;
@@ -30,8 +30,14 @@ When customer.is_end_consumer is true, forces B2C classification for non-EU tran
30
30
 
31
31
  **Non-Tax Subjects:**
32
32
  When issuer.is_tax_subject is false, all transactions are treated as B2C (no VIES validation, no reverse charge).
33
+
34
+ **Entity VIES setting:**
35
+ When the request selects an entity (X-Entity-Id header or an entity-scoped API key) whose `tax_rules.eu.vies_validate_vat` is false, no VIES request is made and the customer tax number is trusted as provided, the same as when saving a document for that entity. Without an entity, VIES validation runs as before.
33
36
  * @summary Check transaction type
34
37
  */
38
+ export declare const CheckTransactionTypeHeader: zod.ZodObject<{
39
+ "x-entity-id": zod.ZodOptional<zod.ZodString>;
40
+ }, zod.z.core.$strip>;
35
41
  export declare const checkTransactionTypeBodyIssuerCountryCodeMin = 2;
36
42
  export declare const checkTransactionTypeBodyIssuerCountryCodeMax = 2;
37
43
  export declare const checkTransactionTypeBodyIssuerIsTaxSubjectDefault = true;