@endevops/peppol-schema 0.1.3 → 0.1.4

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 (174) hide show
  1. package/README.md +5 -5
  2. package/dist/constants.d.ts +131 -0
  3. package/dist/constants.d.ts.map +1 -1
  4. package/dist/constants.js +114 -1
  5. package/dist/constants.js.map +1 -1
  6. package/dist/{index-BBzPjq7o.d.ts → index-CILtZytZ.d.ts} +1710 -669
  7. package/dist/index-CILtZytZ.d.ts.map +1 -0
  8. package/dist/index.d.ts +2 -2
  9. package/dist/index.js +1234 -187
  10. package/dist/index.js.map +1 -1
  11. package/dist/invoice-response-code-not-needs-schema-DNrfKYLh.js +36 -0
  12. package/dist/invoice-response-code-not-needs-schema-DNrfKYLh.js.map +1 -0
  13. package/dist/invoice-response-codes.d.ts +28 -0
  14. package/dist/invoice-response-codes.d.ts.map +1 -1
  15. package/dist/invoice-response-codes.js +11 -1
  16. package/dist/invoice-response-codes.js.map +1 -1
  17. package/dist/{is-valid-abn-160i38PG.js → is-valid-abn-D7eSygBG.js} +115 -2
  18. package/dist/is-valid-abn-D7eSygBG.js.map +1 -0
  19. package/dist/{is-valid-mod97-0208-CzMOXMO-.js → is-valid-mod97-0208-CjR324eG.js} +11 -1
  20. package/dist/is-valid-mod97-0208-CjR324eG.js.map +1 -0
  21. package/dist/message-level-response-profile-id-B9c0A7S_.js +27 -0
  22. package/dist/message-level-response-profile-id-B9c0A7S_.js.map +1 -0
  23. package/dist/{nodable-parser-CyDZtLCK.js → nodable-parser-CupS2H55.js} +31 -1
  24. package/dist/nodable-parser-CupS2H55.js.map +1 -0
  25. package/dist/schematron.d.ts +57 -1
  26. package/dist/schematron.d.ts.map +1 -1
  27. package/dist/schematron.js +453 -2
  28. package/dist/schematron.js.map +1 -1
  29. package/dist/validations.d.ts +132 -0
  30. package/dist/validations.d.ts.map +1 -1
  31. package/dist/validations.js +11 -2
  32. package/dist/validations.js.map +1 -1
  33. package/dist/values.d.ts +67 -2
  34. package/dist/values.d.ts.map +1 -1
  35. package/dist/xml.d.ts +30 -0
  36. package/dist/xml.d.ts.map +1 -1
  37. package/dist/xml.js +10 -1
  38. package/dist/xml.js.map +1 -1
  39. package/package.json +1 -1
  40. package/src/constants/credit-note-doctype-id.ts +9 -0
  41. package/src/constants/credit-note-process-id.ts +9 -0
  42. package/src/constants/document-scheme.ts +9 -0
  43. package/src/constants/invoice-doctype-id.ts +9 -0
  44. package/src/constants/invoice-process-id.ts +10 -0
  45. package/src/constants/invoice-response-doctype-id.ts +10 -0
  46. package/src/constants/invoice-response-process-id.ts +9 -0
  47. package/src/constants/invoice-response-profile-id.ts +9 -0
  48. package/src/constants/message-level-response-doctype-id.ts +10 -0
  49. package/src/constants/message-level-response-process-id.ts +9 -0
  50. package/src/constants/message-level-response-profile-id.ts +9 -0
  51. package/src/constants/participant-scheme.ts +10 -0
  52. package/src/constants/process-scheme.ts +9 -0
  53. package/src/constants/transport-profile.ts +10 -0
  54. package/src/invoice-response-codes/invoice-response-code-needs-schema.ts +9 -0
  55. package/src/invoice-response-codes/invoice-response-code-not-needs-schema.ts +9 -0
  56. package/src/invoice-response-codes/invoice-response-codes-order.ts +10 -0
  57. package/src/peppol-validations/add-piva.ts +12 -0
  58. package/src/peppol-validations/check-cf.ts +11 -0
  59. package/src/peppol-validations/check-cf16.ts +12 -0
  60. package/src/peppol-validations/check-piva-se-it.ts +11 -0
  61. package/src/peppol-validations/check-piva.ts +11 -0
  62. package/src/peppol-validations/check-se-orgnr.ts +9 -0
  63. package/src/peppol-validations/greek-tin-verification.ts +9 -0
  64. package/src/peppol-validations/is-valid-abn.ts +9 -0
  65. package/src/peppol-validations/is-valid-gln.ts +10 -0
  66. package/src/peppol-validations/is-valid-iban.ts +10 -0
  67. package/src/peppol-validations/is-valid-mod11.ts +9 -0
  68. package/src/peppol-validations/is-valid-mod97-0208.ts +10 -0
  69. package/src/peppol-validations/luhn-check.ts +9 -0
  70. package/src/schemas/fields/default-customization-id.ts +9 -0
  71. package/src/schemas/fields/default-profile-id.ts +9 -0
  72. package/src/schemas/fields/peppol-additional-document-reference-schema.ts +41 -2
  73. package/src/schemas/fields/peppol-address-schema.ts +25 -2
  74. package/src/schemas/fields/peppol-allowance-charge-schema.ts +65 -9
  75. package/src/schemas/fields/peppol-amount-schema.ts +15 -2
  76. package/src/schemas/fields/peppol-base-line-schema.ts +12 -2
  77. package/src/schemas/fields/peppol-billing-reference-schema.ts +13 -0
  78. package/src/schemas/fields/peppol-binary-object-schema.ts +12 -4
  79. package/src/schemas/fields/peppol-contact-schema.ts +11 -0
  80. package/src/schemas/fields/peppol-credit-note-line-schema.ts +7 -2
  81. package/src/schemas/fields/peppol-delivery-schema.ts +44 -2
  82. package/src/schemas/fields/peppol-identifier-schema.ts +8 -0
  83. package/src/schemas/fields/peppol-invoice-line-period-schema.ts +11 -0
  84. package/src/schemas/fields/peppol-invoice-line-schema.ts +9 -2
  85. package/src/schemas/fields/peppol-invoice-period-schema.ts +2 -2
  86. package/src/schemas/fields/peppol-item-classification-schema.ts +2 -2
  87. package/src/schemas/fields/peppol-line-allowance-charge-schema.ts +57 -9
  88. package/src/schemas/fields/peppol-line-item-schema.ts +69 -4
  89. package/src/schemas/fields/peppol-line-price-allowance-charge-schema.ts +20 -0
  90. package/src/schemas/fields/peppol-line-price-schema.ts +2 -0
  91. package/src/schemas/fields/peppol-order-reference-schema.ts +2 -0
  92. package/src/schemas/fields/peppol-party-base-schema.ts +36 -4
  93. package/src/schemas/fields/peppol-party-legal-entity-schema.ts +13 -0
  94. package/src/schemas/fields/peppol-party-tax-scheme-schema.ts +5 -0
  95. package/src/schemas/fields/peppol-payee-party-schema.ts +2 -2
  96. package/src/schemas/fields/peppol-payment-means-schema.ts +62 -2
  97. package/src/schemas/fields/peppol-payment-terms-schema.ts +2 -0
  98. package/src/schemas/fields/peppol-quantity-schema.ts +4 -2
  99. package/src/schemas/fields/peppol-reference-schema.ts +20 -1
  100. package/src/schemas/fields/peppol-tax-category-schema.ts +12 -2
  101. package/src/schemas/fields/peppol-tax-representative-schema.ts +5 -0
  102. package/src/schemas/fields/peppol-tax-subtotal-category-schema.ts +3 -0
  103. package/src/schemas/fields/peppol-tax-subtotal-schema.ts +2 -0
  104. package/src/schemas/fields/peppol-tax-totals-base-schema.ts +5 -0
  105. package/src/schemas/peppol-billing-base-schema.ts +47 -7
  106. package/src/schemas/peppol-credit-note-schema.ts +2 -2
  107. package/src/schemas/peppol-document-response-document-reference-schema.ts +15 -2
  108. package/src/schemas/peppol-document-response-document-schema.ts +8 -3
  109. package/src/schemas/peppol-document-response-line-response-content-schema.ts +22 -2
  110. package/src/schemas/peppol-document-response-line-response-schema.ts +26 -0
  111. package/src/schemas/peppol-document-schema.ts +74 -9
  112. package/src/schemas/peppol-invoice-response-document-actual-response-schema.ts +58 -5
  113. package/src/schemas/peppol-invoice-response-document-actual-response-status-schema.ts +25 -2
  114. package/src/schemas/peppol-invoice-response-schema.ts +57 -4
  115. package/src/schemas/peppol-invoice-response-status-reason-code-schema.ts +37 -10
  116. package/src/schemas/peppol-invoice-schema.ts +30 -2
  117. package/src/schemas/peppol-message-level-response-document-response-schema.ts +10 -0
  118. package/src/schemas/peppol-message-level-response-party-schema.ts +10 -0
  119. package/src/schemas/peppol-message-level-response-schema.ts +18 -0
  120. package/src/schemas/utils/format-quantity-with-unit.ts +19 -0
  121. package/src/schemas/utils/get-credit-note-type-code-description.ts +12 -0
  122. package/src/schemas/utils/get-invoice-type-code-description.ts +12 -0
  123. package/src/schemas/utils/is-valid-credit-note-type-code.ts +13 -0
  124. package/src/schemas/utils/is-valid-invoice-type-code.ts +13 -0
  125. package/src/schemas/utils/is-valid-process.ts +13 -0
  126. package/src/schemas/utils/peppol-base-64-schema.ts +14 -4
  127. package/src/schemas/utils/peppol-vat-regex-schema.ts +38 -30
  128. package/src/schemas/utils/peppol-xsd-time-schema.ts +12 -2
  129. package/src/schemas/utils/quantity-unit-code-to-intl-unit.ts +34 -0
  130. package/src/schemas/values/additional-document-reference-code-schema.ts +9 -15
  131. package/src/schemas/values/allowance-charge-reason-code-schema.ts +12 -14
  132. package/src/schemas/values/application-response-type-code-schema.ts +10 -14
  133. package/src/schemas/values/charge-reason-code-schema.ts +12 -14
  134. package/src/schemas/values/credit-note-type-code-schema.ts +8 -14
  135. package/src/schemas/values/currency-code-schema.ts +13 -16
  136. package/src/schemas/values/document-type-schemes-schema.ts +9 -5
  137. package/src/schemas/values/document-type-values-schema.ts +5 -6
  138. package/src/schemas/values/duty-tax-fee-category-schema.ts +15 -13
  139. package/src/schemas/values/electronic-codes-schema.ts +10 -12
  140. package/src/schemas/values/icd-codes-schema.ts +8 -12
  141. package/src/schemas/values/invoice-status-code-schema.ts +10 -12
  142. package/src/schemas/values/invoice-type-code-schema.ts +10 -12
  143. package/src/schemas/values/item-classification-codes-schema.ts +10 -12
  144. package/src/schemas/values/mime-codes-schema.ts +12 -14
  145. package/src/schemas/values/op-status-action-schema.ts +10 -12
  146. package/src/schemas/values/op-status-reason-schema.ts +10 -12
  147. package/src/schemas/values/participant-identifier-code-schema.ts +10 -13
  148. package/src/schemas/values/payment-means-code-schema.ts +10 -12
  149. package/src/schemas/values/peppol-country-code-schema.ts +10 -9
  150. package/src/schemas/values/peppol-document-type-code-schema.ts +10 -12
  151. package/src/schemas/values/peppol-document-type-schema.ts +12 -21
  152. package/src/schemas/values/peppol-process-schema.ts +19 -15
  153. package/src/schemas/values/process-from-document-type-schema.ts +3 -3
  154. package/src/schemas/values/quantity-unit-codes-schema.ts +10 -12
  155. package/src/schemas/values/vat-date-code-schema.ts +12 -5
  156. package/src/schemas/values/vatex-code-schema.ts +8 -12
  157. package/src/schematron/errors.ts +14 -0
  158. package/src/schematron/helpers.ts +451 -0
  159. package/src/schematron/run-all-rules.ts +10 -0
  160. package/src/schematron/schematron.ts +25 -0
  161. package/src/xml/builder-options.ts +9 -0
  162. package/src/xml/common-xml-options.ts +9 -0
  163. package/src/xml/nodable-parser.ts +12 -0
  164. package/src/xml/parser-options.ts +9 -0
  165. package/dist/index-BBzPjq7o.d.ts.map +0 -1
  166. package/dist/invoice-response-code-not-needs-schema-p_RKKNLc.js +0 -18
  167. package/dist/invoice-response-code-not-needs-schema-p_RKKNLc.js.map +0 -1
  168. package/dist/is-valid-abn-160i38PG.js.map +0 -1
  169. package/dist/is-valid-mod97-0208-CzMOXMO-.js.map +0 -1
  170. package/dist/message-level-response-profile-id-DBpOW91B.js +0 -9
  171. package/dist/message-level-response-profile-id-DBpOW91B.js.map +0 -1
  172. package/dist/nodable-parser-CyDZtLCK.js.map +0 -1
  173. package/dist/vat-dates.generated-CxFvt7m3.d.ts +0 -68
  174. package/dist/vat-dates.generated-CxFvt7m3.d.ts.map +0 -1
@@ -1,4 +1,3 @@
1
- import { i as ApplicationResponseTypeCodesKeys, s as CreditNoteTypeCodesKeys, t as VatDateCodesKeys } from "./vat-dates.generated-CxFvt7m3.js";
2
1
  import { DateTime, Schema } from "effect";
3
2
  //#region src/schemas/utils/opaque.d.ts
4
3
  /**
@@ -20,115 +19,40 @@ declare const PeppolIsoDateString_base: OpaqueSchema<PeppolIsoDateString, Schema
20
19
  */
21
20
  declare class PeppolIsoDateString extends PeppolIsoDateString_base {}
22
21
  //#endregion
23
- //#region src/schemas/fields/peppol-amount-schema.d.ts
24
- declare const PeppolAmount_base: OpaqueSchema<PeppolAmount, Schema.Struct<{
25
- /**
26
- * @name \@currencyID
27
- */
28
- readonly currencyId: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolCurrencyCode">;
29
- /**
30
- * @name #text (value)
31
- */
32
- readonly value: Schema.Finite;
33
- }>>;
22
+ //#region src/schemas/utils/peppol-base-64-schema.d.ts
23
+ declare const PeppolBase64_base: OpaqueSchema<PeppolBase64, Schema.String>;
34
24
  /**
35
- * @summary Monetary amount with mandatory currency
25
+ * @description RFC 4648 base64 string (PEM / MIME / XML line endings tolerated). Effect port of `base64Schema` (`z.string().check(z.refine(...))`): strips CRLF /
26
+ * LF line endings before testing the quantum regex.
36
27
  *
37
- * @name cbc:* (+ @currencyID)
28
+ * @example
29
+ * ```ts
30
+ * const value = 'SGVsbG8=';
31
+ * ```;
38
32
  */
39
- declare class PeppolAmount extends PeppolAmount_base {}
40
- interface PeppolAmountEncoded extends Schema.Codec.Encoded<typeof PeppolAmount> {}
33
+ declare class PeppolBase64 extends PeppolBase64_base {}
34
+ /**
35
+ * @description Alias of {@link PeppolBase64} for callers that prefer the shorter name.
36
+ */
37
+ type Base64 = PeppolBase64;
41
38
  //#endregion
42
- //#region src/schemas/fields/peppol-allowance-charge-schema.d.ts
43
- declare const PeppolTaxCategoryTaxSchemeId_base: OpaqueSchema<PeppolTaxCategoryTaxSchemeId, Schema.Struct<{
44
- /**
45
- * @description Mandatory element. Use "VAT"
46
- *
47
- * @name `cbc:ID`
48
- */
49
- readonly id: Schema.withDecodingDefaultType<Schema.String, never>;
50
- }>>;
51
- declare class PeppolTaxCategoryTaxSchemeId extends PeppolTaxCategoryTaxSchemeId_base {}
52
- declare const BaseAllowanceCharge_base: OpaqueSchema<BaseAllowanceCharge, Schema.Struct<{
53
- readonly amount: typeof PeppolAmount;
54
- readonly baseAmount: Schema.optional<typeof PeppolAmount>;
55
- readonly chargeIndicator: Schema.Boolean;
56
- readonly allowanceChargeReason: Schema.optional<Schema.String>;
57
- readonly multiplierFactorNumeric: Schema.optional<Schema.Finite>;
58
- /**
59
- * @summary TAX CATEGORY
60
- *
61
- * @name cac:TaxCategory
62
- */
63
- readonly taxCategory: Schema.optional<Schema.Struct<{
64
- readonly id: Schema.brand<Schema.Literals<readonly ["AE", "E", "S", "Z", "G", "O", "K", "L", "M", "B"]>, "PeppolDutyTaxFeeCategoryCode">;
65
- readonly percent: Schema.optional<Schema.Finite>;
66
- readonly taxSchemeId: typeof PeppolTaxCategoryTaxSchemeId;
67
- }>>;
68
- }>>;
69
- declare class BaseAllowanceCharge extends BaseAllowanceCharge_base {}
70
- declare const PeppolAllowance_base: OpaqueSchema<PeppolAllowance, Schema.Struct<{
71
- readonly amount: typeof PeppolAmount;
72
- readonly baseAmount: Schema.optional<typeof PeppolAmount>;
73
- readonly allowanceChargeReason: Schema.optional<Schema.String>;
74
- readonly multiplierFactorNumeric: Schema.optional<Schema.Finite>;
75
- /**
76
- * @summary TAX CATEGORY
77
- *
78
- * @name cac:TaxCategory
79
- */
80
- readonly taxCategory: Schema.optional<Schema.Struct<{
81
- readonly id: Schema.brand<Schema.Literals<readonly ["AE", "E", "S", "Z", "G", "O", "K", "L", "M", "B"]>, "PeppolDutyTaxFeeCategoryCode">;
82
- readonly percent: Schema.optional<Schema.Finite>;
83
- readonly taxSchemeId: typeof PeppolTaxCategoryTaxSchemeId;
84
- }>>;
85
- /**
86
- * @name cbc:AllowanceChargeReasonCode
87
- */
88
- readonly allowanceChargeReasonCode: Schema.optional<Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolAllowanceChargeReasonCode">>;
89
- /**
90
- * @name cbc:ChargeIndicator
91
- *
92
- * @value `false`
93
- */
94
- readonly chargeIndicator: Schema.Literal<false>;
95
- }>>;
96
- declare class PeppolAllowance extends PeppolAllowance_base {}
97
- declare const PeppolCharge_base: OpaqueSchema<PeppolCharge, Schema.Struct<{
98
- readonly amount: typeof PeppolAmount;
99
- readonly baseAmount: Schema.optional<typeof PeppolAmount>;
100
- readonly allowanceChargeReason: Schema.optional<Schema.String>;
101
- readonly multiplierFactorNumeric: Schema.optional<Schema.Finite>;
102
- /**
103
- * @summary TAX CATEGORY
104
- *
105
- * @name cac:TaxCategory
106
- */
107
- readonly taxCategory: Schema.optional<Schema.Struct<{
108
- readonly id: Schema.brand<Schema.Literals<readonly ["AE", "E", "S", "Z", "G", "O", "K", "L", "M", "B"]>, "PeppolDutyTaxFeeCategoryCode">;
109
- readonly percent: Schema.optional<Schema.Finite>;
110
- readonly taxSchemeId: typeof PeppolTaxCategoryTaxSchemeId;
111
- }>>;
112
- /**
113
- * @name cbc:AllowanceChargeReasonCode
114
- */
115
- readonly allowanceChargeReasonCode: Schema.optional<Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolChargeReasonCode">>;
116
- /**
117
- * @name cbc:ChargeIndicator
118
- *
119
- * @value `true`
120
- */
121
- readonly chargeIndicator: Schema.Literal<true>;
122
- }>>;
123
- declare class PeppolCharge extends PeppolCharge_base {}
39
+ //#region src/schemas/values/mime-codes-schema.d.ts
40
+ declare const PeppolMimeCode_base: OpaqueSchema<PeppolMimeCode, Schema.brand<Schema.Literals<readonly ["text/csv", "application/pdf", "image/png", "image/jpeg", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.oasis.opendocument.spreadsheet"]>, "PeppolMimeCode">>;
124
41
  /**
125
- * @summary Allowance/Charge
42
+ * @description A MIME media type from the PEPPOL MIME code list.
126
43
  *
127
- * @name cac:AllowanceCharge
44
+ * @example
45
+ * ```ts
46
+ * 'text/csv';
47
+ * ```;
48
+ *
49
+ * @validations
50
+ * - PEPPOL-EN16931-CL001: Attachment (MIME) type MUST come from the allowed list.
51
+ *
52
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/MimeCode/
53
+ * @see {@link mimeCodesKeys}
128
54
  */
129
- declare const peppolAllowanceChargeSchema: Schema.Union<readonly [typeof PeppolAllowance, typeof PeppolCharge]>;
130
- type PeppolAllowanceCharge = Schema.Schema.Type<typeof peppolAllowanceChargeSchema>;
131
- type PeppolAllowanceChargeEncoded = Schema.Codec.Encoded<typeof peppolAllowanceChargeSchema>;
55
+ declare class PeppolMimeCode extends PeppolMimeCode_base {}
132
56
  //#endregion
133
57
  //#region src/schemas/fields/peppol-binary-object-schema.d.ts
134
58
  declare const PeppolBinaryObject_base: OpaqueSchema<PeppolBinaryObject, Schema.Struct<{
@@ -142,7 +66,7 @@ declare const PeppolBinaryObject_base: OpaqueSchema<PeppolBinaryObject, Schema.S
142
66
  *
143
67
  * @name `#text` (Base64 content)
144
68
  */
145
- readonly content: Schema.Union<readonly [Schema.String, Schema.String]>;
69
+ readonly content: Schema.Union<readonly [typeof PeppolBase64, Schema.String]>;
146
70
  /**
147
71
  * @description The mime code of the attached document.
148
72
  *
@@ -153,7 +77,7 @@ declare const PeppolBinaryObject_base: OpaqueSchema<PeppolBinaryObject, Schema.S
153
77
  *
154
78
  * @name `@mimeCode`
155
79
  */
156
- readonly mimeCode: Schema.brand<Schema.Literals<readonly ["text/csv", "application/pdf", "image/png", "image/jpeg", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.oasis.opendocument.spreadsheet"]>, "PeppolMimeCode">;
80
+ readonly mimeCode: typeof PeppolMimeCode;
157
81
  /**
158
82
  * @description The file name of the attached document.
159
83
  *
@@ -167,12 +91,35 @@ declare const PeppolBinaryObject_base: OpaqueSchema<PeppolBinaryObject, Schema.S
167
91
  readonly filename: Schema.String;
168
92
  }>>;
169
93
  /**
94
+ * @description An attached document embedded in the Invoice as a Base64 encoded binary object, together with its MIME type and file name. Wraps the
95
+ * `cbc:EmbeddedDocumentBinaryObject` element.
96
+ *
97
+ * @example
98
+ * ```ts
99
+ * { content: 'aHR0cHM6Ly90ZXN0LXZlZmEuZGlmaS5uby9wZXBwb2xiaXM=', mimeCode: 'text/csv', filename: 'Hours - spent.csv' }
100
+ * ```;
101
+ *
170
102
  * @summary Binary object for attachments
171
103
  *
172
104
  * @name cbc:EmbeddedDocumentBinaryObject (+ @mimeCode, @filename)
173
105
  */
174
106
  declare class PeppolBinaryObject extends PeppolBinaryObject_base {}
175
107
  //#endregion
108
+ //#region src/schemas/values/additional-document-reference-code-schema.d.ts
109
+ declare const PeppolAdditionalDocumentReferenceCode_base: OpaqueSchema<PeppolAdditionalDocumentReferenceCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolAdditionalDocumentReferenceCode">>;
110
+ /**
111
+ * @description An additional document reference code from the PEPPOL subset of UNCL 1153 (invoiced object identifier scheme).
112
+ *
113
+ * @example
114
+ * ```ts
115
+ * 'AAA';
116
+ * ```;
117
+ *
118
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1153/
119
+ * @see {@link additionalDocumentReferenceCodesKeys}
120
+ */
121
+ declare class PeppolAdditionalDocumentReferenceCode extends PeppolAdditionalDocumentReferenceCode_base {}
122
+ //#endregion
176
123
  //#region src/schemas/fields/peppol-additional-document-reference-schema.d.ts
177
124
  declare const PeppolAttachmentExternalReference_base: OpaqueSchema<PeppolAttachmentExternalReference, Schema.Struct<{
178
125
  /**
@@ -188,6 +135,17 @@ declare const PeppolAttachmentExternalReference_base: OpaqueSchema<PeppolAttachm
188
135
  */
189
136
  readonly uri: Schema.String;
190
137
  }>>;
138
+ /**
139
+ * @description A reference to a supporting document that is stored outside the Invoice, identified by a URI. Wraps the `cac:ExternalReference` element of an
140
+ * attachment group.
141
+ *
142
+ * @example
143
+ * ```ts
144
+ * { uri: 'http://www.example.com/index.html' }
145
+ * ```;
146
+ *
147
+ * @see {@link PeppolAttachment}
148
+ */
191
149
  declare class PeppolAttachmentExternalReference extends PeppolAttachmentExternalReference_base {}
192
150
  declare const PeppolAttachment_base: OpaqueSchema<PeppolAttachment, Schema.Struct<{
193
151
  /**
@@ -210,6 +168,23 @@ declare const PeppolAttachment_base: OpaqueSchema<PeppolAttachment, Schema.Struc
210
168
  */
211
169
  readonly externalReference: Schema.optional<typeof PeppolAttachmentExternalReference>;
212
170
  }>>;
171
+ /**
172
+ * @description The attachment of a supporting document to the Invoice, either embedded as a Base64 binary object or referenced by URI. Wraps the `cac:Attachment`
173
+ * element of an additional supporting document.
174
+ *
175
+ * @example
176
+ * ```ts
177
+ * {
178
+ * embeddedDocumentBinaryObject: {
179
+ * content: 'aHR0cHM6Ly90ZXN0LXZlZmEuZGlmaS5uby9wZXBwb2xiaXM=',
180
+ * mimeCode: 'text/csv',
181
+ * filename: 'Hours - spent.csv'
182
+ * }
183
+ * }
184
+ * ```;
185
+ *
186
+ * @see {@link PeppolAdditionalDocumentReference}
187
+ */
213
188
  declare class PeppolAttachment extends PeppolAttachment_base {}
214
189
  declare const PeppolId_base: OpaqueSchema<PeppolId, Schema.Struct<{
215
190
  /**
@@ -228,8 +203,19 @@ declare const PeppolId_base: OpaqueSchema<PeppolId, Schema.Struct<{
228
203
  *
229
204
  * @name `@schemeID`
230
205
  */
231
- readonly schemeId: Schema.optional<Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolAdditionalDocumentReferenceCode">>;
206
+ readonly schemeId: Schema.optional<typeof PeppolAdditionalDocumentReferenceCode>;
232
207
  }>>;
208
+ /**
209
+ * @description The identifier of an additional supporting document, an invoiced object reference or a project reference, together with an optional identification
210
+ * scheme identifier.
211
+ *
212
+ * @example
213
+ * ```ts
214
+ * { id: '9873242' }
215
+ * ```;
216
+ *
217
+ * @see {@link PeppolAdditionalDocumentReference}
218
+ */
233
219
  declare class PeppolId extends PeppolId_base {}
234
220
  declare const PeppolAdditionalDocumentReference_base: OpaqueSchema<PeppolAdditionalDocumentReference, Schema.Struct<{
235
221
  readonly schemeId: Schema.optional<Schema.String>;
@@ -249,63 +235,382 @@ declare const PeppolAdditionalDocumentReference_base: OpaqueSchema<PeppolAdditio
249
235
  */
250
236
  declare class PeppolAdditionalDocumentReference extends PeppolAdditionalDocumentReference_base {}
251
237
  //#endregion
252
- //#region src/schemas/fields/peppol-billing-reference-schema.d.ts
253
- declare const PeppolInvoiceDocumentReference_base: OpaqueSchema<PeppolInvoiceDocumentReference, Schema.Struct<{
238
+ //#region src/schemas/values/currency-code-schema.d.ts
239
+ declare const PeppolCurrencyCode_base: OpaqueSchema<PeppolCurrencyCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolCurrencyCode">>;
240
+ /**
241
+ * @description An ISO 4217 currency code from the PEPPOL codelist.
242
+ *
243
+ * @example
244
+ * ```ts
245
+ * 'AED';
246
+ * ```;
247
+ *
248
+ * @validations
249
+ * - PEPPOL-EN16931-CL007: Currency codes MUST be valid ISO 4217 codes.
250
+ *
251
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO4217/
252
+ * @see {@link currencyCodesKeys}
253
+ */
254
+ declare class PeppolCurrencyCode extends PeppolCurrencyCode_base {}
255
+ /**
256
+ * @description An ISO 4217 currency code as defined by the PEPPOL subset.
257
+ *
258
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO4217/
259
+ */
260
+ type PeppolCurrencyCodeEncoded = Schema.Codec.Encoded<typeof PeppolCurrencyCode>;
261
+ //#endregion
262
+ //#region src/schemas/fields/peppol-amount-schema.d.ts
263
+ declare const PeppolAmount_base: OpaqueSchema<PeppolAmount, Schema.Struct<{
254
264
  /**
255
- * @description The identification of an Invoice that was previously sent by the seller.
256
- *
257
- * @example
258
- * `inv123`;
259
- *
260
- * @summary Preceding invoice number
261
- *
262
- * @name `cbc:ID`
265
+ * @name \@currencyID
263
266
  */
264
- readonly id: Schema.String;
267
+ readonly currencyId: typeof PeppolCurrencyCode;
265
268
  /**
266
- * @description The date when the preceding invoice was issued. Shall be provided in case the preceding invoice identifier is not unique.
267
- *
268
- * @example
269
- * `2017-09-15`;
270
- *
271
- * @summary Preceding invoice issue date
272
- *
273
- * @format `YYYY-MM-DD`
274
- *
275
- * @name `cbc:IssueDate`
269
+ * @name #text (value)
276
270
  */
277
- readonly issueDate: Schema.optional<typeof PeppolIsoDateString>;
271
+ readonly value: Schema.Finite;
278
272
  }>>;
279
- declare class PeppolInvoiceDocumentReference extends PeppolInvoiceDocumentReference_base {}
280
- declare const PeppolBillingReference_base: OpaqueSchema<PeppolBillingReference, Schema.Struct<{
273
+ /**
274
+ * @description A monetary amount paired with the currency it is expressed in. Wraps a `cbc:*` amount element whose `@currencyID` attribute names the currency and
275
+ * whose text is the value.
276
+ *
277
+ * @example
278
+ * ```ts
279
+ * { currencyId: 'EUR', value: 4500.0 }
280
+ * ```;
281
+ *
282
+ * @summary Monetary amount with mandatory currency
283
+ *
284
+ * @name cbc:* (+ @currencyID)
285
+ */
286
+ declare class PeppolAmount extends PeppolAmount_base {}
287
+ /**
288
+ * @description Encoded form of {@link PeppolAmount} produced by the Effect Schema codec. Fields mirror the decoded shape.
289
+ *
290
+ * @see {@link PeppolAmount}
291
+ */
292
+ interface PeppolAmountEncoded extends Schema.Codec.Encoded<typeof PeppolAmount> {}
293
+ //#endregion
294
+ //#region src/schemas/values/allowance-charge-reason-code-schema.d.ts
295
+ declare const PeppolAllowanceChargeReasonCode_base: OpaqueSchema<PeppolAllowanceChargeReasonCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolAllowanceChargeReasonCode">>;
296
+ /**
297
+ * @description An allowance or charge reason code from the PEPPOL subset of UNCL 5189 (D.16B).
298
+ *
299
+ * @example
300
+ * ```ts
301
+ * '41';
302
+ * ```;
303
+ *
304
+ * @validations
305
+ * - PEPPOL-EN16931-CL002: Document allowance reason code MUST be according to the subset of UNCL 5189 D.16B.
306
+ *
307
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5189/
308
+ * @see {@link allowanceChargeReasonCodesKeys}
309
+ */
310
+ declare class PeppolAllowanceChargeReasonCode extends PeppolAllowanceChargeReasonCode_base {}
311
+ //#endregion
312
+ //#region src/schemas/values/charge-reason-code-schema.d.ts
313
+ declare const PeppolChargeReasonCode_base: OpaqueSchema<PeppolChargeReasonCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolChargeReasonCode">>;
314
+ /**
315
+ * @description A charge reason code from the PEPPOL subset of UNCL 7161 (D.16B).
316
+ *
317
+ * @example
318
+ * ```ts
319
+ * 'AA';
320
+ * ```;
321
+ *
322
+ * @validations
323
+ * - PEPPOL-EN16931-CL003: Charge reason code MUST be according to UNCL 7161 D.16B.
324
+ *
325
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL7161/
326
+ * @see {@link chargeReasonCodesKeys}
327
+ */
328
+ declare class PeppolChargeReasonCode extends PeppolChargeReasonCode_base {}
329
+ //#endregion
330
+ //#region src/schemas/values/duty-tax-fee-category-schema.d.ts
331
+ declare const PeppolDutyTaxFeeCategoryCode_base: OpaqueSchema<PeppolDutyTaxFeeCategoryCode, Schema.brand<Schema.Literals<readonly ["AE", "E", "S", "Z", "G", "O", "K", "L", "M", "B"]>, "PeppolDutyTaxFeeCategoryCode">>;
332
+ /**
333
+ * @description A duty, tax or fee category code from the PEPPOL subset of UNCL 5305 (VAT category code).
334
+ *
335
+ * @example
336
+ * ```ts
337
+ * 'AE';
338
+ * ```;
339
+ *
340
+ * @validations
341
+ * - BR-CL-17 / BR-CL-18: VAT category code MUST be a valid UNCL 5305 code.
342
+ *
343
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5305/
344
+ * @see {@link dutyTaxFeeCategoriesKeys}
345
+ */
346
+ declare class PeppolDutyTaxFeeCategoryCode extends PeppolDutyTaxFeeCategoryCode_base {}
347
+ /**
348
+ * @description The encoded form of {@link PeppolDutyTaxFeeCategoryCode}, a string literal union.
349
+ */
350
+ type PeppolDutyTaxFeeCategoryCodeEncoded = Schema.Codec.Encoded<typeof PeppolDutyTaxFeeCategoryCode>;
351
+ //#endregion
352
+ //#region src/schemas/fields/peppol-allowance-charge-schema.d.ts
353
+ declare const PeppolTaxCategoryTaxSchemeId_base: OpaqueSchema<PeppolTaxCategoryTaxSchemeId, Schema.Struct<{
281
354
  /**
282
- * @example
283
- * inv123;
284
- *
285
- * @summary INVOICE DOCUMENT REFERENCE
355
+ * @description Mandatory element. Use "VAT"
286
356
  *
287
- * @name `cac:InvoiceDocumentReference`
357
+ * @name `cbc:ID`
288
358
  */
289
- readonly invoiceDocumentReference: typeof PeppolInvoiceDocumentReference;
359
+ readonly id: Schema.withDecodingDefaultType<Schema.String, never>;
290
360
  }>>;
291
361
  /**
292
- * @summary PRECEDING INVOICE REFERENCE (0..n)
362
+ * @description The identifier of the tax scheme that applies to a document level allowance or charge. Defaults to `VAT` when the value is absent.
293
363
  *
294
- * @name cac:BillingReference
364
+ * @example
365
+ * ```ts
366
+ * { id: 'VAT' }
367
+ * ```;
368
+ *
369
+ * @see {@link PeppolTaxCategory}
295
370
  */
296
- declare class PeppolBillingReference extends PeppolBillingReference_base {}
297
- //#endregion
298
- //#region src/schemas/fields/peppol-address-schema.d.ts
299
- declare const PeppolAddressLine_base: OpaqueSchema<PeppolAddressLine, Schema.Struct<{
371
+ declare class PeppolTaxCategoryTaxSchemeId extends PeppolTaxCategoryTaxSchemeId_base {}
372
+ declare const BaseAllowanceCharge_base: OpaqueSchema<BaseAllowanceCharge, Schema.Struct<{
373
+ readonly amount: typeof PeppolAmount;
374
+ readonly baseAmount: Schema.optional<typeof PeppolAmount>;
375
+ readonly chargeIndicator: Schema.Boolean;
376
+ readonly allowanceChargeReason: Schema.optional<Schema.String>;
377
+ readonly multiplierFactorNumeric: Schema.optional<Schema.Finite>;
300
378
  /**
301
- * @description An additional address line in an address that can be used to give further details supplementing the main line.
302
- *
303
- * @summary Address line 3
379
+ * @summary TAX CATEGORY
380
+ *
381
+ * @name cac:TaxCategory
382
+ */
383
+ readonly taxCategory: Schema.optional<Schema.Struct<{
384
+ readonly id: typeof PeppolDutyTaxFeeCategoryCode;
385
+ readonly percent: Schema.optional<Schema.Finite>;
386
+ readonly taxSchemeId: typeof PeppolTaxCategoryTaxSchemeId;
387
+ }>>;
388
+ }>>;
389
+ /**
390
+ * @description Shared fields for a document level allowance or charge. Combines the common line allowance and charge fields with the tax category that applies to
391
+ * the document level amount.
392
+ *
393
+ * @example
394
+ * ```ts
395
+ * {
396
+ * amount: { value: 25, currencyId: 'EUR' },
397
+ * chargeIndicator: true,
398
+ * allowanceChargeReason: 'Insurance',
399
+ * taxCategory: { id: 'S', percent: 25, taxSchemeId: { id: 'VAT' } }
400
+ * }
401
+ * ```;
402
+ *
403
+ * @see {@link PeppolAllowanceCharge}
404
+ */
405
+ declare class BaseAllowanceCharge extends BaseAllowanceCharge_base {}
406
+ declare const PeppolAllowance_base: OpaqueSchema<PeppolAllowance, Schema.Struct<{
407
+ readonly amount: typeof PeppolAmount;
408
+ readonly baseAmount: Schema.optional<typeof PeppolAmount>;
409
+ readonly allowanceChargeReason: Schema.optional<Schema.String>;
410
+ readonly multiplierFactorNumeric: Schema.optional<Schema.Finite>;
411
+ /**
412
+ * @summary TAX CATEGORY
413
+ *
414
+ * @name cac:TaxCategory
415
+ */
416
+ readonly taxCategory: Schema.optional<Schema.Struct<{
417
+ readonly id: typeof PeppolDutyTaxFeeCategoryCode;
418
+ readonly percent: Schema.optional<Schema.Finite>;
419
+ readonly taxSchemeId: typeof PeppolTaxCategoryTaxSchemeId;
420
+ }>>;
421
+ /**
422
+ * @name cbc:AllowanceChargeReasonCode
423
+ */
424
+ readonly allowanceChargeReasonCode: Schema.optional<typeof PeppolAllowanceChargeReasonCode>;
425
+ /**
426
+ * @name cbc:ChargeIndicator
427
+ *
428
+ * @value `false`
429
+ */
430
+ readonly chargeIndicator: Schema.Literal<false>;
431
+ }>>;
432
+ /**
433
+ * @description A document level allowance, marked by a `cbc:ChargeIndicator` of `false`. Adds an allowance reason code to the shared document level allowance and
434
+ * charge fields.
435
+ *
436
+ * @example
437
+ * ```ts
438
+ * { amount: { value: 200, currencyId: 'EUR' }, chargeIndicator: false, allowanceChargeReasonCode: '95' }
439
+ * ```;
440
+ *
441
+ * @see {@link PeppolAllowanceCharge}
442
+ */
443
+ declare class PeppolAllowance extends PeppolAllowance_base {}
444
+ declare const PeppolCharge_base: OpaqueSchema<PeppolCharge, Schema.Struct<{
445
+ readonly amount: typeof PeppolAmount;
446
+ readonly baseAmount: Schema.optional<typeof PeppolAmount>;
447
+ readonly allowanceChargeReason: Schema.optional<Schema.String>;
448
+ readonly multiplierFactorNumeric: Schema.optional<Schema.Finite>;
449
+ /**
450
+ * @summary TAX CATEGORY
451
+ *
452
+ * @name cac:TaxCategory
453
+ */
454
+ readonly taxCategory: Schema.optional<Schema.Struct<{
455
+ readonly id: typeof PeppolDutyTaxFeeCategoryCode;
456
+ readonly percent: Schema.optional<Schema.Finite>;
457
+ readonly taxSchemeId: typeof PeppolTaxCategoryTaxSchemeId;
458
+ }>>;
459
+ /**
460
+ * @name cbc:AllowanceChargeReasonCode
461
+ */
462
+ readonly allowanceChargeReasonCode: Schema.optional<typeof PeppolChargeReasonCode>;
463
+ /**
464
+ * @name cbc:ChargeIndicator
465
+ *
466
+ * @value `true`
467
+ */
468
+ readonly chargeIndicator: Schema.Literal<true>;
469
+ }>>;
470
+ /**
471
+ * @description A document level charge, marked by a `cbc:ChargeIndicator` of `true`. Adds a charge reason code to the shared document level allowance and charge
472
+ * fields.
473
+ *
474
+ * @example
475
+ * ```ts
476
+ * { amount: { value: 25, currencyId: 'EUR' }, chargeIndicator: true, allowanceChargeReasonCode: 'AA' }
477
+ * ```;
478
+ *
479
+ * @see {@link PeppolAllowanceCharge}
480
+ */
481
+ declare class PeppolCharge extends PeppolCharge_base {}
482
+ declare const PeppolAllowanceCharge_base: OpaqueSchema<PeppolAllowanceCharge, Schema.Union<readonly [typeof PeppolAllowance, typeof PeppolCharge]>>;
483
+ /**
484
+ * @description A document level allowance or charge, selected by the `cbc:ChargeIndicator` value: `false` selects an allowance, `true` selects a charge.
485
+ *
486
+ * @summary Allowance/Charge
487
+ *
488
+ * @name cac:AllowanceCharge
489
+ */
490
+ declare class PeppolAllowanceCharge extends PeppolAllowanceCharge_base {}
491
+ /**
492
+ * @description Encoded form of {@link PeppolAllowanceCharge} produced by the Effect Schema codec.
493
+ *
494
+ * @see {@link PeppolAllowanceCharge}
495
+ */
496
+ type PeppolAllowanceChargeEncoded = Schema.Codec.Encoded<typeof PeppolAllowanceCharge>;
497
+ //#endregion
498
+ //#region src/schemas/fields/peppol-billing-reference-schema.d.ts
499
+ declare const PeppolInvoiceDocumentReference_base: OpaqueSchema<PeppolInvoiceDocumentReference, Schema.Struct<{
500
+ /**
501
+ * @description The identification of an Invoice that was previously sent by the seller.
502
+ *
503
+ * @example
504
+ * `inv123`;
505
+ *
506
+ * @summary Preceding invoice number
507
+ *
508
+ * @name `cbc:ID`
509
+ */
510
+ readonly id: Schema.String;
511
+ /**
512
+ * @description The date when the preceding invoice was issued. Shall be provided in case the preceding invoice identifier is not unique.
513
+ *
514
+ * @example
515
+ * `2017-09-15`;
516
+ *
517
+ * @summary Preceding invoice issue date
518
+ *
519
+ * @format `YYYY-MM-DD`
520
+ *
521
+ * @name `cbc:IssueDate`
522
+ */
523
+ readonly issueDate: Schema.optional<typeof PeppolIsoDateString>;
524
+ }>>;
525
+ /**
526
+ * @description A reference to an Invoice that was previously sent by the Seller, carrying the preceding invoice number and, when the number is not unique, its
527
+ * issue date. Wraps the `cac:InvoiceDocumentReference` element.
528
+ *
529
+ * @example
530
+ * ```ts
531
+ * { id: 'inv123', issueDate: '2017-09-15' }
532
+ * ```;
533
+ *
534
+ * @see {@link PeppolBillingReference}
535
+ */
536
+ declare class PeppolInvoiceDocumentReference extends PeppolInvoiceDocumentReference_base {}
537
+ declare const PeppolBillingReference_base: OpaqueSchema<PeppolBillingReference, Schema.Struct<{
538
+ /**
539
+ * @example
540
+ * inv123;
541
+ *
542
+ * @summary INVOICE DOCUMENT REFERENCE
543
+ *
544
+ * @name `cac:InvoiceDocumentReference`
545
+ */
546
+ readonly invoiceDocumentReference: typeof PeppolInvoiceDocumentReference;
547
+ }>>;
548
+ /**
549
+ * @description A reference to a preceding Invoice, used when the Invoice corrects or replaces an earlier one. Wraps the `cac:BillingReference` element.
550
+ *
551
+ * @summary PRECEDING INVOICE REFERENCE (0..n)
552
+ *
553
+ * @name cac:BillingReference
554
+ */
555
+ declare class PeppolBillingReference extends PeppolBillingReference_base {}
556
+ //#endregion
557
+ //#region src/schemas/values/icd-codes-schema.d.ts
558
+ declare const PeppolIcdCode_base: OpaqueSchema<PeppolIcdCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolIcdCode">>;
559
+ /**
560
+ * @description An ISO 6523 ICD code from the PEPPOL codelist.
561
+ *
562
+ * @example
563
+ * ```ts
564
+ * '0002';
565
+ * ```;
566
+ *
567
+ * @validations
568
+ * - BR-CL-10 / BR-CL-11 / BR-CL-21: Identifier scheme MUST be a valid ISO 6523 ICD code.
569
+ *
570
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ICD/
571
+ * @see {@link icdCodesKeys}
572
+ */
573
+ declare class PeppolIcdCode extends PeppolIcdCode_base {}
574
+ //#endregion
575
+ //#region src/schemas/values/peppol-country-code-schema.d.ts
576
+ declare const PeppolCountryCodeValue_base: OpaqueSchema<PeppolCountryCodeValue, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolCountryCodeValue">>;
577
+ /**
578
+ * @description A two character ISO 3166-1 alpha-2 country code from the PEPPOL codelist. The literal union enforces the length.
579
+ *
580
+ * @example
581
+ * ```ts
582
+ * 'AD';
583
+ * ```;
584
+ *
585
+ * @validations
586
+ * - BR-CL-14 / BR-CL-15: Country code MUST be a valid ISO 3166-1 alpha-2 code.
587
+ *
588
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO3166/
589
+ * @see {@link countryCodesKeys}
590
+ */
591
+ declare class PeppolCountryCodeValue extends PeppolCountryCodeValue_base {}
592
+ //#endregion
593
+ //#region src/schemas/fields/peppol-address-schema.d.ts
594
+ declare const PeppolAddressLine_base: OpaqueSchema<PeppolAddressLine, Schema.Struct<{
595
+ /**
596
+ * @description An additional address line in an address that can be used to give further details supplementing the main line.
597
+ *
598
+ * @summary Address line 3
304
599
  *
305
600
  * @name `cbc:Line`
306
601
  */
307
602
  readonly line: Schema.String;
308
603
  }>>;
604
+ /**
605
+ * @description An additional address line that supplements the main address line. Wraps the `cac:AddressLine` element, whose `cbc:Line` value carries the text.
606
+ *
607
+ * @example
608
+ * ```ts
609
+ * { line: 'Building 23' }
610
+ * ```;
611
+ *
612
+ * @see {@link PeppolAddress}
613
+ */
309
614
  declare class PeppolAddressLine extends PeppolAddressLine_base {}
310
615
  declare const PeppolCountryCode_base: OpaqueSchema<PeppolCountryCode, Schema.Struct<{
311
616
  /**
@@ -318,8 +623,18 @@ declare const PeppolCountryCode_base: OpaqueSchema<PeppolCountryCode, Schema.Str
318
623
  *
319
624
  * @name `cbc:IdentificationCode`
320
625
  */
321
- readonly identificationCode: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolCountryCode">;
626
+ readonly identificationCode: typeof PeppolCountryCodeValue;
322
627
  }>>;
628
+ /**
629
+ * @description The country of an address, expressed as a two-letter ISO 3166-1 alpha-2 code. Wraps the `cac:Country` element and its `cbc:IdentificationCode`.
630
+ *
631
+ * @example
632
+ * ```ts
633
+ * { identificationCode: 'GB' }
634
+ * ```;
635
+ *
636
+ * @see {@link PeppolAddress}
637
+ */
323
638
  declare class PeppolCountryCode extends PeppolCountryCode_base {}
324
639
  declare const PeppolAddress_base: OpaqueSchema<PeppolAddress, Schema.Struct<{
325
640
  /**
@@ -393,6 +708,9 @@ declare const PeppolAddress_base: OpaqueSchema<PeppolAddress, Schema.Struct<{
393
708
  readonly addressLine: Schema.optional<typeof PeppolAddressLine>;
394
709
  }>>;
395
710
  /**
711
+ * @description The postal address of a party, used for the seller, buyer, payee and delivery locations. Carries the street lines, city, postal zone, country
712
+ * subdivision, country code and optional additional address lines.
713
+ *
396
714
  * @summary Postal address
397
715
  *
398
716
  * @name `cac:PostalAddress`
@@ -410,6 +728,16 @@ declare const PeppolDeliveryPartyPartyName_base: OpaqueSchema<PeppolDeliveryPart
410
728
  */
411
729
  readonly name: Schema.String;
412
730
  }>>;
731
+ /**
732
+ * @description The name of the party to which the goods and services are delivered. Wraps the `cac:PartyName` element of the delivery party.
733
+ *
734
+ * @example
735
+ * ```ts
736
+ * { name: 'Delivery party Name' }
737
+ * ```;
738
+ *
739
+ * @see {@link PeppolDeliveryParty}
740
+ */
413
741
  declare class PeppolDeliveryPartyPartyName extends PeppolDeliveryPartyPartyName_base {}
414
742
  declare const PeppolDeliveryParty_base: OpaqueSchema<PeppolDeliveryParty, Schema.Struct<{
415
743
  /**
@@ -419,6 +747,16 @@ declare const PeppolDeliveryParty_base: OpaqueSchema<PeppolDeliveryParty, Schema
419
747
  */
420
748
  readonly partyName: typeof PeppolDeliveryPartyPartyName;
421
749
  }>>;
750
+ /**
751
+ * @description The party to which the goods and services are delivered, when it differs from the Buyer. Wraps the `cac:DeliveryParty` element.
752
+ *
753
+ * @example
754
+ * ```ts
755
+ * { partyName: { name: 'Delivery party Name' } }
756
+ * ```;
757
+ *
758
+ * @see {@link PeppolDelivery}
759
+ */
422
760
  declare class PeppolDeliveryParty extends PeppolDeliveryParty_base {}
423
761
  declare const PeppolDeliveryLocation_base: OpaqueSchema<PeppolDeliveryLocation, Schema.Struct<{
424
762
  /**
@@ -433,7 +771,7 @@ declare const PeppolDeliveryLocation_base: OpaqueSchema<PeppolDeliveryLocation,
433
771
  */
434
772
  readonly id: Schema.optional<Schema.Struct<{
435
773
  readonly id: Schema.String;
436
- readonly schemeId: Schema.optional<Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolIcdCode">>;
774
+ readonly schemeId: Schema.optional<typeof PeppolIcdCode>;
437
775
  }>>;
438
776
  /**
439
777
  * @description A groupd of business terms providing infomation about the address to which goods and services invoiced were or are delivered.
@@ -444,6 +782,17 @@ declare const PeppolDeliveryLocation_base: OpaqueSchema<PeppolDeliveryLocation,
444
782
  */
445
783
  readonly address: Schema.optional<typeof PeppolAddress>;
446
784
  }>>;
785
+ /**
786
+ * @description The location at which the goods and services are delivered, identified by an identifier and an optional address. Wraps the `cac:DeliveryLocation`
787
+ * element.
788
+ *
789
+ * @example
790
+ * ```ts
791
+ * { id: { id: '9483759475923478', schemeId: '0088' }, address: { cityName: 'Stockholm', countryCode: { identificationCode: 'SE' } } }
792
+ * ```;
793
+ *
794
+ * @see {@link PeppolDelivery}
795
+ */
447
796
  declare class PeppolDeliveryLocation extends PeppolDeliveryLocation_base {}
448
797
  declare const PeppolDelivery_base: OpaqueSchema<PeppolDelivery, Schema.Struct<{
449
798
  /**
@@ -470,13 +819,42 @@ declare const PeppolDelivery_base: OpaqueSchema<PeppolDelivery, Schema.Struct<{
470
819
  */
471
820
  readonly deliveryParty: Schema.optional<typeof PeppolDeliveryParty>;
472
821
  }>>;
822
+ /**
823
+ * @description Information about the delivery of the goods and services, such as the actual delivery date, the delivery location and the delivery party. Wraps the
824
+ * `cac:Delivery` element.
825
+ *
826
+ * @example
827
+ * ```ts
828
+ * { actualDeliveryDate: '2017-11-01', deliveryLocation: { id: { id: '9483759475923478' } } }
829
+ * ```;
830
+ *
831
+ * @see {@link PeppolDeliveryLocation}
832
+ */
473
833
  declare class PeppolDelivery extends PeppolDelivery_base {}
474
834
  //#endregion
835
+ //#region src/schemas/values/vat-date-code-schema.d.ts
836
+ declare const PeppolVatDateCode_base: OpaqueSchema<PeppolVatDateCode, Schema.Literals<readonly ["3", "35", "432"]>>;
837
+ /**
838
+ * @description A VAT date code from the PEPPOL subset of UNCL 2005 (invoice period description code).
839
+ *
840
+ * @example
841
+ * ```ts
842
+ * '3';
843
+ * ```;
844
+ *
845
+ * @validations
846
+ * - PEPPOL-EN16931-CL006: Invoice period description code must be according to UNCL 2005 D.16B.
847
+ *
848
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL2005/
849
+ * @see {@link vatDateCodesKeys}
850
+ */
851
+ declare class PeppolVatDateCode extends PeppolVatDateCode_base {}
852
+ //#endregion
475
853
  //#region src/schemas/fields/peppol-invoice-period-schema.d.ts
476
854
  declare const PeppolInvoicePeriod_base: OpaqueSchema<PeppolInvoicePeriod, Schema.Struct<{
477
855
  readonly endDate: Schema.optional<typeof PeppolIsoDateString>;
478
856
  readonly startDate: Schema.optional<typeof PeppolIsoDateString>;
479
- readonly descriptionCode: Schema.optional<Schema.Literals<readonly ["3", "35", "432"]>>;
857
+ readonly descriptionCode: Schema.optional<typeof PeppolVatDateCode>;
480
858
  }>>;
481
859
  /**
482
860
  * @description A group of business terms providing information on the invoice period. Also called delivery period. If the group is used, the invoiceing period
@@ -640,6 +1018,8 @@ declare const PeppolOrderReference_base: OpaqueSchema<PeppolOrderReference, Sche
640
1018
  readonly salesOrderId: Schema.optional<Schema.String>;
641
1019
  }>>;
642
1020
  /**
1021
+ * @description A reference to the purchase order or sales order that the invoice relates to.
1022
+ *
643
1023
  * @summary ORDER AND SALES ORDER REFERENCE
644
1024
  *
645
1025
  * @name cac:OrderReference
@@ -661,6 +1041,17 @@ declare const PeppolContact_base: OpaqueSchema<PeppolContact, Schema.Struct<{
661
1041
  */
662
1042
  readonly telephone: Schema.optional<Schema.String>;
663
1043
  }>>;
1044
+ /**
1045
+ * @description A contact point for a party, such as the person responsible for receiving the Invoice. Wraps the `cac:Contact` element with an optional name,
1046
+ * telephone number and electronic mail address.
1047
+ *
1048
+ * @example
1049
+ * ```ts
1050
+ * { name: 'Lisa Johnson', telephone: '23434234', electronicMail: 'lj@buyer.se' }
1051
+ * ```;
1052
+ *
1053
+ * @see {@link PeppolPartySchema}
1054
+ */
664
1055
  declare class PeppolContact extends PeppolContact_base {}
665
1056
  //#endregion
666
1057
  //#region src/schemas/fields/peppol-identifier-schema.d.ts
@@ -675,6 +1066,14 @@ declare const PeppolIdentifier_base: OpaqueSchema<PeppolIdentifier, Schema.Struc
675
1066
  readonly schemeId: Schema.optional<Schema.String>;
676
1067
  }>>;
677
1068
  /**
1069
+ * @description A generic identifier paired with an optional identification scheme identifier. Wraps a `cbc:ID` element and its optional `@schemeID` attribute, and
1070
+ * is reused across document references.
1071
+ *
1072
+ * @example
1073
+ * ```ts
1074
+ * { id: '99887766', schemeId: '0088' }
1075
+ * ```;
1076
+ *
678
1077
  * @summary Identifier with optional scheme
679
1078
  *
680
1079
  * @name `cbc:ID (+ optional @schemeID)`
@@ -705,7 +1104,20 @@ declare const PeppolPartyLegalEntity_base$1: OpaqueSchema<PeppolPartyLegalEntity
705
1104
  */
706
1105
  readonly registrationName: Schema.String;
707
1106
  }>>;
1107
+ /**
1108
+ * @description The legal entity details of a party, including the registered name and optional company identifiers.
1109
+ *
1110
+ * @example
1111
+ * ```ts
1112
+ * { registrationName: 'SupplierOfficialName Ltd', companyId: { id: 'GB983294' } }
1113
+ * ```;
1114
+ *
1115
+ * @see {@link PeppolPartySchema}
1116
+ */
708
1117
  declare class PeppolPartyLegalEntity$1 extends PeppolPartyLegalEntity_base$1 {}
1118
+ /**
1119
+ * @description Alias for {@link PeppolPartyLegalEntity}.
1120
+ */
709
1121
  type PeppolPartyLegalEntitySchema = PeppolPartyLegalEntity$1;
710
1122
  //#endregion
711
1123
  //#region src/schemas/fields/peppol-party-tax-scheme-schema.d.ts
@@ -738,11 +1150,34 @@ declare const PeppolPartyTaxScheme_base: OpaqueSchema<PeppolPartyTaxScheme, Sche
738
1150
  readonly taxSchemeId: typeof PeppolTaxSchemeId$1;
739
1151
  }>>;
740
1152
  /**
1153
+ * @description The Seller tax registration details, combining a tax identifier such as a VAT number with the tax scheme.
1154
+ *
741
1155
  * @name cac:PartyTaxScheme (0..2)
742
1156
  */
743
1157
  declare class PeppolPartyTaxScheme extends PeppolPartyTaxScheme_base {}
1158
+ /**
1159
+ * @description Alias for {@link PeppolPartyTaxScheme}.
1160
+ */
744
1161
  type PeppolPartyTaxSchema = PeppolPartyTaxScheme;
745
1162
  //#endregion
1163
+ //#region src/schemas/values/electronic-codes-schema.d.ts
1164
+ declare const PeppolElectronicAddressCode_base: OpaqueSchema<PeppolElectronicAddressCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolElectronicAddressCode">>;
1165
+ /**
1166
+ * @description An electronic address scheme (EAS) code from the PEPPOL Electronic Address Identifier Scheme codelist.
1167
+ *
1168
+ * @example
1169
+ * ```ts
1170
+ * '0002';
1171
+ * ```;
1172
+ *
1173
+ * @validations
1174
+ * - PEPPOL-EN16931-CL008: Electronic address identifier scheme MUST be from the codelist "Electronic Address Identifier Scheme".
1175
+ *
1176
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/
1177
+ * @see {@link electronicAddressCodesKeys}
1178
+ */
1179
+ declare class PeppolElectronicAddressCode extends PeppolElectronicAddressCode_base {}
1180
+ //#endregion
746
1181
  //#region src/schemas/fields/peppol-party-base-schema.d.ts
747
1182
  declare const PeppolPartyName_base$1: OpaqueSchema<PeppolPartyName$1, Schema.Struct<{
748
1183
  /**
@@ -755,6 +1190,16 @@ declare const PeppolPartyName_base$1: OpaqueSchema<PeppolPartyName$1, Schema.Str
755
1190
  */
756
1191
  readonly name: Schema.String;
757
1192
  }>>;
1193
+ /**
1194
+ * @description A name by which the Buyer or Seller is known, other than its registered name.
1195
+ *
1196
+ * @example
1197
+ * ```ts
1198
+ * { name: 'SupplierTradingName Ltd.' }
1199
+ * ```;
1200
+ *
1201
+ * @see {@link PeppolPartySchema}
1202
+ */
758
1203
  declare class PeppolPartyName$1 extends PeppolPartyName_base$1 {}
759
1204
  declare const PeppolPartyIdentification_base$1: OpaqueSchema<PeppolPartyIdentification$1, Schema.Struct<{
760
1205
  /**
@@ -766,14 +1211,34 @@ declare const PeppolPartyIdentification_base$1: OpaqueSchema<PeppolPartyIdentifi
766
1211
  */
767
1212
  readonly id: Schema.Struct<{
768
1213
  readonly id: Schema.String;
769
- readonly schemeId: Schema.optional<Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolIcdCode">>;
1214
+ readonly schemeId: Schema.optional<typeof PeppolIcdCode>;
770
1215
  }>;
771
1216
  }>>;
1217
+ /**
1218
+ * @description An identifier of the Buyer or Seller, with an optional identification scheme.
1219
+ *
1220
+ * @example
1221
+ * ```ts
1222
+ * { id: { id: '99887766', schemeId: '0088' } }
1223
+ * ```;
1224
+ *
1225
+ * @see {@link PeppolPartySchema}
1226
+ */
772
1227
  declare class PeppolPartyIdentification$1 extends PeppolPartyIdentification_base$1 {}
773
1228
  declare const PeppolPartyEndpointId_base: OpaqueSchema<PeppolPartyEndpointId, Schema.Struct<{
774
1229
  readonly id: Schema.String;
775
- readonly schemeId: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolElectronicAddressCode">;
1230
+ readonly schemeId: typeof PeppolElectronicAddressCode;
776
1231
  }>>;
1232
+ /**
1233
+ * @description The Buyer or Seller electronic address to which the application level response to the invoice may be delivered.
1234
+ *
1235
+ * @example
1236
+ * ```ts
1237
+ * { id: '9482348239847239874', schemeId: '0088' }
1238
+ * ```;
1239
+ *
1240
+ * @see {@link PeppolPartySchema}
1241
+ */
777
1242
  declare class PeppolPartyEndpointId extends PeppolPartyEndpointId_base {}
778
1243
  declare const PeppolPartySchema_base: OpaqueSchema<PeppolPartySchema, Schema.Struct<{
779
1244
  /**
@@ -828,6 +1293,8 @@ declare const PeppolPartySchema_base: OpaqueSchema<PeppolPartySchema, Schema.Str
828
1293
  readonly contact: Schema.optional<typeof PeppolContact>;
829
1294
  }>>;
830
1295
  /**
1296
+ * @description The common party substructure shared by the supplier, customer, and other party roles.
1297
+ *
831
1298
  * @summary Party common substructure
832
1299
  *
833
1300
  * @name cac:Party
@@ -852,7 +1319,7 @@ declare const PeppolPartyLegalEntity_base: OpaqueSchema<PeppolPartyLegalEntity,
852
1319
  */
853
1320
  readonly companyId: Schema.optional<Schema.Struct<{
854
1321
  readonly id: Schema.String;
855
- readonly schemeId: Schema.optional<Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolIcdCode">>;
1322
+ readonly schemeId: Schema.optional<typeof PeppolIcdCode>;
856
1323
  }>>;
857
1324
  }>>;
858
1325
  declare class PeppolPartyLegalEntity extends PeppolPartyLegalEntity_base {}
@@ -906,12 +1373,30 @@ declare const PeppolPayeeParty_base: OpaqueSchema<PeppolPayeeParty, Schema.Struc
906
1373
  */
907
1374
  declare class PeppolPayeeParty extends PeppolPayeeParty_base {}
908
1375
  //#endregion
909
- //#region src/schemas/fields/peppol-payment-means-schema.d.ts
910
- declare const PeppolPaymentMandatePayerFinancialAccountId_base: OpaqueSchema<PeppolPaymentMandatePayerFinancialAccountId, Schema.Struct<{
911
- /**
912
- * @description The account to be debited by the direct debit.
913
- *
914
- * @example
1376
+ //#region src/schemas/values/payment-means-code-schema.d.ts
1377
+ declare const PeppolPaymentMeansCodeValue_base: OpaqueSchema<PeppolPaymentMeansCodeValue, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolPaymentMeansCodeValue">>;
1378
+ /**
1379
+ * @description A payment means code from the PEPPOL subset of UNCL 4461.
1380
+ *
1381
+ * @example
1382
+ * ```ts
1383
+ * '1';
1384
+ * ```;
1385
+ *
1386
+ * @validations
1387
+ * - BR-CL-16: Payment means code MUST be a valid UNCL 4461 code.
1388
+ *
1389
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4461/
1390
+ * @see {@link paymentMeansCodesKeys}
1391
+ */
1392
+ declare class PeppolPaymentMeansCodeValue extends PeppolPaymentMeansCodeValue_base {}
1393
+ //#endregion
1394
+ //#region src/schemas/fields/peppol-payment-means-schema.d.ts
1395
+ declare const PeppolPaymentMandatePayerFinancialAccountId_base: OpaqueSchema<PeppolPaymentMandatePayerFinancialAccountId, Schema.Struct<{
1396
+ /**
1397
+ * @description The account to be debited by the direct debit.
1398
+ *
1399
+ * @example
915
1400
  * `12345676543`;
916
1401
  *
917
1402
  * @summary Debited account identifier
@@ -920,6 +1405,16 @@ declare const PeppolPaymentMandatePayerFinancialAccountId_base: OpaqueSchema<Pep
920
1405
  */
921
1406
  readonly id: Schema.String;
922
1407
  }>>;
1408
+ /**
1409
+ * @description The account to be debited by a direct debit.
1410
+ *
1411
+ * @example
1412
+ * ```ts
1413
+ * { id: '12345676543' }
1414
+ * ```;
1415
+ *
1416
+ * @see {@link PeppolPaymentMandate}
1417
+ */
923
1418
  declare class PeppolPaymentMandatePayerFinancialAccountId extends PeppolPaymentMandatePayerFinancialAccountId_base {}
924
1419
  declare const PeppolPaymentMandate_base: OpaqueSchema<PeppolPaymentMandate, Schema.Struct<{
925
1420
  /**
@@ -942,6 +1437,16 @@ declare const PeppolPaymentMandate_base: OpaqueSchema<PeppolPaymentMandate, Sche
942
1437
  */
943
1438
  readonly payerFinancialAccountId: Schema.optional<typeof PeppolPaymentMandatePayerFinancialAccountId>;
944
1439
  }>>;
1440
+ /**
1441
+ * @description A group of business terms to specify a direct debit, including the mandate reference and the debited account.
1442
+ *
1443
+ * @example
1444
+ * ```ts
1445
+ * { id: 'MandateReference', payerFinancialAccountId: { id: '12345676543' } }
1446
+ * ```;
1447
+ *
1448
+ * @see {@link PeppolPaymentMeans}
1449
+ */
945
1450
  declare class PeppolPaymentMandate extends PeppolPaymentMandate_base {}
946
1451
  declare const PeppolPayeeFinancialAccountFinancialInstitutionBranch_base: OpaqueSchema<PeppolPayeeFinancialAccountFinancialInstitutionBranch, Schema.Struct<{
947
1452
  /**
@@ -957,6 +1462,16 @@ declare const PeppolPayeeFinancialAccountFinancialInstitutionBranch_base: Opaque
957
1462
  */
958
1463
  readonly id: Schema.String;
959
1464
  }>>;
1465
+ /**
1466
+ * @description The payment service provider where the payee payment account is held, such as a BIC or national clearing code.
1467
+ *
1468
+ * @example
1469
+ * ```ts
1470
+ * { id: 'BIC324098' }
1471
+ * ```;
1472
+ *
1473
+ * @see {@link PeppolPayeeFinancialAccount}
1474
+ */
960
1475
  declare class PeppolPayeeFinancialAccountFinancialInstitutionBranch extends PeppolPayeeFinancialAccountFinancialInstitutionBranch_base {}
961
1476
  declare const PeppolPayeeFinancialAccount_base: OpaqueSchema<PeppolPayeeFinancialAccount, Schema.Struct<{
962
1477
  /**
@@ -988,6 +1503,16 @@ declare const PeppolPayeeFinancialAccount_base: OpaqueSchema<PeppolPayeeFinancia
988
1503
  */
989
1504
  readonly name: Schema.optional<Schema.String>;
990
1505
  }>>;
1506
+ /**
1507
+ * @description The payment account to which payment should be made, such as an IBAN or BBAN, including the financial institution branch.
1508
+ *
1509
+ * @example
1510
+ * ```ts
1511
+ * { id: 'IBAN32423940', name: 'AccountName' }
1512
+ * ```;
1513
+ *
1514
+ * @see {@link PeppolPaymentMeans}
1515
+ */
991
1516
  declare class PeppolPayeeFinancialAccount extends PeppolPayeeFinancialAccount_base {}
992
1517
  declare const PeppolCardAccount_base: OpaqueSchema<PeppolCardAccount, Schema.Struct<{
993
1518
  /**
@@ -1017,6 +1542,16 @@ declare const PeppolCardAccount_base: OpaqueSchema<PeppolCardAccount, Schema.Str
1017
1542
  */
1018
1543
  readonly primaryAccountNumberId: Schema.String;
1019
1544
  }>>;
1545
+ /**
1546
+ * @description The card used for payment, including the card holder name and the primary account number.
1547
+ *
1548
+ * @example
1549
+ * ```ts
1550
+ * { networkId: 'VISA', primaryAccountNumberId: '1234' }
1551
+ * ```;
1552
+ *
1553
+ * @see {@link PeppolPaymentMeans}
1554
+ */
1020
1555
  declare class PeppolCardAccount extends PeppolCardAccount_base {}
1021
1556
  declare const PeppolPaymentMeansCode_base: OpaqueSchema<PeppolPaymentMeansCode, Schema.Struct<{
1022
1557
  /**
@@ -1029,7 +1564,7 @@ declare const PeppolPaymentMeansCode_base: OpaqueSchema<PeppolPaymentMeansCode,
1029
1564
  *
1030
1565
  * @name `#text`
1031
1566
  */
1032
- readonly code: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolPaymentMeansCode">;
1567
+ readonly code: typeof PeppolPaymentMeansCodeValue;
1033
1568
  /**
1034
1569
  * @description The means, expressed as text, for how a payment is expected to be or has been settled.
1035
1570
  *
@@ -1042,6 +1577,16 @@ declare const PeppolPaymentMeansCode_base: OpaqueSchema<PeppolPaymentMeansCode,
1042
1577
  */
1043
1578
  readonly name: Schema.optional<Schema.String>;
1044
1579
  }>>;
1580
+ /**
1581
+ * @description The means by which a payment is expected to be or has been settled, expressed as a UNCL 4461 code and optional text.
1582
+ *
1583
+ * @example
1584
+ * ```ts
1585
+ * { code: '30', name: 'Credit transfer' }
1586
+ * ```;
1587
+ *
1588
+ * @see {@link PeppolPaymentMeans}
1589
+ */
1045
1590
  declare class PeppolPaymentMeansCode extends PeppolPaymentMeansCode_base {}
1046
1591
  declare const PeppolPaymentMeans_base: OpaqueSchema<PeppolPaymentMeans, Schema.Struct<{
1047
1592
  /**
@@ -1129,6 +1674,8 @@ declare const PeppolPaymentTerms_base: OpaqueSchema<PeppolPaymentTerms, Schema.S
1129
1674
  readonly note: Schema.String;
1130
1675
  }>>;
1131
1676
  /**
1677
+ * @description A textual description of the payment terms that apply to the amount due for payment.
1678
+ *
1132
1679
  * @summary PAYMENT TERMS
1133
1680
  *
1134
1681
  * @name cac:PaymentTerms
@@ -1148,13 +1695,257 @@ declare const PeppolTaxRepresentative_base: OpaqueSchema<PeppolTaxRepresentative
1148
1695
  readonly partyTaxScheme: typeof PeppolPartyTaxScheme;
1149
1696
  }>>;
1150
1697
  /**
1698
+ * @description The party acting as the Seller tax representative, including its name, postal address, and tax scheme.
1699
+ *
1151
1700
  * @summary SELLER TAX REPRESENTATIVE PARTY
1152
1701
  *
1153
1702
  * @name cac:TaxRepresentativeParty
1154
1703
  */
1155
1704
  declare class PeppolTaxRepresentative extends PeppolTaxRepresentative_base {}
1705
+ /**
1706
+ * @description Alias for {@link PeppolTaxRepresentative}.
1707
+ */
1156
1708
  type PeppolTaxRepresentativeParty = PeppolTaxRepresentative;
1157
1709
  //#endregion
1710
+ //#region src/schemas/values/application-response-type-code-schema.d.ts
1711
+ declare const PeppolApplicationResponseTypeCode_base: OpaqueSchema<PeppolApplicationResponseTypeCode, Schema.Literals<readonly ["AB", "AP", "RE"]>>;
1712
+ /**
1713
+ * @description An application response type code from the PEPPOL subset of UNCL 4343.
1714
+ *
1715
+ * @example
1716
+ * ```ts
1717
+ * 'AB';
1718
+ * ```;
1719
+ *
1720
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4343/
1721
+ * @see {@link applicationResponseTypeCodesKeys}
1722
+ */
1723
+ declare class PeppolApplicationResponseTypeCode extends PeppolApplicationResponseTypeCode_base {}
1724
+ //#endregion
1725
+ //#region src/schemas/values/credit-note-type-code-schema.d.ts
1726
+ declare const PeppolCreditNoteTypeCode_base: OpaqueSchema<PeppolCreditNoteTypeCode, Schema.Literals<readonly ["81", "83", "381", "396", "532"]>>;
1727
+ /**
1728
+ * @description A credit note type code from the PEPPOL subset of UNCL 1001 (credit note).
1729
+ *
1730
+ * @example
1731
+ * ```ts
1732
+ * '81';
1733
+ * ```;
1734
+ *
1735
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001-cn/
1736
+ * @see {@link creditNoteTypeCodesKeys}
1737
+ */
1738
+ declare class PeppolCreditNoteTypeCode extends PeppolCreditNoteTypeCode_base {}
1739
+ //#endregion
1740
+ //#region src/schemas/values/peppol-document-type-code-schema.d.ts
1741
+ declare const PeppolDocumentTypeCode_base: OpaqueSchema<PeppolDocumentTypeCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolDocumentTypeCode">>;
1742
+ /**
1743
+ * @description A document type code from the PEPPOL subset of UNCL 1001.
1744
+ *
1745
+ * @example
1746
+ * ```ts
1747
+ * '1';
1748
+ * ```;
1749
+ *
1750
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001/
1751
+ * @see {@link documentTypeCodesKeys}
1752
+ */
1753
+ declare class PeppolDocumentTypeCode extends PeppolDocumentTypeCode_base {}
1754
+ //#endregion
1755
+ //#region src/schemas/values/peppol-document-type-schema.d.ts
1756
+ declare const PeppolDocumentType_base: OpaqueSchema<PeppolDocumentType, Schema.TemplateLiteral<readonly [Schema.Literals<readonly ["busdox-docid-qns", "peppol-doctype-wildcard"]>, Schema.Literal<"::">, Schema.String]>>;
1757
+ /**
1758
+ * @description A full PEPPOL document type identifier in `<scheme>::<value>` form. The scheme prefix and value must both be known.
1759
+ *
1760
+ * @see {@link documentTypesTable}
1761
+ */
1762
+ declare class PeppolDocumentType extends PeppolDocumentType_base {}
1763
+ //#endregion
1764
+ //#region src/schemas/values/document-type-schemes-schema.d.ts
1765
+ declare const PeppolDocumentTypeScheme_base: OpaqueSchema<PeppolDocumentTypeScheme, Schema.Literals<[string, ...string[]]>>;
1766
+ /**
1767
+ * @description A PEPPOL document type scheme, for example `busdox-docid-qns` or `peppol-doctype-wildcard`.
1768
+ *
1769
+ * @example
1770
+ * ```ts
1771
+ * 'busdox-docid-qns';
1772
+ * ```;
1773
+ *
1774
+ * @see {@link documentTypesScheme}
1775
+ */
1776
+ declare class PeppolDocumentTypeScheme extends PeppolDocumentTypeScheme_base {}
1777
+ //#endregion
1778
+ //#region src/schemas/values/document-type-values-schema.d.ts
1779
+ declare const PeppolDocumentTypeValue_base: OpaqueSchema<PeppolDocumentTypeValue, Schema.String>;
1780
+ /**
1781
+ * @description The value part of a PEPPOL document type identifier (the portion after the scheme prefix) from the known document type table.
1782
+ *
1783
+ * @see {@link documentTypesTable}
1784
+ */
1785
+ declare class PeppolDocumentTypeValue extends PeppolDocumentTypeValue_base {}
1786
+ //#endregion
1787
+ //#region src/schemas/values/invoice-status-code-schema.d.ts
1788
+ declare const PeppolInvoiceStatusCodes_base: OpaqueSchema<PeppolInvoiceStatusCodes, Schema.brand<Schema.Literals<readonly ["AB", "AP", "RE", "IP", "UQ", "CA", "PD"]>, "PeppolInvoiceStatusCodes">>;
1789
+ /**
1790
+ * @description An invoice status code from the PEPPOL subset of UNCL 4343 (T111).
1791
+ *
1792
+ * @example
1793
+ * ```ts
1794
+ * 'AB';
1795
+ * ```;
1796
+ *
1797
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4343-T111/
1798
+ * @see {@link invoiceStatusCodesKeys}
1799
+ */
1800
+ declare class PeppolInvoiceStatusCodes extends PeppolInvoiceStatusCodes_base {}
1801
+ //#endregion
1802
+ //#region src/schemas/values/invoice-type-code-schema.d.ts
1803
+ declare const PeppolInvoiceTypeCode_base: OpaqueSchema<PeppolInvoiceTypeCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolInvoiceTypeCode">>;
1804
+ /**
1805
+ * @description An invoice type code from the PEPPOL subset of UNCL 1001.
1806
+ *
1807
+ * @example
1808
+ * ```ts
1809
+ * '71';
1810
+ * ```;
1811
+ *
1812
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001-inv/
1813
+ * @see {@link invoiceTypeCodesKeys}
1814
+ */
1815
+ declare class PeppolInvoiceTypeCode extends PeppolInvoiceTypeCode_base {}
1816
+ //#endregion
1817
+ //#region src/schemas/values/item-classification-codes-schema.d.ts
1818
+ declare const PeppolItemClassificationCode_base: OpaqueSchema<PeppolItemClassificationCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolItemClassificationCode">>;
1819
+ /**
1820
+ * @description An item classification code from the PEPPOL subset of UNCL 7143.
1821
+ *
1822
+ * @example
1823
+ * ```ts
1824
+ * 'AA';
1825
+ * ```;
1826
+ *
1827
+ * @validations
1828
+ * - BR-CL-13: Item classification scheme MUST be a valid UNTDID 7143 code.
1829
+ *
1830
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL7143/
1831
+ * @see {@link itemClassificationCodesKeys}
1832
+ */
1833
+ declare class PeppolItemClassificationCode extends PeppolItemClassificationCode_base {}
1834
+ //#endregion
1835
+ //#region src/schemas/values/op-status-action-schema.d.ts
1836
+ declare const PeppolOpStatusAction_base: OpaqueSchema<PeppolOpStatusAction, Schema.brand<Schema.Literals<readonly ["NOA", "PIN", "NIN", "CNF", "CNP", "CNA", "OTH"]>, "PeppolOpStatusAction">>;
1837
+ /**
1838
+ * @description An OpenPeppol operation status action code from the OPStatusAction codelist.
1839
+ *
1840
+ * @example
1841
+ * ```ts
1842
+ * 'NOA';
1843
+ * ```;
1844
+ *
1845
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/OPStatusAction/
1846
+ * @see {@link opStatusActionKeys}
1847
+ */
1848
+ declare class PeppolOpStatusAction extends PeppolOpStatusAction_base {}
1849
+ //#endregion
1850
+ //#region src/schemas/values/op-status-reason-schema.d.ts
1851
+ declare const PeppolOpStatusReason_base: OpaqueSchema<PeppolOpStatusReason, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolOpStatusReason">>;
1852
+ /**
1853
+ * @description An OpenPeppol operation status reason code from the OPStatusReason codelist.
1854
+ *
1855
+ * @example
1856
+ * ```ts
1857
+ * 'NON';
1858
+ * ```;
1859
+ *
1860
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/OPStatusReason/
1861
+ * @see {@link opStatusReasonKeys}
1862
+ */
1863
+ declare class PeppolOpStatusReason extends PeppolOpStatusReason_base {}
1864
+ //#endregion
1865
+ //#region src/schemas/values/participant-identifier-code-schema.d.ts
1866
+ declare const PeppolParticipantIdentifierCode_base: OpaqueSchema<PeppolParticipantIdentifierCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolParticipantIdentifierCode">>;
1867
+ /**
1868
+ * @description A PEPPOL participant identifier scheme from the participant identifier schemes codelist.
1869
+ *
1870
+ * @example
1871
+ * ```ts
1872
+ * '0002';
1873
+ * ```;
1874
+ *
1875
+ * @see {@link participantIdentifierSchemesKeys}
1876
+ */
1877
+ declare class PeppolParticipantIdentifierCode extends PeppolParticipantIdentifierCode_base {}
1878
+ //#endregion
1879
+ //#region src/schemas/values/peppol-process-schema.d.ts
1880
+ declare const PeppolProcess_base: OpaqueSchema<PeppolProcess, Schema.TemplateLiteral<readonly [Schema.Literals<readonly ["cenbii-procid-ubl", "oioubl-procid-ubl"]>, Schema.Literal<"::">, Schema.String]>>;
1881
+ /**
1882
+ * @description A full PEPPOL business process identifier in `<scheme>::<value>` form from the known processes table.
1883
+ *
1884
+ * @example
1885
+ * ```ts
1886
+ * 'cenbii-procid-ubl::urn:fdc:peppol.eu:2017:poacc:billing:01:1.0';
1887
+ * ```;
1888
+ *
1889
+ * @see {@link processes}
1890
+ */
1891
+ declare class PeppolProcess extends PeppolProcess_base {}
1892
+ /**
1893
+ * @description A PEPPOL business process identifier key as defined by the processes codelist.
1894
+ *
1895
+ * @see {@link processes}
1896
+ */
1897
+ type PeppolProcesses = Schema.Codec.Encoded<typeof PeppolProcess>;
1898
+ //#endregion
1899
+ //#region src/schemas/values/process-from-document-type-schema.d.ts
1900
+ /**
1901
+ * @description Validates a business process identifier (`<scheme>::<value>`) against the processes allowed for a given document type.
1902
+ *
1903
+ * @param documentType - The PEPPOL document type scheme whose allowed processes should be used.
1904
+ * @param error - The custom error message to use when validation fails. Defaults to `'invalid process type for document type'`.
1905
+ *
1906
+ * @returns An Effect schema that matches only processes allowed for the given document type.
1907
+ *
1908
+ * @see {@link PeppolProcess}
1909
+ * @see {@link documentTypesProcessIds}
1910
+ */
1911
+ declare function processFromDocumentTypeSchema(documentType: PeppolDocumentType, error?: string): Schema.String | typeof PeppolProcess;
1912
+ //#endregion
1913
+ //#region src/schemas/values/quantity-unit-codes-schema.d.ts
1914
+ declare const PeppolQuantityUnitCode_base: OpaqueSchema<PeppolQuantityUnitCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolQuantityUnitCode">>;
1915
+ /**
1916
+ * @description A unit of measure code from the PEPPOL subset of UN/ECE Recommendation 20.
1917
+ *
1918
+ * @example
1919
+ * ```ts
1920
+ * '10';
1921
+ * ```;
1922
+ *
1923
+ * @validations
1924
+ * - BR-CL-23: Unit of measure code MUST be a valid UN/ECE Rec 20 code.
1925
+ *
1926
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNECERec20/
1927
+ * @see {@link quantityUnitCodesKeys}
1928
+ */
1929
+ declare class PeppolQuantityUnitCode extends PeppolQuantityUnitCode_base {}
1930
+ //#endregion
1931
+ //#region src/schemas/values/vatex-code-schema.d.ts
1932
+ declare const PeppolVatexCode_base: OpaqueSchema<PeppolVatexCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolVatexCode">>;
1933
+ /**
1934
+ * @description A VAT exemption reason code from the CEF VATEX codelist.
1935
+ *
1936
+ * @example
1937
+ * ```ts
1938
+ * 'VATEX-EU-79-C';
1939
+ * ```;
1940
+ *
1941
+ * @validations
1942
+ * - BR-CL-22: VAT exemption reason code MUST be a valid CEF VATEX code.
1943
+ *
1944
+ * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/vatex/
1945
+ * @see {@link vatexCodesKeys}
1946
+ */
1947
+ declare class PeppolVatexCode extends PeppolVatexCode_base {}
1948
+ //#endregion
1158
1949
  //#region src/schemas/fields/peppol-tax-category-schema.d.ts
1159
1950
  declare const PeppolTaxSchemeId_base: OpaqueSchema<PeppolTaxSchemeId, Schema.Struct<{
1160
1951
  /**
@@ -1162,6 +1953,16 @@ declare const PeppolTaxSchemeId_base: OpaqueSchema<PeppolTaxSchemeId, Schema.Str
1162
1953
  */
1163
1954
  readonly id: Schema.withDecodingDefaultType<Schema.String, never>;
1164
1955
  }>>;
1956
+ /**
1957
+ * @description The tax scheme identifier for a tax category, defaulting to `VAT` when the element is absent.
1958
+ *
1959
+ * @example
1960
+ * ```ts
1961
+ * { id: 'VAT' }
1962
+ * ```;
1963
+ *
1964
+ * @see {@link PeppolTaxCategory}
1965
+ */
1165
1966
  declare class PeppolTaxSchemeId extends PeppolTaxSchemeId_base {}
1166
1967
  declare const PeppolTaxCategory_base: OpaqueSchema<PeppolTaxCategory, Schema.Struct<{
1167
1968
  /**
@@ -1171,7 +1972,7 @@ declare const PeppolTaxCategory_base: OpaqueSchema<PeppolTaxCategory, Schema.Str
1171
1972
  *
1172
1973
  * @name `cbc:ID`
1173
1974
  */
1174
- readonly id: Schema.brand<Schema.Literals<readonly ["AE", "E", "S", "Z", "G", "O", "K", "L", "M", "B"]>, "PeppolDutyTaxFeeCategoryCode">;
1975
+ readonly id: typeof PeppolDutyTaxFeeCategoryCode;
1175
1976
  /**
1176
1977
  * @description The VAT rate, represented as percentage that applies to the invoiced item.
1177
1978
  *
@@ -1198,7 +1999,7 @@ declare class PeppolTaxCategory extends PeppolTaxCategory_base {}
1198
1999
  //#endregion
1199
2000
  //#region src/schemas/fields/peppol-tax-subtotal-category-schema.d.ts
1200
2001
  declare const PeppolTaxSubTotalCategory_base: OpaqueSchema<PeppolTaxSubTotalCategory, Schema.Struct<{
1201
- readonly id: Schema.brand<Schema.Literals<readonly ["AE", "E", "S", "Z", "G", "O", "K", "L", "M", "B"]>, "PeppolDutyTaxFeeCategoryCode">;
2002
+ readonly id: typeof PeppolDutyTaxFeeCategoryCode;
1202
2003
  readonly percent: Schema.optional<Schema.Finite>;
1203
2004
  readonly taxSchemeId: typeof PeppolTaxSchemeId;
1204
2005
  /**
@@ -1222,6 +2023,9 @@ declare const PeppolTaxSubTotalCategory_base: OpaqueSchema<PeppolTaxSubTotalCate
1222
2023
  * @name cac:TaxCategory
1223
2024
  */
1224
2025
  declare class PeppolTaxSubTotalCategory extends PeppolTaxSubTotalCategory_base {}
2026
+ /**
2027
+ * @description The encoded form of {@link PeppolTaxSubTotalCategory}, accepted by the decoder before branded code values are applied.
2028
+ */
1225
2029
  interface PeppolTaxSubTotalCategoryEncoded extends Schema.Codec.Encoded<typeof PeppolTaxSubTotalCategory> {}
1226
2030
  //#endregion
1227
2031
  //#region src/schemas/fields/peppol-tax-subtotal-schema.d.ts
@@ -1246,6 +2050,8 @@ declare const PeppolTaxSubTotal_base: OpaqueSchema<PeppolTaxSubTotal, Schema.Str
1246
2050
  readonly taxableAmount: typeof PeppolAmount;
1247
2051
  }>>;
1248
2052
  /**
2053
+ * @description A VAT breakdown line for a single tax category, giving the taxable amount and the tax amount.
2054
+ *
1249
2055
  * @summary VAT breakdown (TaxSubtotal)
1250
2056
  *
1251
2057
  * @name cac:TaxSubtotal
@@ -1267,11 +2073,16 @@ declare const PeppolTaxTotalsBase_base: OpaqueSchema<PeppolTaxTotalsBase, Schema
1267
2073
  readonly taxSubtotals: Schema.optional<Schema.$Array<typeof PeppolTaxSubTotal>>;
1268
2074
  }>>;
1269
2075
  /**
2076
+ * @description The total tax amount for the document, with an optional breakdown into tax subtotals.
2077
+ *
1270
2078
  * @summary TAX TOTAL
1271
2079
  *
1272
2080
  * @name cac:TaxTotal (1..2)
1273
2081
  */
1274
2082
  declare class PeppolTaxTotalsBase extends PeppolTaxTotalsBase_base {}
2083
+ /**
2084
+ * @description Alias for {@link PeppolTaxTotalsBase}.
2085
+ */
1275
2086
  type PeppolTaxTotal = PeppolTaxTotalsBase;
1276
2087
  //#endregion
1277
2088
  //#region src/schemas/peppol-billing-base-schema.d.ts
@@ -1288,6 +2099,16 @@ declare const PeppolContractDocumentReference_base: OpaqueSchema<PeppolContractD
1288
2099
  */
1289
2100
  readonly id: Schema.String;
1290
2101
  }>>;
2102
+ /**
2103
+ * @description Wraps the `cac:ContractDocumentReference` element: an identifier of a contract that the billing document references.
2104
+ *
2105
+ * @example
2106
+ * ```ts
2107
+ * { id: '123Contractref' }
2108
+ * ```;
2109
+ *
2110
+ * @see {@link PeppolBillingBase}
2111
+ */
1291
2112
  declare class PeppolContractDocumentReference extends PeppolContractDocumentReference_base {}
1292
2113
  declare const PeppolOriginatorDocumentReference_base: OpaqueSchema<PeppolOriginatorDocumentReference, Schema.Struct<{
1293
2114
  /**
@@ -1302,6 +2123,16 @@ declare const PeppolOriginatorDocumentReference_base: OpaqueSchema<PeppolOrigina
1302
2123
  */
1303
2124
  readonly id: Schema.String;
1304
2125
  }>>;
2126
+ /**
2127
+ * @description Wraps the `cac:OriginatorDocumentReference` element: the identification of the call for tender or lot the invoice relates to.
2128
+ *
2129
+ * @example
2130
+ * ```ts
2131
+ * { id: 'PPID-123' }
2132
+ * ```;
2133
+ *
2134
+ * @see {@link PeppolBillingBase}
2135
+ */
1305
2136
  declare class PeppolOriginatorDocumentReference extends PeppolOriginatorDocumentReference_base {}
1306
2137
  declare const PeppolReceiptDocumentReference_base: OpaqueSchema<PeppolReceiptDocumentReference, Schema.Struct<{
1307
2138
  /**
@@ -1316,6 +2147,16 @@ declare const PeppolReceiptDocumentReference_base: OpaqueSchema<PeppolReceiptDoc
1316
2147
  */
1317
2148
  readonly id: Schema.String;
1318
2149
  }>>;
2150
+ /**
2151
+ * @description Wraps the `cac:ReceiptDocumentReference` element: an identifier of a referenced receiving advice.
2152
+ *
2153
+ * @example
2154
+ * ```ts
2155
+ * { id: 'rec98' }
2156
+ * ```;
2157
+ *
2158
+ * @see {@link PeppolBillingBase}
2159
+ */
1319
2160
  declare class PeppolReceiptDocumentReference extends PeppolReceiptDocumentReference_base {}
1320
2161
  declare const PeppolDespatchDocumentReference_base: OpaqueSchema<PeppolDespatchDocumentReference, Schema.Struct<{
1321
2162
  /**
@@ -1330,6 +2171,16 @@ declare const PeppolDespatchDocumentReference_base: OpaqueSchema<PeppolDespatchD
1330
2171
  */
1331
2172
  readonly id: Schema.String;
1332
2173
  }>>;
2174
+ /**
2175
+ * @description Wraps the `cac:DespatchDocumentReference` element: an identifier of a referenced despatch advice.
2176
+ *
2177
+ * @example
2178
+ * ```ts
2179
+ * { id: 'desp98' }
2180
+ * ```;
2181
+ *
2182
+ * @see {@link PeppolBillingBase}
2183
+ */
1333
2184
  declare class PeppolDespatchDocumentReference extends PeppolDespatchDocumentReference_base {}
1334
2185
  declare const PeppolBillingBase_base: OpaqueSchema<PeppolBillingBase, Schema.Struct<{
1335
2186
  /**
@@ -1413,7 +2264,7 @@ declare const PeppolBillingBase_base: OpaqueSchema<PeppolBillingBase, Schema.Str
1413
2264
  *
1414
2265
  * @name `cbc:DocumentCurrencyCode`
1415
2266
  */
1416
- readonly documentCurrencyCode: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolCurrencyCode">;
2267
+ readonly documentCurrencyCode: typeof PeppolCurrencyCode;
1417
2268
  /**
1418
2269
  * @description The currency used for VAT accounting and reporting purposes as accepted or required in the country of the Seller. Shall be used in combination
1419
2270
  * with the Invoice total VAT amount in accounting currency (BT-111), when the VAT accounting currency code differs from the Invoice currency
@@ -1426,7 +2277,7 @@ declare const PeppolBillingBase_base: OpaqueSchema<PeppolBillingBase, Schema.Str
1426
2277
  *
1427
2278
  * @name `cbc:TaxCurrencyCode`
1428
2279
  */
1429
- readonly taxCurrencyCode: Schema.optional<Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolCurrencyCode">>;
2280
+ readonly taxCurrencyCode: Schema.optional<typeof PeppolCurrencyCode>;
1430
2281
  /**
1431
2282
  * @description A textual value that specifies where to book the relevant data into the Buyer's financial accounts.
1432
2283
  *
@@ -1566,7 +2417,7 @@ declare const PeppolBillingBase_base: OpaqueSchema<PeppolBillingBase, Schema.Str
1566
2417
  *
1567
2418
  * @name cac:AllowanceCharge
1568
2419
  */
1569
- readonly allowanceCharges: Schema.optional<Schema.$Array<Schema.Union<readonly [typeof PeppolAllowance, typeof PeppolCharge]>>>;
2420
+ readonly allowanceCharges: Schema.optional<Schema.$Array<typeof PeppolAllowanceCharge>>;
1570
2421
  /**
1571
2422
  * @description When tax currency code is provided, two instances of the tax total must be present, but only one with tax subtotal.
1572
2423
  *
@@ -1585,8 +2436,8 @@ declare const PeppolBillingBase_base: OpaqueSchema<PeppolBillingBase, Schema.Str
1585
2436
  /**
1586
2437
  * @description Base schema for a billing document.
1587
2438
  *
1588
- * @see {@link creditNoteSchema} - the credit note schema
1589
- * @see {@link invoiceSchema} - the invoice schema
2439
+ * @see {@link PeppolCreditNote} - the credit note schema
2440
+ * @see {@link PeppolInvoice} - the invoice schema
1590
2441
  */
1591
2442
  declare class PeppolBillingBase extends PeppolBillingBase_base {}
1592
2443
  //#endregion
@@ -1604,6 +2455,17 @@ declare const BaseLineAllowanceCharge_base: OpaqueSchema<BaseLineAllowanceCharge
1604
2455
  */
1605
2456
  readonly multiplierFactorNumeric: Schema.optional<Schema.Finite>;
1606
2457
  }>>;
2458
+ /**
2459
+ * @description Shared fields for an allowance or charge applied to an Invoice line. Extends the price level allowance and charge fields with the reason text and
2460
+ * the multiplier factor used to calculate the amount.
2461
+ *
2462
+ * @example
2463
+ * ```ts
2464
+ * { amount: { value: 200, currencyId: 'EUR' }, chargeIndicator: false, allowanceChargeReason: 'Discount' }
2465
+ * ```;
2466
+ *
2467
+ * @see {@link PeppolLineAllowanceCharge}
2468
+ */
1607
2469
  declare class BaseLineAllowanceCharge extends BaseLineAllowanceCharge_base {}
1608
2470
  declare const PeppolLineAllowance_base: OpaqueSchema<PeppolLineAllowance, Schema.Struct<{
1609
2471
  readonly amount: typeof PeppolAmount;
@@ -1619,7 +2481,7 @@ declare const PeppolLineAllowance_base: OpaqueSchema<PeppolLineAllowance, Schema
1619
2481
  /**
1620
2482
  * @name cbc:AllowanceChargeReasonCode
1621
2483
  */
1622
- readonly allowanceChargeReasonCode: Schema.optional<Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolAllowanceChargeReasonCode">>;
2484
+ readonly allowanceChargeReasonCode: Schema.optional<typeof PeppolAllowanceChargeReasonCode>;
1623
2485
  /**
1624
2486
  * @name cbc:ChargeIndicator
1625
2487
  *
@@ -1627,6 +2489,17 @@ declare const PeppolLineAllowance_base: OpaqueSchema<PeppolLineAllowance, Schema
1627
2489
  */
1628
2490
  readonly chargeIndicator: Schema.Literal<false>;
1629
2491
  }>>;
2492
+ /**
2493
+ * @description An allowance applied to an Invoice line, marked by a `cbc:ChargeIndicator` of `false`. Adds an allowance reason code to the shared line allowance
2494
+ * and charge fields.
2495
+ *
2496
+ * @example
2497
+ * ```ts
2498
+ * { amount: { value: 200, currencyId: 'EUR' }, chargeIndicator: false, allowanceChargeReasonCode: '95' }
2499
+ * ```;
2500
+ *
2501
+ * @see {@link PeppolLineAllowanceCharge}
2502
+ */
1630
2503
  declare class PeppolLineAllowance extends PeppolLineAllowance_base {}
1631
2504
  declare const PeppolLineCharge_base: OpaqueSchema<PeppolLineCharge, Schema.Struct<{
1632
2505
  readonly amount: typeof PeppolAmount;
@@ -1642,7 +2515,7 @@ declare const PeppolLineCharge_base: OpaqueSchema<PeppolLineCharge, Schema.Struc
1642
2515
  /**
1643
2516
  * @name cbc:AllowanceChargeReasonCode
1644
2517
  */
1645
- readonly allowanceChargeReasonCode: Schema.optional<Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolChargeReasonCode">>;
2518
+ readonly allowanceChargeReasonCode: Schema.optional<typeof PeppolChargeReasonCode>;
1646
2519
  /**
1647
2520
  * @name cbc:ChargeIndicator
1648
2521
  *
@@ -1650,10 +2523,37 @@ declare const PeppolLineCharge_base: OpaqueSchema<PeppolLineCharge, Schema.Struc
1650
2523
  */
1651
2524
  readonly chargeIndicator: Schema.Literal<true>;
1652
2525
  }>>;
2526
+ /**
2527
+ * @description A charge applied to an Invoice line, marked by a `cbc:ChargeIndicator` of `true`. Adds a charge reason code to the shared line allowance and charge
2528
+ * fields.
2529
+ *
2530
+ * @example
2531
+ * ```ts
2532
+ * { amount: { value: 25, currencyId: 'EUR' }, chargeIndicator: true, allowanceChargeReasonCode: 'AA' }
2533
+ * ```;
2534
+ *
2535
+ * @see {@link PeppolLineAllowanceCharge}
2536
+ */
1653
2537
  declare class PeppolLineCharge extends PeppolLineCharge_base {}
1654
- declare const peppolLineAllowanceChargeSchema: Schema.Union<readonly [typeof PeppolLineAllowance, typeof PeppolLineCharge]>;
1655
- type PeppolLineAllowanceCharge = typeof peppolLineAllowanceChargeSchema.Type;
1656
- type PeppolLineAllowanceChargeEncoded = typeof peppolLineAllowanceChargeSchema.Encoded;
2538
+ declare const PeppolLineAllowanceCharge_base: OpaqueSchema<PeppolLineAllowanceCharge, Schema.Union<readonly [typeof PeppolLineAllowance, typeof PeppolLineCharge]>>;
2539
+ /**
2540
+ * @description An allowance or charge applied to an Invoice line, selected by the `cbc:ChargeIndicator` value: `false` selects an allowance, `true` selects a
2541
+ * charge.
2542
+ *
2543
+ * @example
2544
+ * ```ts
2545
+ * { amount: { value: 25, currencyId: 'EUR' }, chargeIndicator: true, allowanceChargeReasonCode: 'AA', allowanceChargeReason: 'Advertising' }
2546
+ * ```;
2547
+ *
2548
+ * @see {@link PeppolLineAllowance}
2549
+ */
2550
+ declare class PeppolLineAllowanceCharge extends PeppolLineAllowanceCharge_base {}
2551
+ /**
2552
+ * @description Encoded form of {@link PeppolLineAllowanceCharge} produced by the Effect Schema codec.
2553
+ *
2554
+ * @see {@link PeppolLineAllowanceCharge}
2555
+ */
2556
+ type PeppolLineAllowanceChargeEncoded = Schema.Codec.Encoded<typeof PeppolLineAllowanceCharge>;
1657
2557
  //#endregion
1658
2558
  //#region src/schemas/fields/peppol-invoice-line-period-schema.d.ts
1659
2559
  declare const PeppolInvoiceLinePeriod_base: OpaqueSchema<PeppolInvoiceLinePeriod, Schema.Struct<{
@@ -1684,6 +2584,17 @@ declare const PeppolInvoiceLinePeriod_base: OpaqueSchema<PeppolInvoiceLinePeriod
1684
2584
  */
1685
2585
  readonly startDate: Schema.optional<typeof PeppolIsoDateString>;
1686
2586
  }>>;
2587
+ /**
2588
+ * @description The period relevant for an Invoice line, given by an optional start date and end date. Wraps the `cac:InvoicePeriod` element as used on a line; the
2589
+ * document level period extends this shape in {@link PeppolInvoicePeriod}.
2590
+ *
2591
+ * @example
2592
+ * ```ts
2593
+ * { startDate: '2017-10-01', endDate: '2017-10-31' }
2594
+ * ```;
2595
+ *
2596
+ * @see {@link PeppolInvoicePeriod}
2597
+ */
1687
2598
  declare class PeppolInvoiceLinePeriod extends PeppolInvoiceLinePeriod_base {}
1688
2599
  //#endregion
1689
2600
  //#region src/schemas/fields/peppol-item-classification-schema.d.ts
@@ -1703,7 +2614,7 @@ declare const PeppolItemClassification_base: OpaqueSchema<PeppolItemClassificati
1703
2614
  *
1704
2615
  * @name `@listID`
1705
2616
  */
1706
- readonly listId: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolItemClassificationCode">;
2617
+ readonly listId: typeof PeppolItemClassificationCode;
1707
2618
  /**
1708
2619
  * @description The identification scheme version identifier of the Item classification identifier.
1709
2620
  *
@@ -1747,6 +2658,16 @@ declare const PeppolAdditionalItemProperties_base: OpaqueSchema<PeppolAdditional
1747
2658
  */
1748
2659
  readonly value: Schema.String;
1749
2660
  }>>;
2661
+ /**
2662
+ * @description An additional property of the item, expressed as an attribute name and value pair.
2663
+ *
2664
+ * @example
2665
+ * ```ts
2666
+ * { name: 'Colour', value: 'Blue' }
2667
+ * ```;
2668
+ *
2669
+ * @see {@link PeppolLineItem}
2670
+ */
1750
2671
  declare class PeppolAdditionalItemProperties extends PeppolAdditionalItemProperties_base {}
1751
2672
  declare const PeppolCommodityClassifications_base: OpaqueSchema<PeppolCommodityClassifications, Schema.Struct<{
1752
2673
  /**
@@ -1761,6 +2682,16 @@ declare const PeppolCommodityClassifications_base: OpaqueSchema<PeppolCommodityC
1761
2682
  */
1762
2683
  readonly itemClassification: typeof PeppolItemClassification;
1763
2684
  }>>;
2685
+ /**
2686
+ * @description A code classifying the item by its type or nature, identified by a scheme such as CPV.
2687
+ *
2688
+ * @example
2689
+ * ```ts
2690
+ * { itemClassification: { id: '09348023', listId: 'STI' } }
2691
+ * ```;
2692
+ *
2693
+ * @see {@link PeppolItemClassification}
2694
+ */
1764
2695
  declare class PeppolCommodityClassifications extends PeppolCommodityClassifications_base {}
1765
2696
  declare const PeppolOriginCountryCode_base: OpaqueSchema<PeppolOriginCountryCode, Schema.Struct<{
1766
2697
  /**
@@ -1770,8 +2701,18 @@ declare const PeppolOriginCountryCode_base: OpaqueSchema<PeppolOriginCountryCode
1770
2701
  *
1771
2702
  * @name `cbc:IdentificationCode`
1772
2703
  */
1773
- readonly identificationCode: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolCountryCode">;
2704
+ readonly identificationCode: typeof PeppolCountryCodeValue;
1774
2705
  }>>;
2706
+ /**
2707
+ * @description The country from which the item originates, identified by an ISO 3166-1 country code.
2708
+ *
2709
+ * @example
2710
+ * ```ts
2711
+ * { identificationCode: 'NO' }
2712
+ * ```;
2713
+ *
2714
+ * @see {@link PeppolLineItem}
2715
+ */
1775
2716
  declare class PeppolOriginCountryCode extends PeppolOriginCountryCode_base {}
1776
2717
  declare const PeppolStandardItemIdentification_base: OpaqueSchema<PeppolStandardItemIdentification, Schema.Struct<{
1777
2718
  /**
@@ -1783,9 +2724,19 @@ declare const PeppolStandardItemIdentification_base: OpaqueSchema<PeppolStandard
1783
2724
  */
1784
2725
  readonly id: Schema.Struct<{
1785
2726
  readonly id: Schema.String;
1786
- readonly schemeId: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolIcdCode">;
2727
+ readonly schemeId: typeof PeppolIcdCode;
1787
2728
  }>;
1788
2729
  }>>;
2730
+ /**
2731
+ * @description An item identifier based on a registered scheme, such as a GTIN or EAN.
2732
+ *
2733
+ * @example
2734
+ * ```ts
2735
+ * { id: { id: '21382183120983', schemeId: '0088' } }
2736
+ * ```;
2737
+ *
2738
+ * @see {@link PeppolIdentifier}
2739
+ */
1789
2740
  declare class PeppolStandardItemIdentification extends PeppolStandardItemIdentification_base {}
1790
2741
  declare const PeppolSellersItemIdentification_base: OpaqueSchema<PeppolSellersItemIdentification, Schema.Struct<{
1791
2742
  /**
@@ -1800,6 +2751,16 @@ declare const PeppolSellersItemIdentification_base: OpaqueSchema<PeppolSellersIt
1800
2751
  */
1801
2752
  readonly id: Schema.String;
1802
2753
  }>>;
2754
+ /**
2755
+ * @description An identifier assigned by the Seller for the item.
2756
+ *
2757
+ * @example
2758
+ * ```ts
2759
+ * { id: '987323' }
2760
+ * ```;
2761
+ *
2762
+ * @see {@link PeppolLineItem}
2763
+ */
1803
2764
  declare class PeppolSellersItemIdentification extends PeppolSellersItemIdentification_base {}
1804
2765
  declare const PeppolBuyersItemIdentification_base: OpaqueSchema<PeppolBuyersItemIdentification, Schema.Struct<{
1805
2766
  /**
@@ -1814,6 +2775,16 @@ declare const PeppolBuyersItemIdentification_base: OpaqueSchema<PeppolBuyersItem
1814
2775
  */
1815
2776
  readonly id: Schema.String;
1816
2777
  }>>;
2778
+ /**
2779
+ * @description An identifier assigned by the Buyer for the item.
2780
+ *
2781
+ * @example
2782
+ * ```ts
2783
+ * { id: '12345' }
2784
+ * ```;
2785
+ *
2786
+ * @see {@link PeppolLineItem}
2787
+ */
1817
2788
  declare class PeppolBuyersItemIdentification extends PeppolBuyersItemIdentification_base {}
1818
2789
  declare const PeppolLineItem_base: OpaqueSchema<PeppolLineItem, Schema.Struct<{
1819
2790
  /**
@@ -1880,11 +2851,16 @@ declare const PeppolLineItem_base: OpaqueSchema<PeppolLineItem, Schema.Struct<{
1880
2851
  readonly additionalItemProperties: Schema.optional<Schema.$Array<typeof PeppolAdditionalItemProperties>>;
1881
2852
  }>>;
1882
2853
  /**
2854
+ * @description The item details for an invoice or credit note line, including its name, identifiers, classification, and line VAT category.
2855
+ *
1883
2856
  * @summary Item details on invoice/credit-note line
1884
2857
  *
1885
2858
  * @name cac:Item
1886
2859
  */
1887
2860
  declare class PeppolLineItem extends PeppolLineItem_base {}
2861
+ /**
2862
+ * @description Alias for {@link PeppolLineItem}.
2863
+ */
1888
2864
  type PeppolItem = PeppolLineItem;
1889
2865
  //#endregion
1890
2866
  //#region src/schemas/fields/peppol-line-price-allowance-charge-schema.d.ts
@@ -1910,12 +2886,32 @@ declare const PriceAllowanceCharge_base: OpaqueSchema<PriceAllowanceCharge, Sche
1910
2886
  */
1911
2887
  readonly chargeIndicator: Schema.Boolean;
1912
2888
  }>>;
2889
+ /**
2890
+ * @description A price level allowance or charge applied to the item price, expressed as an amount and a charge indicator.
2891
+ *
2892
+ * @example
2893
+ * ```ts
2894
+ * { amount: { value: 200, currencyId: 'EUR' }, chargeIndicator: false }
2895
+ * ```;
2896
+ *
2897
+ * @see {@link PeppolLinePriceAllowanceCharge}
2898
+ */
1913
2899
  declare class PriceAllowanceCharge extends PriceAllowanceCharge_base {}
1914
2900
  declare const PeppolLinePriceAllowanceCharge_base: OpaqueSchema<PeppolLinePriceAllowanceCharge, Schema.Struct<{
1915
2901
  readonly amount: typeof PeppolAmount;
1916
2902
  readonly baseAmount: Schema.optional<typeof PeppolAmount>;
1917
2903
  readonly chargeIndicator: Schema.Literal<false>;
1918
2904
  }>>;
2905
+ /**
2906
+ * @description A price level allowance on the item price. Only allowances are allowed at price level, so the charge indicator is fixed to false.
2907
+ *
2908
+ * @example
2909
+ * ```ts
2910
+ * { amount: { value: 200, currencyId: 'EUR' }, chargeIndicator: false }
2911
+ * ```;
2912
+ *
2913
+ * @see {@link PeppolLinePrice}
2914
+ */
1919
2915
  declare class PeppolLinePriceAllowanceCharge extends PeppolLinePriceAllowanceCharge_base {}
1920
2916
  //#endregion
1921
2917
  //#region src/schemas/fields/peppol-quantity-schema.d.ts
@@ -1923,13 +2919,15 @@ declare const PeppolQuantity_base: OpaqueSchema<PeppolQuantity, Schema.Struct<{
1923
2919
  /**
1924
2920
  * @name `@unitCode`
1925
2921
  */
1926
- readonly unitCode: Schema.optional<Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolQuantityUnitCode">>;
2922
+ readonly unitCode: Schema.optional<typeof PeppolQuantityUnitCode>;
1927
2923
  /**
1928
2924
  * @name `#text (value)`
1929
2925
  */
1930
2926
  readonly value: Schema.Finite;
1931
2927
  }>>;
1932
2928
  /**
2929
+ * @description A quantity value with an optional unit of measure code.
2930
+ *
1933
2931
  * @summary Quantity with optional unit code
1934
2932
  *
1935
2933
  * @name `cbc:* (+ @unitCode)`
@@ -1956,6 +2954,8 @@ declare const PeppolLinePrice_base: OpaqueSchema<PeppolLinePrice, Schema.Struct<
1956
2954
  readonly priceAmount: typeof PeppolAmount;
1957
2955
  }>>;
1958
2956
  /**
2957
+ * @description The price details of an invoice or credit note line, including the price amount and any price level allowance.
2958
+ *
1959
2959
  * @summary Price details on invoice line
1960
2960
  *
1961
2961
  * @name cac:Price
@@ -1966,6 +2966,16 @@ declare class PeppolLinePrice extends PeppolLinePrice_base {}
1966
2966
  declare const PeppolOrderLineReference_base: OpaqueSchema<PeppolOrderLineReference, Schema.Struct<{
1967
2967
  readonly lineId: Schema.String;
1968
2968
  }>>;
2969
+ /**
2970
+ * @description A reference to the order line that the Invoice line fulfils. Wraps the `cac:OrderLineReference` element and its `cbc:LineID`.
2971
+ *
2972
+ * @example
2973
+ * ```ts
2974
+ * { lineId: '123' }
2975
+ * ```;
2976
+ *
2977
+ * @see {@link PeppolBaseLine}
2978
+ */
1969
2979
  declare class PeppolOrderLineReference extends PeppolOrderLineReference_base {}
1970
2980
  declare const PeppolBaseLine_base: OpaqueSchema<PeppolBaseLine, Schema.Struct<{
1971
2981
  /**
@@ -1990,7 +3000,7 @@ declare const PeppolBaseLine_base: OpaqueSchema<PeppolBaseLine, Schema.Struct<{
1990
3000
  *
1991
3001
  * @cardinality 0..n
1992
3002
  */
1993
- readonly allowanceCharges: Schema.optional<Schema.$Array<Schema.Union<readonly [typeof PeppolLineAllowance, typeof PeppolLineCharge]>>>;
3003
+ readonly allowanceCharges: Schema.optional<Schema.$Array<typeof PeppolLineAllowanceCharge>>;
1994
3004
  /**
1995
3005
  * @summary Line object identifier
1996
3006
  *
@@ -2090,7 +3100,7 @@ declare class PeppolBaseLine extends PeppolBaseLine_base {}
2090
3100
  //#region src/schemas/fields/peppol-invoice-line-schema.d.ts
2091
3101
  declare const PeppolInvoiceLine_base: OpaqueSchema<PeppolInvoiceLine, Schema.Struct<{
2092
3102
  readonly accountingCost: Schema.optional<Schema.String>;
2093
- readonly allowanceCharges: Schema.optional<Schema.$Array<Schema.Union<readonly [typeof PeppolLineAllowance, typeof PeppolLineCharge]>>>;
3103
+ readonly allowanceCharges: Schema.optional<Schema.$Array<typeof PeppolLineAllowanceCharge>>;
2094
3104
  readonly documentReference: Schema.optional<Schema.$Array<Schema.Struct<{
2095
3105
  readonly id: Schema.String;
2096
3106
  readonly schemeId: Schema.optional<Schema.String>;
@@ -2115,21 +3125,38 @@ declare const PeppolInvoiceLine_base: OpaqueSchema<PeppolInvoiceLine, Schema.Str
2115
3125
  */
2116
3126
  readonly invoicedQuantity: Schema.Struct<{
2117
3127
  readonly value: Schema.Finite;
2118
- readonly unitCode: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolQuantityUnitCode">;
3128
+ readonly unitCode: typeof PeppolQuantityUnitCode;
2119
3129
  }>;
2120
3130
  }>>;
2121
3131
  /**
3132
+ * @description A line of the Invoice, extending the common line fields with the invoiced quantity. Wraps the `cac:InvoiceLine` element.
3133
+ *
2122
3134
  * @summary Invoice line
2123
3135
  *
2124
3136
  * @name cac:InvoiceLine
2125
3137
  */
2126
3138
  declare class PeppolInvoiceLine extends PeppolInvoiceLine_base {}
3139
+ /**
3140
+ * @description Encoded form of {@link PeppolInvoiceLine} produced by the Effect Schema codec. Fields mirror the decoded structure.
3141
+ *
3142
+ * @see {@link PeppolInvoiceLine}
3143
+ */
2127
3144
  interface PeppolInvoiceLineEncoded extends Schema.Codec.Encoded<typeof PeppolInvoiceLine> {}
2128
3145
  //#endregion
2129
3146
  //#region src/schemas/peppol-invoice-schema.d.ts
2130
3147
  declare const PeppolProjectReference_base: OpaqueSchema<PeppolProjectReference, Schema.Struct<{
2131
3148
  readonly id: Schema.String;
2132
3149
  }>>;
3150
+ /**
3151
+ * @description Wraps the `cac:ProjectReference` element on an invoice: an identifier of the project the invoice relates to.
3152
+ *
3153
+ * @example
3154
+ * ```ts
3155
+ * { id: 'project-123' }
3156
+ * ```;
3157
+ *
3158
+ * @see {@link PeppolInvoice}
3159
+ */
2133
3160
  declare class PeppolProjectReference extends PeppolProjectReference_base {}
2134
3161
  declare const PeppolInvoice_base: OpaqueSchema<PeppolInvoice, Schema.Struct<{
2135
3162
  readonly customizationId: Schema.withDecodingDefaultType<Schema.String, never>;
@@ -2138,8 +3165,8 @@ declare const PeppolInvoice_base: OpaqueSchema<PeppolInvoice, Schema.Struct<{
2138
3165
  readonly issueDate: typeof PeppolIsoDateString;
2139
3166
  readonly note: Schema.optional<Schema.String>;
2140
3167
  readonly taxPointDate: Schema.optional<typeof PeppolIsoDateString>;
2141
- readonly documentCurrencyCode: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolCurrencyCode">;
2142
- readonly taxCurrencyCode: Schema.optional<Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolCurrencyCode">>;
3168
+ readonly documentCurrencyCode: typeof PeppolCurrencyCode;
3169
+ readonly taxCurrencyCode: Schema.optional<typeof PeppolCurrencyCode>;
2143
3170
  readonly accountingCost: Schema.optional<Schema.String>;
2144
3171
  readonly buyerReference: Schema.optional<Schema.String>;
2145
3172
  readonly invoicePeriod: Schema.optional<typeof PeppolInvoicePeriod>;
@@ -2157,7 +3184,7 @@ declare const PeppolInvoice_base: OpaqueSchema<PeppolInvoice, Schema.Struct<{
2157
3184
  readonly delivery: Schema.optional<typeof PeppolDelivery>;
2158
3185
  readonly paymentMeans: Schema.optional<Schema.$Array<typeof PeppolPaymentMeans>>;
2159
3186
  readonly paymentTerms: Schema.optional<typeof PeppolPaymentTerms>;
2160
- readonly allowanceCharges: Schema.optional<Schema.$Array<Schema.Union<readonly [typeof PeppolAllowance, typeof PeppolCharge]>>>;
3187
+ readonly allowanceCharges: Schema.optional<Schema.$Array<typeof PeppolAllowanceCharge>>;
2161
3188
  readonly taxTotals: Schema.$Array<typeof PeppolTaxTotalsBase>;
2162
3189
  readonly legalMonetaryTotal: typeof PeppolLegalMonetaryTotal;
2163
3190
  /**
@@ -2183,7 +3210,7 @@ declare const PeppolInvoice_base: OpaqueSchema<PeppolInvoice, Schema.Struct<{
2183
3210
  *
2184
3211
  * @name cbc:InvoiceTypeCode
2185
3212
  */
2186
- readonly invoiceTypeCode: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolInvoiceTypeCode">;
3213
+ readonly invoiceTypeCode: typeof PeppolInvoiceTypeCode;
2187
3214
  /**
2188
3215
  * @summary PROJECT REFERENCE
2189
3216
  *
@@ -2191,12 +3218,30 @@ declare const PeppolInvoice_base: OpaqueSchema<PeppolInvoice, Schema.Struct<{
2191
3218
  */
2192
3219
  readonly projectReference: Schema.optional<typeof PeppolProjectReference>;
2193
3220
  }>>;
3221
+ /**
3222
+ * @description UBL `Invoice` for PEPPOL BIS Billing 3.0. Extends {@link PeppolBillingBase} with the due date, type code, lines and project reference.
3223
+ *
3224
+ * @example
3225
+ * ```ts
3226
+ * {
3227
+ * customizationId: 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0',
3228
+ * profileId: 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0',
3229
+ * id: '33445566',
3230
+ * issueDate: '2017-11-01',
3231
+ * documentCurrencyCode: 'EUR',
3232
+ * invoiceTypeCode: '380'
3233
+ * }
3234
+ * ```;
3235
+ *
3236
+ * @see {@link PeppolBillingBase}
3237
+ * @see {@link PeppolCreditNote}
3238
+ */
2194
3239
  declare class PeppolInvoice extends PeppolInvoice_base {}
2195
3240
  //#endregion
2196
3241
  //#region src/schemas/fields/peppol-credit-note-line-schema.d.ts
2197
3242
  declare const PeppolCreditNoteLine_base: OpaqueSchema<PeppolCreditNoteLine, Schema.Struct<{
2198
3243
  readonly accountingCost: Schema.optional<Schema.String>;
2199
- readonly allowanceCharges: Schema.optional<Schema.$Array<Schema.Union<readonly [typeof PeppolLineAllowance, typeof PeppolLineCharge]>>>;
3244
+ readonly allowanceCharges: Schema.optional<Schema.$Array<typeof PeppolLineAllowanceCharge>>;
2200
3245
  readonly documentReference: Schema.optional<Schema.$Array<Schema.Struct<{
2201
3246
  readonly id: Schema.String;
2202
3247
  readonly schemeId: Schema.optional<Schema.String>;
@@ -2211,13 +3256,18 @@ declare const PeppolCreditNoteLine_base: OpaqueSchema<PeppolCreditNoteLine, Sche
2211
3256
  readonly price: typeof PeppolLinePrice;
2212
3257
  readonly creditedQuantity: Schema.Struct<{
2213
3258
  readonly value: Schema.Finite;
2214
- readonly unitCode: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolQuantityUnitCode">;
3259
+ readonly unitCode: typeof PeppolQuantityUnitCode;
2215
3260
  }>;
2216
3261
  }>>;
2217
3262
  /**
2218
3263
  * @description Credit note line is identical to Invoice line except the quantity element name.
2219
3264
  */
2220
3265
  declare class PeppolCreditNoteLine extends PeppolCreditNoteLine_base {}
3266
+ /**
3267
+ * @description Encoded form of {@link PeppolCreditNoteLine} produced by the Effect Schema codec. Fields mirror the decoded structure.
3268
+ *
3269
+ * @see {@link PeppolCreditNoteLine}
3270
+ */
2221
3271
  interface PeppolCreditNoteLineEncoded extends Schema.Codec.Encoded<typeof PeppolCreditNoteLine> {}
2222
3272
  //#endregion
2223
3273
  //#region src/schemas/peppol-credit-note-schema.d.ts
@@ -2228,8 +3278,8 @@ declare const PeppolCreditNote_base: OpaqueSchema<PeppolCreditNote, Schema.Struc
2228
3278
  readonly issueDate: typeof PeppolIsoDateString;
2229
3279
  readonly note: Schema.optional<Schema.String>;
2230
3280
  readonly taxPointDate: Schema.optional<typeof PeppolIsoDateString>;
2231
- readonly documentCurrencyCode: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolCurrencyCode">;
2232
- readonly taxCurrencyCode: Schema.optional<Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolCurrencyCode">>;
3281
+ readonly documentCurrencyCode: typeof PeppolCurrencyCode;
3282
+ readonly taxCurrencyCode: Schema.optional<typeof PeppolCurrencyCode>;
2233
3283
  readonly accountingCost: Schema.optional<Schema.String>;
2234
3284
  readonly buyerReference: Schema.optional<Schema.String>;
2235
3285
  readonly invoicePeriod: Schema.optional<typeof PeppolInvoicePeriod>;
@@ -2247,7 +3297,7 @@ declare const PeppolCreditNote_base: OpaqueSchema<PeppolCreditNote, Schema.Struc
2247
3297
  readonly delivery: Schema.optional<typeof PeppolDelivery>;
2248
3298
  readonly paymentMeans: Schema.optional<Schema.$Array<typeof PeppolPaymentMeans>>;
2249
3299
  readonly paymentTerms: Schema.optional<typeof PeppolPaymentTerms>;
2250
- readonly allowanceCharges: Schema.optional<Schema.$Array<Schema.Union<readonly [typeof PeppolAllowance, typeof PeppolCharge]>>>;
3300
+ readonly allowanceCharges: Schema.optional<Schema.$Array<typeof PeppolAllowanceCharge>>;
2251
3301
  readonly taxTotals: Schema.$Array<typeof PeppolTaxTotalsBase>;
2252
3302
  readonly legalMonetaryTotal: typeof PeppolLegalMonetaryTotal;
2253
3303
  /**
@@ -2264,7 +3314,7 @@ declare const PeppolCreditNote_base: OpaqueSchema<PeppolCreditNote, Schema.Struc
2264
3314
  *
2265
3315
  * @name cbc:CreditNoteTypeCode
2266
3316
  */
2267
- readonly creditNoteTypeCode: Schema.Literals<readonly ["81", "83", "381", "396", "532"]>;
3317
+ readonly creditNoteTypeCode: typeof PeppolCreditNoteTypeCode;
2268
3318
  }>>;
2269
3319
  /**
2270
3320
  * @description Main UBL Credit Note schema (camelCase properties) Effect port of `creditNoteSchema` (`z.extend(billingBaseSchema, ...)` →
@@ -2286,6 +3336,16 @@ declare const PeppolMessageLevelResponseParty_base: OpaqueSchema<PeppolMessageLe
2286
3336
  */
2287
3337
  readonly endpointId: Schema.optional<typeof PeppolIdentifier>;
2288
3338
  }>>;
3339
+ /**
3340
+ * @description Party used as `cac:SenderParty` or `cac:ReceiverParty` on a message level response, holding the party's electronic address.
3341
+ *
3342
+ * @example
3343
+ * ```ts
3344
+ * { endpointId: { id: '7300010000001', schemeId: '0088' } }
3345
+ * ```;
3346
+ *
3347
+ * @see {@link PeppolMessageLevelResponse}
3348
+ */
2289
3349
  declare class PeppolMessageLevelResponseParty extends PeppolMessageLevelResponseParty_base {}
2290
3350
  //#endregion
2291
3351
  //#region src/schemas/peppol-document-response-document-reference-schema.d.ts
@@ -2308,7 +3368,7 @@ declare const PeppolDocumentResponseDocumentReference_base: OpaqueSchema<PeppolD
2308
3368
  *
2309
3369
  * @name `cbc:DocumentTypeCode`
2310
3370
  */
2311
- readonly documentTypeCode: Schema.optional<Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolDocumentTypeCode">>;
3371
+ readonly documentTypeCode: Schema.optional<typeof PeppolDocumentTypeCode>;
2312
3372
  /**
2313
3373
  * @description The version of the document that has been identifier with the document identifier.
2314
3374
  *
@@ -2321,7 +3381,20 @@ declare const PeppolDocumentResponseDocumentReference_base: OpaqueSchema<PeppolD
2321
3381
  */
2322
3382
  readonly versionId: Schema.optional<Schema.String>;
2323
3383
  }>>;
3384
+ /**
3385
+ * @description Wraps `cac:DocumentReference` inside a message level response: identifies the business document the response is based on.
3386
+ *
3387
+ * @example
3388
+ * ```ts
3389
+ * { id: 'EnvelopeID-12345', versionId: '2' }
3390
+ * ```;
3391
+ *
3392
+ * @see {@link PeppolMessageLevelResponseDocumentResponse}
3393
+ */
2324
3394
  declare class PeppolDocumentResponseDocumentReference extends PeppolDocumentResponseDocumentReference_base {}
3395
+ /**
3396
+ * @description Alias of {@link PeppolDocumentResponseDocumentReference} under the message level response naming.
3397
+ */
2325
3398
  type PeppolMessageLevelDocumentResponseDocumentReference = PeppolDocumentResponseDocumentReference;
2326
3399
  //#endregion
2327
3400
  //#region src/schemas/peppol-document-response-document-schema.d.ts
@@ -2337,7 +3410,7 @@ declare const PeppolDocumentResponseDocument_base: OpaqueSchema<PeppolDocumentRe
2337
3410
  *
2338
3411
  * @name `cbc:ResponseCode`
2339
3412
  */
2340
- readonly responseCode: Schema.Literals<readonly ["AB", "AP", "RE"]>;
3413
+ readonly responseCode: typeof PeppolApplicationResponseTypeCode;
2341
3414
  /**
2342
3415
  * @description Used to meake any comments or instructions relevant to the response. The use of this element requires manual assessment by the receiver.
2343
3416
  *
@@ -2346,15 +3419,20 @@ declare const PeppolDocumentResponseDocument_base: OpaqueSchema<PeppolDocumentRe
2346
3419
  readonly description: Schema.optional<Schema.String>;
2347
3420
  }>>;
2348
3421
  /**
3422
+ * @description Wraps `cac:Response` inside a message level response: the overall response code and an optional textual note.
3423
+ *
2349
3424
  * @summary Response information
2350
3425
  *
2351
3426
  * @name `cac:Response`
2352
3427
  *
2353
3428
  * @cardinality (1..1)
2354
3429
  *
2355
- * @see {@link messageLevelResponseDocumentResponseSchema}
3430
+ * @see {@link PeppolMessageLevelResponseDocumentResponse}
2356
3431
  */
2357
3432
  declare class PeppolDocumentResponseDocument extends PeppolDocumentResponseDocument_base {}
3433
+ /**
3434
+ * @description Alias of {@link PeppolDocumentResponseDocument} under the message level response naming.
3435
+ */
2358
3436
  type PeppolMessageLevelResponseDocumentResponseDocument = PeppolDocumentResponseDocument;
2359
3437
  //#endregion
2360
3438
  //#region src/schemas/peppol-document-response-line-response-content-schema.d.ts
@@ -2368,6 +3446,16 @@ declare const PeppolStatus_base: OpaqueSchema<PeppolStatus, Schema.Struct<{
2368
3446
  */
2369
3447
  readonly statusReasonCode: Schema.Literals<readonly ["BV", "BW", "SV"]>;
2370
3448
  }>>;
3449
+ /**
3450
+ * @description Wraps `cac:Status` inside a line response: the coded reason for an issue found in the document.
3451
+ *
3452
+ * @example
3453
+ * ```ts
3454
+ * { statusReasonCode: 'SV' }
3455
+ * ```;
3456
+ *
3457
+ * @see {@link PeppolDocumentResponseLineResponseContent}
3458
+ */
2371
3459
  declare class PeppolStatus extends PeppolStatus_base {}
2372
3460
  declare const PeppolDocumentResponseLineResponseContent_base: OpaqueSchema<PeppolDocumentResponseLineResponseContent, Schema.Struct<{
2373
3461
  /**
@@ -2381,7 +3469,7 @@ declare const PeppolDocumentResponseLineResponseContent_base: OpaqueSchema<Peppo
2381
3469
  *
2382
3470
  * @name `cbc:ResponseCode`
2383
3471
  */
2384
- readonly responseCode: Schema.Literals<readonly ["AB", "AP", "RE"]>;
3472
+ readonly responseCode: typeof PeppolApplicationResponseTypeCode;
2385
3473
  /**
2386
3474
  * @description The description of the issued identifier in the transaction document.
2387
3475
  *
@@ -2398,6 +3486,16 @@ declare const PeppolDocumentResponseLineResponseContent_base: OpaqueSchema<Peppo
2398
3486
  */
2399
3487
  readonly status: typeof PeppolStatus;
2400
3488
  }>>;
3489
+ /**
3490
+ * @description A response to a particular line in the business document: the line response code, a description of the issue and its coded status.
3491
+ *
3492
+ * @example
3493
+ * ```ts
3494
+ * { responseCode: 'RE', description: 'Validation gives error [CL-T77-R0002]', status: { statusReasonCode: 'SV' } }
3495
+ * ```;
3496
+ *
3497
+ * @see {@link PeppolDocumentResponseLineResponse}
3498
+ */
2401
3499
  declare class PeppolDocumentResponseLineResponseContent extends PeppolDocumentResponseLineResponseContent_base {}
2402
3500
  //#endregion
2403
3501
  //#region src/schemas/peppol-document-response-line-response-schema.d.ts
@@ -2415,6 +3513,16 @@ declare const PeppolLineReference_base: OpaqueSchema<PeppolLineReference, Schema
2415
3513
  */
2416
3514
  readonly lineId: Schema.String;
2417
3515
  }>>;
3516
+ /**
3517
+ * @description Wraps `cac:LineReference` inside a line response: an XPath pointing at the element that caused the reported issue.
3518
+ *
3519
+ * @example
3520
+ * ```ts
3521
+ * { lineId: '/Invoice/cac:InvoiceLine[1]' }
3522
+ * ```;
3523
+ *
3524
+ * @see {@link PeppolDocumentResponseLineResponse}
3525
+ */
2418
3526
  declare class PeppolLineReference extends PeppolLineReference_base {}
2419
3527
  declare const PeppolDocumentResponseLineResponse_base: OpaqueSchema<PeppolDocumentResponseLineResponse, Schema.Struct<{
2420
3528
  /**
@@ -2430,7 +3538,23 @@ declare const PeppolDocumentResponseLineResponse_base: OpaqueSchema<PeppolDocume
2430
3538
  */
2431
3539
  readonly response: typeof PeppolDocumentResponseLineResponseContent;
2432
3540
  }>>;
3541
+ /**
3542
+ * @description Wraps `cac:LineResponse` inside a message level response: pairs a line reference with the response for that line.
3543
+ *
3544
+ * @example
3545
+ * ```ts
3546
+ * {
3547
+ * lineReference: { lineId: '/Invoice/cac:InvoiceLine[1]' },
3548
+ * response: { responseCode: 'RE', description: 'Invalid tax category', status: { statusReasonCode: 'SV' } }
3549
+ * }
3550
+ * ```;
3551
+ *
3552
+ * @see {@link PeppolMessageLevelResponseDocumentResponse}
3553
+ */
2433
3554
  declare class PeppolDocumentResponseLineResponse extends PeppolDocumentResponseLineResponse_base {}
3555
+ /**
3556
+ * @description Alias of {@link PeppolDocumentResponseLineResponse} under the message level response naming.
3557
+ */
2434
3558
  type PeppolMessageLevelDocumentResponseLineResponse = PeppolDocumentResponseLineResponse;
2435
3559
  //#endregion
2436
3560
  //#region src/schemas/peppol-message-level-response-document-response-schema.d.ts
@@ -2460,6 +3584,16 @@ declare const PeppolMessageLevelResponseDocumentResponse_base: OpaqueSchema<Pepp
2460
3584
  */
2461
3585
  readonly lineResponse: Schema.$Array<typeof PeppolDocumentResponseLineResponse>;
2462
3586
  }>>;
3587
+ /**
3588
+ * @description Wraps `cac:DocumentResponse` inside a message level response: the response, the document reference and any per-line responses.
3589
+ *
3590
+ * @example
3591
+ * ```ts
3592
+ * { response: { responseCode: 'RE' }, documentReference: { id: 'EnvelopeID-12345' }, lineResponse: [] }
3593
+ * ```;
3594
+ *
3595
+ * @see {@link PeppolMessageLevelResponse}
3596
+ */
2463
3597
  declare class PeppolMessageLevelResponseDocumentResponse extends PeppolMessageLevelResponseDocumentResponse_base {}
2464
3598
  //#endregion
2465
3599
  //#region src/schemas/utils/peppol-xsd-time-schema.d.ts
@@ -2467,6 +3601,11 @@ declare const PeppolXsdTime_base: OpaqueSchema<PeppolXsdTime, Schema.decodeTo<Sc
2467
3601
  /**
2468
3602
  * @description XSD `time` lexical value (`HH:MM:SS` with optional fractional seconds and timezone). Effect port of `xsdTime` (`z.string().check(z.regex(...))`):
2469
3603
  * keeps the value as a plain string and only validates the shape.
3604
+ *
3605
+ * @example
3606
+ * ```ts
3607
+ * const value = '12:30:45+01:00';
3608
+ * ```;
2470
3609
  */
2471
3610
  declare class PeppolXsdTime extends PeppolXsdTime_base {}
2472
3611
  //#endregion
@@ -2558,11 +3697,29 @@ declare const PeppolMessageLevelResponse_base: OpaqueSchema<PeppolMessageLevelRe
2558
3697
  */
2559
3698
  readonly documentResponse: typeof PeppolMessageLevelResponseDocumentResponse;
2560
3699
  }>>;
3700
+ /**
3701
+ * @description UBL `ApplicationResponse` message level response for PEPPOL BIS Billing 3.0 (profile `urn:fdc:peppol.eu:poacc:bis:mlr:3`).
3702
+ *
3703
+ * @example
3704
+ * ```ts
3705
+ * {
3706
+ * customizationId: 'urn:fdc:peppol.eu:poacc:trns:mlr:3',
3707
+ * profileId: 'urn:fdc:peppol.eu:poacc:bis:mlr:3',
3708
+ * id: '23',
3709
+ * issueDate: '2017-11-01',
3710
+ * senderParty: {},
3711
+ * receiverParty: {},
3712
+ * documentResponse: { response: { responseCode: 'RE' }, documentReference: { id: 'EnvelopeID-12345' }, lineResponse: [] }
3713
+ * }
3714
+ * ```;
3715
+ *
3716
+ * @see {@link PeppolInvoiceResponse}
3717
+ */
2561
3718
  declare class PeppolMessageLevelResponse extends PeppolMessageLevelResponse_base {}
2562
3719
  //#endregion
2563
3720
  //#region src/schemas/peppol-invoice-response-status-reason-code-schema.d.ts
2564
3721
  declare const PeppolInvoiceResponseStatusReasonCodeReason_base: OpaqueSchema<PeppolInvoiceResponseStatusReasonCodeReason, Schema.Struct<{
2565
- readonly value: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolOpStatusReason">;
3722
+ readonly value: typeof PeppolOpStatusReason;
2566
3723
  /**
2567
3724
  * @description List identifier for clarification.
2568
3725
  *
@@ -2572,9 +3729,19 @@ declare const PeppolInvoiceResponseStatusReasonCodeReason_base: OpaqueSchema<Pep
2572
3729
  */
2573
3730
  readonly listId: Schema.Literal<"OPStatusReason">;
2574
3731
  }>>;
3732
+ /**
3733
+ * @description Status clarification reason (`cbc:StatusReasonCode` with `@listId="OPStatusReason"`), a value from the OPStatusReason code list.
3734
+ *
3735
+ * @example
3736
+ * ```ts
3737
+ * { value: 'REF', listId: 'OPStatusReason' }
3738
+ * ```;
3739
+ *
3740
+ * @see {@link PeppolInvoiceResponseStatusReasonCode}
3741
+ */
2575
3742
  declare class PeppolInvoiceResponseStatusReasonCodeReason extends PeppolInvoiceResponseStatusReasonCodeReason_base {}
2576
3743
  declare const PeppolInvoiceResponseStatusReasonCodeAction_base: OpaqueSchema<PeppolInvoiceResponseStatusReasonCodeAction, Schema.Struct<{
2577
- readonly value: Schema.brand<Schema.Literals<readonly ["NOA", "PIN", "NIN", "CNF", "CNP", "CNA", "OTH"]>, "PeppolOpStatusAction">;
3744
+ readonly value: typeof PeppolOpStatusAction;
2578
3745
  /**
2579
3746
  * @description List identifier for clarification.
2580
3747
  *
@@ -2584,9 +3751,29 @@ declare const PeppolInvoiceResponseStatusReasonCodeAction_base: OpaqueSchema<Pep
2584
3751
  */
2585
3752
  readonly listId: Schema.Literal<"OPStatusAction">;
2586
3753
  }>>;
3754
+ /**
3755
+ * @description Status clarification action (`cbc:StatusReasonCode` with `@listId="OPStatusAction"`), a value from the OPStatusAction code list.
3756
+ *
3757
+ * @example
3758
+ * ```ts
3759
+ * { value: 'PIN', listId: 'OPStatusAction' }
3760
+ * ```;
3761
+ *
3762
+ * @see {@link PeppolInvoiceResponseStatusReasonCode}
3763
+ */
2587
3764
  declare class PeppolInvoiceResponseStatusReasonCodeAction extends PeppolInvoiceResponseStatusReasonCodeAction_base {}
2588
- declare const peppolInvoiceResponseStatusReasonCodeSchema: Schema.Union<readonly [typeof PeppolInvoiceResponseStatusReasonCodeAction, typeof PeppolInvoiceResponseStatusReasonCodeReason]>;
2589
- type PeppolInvoiceResponseStatusReasonCode = typeof peppolInvoiceResponseStatusReasonCodeSchema.Type;
3765
+ declare const PeppolInvoiceResponseStatusReasonCode_base: OpaqueSchema<PeppolInvoiceResponseStatusReasonCode, Schema.Union<readonly [typeof PeppolInvoiceResponseStatusReasonCodeAction, typeof PeppolInvoiceResponseStatusReasonCodeReason]>>;
3766
+ /**
3767
+ * @description Union of the accepted status clarification reasons and actions on an invoice response.
3768
+ *
3769
+ * @example
3770
+ * ```ts
3771
+ * { value: 'REF', listId: 'OPStatusReason' }
3772
+ * ```;
3773
+ *
3774
+ * @see {@link PeppolInvoiceResponseDocumentActualResponseStatus}
3775
+ */
3776
+ declare class PeppolInvoiceResponseStatusReasonCode extends PeppolInvoiceResponseStatusReasonCode_base {}
2590
3777
  //#endregion
2591
3778
  //#region src/schemas/peppol-invoice-response-document-actual-response-status-schema.d.ts
2592
3779
  declare const PeppolInvoiceResponseCondition_base: OpaqueSchema<PeppolInvoiceResponseCondition, Schema.Struct<{
@@ -2613,6 +3800,16 @@ declare const PeppolInvoiceResponseCondition_base: OpaqueSchema<PeppolInvoiceRes
2613
3800
  */
2614
3801
  readonly description: Schema.optional<Schema.String>;
2615
3802
  }>>;
3803
+ /**
3804
+ * @description Wraps `cac:Condition` inside a status: a detail code and its optional value that further explains the clarification.
3805
+ *
3806
+ * @example
3807
+ * ```ts
3808
+ * { attributeId: 'BT-75', description: 'EU123456789' }
3809
+ * ```;
3810
+ *
3811
+ * @see {@link PeppolInvoiceResponseDocumentActualResponseStatus}
3812
+ */
2616
3813
  declare class PeppolInvoiceResponseCondition extends PeppolInvoiceResponseCondition_base {}
2617
3814
  declare const PeppolInvoiceResponseDocumentActualResponseStatus_base: OpaqueSchema<PeppolInvoiceResponseDocumentActualResponseStatus, Schema.Struct<{
2618
3815
  /**
@@ -2622,7 +3819,7 @@ declare const PeppolInvoiceResponseDocumentActualResponseStatus_base: OpaqueSche
2622
3819
  *
2623
3820
  * @name `cbc:StatusReasonCode`
2624
3821
  */
2625
- readonly statusReasonCode: Schema.optional<Schema.Union<readonly [typeof PeppolInvoiceResponseStatusReasonCodeAction, typeof PeppolInvoiceResponseStatusReasonCodeReason]>>;
3822
+ readonly statusReasonCode: Schema.optional<typeof PeppolInvoiceResponseStatusReasonCode>;
2626
3823
  /**
2627
3824
  * @description The description of the clarification given for the invoice status.
2628
3825
  *
@@ -2641,11 +3838,44 @@ declare const PeppolInvoiceResponseDocumentActualResponseStatus_base: OpaqueSche
2641
3838
  */
2642
3839
  readonly condition: Schema.optional<Schema.$Array<typeof PeppolInvoiceResponseCondition>>;
2643
3840
  }>>;
3841
+ /**
3842
+ * @description Wraps `cac:Status` inside an invoice response: an optional clarification code and description plus any condition details.
3843
+ *
3844
+ * @example
3845
+ * ```ts
3846
+ * { statusReasonCode: { value: 'REF', listId: 'OPStatusReason' }, statusReason: 'TAX reference not found' }
3847
+ * ```;
3848
+ *
3849
+ * @see {@link PeppolInvoiceResponseDocumentActualResponse}
3850
+ */
2644
3851
  declare class PeppolInvoiceResponseDocumentActualResponseStatus extends PeppolInvoiceResponseDocumentActualResponseStatus_base {}
3852
+ /**
3853
+ * @description Alias of {@link PeppolInvoiceResponseDocumentActualResponseStatus}.
3854
+ */
2645
3855
  type InvoiceResponseDocumentActualResponseStatus = PeppolInvoiceResponseDocumentActualResponseStatus;
2646
3856
  //#endregion
2647
3857
  //#region src/schemas/peppol-invoice-response-document-actual-response-schema.d.ts
3858
+ /**
3859
+ * @description Response codes that require a clarification in `cac:Status`: `UQ`, `RE` and `CA`.
3860
+ *
3861
+ * @example
3862
+ * ```ts
3863
+ * withStatusCodes; // Schema.Literals(['UQ', 'RE', 'CA'])
3864
+ * ```;
3865
+ *
3866
+ * @see {@link PeppolInvoiceResponseDocumentActualResponseWithStatus}
3867
+ */
2648
3868
  declare const withStatusCodes: Schema.Literals<readonly ["UQ", "RE", "CA"]>;
3869
+ /**
3870
+ * @description Response codes that do not require a clarification in `cac:Status`: `AB`, `AP`, `IP` and `PD`.
3871
+ *
3872
+ * @example
3873
+ * ```ts
3874
+ * withoutStatusCodes; // Schema.Literals(['AB', 'AP', 'IP', 'PD'])
3875
+ * ```;
3876
+ *
3877
+ * @see {@link PeppolInvoiceResponseDocumentActualResponseWithoutStatus}
3878
+ */
2649
3879
  declare const withoutStatusCodes: Schema.Literals<readonly ["AB", "AP", "IP", "PD"]>;
2650
3880
  declare const PeppolInvoiceResponseDocumentActualResponseWithoutStatus_base: OpaqueSchema<PeppolInvoiceResponseDocumentActualResponseWithoutStatus, Schema.Struct<{
2651
3881
  /**
@@ -2675,6 +3905,16 @@ declare const PeppolInvoiceResponseDocumentActualResponseWithoutStatus_base: Opa
2675
3905
  */
2676
3906
  readonly status: Schema.optional<Schema.$Array<typeof PeppolInvoiceResponseDocumentActualResponseStatus>>;
2677
3907
  }>>;
3908
+ /**
3909
+ * @description Invoice response for statuses that do not require a clarification; the `cac:Status` group is optional.
3910
+ *
3911
+ * @example
3912
+ * ```ts
3913
+ * { responseCode: 'AP', effectiveDate: '2018-08-02' }
3914
+ * ```;
3915
+ *
3916
+ * @see {@link PeppolInvoiceResponseDocumentActualResponse}
3917
+ */
2678
3918
  declare class PeppolInvoiceResponseDocumentActualResponseWithoutStatus extends PeppolInvoiceResponseDocumentActualResponseWithoutStatus_base {}
2679
3919
  declare const PeppolInvoiceResponseDocumentActualResponseWithStatus_base: OpaqueSchema<PeppolInvoiceResponseDocumentActualResponseWithStatus, Schema.Struct<{
2680
3920
  /**
@@ -2707,115 +3947,157 @@ declare const PeppolInvoiceResponseDocumentActualResponseWithStatus_base: Opaque
2707
3947
  */
2708
3948
  readonly status: Schema.$Array<typeof PeppolInvoiceResponseDocumentActualResponseStatus>;
2709
3949
  }>>;
3950
+ /**
3951
+ * @description Invoice response for statuses that require a clarification; at least one `cac:Status` group is mandatory.
3952
+ *
3953
+ * @example
3954
+ * ```ts
3955
+ * { responseCode: 'RE', status: [{ statusReason: 'TAX reference not found' }] }
3956
+ * ```;
3957
+ *
3958
+ * @see {@link PeppolInvoiceResponseDocumentActualResponse}
3959
+ */
2710
3960
  declare class PeppolInvoiceResponseDocumentActualResponseWithStatus extends PeppolInvoiceResponseDocumentActualResponseWithStatus_base {}
2711
- declare const peppolInvoiceResponseDocumentActualResponseSchema: Schema.Union<readonly [typeof PeppolInvoiceResponseDocumentActualResponseWithStatus, typeof PeppolInvoiceResponseDocumentActualResponseWithoutStatus]>;
2712
- type InvoiceResponseDocumentActualResponse = typeof peppolInvoiceResponseDocumentActualResponseSchema.Type;
2713
- //#endregion
2714
- //#region src/schemas/utils/peppol-base-64-schema.d.ts
3961
+ declare const PeppolInvoiceResponseDocumentActualResponse_base: OpaqueSchema<PeppolInvoiceResponseDocumentActualResponse, Schema.Union<readonly [typeof PeppolInvoiceResponseDocumentActualResponseWithStatus, typeof PeppolInvoiceResponseDocumentActualResponseWithoutStatus]>>;
2715
3962
  /**
2716
- * @description RFC 4648 base64 string (PEM / MIME / XML line endings tolerated). Effect port of `base64Schema` (`z.string().check(z.refine(...))`): strips CRLF /
2717
- * LF line endings before testing the quantum regex.
3963
+ * @description Union of the invoice response variants selected by `cbc:ResponseCode`: one that requires a clarification and one that does not.
3964
+ *
3965
+ * @example
3966
+ * ```ts
3967
+ * { responseCode: 'AP', effectiveDate: '2018-08-02' }
3968
+ * ```;
3969
+ *
3970
+ * @see {@link PeppolInvoiceResponseDocumentResponse}
3971
+ */
3972
+ declare class PeppolInvoiceResponseDocumentActualResponse extends PeppolInvoiceResponseDocumentActualResponse_base {}
3973
+ /**
3974
+ * @description Alias of {@link PeppolInvoiceResponseDocumentActualResponse}.
2718
3975
  */
2719
- declare const peppolBase64Schema: Schema.String;
2720
- type Base64 = typeof peppolBase64Schema.Type;
3976
+ type InvoiceResponseDocumentActualResponse = PeppolInvoiceResponseDocumentActualResponse;
2721
3977
  //#endregion
2722
3978
  //#region src/schemas/utils/format-quantity-with-unit.d.ts
2723
- declare function formatQuantityWithUnit(value: number, code: string, locale?: string, unitDisplay?: 'short' | 'narrow' | 'long'): string;
2724
- //#endregion
2725
- //#region src/schemas/values/credit-note-type-code-schema.d.ts
2726
3979
  /**
2727
- * @description A credit note type code as defined by the PEPPOL subset of UNCL 1001 (credit note).
3980
+ * @description Formats a quantity and its unit code for a locale. Uses `Intl.NumberFormat` for mapped codes, otherwise the code list name.
2728
3981
  *
2729
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001-cn/
2730
- */
2731
- type PeppolCreditNoteTypeCode = CreditNoteTypeCodesKeys;
2732
- /**
2733
- * @description Validates a credit note type code against the PEPPOL subset of UNCL 1001 (credit note).
3982
+ * @example
3983
+ * ```ts
3984
+ * formatQuantityWithUnit(5, 'KGM', 'en-US', 'long'); // '5 kilograms'
3985
+ * formatQuantityWithUnit(10, 'EA'); // '10 each'
3986
+ * ```;
2734
3987
  *
2735
- * @param error - The custom error message to use when validation fails.
3988
+ * @param value - The numeric quantity to format.
3989
+ * @param code - The UN/ECE Rec 20 unit code to render, for example `KGM` or `MTR`.
3990
+ * @param locale - BCP 47 locale tag passed to `Intl.NumberFormat`. Defaults to `'en-US'`.
3991
+ * @param unitDisplay - `Intl` unit display style: `'short'`, `'narrow'`, or `'long'`. Defaults to `'short'`.
2736
3992
  *
2737
- * @returns An Effect schema that accepts only valid credit note type codes.
3993
+ * @returns The formatted quantity and unit, for example `'5 kilograms'`. Falls back to `<number> <name>` when the code has no `Intl` unit or `Intl`
3994
+ * rejects the unit.
2738
3995
  *
2739
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001-cn/
3996
+ * @see {@link quantityUnitCodeToIntlUnit}
2740
3997
  */
2741
- declare const creditNoteTypeCodeSchema: Schema.Literals<readonly ["81", "83", "381", "396", "532"]>;
3998
+ declare function formatQuantityWithUnit(value: number, code: string, locale?: string, unitDisplay?: 'short' | 'narrow' | 'long'): string;
2742
3999
  //#endregion
2743
4000
  //#region src/schemas/utils/get-credit-note-type-code-description.d.ts
2744
- declare function getCreditNoteTypeCodeDescription(code: PeppolCreditNoteTypeCode): string;
2745
- //#endregion
2746
- //#region src/schemas/values/invoice-type-code-schema.d.ts
2747
4001
  /**
2748
- * @description An invoice type code as defined by the PEPPOL subset of UNCL 1001 (invoice).
4002
+ * @description Returns the human-readable description of a PEPPOL credit note type code (UNCL1001 subset).
2749
4003
  *
2750
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001-inv/
4004
+ * @example
4005
+ * ```ts
4006
+ * getCreditNoteTypeCodeDescription('381'); // 'Credit note'
4007
+ * ```;
4008
+ *
4009
+ * @param code - A valid {@link PeppolCreditNoteTypeCode}, for example `'381'`.
4010
+ *
4011
+ * @returns The description registered for the code, for example `'Credit note'`.
2751
4012
  */
2752
- type PeppolInvoiceTypeCode = typeof invoiceTypeCodeSchema.Type;
4013
+ declare function getCreditNoteTypeCodeDescription(code: PeppolCreditNoteTypeCode): string;
4014
+ //#endregion
4015
+ //#region src/schemas/utils/get-invoice-type-code-description.d.ts
2753
4016
  /**
2754
- * @description Validates an invoice type code against the PEPPOL subset of UNCL 1001 (invoice).
4017
+ * @description Returns the human-readable description of a PEPPOL invoice type code (UNCL1001 subset).
2755
4018
  *
2756
- * @param error - The custom error message to use when validation fails.
4019
+ * @example
4020
+ * ```ts
4021
+ * getInvoiceTypeCodeDescription('380'); // 'Commercial invoice'
4022
+ * ```;
2757
4023
  *
2758
- * @returns An Effect schema that accepts only valid invoice type codes.
4024
+ * @param code - A valid {@link PeppolInvoiceTypeCode}, for example `'380'`.
2759
4025
  *
2760
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001-inv/
4026
+ * @returns The description registered for the code, for example `'Commercial invoice'`.
2761
4027
  */
2762
- declare const invoiceTypeCodeSchema: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolInvoiceTypeCode">;
2763
- //#endregion
2764
- //#region src/schemas/utils/get-invoice-type-code-description.d.ts
2765
4028
  declare function getInvoiceTypeCodeDescription(code: PeppolInvoiceTypeCode): string;
2766
4029
  //#endregion
2767
4030
  //#region src/schemas/utils/is-valid-credit-note-type-code.d.ts
2768
- declare function isValidCreditNoteTypeCode(code: string): code is PeppolCreditNoteTypeCode;
2769
- //#endregion
2770
- //#region src/schemas/utils/is-valid-invoice-type-code.d.ts
2771
- declare function isValidInvoiceTypeCode(code: string): code is PeppolInvoiceTypeCode;
2772
- //#endregion
2773
- //#region src/schemas/values/peppol-process-schema.d.ts
2774
4031
  /**
2775
- * @description A PEPPOL business process identifier key as defined by the processes codelist.
4032
+ * @description Type guard for PEPPOL credit note type codes (UNCL1001 subset).
2776
4033
  *
2777
- * @see {@link processes}
4034
+ * @example
4035
+ * ```ts
4036
+ * isValidCreditNoteTypeCode('381'); // true
4037
+ * isValidCreditNoteTypeCode('UNKNOWN'); // false
4038
+ * ```;
4039
+ *
4040
+ * @param code - The string to test.
4041
+ *
4042
+ * @returns `true` when `code` is a known credit note type code, narrowing it to {@link PeppolCreditNoteTypeCode}; otherwise `false`.
2778
4043
  */
2779
- type PeppolProcesses = typeof peppolProcessSchema.Encoded;
4044
+ declare function isValidCreditNoteTypeCode(code: string): code is PeppolCreditNoteTypeCode;
4045
+ //#endregion
4046
+ //#region src/schemas/utils/is-valid-invoice-type-code.d.ts
2780
4047
  /**
2781
- * @description Validates a full PEPPOL business process identifier (`<scheme>::<value>`) against the known processes.
4048
+ * @description Type guard for PEPPOL invoice type codes (UNCL1001 subset).
2782
4049
  *
2783
- * @param error - The custom error message to use when validation fails. Defaults to `'invalid peppol process identifier'`.
4050
+ * @example
4051
+ * ```ts
4052
+ * isValidInvoiceTypeCode('380'); // true
4053
+ * isValidInvoiceTypeCode('UNKNOWN'); // false
4054
+ * ```;
2784
4055
  *
2785
- * @returns An Effect schema that matches a valid `scheme::value` process identifier.
4056
+ * @param code - The string to test.
2786
4057
  *
2787
- * @see {@link processes}
4058
+ * @returns `true` when `code` is a known invoice type code, narrowing it to {@link PeppolInvoiceTypeCode}; otherwise `false`.
2788
4059
  */
2789
- declare const peppolProcessSchema: Schema.TemplateLiteral<readonly [Schema.Literals<readonly ["cenbii-procid-ubl", "oioubl-procid-ubl"]>, Schema.Literal<"::">, Schema.String]>;
4060
+ declare function isValidInvoiceTypeCode(code: string): code is PeppolInvoiceTypeCode;
2790
4061
  //#endregion
2791
4062
  //#region src/schemas/utils/is-valid-process.d.ts
2792
- declare function isValidProcess(code: string): code is PeppolProcesses;
2793
- //#endregion
2794
- //#region src/schemas/values/quantity-unit-codes-schema.d.ts
2795
- /**
2796
- * @description A unit of measure code as defined by the PEPPOL subset of UN/ECE Recommendation 20.
2797
- *
2798
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNECERec20/
2799
- */
2800
- type PeppolQuantityUnitCode = typeof quantityUnitCodesSchema.Type;
2801
4063
  /**
2802
- * @description Validates a unit of measure code against the PEPPOL subset of UN/ECE Recommendation 20.
2803
- *
2804
- * @param error - The custom error message to use when validation fails.
4064
+ * @description Type guard for PEPPOL business process identifiers of the form `<scheme>::<value>`.
2805
4065
  *
2806
- * @returns An Effect schema that accepts only valid quantity unit codes.
4066
+ * @example
4067
+ * ```ts
4068
+ * isValidProcess('cenbii-procid-ubl::urn:fdc:peppol.eu:2017:poacc:billing:01:1.0'); // true
4069
+ * isValidProcess('cenbii-procid-ubl::urn:not:a:process'); // false
4070
+ * ```;
2807
4071
  *
2808
- * @validations
2809
- * - BR-CL-23: Unit of measure code MUST be a valid UN/ECE Rec 20 code.
4072
+ * @param code - The process identifier to test.
2810
4073
  *
2811
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNECERec20/
4074
+ * @returns `true` when `code` appears in {@link processesList}, narrowing it to {@link PeppolProcesses}; otherwise `false`.
2812
4075
  */
2813
- declare const quantityUnitCodesSchema: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolQuantityUnitCode">;
4076
+ declare function isValidProcess(code: string): code is PeppolProcesses;
2814
4077
  //#endregion
2815
4078
  //#region src/schemas/utils/quantity-unit-code-to-intl-unit.d.ts
4079
+ /**
4080
+ * @description String union of `Intl.NumberFormat` unit identifiers for base units such as length, area, volume, mass, and temperature.
4081
+ */
2816
4082
  type BaseIntlUnit = 'acre' | 'bit' | 'byte' | 'celsius' | 'centimeter' | 'degree' | 'fahrenheit' | 'fluid-ounce' | 'foot' | 'gallon' | 'gigabit' | 'gigabyte' | 'gram' | 'hectare' | 'inch' | 'kilobit' | 'kilobyte' | 'kilogram' | 'kilometer' | 'liter' | 'megabit' | 'megabyte' | 'meter' | 'mile' | 'mile-scandinavian' | 'milliliter' | 'millimeter' | 'ounce' | 'percent' | 'petabyte' | 'pound' | 'stone' | 'terabit' | 'terabyte' | 'yard';
4083
+ /**
4084
+ * @description String union of `Intl.NumberFormat` unit identifiers for time units, used on their own and as the denominator of a rate.
4085
+ */
2817
4086
  type TimeIntlUnit = 'nanosecond' | 'microsecond' | 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';
4087
+ /**
4088
+ * @description Any `Intl.NumberFormat` unit identifier supported by this module: a {@link BaseIntlUnit}, a {@link TimeIntlUnit}, or a rate such as
4089
+ * `'kilometer-per-hour'`.
4090
+ */
2818
4091
  type IntlUnit = BaseIntlUnit | TimeIntlUnit | `${BaseIntlUnit}-per-${TimeIntlUnit}`;
4092
+ /**
4093
+ * @description Maps UN/ECE Rec 20 quantity unit codes to `Intl.NumberFormat` unit identifiers. Unmapped codes are omitted.
4094
+ *
4095
+ * @example
4096
+ * ```ts
4097
+ * quantityToIntlUnitMap.KGM; // 'kilogram'
4098
+ * quantityToIntlUnitMap.KMH; // 'kilometer-per-hour'
4099
+ * ```;
4100
+ */
2819
4101
  declare const quantityToIntlUnitMap: {
2820
4102
  CMT: "centimeter";
2821
4103
  MTR: "meter";
@@ -2881,14 +4163,35 @@ declare const quantityToIntlUnitMap: {
2881
4163
  '4U': "pound-per-hour";
2882
4164
  '4M': IntlUnit;
2883
4165
  };
4166
+ /**
4167
+ * @description Looks up the `Intl.NumberFormat` unit identifier for a UN/ECE Rec 20 quantity unit code.
4168
+ *
4169
+ * @example
4170
+ * ```ts
4171
+ * quantityUnitCodeToIntlUnit('KGM'); // 'kilogram'
4172
+ * quantityUnitCodeToIntlUnit('EA'); // undefined
4173
+ * ```;
4174
+ *
4175
+ * @param code - A quantity unit code, typed as {@link PeppolQuantityUnitCode} but accepting any string.
4176
+ *
4177
+ * @returns The matching {@link IntlUnit}, or `undefined` when the code has no `Intl` unit mapping.
4178
+ *
4179
+ * @see {@link quantityToIntlUnitMap}
4180
+ */
2884
4181
  declare function quantityUnitCodeToIntlUnit(code: PeppolQuantityUnitCode | (string & {})): IntlUnit | undefined;
2885
4182
  //#endregion
2886
4183
  //#region src/schemas/utils/peppol-vat-regex-schema.d.ts
4184
+ declare const PeppolVatRegex_base: OpaqueSchema<PeppolVatRegex, Schema.Union<readonly [Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String]>>;
2887
4185
  /**
2888
4186
  * @description EU VAT identification number (one member per member-state prefix/pattern). Effect port of `vatRegexSchema` (`z.union([...])` of
2889
4187
  * `z.string().check(...)` members): each member keeps its original prefix + pattern checks as `Schema.String.check` filters.
4188
+ *
4189
+ * @example
4190
+ * ```ts
4191
+ * const value = 'DE123456789';
4192
+ * ```;
2890
4193
  */
2891
- declare const peppolVatRegexSchema: Schema.Union<readonly [Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String, Schema.String]>;
4194
+ declare class PeppolVatRegex extends PeppolVatRegex_base {}
2892
4195
  //#endregion
2893
4196
  //#region src/schemas/peppol-invoice-response-schema.d.ts
2894
4197
  declare const PeppolInvoiceResponseDocumentResponsePartyName_base: OpaqueSchema<PeppolInvoiceResponseDocumentResponsePartyName, Schema.Struct<{
@@ -2902,6 +4205,16 @@ declare const PeppolInvoiceResponseDocumentResponsePartyName_base: OpaqueSchema<
2902
4205
  */
2903
4206
  readonly name: Schema.String;
2904
4207
  }>>;
4208
+ /**
4209
+ * @description Wraps `cac:PartyName` for the seller or buyer on an invoice response: the party's legal or trading name.
4210
+ *
4211
+ * @example
4212
+ * ```ts
4213
+ * { name: 'Seller Business Name AS' }
4214
+ * ```;
4215
+ *
4216
+ * @see {@link PeppolInvoiceResponseDocumentResponseParty}
4217
+ */
2905
4218
  declare class PeppolInvoiceResponseDocumentResponsePartyName extends PeppolInvoiceResponseDocumentResponsePartyName_base {}
2906
4219
  declare const PeppolInvoiceResponseParty_base: OpaqueSchema<PeppolInvoiceResponseParty, Schema.Struct<{
2907
4220
  readonly endpointId: Schema.optional<typeof PeppolIdentifier>;
@@ -2910,6 +4223,16 @@ declare const PeppolInvoiceResponseParty_base: OpaqueSchema<PeppolInvoiceRespons
2910
4223
  readonly registrationName: Schema.String;
2911
4224
  }>;
2912
4225
  }>>;
4226
+ /**
4227
+ * @description Party used for the sender and receiver of an invoice response. Extends {@link PeppolMessageLevelResponseParty}.
4228
+ *
4229
+ * @example
4230
+ * ```ts
4231
+ * { partyLegalEntity: { registrationName: 'Seller Business Name AS' } }
4232
+ * ```;
4233
+ *
4234
+ * @see {@link PeppolInvoiceResponse}
4235
+ */
2913
4236
  declare class PeppolInvoiceResponseParty extends PeppolInvoiceResponseParty_base {}
2914
4237
  declare const PeppolInvoiceResponseSenderParty_base: OpaqueSchema<PeppolInvoiceResponseSenderParty, Schema.Struct<{
2915
4238
  readonly endpointId: Schema.optional<typeof PeppolIdentifier>;
@@ -2919,6 +4242,16 @@ declare const PeppolInvoiceResponseSenderParty_base: OpaqueSchema<PeppolInvoiceR
2919
4242
  }>;
2920
4243
  readonly contact: Schema.optional<typeof PeppolContact>;
2921
4244
  }>>;
4245
+ /**
4246
+ * @description Sender party of an invoice response. Extends {@link PeppolInvoiceResponseParty} with optional `cac:Contact` details.
4247
+ *
4248
+ * @example
4249
+ * ```ts
4250
+ * { partyLegalEntity: { registrationName: 'Seller Business Name AS' } }
4251
+ * ```;
4252
+ *
4253
+ * @see {@link PeppolInvoiceResponse}
4254
+ */
2922
4255
  declare class PeppolInvoiceResponseSenderParty extends PeppolInvoiceResponseSenderParty_base {}
2923
4256
  declare const PeppolInvoiceResponseDocumentResponseParty_base: OpaqueSchema<PeppolInvoiceResponseDocumentResponseParty, Schema.Struct<{
2924
4257
  /**
@@ -2937,6 +4270,9 @@ declare const PeppolInvoiceResponseDocumentResponseParty_base: OpaqueSchema<Pepp
2937
4270
  * @description Party schema used under `cac:DocumentReference/(cac:IssuerParty|cac:RecipientParty)`
2938
4271
  */
2939
4272
  declare class PeppolInvoiceResponseDocumentResponseParty extends PeppolInvoiceResponseDocumentResponseParty_base {}
4273
+ /**
4274
+ * @description Alias of {@link PeppolInvoiceResponseDocumentResponseParty}.
4275
+ */
2940
4276
  type PeppolInvoiceDocumentResponseParty = PeppolInvoiceResponseDocumentResponseParty;
2941
4277
  declare const PeppolInvoiceResponseDocumentReference_base: OpaqueSchema<PeppolInvoiceResponseDocumentReference, Schema.Struct<{
2942
4278
  /**
@@ -2968,18 +4304,28 @@ declare const PeppolInvoiceResponseDocumentReference_base: OpaqueSchema<PeppolIn
2968
4304
  *
2969
4305
  * @summary Identifier type code
2970
4306
  */
2971
- readonly documentTypeCode: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolDocumentTypeCode">;
4307
+ readonly documentTypeCode: typeof PeppolDocumentTypeCode;
2972
4308
  }>>;
2973
- declare class PeppolInvoiceResponseDocumentReference extends PeppolInvoiceResponseDocumentReference_base {}
2974
- declare const PeppolInvoiceResponseDocumentResponse_base: OpaqueSchema<PeppolInvoiceResponseDocumentResponse, Schema.Struct<{
2975
- /**
4309
+ /**
4310
+ * @description Wraps `cac:DocumentReference` inside an invoice response: identifies the invoice the status applies to.
4311
+ *
4312
+ * @example
4313
+ * ```ts
4314
+ * { id: 'inv-99876', issueDate: '2018-08-01', documentTypeCode: '380' }
4315
+ * ```;
4316
+ *
4317
+ * @see {@link PeppolInvoiceResponseDocumentResponse}
4318
+ */
4319
+ declare class PeppolInvoiceResponseDocumentReference extends PeppolInvoiceResponseDocumentReference_base {}
4320
+ declare const PeppolInvoiceResponseDocumentResponse_base: OpaqueSchema<PeppolInvoiceResponseDocumentResponse, Schema.Struct<{
4321
+ /**
2976
4322
  * @summary Response information
2977
4323
  *
2978
4324
  * @name `cac:Response`
2979
4325
  *
2980
4326
  * @cardinality (1..1)
2981
4327
  */
2982
- readonly response: Schema.Union<readonly [typeof PeppolInvoiceResponseDocumentActualResponseWithStatus, typeof PeppolInvoiceResponseDocumentActualResponseWithoutStatus]>;
4328
+ readonly response: typeof PeppolInvoiceResponseDocumentActualResponse;
2983
4329
  /**
2984
4330
  * @summary Document reference
2985
4331
  *
@@ -2999,6 +4345,16 @@ declare const PeppolInvoiceResponseDocumentResponse_base: OpaqueSchema<PeppolInv
2999
4345
  */
3000
4346
  readonly recipientParty: Schema.optional<typeof PeppolInvoiceResponseDocumentResponseParty>;
3001
4347
  }>>;
4348
+ /**
4349
+ * @description Wraps `cac:DocumentResponse` inside an invoice response: the response, the referenced invoice and optional parties.
4350
+ *
4351
+ * @example
4352
+ * ```ts
4353
+ * { response: { responseCode: 'AP', effectiveDate: '2018-08-02' }, documentReference: { id: 'inv-99876', documentTypeCode: '380' } }
4354
+ * ```;
4355
+ *
4356
+ * @see {@link PeppolInvoiceResponse}
4357
+ */
3002
4358
  declare class PeppolInvoiceResponseDocumentResponse extends PeppolInvoiceResponseDocumentResponse_base {}
3003
4359
  declare const PeppolInvoiceResponse_base: OpaqueSchema<PeppolInvoiceResponse, Schema.Struct<{
3004
4360
  readonly customizationId: Schema.String;
@@ -3041,455 +4397,140 @@ declare const PeppolInvoiceResponse_base: OpaqueSchema<PeppolInvoiceResponse, Sc
3041
4397
  declare class PeppolInvoiceResponse extends PeppolInvoiceResponse_base {}
3042
4398
  //#endregion
3043
4399
  //#region src/schemas/peppol-document-schema.d.ts
3044
- declare const isPeppolInvoice: <I>(input: I) => input is I & PeppolInvoice;
3045
- declare const isPeppolCreditNote: <I>(input: I) => input is I & PeppolCreditNote;
3046
- declare const isPeppolMessageLevelResponse: <I>(input: I) => input is I & PeppolMessageLevelResponse;
3047
- declare const isPeppolInvoiceResponse: <I>(input: I) => input is I & PeppolInvoiceResponse;
3048
- /**
3049
- * @description Union of every supported PEPPOL business document. Members discriminate cleanly: invoice vs credit note via `invoiceLines`/`creditNoteLines`,
3050
- * message-level vs invoice response via the `profileId` literal.
3051
- */
3052
- declare const peppolDocumentSchema: Schema.decodeTo<Schema.Union<readonly [typeof PeppolInvoice, typeof PeppolCreditNote, typeof PeppolMessageLevelResponse, typeof PeppolInvoiceResponse]>, Schema.String, never, never>;
3053
- type PeppolDocumentEncoded = Schema.Codec.Encoded<typeof peppolDocumentSchema>;
3054
- type PeppolDocumentDecoded = Schema.Schema.Type<typeof peppolDocumentSchema>;
3055
- /**
3056
- * @description This defines the types of documents that are sent/received through the peppol network.
3057
- */
3058
- type PeppolDocument = PeppolInvoice | PeppolCreditNote;
3059
- /**
3060
- * @description This defines the types of message that are sent/received through the peppol network.
3061
- */
3062
- type PeppolMessage = PeppolMessageLevelResponse | PeppolInvoiceResponse;
3063
- type PeppolAllDocuments = PeppolDocument | PeppolMessage;
3064
- type PeppolDocumentLine = PeppolInvoiceLine | PeppolCreditNoteLine;
3065
- //#endregion
3066
- //#region src/schemas/fields/default-customization-id.d.ts
3067
- declare const DEFAULT_CUSTOMIZATION_ID: 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0';
3068
- //#endregion
3069
- //#region src/schemas/fields/default-profile-id.d.ts
3070
- declare const DEFAULT_PROFILE_ID: 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0';
3071
- //#endregion
3072
- //#region src/schemas/fields/peppol-reference-schema.d.ts
3073
- declare const PeppolReferenceId_base: OpaqueSchema<PeppolReferenceId, Schema.Struct<{
3074
- readonly id: Schema.String;
3075
- }>>;
3076
- declare class PeppolReferenceId extends PeppolReferenceId_base {}
3077
- declare const peppolReferenceSchema: Schema.Union<readonly [typeof PeppolReferenceId, Schema.Undefined]>;
3078
- type PeppolReferenceSchema = typeof peppolReferenceSchema.Type;
3079
- //#endregion
3080
- //#region src/schemas/values/additional-document-reference-code-schema.d.ts
3081
- /**
3082
- * @description Additional document reference.
3083
- *
3084
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1153/
3085
- * @see {@link additionalDocumentReferenceCodesKeys}
3086
- */
3087
- type PeppolAdditionalDocumentReferenceCode = typeof additionalDocumentReferenceCodeSchema.Type;
3088
- /**
3089
- * @description Validates an additional document reference code against the PEPPOL subset of UNCL 1153 (reference qualifiers).
3090
- *
3091
- * @param error - The custom error message to use when validation fails. Defaults to the generic message.
3092
- *
3093
- * @returns An Effect schema that accepts only valid additional document reference codes.
3094
- *
3095
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1153/
3096
- * @see {@link additionalDocumentReferenceCodesKeys}
3097
- */
3098
- declare const additionalDocumentReferenceCodeSchema: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolAdditionalDocumentReferenceCode">;
3099
- //#endregion
3100
- //#region src/schemas/values/allowance-charge-reason-code-schema.d.ts
3101
- /**
3102
- * @description An allowance or charge reason code as defined by the PEPPOL subset of UNCL 5189.
3103
- *
3104
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5189/
3105
- */
3106
- type PeppolAllowanceChargeReasonCode = typeof allowanceChargeReasonCodeSchema.Type;
3107
- /**
3108
- * @description Validates an allowance or charge reason code against the PEPPOL subset of UNCL 5189 (D.16B).
3109
- *
3110
- * @param error - The custom error message to use when validation fails.
3111
- *
3112
- * @returns An Effect schema that accepts only valid allowance/charge reason codes.
3113
- *
3114
- * @validations
3115
- * - PEPPOL-EN16931-CL002: Document allowance reason code MUST be according to the subset of UNCL 5189 D.16B.
3116
- *
3117
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5189/
3118
- */
3119
- declare const allowanceChargeReasonCodeSchema: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolAllowanceChargeReasonCode">;
3120
- //#endregion
3121
- //#region src/schemas/values/application-response-type-code-schema.d.ts
3122
- /**
3123
- * @description An application response type code as defined by the PEPPOL subset of UNCL 4343.
3124
- *
3125
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4343/
3126
- */
3127
- type PeppolApplicationResponseTypeCode = ApplicationResponseTypeCodesKeys;
3128
- /**
3129
- * @description Validates an application response type code against the PEPPOL subset of UNCL 4343.
3130
- *
3131
- * @param error - The custom error message to use when validation fails.
3132
- *
3133
- * @returns An Effect schema that accepts only valid application response type codes.
3134
- *
3135
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4343/
3136
- */
3137
- declare const applicationResponseTypeCodeSchema: Schema.Literals<readonly ["AB", "AP", "RE"]>;
3138
- //#endregion
3139
- //#region src/schemas/values/charge-reason-code-schema.d.ts
3140
- /**
3141
- * @description A charge reason code as defined by the PEPPOL subset of UNCL 7161.
3142
- *
3143
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL7161/
3144
- */
3145
- type PeppolChargeReasonCode = typeof chargeReasonCodeSchema.Type;
3146
- /**
3147
- * @description Validates a charge reason code against the PEPPOL subset of UNCL 7161 (D.16B).
3148
- *
3149
- * @param error - The custom error message to use when validation fails.
3150
- *
3151
- * @returns An Effect schema that accepts only valid charge reason codes.
3152
- *
3153
- * @validations
3154
- * - PEPPOL-EN16931-CL003: Charge reason code MUST be according to UNCL 7161 D.16B.
3155
- *
3156
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL7161/
3157
- */
3158
- declare const chargeReasonCodeSchema: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolChargeReasonCode">;
3159
- //#endregion
3160
- //#region src/schemas/values/peppol-country-code-schema.d.ts
3161
- /**
3162
- * @description Validates a two character ISO 3166-1 alpha-2 country code against the PEPPOL codelist. All codes in the codelist are exactly 2 characters, so the
3163
- * literals union implies the length check.
3164
- *
3165
- * @validations
3166
- * - BR-CL-14 / BR-CL-15: Country code MUST be a valid ISO 3166-1 alpha-2 code.
3167
- *
3168
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO3166/
3169
- */
3170
- declare const peppolCountryCodeSchema: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolCountryCode">;
3171
- //#endregion
3172
- //#region src/schemas/values/currency-code-schema.d.ts
3173
- /**
3174
- * @description An ISO 4217 currency code as defined by the PEPPOL subset.
3175
- *
3176
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO4217/
3177
- */
3178
- type PeppolCurrencyCode = Schema.Schema.Type<typeof currencyCodeSchema>;
3179
- /**
3180
- * @description An ISO 4217 currency code as defined by the PEPPOL subset.
3181
- *
3182
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO4217/
3183
- */
3184
- type PeppolCurrencyCodeEncoded = Schema.Codec.Encoded<typeof currencyCodeSchema>;
3185
- /**
3186
- * @description Validates an ISO 4217 currency code against the PEPPOL codelist.
3187
- *
3188
- * @param error - The custom error message to use when validation fails.
3189
- *
3190
- * @returns An Effect schema that accepts only valid currency codes.
3191
- *
3192
- * @validations
3193
- * - PEPPOL-EN16931-CL007: Currency codes MUST be valid ISO 4217 codes.
3194
- *
3195
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO4217/
3196
- */
3197
- declare const currencyCodeSchema: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolCurrencyCode">;
3198
- //#endregion
3199
- //#region src/schemas/values/peppol-document-type-code-schema.d.ts
3200
- /**
3201
- * @description A document type code as defined by the PEPPOL subset of UNCL 1001 (document/message name code).
3202
- *
3203
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001/
3204
- */
3205
- type PeppolDocumentTypeCode = typeof peppolDocumentTypeCodeSchema.Type;
3206
- /**
3207
- * @description Validates a document type code against the PEPPOL subset of UNCL 1001.
3208
- *
3209
- * @param error - The custom error message to use when validation fails.
3210
- *
3211
- * @returns An Effect schema that accepts only valid document type codes.
3212
- *
3213
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001/
3214
- */
3215
- declare const peppolDocumentTypeCodeSchema: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolDocumentTypeCode">;
3216
- //#endregion
3217
- //#region src/schemas/values/peppol-document-type-schema.d.ts
3218
- /**
3219
- * @description One of the PEPPOL document type schemes (e.g. `busdox-docid-qns`, `peppol-doctype-wildcard`).
3220
- *
3221
- * @see {@link documentTypesTable}
3222
- */
3223
- type PeppolDocumentType = typeof peppolDocumentTypeSchema.Type;
3224
- /**
3225
- * @description Validates a full PEPPOL document type identifier (`<scheme>::<value>`) against the known document type table. The scheme prefix must be a known key
3226
- * and the full identifier must exist in the document type table (checked via a filter).
3227
- *
3228
- * @param error - The custom error message to use when validation fails. Defaults to `'invalid peppol document type'`.
3229
- *
3230
- * @returns An Effect schema that matches a valid `scheme::value` document type identifier.
3231
- *
3232
- * @see {@link documentTypesTable}
3233
- */
3234
- declare const peppolDocumentTypeSchema: Schema.TemplateLiteral<readonly [Schema.Literals<readonly ["busdox-docid-qns", "peppol-doctype-wildcard"]>, Schema.Literal<"::">, Schema.String]>;
3235
- //#endregion
3236
- //#region src/schemas/values/document-type-schemes-schema.d.ts
3237
- /**
3238
- * @description Validates a PEPPOL document type scheme (e.g. `busdox-docid-qns`, `peppol-doctype-wildcard`).
3239
- *
3240
- * @param error - The error message to use when validation fails. Defaults to `'invalid Peppol document type scheme'`.
3241
- *
3242
- * @returns An Effect schema that accepts only valid document type schemes.
3243
- *
3244
- * @see {@link documentTypesScheme}
3245
- */
3246
- declare const documentTypeSchemesSchema: Schema.Literals<[string, ...string[]]>;
3247
- //#endregion
3248
- //#region src/schemas/values/document-type-values-schema.d.ts
3249
- /**
3250
- * @description Validates the value part of a PEPPOL document type identifier (the portion after the scheme prefix) against the known document type table.
3251
- *
3252
- * @param error - The error message to use when validation fails. Defaults to `'invalid Peppol document type value'`.
3253
- *
3254
- * @returns An Effect schema that accepts only valid document type values.
3255
- *
3256
- * @see {@link documentTypesTable}
3257
- */
3258
- declare const documentTypeValuesSchema: Schema.String;
3259
- //#endregion
3260
- //#region src/schemas/values/duty-tax-fee-category-schema.d.ts
3261
- /**
3262
- * @description A duty, tax or fee category code as defined by the PEPPOL subset of UNCL 5305 (VAT category code).
3263
- *
3264
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5305/
3265
- */
3266
- type PeppolDutyTaxFeeCategoryCode = typeof peppolDutyTaxFeeCategorySchema.Type;
3267
- type PeppolDutyTaxFeeCategoryCodeEncoded = typeof peppolDutyTaxFeeCategorySchema.Encoded;
3268
- /**
3269
- * @description Validates a duty, tax or fee category code against the PEPPOL subset of UNCL 5305 (VAT category code).
3270
- *
3271
- * @param error - The custom error message to use when validation fails.
3272
- *
3273
- * @returns An Effect schema that accepts only valid duty/tax/fee category codes.
3274
- *
3275
- * @validations
3276
- * - BR-CL-17 / BR-CL-18: VAT category code MUST be a valid UNCL 5305 code.
3277
- *
3278
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5305/
3279
- */
3280
- declare const peppolDutyTaxFeeCategorySchema: Schema.brand<Schema.Literals<readonly ["AE", "E", "S", "Z", "G", "O", "K", "L", "M", "B"]>, "PeppolDutyTaxFeeCategoryCode">;
3281
- //#endregion
3282
- //#region src/schemas/values/electronic-codes-schema.d.ts
3283
- /**
3284
- * @description An electronic address scheme (EAS) code, identifying the scheme of an electronic address (e.g. `0088` for GLN).
3285
- *
3286
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/
3287
- */
3288
- type PeppolElectronicAddressCode = typeof electronicCodesSchema.Type;
3289
4400
  /**
3290
- * @description Validates an electronic address scheme (EAS) code against the PEPPOL Electronic Address Identifier Scheme codelist.
3291
- *
3292
- * @param error - The custom error message to use when validation fails.
3293
- *
3294
- * @returns An Effect schema that accepts only valid electronic address scheme codes.
4401
+ * @description Type guard that returns `true` when a decoded value is a {@link PeppolInvoice}.
3295
4402
  *
3296
- * @validations
3297
- * - PEPPOL-EN16931-CL008: Electronic address identifier scheme MUST be from the codelist "Electronic Address Identifier Scheme".
3298
- *
3299
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/
3300
- */
3301
- declare const electronicCodesSchema: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolElectronicAddressCode">;
3302
- //#endregion
3303
- //#region src/schemas/values/icd-codes-schema.d.ts
3304
- /**
3305
- * @description An ISO 6523 ICD (International Code Designator) code identifying an identifier scheme.
4403
+ * @example
4404
+ * ```ts
4405
+ * isPeppolInvoice(doc); // true for a UBL Invoice
4406
+ * ```;
3306
4407
  *
3307
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ICD/
4408
+ * @see {@link PeppolDocumentSchema}
3308
4409
  */
3309
- type PeppolIcdCode = typeof icdCodesSchema.Type;
4410
+ declare const isPeppolInvoice: <I>(input: I) => input is I & PeppolInvoice;
3310
4411
  /**
3311
- * @description Validates an ISO 6523 ICD code against the PEPPOL codelist.
3312
- *
3313
- * @param error - The custom error message to use when validation fails. Defaults to `'Invalid ICD code provided'`.
3314
- *
3315
- * @returns An Effect schema that accepts only valid ICD codes.
3316
- *
3317
- * @validations
3318
- * - BR-CL-10 / BR-CL-11 / BR-CL-21: Identifier scheme MUST be a valid ISO 6523 ICD code.
4412
+ * @description Type guard that returns `true` when a decoded value is a {@link PeppolCreditNote}.
3319
4413
  *
3320
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ICD/
3321
- */
3322
- declare const icdCodesSchema: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolIcdCode">;
3323
- //#endregion
3324
- //#region src/schemas/values/invoice-status-code-schema.d.ts
3325
- /**
3326
- * @description An invoice status code as defined by the PEPPOL subset of UNCL 4343 (T111).
4414
+ * @example
4415
+ * ```ts
4416
+ * isPeppolCreditNote(doc); // true for a UBL CreditNote
4417
+ * ```;
3327
4418
  *
3328
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4343-T111/
4419
+ * @see {@link PeppolDocumentSchema}
3329
4420
  */
3330
- type PeppolInvoiceStatusCodes = typeof invoiceStatusCodeSchema.Type;
4421
+ declare const isPeppolCreditNote: <I>(input: I) => input is I & PeppolCreditNote;
3331
4422
  /**
3332
- * @description Validates an invoice status code against the PEPPOL subset of UNCL 4343 (T111).
3333
- *
3334
- * @param error - The custom error message to use when validation fails.
4423
+ * @description Type guard that returns `true` when a decoded value is a {@link PeppolMessageLevelResponse}.
3335
4424
  *
3336
- * @returns An Effect schema that accepts only valid invoice status codes.
3337
- *
3338
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4343-T111/
3339
- */
3340
- declare const invoiceStatusCodeSchema: Schema.brand<Schema.Literals<readonly ["AB", "AP", "RE", "IP", "UQ", "CA", "PD"]>, "PeppolInvoiceStatusCodes">;
3341
- //#endregion
3342
- //#region src/schemas/values/item-classification-codes-schema.d.ts
3343
- /**
3344
- * @description An item classification code as defined by the PEPPOL subset of UNCL 7143.
4425
+ * @example
4426
+ * ```ts
4427
+ * isPeppolMessageLevelResponse(doc); // true for an MLR ApplicationResponse
4428
+ * ```;
3345
4429
  *
3346
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL7143/
4430
+ * @see {@link PeppolDocumentSchema}
3347
4431
  */
3348
- type PeppolItemClassificationCode = typeof itemClassificationCodesSchema.Type;
4432
+ declare const isPeppolMessageLevelResponse: <I>(input: I) => input is I & PeppolMessageLevelResponse;
3349
4433
  /**
3350
- * @description Validates an item classification code against the PEPPOL subset of UNCL 7143.
3351
- *
3352
- * @param error - The custom error message to use when validation fails.
4434
+ * @description Type guard that returns `true` when a decoded value is a {@link PeppolInvoiceResponse}.
3353
4435
  *
3354
- * @returns An Effect schema that accepts only valid item classification codes.
3355
- *
3356
- * @validations
3357
- * - BR-CL-13: Item classification scheme MUST be a valid UNTDID 7143 code.
3358
- *
3359
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL7143/
3360
- */
3361
- declare const itemClassificationCodesSchema: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolItemClassificationCode">;
3362
- //#endregion
3363
- //#region src/schemas/values/mime-codes-schema.d.ts
3364
- /**
3365
- * @description A MIME media type code (e.g. `application/pdf`) as used for attached documents.
4436
+ * @example
4437
+ * ```ts
4438
+ * isPeppolInvoiceResponse(doc); // true for an invoice response ApplicationResponse
4439
+ * ```;
3366
4440
  *
3367
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/MimeCode/
4441
+ * @see {@link PeppolDocumentSchema}
3368
4442
  */
3369
- type PeppolMimeCode = typeof mimeCodesSchema.Type;
4443
+ declare const isPeppolInvoiceResponse: <I>(input: I) => input is I & PeppolInvoiceResponse;
4444
+ declare const PeppolDocumentSchema_base: OpaqueSchema<PeppolDocumentSchema, Schema.decodeTo<Schema.Union<readonly [typeof PeppolInvoice, typeof PeppolCreditNote, typeof PeppolMessageLevelResponse, typeof PeppolInvoiceResponse]>, Schema.String, never, never>>;
3370
4445
  /**
3371
- * @description Validates a MIME media type against the PEPPOL MIME code list.
3372
- *
3373
- * @param error - The custom error message to use when validation fails.
3374
- *
3375
- * @returns An Effect schema that accepts only valid MIME types.
4446
+ * @description Union of every supported PEPPOL business document. Members discriminate cleanly: invoice vs credit note via `invoiceLines`/`creditNoteLines`,
4447
+ * message-level vs invoice response via the `profileId` literal. Decodes and encodes XML strings by dispatching on the root element;
4448
+ * `ApplicationResponse` is split on `cbc:ProfileID`.
3376
4449
  *
3377
- * @validations
3378
- * - PEPPOL-EN16931-CL001: Attachment (MIME) type MUST come from the allowed list.
4450
+ * @example
4451
+ * ```ts
4452
+ * const doc = Schema.decodeUnknownSync(PeppolDocumentSchema)(xml); // decoded document union
4453
+ * ```;
3379
4454
  *
3380
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/MimeCode/
4455
+ * @see {@link PeppolDocumentDecoded}
4456
+ * @see {@link PeppolDocumentEncoded}
3381
4457
  */
3382
- declare const mimeCodesSchema: Schema.brand<Schema.Literals<readonly ["text/csv", "application/pdf", "image/png", "image/jpeg", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.oasis.opendocument.spreadsheet"]>, "PeppolMimeCode">;
3383
- //#endregion
3384
- //#region src/schemas/values/op-status-action-schema.d.ts
4458
+ declare class PeppolDocumentSchema extends PeppolDocumentSchema_base {}
3385
4459
  /**
3386
- * @description An OpenPeppol operation status action code (e.g. the outcome of a message response).
3387
- *
3388
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/OPStatusAction/
4460
+ * @description Encoded form of {@link PeppolDocumentSchema}: the XML string representation.
3389
4461
  */
3390
- type PeppolOpStatusAction = typeof opStatusActionSchema.Type;
4462
+ type PeppolDocumentEncoded = Schema.Codec.Encoded<typeof PeppolDocumentSchema>;
3391
4463
  /**
3392
- * @description Validates an OpenPeppol operation status action code against the OPStatusAction codelist.
3393
- *
3394
- * @param error - The custom error message to use when validation fails.
3395
- *
3396
- * @returns An Effect schema that accepts only valid operation status action codes.
3397
- *
3398
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/OPStatusAction/
4464
+ * @description Decoded form of {@link PeppolDocumentSchema}: the union of supported document classes.
3399
4465
  */
3400
- declare const opStatusActionSchema: Schema.brand<Schema.Literals<readonly ["NOA", "PIN", "NIN", "CNF", "CNP", "CNA", "OTH"]>, "PeppolOpStatusAction">;
3401
- //#endregion
3402
- //#region src/schemas/values/op-status-reason-schema.d.ts
4466
+ type PeppolDocumentDecoded = Schema.Schema.Type<typeof PeppolDocumentSchema>;
3403
4467
  /**
3404
- * @description An OpenPeppol operation status reason code (e.g. the reason for a message response outcome).
3405
- *
3406
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/OPStatusReason/
4468
+ * @description This defines the types of documents that are sent/received through the peppol network.
3407
4469
  */
3408
- type PeppolOpStatusReason = typeof opStatusReasonSchema.Type;
4470
+ type PeppolDocument = PeppolInvoice | PeppolCreditNote;
3409
4471
  /**
3410
- * @description Validates an OpenPeppol operation status reason code against the OPStatusReason codelist.
3411
- *
3412
- * @param error - The custom error message to use when validation fails.
3413
- *
3414
- * @returns An Effect schema that accepts only valid operation status reason codes.
3415
- *
3416
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/OPStatusReason/
4472
+ * @description This defines the types of message that are sent/received through the peppol network.
3417
4473
  */
3418
- declare const opStatusReasonSchema: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolOpStatusReason">;
3419
- //#endregion
3420
- //#region src/schemas/values/participant-identifier-code-schema.d.ts
4474
+ type PeppolMessage = PeppolMessageLevelResponse | PeppolInvoiceResponse;
3421
4475
  /**
3422
- * @description A PEPPOL participant identifier scheme, identifying the scheme of a participant identifier (e.g. EAS codes).
3423
- *
3424
- * @see https://docs.peppol.eu/poacc/billing/3.0/
4476
+ * @description Every document type supported by {@link PeppolDocumentSchema}: the billing documents and the response messages.
3425
4477
  */
3426
- type PeppolParticipantIdentifierCode = typeof participantIdentifierCodeSchema.Type;
4478
+ type PeppolAllDocuments = PeppolDocument | PeppolMessage;
3427
4479
  /**
3428
- * @description Validates a PEPPOL participant identifier scheme against the participant identifier schemes list.
3429
- *
3430
- * @param error - The custom error message to use when validation fails.
3431
- *
3432
- * @returns An Effect schema that accepts only valid participant identifier schemes.
4480
+ * @description A line from either a {@link PeppolInvoice} or a {@link PeppolCreditNote}.
3433
4481
  */
3434
- declare const participantIdentifierCodeSchema: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolParticipantIdentifierCode">;
4482
+ type PeppolDocumentLine = PeppolInvoiceLine | PeppolCreditNoteLine;
3435
4483
  //#endregion
3436
- //#region src/schemas/values/payment-means-code-schema.d.ts
4484
+ //#region src/schemas/fields/default-customization-id.d.ts
3437
4485
  /**
3438
- * @description Validates a payment means code against the PEPPOL subset of UNCL 4461.
4486
+ * @description The default PEPPOL BIS Billing 3.0 customization identifier, which identifies the EN 16931 compliant billing rule set. Used as the decoding default
4487
+ * for the `customizationId` field of {@link PeppolBillingBase}.
3439
4488
  *
3440
- * @param error - The custom error message to use when validation fails.
3441
- *
3442
- * @returns An Effect schema that accepts only valid payment means codes.
3443
- *
3444
- * @validations
3445
- * - BR-CL-16: Payment means code MUST be a valid UNCL 4461 code.
3446
- *
3447
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4461/
4489
+ * @example
4490
+ * ```ts
4491
+ * DEFAULT_CUSTOMIZATION_ID; // 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0'
4492
+ * ```;
3448
4493
  */
3449
- declare const paymentMeansCodeSchema: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolPaymentMeansCode">;
4494
+ declare const DEFAULT_CUSTOMIZATION_ID: 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0';
3450
4495
  //#endregion
3451
- //#region src/schemas/values/process-from-document-type-schema.d.ts
4496
+ //#region src/schemas/fields/default-profile-id.d.ts
3452
4497
  /**
3453
- * @description Validates a business process identifier (`<scheme>::<value>`) against the processes allowed for a given document type.
3454
- *
3455
- * @param documentType - The PEPPOL document type scheme whose allowed processes should be used.
3456
- * @param error - The custom error message to use when validation fails. Defaults to `'invalid process type for document type'`.
3457
- *
3458
- * @returns An Effect schema that matches only processes allowed for the given document type.
4498
+ * @description The default PEPPOL BIS Billing 3.0 profile identifier, which identifies the billing process the document follows. Used as the decoding default for
4499
+ * the `profileId` field of {@link PeppolBillingBase}.
3459
4500
  *
3460
- * @see {@link peppolProcessSchema}
3461
- * @see {@link documentTypesProcessIds}
4501
+ * @example
4502
+ * ```ts
4503
+ * DEFAULT_PROFILE_ID; // 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0'
4504
+ * ```;
3462
4505
  */
3463
- declare function processFromDocumentTypeSchema(documentType: PeppolDocumentType, error?: string): Schema.String | Schema.TemplateLiteral<readonly [Schema.Literals<readonly ["cenbii-procid-ubl", "oioubl-procid-ubl"]>, Schema.Literal<"::">, Schema.String]>;
4506
+ declare const DEFAULT_PROFILE_ID: 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0';
3464
4507
  //#endregion
3465
- //#region src/schemas/values/vatex-code-schema.d.ts
4508
+ //#region src/schemas/fields/peppol-reference-schema.d.ts
4509
+ declare const PeppolReferenceId_base: OpaqueSchema<PeppolReferenceId, Schema.Struct<{
4510
+ readonly id: Schema.String;
4511
+ }>>;
3466
4512
  /**
3467
- * @description A VAT exemption reason code as defined by the CEF VATEX codelist.
4513
+ * @description A reference identifier, such as an order or sales order reference.
3468
4514
  *
3469
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/vatex/
4515
+ * @example
4516
+ * ```ts
4517
+ * { id: '123' }
4518
+ * ```;
3470
4519
  */
3471
- type PeppolVatexCode = typeof vatexCodeSchema.Type;
4520
+ declare class PeppolReferenceId extends PeppolReferenceId_base {}
3472
4521
  /**
3473
- * @description Validates a VAT exemption reason code against the CEF VATEX codelist.
3474
- *
3475
- * @param error - The custom error message to use when validation fails.
4522
+ * @description A schema for an optional reference identifier, accepting either {@link PeppolReferenceId} or `undefined`.
3476
4523
  *
3477
- * @returns An Effect schema that accepts only valid VAT exemption reason codes.
3478
- *
3479
- * @validations
3480
- * - BR-CL-22: VAT exemption reason code MUST be a valid CEF VATEX code.
3481
- *
3482
- * @see https://docs.peppol.eu/poacc/billing/3.0/codelist/vatex/
4524
+ * @example
4525
+ * ```ts
4526
+ * peppolReferenceSchema; // Schema.Union([PeppolReferenceId, Schema.Undefined])
4527
+ * ```;
3483
4528
  */
3484
- declare const vatexCodeSchema: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolVatexCode">;
3485
- //#endregion
3486
- //#region src/schemas/values/vat-date-code-schema.d.ts
3487
- type PeppolVatDateCode = VatDateCodesKeys;
4529
+ declare const peppolReferenceSchema: Schema.Union<readonly [typeof PeppolReferenceId, Schema.Undefined]>;
3488
4530
  /**
3489
- * @validations
3490
- * - PEPPOL-EN16931-CL006: Invoice period description code must be according to UNCL 2005 D.16B.
4531
+ * @description The decoded type of {@link peppolReferenceSchema}, either a {@link PeppolReferenceId} or `undefined`.
3491
4532
  */
3492
- declare const vatDateCodeSchema: Schema.Literals<readonly ["3", "35", "432"]>;
4533
+ type PeppolReferenceSchema = Schema.Schema.Type<typeof peppolReferenceSchema>;
3493
4534
  //#endregion
3494
- export { PeppolDocumentLine as $, PeppolPayeeFinancialAccount as $n, PeppolLineReference as $t, PeppolDocumentTypeCode as A, PeppolInvoiceLinePeriod as An, PeppolAttachmentExternalReference as Ar, getCreditNoteTypeCodeDescription as At, PeppolAllowanceChargeReasonCode as B, PeppolOriginatorDocumentReference as Bn, PeppolAmount as Br, withStatusCodes as Bt, PeppolDutyTaxFeeCategoryCode as C, PeppolCommodityClassifications as Cn, PeppolAddress as Cr, PeppolProcesses as Ct, documentTypeSchemesSchema as D, PeppolSellersItemIdentification as Dn, PeppolInvoiceDocumentReference as Dr, getInvoiceTypeCodeDescription as Dt, documentTypeValuesSchema as E, PeppolOriginCountryCode as En, PeppolBillingReference as Er, isValidCreditNoteTypeCode as Et, peppolCountryCodeSchema as F, PeppolLineCharge as Fn, PeppolAllowanceCharge as Fr, peppolBase64Schema as Ft, PeppolReferenceSchema as G, PeppolTaxSubTotalCategory as Gn, PeppolInvoiceResponseStatusReasonCode as Gt, PeppolAdditionalDocumentReferenceCode as H, PeppolTaxTotal as Hn, PeppolIsoDateString as Hr, InvoiceResponseDocumentActualResponseStatus as Ht, PeppolChargeReasonCode as I, peppolLineAllowanceChargeSchema as In, PeppolAllowanceChargeEncoded as Ir, InvoiceResponseDocumentActualResponse as It, DEFAULT_CUSTOMIZATION_ID as J, PeppolTaxSchemeId as Jn, peppolInvoiceResponseStatusReasonCodeSchema as Jt, peppolReferenceSchema as K, PeppolTaxSubTotalCategoryEncoded as Kn, PeppolInvoiceResponseStatusReasonCodeAction as Kt, chargeReasonCodeSchema as L, PeppolBillingBase as Ln, PeppolCharge as Lr, PeppolInvoiceResponseDocumentActualResponseWithStatus as Lt, PeppolCurrencyCode as M, PeppolLineAllowance as Mn, PeppolBinaryObject as Mr, creditNoteTypeCodeSchema as Mt, PeppolCurrencyCodeEncoded as N, PeppolLineAllowanceCharge as Nn, BaseAllowanceCharge as Nr, formatQuantityWithUnit as Nt, PeppolDocumentType as O, PeppolStandardItemIdentification as On, PeppolAdditionalDocumentReference as Or, PeppolInvoiceTypeCode as Ot, currencyCodeSchema as P, PeppolLineAllowanceChargeEncoded as Pn, PeppolAllowance as Pr, Base64 as Pt, PeppolDocumentEncoded as Q, PeppolCardAccount as Qn, PeppolDocumentResponseLineResponse as Qt, PeppolApplicationResponseTypeCode as R, PeppolContractDocumentReference as Rn, PeppolTaxCategoryTaxSchemeId as Rr, PeppolInvoiceResponseDocumentActualResponseWithoutStatus as Rt, electronicCodesSchema as S, PeppolBuyersItemIdentification as Sn, PeppolDeliveryPartyPartyName as Sr, isValidProcess as St, peppolDutyTaxFeeCategorySchema as T, PeppolLineItem as Tn, PeppolCountryCode as Tr, isValidInvoiceTypeCode as Tt, additionalDocumentReferenceCodeSchema as U, PeppolTaxTotalsBase as Un, PeppolInvoiceResponseCondition as Ut, allowanceChargeReasonCodeSchema as V, PeppolReceiptDocumentReference as Vn, PeppolAmountEncoded as Vr, withoutStatusCodes as Vt, PeppolReferenceId as W, PeppolTaxSubTotal as Wn, PeppolInvoiceResponseDocumentActualResponseStatus as Wt, PeppolDocument as X, PeppolTaxRepresentativeParty as Xn, PeppolXsdTime as Xt, PeppolAllDocuments as Y, PeppolTaxRepresentative as Yn, PeppolMessageLevelResponse as Yt, PeppolDocumentDecoded as Z, PeppolPaymentTerms as Zn, PeppolMessageLevelResponseDocumentResponse as Zt, PeppolInvoiceStatusCodes as _, PeppolLinePrice as _n, PeppolLegalMonetaryTotal as _r, TimeIntlUnit as _t, processFromDocumentTypeSchema as a, PeppolDocumentResponseDocumentReference as an, PeppolPayeeParty as ar, peppolDocumentSchema as at, icdCodesSchema as b, PriceAllowanceCharge as bn, PeppolDeliveryLocation as br, PeppolQuantityUnitCode as bt, participantIdentifierCodeSchema as c, PeppolCreditNote as cn, PeppolPartyName$1 as cr, PeppolInvoiceResponseDocumentReference as ct, PeppolOpStatusAction as d, PeppolInvoice as dn, PeppolPartyTaxScheme as dr, PeppolInvoiceResponseDocumentResponsePartyName as dt, PeppolMessageLevelDocumentResponseLineResponse as en, PeppolPayeeFinancialAccountFinancialInstitutionBranch as er, PeppolMessage as et, opStatusActionSchema as f, PeppolProjectReference as fn, PeppolPartyLegalEntity$1 as fr, PeppolInvoiceResponseParty as ft, itemClassificationCodesSchema as g, PeppolOrderLineReference as gn, PeppolOrderReference as gr, IntlUnit as gt, PeppolItemClassificationCode as h, PeppolBaseLine as hn, PeppolContact as hr, BaseIntlUnit as ht, vatexCodeSchema as i, PeppolMessageLevelResponseDocumentResponseDocument as in, PeppolPaymentMeansCode as ir, isPeppolMessageLevelResponse as it, peppolDocumentTypeCodeSchema as j, BaseLineAllowanceCharge as jn, PeppolId as jr, PeppolCreditNoteTypeCode as jt, peppolDocumentTypeSchema as k, PeppolItemClassification as kn, PeppolAttachment as kr, invoiceTypeCodeSchema as kt, PeppolOpStatusReason as l, PeppolCreditNoteLine as ln, PeppolPartySchema as lr, PeppolInvoiceResponseDocumentResponse as lt, mimeCodesSchema as m, PeppolInvoiceLineEncoded as mn, PeppolIdentifier as mr, peppolVatRegexSchema as mt, vatDateCodeSchema as n, PeppolStatus as nn, PeppolPaymentMandatePayerFinancialAccountId as nr, isPeppolInvoice as nt, paymentMeansCodeSchema as o, PeppolMessageLevelDocumentResponseDocumentReference as on, PeppolPartyEndpointId as or, PeppolInvoiceDocumentResponseParty as ot, PeppolMimeCode as p, PeppolInvoiceLine as pn, PeppolPartyLegalEntitySchema as pr, PeppolInvoiceResponseSenderParty as pt, DEFAULT_PROFILE_ID as q, PeppolTaxCategory as qn, PeppolInvoiceResponseStatusReasonCodeReason as qt, PeppolVatexCode as r, PeppolDocumentResponseDocument as rn, PeppolPaymentMeans as rr, isPeppolInvoiceResponse as rt, PeppolParticipantIdentifierCode as s, PeppolMessageLevelResponseParty as sn, PeppolPartyIdentification$1 as sr, PeppolInvoiceResponse as st, PeppolVatDateCode as t, PeppolDocumentResponseLineResponseContent as tn, PeppolPaymentMandate as tr, isPeppolCreditNote as tt, opStatusReasonSchema as u, PeppolCreditNoteLineEncoded as un, PeppolPartyTaxSchema as ur, PeppolInvoiceResponseDocumentResponseParty as ut, invoiceStatusCodeSchema as v, PeppolQuantity as vn, PeppolInvoicePeriod as vr, quantityToIntlUnitMap as vt, PeppolDutyTaxFeeCategoryCodeEncoded as w, PeppolItem as wn, PeppolAddressLine as wr, peppolProcessSchema as wt, PeppolElectronicAddressCode as x, PeppolAdditionalItemProperties as xn, PeppolDeliveryParty as xr, quantityUnitCodesSchema as xt, PeppolIcdCode as y, PeppolLinePriceAllowanceCharge as yn, PeppolDelivery as yr, quantityUnitCodeToIntlUnit as yt, applicationResponseTypeCodeSchema as z, PeppolDespatchDocumentReference as zn, peppolAllowanceChargeSchema as zr, peppolInvoiceResponseDocumentActualResponseSchema as zt };
3495
- //# sourceMappingURL=index-BBzPjq7o.d.ts.map
4535
+ export { PeppolLineReference as $, PeppolCharge as $n, PeppolParticipantIdentifierCode as $t, quantityUnitCodeToIntlUnit as A, PeppolPartyLegalEntity$1 as An, PeppolInvoiceLinePeriod as At, PeppolInvoiceResponseDocumentActualResponseWithoutStatus as B, PeppolDeliveryParty as Bn, PeppolReceiptDocumentReference as Bt, PeppolInvoiceResponseParty as C, PeppolPartyEndpointId as Cn, PeppolCommodityClassifications as Ct, IntlUnit as D, PeppolElectronicAddressCode as Dn, PeppolSellersItemIdentification as Dt, BaseIntlUnit as E, PeppolPartySchema as En, PeppolOriginCountryCode as Et, getCreditNoteTypeCodeDescription as F, PeppolLegalMonetaryTotal as Fn, PeppolLineCharge as Ft, PeppolInvoiceResponseDocumentActualResponseStatus as G, PeppolCountryCodeValue as Gn, PeppolTaxSubTotalCategoryEncoded as Gt, withoutStatusCodes as H, PeppolAddress as Hn, PeppolTaxTotalsBase as Ht, formatQuantityWithUnit as I, PeppolInvoicePeriod as In, PeppolBillingBase as It, PeppolInvoiceResponseStatusReasonCodeReason as J, PeppolInvoiceDocumentReference as Jn, PeppolVatexCode as Jt, PeppolInvoiceResponseStatusReasonCode as K, PeppolIcdCode as Kn, PeppolTaxCategory as Kt, InvoiceResponseDocumentActualResponse as L, PeppolVatDateCode as Ln, PeppolContractDocumentReference as Lt, isValidInvoiceTypeCode as M, PeppolIdentifier as Mn, PeppolLineAllowance as Mt, isValidCreditNoteTypeCode as N, PeppolContact as Nn, PeppolLineAllowanceCharge as Nt, TimeIntlUnit as O, PeppolPartyTaxSchema as On, PeppolStandardItemIdentification as Ot, getInvoiceTypeCodeDescription as P, PeppolOrderReference as Pn, PeppolLineAllowanceChargeEncoded as Pt, PeppolDocumentResponseLineResponse as Q, PeppolAllowanceChargeEncoded as Qn, PeppolProcesses as Qt, PeppolInvoiceResponseDocumentActualResponse as R, PeppolDelivery as Rn, PeppolDespatchDocumentReference as Rt, PeppolInvoiceResponseDocumentResponsePartyName as S, PeppolPayeeParty as Sn, PeppolBuyersItemIdentification as St, PeppolVatRegex as T, PeppolPartyName$1 as Tn, PeppolLineItem as Tt, InvoiceResponseDocumentActualResponseStatus as U, PeppolAddressLine as Un, PeppolTaxSubTotal as Ut, withStatusCodes as V, PeppolDeliveryPartyPartyName as Vn, PeppolTaxTotal as Vt, PeppolInvoiceResponseCondition as W, PeppolCountryCode as Wn, PeppolTaxSubTotalCategory as Wt, PeppolXsdTime as X, PeppolAllowance as Xn, processFromDocumentTypeSchema as Xt, PeppolMessageLevelResponse as Y, BaseAllowanceCharge as Yn, PeppolQuantityUnitCode as Yt, PeppolMessageLevelResponseDocumentResponse as Z, PeppolAllowanceCharge as Zn, PeppolProcess as Zt, PeppolInvoiceDocumentResponseParty as _, PeppolPaymentMandate as _n, PeppolBase64 as _r, PeppolLinePrice as _t, DEFAULT_CUSTOMIZATION_ID as a, PeppolDocumentTypeValue as an, PeppolAmount as ar, PeppolDocumentResponseDocumentReference as at, PeppolInvoiceResponseDocumentResponse as b, PeppolPaymentMeansCode as bn, PriceAllowanceCharge as bt, PeppolDocumentDecoded as c, PeppolDocumentTypeCode as cn, PeppolCurrencyCodeEncoded as cr, PeppolCreditNote as ct, PeppolDocumentSchema as d, PeppolTaxRepresentative as dn, PeppolAttachmentExternalReference as dr, PeppolInvoice as dt, PeppolOpStatusReason as en, PeppolTaxCategoryTaxSchemeId as er, PeppolMessageLevelDocumentResponseLineResponse as et, PeppolMessage as f, PeppolTaxRepresentativeParty as fn, PeppolId as fr, PeppolProjectReference as ft, isPeppolMessageLevelResponse as g, PeppolPayeeFinancialAccountFinancialInstitutionBranch as gn, Base64 as gr, PeppolOrderLineReference as gt, isPeppolInvoiceResponse as h, PeppolPayeeFinancialAccount as hn, PeppolMimeCode as hr, PeppolBaseLine as ht, DEFAULT_PROFILE_ID as i, PeppolInvoiceStatusCodes as in, PeppolAllowanceChargeReasonCode as ir, PeppolMessageLevelResponseDocumentResponseDocument as it, isValidProcess as j, PeppolPartyLegalEntitySchema as jn, BaseLineAllowanceCharge as jt, quantityToIntlUnitMap as k, PeppolPartyTaxScheme as kn, PeppolItemClassification as kt, PeppolDocumentEncoded as l, PeppolCreditNoteTypeCode as ln, PeppolAdditionalDocumentReference as lr, PeppolCreditNoteLine as lt, isPeppolInvoice as m, PeppolCardAccount as mn, PeppolBinaryObject as mr, PeppolInvoiceLineEncoded as mt, PeppolReferenceSchema as n, PeppolItemClassificationCode as nn, PeppolDutyTaxFeeCategoryCodeEncoded as nr, PeppolStatus as nt, PeppolAllDocuments as o, PeppolDocumentTypeScheme as on, PeppolAmountEncoded as or, PeppolMessageLevelDocumentResponseDocumentReference as ot, isPeppolCreditNote as p, PeppolPaymentTerms as pn, PeppolAdditionalDocumentReferenceCode as pr, PeppolInvoiceLine as pt, PeppolInvoiceResponseStatusReasonCodeAction as q, PeppolBillingReference as qn, PeppolTaxSchemeId as qt, peppolReferenceSchema as r, PeppolInvoiceTypeCode as rn, PeppolChargeReasonCode as rr, PeppolDocumentResponseDocument as rt, PeppolDocument as s, PeppolDocumentType as sn, PeppolCurrencyCode as sr, PeppolMessageLevelResponseParty as st, PeppolReferenceId as t, PeppolOpStatusAction as tn, PeppolDutyTaxFeeCategoryCode as tr, PeppolDocumentResponseLineResponseContent as tt, PeppolDocumentLine as u, PeppolApplicationResponseTypeCode as un, PeppolAttachment as ur, PeppolCreditNoteLineEncoded as ut, PeppolInvoiceResponse as v, PeppolPaymentMandatePayerFinancialAccountId as vn, PeppolIsoDateString as vr, PeppolQuantity as vt, PeppolInvoiceResponseSenderParty as w, PeppolPartyIdentification$1 as wn, PeppolItem as wt, PeppolInvoiceResponseDocumentResponseParty as x, PeppolPaymentMeansCodeValue as xn, PeppolAdditionalItemProperties as xt, PeppolInvoiceResponseDocumentReference as y, PeppolPaymentMeans as yn, PeppolLinePriceAllowanceCharge as yt, PeppolInvoiceResponseDocumentActualResponseWithStatus as z, PeppolDeliveryLocation as zn, PeppolOriginatorDocumentReference as zt };
4536
+ //# sourceMappingURL=index-CILtZytZ.d.ts.map