@endevops/peppol-schema 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/constants.d.ts +131 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +114 -1
- package/dist/constants.js.map +1 -1
- package/dist/{index-BBzPjq7o.d.ts → index-XG-N6PcG.d.ts} +1702 -724
- package/dist/index-XG-N6PcG.d.ts.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1247 -200
- package/dist/index.js.map +1 -1
- package/dist/invoice-response-code-not-needs-schema-DNrfKYLh.js +36 -0
- package/dist/invoice-response-code-not-needs-schema-DNrfKYLh.js.map +1 -0
- package/dist/invoice-response-codes.d.ts +28 -0
- package/dist/invoice-response-codes.d.ts.map +1 -1
- package/dist/invoice-response-codes.js +11 -1
- package/dist/invoice-response-codes.js.map +1 -1
- package/dist/{is-valid-abn-160i38PG.js → is-valid-abn-D7eSygBG.js} +115 -2
- package/dist/is-valid-abn-D7eSygBG.js.map +1 -0
- package/dist/{is-valid-mod97-0208-CzMOXMO-.js → is-valid-mod97-0208-CjR324eG.js} +11 -1
- package/dist/is-valid-mod97-0208-CjR324eG.js.map +1 -0
- package/dist/message-level-response-profile-id-B9c0A7S_.js +27 -0
- package/dist/message-level-response-profile-id-B9c0A7S_.js.map +1 -0
- package/dist/{nodable-parser-CyDZtLCK.js → nodable-parser-CupS2H55.js} +31 -1
- package/dist/nodable-parser-CupS2H55.js.map +1 -0
- package/dist/schematron.d.ts +57 -1
- package/dist/schematron.d.ts.map +1 -1
- package/dist/schematron.js +458 -7
- package/dist/schematron.js.map +1 -1
- package/dist/validations.d.ts +132 -0
- package/dist/validations.d.ts.map +1 -1
- package/dist/validations.js +11 -2
- package/dist/validations.js.map +1 -1
- package/dist/values.d.ts +67 -2
- package/dist/values.d.ts.map +1 -1
- package/dist/xml.d.ts +30 -0
- package/dist/xml.d.ts.map +1 -1
- package/dist/xml.js +10 -1
- package/dist/xml.js.map +1 -1
- package/package.json +1 -1
- package/src/constants/credit-note-doctype-id.ts +9 -0
- package/src/constants/credit-note-process-id.ts +9 -0
- package/src/constants/document-scheme.ts +9 -0
- package/src/constants/invoice-doctype-id.ts +9 -0
- package/src/constants/invoice-process-id.ts +10 -0
- package/src/constants/invoice-response-doctype-id.ts +10 -0
- package/src/constants/invoice-response-process-id.ts +9 -0
- package/src/constants/invoice-response-profile-id.ts +9 -0
- package/src/constants/message-level-response-doctype-id.ts +10 -0
- package/src/constants/message-level-response-process-id.ts +9 -0
- package/src/constants/message-level-response-profile-id.ts +9 -0
- package/src/constants/participant-scheme.ts +10 -0
- package/src/constants/process-scheme.ts +9 -0
- package/src/constants/transport-profile.ts +10 -0
- package/src/decoders/fields/decode-invoice-message-document-party.ts +2 -2
- package/src/decoders/fields/decode-parties-tax-scheme.ts +2 -2
- package/src/decoders/fields/decode-party-legal-entity.ts +2 -2
- package/src/decoders/fields/decode-party-tax-scheme.ts +2 -2
- package/src/decoders/fields/decode-tax-category.ts +1 -1
- package/src/decoders/fields/decode-tax-representative-party.ts +2 -2
- package/src/decoders/fields/encode-message-party.ts +2 -2
- package/src/decoders/fields/encode-parties-tax-scheme.ts +3 -3
- package/src/decoders/fields/encode-party-legal-entity.ts +1 -1
- package/src/decoders/fields/encode-party-tax-scheme.ts +2 -2
- package/src/decoders/fields/encode-tax-representative-party.ts +2 -2
- package/src/invoice-response-codes/invoice-response-code-needs-schema.ts +9 -0
- package/src/invoice-response-codes/invoice-response-code-not-needs-schema.ts +9 -0
- package/src/invoice-response-codes/invoice-response-codes-order.ts +10 -0
- package/src/peppol-validations/add-piva.ts +12 -0
- package/src/peppol-validations/check-cf.ts +11 -0
- package/src/peppol-validations/check-cf16.ts +12 -0
- package/src/peppol-validations/check-piva-se-it.ts +11 -0
- package/src/peppol-validations/check-piva.ts +11 -0
- package/src/peppol-validations/check-se-orgnr.ts +9 -0
- package/src/peppol-validations/greek-tin-verification.ts +9 -0
- package/src/peppol-validations/is-valid-abn.ts +9 -0
- package/src/peppol-validations/is-valid-gln.ts +10 -0
- package/src/peppol-validations/is-valid-iban.ts +10 -0
- package/src/peppol-validations/is-valid-mod11.ts +9 -0
- package/src/peppol-validations/is-valid-mod97-0208.ts +10 -0
- package/src/peppol-validations/luhn-check.ts +9 -0
- package/src/schemas/fields/default-customization-id.ts +9 -0
- package/src/schemas/fields/default-profile-id.ts +9 -0
- package/src/schemas/fields/peppol-additional-document-reference-schema.ts +61 -20
- package/src/schemas/fields/peppol-address-schema.ts +25 -2
- package/src/schemas/fields/peppol-allowance-charge-schema.ts +63 -9
- package/src/schemas/fields/peppol-amount-schema.ts +15 -2
- package/src/schemas/fields/peppol-base-line-schema.ts +12 -2
- package/src/schemas/fields/peppol-billing-reference-schema.ts +13 -0
- package/src/schemas/fields/peppol-binary-object-schema.ts +12 -4
- package/src/schemas/fields/peppol-contact-schema.ts +11 -0
- package/src/schemas/fields/peppol-credit-note-line-schema.ts +7 -2
- package/src/schemas/fields/peppol-delivery-schema.ts +44 -2
- package/src/schemas/fields/peppol-identifier-schema.ts +8 -0
- package/src/schemas/fields/peppol-invoice-line-period-schema.ts +11 -0
- package/src/schemas/fields/peppol-invoice-line-schema.ts +9 -2
- package/src/schemas/fields/peppol-invoice-period-schema.ts +2 -2
- package/src/schemas/fields/peppol-item-classification-schema.ts +2 -2
- package/src/schemas/fields/peppol-line-allowance-charge-schema.ts +56 -8
- package/src/schemas/fields/peppol-line-item-schema.ts +66 -6
- package/src/schemas/fields/peppol-line-price-allowance-charge-schema.ts +20 -0
- package/src/schemas/fields/peppol-line-price-schema.ts +2 -0
- package/src/schemas/fields/peppol-order-reference-schema.ts +2 -0
- package/src/schemas/fields/peppol-party-base-schema.ts +36 -4
- package/src/schemas/fields/peppol-party-legal-entity-schema.ts +10 -2
- package/src/schemas/fields/peppol-party-tax-scheme-schema.ts +4 -4
- package/src/schemas/fields/peppol-payee-party-schema.ts +8 -8
- package/src/schemas/fields/peppol-payment-means-schema.ts +62 -2
- package/src/schemas/fields/peppol-payment-terms-schema.ts +2 -0
- package/src/schemas/fields/peppol-quantity-schema.ts +4 -2
- package/src/schemas/fields/peppol-reference-schema.ts +20 -1
- package/src/schemas/fields/peppol-tax-category-schema.ts +12 -2
- package/src/schemas/fields/peppol-tax-representative-schema.ts +2 -2
- package/src/schemas/fields/peppol-tax-subtotal-category-schema.ts +3 -0
- package/src/schemas/fields/peppol-tax-subtotal-schema.ts +2 -0
- package/src/schemas/fields/peppol-tax-totals-base-schema.ts +3 -3
- package/src/schemas/peppol-billing-base-schema.ts +49 -9
- package/src/schemas/peppol-credit-note-schema.ts +2 -2
- package/src/schemas/peppol-document-response-document-reference-schema.ts +12 -4
- package/src/schemas/peppol-document-response-document-schema.ts +5 -5
- package/src/schemas/peppol-document-response-line-response-content-schema.ts +22 -2
- package/src/schemas/peppol-document-response-line-response-schema.ts +23 -2
- package/src/schemas/peppol-document-schema.ts +69 -6
- package/src/schemas/peppol-invoice-response-document-actual-response-schema.ts +53 -4
- package/src/schemas/peppol-invoice-response-document-actual-response-status-schema.ts +22 -4
- package/src/schemas/peppol-invoice-response-schema.ts +54 -6
- package/src/schemas/peppol-invoice-response-status-reason-code-schema.ts +36 -8
- package/src/schemas/peppol-invoice-schema.ts +30 -2
- package/src/schemas/peppol-message-level-response-document-response-schema.ts +10 -0
- package/src/schemas/peppol-message-level-response-party-schema.ts +10 -0
- package/src/schemas/peppol-message-level-response-schema.ts +18 -0
- package/src/schemas/utils/format-quantity-with-unit.ts +19 -0
- package/src/schemas/utils/get-credit-note-type-code-description.ts +12 -0
- package/src/schemas/utils/get-invoice-type-code-description.ts +12 -0
- package/src/schemas/utils/is-valid-credit-note-type-code.ts +13 -0
- package/src/schemas/utils/is-valid-invoice-type-code.ts +13 -0
- package/src/schemas/utils/is-valid-process.ts +13 -0
- package/src/schemas/utils/peppol-base-64-schema.ts +7 -4
- package/src/schemas/utils/peppol-vat-regex-schema.ts +38 -30
- package/src/schemas/utils/peppol-xsd-time-schema.ts +12 -2
- package/src/schemas/utils/quantity-unit-code-to-intl-unit.ts +34 -0
- package/src/schemas/values/additional-document-reference-code-schema.ts +9 -15
- package/src/schemas/values/allowance-charge-reason-code-schema.ts +12 -14
- package/src/schemas/values/application-response-type-code-schema.ts +10 -14
- package/src/schemas/values/charge-reason-code-schema.ts +12 -14
- package/src/schemas/values/credit-note-type-code-schema.ts +8 -14
- package/src/schemas/values/currency-code-schema.ts +13 -16
- package/src/schemas/values/document-type-schemes-schema.ts +9 -5
- package/src/schemas/values/document-type-values-schema.ts +5 -6
- package/src/schemas/values/duty-tax-fee-category-schema.ts +15 -13
- package/src/schemas/values/electronic-codes-schema.ts +10 -12
- package/src/schemas/values/icd-codes-schema.ts +8 -12
- package/src/schemas/values/invoice-status-code-schema.ts +10 -12
- package/src/schemas/values/invoice-type-code-schema.ts +10 -12
- package/src/schemas/values/item-classification-codes-schema.ts +10 -12
- package/src/schemas/values/mime-codes-schema.ts +12 -14
- package/src/schemas/values/op-status-action-schema.ts +10 -12
- package/src/schemas/values/op-status-reason-schema.ts +10 -12
- package/src/schemas/values/participant-identifier-code-schema.ts +10 -13
- package/src/schemas/values/payment-means-code-schema.ts +10 -12
- package/src/schemas/values/peppol-country-code-schema.ts +7 -9
- package/src/schemas/values/peppol-document-type-code-schema.ts +10 -12
- package/src/schemas/values/peppol-document-type-schema.ts +12 -21
- package/src/schemas/values/peppol-process-schema.ts +19 -15
- package/src/schemas/values/process-from-document-type-schema.ts +3 -3
- package/src/schemas/values/quantity-unit-codes-schema.ts +10 -12
- package/src/schemas/values/vat-date-code-schema.ts +12 -5
- package/src/schemas/values/vatex-code-schema.ts +8 -12
- package/src/schematron/errors.ts +14 -0
- package/src/schematron/helpers.ts +457 -11
- package/src/schematron/run-all-rules.ts +10 -0
- package/src/schematron/schematron.ts +25 -0
- package/src/xml/builder-options.ts +9 -0
- package/src/xml/common-xml-options.ts +9 -0
- package/src/xml/nodable-parser.ts +12 -0
- package/src/xml/parser-options.ts +9 -0
- package/dist/index-BBzPjq7o.d.ts.map +0 -1
- package/dist/invoice-response-code-not-needs-schema-p_RKKNLc.js +0 -18
- package/dist/invoice-response-code-not-needs-schema-p_RKKNLc.js.map +0 -1
- package/dist/is-valid-abn-160i38PG.js.map +0 -1
- package/dist/is-valid-mod97-0208-CzMOXMO-.js.map +0 -1
- package/dist/message-level-response-profile-id-DBpOW91B.js +0 -9
- package/dist/message-level-response-profile-id-DBpOW91B.js.map +0 -1
- package/dist/nodable-parser-CyDZtLCK.js.map +0 -1
- package/dist/vat-dates.generated-CxFvt7m3.d.ts +0 -68
- 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,36 @@ declare const PeppolIsoDateString_base: OpaqueSchema<PeppolIsoDateString, Schema
|
|
|
20
19
|
*/
|
|
21
20
|
declare class PeppolIsoDateString extends PeppolIsoDateString_base {}
|
|
22
21
|
//#endregion
|
|
23
|
-
//#region src/schemas/
|
|
24
|
-
declare const
|
|
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: Schema.String;
|
|
34
24
|
/**
|
|
35
|
-
* @
|
|
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
|
-
* @
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const value = 'SGVsbG8=';
|
|
31
|
+
* ```;
|
|
38
32
|
*/
|
|
39
|
-
declare class
|
|
40
|
-
interface PeppolAmountEncoded extends Schema.Codec.Encoded<typeof PeppolAmount> {}
|
|
33
|
+
declare class PeppolBase64 extends PeppolBase64_base {}
|
|
41
34
|
//#endregion
|
|
42
|
-
//#region src/schemas/
|
|
43
|
-
declare const
|
|
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 {}
|
|
35
|
+
//#region src/schemas/values/mime-codes-schema.d.ts
|
|
36
|
+
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
37
|
/**
|
|
125
|
-
* @
|
|
38
|
+
* @description A MIME media type from the PEPPOL MIME code list.
|
|
126
39
|
*
|
|
127
|
-
* @
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* 'text/csv';
|
|
43
|
+
* ```;
|
|
44
|
+
*
|
|
45
|
+
* @validations
|
|
46
|
+
* - PEPPOL-EN16931-CL001: Attachment (MIME) type MUST come from the allowed list.
|
|
47
|
+
*
|
|
48
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/MimeCode/
|
|
49
|
+
* @see {@link mimeCodesKeys}
|
|
128
50
|
*/
|
|
129
|
-
declare
|
|
130
|
-
type PeppolAllowanceCharge = Schema.Schema.Type<typeof peppolAllowanceChargeSchema>;
|
|
131
|
-
type PeppolAllowanceChargeEncoded = Schema.Codec.Encoded<typeof peppolAllowanceChargeSchema>;
|
|
51
|
+
declare class PeppolMimeCode extends PeppolMimeCode_base {}
|
|
132
52
|
//#endregion
|
|
133
53
|
//#region src/schemas/fields/peppol-binary-object-schema.d.ts
|
|
134
54
|
declare const PeppolBinaryObject_base: OpaqueSchema<PeppolBinaryObject, Schema.Struct<{
|
|
@@ -142,7 +62,7 @@ declare const PeppolBinaryObject_base: OpaqueSchema<PeppolBinaryObject, Schema.S
|
|
|
142
62
|
*
|
|
143
63
|
* @name `#text` (Base64 content)
|
|
144
64
|
*/
|
|
145
|
-
readonly content: Schema.Union<readonly [
|
|
65
|
+
readonly content: Schema.Union<readonly [typeof PeppolBase64, Schema.String]>;
|
|
146
66
|
/**
|
|
147
67
|
* @description The mime code of the attached document.
|
|
148
68
|
*
|
|
@@ -153,7 +73,7 @@ declare const PeppolBinaryObject_base: OpaqueSchema<PeppolBinaryObject, Schema.S
|
|
|
153
73
|
*
|
|
154
74
|
* @name `@mimeCode`
|
|
155
75
|
*/
|
|
156
|
-
readonly mimeCode:
|
|
76
|
+
readonly mimeCode: typeof PeppolMimeCode;
|
|
157
77
|
/**
|
|
158
78
|
* @description The file name of the attached document.
|
|
159
79
|
*
|
|
@@ -167,12 +87,35 @@ declare const PeppolBinaryObject_base: OpaqueSchema<PeppolBinaryObject, Schema.S
|
|
|
167
87
|
readonly filename: Schema.String;
|
|
168
88
|
}>>;
|
|
169
89
|
/**
|
|
90
|
+
* @description An attached document embedded in the Invoice as a Base64 encoded binary object, together with its MIME type and file name. Wraps the
|
|
91
|
+
* `cbc:EmbeddedDocumentBinaryObject` element.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* { content: 'aHR0cHM6Ly90ZXN0LXZlZmEuZGlmaS5uby9wZXBwb2xiaXM=', mimeCode: 'text/csv', filename: 'Hours - spent.csv' }
|
|
96
|
+
* ```;
|
|
97
|
+
*
|
|
170
98
|
* @summary Binary object for attachments
|
|
171
99
|
*
|
|
172
100
|
* @name cbc:EmbeddedDocumentBinaryObject (+ @mimeCode, @filename)
|
|
173
101
|
*/
|
|
174
102
|
declare class PeppolBinaryObject extends PeppolBinaryObject_base {}
|
|
175
103
|
//#endregion
|
|
104
|
+
//#region src/schemas/values/additional-document-reference-code-schema.d.ts
|
|
105
|
+
declare const PeppolAdditionalDocumentReferenceCode_base: OpaqueSchema<PeppolAdditionalDocumentReferenceCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolAdditionalDocumentReferenceCode">>;
|
|
106
|
+
/**
|
|
107
|
+
* @description An additional document reference code from the PEPPOL subset of UNCL 1153 (invoiced object identifier scheme).
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```ts
|
|
111
|
+
* 'AAA';
|
|
112
|
+
* ```;
|
|
113
|
+
*
|
|
114
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1153/
|
|
115
|
+
* @see {@link additionalDocumentReferenceCodesKeys}
|
|
116
|
+
*/
|
|
117
|
+
declare class PeppolAdditionalDocumentReferenceCode extends PeppolAdditionalDocumentReferenceCode_base {}
|
|
118
|
+
//#endregion
|
|
176
119
|
//#region src/schemas/fields/peppol-additional-document-reference-schema.d.ts
|
|
177
120
|
declare const PeppolAttachmentExternalReference_base: OpaqueSchema<PeppolAttachmentExternalReference, Schema.Struct<{
|
|
178
121
|
/**
|
|
@@ -188,6 +131,17 @@ declare const PeppolAttachmentExternalReference_base: OpaqueSchema<PeppolAttachm
|
|
|
188
131
|
*/
|
|
189
132
|
readonly uri: Schema.String;
|
|
190
133
|
}>>;
|
|
134
|
+
/**
|
|
135
|
+
* @description A reference to a supporting document that is stored outside the Invoice, identified by a URI. Wraps the `cac:ExternalReference` element of an
|
|
136
|
+
* attachment group.
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```ts
|
|
140
|
+
* { uri: 'http://www.example.com/index.html' }
|
|
141
|
+
* ```;
|
|
142
|
+
*
|
|
143
|
+
* @see {@link PeppolAttachment}
|
|
144
|
+
*/
|
|
191
145
|
declare class PeppolAttachmentExternalReference extends PeppolAttachmentExternalReference_base {}
|
|
192
146
|
declare const PeppolAttachment_base: OpaqueSchema<PeppolAttachment, Schema.Struct<{
|
|
193
147
|
/**
|
|
@@ -210,26 +164,39 @@ declare const PeppolAttachment_base: OpaqueSchema<PeppolAttachment, Schema.Struc
|
|
|
210
164
|
*/
|
|
211
165
|
readonly externalReference: Schema.optional<typeof PeppolAttachmentExternalReference>;
|
|
212
166
|
}>>;
|
|
167
|
+
/**
|
|
168
|
+
* @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`
|
|
169
|
+
* element of an additional supporting document.
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```ts
|
|
173
|
+
* {
|
|
174
|
+
* embeddedDocumentBinaryObject: {
|
|
175
|
+
* content: 'aHR0cHM6Ly90ZXN0LXZlZmEuZGlmaS5uby9wZXBwb2xiaXM=',
|
|
176
|
+
* mimeCode: 'text/csv',
|
|
177
|
+
* filename: 'Hours - spent.csv'
|
|
178
|
+
* }
|
|
179
|
+
* }
|
|
180
|
+
* ```;
|
|
181
|
+
*
|
|
182
|
+
* @see {@link PeppolAdditionalDocumentReference}
|
|
183
|
+
*/
|
|
213
184
|
declare class PeppolAttachment extends PeppolAttachment_base {}
|
|
214
185
|
declare const PeppolId_base: OpaqueSchema<PeppolId, Schema.Struct<{
|
|
215
|
-
/**
|
|
216
|
-
* @description An identifier for an object on which the invoice is based (with DocumentTypeCode=130), given by the Seller, the identifier for the supporting
|
|
217
|
-
* document or the project reference identifier (DocumentTypeCode=50).
|
|
218
|
-
*
|
|
219
|
-
* @summary Invoiced object identifier, Supporting document reference or project reference
|
|
220
|
-
*
|
|
221
|
-
* @name `#text`
|
|
222
|
-
*/
|
|
223
186
|
readonly id: Schema.String;
|
|
224
|
-
|
|
225
|
-
* @description The identification scheme identifier of the Invoiced object identifier.
|
|
226
|
-
*
|
|
227
|
-
* @summary Scheme identifier
|
|
228
|
-
*
|
|
229
|
-
* @name `@schemeID`
|
|
230
|
-
*/
|
|
231
|
-
readonly schemeId: Schema.optional<Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolAdditionalDocumentReferenceCode">>;
|
|
187
|
+
readonly schemeId: Schema.optional<typeof PeppolAdditionalDocumentReferenceCode>;
|
|
232
188
|
}>>;
|
|
189
|
+
/**
|
|
190
|
+
* @description The identifier of an additional supporting document, an invoiced object reference or a project reference, together with an optional identification
|
|
191
|
+
* scheme identifier.
|
|
192
|
+
*
|
|
193
|
+
* @example
|
|
194
|
+
* ```ts
|
|
195
|
+
* { id: '9873242' }
|
|
196
|
+
* ```;
|
|
197
|
+
*
|
|
198
|
+
* @see {@link PeppolAdditionalDocumentReference}
|
|
199
|
+
*/
|
|
233
200
|
declare class PeppolId extends PeppolId_base {}
|
|
234
201
|
declare const PeppolAdditionalDocumentReference_base: OpaqueSchema<PeppolAdditionalDocumentReference, Schema.Struct<{
|
|
235
202
|
readonly schemeId: Schema.optional<Schema.String>;
|
|
@@ -249,64 +216,383 @@ declare const PeppolAdditionalDocumentReference_base: OpaqueSchema<PeppolAdditio
|
|
|
249
216
|
*/
|
|
250
217
|
declare class PeppolAdditionalDocumentReference extends PeppolAdditionalDocumentReference_base {}
|
|
251
218
|
//#endregion
|
|
252
|
-
//#region src/schemas/
|
|
253
|
-
declare const
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
219
|
+
//#region src/schemas/values/currency-code-schema.d.ts
|
|
220
|
+
declare const PeppolCurrencyCode_base: OpaqueSchema<PeppolCurrencyCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolCurrencyCode">>;
|
|
221
|
+
/**
|
|
222
|
+
* @description An ISO 4217 currency code from the PEPPOL codelist.
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```ts
|
|
226
|
+
* 'AED';
|
|
227
|
+
* ```;
|
|
228
|
+
*
|
|
229
|
+
* @validations
|
|
230
|
+
* - PEPPOL-EN16931-CL007: Currency codes MUST be valid ISO 4217 codes.
|
|
231
|
+
*
|
|
232
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO4217/
|
|
233
|
+
* @see {@link currencyCodesKeys}
|
|
234
|
+
*/
|
|
235
|
+
declare class PeppolCurrencyCode extends PeppolCurrencyCode_base {}
|
|
236
|
+
/**
|
|
237
|
+
* @description An ISO 4217 currency code as defined by the PEPPOL subset.
|
|
238
|
+
*
|
|
239
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO4217/
|
|
240
|
+
*/
|
|
241
|
+
type PeppolCurrencyCodeEncoded = Schema.Codec.Encoded<typeof PeppolCurrencyCode>;
|
|
242
|
+
//#endregion
|
|
243
|
+
//#region src/schemas/fields/peppol-amount-schema.d.ts
|
|
244
|
+
declare const PeppolAmount_base: OpaqueSchema<PeppolAmount, Schema.Struct<{
|
|
265
245
|
/**
|
|
266
|
-
* @
|
|
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`
|
|
246
|
+
* @name \@currencyID
|
|
276
247
|
*/
|
|
277
|
-
readonly
|
|
278
|
-
}>>;
|
|
279
|
-
declare class PeppolInvoiceDocumentReference extends PeppolInvoiceDocumentReference_base {}
|
|
280
|
-
declare const PeppolBillingReference_base: OpaqueSchema<PeppolBillingReference, Schema.Struct<{
|
|
248
|
+
readonly currencyId: typeof PeppolCurrencyCode;
|
|
281
249
|
/**
|
|
282
|
-
* @
|
|
283
|
-
* inv123;
|
|
284
|
-
*
|
|
285
|
-
* @summary INVOICE DOCUMENT REFERENCE
|
|
286
|
-
*
|
|
287
|
-
* @name `cac:InvoiceDocumentReference`
|
|
250
|
+
* @name #text (value)
|
|
288
251
|
*/
|
|
289
|
-
readonly
|
|
252
|
+
readonly value: Schema.Finite;
|
|
290
253
|
}>>;
|
|
291
254
|
/**
|
|
292
|
-
* @
|
|
255
|
+
* @description A monetary amount paired with the currency it is expressed in. Wraps a `cbc:*` amount element whose `@currencyID` attribute names the currency and
|
|
256
|
+
* whose text is the value.
|
|
293
257
|
*
|
|
294
|
-
* @
|
|
258
|
+
* @example
|
|
259
|
+
* ```ts
|
|
260
|
+
* { currencyId: 'EUR', value: 4500.0 }
|
|
261
|
+
* ```;
|
|
262
|
+
*
|
|
263
|
+
* @summary Monetary amount with mandatory currency
|
|
264
|
+
*
|
|
265
|
+
* @name cbc:* (+ @currencyID)
|
|
295
266
|
*/
|
|
296
|
-
declare class
|
|
267
|
+
declare class PeppolAmount extends PeppolAmount_base {}
|
|
268
|
+
/**
|
|
269
|
+
* @description Encoded form of {@link PeppolAmount} produced by the Effect Schema codec. Fields mirror the decoded shape.
|
|
270
|
+
*
|
|
271
|
+
* @see {@link PeppolAmount}
|
|
272
|
+
*/
|
|
273
|
+
interface PeppolAmountEncoded extends Schema.Codec.Encoded<typeof PeppolAmount> {}
|
|
297
274
|
//#endregion
|
|
298
|
-
//#region src/schemas/
|
|
299
|
-
declare const
|
|
275
|
+
//#region src/schemas/values/allowance-charge-reason-code-schema.d.ts
|
|
276
|
+
declare const PeppolAllowanceChargeReasonCode_base: OpaqueSchema<PeppolAllowanceChargeReasonCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolAllowanceChargeReasonCode">>;
|
|
277
|
+
/**
|
|
278
|
+
* @description An allowance or charge reason code from the PEPPOL subset of UNCL 5189 (D.16B).
|
|
279
|
+
*
|
|
280
|
+
* @example
|
|
281
|
+
* ```ts
|
|
282
|
+
* '41';
|
|
283
|
+
* ```;
|
|
284
|
+
*
|
|
285
|
+
* @validations
|
|
286
|
+
* - PEPPOL-EN16931-CL002: Document allowance reason code MUST be according to the subset of UNCL 5189 D.16B.
|
|
287
|
+
*
|
|
288
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5189/
|
|
289
|
+
* @see {@link allowanceChargeReasonCodesKeys}
|
|
290
|
+
*/
|
|
291
|
+
declare class PeppolAllowanceChargeReasonCode extends PeppolAllowanceChargeReasonCode_base {}
|
|
292
|
+
//#endregion
|
|
293
|
+
//#region src/schemas/values/charge-reason-code-schema.d.ts
|
|
294
|
+
declare const PeppolChargeReasonCode_base: OpaqueSchema<PeppolChargeReasonCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolChargeReasonCode">>;
|
|
295
|
+
/**
|
|
296
|
+
* @description A charge reason code from the PEPPOL subset of UNCL 7161 (D.16B).
|
|
297
|
+
*
|
|
298
|
+
* @example
|
|
299
|
+
* ```ts
|
|
300
|
+
* 'AA';
|
|
301
|
+
* ```;
|
|
302
|
+
*
|
|
303
|
+
* @validations
|
|
304
|
+
* - PEPPOL-EN16931-CL003: Charge reason code MUST be according to UNCL 7161 D.16B.
|
|
305
|
+
*
|
|
306
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL7161/
|
|
307
|
+
* @see {@link chargeReasonCodesKeys}
|
|
308
|
+
*/
|
|
309
|
+
declare class PeppolChargeReasonCode extends PeppolChargeReasonCode_base {}
|
|
310
|
+
//#endregion
|
|
311
|
+
//#region src/schemas/values/duty-tax-fee-category-schema.d.ts
|
|
312
|
+
declare const PeppolDutyTaxFeeCategoryCode_base: OpaqueSchema<PeppolDutyTaxFeeCategoryCode, Schema.brand<Schema.Literals<readonly ["AE", "E", "S", "Z", "G", "O", "K", "L", "M", "B"]>, "PeppolDutyTaxFeeCategoryCode">>;
|
|
313
|
+
/**
|
|
314
|
+
* @description A duty, tax or fee category code from the PEPPOL subset of UNCL 5305 (VAT category code).
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* ```ts
|
|
318
|
+
* 'AE';
|
|
319
|
+
* ```;
|
|
320
|
+
*
|
|
321
|
+
* @validations
|
|
322
|
+
* - BR-CL-17 / BR-CL-18: VAT category code MUST be a valid UNCL 5305 code.
|
|
323
|
+
*
|
|
324
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5305/
|
|
325
|
+
* @see {@link dutyTaxFeeCategoriesKeys}
|
|
326
|
+
*/
|
|
327
|
+
declare class PeppolDutyTaxFeeCategoryCode extends PeppolDutyTaxFeeCategoryCode_base {}
|
|
328
|
+
/**
|
|
329
|
+
* @description The encoded form of {@link PeppolDutyTaxFeeCategoryCode}, a string literal union.
|
|
330
|
+
*/
|
|
331
|
+
type PeppolDutyTaxFeeCategoryCodeEncoded = Schema.Codec.Encoded<typeof PeppolDutyTaxFeeCategoryCode>;
|
|
332
|
+
//#endregion
|
|
333
|
+
//#region src/schemas/fields/peppol-allowance-charge-schema.d.ts
|
|
334
|
+
declare const PeppolTaxCategoryTaxSchemeId_base: OpaqueSchema<PeppolTaxCategoryTaxSchemeId, Schema.Struct<{
|
|
300
335
|
/**
|
|
301
|
-
* @description
|
|
302
|
-
*
|
|
303
|
-
* @summary Address line 3
|
|
336
|
+
* @description Mandatory element. Use "VAT"
|
|
304
337
|
*
|
|
305
|
-
* @name `cbc:
|
|
338
|
+
* @name `cbc:ID`
|
|
306
339
|
*/
|
|
307
|
-
readonly
|
|
340
|
+
readonly id: Schema.withDecodingDefaultType<Schema.String, never>;
|
|
308
341
|
}>>;
|
|
309
|
-
|
|
342
|
+
/**
|
|
343
|
+
* @description The identifier of the tax scheme that applies to a document level allowance or charge. Defaults to `VAT` when the value is absent.
|
|
344
|
+
*
|
|
345
|
+
* @example
|
|
346
|
+
* ```ts
|
|
347
|
+
* { id: 'VAT' }
|
|
348
|
+
* ```;
|
|
349
|
+
*
|
|
350
|
+
* @see {@link PeppolTaxCategory}
|
|
351
|
+
*/
|
|
352
|
+
declare class PeppolTaxCategoryTaxSchemeId extends PeppolTaxCategoryTaxSchemeId_base {}
|
|
353
|
+
declare const BaseAllowanceCharge_base: OpaqueSchema<BaseAllowanceCharge, Schema.Struct<{
|
|
354
|
+
readonly amount: typeof PeppolAmount;
|
|
355
|
+
readonly baseAmount: Schema.optional<typeof PeppolAmount>;
|
|
356
|
+
readonly chargeIndicator: Schema.Boolean;
|
|
357
|
+
readonly allowanceChargeReason: Schema.optional<Schema.String>;
|
|
358
|
+
readonly multiplierFactorNumeric: Schema.optional<Schema.Finite>;
|
|
359
|
+
/**
|
|
360
|
+
* @summary TAX CATEGORY
|
|
361
|
+
*
|
|
362
|
+
* @name cac:TaxCategory
|
|
363
|
+
*/
|
|
364
|
+
readonly taxCategory: Schema.optional<Schema.Struct<{
|
|
365
|
+
readonly id: typeof PeppolDutyTaxFeeCategoryCode;
|
|
366
|
+
readonly percent: Schema.optional<Schema.Finite>;
|
|
367
|
+
readonly taxSchemeId: typeof PeppolTaxCategoryTaxSchemeId;
|
|
368
|
+
}>>;
|
|
369
|
+
}>>;
|
|
370
|
+
/**
|
|
371
|
+
* @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
|
|
372
|
+
* the document level amount.
|
|
373
|
+
*
|
|
374
|
+
* @example
|
|
375
|
+
* ```ts
|
|
376
|
+
* {
|
|
377
|
+
* amount: { value: 25, currencyId: 'EUR' },
|
|
378
|
+
* chargeIndicator: true,
|
|
379
|
+
* allowanceChargeReason: 'Insurance',
|
|
380
|
+
* taxCategory: { id: 'S', percent: 25, taxSchemeId: { id: 'VAT' } }
|
|
381
|
+
* }
|
|
382
|
+
* ```;
|
|
383
|
+
*
|
|
384
|
+
* @see {@link PeppolAllowanceCharge}
|
|
385
|
+
*/
|
|
386
|
+
declare class BaseAllowanceCharge extends BaseAllowanceCharge_base {}
|
|
387
|
+
declare const PeppolAllowance_base: OpaqueSchema<PeppolAllowance, Schema.Struct<{
|
|
388
|
+
readonly amount: typeof PeppolAmount;
|
|
389
|
+
readonly baseAmount: Schema.optional<typeof PeppolAmount>;
|
|
390
|
+
readonly allowanceChargeReason: Schema.optional<Schema.String>;
|
|
391
|
+
readonly multiplierFactorNumeric: Schema.optional<Schema.Finite>;
|
|
392
|
+
/**
|
|
393
|
+
* @summary TAX CATEGORY
|
|
394
|
+
*
|
|
395
|
+
* @name cac:TaxCategory
|
|
396
|
+
*/
|
|
397
|
+
readonly taxCategory: Schema.optional<Schema.Struct<{
|
|
398
|
+
readonly id: typeof PeppolDutyTaxFeeCategoryCode;
|
|
399
|
+
readonly percent: Schema.optional<Schema.Finite>;
|
|
400
|
+
readonly taxSchemeId: typeof PeppolTaxCategoryTaxSchemeId;
|
|
401
|
+
}>>;
|
|
402
|
+
/**
|
|
403
|
+
* @name cbc:AllowanceChargeReasonCode
|
|
404
|
+
*/
|
|
405
|
+
readonly allowanceChargeReasonCode: Schema.optional<typeof PeppolAllowanceChargeReasonCode>;
|
|
406
|
+
/**
|
|
407
|
+
* @name cbc:ChargeIndicator
|
|
408
|
+
*
|
|
409
|
+
* @value `false`
|
|
410
|
+
*/
|
|
411
|
+
readonly chargeIndicator: Schema.Literal<false>;
|
|
412
|
+
}>>;
|
|
413
|
+
/**
|
|
414
|
+
* @description A document level allowance, marked by a `cbc:ChargeIndicator` of `false`. Adds an allowance reason code to the shared document level allowance and
|
|
415
|
+
* charge fields.
|
|
416
|
+
*
|
|
417
|
+
* @example
|
|
418
|
+
* ```ts
|
|
419
|
+
* { amount: { value: 200, currencyId: 'EUR' }, chargeIndicator: false, allowanceChargeReasonCode: '95' }
|
|
420
|
+
* ```;
|
|
421
|
+
*
|
|
422
|
+
* @see {@link PeppolAllowanceCharge}
|
|
423
|
+
*/
|
|
424
|
+
declare class PeppolAllowance extends PeppolAllowance_base {}
|
|
425
|
+
declare const PeppolCharge_base: OpaqueSchema<PeppolCharge, Schema.Struct<{
|
|
426
|
+
readonly amount: typeof PeppolAmount;
|
|
427
|
+
readonly baseAmount: Schema.optional<typeof PeppolAmount>;
|
|
428
|
+
readonly allowanceChargeReason: Schema.optional<Schema.String>;
|
|
429
|
+
readonly multiplierFactorNumeric: Schema.optional<Schema.Finite>;
|
|
430
|
+
/**
|
|
431
|
+
* @summary TAX CATEGORY
|
|
432
|
+
*
|
|
433
|
+
* @name cac:TaxCategory
|
|
434
|
+
*/
|
|
435
|
+
readonly taxCategory: Schema.optional<Schema.Struct<{
|
|
436
|
+
readonly id: typeof PeppolDutyTaxFeeCategoryCode;
|
|
437
|
+
readonly percent: Schema.optional<Schema.Finite>;
|
|
438
|
+
readonly taxSchemeId: typeof PeppolTaxCategoryTaxSchemeId;
|
|
439
|
+
}>>;
|
|
440
|
+
/**
|
|
441
|
+
* @name cbc:AllowanceChargeReasonCode
|
|
442
|
+
*/
|
|
443
|
+
readonly allowanceChargeReasonCode: Schema.optional<typeof PeppolChargeReasonCode>;
|
|
444
|
+
/**
|
|
445
|
+
* @name cbc:ChargeIndicator
|
|
446
|
+
*
|
|
447
|
+
* @value `true`
|
|
448
|
+
*/
|
|
449
|
+
readonly chargeIndicator: Schema.Literal<true>;
|
|
450
|
+
}>>;
|
|
451
|
+
/**
|
|
452
|
+
* @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
|
|
453
|
+
* fields.
|
|
454
|
+
*
|
|
455
|
+
* @example
|
|
456
|
+
* ```ts
|
|
457
|
+
* { amount: { value: 25, currencyId: 'EUR' }, chargeIndicator: true, allowanceChargeReasonCode: 'AA' }
|
|
458
|
+
* ```;
|
|
459
|
+
*
|
|
460
|
+
* @see {@link PeppolAllowanceCharge}
|
|
461
|
+
*/
|
|
462
|
+
declare class PeppolCharge extends PeppolCharge_base {}
|
|
463
|
+
declare const PeppolAllowanceCharge_base: Schema.Union<readonly [typeof PeppolAllowance, typeof PeppolCharge]>;
|
|
464
|
+
/**
|
|
465
|
+
* @description A document level allowance or charge, selected by the `cbc:ChargeIndicator` value: `false` selects an allowance, `true` selects a charge.
|
|
466
|
+
*
|
|
467
|
+
* @summary Allowance/Charge
|
|
468
|
+
*
|
|
469
|
+
* @name cac:AllowanceCharge
|
|
470
|
+
*/
|
|
471
|
+
declare class PeppolAllowanceCharge extends PeppolAllowanceCharge_base {}
|
|
472
|
+
/**
|
|
473
|
+
* @description Encoded form of {@link PeppolAllowanceCharge} produced by the Effect Schema codec.
|
|
474
|
+
*
|
|
475
|
+
* @see {@link PeppolAllowanceCharge}
|
|
476
|
+
*/
|
|
477
|
+
type PeppolAllowanceChargeEncoded = Schema.Codec.Encoded<typeof PeppolAllowanceCharge>;
|
|
478
|
+
//#endregion
|
|
479
|
+
//#region src/schemas/fields/peppol-billing-reference-schema.d.ts
|
|
480
|
+
declare const PeppolInvoiceDocumentReference_base: OpaqueSchema<PeppolInvoiceDocumentReference, Schema.Struct<{
|
|
481
|
+
/**
|
|
482
|
+
* @description The identification of an Invoice that was previously sent by the seller.
|
|
483
|
+
*
|
|
484
|
+
* @example
|
|
485
|
+
* `inv123`;
|
|
486
|
+
*
|
|
487
|
+
* @summary Preceding invoice number
|
|
488
|
+
*
|
|
489
|
+
* @name `cbc:ID`
|
|
490
|
+
*/
|
|
491
|
+
readonly id: Schema.String;
|
|
492
|
+
/**
|
|
493
|
+
* @description The date when the preceding invoice was issued. Shall be provided in case the preceding invoice identifier is not unique.
|
|
494
|
+
*
|
|
495
|
+
* @example
|
|
496
|
+
* `2017-09-15`;
|
|
497
|
+
*
|
|
498
|
+
* @summary Preceding invoice issue date
|
|
499
|
+
*
|
|
500
|
+
* @format `YYYY-MM-DD`
|
|
501
|
+
*
|
|
502
|
+
* @name `cbc:IssueDate`
|
|
503
|
+
*/
|
|
504
|
+
readonly issueDate: Schema.optional<typeof PeppolIsoDateString>;
|
|
505
|
+
}>>;
|
|
506
|
+
/**
|
|
507
|
+
* @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
|
|
508
|
+
* issue date. Wraps the `cac:InvoiceDocumentReference` element.
|
|
509
|
+
*
|
|
510
|
+
* @example
|
|
511
|
+
* ```ts
|
|
512
|
+
* { id: 'inv123', issueDate: '2017-09-15' }
|
|
513
|
+
* ```;
|
|
514
|
+
*
|
|
515
|
+
* @see {@link PeppolBillingReference}
|
|
516
|
+
*/
|
|
517
|
+
declare class PeppolInvoiceDocumentReference extends PeppolInvoiceDocumentReference_base {}
|
|
518
|
+
declare const PeppolBillingReference_base: OpaqueSchema<PeppolBillingReference, Schema.Struct<{
|
|
519
|
+
/**
|
|
520
|
+
* @example
|
|
521
|
+
* inv123;
|
|
522
|
+
*
|
|
523
|
+
* @summary INVOICE DOCUMENT REFERENCE
|
|
524
|
+
*
|
|
525
|
+
* @name `cac:InvoiceDocumentReference`
|
|
526
|
+
*/
|
|
527
|
+
readonly invoiceDocumentReference: typeof PeppolInvoiceDocumentReference;
|
|
528
|
+
}>>;
|
|
529
|
+
/**
|
|
530
|
+
* @description A reference to a preceding Invoice, used when the Invoice corrects or replaces an earlier one. Wraps the `cac:BillingReference` element.
|
|
531
|
+
*
|
|
532
|
+
* @summary PRECEDING INVOICE REFERENCE (0..n)
|
|
533
|
+
*
|
|
534
|
+
* @name cac:BillingReference
|
|
535
|
+
*/
|
|
536
|
+
declare class PeppolBillingReference extends PeppolBillingReference_base {}
|
|
537
|
+
//#endregion
|
|
538
|
+
//#region src/schemas/values/icd-codes-schema.d.ts
|
|
539
|
+
declare const PeppolIcdCode_base: OpaqueSchema<PeppolIcdCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolIcdCode">>;
|
|
540
|
+
/**
|
|
541
|
+
* @description An ISO 6523 ICD code from the PEPPOL codelist.
|
|
542
|
+
*
|
|
543
|
+
* @example
|
|
544
|
+
* ```ts
|
|
545
|
+
* '0002';
|
|
546
|
+
* ```;
|
|
547
|
+
*
|
|
548
|
+
* @validations
|
|
549
|
+
* - BR-CL-10 / BR-CL-11 / BR-CL-21: Identifier scheme MUST be a valid ISO 6523 ICD code.
|
|
550
|
+
*
|
|
551
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ICD/
|
|
552
|
+
* @see {@link icdCodesKeys}
|
|
553
|
+
*/
|
|
554
|
+
declare class PeppolIcdCode extends PeppolIcdCode_base {}
|
|
555
|
+
//#endregion
|
|
556
|
+
//#region src/schemas/values/peppol-country-code-schema.d.ts
|
|
557
|
+
declare const PeppolCountryCodeValue_base: Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolCountryCodeValue">;
|
|
558
|
+
/**
|
|
559
|
+
* @description A two character ISO 3166-1 alpha-2 country code from the PEPPOL codelist. The literal union enforces the length.
|
|
560
|
+
*
|
|
561
|
+
* @example
|
|
562
|
+
* ```ts
|
|
563
|
+
* 'AD';
|
|
564
|
+
* ```;
|
|
565
|
+
*
|
|
566
|
+
* @validations
|
|
567
|
+
* - BR-CL-14 / BR-CL-15: Country code MUST be a valid ISO 3166-1 alpha-2 code.
|
|
568
|
+
*
|
|
569
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/ISO3166/
|
|
570
|
+
* @see {@link countryCodesKeys}
|
|
571
|
+
*/
|
|
572
|
+
declare class PeppolCountryCodeValue extends PeppolCountryCodeValue_base {}
|
|
573
|
+
//#endregion
|
|
574
|
+
//#region src/schemas/fields/peppol-address-schema.d.ts
|
|
575
|
+
declare const PeppolAddressLine_base: OpaqueSchema<PeppolAddressLine, Schema.Struct<{
|
|
576
|
+
/**
|
|
577
|
+
* @description An additional address line in an address that can be used to give further details supplementing the main line.
|
|
578
|
+
*
|
|
579
|
+
* @summary Address line 3
|
|
580
|
+
*
|
|
581
|
+
* @name `cbc:Line`
|
|
582
|
+
*/
|
|
583
|
+
readonly line: Schema.String;
|
|
584
|
+
}>>;
|
|
585
|
+
/**
|
|
586
|
+
* @description An additional address line that supplements the main address line. Wraps the `cac:AddressLine` element, whose `cbc:Line` value carries the text.
|
|
587
|
+
*
|
|
588
|
+
* @example
|
|
589
|
+
* ```ts
|
|
590
|
+
* { line: 'Building 23' }
|
|
591
|
+
* ```;
|
|
592
|
+
*
|
|
593
|
+
* @see {@link PeppolAddress}
|
|
594
|
+
*/
|
|
595
|
+
declare class PeppolAddressLine extends PeppolAddressLine_base {}
|
|
310
596
|
declare const PeppolCountryCode_base: OpaqueSchema<PeppolCountryCode, Schema.Struct<{
|
|
311
597
|
/**
|
|
312
598
|
* @description A code that identifies the country.
|
|
@@ -318,8 +604,18 @@ declare const PeppolCountryCode_base: OpaqueSchema<PeppolCountryCode, Schema.Str
|
|
|
318
604
|
*
|
|
319
605
|
* @name `cbc:IdentificationCode`
|
|
320
606
|
*/
|
|
321
|
-
readonly identificationCode:
|
|
607
|
+
readonly identificationCode: typeof PeppolCountryCodeValue;
|
|
322
608
|
}>>;
|
|
609
|
+
/**
|
|
610
|
+
* @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`.
|
|
611
|
+
*
|
|
612
|
+
* @example
|
|
613
|
+
* ```ts
|
|
614
|
+
* { identificationCode: 'GB' }
|
|
615
|
+
* ```;
|
|
616
|
+
*
|
|
617
|
+
* @see {@link PeppolAddress}
|
|
618
|
+
*/
|
|
323
619
|
declare class PeppolCountryCode extends PeppolCountryCode_base {}
|
|
324
620
|
declare const PeppolAddress_base: OpaqueSchema<PeppolAddress, Schema.Struct<{
|
|
325
621
|
/**
|
|
@@ -393,6 +689,9 @@ declare const PeppolAddress_base: OpaqueSchema<PeppolAddress, Schema.Struct<{
|
|
|
393
689
|
readonly addressLine: Schema.optional<typeof PeppolAddressLine>;
|
|
394
690
|
}>>;
|
|
395
691
|
/**
|
|
692
|
+
* @description The postal address of a party, used for the seller, buyer, payee and delivery locations. Carries the street lines, city, postal zone, country
|
|
693
|
+
* subdivision, country code and optional additional address lines.
|
|
694
|
+
*
|
|
396
695
|
* @summary Postal address
|
|
397
696
|
*
|
|
398
697
|
* @name `cac:PostalAddress`
|
|
@@ -410,6 +709,16 @@ declare const PeppolDeliveryPartyPartyName_base: OpaqueSchema<PeppolDeliveryPart
|
|
|
410
709
|
*/
|
|
411
710
|
readonly name: Schema.String;
|
|
412
711
|
}>>;
|
|
712
|
+
/**
|
|
713
|
+
* @description The name of the party to which the goods and services are delivered. Wraps the `cac:PartyName` element of the delivery party.
|
|
714
|
+
*
|
|
715
|
+
* @example
|
|
716
|
+
* ```ts
|
|
717
|
+
* { name: 'Delivery party Name' }
|
|
718
|
+
* ```;
|
|
719
|
+
*
|
|
720
|
+
* @see {@link PeppolDeliveryParty}
|
|
721
|
+
*/
|
|
413
722
|
declare class PeppolDeliveryPartyPartyName extends PeppolDeliveryPartyPartyName_base {}
|
|
414
723
|
declare const PeppolDeliveryParty_base: OpaqueSchema<PeppolDeliveryParty, Schema.Struct<{
|
|
415
724
|
/**
|
|
@@ -419,6 +728,16 @@ declare const PeppolDeliveryParty_base: OpaqueSchema<PeppolDeliveryParty, Schema
|
|
|
419
728
|
*/
|
|
420
729
|
readonly partyName: typeof PeppolDeliveryPartyPartyName;
|
|
421
730
|
}>>;
|
|
731
|
+
/**
|
|
732
|
+
* @description The party to which the goods and services are delivered, when it differs from the Buyer. Wraps the `cac:DeliveryParty` element.
|
|
733
|
+
*
|
|
734
|
+
* @example
|
|
735
|
+
* ```ts
|
|
736
|
+
* { partyName: { name: 'Delivery party Name' } }
|
|
737
|
+
* ```;
|
|
738
|
+
*
|
|
739
|
+
* @see {@link PeppolDelivery}
|
|
740
|
+
*/
|
|
422
741
|
declare class PeppolDeliveryParty extends PeppolDeliveryParty_base {}
|
|
423
742
|
declare const PeppolDeliveryLocation_base: OpaqueSchema<PeppolDeliveryLocation, Schema.Struct<{
|
|
424
743
|
/**
|
|
@@ -433,7 +752,7 @@ declare const PeppolDeliveryLocation_base: OpaqueSchema<PeppolDeliveryLocation,
|
|
|
433
752
|
*/
|
|
434
753
|
readonly id: Schema.optional<Schema.Struct<{
|
|
435
754
|
readonly id: Schema.String;
|
|
436
|
-
readonly schemeId: Schema.optional<
|
|
755
|
+
readonly schemeId: Schema.optional<typeof PeppolIcdCode>;
|
|
437
756
|
}>>;
|
|
438
757
|
/**
|
|
439
758
|
* @description A groupd of business terms providing infomation about the address to which goods and services invoiced were or are delivered.
|
|
@@ -444,6 +763,17 @@ declare const PeppolDeliveryLocation_base: OpaqueSchema<PeppolDeliveryLocation,
|
|
|
444
763
|
*/
|
|
445
764
|
readonly address: Schema.optional<typeof PeppolAddress>;
|
|
446
765
|
}>>;
|
|
766
|
+
/**
|
|
767
|
+
* @description The location at which the goods and services are delivered, identified by an identifier and an optional address. Wraps the `cac:DeliveryLocation`
|
|
768
|
+
* element.
|
|
769
|
+
*
|
|
770
|
+
* @example
|
|
771
|
+
* ```ts
|
|
772
|
+
* { id: { id: '9483759475923478', schemeId: '0088' }, address: { cityName: 'Stockholm', countryCode: { identificationCode: 'SE' } } }
|
|
773
|
+
* ```;
|
|
774
|
+
*
|
|
775
|
+
* @see {@link PeppolDelivery}
|
|
776
|
+
*/
|
|
447
777
|
declare class PeppolDeliveryLocation extends PeppolDeliveryLocation_base {}
|
|
448
778
|
declare const PeppolDelivery_base: OpaqueSchema<PeppolDelivery, Schema.Struct<{
|
|
449
779
|
/**
|
|
@@ -470,13 +800,42 @@ declare const PeppolDelivery_base: OpaqueSchema<PeppolDelivery, Schema.Struct<{
|
|
|
470
800
|
*/
|
|
471
801
|
readonly deliveryParty: Schema.optional<typeof PeppolDeliveryParty>;
|
|
472
802
|
}>>;
|
|
803
|
+
/**
|
|
804
|
+
* @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
|
|
805
|
+
* `cac:Delivery` element.
|
|
806
|
+
*
|
|
807
|
+
* @example
|
|
808
|
+
* ```ts
|
|
809
|
+
* { actualDeliveryDate: '2017-11-01', deliveryLocation: { id: { id: '9483759475923478' } } }
|
|
810
|
+
* ```;
|
|
811
|
+
*
|
|
812
|
+
* @see {@link PeppolDeliveryLocation}
|
|
813
|
+
*/
|
|
473
814
|
declare class PeppolDelivery extends PeppolDelivery_base {}
|
|
474
815
|
//#endregion
|
|
816
|
+
//#region src/schemas/values/vat-date-code-schema.d.ts
|
|
817
|
+
declare const PeppolVatDateCode_base: OpaqueSchema<PeppolVatDateCode, Schema.Literals<readonly ["3", "35", "432"]>>;
|
|
818
|
+
/**
|
|
819
|
+
* @description A VAT date code from the PEPPOL subset of UNCL 2005 (invoice period description code).
|
|
820
|
+
*
|
|
821
|
+
* @example
|
|
822
|
+
* ```ts
|
|
823
|
+
* '3';
|
|
824
|
+
* ```;
|
|
825
|
+
*
|
|
826
|
+
* @validations
|
|
827
|
+
* - PEPPOL-EN16931-CL006: Invoice period description code must be according to UNCL 2005 D.16B.
|
|
828
|
+
*
|
|
829
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL2005/
|
|
830
|
+
* @see {@link vatDateCodesKeys}
|
|
831
|
+
*/
|
|
832
|
+
declare class PeppolVatDateCode extends PeppolVatDateCode_base {}
|
|
833
|
+
//#endregion
|
|
475
834
|
//#region src/schemas/fields/peppol-invoice-period-schema.d.ts
|
|
476
835
|
declare const PeppolInvoicePeriod_base: OpaqueSchema<PeppolInvoicePeriod, Schema.Struct<{
|
|
477
836
|
readonly endDate: Schema.optional<typeof PeppolIsoDateString>;
|
|
478
837
|
readonly startDate: Schema.optional<typeof PeppolIsoDateString>;
|
|
479
|
-
readonly descriptionCode: Schema.optional<
|
|
838
|
+
readonly descriptionCode: Schema.optional<typeof PeppolVatDateCode>;
|
|
480
839
|
}>>;
|
|
481
840
|
/**
|
|
482
841
|
* @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 +999,8 @@ declare const PeppolOrderReference_base: OpaqueSchema<PeppolOrderReference, Sche
|
|
|
640
999
|
readonly salesOrderId: Schema.optional<Schema.String>;
|
|
641
1000
|
}>>;
|
|
642
1001
|
/**
|
|
1002
|
+
* @description A reference to the purchase order or sales order that the invoice relates to.
|
|
1003
|
+
*
|
|
643
1004
|
* @summary ORDER AND SALES ORDER REFERENCE
|
|
644
1005
|
*
|
|
645
1006
|
* @name cac:OrderReference
|
|
@@ -661,6 +1022,17 @@ declare const PeppolContact_base: OpaqueSchema<PeppolContact, Schema.Struct<{
|
|
|
661
1022
|
*/
|
|
662
1023
|
readonly telephone: Schema.optional<Schema.String>;
|
|
663
1024
|
}>>;
|
|
1025
|
+
/**
|
|
1026
|
+
* @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,
|
|
1027
|
+
* telephone number and electronic mail address.
|
|
1028
|
+
*
|
|
1029
|
+
* @example
|
|
1030
|
+
* ```ts
|
|
1031
|
+
* { name: 'Lisa Johnson', telephone: '23434234', electronicMail: 'lj@buyer.se' }
|
|
1032
|
+
* ```;
|
|
1033
|
+
*
|
|
1034
|
+
* @see {@link PeppolPartySchema}
|
|
1035
|
+
*/
|
|
664
1036
|
declare class PeppolContact extends PeppolContact_base {}
|
|
665
1037
|
//#endregion
|
|
666
1038
|
//#region src/schemas/fields/peppol-identifier-schema.d.ts
|
|
@@ -675,6 +1047,14 @@ declare const PeppolIdentifier_base: OpaqueSchema<PeppolIdentifier, Schema.Struc
|
|
|
675
1047
|
readonly schemeId: Schema.optional<Schema.String>;
|
|
676
1048
|
}>>;
|
|
677
1049
|
/**
|
|
1050
|
+
* @description A generic identifier paired with an optional identification scheme identifier. Wraps a `cbc:ID` element and its optional `@schemeID` attribute, and
|
|
1051
|
+
* is reused across document references.
|
|
1052
|
+
*
|
|
1053
|
+
* @example
|
|
1054
|
+
* ```ts
|
|
1055
|
+
* { id: '99887766', schemeId: '0088' }
|
|
1056
|
+
* ```;
|
|
1057
|
+
*
|
|
678
1058
|
* @summary Identifier with optional scheme
|
|
679
1059
|
*
|
|
680
1060
|
* @name `cbc:ID (+ optional @schemeID)`
|
|
@@ -682,7 +1062,7 @@ declare const PeppolIdentifier_base: OpaqueSchema<PeppolIdentifier, Schema.Struc
|
|
|
682
1062
|
declare class PeppolIdentifier extends PeppolIdentifier_base {}
|
|
683
1063
|
//#endregion
|
|
684
1064
|
//#region src/schemas/fields/peppol-party-legal-entity-schema.d.ts
|
|
685
|
-
declare const PeppolPartyLegalEntity_base
|
|
1065
|
+
declare const PeppolPartyLegalEntity_base: OpaqueSchema<PeppolPartyLegalEntity, Schema.Struct<{
|
|
686
1066
|
/**
|
|
687
1067
|
* @example
|
|
688
1068
|
* 987654321;
|
|
@@ -705,11 +1085,20 @@ declare const PeppolPartyLegalEntity_base$1: OpaqueSchema<PeppolPartyLegalEntity
|
|
|
705
1085
|
*/
|
|
706
1086
|
readonly registrationName: Schema.String;
|
|
707
1087
|
}>>;
|
|
708
|
-
|
|
709
|
-
|
|
1088
|
+
/**
|
|
1089
|
+
* @description The legal entity details of a party, including the registered name and optional company identifiers.
|
|
1090
|
+
*
|
|
1091
|
+
* @example
|
|
1092
|
+
* ```ts
|
|
1093
|
+
* { registrationName: 'SupplierOfficialName Ltd', companyId: { id: 'GB983294' } }
|
|
1094
|
+
* ```;
|
|
1095
|
+
*
|
|
1096
|
+
* @see {@link PeppolPartySchema}
|
|
1097
|
+
*/
|
|
1098
|
+
declare class PeppolPartyLegalEntity extends PeppolPartyLegalEntity_base {}
|
|
710
1099
|
//#endregion
|
|
711
1100
|
//#region src/schemas/fields/peppol-party-tax-scheme-schema.d.ts
|
|
712
|
-
declare const
|
|
1101
|
+
declare const PeppolPartyTaxSchemeId_base: OpaqueSchema<PeppolPartyTaxSchemeId, Schema.Struct<{
|
|
713
1102
|
/**
|
|
714
1103
|
* @description Mandatory element. For Seller VAT identifier (BT-31), use value “VAT”, for the seller tax registration identifier (BT-32), use != "VAT"
|
|
715
1104
|
*
|
|
@@ -717,7 +1106,7 @@ declare const PeppolTaxSchemeId_base$1: OpaqueSchema<PeppolTaxSchemeId$1, Schema
|
|
|
717
1106
|
*/
|
|
718
1107
|
readonly id: Schema.withDecodingDefaultType<Schema.String, never>;
|
|
719
1108
|
}>>;
|
|
720
|
-
declare class
|
|
1109
|
+
declare class PeppolPartyTaxSchemeId extends PeppolPartyTaxSchemeId_base {}
|
|
721
1110
|
declare const PeppolPartyTaxScheme_base: OpaqueSchema<PeppolPartyTaxScheme, Schema.Struct<{
|
|
722
1111
|
/**
|
|
723
1112
|
* @description The Seller's VAT identifier (also known as Seller VAT identification number) or the local identification (defined by the Seller’s address) of
|
|
@@ -735,16 +1124,35 @@ declare const PeppolPartyTaxScheme_base: OpaqueSchema<PeppolPartyTaxScheme, Sche
|
|
|
735
1124
|
*
|
|
736
1125
|
* @name `cac:TaxScheme`
|
|
737
1126
|
*/
|
|
738
|
-
readonly taxSchemeId: typeof
|
|
1127
|
+
readonly taxSchemeId: typeof PeppolPartyTaxSchemeId;
|
|
739
1128
|
}>>;
|
|
740
1129
|
/**
|
|
1130
|
+
* @description The Seller tax registration details, combining a tax identifier such as a VAT number with the tax scheme.
|
|
1131
|
+
*
|
|
741
1132
|
* @name cac:PartyTaxScheme (0..2)
|
|
742
1133
|
*/
|
|
743
1134
|
declare class PeppolPartyTaxScheme extends PeppolPartyTaxScheme_base {}
|
|
744
|
-
|
|
1135
|
+
//#endregion
|
|
1136
|
+
//#region src/schemas/values/electronic-codes-schema.d.ts
|
|
1137
|
+
declare const PeppolElectronicAddressCode_base: OpaqueSchema<PeppolElectronicAddressCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolElectronicAddressCode">>;
|
|
1138
|
+
/**
|
|
1139
|
+
* @description An electronic address scheme (EAS) code from the PEPPOL Electronic Address Identifier Scheme codelist.
|
|
1140
|
+
*
|
|
1141
|
+
* @example
|
|
1142
|
+
* ```ts
|
|
1143
|
+
* '0002';
|
|
1144
|
+
* ```;
|
|
1145
|
+
*
|
|
1146
|
+
* @validations
|
|
1147
|
+
* - PEPPOL-EN16931-CL008: Electronic address identifier scheme MUST be from the codelist "Electronic Address Identifier Scheme".
|
|
1148
|
+
*
|
|
1149
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/
|
|
1150
|
+
* @see {@link electronicAddressCodesKeys}
|
|
1151
|
+
*/
|
|
1152
|
+
declare class PeppolElectronicAddressCode extends PeppolElectronicAddressCode_base {}
|
|
745
1153
|
//#endregion
|
|
746
1154
|
//#region src/schemas/fields/peppol-party-base-schema.d.ts
|
|
747
|
-
declare const PeppolPartyName_base
|
|
1155
|
+
declare const PeppolPartyName_base: OpaqueSchema<PeppolPartyName, Schema.Struct<{
|
|
748
1156
|
/**
|
|
749
1157
|
* @description A name by which the Buyer/Seller is known, other than Buyer/Seller name (also known as Business name).
|
|
750
1158
|
*
|
|
@@ -755,25 +1163,55 @@ declare const PeppolPartyName_base$1: OpaqueSchema<PeppolPartyName$1, Schema.Str
|
|
|
755
1163
|
*/
|
|
756
1164
|
readonly name: Schema.String;
|
|
757
1165
|
}>>;
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
1166
|
+
/**
|
|
1167
|
+
* @description A name by which the Buyer or Seller is known, other than its registered name.
|
|
1168
|
+
*
|
|
1169
|
+
* @example
|
|
1170
|
+
* ```ts
|
|
1171
|
+
* { name: 'SupplierTradingName Ltd.' }
|
|
1172
|
+
* ```;
|
|
1173
|
+
*
|
|
1174
|
+
* @see {@link PeppolPartySchema}
|
|
1175
|
+
*/
|
|
1176
|
+
declare class PeppolPartyName extends PeppolPartyName_base {}
|
|
1177
|
+
declare const PeppolPartyIdentification_base: OpaqueSchema<PeppolPartyIdentification, Schema.Struct<{
|
|
1178
|
+
/**
|
|
1179
|
+
* @description An identifier of the Buyer/seller.
|
|
1180
|
+
*
|
|
763
1181
|
* @summary Buyer/seller identifier
|
|
764
1182
|
*
|
|
765
1183
|
* @name `cbc:ID`
|
|
766
1184
|
*/
|
|
767
1185
|
readonly id: Schema.Struct<{
|
|
768
1186
|
readonly id: Schema.String;
|
|
769
|
-
readonly schemeId: Schema.optional<
|
|
1187
|
+
readonly schemeId: Schema.optional<typeof PeppolIcdCode>;
|
|
770
1188
|
}>;
|
|
771
1189
|
}>>;
|
|
772
|
-
|
|
1190
|
+
/**
|
|
1191
|
+
* @description An identifier of the Buyer or Seller, with an optional identification scheme.
|
|
1192
|
+
*
|
|
1193
|
+
* @example
|
|
1194
|
+
* ```ts
|
|
1195
|
+
* { id: { id: '99887766', schemeId: '0088' } }
|
|
1196
|
+
* ```;
|
|
1197
|
+
*
|
|
1198
|
+
* @see {@link PeppolPartySchema}
|
|
1199
|
+
*/
|
|
1200
|
+
declare class PeppolPartyIdentification extends PeppolPartyIdentification_base {}
|
|
773
1201
|
declare const PeppolPartyEndpointId_base: OpaqueSchema<PeppolPartyEndpointId, Schema.Struct<{
|
|
774
1202
|
readonly id: Schema.String;
|
|
775
|
-
readonly schemeId:
|
|
1203
|
+
readonly schemeId: typeof PeppolElectronicAddressCode;
|
|
776
1204
|
}>>;
|
|
1205
|
+
/**
|
|
1206
|
+
* @description The Buyer or Seller electronic address to which the application level response to the invoice may be delivered.
|
|
1207
|
+
*
|
|
1208
|
+
* @example
|
|
1209
|
+
* ```ts
|
|
1210
|
+
* { id: '9482348239847239874', schemeId: '0088' }
|
|
1211
|
+
* ```;
|
|
1212
|
+
*
|
|
1213
|
+
* @see {@link PeppolPartySchema}
|
|
1214
|
+
*/
|
|
777
1215
|
declare class PeppolPartyEndpointId extends PeppolPartyEndpointId_base {}
|
|
778
1216
|
declare const PeppolPartySchema_base: OpaqueSchema<PeppolPartySchema, Schema.Struct<{
|
|
779
1217
|
/**
|
|
@@ -795,7 +1233,7 @@ declare const PeppolPartySchema_base: OpaqueSchema<PeppolPartySchema, Schema.Str
|
|
|
795
1233
|
*
|
|
796
1234
|
* @name `cac:PartyIdentification`
|
|
797
1235
|
*/
|
|
798
|
-
readonly partyIdentification: Schema.optional<typeof PeppolPartyIdentification
|
|
1236
|
+
readonly partyIdentification: Schema.optional<typeof PeppolPartyIdentification>;
|
|
799
1237
|
/**
|
|
800
1238
|
* @example
|
|
801
1239
|
* Seller Business Name AS
|
|
@@ -804,7 +1242,7 @@ declare const PeppolPartySchema_base: OpaqueSchema<PeppolPartySchema, Schema.Str
|
|
|
804
1242
|
*
|
|
805
1243
|
* @name cac:PartyName
|
|
806
1244
|
*/
|
|
807
|
-
readonly partyName: Schema.optional<typeof PeppolPartyName
|
|
1245
|
+
readonly partyName: Schema.optional<typeof PeppolPartyName>;
|
|
808
1246
|
/**
|
|
809
1247
|
* @name cac:PostalAddress
|
|
810
1248
|
*/
|
|
@@ -821,13 +1259,15 @@ declare const PeppolPartySchema_base: OpaqueSchema<PeppolPartySchema, Schema.Str
|
|
|
821
1259
|
/**
|
|
822
1260
|
* @name cac:PartyLegalEntity
|
|
823
1261
|
*/
|
|
824
|
-
readonly partyLegalEntity: typeof PeppolPartyLegalEntity
|
|
1262
|
+
readonly partyLegalEntity: typeof PeppolPartyLegalEntity;
|
|
825
1263
|
/**
|
|
826
1264
|
* @name cac:Contact
|
|
827
1265
|
*/
|
|
828
1266
|
readonly contact: Schema.optional<typeof PeppolContact>;
|
|
829
1267
|
}>>;
|
|
830
1268
|
/**
|
|
1269
|
+
* @description The common party substructure shared by the supplier, customer, and other party roles.
|
|
1270
|
+
*
|
|
831
1271
|
* @summary Party common substructure
|
|
832
1272
|
*
|
|
833
1273
|
* @name cac:Party
|
|
@@ -835,11 +1275,11 @@ declare const PeppolPartySchema_base: OpaqueSchema<PeppolPartySchema, Schema.Str
|
|
|
835
1275
|
declare class PeppolPartySchema extends PeppolPartySchema_base {}
|
|
836
1276
|
//#endregion
|
|
837
1277
|
//#region src/schemas/fields/peppol-payee-party-schema.d.ts
|
|
838
|
-
declare const
|
|
1278
|
+
declare const PeppolPayeePartyName_base: OpaqueSchema<PeppolPayeePartyName, Schema.Struct<{
|
|
839
1279
|
readonly name: Schema.String;
|
|
840
1280
|
}>>;
|
|
841
|
-
declare class
|
|
842
|
-
declare const
|
|
1281
|
+
declare class PeppolPayeePartyName extends PeppolPayeePartyName_base {}
|
|
1282
|
+
declare const PeppolPayeePartyLegalEntity_base: OpaqueSchema<PeppolPayeePartyLegalEntity, Schema.Struct<{
|
|
843
1283
|
/**
|
|
844
1284
|
* @description An identifier issued by an official registrar that identifies the payee as a legal entity or person.
|
|
845
1285
|
*
|
|
@@ -852,11 +1292,11 @@ declare const PeppolPartyLegalEntity_base: OpaqueSchema<PeppolPartyLegalEntity,
|
|
|
852
1292
|
*/
|
|
853
1293
|
readonly companyId: Schema.optional<Schema.Struct<{
|
|
854
1294
|
readonly id: Schema.String;
|
|
855
|
-
readonly schemeId: Schema.optional<
|
|
1295
|
+
readonly schemeId: Schema.optional<typeof PeppolIcdCode>;
|
|
856
1296
|
}>>;
|
|
857
1297
|
}>>;
|
|
858
|
-
declare class
|
|
859
|
-
declare const
|
|
1298
|
+
declare class PeppolPayeePartyLegalEntity extends PeppolPayeePartyLegalEntity_base {}
|
|
1299
|
+
declare const PeppolPayeePartyIdentification_base: OpaqueSchema<PeppolPayeePartyIdentification, Schema.Struct<{
|
|
860
1300
|
/**
|
|
861
1301
|
* @description This element is used for both the identification of the Payee, or the unique banking reference identifier of Payee (assigned by the Payee
|
|
862
1302
|
* bank.) For payee identification use ICD code list, for SEPA bank assigned creditor reference, use SEPA.
|
|
@@ -870,20 +1310,20 @@ declare const PeppolPartyIdentification_base: OpaqueSchema<PeppolPartyIdentifica
|
|
|
870
1310
|
readonly schemeId: Schema.optional<Schema.String>;
|
|
871
1311
|
}>>;
|
|
872
1312
|
}>>;
|
|
873
|
-
declare class
|
|
1313
|
+
declare class PeppolPayeePartyIdentification extends PeppolPayeePartyIdentification_base {}
|
|
874
1314
|
declare const PeppolPayeeParty_base: OpaqueSchema<PeppolPayeeParty, Schema.Struct<{
|
|
875
1315
|
/**
|
|
876
1316
|
* @summary PARTY IDENTIFICATION
|
|
877
1317
|
*
|
|
878
1318
|
* @name `cac:PartyIdentification`
|
|
879
1319
|
*/
|
|
880
|
-
readonly partyIdentification: Schema.optional<typeof
|
|
1320
|
+
readonly partyIdentification: Schema.optional<typeof PeppolPayeePartyIdentification>;
|
|
881
1321
|
/**
|
|
882
1322
|
* @summary PARTY LEGAL ENTITY
|
|
883
1323
|
*
|
|
884
1324
|
* @name `cac:PartyLegalEntity`
|
|
885
1325
|
*/
|
|
886
|
-
readonly partyLegalEntity: Schema.optional<typeof
|
|
1326
|
+
readonly partyLegalEntity: Schema.optional<typeof PeppolPayeePartyLegalEntity>;
|
|
887
1327
|
/**
|
|
888
1328
|
* @description The name of the payee.
|
|
889
1329
|
*
|
|
@@ -894,7 +1334,7 @@ declare const PeppolPayeeParty_base: OpaqueSchema<PeppolPayeeParty, Schema.Struc
|
|
|
894
1334
|
*
|
|
895
1335
|
* @name `cac:PartyName`
|
|
896
1336
|
*/
|
|
897
|
-
readonly partyName: typeof
|
|
1337
|
+
readonly partyName: typeof PeppolPayeePartyName;
|
|
898
1338
|
}>>;
|
|
899
1339
|
/**
|
|
900
1340
|
* @description A group of business terms providing information about the Payee, i.e. the role that received the payment. Shall be used wwhen the payee is
|
|
@@ -906,6 +1346,24 @@ declare const PeppolPayeeParty_base: OpaqueSchema<PeppolPayeeParty, Schema.Struc
|
|
|
906
1346
|
*/
|
|
907
1347
|
declare class PeppolPayeeParty extends PeppolPayeeParty_base {}
|
|
908
1348
|
//#endregion
|
|
1349
|
+
//#region src/schemas/values/payment-means-code-schema.d.ts
|
|
1350
|
+
declare const PeppolPaymentMeansCodeValue_base: OpaqueSchema<PeppolPaymentMeansCodeValue, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolPaymentMeansCodeValue">>;
|
|
1351
|
+
/**
|
|
1352
|
+
* @description A payment means code from the PEPPOL subset of UNCL 4461.
|
|
1353
|
+
*
|
|
1354
|
+
* @example
|
|
1355
|
+
* ```ts
|
|
1356
|
+
* '1';
|
|
1357
|
+
* ```;
|
|
1358
|
+
*
|
|
1359
|
+
* @validations
|
|
1360
|
+
* - BR-CL-16: Payment means code MUST be a valid UNCL 4461 code.
|
|
1361
|
+
*
|
|
1362
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4461/
|
|
1363
|
+
* @see {@link paymentMeansCodesKeys}
|
|
1364
|
+
*/
|
|
1365
|
+
declare class PeppolPaymentMeansCodeValue extends PeppolPaymentMeansCodeValue_base {}
|
|
1366
|
+
//#endregion
|
|
909
1367
|
//#region src/schemas/fields/peppol-payment-means-schema.d.ts
|
|
910
1368
|
declare const PeppolPaymentMandatePayerFinancialAccountId_base: OpaqueSchema<PeppolPaymentMandatePayerFinancialAccountId, Schema.Struct<{
|
|
911
1369
|
/**
|
|
@@ -920,6 +1378,16 @@ declare const PeppolPaymentMandatePayerFinancialAccountId_base: OpaqueSchema<Pep
|
|
|
920
1378
|
*/
|
|
921
1379
|
readonly id: Schema.String;
|
|
922
1380
|
}>>;
|
|
1381
|
+
/**
|
|
1382
|
+
* @description The account to be debited by a direct debit.
|
|
1383
|
+
*
|
|
1384
|
+
* @example
|
|
1385
|
+
* ```ts
|
|
1386
|
+
* { id: '12345676543' }
|
|
1387
|
+
* ```;
|
|
1388
|
+
*
|
|
1389
|
+
* @see {@link PeppolPaymentMandate}
|
|
1390
|
+
*/
|
|
923
1391
|
declare class PeppolPaymentMandatePayerFinancialAccountId extends PeppolPaymentMandatePayerFinancialAccountId_base {}
|
|
924
1392
|
declare const PeppolPaymentMandate_base: OpaqueSchema<PeppolPaymentMandate, Schema.Struct<{
|
|
925
1393
|
/**
|
|
@@ -942,6 +1410,16 @@ declare const PeppolPaymentMandate_base: OpaqueSchema<PeppolPaymentMandate, Sche
|
|
|
942
1410
|
*/
|
|
943
1411
|
readonly payerFinancialAccountId: Schema.optional<typeof PeppolPaymentMandatePayerFinancialAccountId>;
|
|
944
1412
|
}>>;
|
|
1413
|
+
/**
|
|
1414
|
+
* @description A group of business terms to specify a direct debit, including the mandate reference and the debited account.
|
|
1415
|
+
*
|
|
1416
|
+
* @example
|
|
1417
|
+
* ```ts
|
|
1418
|
+
* { id: 'MandateReference', payerFinancialAccountId: { id: '12345676543' } }
|
|
1419
|
+
* ```;
|
|
1420
|
+
*
|
|
1421
|
+
* @see {@link PeppolPaymentMeans}
|
|
1422
|
+
*/
|
|
945
1423
|
declare class PeppolPaymentMandate extends PeppolPaymentMandate_base {}
|
|
946
1424
|
declare const PeppolPayeeFinancialAccountFinancialInstitutionBranch_base: OpaqueSchema<PeppolPayeeFinancialAccountFinancialInstitutionBranch, Schema.Struct<{
|
|
947
1425
|
/**
|
|
@@ -957,6 +1435,16 @@ declare const PeppolPayeeFinancialAccountFinancialInstitutionBranch_base: Opaque
|
|
|
957
1435
|
*/
|
|
958
1436
|
readonly id: Schema.String;
|
|
959
1437
|
}>>;
|
|
1438
|
+
/**
|
|
1439
|
+
* @description The payment service provider where the payee payment account is held, such as a BIC or national clearing code.
|
|
1440
|
+
*
|
|
1441
|
+
* @example
|
|
1442
|
+
* ```ts
|
|
1443
|
+
* { id: 'BIC324098' }
|
|
1444
|
+
* ```;
|
|
1445
|
+
*
|
|
1446
|
+
* @see {@link PeppolPayeeFinancialAccount}
|
|
1447
|
+
*/
|
|
960
1448
|
declare class PeppolPayeeFinancialAccountFinancialInstitutionBranch extends PeppolPayeeFinancialAccountFinancialInstitutionBranch_base {}
|
|
961
1449
|
declare const PeppolPayeeFinancialAccount_base: OpaqueSchema<PeppolPayeeFinancialAccount, Schema.Struct<{
|
|
962
1450
|
/**
|
|
@@ -988,6 +1476,16 @@ declare const PeppolPayeeFinancialAccount_base: OpaqueSchema<PeppolPayeeFinancia
|
|
|
988
1476
|
*/
|
|
989
1477
|
readonly name: Schema.optional<Schema.String>;
|
|
990
1478
|
}>>;
|
|
1479
|
+
/**
|
|
1480
|
+
* @description The payment account to which payment should be made, such as an IBAN or BBAN, including the financial institution branch.
|
|
1481
|
+
*
|
|
1482
|
+
* @example
|
|
1483
|
+
* ```ts
|
|
1484
|
+
* { id: 'IBAN32423940', name: 'AccountName' }
|
|
1485
|
+
* ```;
|
|
1486
|
+
*
|
|
1487
|
+
* @see {@link PeppolPaymentMeans}
|
|
1488
|
+
*/
|
|
991
1489
|
declare class PeppolPayeeFinancialAccount extends PeppolPayeeFinancialAccount_base {}
|
|
992
1490
|
declare const PeppolCardAccount_base: OpaqueSchema<PeppolCardAccount, Schema.Struct<{
|
|
993
1491
|
/**
|
|
@@ -1017,6 +1515,16 @@ declare const PeppolCardAccount_base: OpaqueSchema<PeppolCardAccount, Schema.Str
|
|
|
1017
1515
|
*/
|
|
1018
1516
|
readonly primaryAccountNumberId: Schema.String;
|
|
1019
1517
|
}>>;
|
|
1518
|
+
/**
|
|
1519
|
+
* @description The card used for payment, including the card holder name and the primary account number.
|
|
1520
|
+
*
|
|
1521
|
+
* @example
|
|
1522
|
+
* ```ts
|
|
1523
|
+
* { networkId: 'VISA', primaryAccountNumberId: '1234' }
|
|
1524
|
+
* ```;
|
|
1525
|
+
*
|
|
1526
|
+
* @see {@link PeppolPaymentMeans}
|
|
1527
|
+
*/
|
|
1020
1528
|
declare class PeppolCardAccount extends PeppolCardAccount_base {}
|
|
1021
1529
|
declare const PeppolPaymentMeansCode_base: OpaqueSchema<PeppolPaymentMeansCode, Schema.Struct<{
|
|
1022
1530
|
/**
|
|
@@ -1029,7 +1537,7 @@ declare const PeppolPaymentMeansCode_base: OpaqueSchema<PeppolPaymentMeansCode,
|
|
|
1029
1537
|
*
|
|
1030
1538
|
* @name `#text`
|
|
1031
1539
|
*/
|
|
1032
|
-
readonly code:
|
|
1540
|
+
readonly code: typeof PeppolPaymentMeansCodeValue;
|
|
1033
1541
|
/**
|
|
1034
1542
|
* @description The means, expressed as text, for how a payment is expected to be or has been settled.
|
|
1035
1543
|
*
|
|
@@ -1042,6 +1550,16 @@ declare const PeppolPaymentMeansCode_base: OpaqueSchema<PeppolPaymentMeansCode,
|
|
|
1042
1550
|
*/
|
|
1043
1551
|
readonly name: Schema.optional<Schema.String>;
|
|
1044
1552
|
}>>;
|
|
1553
|
+
/**
|
|
1554
|
+
* @description The means by which a payment is expected to be or has been settled, expressed as a UNCL 4461 code and optional text.
|
|
1555
|
+
*
|
|
1556
|
+
* @example
|
|
1557
|
+
* ```ts
|
|
1558
|
+
* { code: '30', name: 'Credit transfer' }
|
|
1559
|
+
* ```;
|
|
1560
|
+
*
|
|
1561
|
+
* @see {@link PeppolPaymentMeans}
|
|
1562
|
+
*/
|
|
1045
1563
|
declare class PeppolPaymentMeansCode extends PeppolPaymentMeansCode_base {}
|
|
1046
1564
|
declare const PeppolPaymentMeans_base: OpaqueSchema<PeppolPaymentMeans, Schema.Struct<{
|
|
1047
1565
|
/**
|
|
@@ -1129,6 +1647,8 @@ declare const PeppolPaymentTerms_base: OpaqueSchema<PeppolPaymentTerms, Schema.S
|
|
|
1129
1647
|
readonly note: Schema.String;
|
|
1130
1648
|
}>>;
|
|
1131
1649
|
/**
|
|
1650
|
+
* @description A textual description of the payment terms that apply to the amount due for payment.
|
|
1651
|
+
*
|
|
1132
1652
|
* @summary PAYMENT TERMS
|
|
1133
1653
|
*
|
|
1134
1654
|
* @name cac:PaymentTerms
|
|
@@ -1148,12 +1668,252 @@ declare const PeppolTaxRepresentative_base: OpaqueSchema<PeppolTaxRepresentative
|
|
|
1148
1668
|
readonly partyTaxScheme: typeof PeppolPartyTaxScheme;
|
|
1149
1669
|
}>>;
|
|
1150
1670
|
/**
|
|
1671
|
+
* @description The party acting as the Seller tax representative, including its name, postal address, and tax scheme.
|
|
1672
|
+
*
|
|
1151
1673
|
* @summary SELLER TAX REPRESENTATIVE PARTY
|
|
1152
1674
|
*
|
|
1153
1675
|
* @name cac:TaxRepresentativeParty
|
|
1154
1676
|
*/
|
|
1155
1677
|
declare class PeppolTaxRepresentative extends PeppolTaxRepresentative_base {}
|
|
1156
|
-
|
|
1678
|
+
//#endregion
|
|
1679
|
+
//#region src/schemas/values/application-response-type-code-schema.d.ts
|
|
1680
|
+
declare const PeppolApplicationResponseTypeCode_base: OpaqueSchema<PeppolApplicationResponseTypeCode, Schema.Literals<readonly ["AB", "AP", "RE"]>>;
|
|
1681
|
+
/**
|
|
1682
|
+
* @description An application response type code from the PEPPOL subset of UNCL 4343.
|
|
1683
|
+
*
|
|
1684
|
+
* @example
|
|
1685
|
+
* ```ts
|
|
1686
|
+
* 'AB';
|
|
1687
|
+
* ```;
|
|
1688
|
+
*
|
|
1689
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4343/
|
|
1690
|
+
* @see {@link applicationResponseTypeCodesKeys}
|
|
1691
|
+
*/
|
|
1692
|
+
declare class PeppolApplicationResponseTypeCode extends PeppolApplicationResponseTypeCode_base {}
|
|
1693
|
+
//#endregion
|
|
1694
|
+
//#region src/schemas/values/credit-note-type-code-schema.d.ts
|
|
1695
|
+
declare const PeppolCreditNoteTypeCode_base: OpaqueSchema<PeppolCreditNoteTypeCode, Schema.Literals<readonly ["81", "83", "381", "396", "532"]>>;
|
|
1696
|
+
/**
|
|
1697
|
+
* @description A credit note type code from the PEPPOL subset of UNCL 1001 (credit note).
|
|
1698
|
+
*
|
|
1699
|
+
* @example
|
|
1700
|
+
* ```ts
|
|
1701
|
+
* '81';
|
|
1702
|
+
* ```;
|
|
1703
|
+
*
|
|
1704
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001-cn/
|
|
1705
|
+
* @see {@link creditNoteTypeCodesKeys}
|
|
1706
|
+
*/
|
|
1707
|
+
declare class PeppolCreditNoteTypeCode extends PeppolCreditNoteTypeCode_base {}
|
|
1708
|
+
//#endregion
|
|
1709
|
+
//#region src/schemas/values/peppol-document-type-code-schema.d.ts
|
|
1710
|
+
declare const PeppolDocumentTypeCode_base: OpaqueSchema<PeppolDocumentTypeCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolDocumentTypeCode">>;
|
|
1711
|
+
/**
|
|
1712
|
+
* @description A document type code from the PEPPOL subset of UNCL 1001.
|
|
1713
|
+
*
|
|
1714
|
+
* @example
|
|
1715
|
+
* ```ts
|
|
1716
|
+
* '1';
|
|
1717
|
+
* ```;
|
|
1718
|
+
*
|
|
1719
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001/
|
|
1720
|
+
* @see {@link documentTypeCodesKeys}
|
|
1721
|
+
*/
|
|
1722
|
+
declare class PeppolDocumentTypeCode extends PeppolDocumentTypeCode_base {}
|
|
1723
|
+
//#endregion
|
|
1724
|
+
//#region src/schemas/values/peppol-document-type-schema.d.ts
|
|
1725
|
+
declare const PeppolDocumentType_base: OpaqueSchema<PeppolDocumentType, Schema.TemplateLiteral<readonly [Schema.Literals<readonly ["busdox-docid-qns", "peppol-doctype-wildcard"]>, Schema.Literal<"::">, Schema.String]>>;
|
|
1726
|
+
/**
|
|
1727
|
+
* @description A full PEPPOL document type identifier in `<scheme>::<value>` form. The scheme prefix and value must both be known.
|
|
1728
|
+
*
|
|
1729
|
+
* @see {@link documentTypesTable}
|
|
1730
|
+
*/
|
|
1731
|
+
declare class PeppolDocumentType extends PeppolDocumentType_base {}
|
|
1732
|
+
//#endregion
|
|
1733
|
+
//#region src/schemas/values/document-type-schemes-schema.d.ts
|
|
1734
|
+
declare const PeppolDocumentTypeScheme_base: OpaqueSchema<PeppolDocumentTypeScheme, Schema.Literals<[string, ...string[]]>>;
|
|
1735
|
+
/**
|
|
1736
|
+
* @description A PEPPOL document type scheme, for example `busdox-docid-qns` or `peppol-doctype-wildcard`.
|
|
1737
|
+
*
|
|
1738
|
+
* @example
|
|
1739
|
+
* ```ts
|
|
1740
|
+
* 'busdox-docid-qns';
|
|
1741
|
+
* ```;
|
|
1742
|
+
*
|
|
1743
|
+
* @see {@link documentTypesScheme}
|
|
1744
|
+
*/
|
|
1745
|
+
declare class PeppolDocumentTypeScheme extends PeppolDocumentTypeScheme_base {}
|
|
1746
|
+
//#endregion
|
|
1747
|
+
//#region src/schemas/values/document-type-values-schema.d.ts
|
|
1748
|
+
declare const PeppolDocumentTypeValue_base: OpaqueSchema<PeppolDocumentTypeValue, Schema.String>;
|
|
1749
|
+
/**
|
|
1750
|
+
* @description The value part of a PEPPOL document type identifier (the portion after the scheme prefix) from the known document type table.
|
|
1751
|
+
*
|
|
1752
|
+
* @see {@link documentTypesTable}
|
|
1753
|
+
*/
|
|
1754
|
+
declare class PeppolDocumentTypeValue extends PeppolDocumentTypeValue_base {}
|
|
1755
|
+
//#endregion
|
|
1756
|
+
//#region src/schemas/values/invoice-status-code-schema.d.ts
|
|
1757
|
+
declare const PeppolInvoiceStatusCodes_base: OpaqueSchema<PeppolInvoiceStatusCodes, Schema.brand<Schema.Literals<readonly ["AB", "AP", "RE", "IP", "UQ", "CA", "PD"]>, "PeppolInvoiceStatusCodes">>;
|
|
1758
|
+
/**
|
|
1759
|
+
* @description An invoice status code from the PEPPOL subset of UNCL 4343 (T111).
|
|
1760
|
+
*
|
|
1761
|
+
* @example
|
|
1762
|
+
* ```ts
|
|
1763
|
+
* 'AB';
|
|
1764
|
+
* ```;
|
|
1765
|
+
*
|
|
1766
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL4343-T111/
|
|
1767
|
+
* @see {@link invoiceStatusCodesKeys}
|
|
1768
|
+
*/
|
|
1769
|
+
declare class PeppolInvoiceStatusCodes extends PeppolInvoiceStatusCodes_base {}
|
|
1770
|
+
//#endregion
|
|
1771
|
+
//#region src/schemas/values/invoice-type-code-schema.d.ts
|
|
1772
|
+
declare const PeppolInvoiceTypeCode_base: OpaqueSchema<PeppolInvoiceTypeCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolInvoiceTypeCode">>;
|
|
1773
|
+
/**
|
|
1774
|
+
* @description An invoice type code from the PEPPOL subset of UNCL 1001.
|
|
1775
|
+
*
|
|
1776
|
+
* @example
|
|
1777
|
+
* ```ts
|
|
1778
|
+
* '71';
|
|
1779
|
+
* ```;
|
|
1780
|
+
*
|
|
1781
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL1001-inv/
|
|
1782
|
+
* @see {@link invoiceTypeCodesKeys}
|
|
1783
|
+
*/
|
|
1784
|
+
declare class PeppolInvoiceTypeCode extends PeppolInvoiceTypeCode_base {}
|
|
1785
|
+
//#endregion
|
|
1786
|
+
//#region src/schemas/values/item-classification-codes-schema.d.ts
|
|
1787
|
+
declare const PeppolItemClassificationCode_base: OpaqueSchema<PeppolItemClassificationCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolItemClassificationCode">>;
|
|
1788
|
+
/**
|
|
1789
|
+
* @description An item classification code from the PEPPOL subset of UNCL 7143.
|
|
1790
|
+
*
|
|
1791
|
+
* @example
|
|
1792
|
+
* ```ts
|
|
1793
|
+
* 'AA';
|
|
1794
|
+
* ```;
|
|
1795
|
+
*
|
|
1796
|
+
* @validations
|
|
1797
|
+
* - BR-CL-13: Item classification scheme MUST be a valid UNTDID 7143 code.
|
|
1798
|
+
*
|
|
1799
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL7143/
|
|
1800
|
+
* @see {@link itemClassificationCodesKeys}
|
|
1801
|
+
*/
|
|
1802
|
+
declare class PeppolItemClassificationCode extends PeppolItemClassificationCode_base {}
|
|
1803
|
+
//#endregion
|
|
1804
|
+
//#region src/schemas/values/op-status-action-schema.d.ts
|
|
1805
|
+
declare const PeppolOpStatusAction_base: OpaqueSchema<PeppolOpStatusAction, Schema.brand<Schema.Literals<readonly ["NOA", "PIN", "NIN", "CNF", "CNP", "CNA", "OTH"]>, "PeppolOpStatusAction">>;
|
|
1806
|
+
/**
|
|
1807
|
+
* @description An OpenPeppol operation status action code from the OPStatusAction codelist.
|
|
1808
|
+
*
|
|
1809
|
+
* @example
|
|
1810
|
+
* ```ts
|
|
1811
|
+
* 'NOA';
|
|
1812
|
+
* ```;
|
|
1813
|
+
*
|
|
1814
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/OPStatusAction/
|
|
1815
|
+
* @see {@link opStatusActionKeys}
|
|
1816
|
+
*/
|
|
1817
|
+
declare class PeppolOpStatusAction extends PeppolOpStatusAction_base {}
|
|
1818
|
+
//#endregion
|
|
1819
|
+
//#region src/schemas/values/op-status-reason-schema.d.ts
|
|
1820
|
+
declare const PeppolOpStatusReason_base: OpaqueSchema<PeppolOpStatusReason, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolOpStatusReason">>;
|
|
1821
|
+
/**
|
|
1822
|
+
* @description An OpenPeppol operation status reason code from the OPStatusReason codelist.
|
|
1823
|
+
*
|
|
1824
|
+
* @example
|
|
1825
|
+
* ```ts
|
|
1826
|
+
* 'NON';
|
|
1827
|
+
* ```;
|
|
1828
|
+
*
|
|
1829
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/OPStatusReason/
|
|
1830
|
+
* @see {@link opStatusReasonKeys}
|
|
1831
|
+
*/
|
|
1832
|
+
declare class PeppolOpStatusReason extends PeppolOpStatusReason_base {}
|
|
1833
|
+
//#endregion
|
|
1834
|
+
//#region src/schemas/values/participant-identifier-code-schema.d.ts
|
|
1835
|
+
declare const PeppolParticipantIdentifierCode_base: OpaqueSchema<PeppolParticipantIdentifierCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolParticipantIdentifierCode">>;
|
|
1836
|
+
/**
|
|
1837
|
+
* @description A PEPPOL participant identifier scheme from the participant identifier schemes codelist.
|
|
1838
|
+
*
|
|
1839
|
+
* @example
|
|
1840
|
+
* ```ts
|
|
1841
|
+
* '0002';
|
|
1842
|
+
* ```;
|
|
1843
|
+
*
|
|
1844
|
+
* @see {@link participantIdentifierSchemesKeys}
|
|
1845
|
+
*/
|
|
1846
|
+
declare class PeppolParticipantIdentifierCode extends PeppolParticipantIdentifierCode_base {}
|
|
1847
|
+
//#endregion
|
|
1848
|
+
//#region src/schemas/values/peppol-process-schema.d.ts
|
|
1849
|
+
declare const PeppolProcess_base: OpaqueSchema<PeppolProcess, Schema.TemplateLiteral<readonly [Schema.Literals<readonly ["cenbii-procid-ubl", "oioubl-procid-ubl"]>, Schema.Literal<"::">, Schema.String]>>;
|
|
1850
|
+
/**
|
|
1851
|
+
* @description A full PEPPOL business process identifier in `<scheme>::<value>` form from the known processes table.
|
|
1852
|
+
*
|
|
1853
|
+
* @example
|
|
1854
|
+
* ```ts
|
|
1855
|
+
* 'cenbii-procid-ubl::urn:fdc:peppol.eu:2017:poacc:billing:01:1.0';
|
|
1856
|
+
* ```;
|
|
1857
|
+
*
|
|
1858
|
+
* @see {@link processes}
|
|
1859
|
+
*/
|
|
1860
|
+
declare class PeppolProcess extends PeppolProcess_base {}
|
|
1861
|
+
/**
|
|
1862
|
+
* @description A PEPPOL business process identifier key as defined by the processes codelist.
|
|
1863
|
+
*
|
|
1864
|
+
* @see {@link processes}
|
|
1865
|
+
*/
|
|
1866
|
+
type PeppolProcesses = Schema.Codec.Encoded<typeof PeppolProcess>;
|
|
1867
|
+
//#endregion
|
|
1868
|
+
//#region src/schemas/values/process-from-document-type-schema.d.ts
|
|
1869
|
+
/**
|
|
1870
|
+
* @description Validates a business process identifier (`<scheme>::<value>`) against the processes allowed for a given document type.
|
|
1871
|
+
*
|
|
1872
|
+
* @param documentType - The PEPPOL document type scheme whose allowed processes should be used.
|
|
1873
|
+
* @param error - The custom error message to use when validation fails. Defaults to `'invalid process type for document type'`.
|
|
1874
|
+
*
|
|
1875
|
+
* @returns An Effect schema that matches only processes allowed for the given document type.
|
|
1876
|
+
*
|
|
1877
|
+
* @see {@link PeppolProcess}
|
|
1878
|
+
* @see {@link documentTypesProcessIds}
|
|
1879
|
+
*/
|
|
1880
|
+
declare function processFromDocumentTypeSchema(documentType: PeppolDocumentType, error?: string): Schema.String | typeof PeppolProcess;
|
|
1881
|
+
//#endregion
|
|
1882
|
+
//#region src/schemas/values/quantity-unit-codes-schema.d.ts
|
|
1883
|
+
declare const PeppolQuantityUnitCode_base: OpaqueSchema<PeppolQuantityUnitCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolQuantityUnitCode">>;
|
|
1884
|
+
/**
|
|
1885
|
+
* @description A unit of measure code from the PEPPOL subset of UN/ECE Recommendation 20.
|
|
1886
|
+
*
|
|
1887
|
+
* @example
|
|
1888
|
+
* ```ts
|
|
1889
|
+
* '10';
|
|
1890
|
+
* ```;
|
|
1891
|
+
*
|
|
1892
|
+
* @validations
|
|
1893
|
+
* - BR-CL-23: Unit of measure code MUST be a valid UN/ECE Rec 20 code.
|
|
1894
|
+
*
|
|
1895
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/UNECERec20/
|
|
1896
|
+
* @see {@link quantityUnitCodesKeys}
|
|
1897
|
+
*/
|
|
1898
|
+
declare class PeppolQuantityUnitCode extends PeppolQuantityUnitCode_base {}
|
|
1899
|
+
//#endregion
|
|
1900
|
+
//#region src/schemas/values/vatex-code-schema.d.ts
|
|
1901
|
+
declare const PeppolVatexCode_base: OpaqueSchema<PeppolVatexCode, Schema.brand<Schema.Literals<[string, ...string[]]>, "PeppolVatexCode">>;
|
|
1902
|
+
/**
|
|
1903
|
+
* @description A VAT exemption reason code from the CEF VATEX codelist.
|
|
1904
|
+
*
|
|
1905
|
+
* @example
|
|
1906
|
+
* ```ts
|
|
1907
|
+
* 'VATEX-EU-79-C';
|
|
1908
|
+
* ```;
|
|
1909
|
+
*
|
|
1910
|
+
* @validations
|
|
1911
|
+
* - BR-CL-22: VAT exemption reason code MUST be a valid CEF VATEX code.
|
|
1912
|
+
*
|
|
1913
|
+
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/vatex/
|
|
1914
|
+
* @see {@link vatexCodesKeys}
|
|
1915
|
+
*/
|
|
1916
|
+
declare class PeppolVatexCode extends PeppolVatexCode_base {}
|
|
1157
1917
|
//#endregion
|
|
1158
1918
|
//#region src/schemas/fields/peppol-tax-category-schema.d.ts
|
|
1159
1919
|
declare const PeppolTaxSchemeId_base: OpaqueSchema<PeppolTaxSchemeId, Schema.Struct<{
|
|
@@ -1162,6 +1922,16 @@ declare const PeppolTaxSchemeId_base: OpaqueSchema<PeppolTaxSchemeId, Schema.Str
|
|
|
1162
1922
|
*/
|
|
1163
1923
|
readonly id: Schema.withDecodingDefaultType<Schema.String, never>;
|
|
1164
1924
|
}>>;
|
|
1925
|
+
/**
|
|
1926
|
+
* @description The tax scheme identifier for a tax category, defaulting to `VAT` when the element is absent.
|
|
1927
|
+
*
|
|
1928
|
+
* @example
|
|
1929
|
+
* ```ts
|
|
1930
|
+
* { id: 'VAT' }
|
|
1931
|
+
* ```;
|
|
1932
|
+
*
|
|
1933
|
+
* @see {@link PeppolTaxCategory}
|
|
1934
|
+
*/
|
|
1165
1935
|
declare class PeppolTaxSchemeId extends PeppolTaxSchemeId_base {}
|
|
1166
1936
|
declare const PeppolTaxCategory_base: OpaqueSchema<PeppolTaxCategory, Schema.Struct<{
|
|
1167
1937
|
/**
|
|
@@ -1171,7 +1941,7 @@ declare const PeppolTaxCategory_base: OpaqueSchema<PeppolTaxCategory, Schema.Str
|
|
|
1171
1941
|
*
|
|
1172
1942
|
* @name `cbc:ID`
|
|
1173
1943
|
*/
|
|
1174
|
-
readonly id:
|
|
1944
|
+
readonly id: typeof PeppolDutyTaxFeeCategoryCode;
|
|
1175
1945
|
/**
|
|
1176
1946
|
* @description The VAT rate, represented as percentage that applies to the invoiced item.
|
|
1177
1947
|
*
|
|
@@ -1198,7 +1968,7 @@ declare class PeppolTaxCategory extends PeppolTaxCategory_base {}
|
|
|
1198
1968
|
//#endregion
|
|
1199
1969
|
//#region src/schemas/fields/peppol-tax-subtotal-category-schema.d.ts
|
|
1200
1970
|
declare const PeppolTaxSubTotalCategory_base: OpaqueSchema<PeppolTaxSubTotalCategory, Schema.Struct<{
|
|
1201
|
-
readonly id:
|
|
1971
|
+
readonly id: typeof PeppolDutyTaxFeeCategoryCode;
|
|
1202
1972
|
readonly percent: Schema.optional<Schema.Finite>;
|
|
1203
1973
|
readonly taxSchemeId: typeof PeppolTaxSchemeId;
|
|
1204
1974
|
/**
|
|
@@ -1222,6 +1992,9 @@ declare const PeppolTaxSubTotalCategory_base: OpaqueSchema<PeppolTaxSubTotalCate
|
|
|
1222
1992
|
* @name cac:TaxCategory
|
|
1223
1993
|
*/
|
|
1224
1994
|
declare class PeppolTaxSubTotalCategory extends PeppolTaxSubTotalCategory_base {}
|
|
1995
|
+
/**
|
|
1996
|
+
* @description The encoded form of {@link PeppolTaxSubTotalCategory}, accepted by the decoder before branded code values are applied.
|
|
1997
|
+
*/
|
|
1225
1998
|
interface PeppolTaxSubTotalCategoryEncoded extends Schema.Codec.Encoded<typeof PeppolTaxSubTotalCategory> {}
|
|
1226
1999
|
//#endregion
|
|
1227
2000
|
//#region src/schemas/fields/peppol-tax-subtotal-schema.d.ts
|
|
@@ -1246,6 +2019,8 @@ declare const PeppolTaxSubTotal_base: OpaqueSchema<PeppolTaxSubTotal, Schema.Str
|
|
|
1246
2019
|
readonly taxableAmount: typeof PeppolAmount;
|
|
1247
2020
|
}>>;
|
|
1248
2021
|
/**
|
|
2022
|
+
* @description A VAT breakdown line for a single tax category, giving the taxable amount and the tax amount.
|
|
2023
|
+
*
|
|
1249
2024
|
* @summary VAT breakdown (TaxSubtotal)
|
|
1250
2025
|
*
|
|
1251
2026
|
* @name cac:TaxSubtotal
|
|
@@ -1253,7 +2028,7 @@ declare const PeppolTaxSubTotal_base: OpaqueSchema<PeppolTaxSubTotal, Schema.Str
|
|
|
1253
2028
|
declare class PeppolTaxSubTotal extends PeppolTaxSubTotal_base {}
|
|
1254
2029
|
//#endregion
|
|
1255
2030
|
//#region src/schemas/fields/peppol-tax-totals-base-schema.d.ts
|
|
1256
|
-
declare const
|
|
2031
|
+
declare const PeppolTaxTotal_base: OpaqueSchema<PeppolTaxTotal, Schema.Struct<{
|
|
1257
2032
|
/**
|
|
1258
2033
|
* @example
|
|
1259
2034
|
* 200;
|
|
@@ -1267,12 +2042,13 @@ declare const PeppolTaxTotalsBase_base: OpaqueSchema<PeppolTaxTotalsBase, Schema
|
|
|
1267
2042
|
readonly taxSubtotals: Schema.optional<Schema.$Array<typeof PeppolTaxSubTotal>>;
|
|
1268
2043
|
}>>;
|
|
1269
2044
|
/**
|
|
2045
|
+
* @description The total tax amount for the document, with an optional breakdown into tax subtotals.
|
|
2046
|
+
*
|
|
1270
2047
|
* @summary TAX TOTAL
|
|
1271
2048
|
*
|
|
1272
2049
|
* @name cac:TaxTotal (1..2)
|
|
1273
2050
|
*/
|
|
1274
|
-
declare class
|
|
1275
|
-
type PeppolTaxTotal = PeppolTaxTotalsBase;
|
|
2051
|
+
declare class PeppolTaxTotal extends PeppolTaxTotal_base {}
|
|
1276
2052
|
//#endregion
|
|
1277
2053
|
//#region src/schemas/peppol-billing-base-schema.d.ts
|
|
1278
2054
|
declare const PeppolContractDocumentReference_base: OpaqueSchema<PeppolContractDocumentReference, Schema.Struct<{
|
|
@@ -1288,6 +2064,16 @@ declare const PeppolContractDocumentReference_base: OpaqueSchema<PeppolContractD
|
|
|
1288
2064
|
*/
|
|
1289
2065
|
readonly id: Schema.String;
|
|
1290
2066
|
}>>;
|
|
2067
|
+
/**
|
|
2068
|
+
* @description Wraps the `cac:ContractDocumentReference` element: an identifier of a contract that the billing document references.
|
|
2069
|
+
*
|
|
2070
|
+
* @example
|
|
2071
|
+
* ```ts
|
|
2072
|
+
* { id: '123Contractref' }
|
|
2073
|
+
* ```;
|
|
2074
|
+
*
|
|
2075
|
+
* @see {@link PeppolBillingBase}
|
|
2076
|
+
*/
|
|
1291
2077
|
declare class PeppolContractDocumentReference extends PeppolContractDocumentReference_base {}
|
|
1292
2078
|
declare const PeppolOriginatorDocumentReference_base: OpaqueSchema<PeppolOriginatorDocumentReference, Schema.Struct<{
|
|
1293
2079
|
/**
|
|
@@ -1302,6 +2088,16 @@ declare const PeppolOriginatorDocumentReference_base: OpaqueSchema<PeppolOrigina
|
|
|
1302
2088
|
*/
|
|
1303
2089
|
readonly id: Schema.String;
|
|
1304
2090
|
}>>;
|
|
2091
|
+
/**
|
|
2092
|
+
* @description Wraps the `cac:OriginatorDocumentReference` element: the identification of the call for tender or lot the invoice relates to.
|
|
2093
|
+
*
|
|
2094
|
+
* @example
|
|
2095
|
+
* ```ts
|
|
2096
|
+
* { id: 'PPID-123' }
|
|
2097
|
+
* ```;
|
|
2098
|
+
*
|
|
2099
|
+
* @see {@link PeppolBillingBase}
|
|
2100
|
+
*/
|
|
1305
2101
|
declare class PeppolOriginatorDocumentReference extends PeppolOriginatorDocumentReference_base {}
|
|
1306
2102
|
declare const PeppolReceiptDocumentReference_base: OpaqueSchema<PeppolReceiptDocumentReference, Schema.Struct<{
|
|
1307
2103
|
/**
|
|
@@ -1316,6 +2112,16 @@ declare const PeppolReceiptDocumentReference_base: OpaqueSchema<PeppolReceiptDoc
|
|
|
1316
2112
|
*/
|
|
1317
2113
|
readonly id: Schema.String;
|
|
1318
2114
|
}>>;
|
|
2115
|
+
/**
|
|
2116
|
+
* @description Wraps the `cac:ReceiptDocumentReference` element: an identifier of a referenced receiving advice.
|
|
2117
|
+
*
|
|
2118
|
+
* @example
|
|
2119
|
+
* ```ts
|
|
2120
|
+
* { id: 'rec98' }
|
|
2121
|
+
* ```;
|
|
2122
|
+
*
|
|
2123
|
+
* @see {@link PeppolBillingBase}
|
|
2124
|
+
*/
|
|
1319
2125
|
declare class PeppolReceiptDocumentReference extends PeppolReceiptDocumentReference_base {}
|
|
1320
2126
|
declare const PeppolDespatchDocumentReference_base: OpaqueSchema<PeppolDespatchDocumentReference, Schema.Struct<{
|
|
1321
2127
|
/**
|
|
@@ -1330,6 +2136,16 @@ declare const PeppolDespatchDocumentReference_base: OpaqueSchema<PeppolDespatchD
|
|
|
1330
2136
|
*/
|
|
1331
2137
|
readonly id: Schema.String;
|
|
1332
2138
|
}>>;
|
|
2139
|
+
/**
|
|
2140
|
+
* @description Wraps the `cac:DespatchDocumentReference` element: an identifier of a referenced despatch advice.
|
|
2141
|
+
*
|
|
2142
|
+
* @example
|
|
2143
|
+
* ```ts
|
|
2144
|
+
* { id: 'desp98' }
|
|
2145
|
+
* ```;
|
|
2146
|
+
*
|
|
2147
|
+
* @see {@link PeppolBillingBase}
|
|
2148
|
+
*/
|
|
1333
2149
|
declare class PeppolDespatchDocumentReference extends PeppolDespatchDocumentReference_base {}
|
|
1334
2150
|
declare const PeppolBillingBase_base: OpaqueSchema<PeppolBillingBase, Schema.Struct<{
|
|
1335
2151
|
/**
|
|
@@ -1413,7 +2229,7 @@ declare const PeppolBillingBase_base: OpaqueSchema<PeppolBillingBase, Schema.Str
|
|
|
1413
2229
|
*
|
|
1414
2230
|
* @name `cbc:DocumentCurrencyCode`
|
|
1415
2231
|
*/
|
|
1416
|
-
readonly documentCurrencyCode:
|
|
2232
|
+
readonly documentCurrencyCode: typeof PeppolCurrencyCode;
|
|
1417
2233
|
/**
|
|
1418
2234
|
* @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
2235
|
* with the Invoice total VAT amount in accounting currency (BT-111), when the VAT accounting currency code differs from the Invoice currency
|
|
@@ -1426,7 +2242,7 @@ declare const PeppolBillingBase_base: OpaqueSchema<PeppolBillingBase, Schema.Str
|
|
|
1426
2242
|
*
|
|
1427
2243
|
* @name `cbc:TaxCurrencyCode`
|
|
1428
2244
|
*/
|
|
1429
|
-
readonly taxCurrencyCode: Schema.optional<
|
|
2245
|
+
readonly taxCurrencyCode: Schema.optional<typeof PeppolCurrencyCode>;
|
|
1430
2246
|
/**
|
|
1431
2247
|
* @description A textual value that specifies where to book the relevant data into the Buyer's financial accounts.
|
|
1432
2248
|
*
|
|
@@ -1566,7 +2382,7 @@ declare const PeppolBillingBase_base: OpaqueSchema<PeppolBillingBase, Schema.Str
|
|
|
1566
2382
|
*
|
|
1567
2383
|
* @name cac:AllowanceCharge
|
|
1568
2384
|
*/
|
|
1569
|
-
readonly allowanceCharges: Schema.optional<Schema.$Array<
|
|
2385
|
+
readonly allowanceCharges: Schema.optional<Schema.$Array<typeof PeppolAllowanceCharge>>;
|
|
1570
2386
|
/**
|
|
1571
2387
|
* @description When tax currency code is provided, two instances of the tax total must be present, but only one with tax subtotal.
|
|
1572
2388
|
*
|
|
@@ -1574,7 +2390,7 @@ declare const PeppolBillingBase_base: OpaqueSchema<PeppolBillingBase, Schema.Str
|
|
|
1574
2390
|
*
|
|
1575
2391
|
* @name cac:TaxTotal
|
|
1576
2392
|
*/
|
|
1577
|
-
readonly taxTotals: Schema.$Array<typeof
|
|
2393
|
+
readonly taxTotals: Schema.$Array<typeof PeppolTaxTotal>;
|
|
1578
2394
|
/**
|
|
1579
2395
|
* @summary DOCUMENT TOTALS
|
|
1580
2396
|
*
|
|
@@ -1585,8 +2401,8 @@ declare const PeppolBillingBase_base: OpaqueSchema<PeppolBillingBase, Schema.Str
|
|
|
1585
2401
|
/**
|
|
1586
2402
|
* @description Base schema for a billing document.
|
|
1587
2403
|
*
|
|
1588
|
-
* @see {@link
|
|
1589
|
-
* @see {@link
|
|
2404
|
+
* @see {@link PeppolCreditNote} - the credit note schema
|
|
2405
|
+
* @see {@link PeppolInvoice} - the invoice schema
|
|
1590
2406
|
*/
|
|
1591
2407
|
declare class PeppolBillingBase extends PeppolBillingBase_base {}
|
|
1592
2408
|
//#endregion
|
|
@@ -1604,6 +2420,17 @@ declare const BaseLineAllowanceCharge_base: OpaqueSchema<BaseLineAllowanceCharge
|
|
|
1604
2420
|
*/
|
|
1605
2421
|
readonly multiplierFactorNumeric: Schema.optional<Schema.Finite>;
|
|
1606
2422
|
}>>;
|
|
2423
|
+
/**
|
|
2424
|
+
* @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
|
|
2425
|
+
* the multiplier factor used to calculate the amount.
|
|
2426
|
+
*
|
|
2427
|
+
* @example
|
|
2428
|
+
* ```ts
|
|
2429
|
+
* { amount: { value: 200, currencyId: 'EUR' }, chargeIndicator: false, allowanceChargeReason: 'Discount' }
|
|
2430
|
+
* ```;
|
|
2431
|
+
*
|
|
2432
|
+
* @see {@link PeppolLineAllowanceCharge}
|
|
2433
|
+
*/
|
|
1607
2434
|
declare class BaseLineAllowanceCharge extends BaseLineAllowanceCharge_base {}
|
|
1608
2435
|
declare const PeppolLineAllowance_base: OpaqueSchema<PeppolLineAllowance, Schema.Struct<{
|
|
1609
2436
|
readonly amount: typeof PeppolAmount;
|
|
@@ -1619,7 +2446,7 @@ declare const PeppolLineAllowance_base: OpaqueSchema<PeppolLineAllowance, Schema
|
|
|
1619
2446
|
/**
|
|
1620
2447
|
* @name cbc:AllowanceChargeReasonCode
|
|
1621
2448
|
*/
|
|
1622
|
-
readonly allowanceChargeReasonCode: Schema.optional<
|
|
2449
|
+
readonly allowanceChargeReasonCode: Schema.optional<typeof PeppolAllowanceChargeReasonCode>;
|
|
1623
2450
|
/**
|
|
1624
2451
|
* @name cbc:ChargeIndicator
|
|
1625
2452
|
*
|
|
@@ -1627,6 +2454,17 @@ declare const PeppolLineAllowance_base: OpaqueSchema<PeppolLineAllowance, Schema
|
|
|
1627
2454
|
*/
|
|
1628
2455
|
readonly chargeIndicator: Schema.Literal<false>;
|
|
1629
2456
|
}>>;
|
|
2457
|
+
/**
|
|
2458
|
+
* @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
|
|
2459
|
+
* and charge fields.
|
|
2460
|
+
*
|
|
2461
|
+
* @example
|
|
2462
|
+
* ```ts
|
|
2463
|
+
* { amount: { value: 200, currencyId: 'EUR' }, chargeIndicator: false, allowanceChargeReasonCode: '95' }
|
|
2464
|
+
* ```;
|
|
2465
|
+
*
|
|
2466
|
+
* @see {@link PeppolLineAllowanceCharge}
|
|
2467
|
+
*/
|
|
1630
2468
|
declare class PeppolLineAllowance extends PeppolLineAllowance_base {}
|
|
1631
2469
|
declare const PeppolLineCharge_base: OpaqueSchema<PeppolLineCharge, Schema.Struct<{
|
|
1632
2470
|
readonly amount: typeof PeppolAmount;
|
|
@@ -1642,7 +2480,7 @@ declare const PeppolLineCharge_base: OpaqueSchema<PeppolLineCharge, Schema.Struc
|
|
|
1642
2480
|
/**
|
|
1643
2481
|
* @name cbc:AllowanceChargeReasonCode
|
|
1644
2482
|
*/
|
|
1645
|
-
readonly allowanceChargeReasonCode: Schema.optional<
|
|
2483
|
+
readonly allowanceChargeReasonCode: Schema.optional<typeof PeppolChargeReasonCode>;
|
|
1646
2484
|
/**
|
|
1647
2485
|
* @name cbc:ChargeIndicator
|
|
1648
2486
|
*
|
|
@@ -1650,12 +2488,39 @@ declare const PeppolLineCharge_base: OpaqueSchema<PeppolLineCharge, Schema.Struc
|
|
|
1650
2488
|
*/
|
|
1651
2489
|
readonly chargeIndicator: Schema.Literal<true>;
|
|
1652
2490
|
}>>;
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
2491
|
+
/**
|
|
2492
|
+
* @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
|
|
2493
|
+
* fields.
|
|
2494
|
+
*
|
|
2495
|
+
* @example
|
|
2496
|
+
* ```ts
|
|
2497
|
+
* { amount: { value: 25, currencyId: 'EUR' }, chargeIndicator: true, allowanceChargeReasonCode: 'AA' }
|
|
2498
|
+
* ```;
|
|
2499
|
+
*
|
|
2500
|
+
* @see {@link PeppolLineAllowanceCharge}
|
|
2501
|
+
*/
|
|
2502
|
+
declare class PeppolLineCharge extends PeppolLineCharge_base {}
|
|
2503
|
+
declare const PeppolLineAllowanceCharge_base: Schema.Union<readonly [typeof PeppolLineAllowance, typeof PeppolLineCharge]>;
|
|
2504
|
+
/**
|
|
2505
|
+
* @description An allowance or charge applied to an Invoice line, selected by the `cbc:ChargeIndicator` value: `false` selects an allowance, `true` selects a
|
|
2506
|
+
* charge.
|
|
2507
|
+
*
|
|
2508
|
+
* @example
|
|
2509
|
+
* ```ts
|
|
2510
|
+
* { amount: { value: 25, currencyId: 'EUR' }, chargeIndicator: true, allowanceChargeReasonCode: 'AA', allowanceChargeReason: 'Advertising' }
|
|
2511
|
+
* ```;
|
|
2512
|
+
*
|
|
2513
|
+
* @see {@link PeppolLineAllowance}
|
|
2514
|
+
*/
|
|
2515
|
+
declare class PeppolLineAllowanceCharge extends PeppolLineAllowanceCharge_base {}
|
|
2516
|
+
/**
|
|
2517
|
+
* @description Encoded form of {@link PeppolLineAllowanceCharge} produced by the Effect Schema codec.
|
|
2518
|
+
*
|
|
2519
|
+
* @see {@link PeppolLineAllowanceCharge}
|
|
2520
|
+
*/
|
|
2521
|
+
type PeppolLineAllowanceChargeEncoded = Schema.Codec.Encoded<typeof PeppolLineAllowanceCharge>;
|
|
2522
|
+
//#endregion
|
|
2523
|
+
//#region src/schemas/fields/peppol-invoice-line-period-schema.d.ts
|
|
1659
2524
|
declare const PeppolInvoiceLinePeriod_base: OpaqueSchema<PeppolInvoiceLinePeriod, Schema.Struct<{
|
|
1660
2525
|
/**
|
|
1661
2526
|
* @description The date when the Invoice period for this Invoice line ends. Format ="YYYY-MM-DD"
|
|
@@ -1684,6 +2549,17 @@ declare const PeppolInvoiceLinePeriod_base: OpaqueSchema<PeppolInvoiceLinePeriod
|
|
|
1684
2549
|
*/
|
|
1685
2550
|
readonly startDate: Schema.optional<typeof PeppolIsoDateString>;
|
|
1686
2551
|
}>>;
|
|
2552
|
+
/**
|
|
2553
|
+
* @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
|
|
2554
|
+
* document level period extends this shape in {@link PeppolInvoicePeriod}.
|
|
2555
|
+
*
|
|
2556
|
+
* @example
|
|
2557
|
+
* ```ts
|
|
2558
|
+
* { startDate: '2017-10-01', endDate: '2017-10-31' }
|
|
2559
|
+
* ```;
|
|
2560
|
+
*
|
|
2561
|
+
* @see {@link PeppolInvoicePeriod}
|
|
2562
|
+
*/
|
|
1687
2563
|
declare class PeppolInvoiceLinePeriod extends PeppolInvoiceLinePeriod_base {}
|
|
1688
2564
|
//#endregion
|
|
1689
2565
|
//#region src/schemas/fields/peppol-item-classification-schema.d.ts
|
|
@@ -1703,7 +2579,7 @@ declare const PeppolItemClassification_base: OpaqueSchema<PeppolItemClassificati
|
|
|
1703
2579
|
*
|
|
1704
2580
|
* @name `@listID`
|
|
1705
2581
|
*/
|
|
1706
|
-
readonly listId:
|
|
2582
|
+
readonly listId: typeof PeppolItemClassificationCode;
|
|
1707
2583
|
/**
|
|
1708
2584
|
* @description The identification scheme version identifier of the Item classification identifier.
|
|
1709
2585
|
*
|
|
@@ -1747,6 +2623,16 @@ declare const PeppolAdditionalItemProperties_base: OpaqueSchema<PeppolAdditional
|
|
|
1747
2623
|
*/
|
|
1748
2624
|
readonly value: Schema.String;
|
|
1749
2625
|
}>>;
|
|
2626
|
+
/**
|
|
2627
|
+
* @description An additional property of the item, expressed as an attribute name and value pair.
|
|
2628
|
+
*
|
|
2629
|
+
* @example
|
|
2630
|
+
* ```ts
|
|
2631
|
+
* { name: 'Colour', value: 'Blue' }
|
|
2632
|
+
* ```;
|
|
2633
|
+
*
|
|
2634
|
+
* @see {@link PeppolLineItem}
|
|
2635
|
+
*/
|
|
1750
2636
|
declare class PeppolAdditionalItemProperties extends PeppolAdditionalItemProperties_base {}
|
|
1751
2637
|
declare const PeppolCommodityClassifications_base: OpaqueSchema<PeppolCommodityClassifications, Schema.Struct<{
|
|
1752
2638
|
/**
|
|
@@ -1761,6 +2647,16 @@ declare const PeppolCommodityClassifications_base: OpaqueSchema<PeppolCommodityC
|
|
|
1761
2647
|
*/
|
|
1762
2648
|
readonly itemClassification: typeof PeppolItemClassification;
|
|
1763
2649
|
}>>;
|
|
2650
|
+
/**
|
|
2651
|
+
* @description A code classifying the item by its type or nature, identified by a scheme such as CPV.
|
|
2652
|
+
*
|
|
2653
|
+
* @example
|
|
2654
|
+
* ```ts
|
|
2655
|
+
* { itemClassification: { id: '09348023', listId: 'STI' } }
|
|
2656
|
+
* ```;
|
|
2657
|
+
*
|
|
2658
|
+
* @see {@link PeppolItemClassification}
|
|
2659
|
+
*/
|
|
1764
2660
|
declare class PeppolCommodityClassifications extends PeppolCommodityClassifications_base {}
|
|
1765
2661
|
declare const PeppolOriginCountryCode_base: OpaqueSchema<PeppolOriginCountryCode, Schema.Struct<{
|
|
1766
2662
|
/**
|
|
@@ -1770,8 +2666,18 @@ declare const PeppolOriginCountryCode_base: OpaqueSchema<PeppolOriginCountryCode
|
|
|
1770
2666
|
*
|
|
1771
2667
|
* @name `cbc:IdentificationCode`
|
|
1772
2668
|
*/
|
|
1773
|
-
readonly identificationCode:
|
|
2669
|
+
readonly identificationCode: typeof PeppolCountryCodeValue;
|
|
1774
2670
|
}>>;
|
|
2671
|
+
/**
|
|
2672
|
+
* @description The country from which the item originates, identified by an ISO 3166-1 country code.
|
|
2673
|
+
*
|
|
2674
|
+
* @example
|
|
2675
|
+
* ```ts
|
|
2676
|
+
* { identificationCode: 'NO' }
|
|
2677
|
+
* ```;
|
|
2678
|
+
*
|
|
2679
|
+
* @see {@link PeppolLineItem}
|
|
2680
|
+
*/
|
|
1775
2681
|
declare class PeppolOriginCountryCode extends PeppolOriginCountryCode_base {}
|
|
1776
2682
|
declare const PeppolStandardItemIdentification_base: OpaqueSchema<PeppolStandardItemIdentification, Schema.Struct<{
|
|
1777
2683
|
/**
|
|
@@ -1783,9 +2689,19 @@ declare const PeppolStandardItemIdentification_base: OpaqueSchema<PeppolStandard
|
|
|
1783
2689
|
*/
|
|
1784
2690
|
readonly id: Schema.Struct<{
|
|
1785
2691
|
readonly id: Schema.String;
|
|
1786
|
-
readonly schemeId:
|
|
2692
|
+
readonly schemeId: typeof PeppolIcdCode;
|
|
1787
2693
|
}>;
|
|
1788
2694
|
}>>;
|
|
2695
|
+
/**
|
|
2696
|
+
* @description An item identifier based on a registered scheme, such as a GTIN or EAN.
|
|
2697
|
+
*
|
|
2698
|
+
* @example
|
|
2699
|
+
* ```ts
|
|
2700
|
+
* { id: { id: '21382183120983', schemeId: '0088' } }
|
|
2701
|
+
* ```;
|
|
2702
|
+
*
|
|
2703
|
+
* @see {@link PeppolIdentifier}
|
|
2704
|
+
*/
|
|
1789
2705
|
declare class PeppolStandardItemIdentification extends PeppolStandardItemIdentification_base {}
|
|
1790
2706
|
declare const PeppolSellersItemIdentification_base: OpaqueSchema<PeppolSellersItemIdentification, Schema.Struct<{
|
|
1791
2707
|
/**
|
|
@@ -1800,6 +2716,16 @@ declare const PeppolSellersItemIdentification_base: OpaqueSchema<PeppolSellersIt
|
|
|
1800
2716
|
*/
|
|
1801
2717
|
readonly id: Schema.String;
|
|
1802
2718
|
}>>;
|
|
2719
|
+
/**
|
|
2720
|
+
* @description An identifier assigned by the Seller for the item.
|
|
2721
|
+
*
|
|
2722
|
+
* @example
|
|
2723
|
+
* ```ts
|
|
2724
|
+
* { id: '987323' }
|
|
2725
|
+
* ```;
|
|
2726
|
+
*
|
|
2727
|
+
* @see {@link PeppolLineItem}
|
|
2728
|
+
*/
|
|
1803
2729
|
declare class PeppolSellersItemIdentification extends PeppolSellersItemIdentification_base {}
|
|
1804
2730
|
declare const PeppolBuyersItemIdentification_base: OpaqueSchema<PeppolBuyersItemIdentification, Schema.Struct<{
|
|
1805
2731
|
/**
|
|
@@ -1814,6 +2740,16 @@ declare const PeppolBuyersItemIdentification_base: OpaqueSchema<PeppolBuyersItem
|
|
|
1814
2740
|
*/
|
|
1815
2741
|
readonly id: Schema.String;
|
|
1816
2742
|
}>>;
|
|
2743
|
+
/**
|
|
2744
|
+
* @description An identifier assigned by the Buyer for the item.
|
|
2745
|
+
*
|
|
2746
|
+
* @example
|
|
2747
|
+
* ```ts
|
|
2748
|
+
* { id: '12345' }
|
|
2749
|
+
* ```;
|
|
2750
|
+
*
|
|
2751
|
+
* @see {@link PeppolLineItem}
|
|
2752
|
+
*/
|
|
1817
2753
|
declare class PeppolBuyersItemIdentification extends PeppolBuyersItemIdentification_base {}
|
|
1818
2754
|
declare const PeppolLineItem_base: OpaqueSchema<PeppolLineItem, Schema.Struct<{
|
|
1819
2755
|
/**
|
|
@@ -1880,12 +2816,13 @@ declare const PeppolLineItem_base: OpaqueSchema<PeppolLineItem, Schema.Struct<{
|
|
|
1880
2816
|
readonly additionalItemProperties: Schema.optional<Schema.$Array<typeof PeppolAdditionalItemProperties>>;
|
|
1881
2817
|
}>>;
|
|
1882
2818
|
/**
|
|
2819
|
+
* @description The item details for an invoice or credit note line, including its name, identifiers, classification, and line VAT category.
|
|
2820
|
+
*
|
|
1883
2821
|
* @summary Item details on invoice/credit-note line
|
|
1884
2822
|
*
|
|
1885
2823
|
* @name cac:Item
|
|
1886
2824
|
*/
|
|
1887
2825
|
declare class PeppolLineItem extends PeppolLineItem_base {}
|
|
1888
|
-
type PeppolItem = PeppolLineItem;
|
|
1889
2826
|
//#endregion
|
|
1890
2827
|
//#region src/schemas/fields/peppol-line-price-allowance-charge-schema.d.ts
|
|
1891
2828
|
declare const PriceAllowanceCharge_base: OpaqueSchema<PriceAllowanceCharge, Schema.Struct<{
|
|
@@ -1910,12 +2847,32 @@ declare const PriceAllowanceCharge_base: OpaqueSchema<PriceAllowanceCharge, Sche
|
|
|
1910
2847
|
*/
|
|
1911
2848
|
readonly chargeIndicator: Schema.Boolean;
|
|
1912
2849
|
}>>;
|
|
2850
|
+
/**
|
|
2851
|
+
* @description A price level allowance or charge applied to the item price, expressed as an amount and a charge indicator.
|
|
2852
|
+
*
|
|
2853
|
+
* @example
|
|
2854
|
+
* ```ts
|
|
2855
|
+
* { amount: { value: 200, currencyId: 'EUR' }, chargeIndicator: false }
|
|
2856
|
+
* ```;
|
|
2857
|
+
*
|
|
2858
|
+
* @see {@link PeppolLinePriceAllowanceCharge}
|
|
2859
|
+
*/
|
|
1913
2860
|
declare class PriceAllowanceCharge extends PriceAllowanceCharge_base {}
|
|
1914
2861
|
declare const PeppolLinePriceAllowanceCharge_base: OpaqueSchema<PeppolLinePriceAllowanceCharge, Schema.Struct<{
|
|
1915
2862
|
readonly amount: typeof PeppolAmount;
|
|
1916
2863
|
readonly baseAmount: Schema.optional<typeof PeppolAmount>;
|
|
1917
2864
|
readonly chargeIndicator: Schema.Literal<false>;
|
|
1918
2865
|
}>>;
|
|
2866
|
+
/**
|
|
2867
|
+
* @description A price level allowance on the item price. Only allowances are allowed at price level, so the charge indicator is fixed to false.
|
|
2868
|
+
*
|
|
2869
|
+
* @example
|
|
2870
|
+
* ```ts
|
|
2871
|
+
* { amount: { value: 200, currencyId: 'EUR' }, chargeIndicator: false }
|
|
2872
|
+
* ```;
|
|
2873
|
+
*
|
|
2874
|
+
* @see {@link PeppolLinePrice}
|
|
2875
|
+
*/
|
|
1919
2876
|
declare class PeppolLinePriceAllowanceCharge extends PeppolLinePriceAllowanceCharge_base {}
|
|
1920
2877
|
//#endregion
|
|
1921
2878
|
//#region src/schemas/fields/peppol-quantity-schema.d.ts
|
|
@@ -1923,13 +2880,15 @@ declare const PeppolQuantity_base: OpaqueSchema<PeppolQuantity, Schema.Struct<{
|
|
|
1923
2880
|
/**
|
|
1924
2881
|
* @name `@unitCode`
|
|
1925
2882
|
*/
|
|
1926
|
-
readonly unitCode: Schema.optional<
|
|
2883
|
+
readonly unitCode: Schema.optional<typeof PeppolQuantityUnitCode>;
|
|
1927
2884
|
/**
|
|
1928
2885
|
* @name `#text (value)`
|
|
1929
2886
|
*/
|
|
1930
2887
|
readonly value: Schema.Finite;
|
|
1931
2888
|
}>>;
|
|
1932
2889
|
/**
|
|
2890
|
+
* @description A quantity value with an optional unit of measure code.
|
|
2891
|
+
*
|
|
1933
2892
|
* @summary Quantity with optional unit code
|
|
1934
2893
|
*
|
|
1935
2894
|
* @name `cbc:* (+ @unitCode)`
|
|
@@ -1956,6 +2915,8 @@ declare const PeppolLinePrice_base: OpaqueSchema<PeppolLinePrice, Schema.Struct<
|
|
|
1956
2915
|
readonly priceAmount: typeof PeppolAmount;
|
|
1957
2916
|
}>>;
|
|
1958
2917
|
/**
|
|
2918
|
+
* @description The price details of an invoice or credit note line, including the price amount and any price level allowance.
|
|
2919
|
+
*
|
|
1959
2920
|
* @summary Price details on invoice line
|
|
1960
2921
|
*
|
|
1961
2922
|
* @name cac:Price
|
|
@@ -1966,6 +2927,16 @@ declare class PeppolLinePrice extends PeppolLinePrice_base {}
|
|
|
1966
2927
|
declare const PeppolOrderLineReference_base: OpaqueSchema<PeppolOrderLineReference, Schema.Struct<{
|
|
1967
2928
|
readonly lineId: Schema.String;
|
|
1968
2929
|
}>>;
|
|
2930
|
+
/**
|
|
2931
|
+
* @description A reference to the order line that the Invoice line fulfils. Wraps the `cac:OrderLineReference` element and its `cbc:LineID`.
|
|
2932
|
+
*
|
|
2933
|
+
* @example
|
|
2934
|
+
* ```ts
|
|
2935
|
+
* { lineId: '123' }
|
|
2936
|
+
* ```;
|
|
2937
|
+
*
|
|
2938
|
+
* @see {@link PeppolBaseLine}
|
|
2939
|
+
*/
|
|
1969
2940
|
declare class PeppolOrderLineReference extends PeppolOrderLineReference_base {}
|
|
1970
2941
|
declare const PeppolBaseLine_base: OpaqueSchema<PeppolBaseLine, Schema.Struct<{
|
|
1971
2942
|
/**
|
|
@@ -1990,7 +2961,7 @@ declare const PeppolBaseLine_base: OpaqueSchema<PeppolBaseLine, Schema.Struct<{
|
|
|
1990
2961
|
*
|
|
1991
2962
|
* @cardinality 0..n
|
|
1992
2963
|
*/
|
|
1993
|
-
readonly allowanceCharges: Schema.optional<Schema.$Array<
|
|
2964
|
+
readonly allowanceCharges: Schema.optional<Schema.$Array<typeof PeppolLineAllowanceCharge>>;
|
|
1994
2965
|
/**
|
|
1995
2966
|
* @summary Line object identifier
|
|
1996
2967
|
*
|
|
@@ -2090,7 +3061,7 @@ declare class PeppolBaseLine extends PeppolBaseLine_base {}
|
|
|
2090
3061
|
//#region src/schemas/fields/peppol-invoice-line-schema.d.ts
|
|
2091
3062
|
declare const PeppolInvoiceLine_base: OpaqueSchema<PeppolInvoiceLine, Schema.Struct<{
|
|
2092
3063
|
readonly accountingCost: Schema.optional<Schema.String>;
|
|
2093
|
-
readonly allowanceCharges: Schema.optional<Schema.$Array<
|
|
3064
|
+
readonly allowanceCharges: Schema.optional<Schema.$Array<typeof PeppolLineAllowanceCharge>>;
|
|
2094
3065
|
readonly documentReference: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2095
3066
|
readonly id: Schema.String;
|
|
2096
3067
|
readonly schemeId: Schema.optional<Schema.String>;
|
|
@@ -2115,21 +3086,38 @@ declare const PeppolInvoiceLine_base: OpaqueSchema<PeppolInvoiceLine, Schema.Str
|
|
|
2115
3086
|
*/
|
|
2116
3087
|
readonly invoicedQuantity: Schema.Struct<{
|
|
2117
3088
|
readonly value: Schema.Finite;
|
|
2118
|
-
readonly unitCode:
|
|
3089
|
+
readonly unitCode: typeof PeppolQuantityUnitCode;
|
|
2119
3090
|
}>;
|
|
2120
3091
|
}>>;
|
|
2121
3092
|
/**
|
|
3093
|
+
* @description A line of the Invoice, extending the common line fields with the invoiced quantity. Wraps the `cac:InvoiceLine` element.
|
|
3094
|
+
*
|
|
2122
3095
|
* @summary Invoice line
|
|
2123
3096
|
*
|
|
2124
3097
|
* @name cac:InvoiceLine
|
|
2125
3098
|
*/
|
|
2126
3099
|
declare class PeppolInvoiceLine extends PeppolInvoiceLine_base {}
|
|
3100
|
+
/**
|
|
3101
|
+
* @description Encoded form of {@link PeppolInvoiceLine} produced by the Effect Schema codec. Fields mirror the decoded structure.
|
|
3102
|
+
*
|
|
3103
|
+
* @see {@link PeppolInvoiceLine}
|
|
3104
|
+
*/
|
|
2127
3105
|
interface PeppolInvoiceLineEncoded extends Schema.Codec.Encoded<typeof PeppolInvoiceLine> {}
|
|
2128
3106
|
//#endregion
|
|
2129
3107
|
//#region src/schemas/peppol-invoice-schema.d.ts
|
|
2130
3108
|
declare const PeppolProjectReference_base: OpaqueSchema<PeppolProjectReference, Schema.Struct<{
|
|
2131
3109
|
readonly id: Schema.String;
|
|
2132
3110
|
}>>;
|
|
3111
|
+
/**
|
|
3112
|
+
* @description Wraps the `cac:ProjectReference` element on an invoice: an identifier of the project the invoice relates to.
|
|
3113
|
+
*
|
|
3114
|
+
* @example
|
|
3115
|
+
* ```ts
|
|
3116
|
+
* { id: 'project-123' }
|
|
3117
|
+
* ```;
|
|
3118
|
+
*
|
|
3119
|
+
* @see {@link PeppolInvoice}
|
|
3120
|
+
*/
|
|
2133
3121
|
declare class PeppolProjectReference extends PeppolProjectReference_base {}
|
|
2134
3122
|
declare const PeppolInvoice_base: OpaqueSchema<PeppolInvoice, Schema.Struct<{
|
|
2135
3123
|
readonly customizationId: Schema.withDecodingDefaultType<Schema.String, never>;
|
|
@@ -2138,8 +3126,8 @@ declare const PeppolInvoice_base: OpaqueSchema<PeppolInvoice, Schema.Struct<{
|
|
|
2138
3126
|
readonly issueDate: typeof PeppolIsoDateString;
|
|
2139
3127
|
readonly note: Schema.optional<Schema.String>;
|
|
2140
3128
|
readonly taxPointDate: Schema.optional<typeof PeppolIsoDateString>;
|
|
2141
|
-
readonly documentCurrencyCode:
|
|
2142
|
-
readonly taxCurrencyCode: Schema.optional<
|
|
3129
|
+
readonly documentCurrencyCode: typeof PeppolCurrencyCode;
|
|
3130
|
+
readonly taxCurrencyCode: Schema.optional<typeof PeppolCurrencyCode>;
|
|
2143
3131
|
readonly accountingCost: Schema.optional<Schema.String>;
|
|
2144
3132
|
readonly buyerReference: Schema.optional<Schema.String>;
|
|
2145
3133
|
readonly invoicePeriod: Schema.optional<typeof PeppolInvoicePeriod>;
|
|
@@ -2157,8 +3145,8 @@ declare const PeppolInvoice_base: OpaqueSchema<PeppolInvoice, Schema.Struct<{
|
|
|
2157
3145
|
readonly delivery: Schema.optional<typeof PeppolDelivery>;
|
|
2158
3146
|
readonly paymentMeans: Schema.optional<Schema.$Array<typeof PeppolPaymentMeans>>;
|
|
2159
3147
|
readonly paymentTerms: Schema.optional<typeof PeppolPaymentTerms>;
|
|
2160
|
-
readonly allowanceCharges: Schema.optional<Schema.$Array<
|
|
2161
|
-
readonly taxTotals: Schema.$Array<typeof
|
|
3148
|
+
readonly allowanceCharges: Schema.optional<Schema.$Array<typeof PeppolAllowanceCharge>>;
|
|
3149
|
+
readonly taxTotals: Schema.$Array<typeof PeppolTaxTotal>;
|
|
2162
3150
|
readonly legalMonetaryTotal: typeof PeppolLegalMonetaryTotal;
|
|
2163
3151
|
/**
|
|
2164
3152
|
* @example
|
|
@@ -2183,7 +3171,7 @@ declare const PeppolInvoice_base: OpaqueSchema<PeppolInvoice, Schema.Struct<{
|
|
|
2183
3171
|
*
|
|
2184
3172
|
* @name cbc:InvoiceTypeCode
|
|
2185
3173
|
*/
|
|
2186
|
-
readonly invoiceTypeCode:
|
|
3174
|
+
readonly invoiceTypeCode: typeof PeppolInvoiceTypeCode;
|
|
2187
3175
|
/**
|
|
2188
3176
|
* @summary PROJECT REFERENCE
|
|
2189
3177
|
*
|
|
@@ -2191,12 +3179,30 @@ declare const PeppolInvoice_base: OpaqueSchema<PeppolInvoice, Schema.Struct<{
|
|
|
2191
3179
|
*/
|
|
2192
3180
|
readonly projectReference: Schema.optional<typeof PeppolProjectReference>;
|
|
2193
3181
|
}>>;
|
|
3182
|
+
/**
|
|
3183
|
+
* @description UBL `Invoice` for PEPPOL BIS Billing 3.0. Extends {@link PeppolBillingBase} with the due date, type code, lines and project reference.
|
|
3184
|
+
*
|
|
3185
|
+
* @example
|
|
3186
|
+
* ```ts
|
|
3187
|
+
* {
|
|
3188
|
+
* customizationId: 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0',
|
|
3189
|
+
* profileId: 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0',
|
|
3190
|
+
* id: '33445566',
|
|
3191
|
+
* issueDate: '2017-11-01',
|
|
3192
|
+
* documentCurrencyCode: 'EUR',
|
|
3193
|
+
* invoiceTypeCode: '380'
|
|
3194
|
+
* }
|
|
3195
|
+
* ```;
|
|
3196
|
+
*
|
|
3197
|
+
* @see {@link PeppolBillingBase}
|
|
3198
|
+
* @see {@link PeppolCreditNote}
|
|
3199
|
+
*/
|
|
2194
3200
|
declare class PeppolInvoice extends PeppolInvoice_base {}
|
|
2195
3201
|
//#endregion
|
|
2196
3202
|
//#region src/schemas/fields/peppol-credit-note-line-schema.d.ts
|
|
2197
3203
|
declare const PeppolCreditNoteLine_base: OpaqueSchema<PeppolCreditNoteLine, Schema.Struct<{
|
|
2198
3204
|
readonly accountingCost: Schema.optional<Schema.String>;
|
|
2199
|
-
readonly allowanceCharges: Schema.optional<Schema.$Array<
|
|
3205
|
+
readonly allowanceCharges: Schema.optional<Schema.$Array<typeof PeppolLineAllowanceCharge>>;
|
|
2200
3206
|
readonly documentReference: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
2201
3207
|
readonly id: Schema.String;
|
|
2202
3208
|
readonly schemeId: Schema.optional<Schema.String>;
|
|
@@ -2211,13 +3217,18 @@ declare const PeppolCreditNoteLine_base: OpaqueSchema<PeppolCreditNoteLine, Sche
|
|
|
2211
3217
|
readonly price: typeof PeppolLinePrice;
|
|
2212
3218
|
readonly creditedQuantity: Schema.Struct<{
|
|
2213
3219
|
readonly value: Schema.Finite;
|
|
2214
|
-
readonly unitCode:
|
|
3220
|
+
readonly unitCode: typeof PeppolQuantityUnitCode;
|
|
2215
3221
|
}>;
|
|
2216
3222
|
}>>;
|
|
2217
3223
|
/**
|
|
2218
3224
|
* @description Credit note line is identical to Invoice line except the quantity element name.
|
|
2219
3225
|
*/
|
|
2220
3226
|
declare class PeppolCreditNoteLine extends PeppolCreditNoteLine_base {}
|
|
3227
|
+
/**
|
|
3228
|
+
* @description Encoded form of {@link PeppolCreditNoteLine} produced by the Effect Schema codec. Fields mirror the decoded structure.
|
|
3229
|
+
*
|
|
3230
|
+
* @see {@link PeppolCreditNoteLine}
|
|
3231
|
+
*/
|
|
2221
3232
|
interface PeppolCreditNoteLineEncoded extends Schema.Codec.Encoded<typeof PeppolCreditNoteLine> {}
|
|
2222
3233
|
//#endregion
|
|
2223
3234
|
//#region src/schemas/peppol-credit-note-schema.d.ts
|
|
@@ -2228,8 +3239,8 @@ declare const PeppolCreditNote_base: OpaqueSchema<PeppolCreditNote, Schema.Struc
|
|
|
2228
3239
|
readonly issueDate: typeof PeppolIsoDateString;
|
|
2229
3240
|
readonly note: Schema.optional<Schema.String>;
|
|
2230
3241
|
readonly taxPointDate: Schema.optional<typeof PeppolIsoDateString>;
|
|
2231
|
-
readonly documentCurrencyCode:
|
|
2232
|
-
readonly taxCurrencyCode: Schema.optional<
|
|
3242
|
+
readonly documentCurrencyCode: typeof PeppolCurrencyCode;
|
|
3243
|
+
readonly taxCurrencyCode: Schema.optional<typeof PeppolCurrencyCode>;
|
|
2233
3244
|
readonly accountingCost: Schema.optional<Schema.String>;
|
|
2234
3245
|
readonly buyerReference: Schema.optional<Schema.String>;
|
|
2235
3246
|
readonly invoicePeriod: Schema.optional<typeof PeppolInvoicePeriod>;
|
|
@@ -2247,8 +3258,8 @@ declare const PeppolCreditNote_base: OpaqueSchema<PeppolCreditNote, Schema.Struc
|
|
|
2247
3258
|
readonly delivery: Schema.optional<typeof PeppolDelivery>;
|
|
2248
3259
|
readonly paymentMeans: Schema.optional<Schema.$Array<typeof PeppolPaymentMeans>>;
|
|
2249
3260
|
readonly paymentTerms: Schema.optional<typeof PeppolPaymentTerms>;
|
|
2250
|
-
readonly allowanceCharges: Schema.optional<Schema.$Array<
|
|
2251
|
-
readonly taxTotals: Schema.$Array<typeof
|
|
3261
|
+
readonly allowanceCharges: Schema.optional<Schema.$Array<typeof PeppolAllowanceCharge>>;
|
|
3262
|
+
readonly taxTotals: Schema.$Array<typeof PeppolTaxTotal>;
|
|
2252
3263
|
readonly legalMonetaryTotal: typeof PeppolLegalMonetaryTotal;
|
|
2253
3264
|
/**
|
|
2254
3265
|
* @description CREDIT NOTE LINE.
|
|
@@ -2264,7 +3275,7 @@ declare const PeppolCreditNote_base: OpaqueSchema<PeppolCreditNote, Schema.Struc
|
|
|
2264
3275
|
*
|
|
2265
3276
|
* @name cbc:CreditNoteTypeCode
|
|
2266
3277
|
*/
|
|
2267
|
-
readonly creditNoteTypeCode:
|
|
3278
|
+
readonly creditNoteTypeCode: typeof PeppolCreditNoteTypeCode;
|
|
2268
3279
|
}>>;
|
|
2269
3280
|
/**
|
|
2270
3281
|
* @description Main UBL Credit Note schema (camelCase properties) Effect port of `creditNoteSchema` (`z.extend(billingBaseSchema, ...)` →
|
|
@@ -2286,6 +3297,16 @@ declare const PeppolMessageLevelResponseParty_base: OpaqueSchema<PeppolMessageLe
|
|
|
2286
3297
|
*/
|
|
2287
3298
|
readonly endpointId: Schema.optional<typeof PeppolIdentifier>;
|
|
2288
3299
|
}>>;
|
|
3300
|
+
/**
|
|
3301
|
+
* @description Party used as `cac:SenderParty` or `cac:ReceiverParty` on a message level response, holding the party's electronic address.
|
|
3302
|
+
*
|
|
3303
|
+
* @example
|
|
3304
|
+
* ```ts
|
|
3305
|
+
* { endpointId: { id: '7300010000001', schemeId: '0088' } }
|
|
3306
|
+
* ```;
|
|
3307
|
+
*
|
|
3308
|
+
* @see {@link PeppolMessageLevelResponse}
|
|
3309
|
+
*/
|
|
2289
3310
|
declare class PeppolMessageLevelResponseParty extends PeppolMessageLevelResponseParty_base {}
|
|
2290
3311
|
//#endregion
|
|
2291
3312
|
//#region src/schemas/peppol-document-response-document-reference-schema.d.ts
|
|
@@ -2308,7 +3329,7 @@ declare const PeppolDocumentResponseDocumentReference_base: OpaqueSchema<PeppolD
|
|
|
2308
3329
|
*
|
|
2309
3330
|
* @name `cbc:DocumentTypeCode`
|
|
2310
3331
|
*/
|
|
2311
|
-
readonly documentTypeCode: Schema.optional<
|
|
3332
|
+
readonly documentTypeCode: Schema.optional<typeof PeppolDocumentTypeCode>;
|
|
2312
3333
|
/**
|
|
2313
3334
|
* @description The version of the document that has been identifier with the document identifier.
|
|
2314
3335
|
*
|
|
@@ -2321,8 +3342,17 @@ declare const PeppolDocumentResponseDocumentReference_base: OpaqueSchema<PeppolD
|
|
|
2321
3342
|
*/
|
|
2322
3343
|
readonly versionId: Schema.optional<Schema.String>;
|
|
2323
3344
|
}>>;
|
|
3345
|
+
/**
|
|
3346
|
+
* @description Wraps `cac:DocumentReference` inside a message level response: identifies the business document the response is based on.
|
|
3347
|
+
*
|
|
3348
|
+
* @example
|
|
3349
|
+
* ```ts
|
|
3350
|
+
* { id: 'EnvelopeID-12345', versionId: '2' }
|
|
3351
|
+
* ```;
|
|
3352
|
+
*
|
|
3353
|
+
* @see {@link PeppolMessageLevelResponseDocumentResponse}
|
|
3354
|
+
*/
|
|
2324
3355
|
declare class PeppolDocumentResponseDocumentReference extends PeppolDocumentResponseDocumentReference_base {}
|
|
2325
|
-
type PeppolMessageLevelDocumentResponseDocumentReference = PeppolDocumentResponseDocumentReference;
|
|
2326
3356
|
//#endregion
|
|
2327
3357
|
//#region src/schemas/peppol-document-response-document-schema.d.ts
|
|
2328
3358
|
declare const PeppolDocumentResponseDocument_base: OpaqueSchema<PeppolDocumentResponseDocument, Schema.Struct<{
|
|
@@ -2337,7 +3367,7 @@ declare const PeppolDocumentResponseDocument_base: OpaqueSchema<PeppolDocumentRe
|
|
|
2337
3367
|
*
|
|
2338
3368
|
* @name `cbc:ResponseCode`
|
|
2339
3369
|
*/
|
|
2340
|
-
readonly responseCode:
|
|
3370
|
+
readonly responseCode: typeof PeppolApplicationResponseTypeCode;
|
|
2341
3371
|
/**
|
|
2342
3372
|
* @description Used to meake any comments or instructions relevant to the response. The use of this element requires manual assessment by the receiver.
|
|
2343
3373
|
*
|
|
@@ -2346,16 +3376,17 @@ declare const PeppolDocumentResponseDocument_base: OpaqueSchema<PeppolDocumentRe
|
|
|
2346
3376
|
readonly description: Schema.optional<Schema.String>;
|
|
2347
3377
|
}>>;
|
|
2348
3378
|
/**
|
|
3379
|
+
* @description Wraps `cac:Response` inside a message level response: the overall response code and an optional textual note.
|
|
3380
|
+
*
|
|
2349
3381
|
* @summary Response information
|
|
2350
3382
|
*
|
|
2351
3383
|
* @name `cac:Response`
|
|
2352
3384
|
*
|
|
2353
3385
|
* @cardinality (1..1)
|
|
2354
3386
|
*
|
|
2355
|
-
* @see {@link
|
|
3387
|
+
* @see {@link PeppolMessageLevelResponseDocumentResponse}
|
|
2356
3388
|
*/
|
|
2357
3389
|
declare class PeppolDocumentResponseDocument extends PeppolDocumentResponseDocument_base {}
|
|
2358
|
-
type PeppolMessageLevelResponseDocumentResponseDocument = PeppolDocumentResponseDocument;
|
|
2359
3390
|
//#endregion
|
|
2360
3391
|
//#region src/schemas/peppol-document-response-line-response-content-schema.d.ts
|
|
2361
3392
|
declare const PeppolStatus_base: OpaqueSchema<PeppolStatus, Schema.Struct<{
|
|
@@ -2368,6 +3399,16 @@ declare const PeppolStatus_base: OpaqueSchema<PeppolStatus, Schema.Struct<{
|
|
|
2368
3399
|
*/
|
|
2369
3400
|
readonly statusReasonCode: Schema.Literals<readonly ["BV", "BW", "SV"]>;
|
|
2370
3401
|
}>>;
|
|
3402
|
+
/**
|
|
3403
|
+
* @description Wraps `cac:Status` inside a line response: the coded reason for an issue found in the document.
|
|
3404
|
+
*
|
|
3405
|
+
* @example
|
|
3406
|
+
* ```ts
|
|
3407
|
+
* { statusReasonCode: 'SV' }
|
|
3408
|
+
* ```;
|
|
3409
|
+
*
|
|
3410
|
+
* @see {@link PeppolDocumentResponseLineResponseContent}
|
|
3411
|
+
*/
|
|
2371
3412
|
declare class PeppolStatus extends PeppolStatus_base {}
|
|
2372
3413
|
declare const PeppolDocumentResponseLineResponseContent_base: OpaqueSchema<PeppolDocumentResponseLineResponseContent, Schema.Struct<{
|
|
2373
3414
|
/**
|
|
@@ -2381,7 +3422,7 @@ declare const PeppolDocumentResponseLineResponseContent_base: OpaqueSchema<Peppo
|
|
|
2381
3422
|
*
|
|
2382
3423
|
* @name `cbc:ResponseCode`
|
|
2383
3424
|
*/
|
|
2384
|
-
readonly responseCode:
|
|
3425
|
+
readonly responseCode: typeof PeppolApplicationResponseTypeCode;
|
|
2385
3426
|
/**
|
|
2386
3427
|
* @description The description of the issued identifier in the transaction document.
|
|
2387
3428
|
*
|
|
@@ -2398,6 +3439,16 @@ declare const PeppolDocumentResponseLineResponseContent_base: OpaqueSchema<Peppo
|
|
|
2398
3439
|
*/
|
|
2399
3440
|
readonly status: typeof PeppolStatus;
|
|
2400
3441
|
}>>;
|
|
3442
|
+
/**
|
|
3443
|
+
* @description A response to a particular line in the business document: the line response code, a description of the issue and its coded status.
|
|
3444
|
+
*
|
|
3445
|
+
* @example
|
|
3446
|
+
* ```ts
|
|
3447
|
+
* { responseCode: 'RE', description: 'Validation gives error [CL-T77-R0002]', status: { statusReasonCode: 'SV' } }
|
|
3448
|
+
* ```;
|
|
3449
|
+
*
|
|
3450
|
+
* @see {@link PeppolDocumentResponseLineResponse}
|
|
3451
|
+
*/
|
|
2401
3452
|
declare class PeppolDocumentResponseLineResponseContent extends PeppolDocumentResponseLineResponseContent_base {}
|
|
2402
3453
|
//#endregion
|
|
2403
3454
|
//#region src/schemas/peppol-document-response-line-response-schema.d.ts
|
|
@@ -2415,6 +3466,16 @@ declare const PeppolLineReference_base: OpaqueSchema<PeppolLineReference, Schema
|
|
|
2415
3466
|
*/
|
|
2416
3467
|
readonly lineId: Schema.String;
|
|
2417
3468
|
}>>;
|
|
3469
|
+
/**
|
|
3470
|
+
* @description Wraps `cac:LineReference` inside a line response: an XPath pointing at the element that caused the reported issue.
|
|
3471
|
+
*
|
|
3472
|
+
* @example
|
|
3473
|
+
* ```ts
|
|
3474
|
+
* { lineId: '/Invoice/cac:InvoiceLine[1]' }
|
|
3475
|
+
* ```;
|
|
3476
|
+
*
|
|
3477
|
+
* @see {@link PeppolDocumentResponseLineResponse}
|
|
3478
|
+
*/
|
|
2418
3479
|
declare class PeppolLineReference extends PeppolLineReference_base {}
|
|
2419
3480
|
declare const PeppolDocumentResponseLineResponse_base: OpaqueSchema<PeppolDocumentResponseLineResponse, Schema.Struct<{
|
|
2420
3481
|
/**
|
|
@@ -2430,8 +3491,20 @@ declare const PeppolDocumentResponseLineResponse_base: OpaqueSchema<PeppolDocume
|
|
|
2430
3491
|
*/
|
|
2431
3492
|
readonly response: typeof PeppolDocumentResponseLineResponseContent;
|
|
2432
3493
|
}>>;
|
|
3494
|
+
/**
|
|
3495
|
+
* @description Wraps `cac:LineResponse` inside a message level response: pairs a line reference with the response for that line.
|
|
3496
|
+
*
|
|
3497
|
+
* @example
|
|
3498
|
+
* ```ts
|
|
3499
|
+
* {
|
|
3500
|
+
* lineReference: { lineId: '/Invoice/cac:InvoiceLine[1]' },
|
|
3501
|
+
* response: { responseCode: 'RE', description: 'Invalid tax category', status: { statusReasonCode: 'SV' } }
|
|
3502
|
+
* }
|
|
3503
|
+
* ```;
|
|
3504
|
+
*
|
|
3505
|
+
* @see {@link PeppolMessageLevelResponseDocumentResponse}
|
|
3506
|
+
*/
|
|
2433
3507
|
declare class PeppolDocumentResponseLineResponse extends PeppolDocumentResponseLineResponse_base {}
|
|
2434
|
-
type PeppolMessageLevelDocumentResponseLineResponse = PeppolDocumentResponseLineResponse;
|
|
2435
3508
|
//#endregion
|
|
2436
3509
|
//#region src/schemas/peppol-message-level-response-document-response-schema.d.ts
|
|
2437
3510
|
declare const PeppolMessageLevelResponseDocumentResponse_base: OpaqueSchema<PeppolMessageLevelResponseDocumentResponse, Schema.Struct<{
|
|
@@ -2460,6 +3533,16 @@ declare const PeppolMessageLevelResponseDocumentResponse_base: OpaqueSchema<Pepp
|
|
|
2460
3533
|
*/
|
|
2461
3534
|
readonly lineResponse: Schema.$Array<typeof PeppolDocumentResponseLineResponse>;
|
|
2462
3535
|
}>>;
|
|
3536
|
+
/**
|
|
3537
|
+
* @description Wraps `cac:DocumentResponse` inside a message level response: the response, the document reference and any per-line responses.
|
|
3538
|
+
*
|
|
3539
|
+
* @example
|
|
3540
|
+
* ```ts
|
|
3541
|
+
* { response: { responseCode: 'RE' }, documentReference: { id: 'EnvelopeID-12345' }, lineResponse: [] }
|
|
3542
|
+
* ```;
|
|
3543
|
+
*
|
|
3544
|
+
* @see {@link PeppolMessageLevelResponse}
|
|
3545
|
+
*/
|
|
2463
3546
|
declare class PeppolMessageLevelResponseDocumentResponse extends PeppolMessageLevelResponseDocumentResponse_base {}
|
|
2464
3547
|
//#endregion
|
|
2465
3548
|
//#region src/schemas/utils/peppol-xsd-time-schema.d.ts
|
|
@@ -2467,6 +3550,11 @@ declare const PeppolXsdTime_base: OpaqueSchema<PeppolXsdTime, Schema.decodeTo<Sc
|
|
|
2467
3550
|
/**
|
|
2468
3551
|
* @description XSD `time` lexical value (`HH:MM:SS` with optional fractional seconds and timezone). Effect port of `xsdTime` (`z.string().check(z.regex(...))`):
|
|
2469
3552
|
* keeps the value as a plain string and only validates the shape.
|
|
3553
|
+
*
|
|
3554
|
+
* @example
|
|
3555
|
+
* ```ts
|
|
3556
|
+
* const value = '12:30:45+01:00';
|
|
3557
|
+
* ```;
|
|
2470
3558
|
*/
|
|
2471
3559
|
declare class PeppolXsdTime extends PeppolXsdTime_base {}
|
|
2472
3560
|
//#endregion
|
|
@@ -2558,11 +3646,29 @@ declare const PeppolMessageLevelResponse_base: OpaqueSchema<PeppolMessageLevelRe
|
|
|
2558
3646
|
*/
|
|
2559
3647
|
readonly documentResponse: typeof PeppolMessageLevelResponseDocumentResponse;
|
|
2560
3648
|
}>>;
|
|
3649
|
+
/**
|
|
3650
|
+
* @description UBL `ApplicationResponse` message level response for PEPPOL BIS Billing 3.0 (profile `urn:fdc:peppol.eu:poacc:bis:mlr:3`).
|
|
3651
|
+
*
|
|
3652
|
+
* @example
|
|
3653
|
+
* ```ts
|
|
3654
|
+
* {
|
|
3655
|
+
* customizationId: 'urn:fdc:peppol.eu:poacc:trns:mlr:3',
|
|
3656
|
+
* profileId: 'urn:fdc:peppol.eu:poacc:bis:mlr:3',
|
|
3657
|
+
* id: '23',
|
|
3658
|
+
* issueDate: '2017-11-01',
|
|
3659
|
+
* senderParty: {},
|
|
3660
|
+
* receiverParty: {},
|
|
3661
|
+
* documentResponse: { response: { responseCode: 'RE' }, documentReference: { id: 'EnvelopeID-12345' }, lineResponse: [] }
|
|
3662
|
+
* }
|
|
3663
|
+
* ```;
|
|
3664
|
+
*
|
|
3665
|
+
* @see {@link PeppolInvoiceResponse}
|
|
3666
|
+
*/
|
|
2561
3667
|
declare class PeppolMessageLevelResponse extends PeppolMessageLevelResponse_base {}
|
|
2562
3668
|
//#endregion
|
|
2563
3669
|
//#region src/schemas/peppol-invoice-response-status-reason-code-schema.d.ts
|
|
2564
3670
|
declare const PeppolInvoiceResponseStatusReasonCodeReason_base: OpaqueSchema<PeppolInvoiceResponseStatusReasonCodeReason, Schema.Struct<{
|
|
2565
|
-
readonly value:
|
|
3671
|
+
readonly value: typeof PeppolOpStatusReason;
|
|
2566
3672
|
/**
|
|
2567
3673
|
* @description List identifier for clarification.
|
|
2568
3674
|
*
|
|
@@ -2572,9 +3678,19 @@ declare const PeppolInvoiceResponseStatusReasonCodeReason_base: OpaqueSchema<Pep
|
|
|
2572
3678
|
*/
|
|
2573
3679
|
readonly listId: Schema.Literal<"OPStatusReason">;
|
|
2574
3680
|
}>>;
|
|
3681
|
+
/**
|
|
3682
|
+
* @description Status clarification reason (`cbc:StatusReasonCode` with `@listId="OPStatusReason"`), a value from the OPStatusReason code list.
|
|
3683
|
+
*
|
|
3684
|
+
* @example
|
|
3685
|
+
* ```ts
|
|
3686
|
+
* { value: 'REF', listId: 'OPStatusReason' }
|
|
3687
|
+
* ```;
|
|
3688
|
+
*
|
|
3689
|
+
* @see {@link PeppolInvoiceResponseStatusReasonCode}
|
|
3690
|
+
*/
|
|
2575
3691
|
declare class PeppolInvoiceResponseStatusReasonCodeReason extends PeppolInvoiceResponseStatusReasonCodeReason_base {}
|
|
2576
3692
|
declare const PeppolInvoiceResponseStatusReasonCodeAction_base: OpaqueSchema<PeppolInvoiceResponseStatusReasonCodeAction, Schema.Struct<{
|
|
2577
|
-
readonly value:
|
|
3693
|
+
readonly value: typeof PeppolOpStatusAction;
|
|
2578
3694
|
/**
|
|
2579
3695
|
* @description List identifier for clarification.
|
|
2580
3696
|
*
|
|
@@ -2584,9 +3700,29 @@ declare const PeppolInvoiceResponseStatusReasonCodeAction_base: OpaqueSchema<Pep
|
|
|
2584
3700
|
*/
|
|
2585
3701
|
readonly listId: Schema.Literal<"OPStatusAction">;
|
|
2586
3702
|
}>>;
|
|
3703
|
+
/**
|
|
3704
|
+
* @description Status clarification action (`cbc:StatusReasonCode` with `@listId="OPStatusAction"`), a value from the OPStatusAction code list.
|
|
3705
|
+
*
|
|
3706
|
+
* @example
|
|
3707
|
+
* ```ts
|
|
3708
|
+
* { value: 'PIN', listId: 'OPStatusAction' }
|
|
3709
|
+
* ```;
|
|
3710
|
+
*
|
|
3711
|
+
* @see {@link PeppolInvoiceResponseStatusReasonCode}
|
|
3712
|
+
*/
|
|
2587
3713
|
declare class PeppolInvoiceResponseStatusReasonCodeAction extends PeppolInvoiceResponseStatusReasonCodeAction_base {}
|
|
2588
|
-
declare const
|
|
2589
|
-
|
|
3714
|
+
declare const PeppolInvoiceResponseStatusReasonCode_base: Schema.Union<readonly [typeof PeppolInvoiceResponseStatusReasonCodeAction, typeof PeppolInvoiceResponseStatusReasonCodeReason]>;
|
|
3715
|
+
/**
|
|
3716
|
+
* @description Union of the accepted status clarification reasons and actions on an invoice response.
|
|
3717
|
+
*
|
|
3718
|
+
* @example
|
|
3719
|
+
* ```ts
|
|
3720
|
+
* { value: 'REF', listId: 'OPStatusReason' }
|
|
3721
|
+
* ```;
|
|
3722
|
+
*
|
|
3723
|
+
* @see {@link PeppolInvoiceResponseDocumentActualResponseStatus}
|
|
3724
|
+
*/
|
|
3725
|
+
declare class PeppolInvoiceResponseStatusReasonCode extends PeppolInvoiceResponseStatusReasonCode_base {}
|
|
2590
3726
|
//#endregion
|
|
2591
3727
|
//#region src/schemas/peppol-invoice-response-document-actual-response-status-schema.d.ts
|
|
2592
3728
|
declare const PeppolInvoiceResponseCondition_base: OpaqueSchema<PeppolInvoiceResponseCondition, Schema.Struct<{
|
|
@@ -2613,6 +3749,16 @@ declare const PeppolInvoiceResponseCondition_base: OpaqueSchema<PeppolInvoiceRes
|
|
|
2613
3749
|
*/
|
|
2614
3750
|
readonly description: Schema.optional<Schema.String>;
|
|
2615
3751
|
}>>;
|
|
3752
|
+
/**
|
|
3753
|
+
* @description Wraps `cac:Condition` inside a status: a detail code and its optional value that further explains the clarification.
|
|
3754
|
+
*
|
|
3755
|
+
* @example
|
|
3756
|
+
* ```ts
|
|
3757
|
+
* { attributeId: 'BT-75', description: 'EU123456789' }
|
|
3758
|
+
* ```;
|
|
3759
|
+
*
|
|
3760
|
+
* @see {@link PeppolInvoiceResponseDocumentActualResponseStatus}
|
|
3761
|
+
*/
|
|
2616
3762
|
declare class PeppolInvoiceResponseCondition extends PeppolInvoiceResponseCondition_base {}
|
|
2617
3763
|
declare const PeppolInvoiceResponseDocumentActualResponseStatus_base: OpaqueSchema<PeppolInvoiceResponseDocumentActualResponseStatus, Schema.Struct<{
|
|
2618
3764
|
/**
|
|
@@ -2622,7 +3768,7 @@ declare const PeppolInvoiceResponseDocumentActualResponseStatus_base: OpaqueSche
|
|
|
2622
3768
|
*
|
|
2623
3769
|
* @name `cbc:StatusReasonCode`
|
|
2624
3770
|
*/
|
|
2625
|
-
readonly statusReasonCode: Schema.optional<
|
|
3771
|
+
readonly statusReasonCode: Schema.optional<typeof PeppolInvoiceResponseStatusReasonCode>;
|
|
2626
3772
|
/**
|
|
2627
3773
|
* @description The description of the clarification given for the invoice status.
|
|
2628
3774
|
*
|
|
@@ -2641,11 +3787,40 @@ declare const PeppolInvoiceResponseDocumentActualResponseStatus_base: OpaqueSche
|
|
|
2641
3787
|
*/
|
|
2642
3788
|
readonly condition: Schema.optional<Schema.$Array<typeof PeppolInvoiceResponseCondition>>;
|
|
2643
3789
|
}>>;
|
|
3790
|
+
/**
|
|
3791
|
+
* @description Wraps `cac:Status` inside an invoice response: an optional clarification code and description plus any condition details.
|
|
3792
|
+
*
|
|
3793
|
+
* @example
|
|
3794
|
+
* ```ts
|
|
3795
|
+
* { statusReasonCode: { value: 'REF', listId: 'OPStatusReason' }, statusReason: 'TAX reference not found' }
|
|
3796
|
+
* ```;
|
|
3797
|
+
*
|
|
3798
|
+
* @see {@link PeppolInvoiceResponseDocumentActualResponse}
|
|
3799
|
+
*/
|
|
2644
3800
|
declare class PeppolInvoiceResponseDocumentActualResponseStatus extends PeppolInvoiceResponseDocumentActualResponseStatus_base {}
|
|
2645
|
-
type InvoiceResponseDocumentActualResponseStatus = PeppolInvoiceResponseDocumentActualResponseStatus;
|
|
2646
3801
|
//#endregion
|
|
2647
3802
|
//#region src/schemas/peppol-invoice-response-document-actual-response-schema.d.ts
|
|
3803
|
+
/**
|
|
3804
|
+
* @description Response codes that require a clarification in `cac:Status`: `UQ`, `RE` and `CA`.
|
|
3805
|
+
*
|
|
3806
|
+
* @example
|
|
3807
|
+
* ```ts
|
|
3808
|
+
* withStatusCodes; // Schema.Literals(['UQ', 'RE', 'CA'])
|
|
3809
|
+
* ```;
|
|
3810
|
+
*
|
|
3811
|
+
* @see {@link PeppolInvoiceResponseDocumentActualResponseWithStatus}
|
|
3812
|
+
*/
|
|
2648
3813
|
declare const withStatusCodes: Schema.Literals<readonly ["UQ", "RE", "CA"]>;
|
|
3814
|
+
/**
|
|
3815
|
+
* @description Response codes that do not require a clarification in `cac:Status`: `AB`, `AP`, `IP` and `PD`.
|
|
3816
|
+
*
|
|
3817
|
+
* @example
|
|
3818
|
+
* ```ts
|
|
3819
|
+
* withoutStatusCodes; // Schema.Literals(['AB', 'AP', 'IP', 'PD'])
|
|
3820
|
+
* ```;
|
|
3821
|
+
*
|
|
3822
|
+
* @see {@link PeppolInvoiceResponseDocumentActualResponseWithoutStatus}
|
|
3823
|
+
*/
|
|
2649
3824
|
declare const withoutStatusCodes: Schema.Literals<readonly ["AB", "AP", "IP", "PD"]>;
|
|
2650
3825
|
declare const PeppolInvoiceResponseDocumentActualResponseWithoutStatus_base: OpaqueSchema<PeppolInvoiceResponseDocumentActualResponseWithoutStatus, Schema.Struct<{
|
|
2651
3826
|
/**
|
|
@@ -2675,6 +3850,16 @@ declare const PeppolInvoiceResponseDocumentActualResponseWithoutStatus_base: Opa
|
|
|
2675
3850
|
*/
|
|
2676
3851
|
readonly status: Schema.optional<Schema.$Array<typeof PeppolInvoiceResponseDocumentActualResponseStatus>>;
|
|
2677
3852
|
}>>;
|
|
3853
|
+
/**
|
|
3854
|
+
* @description Invoice response for statuses that do not require a clarification; the `cac:Status` group is optional.
|
|
3855
|
+
*
|
|
3856
|
+
* @example
|
|
3857
|
+
* ```ts
|
|
3858
|
+
* { responseCode: 'AP', effectiveDate: '2018-08-02' }
|
|
3859
|
+
* ```;
|
|
3860
|
+
*
|
|
3861
|
+
* @see {@link PeppolInvoiceResponseDocumentActualResponse}
|
|
3862
|
+
*/
|
|
2678
3863
|
declare class PeppolInvoiceResponseDocumentActualResponseWithoutStatus extends PeppolInvoiceResponseDocumentActualResponseWithoutStatus_base {}
|
|
2679
3864
|
declare const PeppolInvoiceResponseDocumentActualResponseWithStatus_base: OpaqueSchema<PeppolInvoiceResponseDocumentActualResponseWithStatus, Schema.Struct<{
|
|
2680
3865
|
/**
|
|
@@ -2707,115 +3892,153 @@ declare const PeppolInvoiceResponseDocumentActualResponseWithStatus_base: Opaque
|
|
|
2707
3892
|
*/
|
|
2708
3893
|
readonly status: Schema.$Array<typeof PeppolInvoiceResponseDocumentActualResponseStatus>;
|
|
2709
3894
|
}>>;
|
|
3895
|
+
/**
|
|
3896
|
+
* @description Invoice response for statuses that require a clarification; at least one `cac:Status` group is mandatory.
|
|
3897
|
+
*
|
|
3898
|
+
* @example
|
|
3899
|
+
* ```ts
|
|
3900
|
+
* { responseCode: 'RE', status: [{ statusReason: 'TAX reference not found' }] }
|
|
3901
|
+
* ```;
|
|
3902
|
+
*
|
|
3903
|
+
* @see {@link PeppolInvoiceResponseDocumentActualResponse}
|
|
3904
|
+
*/
|
|
2710
3905
|
declare class PeppolInvoiceResponseDocumentActualResponseWithStatus extends PeppolInvoiceResponseDocumentActualResponseWithStatus_base {}
|
|
2711
|
-
declare const
|
|
2712
|
-
type InvoiceResponseDocumentActualResponse = typeof peppolInvoiceResponseDocumentActualResponseSchema.Type;
|
|
2713
|
-
//#endregion
|
|
2714
|
-
//#region src/schemas/utils/peppol-base-64-schema.d.ts
|
|
3906
|
+
declare const PeppolInvoiceResponseDocumentActualResponse_base: Schema.Union<readonly [typeof PeppolInvoiceResponseDocumentActualResponseWithStatus, typeof PeppolInvoiceResponseDocumentActualResponseWithoutStatus]>;
|
|
2715
3907
|
/**
|
|
2716
|
-
* @description
|
|
2717
|
-
*
|
|
3908
|
+
* @description Union of the invoice response variants selected by `cbc:ResponseCode`: one that requires a clarification and one that does not.
|
|
3909
|
+
*
|
|
3910
|
+
* @example
|
|
3911
|
+
* ```ts
|
|
3912
|
+
* { responseCode: 'AP', effectiveDate: '2018-08-02' }
|
|
3913
|
+
* ```;
|
|
3914
|
+
*
|
|
3915
|
+
* @see {@link PeppolInvoiceResponseDocumentResponse}
|
|
2718
3916
|
*/
|
|
2719
|
-
declare
|
|
2720
|
-
type Base64 = typeof peppolBase64Schema.Type;
|
|
3917
|
+
declare class PeppolInvoiceResponseDocumentActualResponse extends PeppolInvoiceResponseDocumentActualResponse_base {}
|
|
2721
3918
|
//#endregion
|
|
2722
3919
|
//#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
3920
|
/**
|
|
2727
|
-
* @description
|
|
3921
|
+
* @description Formats a quantity and its unit code for a locale. Uses `Intl.NumberFormat` for mapped codes, otherwise the code list name.
|
|
2728
3922
|
*
|
|
2729
|
-
* @
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
*
|
|
3923
|
+
* @example
|
|
3924
|
+
* ```ts
|
|
3925
|
+
* formatQuantityWithUnit(5, 'KGM', 'en-US', 'long'); // '5 kilograms'
|
|
3926
|
+
* formatQuantityWithUnit(10, 'EA'); // '10 each'
|
|
3927
|
+
* ```;
|
|
2734
3928
|
*
|
|
2735
|
-
* @param
|
|
3929
|
+
* @param value - The numeric quantity to format.
|
|
3930
|
+
* @param code - The UN/ECE Rec 20 unit code to render, for example `KGM` or `MTR`.
|
|
3931
|
+
* @param locale - BCP 47 locale tag passed to `Intl.NumberFormat`. Defaults to `'en-US'`.
|
|
3932
|
+
* @param unitDisplay - `Intl` unit display style: `'short'`, `'narrow'`, or `'long'`. Defaults to `'short'`.
|
|
2736
3933
|
*
|
|
2737
|
-
* @returns
|
|
3934
|
+
* @returns The formatted quantity and unit, for example `'5 kilograms'`. Falls back to `<number> <name>` when the code has no `Intl` unit or `Intl`
|
|
3935
|
+
* rejects the unit.
|
|
2738
3936
|
*
|
|
2739
|
-
* @see
|
|
3937
|
+
* @see {@link quantityUnitCodeToIntlUnit}
|
|
2740
3938
|
*/
|
|
2741
|
-
declare
|
|
3939
|
+
declare function formatQuantityWithUnit(value: number, code: string, locale?: string, unitDisplay?: 'short' | 'narrow' | 'long'): string;
|
|
2742
3940
|
//#endregion
|
|
2743
3941
|
//#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
3942
|
/**
|
|
2748
|
-
* @description
|
|
3943
|
+
* @description Returns the human-readable description of a PEPPOL credit note type code (UNCL1001 subset).
|
|
2749
3944
|
*
|
|
2750
|
-
* @
|
|
3945
|
+
* @example
|
|
3946
|
+
* ```ts
|
|
3947
|
+
* getCreditNoteTypeCodeDescription('381'); // 'Credit note'
|
|
3948
|
+
* ```;
|
|
3949
|
+
*
|
|
3950
|
+
* @param code - A valid {@link PeppolCreditNoteTypeCode}, for example `'381'`.
|
|
3951
|
+
*
|
|
3952
|
+
* @returns The description registered for the code, for example `'Credit note'`.
|
|
2751
3953
|
*/
|
|
2752
|
-
|
|
3954
|
+
declare function getCreditNoteTypeCodeDescription(code: PeppolCreditNoteTypeCode): string;
|
|
3955
|
+
//#endregion
|
|
3956
|
+
//#region src/schemas/utils/get-invoice-type-code-description.d.ts
|
|
2753
3957
|
/**
|
|
2754
|
-
* @description
|
|
3958
|
+
* @description Returns the human-readable description of a PEPPOL invoice type code (UNCL1001 subset).
|
|
2755
3959
|
*
|
|
2756
|
-
* @
|
|
3960
|
+
* @example
|
|
3961
|
+
* ```ts
|
|
3962
|
+
* getInvoiceTypeCodeDescription('380'); // 'Commercial invoice'
|
|
3963
|
+
* ```;
|
|
2757
3964
|
*
|
|
2758
|
-
* @
|
|
3965
|
+
* @param code - A valid {@link PeppolInvoiceTypeCode}, for example `'380'`.
|
|
2759
3966
|
*
|
|
2760
|
-
* @
|
|
3967
|
+
* @returns The description registered for the code, for example `'Commercial invoice'`.
|
|
2761
3968
|
*/
|
|
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
3969
|
declare function getInvoiceTypeCodeDescription(code: PeppolInvoiceTypeCode): string;
|
|
2766
3970
|
//#endregion
|
|
2767
3971
|
//#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
3972
|
/**
|
|
2775
|
-
* @description
|
|
3973
|
+
* @description Type guard for PEPPOL credit note type codes (UNCL1001 subset).
|
|
2776
3974
|
*
|
|
2777
|
-
* @
|
|
3975
|
+
* @example
|
|
3976
|
+
* ```ts
|
|
3977
|
+
* isValidCreditNoteTypeCode('381'); // true
|
|
3978
|
+
* isValidCreditNoteTypeCode('UNKNOWN'); // false
|
|
3979
|
+
* ```;
|
|
3980
|
+
*
|
|
3981
|
+
* @param code - The string to test.
|
|
3982
|
+
*
|
|
3983
|
+
* @returns `true` when `code` is a known credit note type code, narrowing it to {@link PeppolCreditNoteTypeCode}; otherwise `false`.
|
|
2778
3984
|
*/
|
|
2779
|
-
|
|
3985
|
+
declare function isValidCreditNoteTypeCode(code: string): code is PeppolCreditNoteTypeCode;
|
|
3986
|
+
//#endregion
|
|
3987
|
+
//#region src/schemas/utils/is-valid-invoice-type-code.d.ts
|
|
2780
3988
|
/**
|
|
2781
|
-
* @description
|
|
3989
|
+
* @description Type guard for PEPPOL invoice type codes (UNCL1001 subset).
|
|
2782
3990
|
*
|
|
2783
|
-
* @
|
|
3991
|
+
* @example
|
|
3992
|
+
* ```ts
|
|
3993
|
+
* isValidInvoiceTypeCode('380'); // true
|
|
3994
|
+
* isValidInvoiceTypeCode('UNKNOWN'); // false
|
|
3995
|
+
* ```;
|
|
2784
3996
|
*
|
|
2785
|
-
* @
|
|
3997
|
+
* @param code - The string to test.
|
|
2786
3998
|
*
|
|
2787
|
-
* @
|
|
3999
|
+
* @returns `true` when `code` is a known invoice type code, narrowing it to {@link PeppolInvoiceTypeCode}; otherwise `false`.
|
|
2788
4000
|
*/
|
|
2789
|
-
declare
|
|
4001
|
+
declare function isValidInvoiceTypeCode(code: string): code is PeppolInvoiceTypeCode;
|
|
2790
4002
|
//#endregion
|
|
2791
4003
|
//#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
4004
|
/**
|
|
2802
|
-
* @description
|
|
2803
|
-
*
|
|
2804
|
-
* @param error - The custom error message to use when validation fails.
|
|
4005
|
+
* @description Type guard for PEPPOL business process identifiers of the form `<scheme>::<value>`.
|
|
2805
4006
|
*
|
|
2806
|
-
* @
|
|
4007
|
+
* @example
|
|
4008
|
+
* ```ts
|
|
4009
|
+
* isValidProcess('cenbii-procid-ubl::urn:fdc:peppol.eu:2017:poacc:billing:01:1.0'); // true
|
|
4010
|
+
* isValidProcess('cenbii-procid-ubl::urn:not:a:process'); // false
|
|
4011
|
+
* ```;
|
|
2807
4012
|
*
|
|
2808
|
-
* @
|
|
2809
|
-
* - BR-CL-23: Unit of measure code MUST be a valid UN/ECE Rec 20 code.
|
|
4013
|
+
* @param code - The process identifier to test.
|
|
2810
4014
|
*
|
|
2811
|
-
* @
|
|
4015
|
+
* @returns `true` when `code` appears in {@link processesList}, narrowing it to {@link PeppolProcesses}; otherwise `false`.
|
|
2812
4016
|
*/
|
|
2813
|
-
declare
|
|
4017
|
+
declare function isValidProcess(code: string): code is PeppolProcesses;
|
|
2814
4018
|
//#endregion
|
|
2815
4019
|
//#region src/schemas/utils/quantity-unit-code-to-intl-unit.d.ts
|
|
4020
|
+
/**
|
|
4021
|
+
* @description String union of `Intl.NumberFormat` unit identifiers for base units such as length, area, volume, mass, and temperature.
|
|
4022
|
+
*/
|
|
2816
4023
|
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';
|
|
4024
|
+
/**
|
|
4025
|
+
* @description String union of `Intl.NumberFormat` unit identifiers for time units, used on their own and as the denominator of a rate.
|
|
4026
|
+
*/
|
|
2817
4027
|
type TimeIntlUnit = 'nanosecond' | 'microsecond' | 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';
|
|
4028
|
+
/**
|
|
4029
|
+
* @description Any `Intl.NumberFormat` unit identifier supported by this module: a {@link BaseIntlUnit}, a {@link TimeIntlUnit}, or a rate such as
|
|
4030
|
+
* `'kilometer-per-hour'`.
|
|
4031
|
+
*/
|
|
2818
4032
|
type IntlUnit = BaseIntlUnit | TimeIntlUnit | `${BaseIntlUnit}-per-${TimeIntlUnit}`;
|
|
4033
|
+
/**
|
|
4034
|
+
* @description Maps UN/ECE Rec 20 quantity unit codes to `Intl.NumberFormat` unit identifiers. Unmapped codes are omitted.
|
|
4035
|
+
*
|
|
4036
|
+
* @example
|
|
4037
|
+
* ```ts
|
|
4038
|
+
* quantityToIntlUnitMap.KGM; // 'kilogram'
|
|
4039
|
+
* quantityToIntlUnitMap.KMH; // 'kilometer-per-hour'
|
|
4040
|
+
* ```;
|
|
4041
|
+
*/
|
|
2819
4042
|
declare const quantityToIntlUnitMap: {
|
|
2820
4043
|
CMT: "centimeter";
|
|
2821
4044
|
MTR: "meter";
|
|
@@ -2881,14 +4104,35 @@ declare const quantityToIntlUnitMap: {
|
|
|
2881
4104
|
'4U': "pound-per-hour";
|
|
2882
4105
|
'4M': IntlUnit;
|
|
2883
4106
|
};
|
|
4107
|
+
/**
|
|
4108
|
+
* @description Looks up the `Intl.NumberFormat` unit identifier for a UN/ECE Rec 20 quantity unit code.
|
|
4109
|
+
*
|
|
4110
|
+
* @example
|
|
4111
|
+
* ```ts
|
|
4112
|
+
* quantityUnitCodeToIntlUnit('KGM'); // 'kilogram'
|
|
4113
|
+
* quantityUnitCodeToIntlUnit('EA'); // undefined
|
|
4114
|
+
* ```;
|
|
4115
|
+
*
|
|
4116
|
+
* @param code - A quantity unit code, typed as {@link PeppolQuantityUnitCode} but accepting any string.
|
|
4117
|
+
*
|
|
4118
|
+
* @returns The matching {@link IntlUnit}, or `undefined` when the code has no `Intl` unit mapping.
|
|
4119
|
+
*
|
|
4120
|
+
* @see {@link quantityToIntlUnitMap}
|
|
4121
|
+
*/
|
|
2884
4122
|
declare function quantityUnitCodeToIntlUnit(code: PeppolQuantityUnitCode | (string & {})): IntlUnit | undefined;
|
|
2885
4123
|
//#endregion
|
|
2886
4124
|
//#region src/schemas/utils/peppol-vat-regex-schema.d.ts
|
|
4125
|
+
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
4126
|
/**
|
|
2888
4127
|
* @description EU VAT identification number (one member per member-state prefix/pattern). Effect port of `vatRegexSchema` (`z.union([...])` of
|
|
2889
4128
|
* `z.string().check(...)` members): each member keeps its original prefix + pattern checks as `Schema.String.check` filters.
|
|
4129
|
+
*
|
|
4130
|
+
* @example
|
|
4131
|
+
* ```ts
|
|
4132
|
+
* const value = 'DE123456789';
|
|
4133
|
+
* ```;
|
|
2890
4134
|
*/
|
|
2891
|
-
declare
|
|
4135
|
+
declare class PeppolVatRegex extends PeppolVatRegex_base {}
|
|
2892
4136
|
//#endregion
|
|
2893
4137
|
//#region src/schemas/peppol-invoice-response-schema.d.ts
|
|
2894
4138
|
declare const PeppolInvoiceResponseDocumentResponsePartyName_base: OpaqueSchema<PeppolInvoiceResponseDocumentResponsePartyName, Schema.Struct<{
|
|
@@ -2902,6 +4146,16 @@ declare const PeppolInvoiceResponseDocumentResponsePartyName_base: OpaqueSchema<
|
|
|
2902
4146
|
*/
|
|
2903
4147
|
readonly name: Schema.String;
|
|
2904
4148
|
}>>;
|
|
4149
|
+
/**
|
|
4150
|
+
* @description Wraps `cac:PartyName` for the seller or buyer on an invoice response: the party's legal or trading name.
|
|
4151
|
+
*
|
|
4152
|
+
* @example
|
|
4153
|
+
* ```ts
|
|
4154
|
+
* { name: 'Seller Business Name AS' }
|
|
4155
|
+
* ```;
|
|
4156
|
+
*
|
|
4157
|
+
* @see {@link PeppolInvoiceResponseDocumentResponseParty}
|
|
4158
|
+
*/
|
|
2905
4159
|
declare class PeppolInvoiceResponseDocumentResponsePartyName extends PeppolInvoiceResponseDocumentResponsePartyName_base {}
|
|
2906
4160
|
declare const PeppolInvoiceResponseParty_base: OpaqueSchema<PeppolInvoiceResponseParty, Schema.Struct<{
|
|
2907
4161
|
readonly endpointId: Schema.optional<typeof PeppolIdentifier>;
|
|
@@ -2910,7 +4164,17 @@ declare const PeppolInvoiceResponseParty_base: OpaqueSchema<PeppolInvoiceRespons
|
|
|
2910
4164
|
readonly registrationName: Schema.String;
|
|
2911
4165
|
}>;
|
|
2912
4166
|
}>>;
|
|
2913
|
-
|
|
4167
|
+
/**
|
|
4168
|
+
* @description Party used for the sender and receiver of an invoice response. Extends {@link PeppolMessageLevelResponseParty}.
|
|
4169
|
+
*
|
|
4170
|
+
* @example
|
|
4171
|
+
* ```ts
|
|
4172
|
+
* { partyLegalEntity: { registrationName: 'Seller Business Name AS' } }
|
|
4173
|
+
* ```;
|
|
4174
|
+
*
|
|
4175
|
+
* @see {@link PeppolInvoiceResponse}
|
|
4176
|
+
*/
|
|
4177
|
+
declare class PeppolInvoiceResponseParty extends PeppolInvoiceResponseParty_base {}
|
|
2914
4178
|
declare const PeppolInvoiceResponseSenderParty_base: OpaqueSchema<PeppolInvoiceResponseSenderParty, Schema.Struct<{
|
|
2915
4179
|
readonly endpointId: Schema.optional<typeof PeppolIdentifier>;
|
|
2916
4180
|
readonly partyIdentification: Schema.optional<typeof PeppolIdentifier>;
|
|
@@ -2919,6 +4183,16 @@ declare const PeppolInvoiceResponseSenderParty_base: OpaqueSchema<PeppolInvoiceR
|
|
|
2919
4183
|
}>;
|
|
2920
4184
|
readonly contact: Schema.optional<typeof PeppolContact>;
|
|
2921
4185
|
}>>;
|
|
4186
|
+
/**
|
|
4187
|
+
* @description Sender party of an invoice response. Extends {@link PeppolInvoiceResponseParty} with optional `cac:Contact` details.
|
|
4188
|
+
*
|
|
4189
|
+
* @example
|
|
4190
|
+
* ```ts
|
|
4191
|
+
* { partyLegalEntity: { registrationName: 'Seller Business Name AS' } }
|
|
4192
|
+
* ```;
|
|
4193
|
+
*
|
|
4194
|
+
* @see {@link PeppolInvoiceResponse}
|
|
4195
|
+
*/
|
|
2922
4196
|
declare class PeppolInvoiceResponseSenderParty extends PeppolInvoiceResponseSenderParty_base {}
|
|
2923
4197
|
declare const PeppolInvoiceResponseDocumentResponseParty_base: OpaqueSchema<PeppolInvoiceResponseDocumentResponseParty, Schema.Struct<{
|
|
2924
4198
|
/**
|
|
@@ -2937,7 +4211,6 @@ declare const PeppolInvoiceResponseDocumentResponseParty_base: OpaqueSchema<Pepp
|
|
|
2937
4211
|
* @description Party schema used under `cac:DocumentReference/(cac:IssuerParty|cac:RecipientParty)`
|
|
2938
4212
|
*/
|
|
2939
4213
|
declare class PeppolInvoiceResponseDocumentResponseParty extends PeppolInvoiceResponseDocumentResponseParty_base {}
|
|
2940
|
-
type PeppolInvoiceDocumentResponseParty = PeppolInvoiceResponseDocumentResponseParty;
|
|
2941
4214
|
declare const PeppolInvoiceResponseDocumentReference_base: OpaqueSchema<PeppolInvoiceResponseDocumentReference, Schema.Struct<{
|
|
2942
4215
|
/**
|
|
2943
4216
|
* @description An identifier for the invoice that the status applies to. The invoice identifier must be of the main invoice number that appears in the invoice
|
|
@@ -2968,8 +4241,18 @@ declare const PeppolInvoiceResponseDocumentReference_base: OpaqueSchema<PeppolIn
|
|
|
2968
4241
|
*
|
|
2969
4242
|
* @summary Identifier type code
|
|
2970
4243
|
*/
|
|
2971
|
-
readonly documentTypeCode:
|
|
4244
|
+
readonly documentTypeCode: typeof PeppolDocumentTypeCode;
|
|
2972
4245
|
}>>;
|
|
4246
|
+
/**
|
|
4247
|
+
* @description Wraps `cac:DocumentReference` inside an invoice response: identifies the invoice the status applies to.
|
|
4248
|
+
*
|
|
4249
|
+
* @example
|
|
4250
|
+
* ```ts
|
|
4251
|
+
* { id: 'inv-99876', issueDate: '2018-08-01', documentTypeCode: '380' }
|
|
4252
|
+
* ```;
|
|
4253
|
+
*
|
|
4254
|
+
* @see {@link PeppolInvoiceResponseDocumentResponse}
|
|
4255
|
+
*/
|
|
2973
4256
|
declare class PeppolInvoiceResponseDocumentReference extends PeppolInvoiceResponseDocumentReference_base {}
|
|
2974
4257
|
declare const PeppolInvoiceResponseDocumentResponse_base: OpaqueSchema<PeppolInvoiceResponseDocumentResponse, Schema.Struct<{
|
|
2975
4258
|
/**
|
|
@@ -2979,7 +4262,7 @@ declare const PeppolInvoiceResponseDocumentResponse_base: OpaqueSchema<PeppolInv
|
|
|
2979
4262
|
*
|
|
2980
4263
|
* @cardinality (1..1)
|
|
2981
4264
|
*/
|
|
2982
|
-
readonly response:
|
|
4265
|
+
readonly response: typeof PeppolInvoiceResponseDocumentActualResponse;
|
|
2983
4266
|
/**
|
|
2984
4267
|
* @summary Document reference
|
|
2985
4268
|
*
|
|
@@ -2999,6 +4282,16 @@ declare const PeppolInvoiceResponseDocumentResponse_base: OpaqueSchema<PeppolInv
|
|
|
2999
4282
|
*/
|
|
3000
4283
|
readonly recipientParty: Schema.optional<typeof PeppolInvoiceResponseDocumentResponseParty>;
|
|
3001
4284
|
}>>;
|
|
4285
|
+
/**
|
|
4286
|
+
* @description Wraps `cac:DocumentResponse` inside an invoice response: the response, the referenced invoice and optional parties.
|
|
4287
|
+
*
|
|
4288
|
+
* @example
|
|
4289
|
+
* ```ts
|
|
4290
|
+
* { response: { responseCode: 'AP', effectiveDate: '2018-08-02' }, documentReference: { id: 'inv-99876', documentTypeCode: '380' } }
|
|
4291
|
+
* ```;
|
|
4292
|
+
*
|
|
4293
|
+
* @see {@link PeppolInvoiceResponse}
|
|
4294
|
+
*/
|
|
3002
4295
|
declare class PeppolInvoiceResponseDocumentResponse extends PeppolInvoiceResponseDocumentResponse_base {}
|
|
3003
4296
|
declare const PeppolInvoiceResponse_base: OpaqueSchema<PeppolInvoiceResponse, Schema.Struct<{
|
|
3004
4297
|
readonly customizationId: Schema.String;
|
|
@@ -3041,455 +4334,140 @@ declare const PeppolInvoiceResponse_base: OpaqueSchema<PeppolInvoiceResponse, Sc
|
|
|
3041
4334
|
declare class PeppolInvoiceResponse extends PeppolInvoiceResponse_base {}
|
|
3042
4335
|
//#endregion
|
|
3043
4336
|
//#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
4337
|
/**
|
|
3238
|
-
* @description
|
|
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'`.
|
|
4338
|
+
* @description Type guard that returns `true` when a decoded value is a {@link PeppolInvoice}.
|
|
3253
4339
|
*
|
|
3254
|
-
* @
|
|
3255
|
-
*
|
|
3256
|
-
*
|
|
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
|
-
/**
|
|
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.
|
|
3295
|
-
*
|
|
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.
|
|
4340
|
+
* @example
|
|
4341
|
+
* ```ts
|
|
4342
|
+
* isPeppolInvoice(doc); // true for a UBL Invoice
|
|
4343
|
+
* ```;
|
|
3306
4344
|
*
|
|
3307
|
-
* @see
|
|
4345
|
+
* @see {@link PeppolDocumentSchema}
|
|
3308
4346
|
*/
|
|
3309
|
-
|
|
4347
|
+
declare const isPeppolInvoice: <I>(input: I) => input is I & PeppolInvoice;
|
|
3310
4348
|
/**
|
|
3311
|
-
* @description
|
|
3312
|
-
*
|
|
3313
|
-
* @param error - The custom error message to use when validation fails. Defaults to `'Invalid ICD code provided'`.
|
|
4349
|
+
* @description Type guard that returns `true` when a decoded value is a {@link PeppolCreditNote}.
|
|
3314
4350
|
*
|
|
3315
|
-
* @
|
|
3316
|
-
*
|
|
3317
|
-
*
|
|
3318
|
-
*
|
|
3319
|
-
*
|
|
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).
|
|
4351
|
+
* @example
|
|
4352
|
+
* ```ts
|
|
4353
|
+
* isPeppolCreditNote(doc); // true for a UBL CreditNote
|
|
4354
|
+
* ```;
|
|
3327
4355
|
*
|
|
3328
|
-
* @see
|
|
4356
|
+
* @see {@link PeppolDocumentSchema}
|
|
3329
4357
|
*/
|
|
3330
|
-
|
|
4358
|
+
declare const isPeppolCreditNote: <I>(input: I) => input is I & PeppolCreditNote;
|
|
3331
4359
|
/**
|
|
3332
|
-
* @description
|
|
3333
|
-
*
|
|
3334
|
-
* @param error - The custom error message to use when validation fails.
|
|
4360
|
+
* @description Type guard that returns `true` when a decoded value is a {@link PeppolMessageLevelResponse}.
|
|
3335
4361
|
*
|
|
3336
|
-
* @
|
|
3337
|
-
*
|
|
3338
|
-
*
|
|
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.
|
|
4362
|
+
* @example
|
|
4363
|
+
* ```ts
|
|
4364
|
+
* isPeppolMessageLevelResponse(doc); // true for an MLR ApplicationResponse
|
|
4365
|
+
* ```;
|
|
3345
4366
|
*
|
|
3346
|
-
* @see
|
|
4367
|
+
* @see {@link PeppolDocumentSchema}
|
|
3347
4368
|
*/
|
|
3348
|
-
|
|
4369
|
+
declare const isPeppolMessageLevelResponse: <I>(input: I) => input is I & PeppolMessageLevelResponse;
|
|
3349
4370
|
/**
|
|
3350
|
-
* @description
|
|
3351
|
-
*
|
|
3352
|
-
* @param error - The custom error message to use when validation fails.
|
|
3353
|
-
*
|
|
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.
|
|
4371
|
+
* @description Type guard that returns `true` when a decoded value is a {@link PeppolInvoiceResponse}.
|
|
3358
4372
|
*
|
|
3359
|
-
* @
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
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.
|
|
4373
|
+
* @example
|
|
4374
|
+
* ```ts
|
|
4375
|
+
* isPeppolInvoiceResponse(doc); // true for an invoice response ApplicationResponse
|
|
4376
|
+
* ```;
|
|
3366
4377
|
*
|
|
3367
|
-
* @see
|
|
4378
|
+
* @see {@link PeppolDocumentSchema}
|
|
3368
4379
|
*/
|
|
3369
|
-
|
|
4380
|
+
declare const isPeppolInvoiceResponse: <I>(input: I) => input is I & PeppolInvoiceResponse;
|
|
4381
|
+
declare const PeppolDocumentSchema_base: Schema.decodeTo<Schema.Union<readonly [typeof PeppolInvoice, typeof PeppolCreditNote, typeof PeppolMessageLevelResponse, typeof PeppolInvoiceResponse]>, Schema.String, never, never>;
|
|
3370
4382
|
/**
|
|
3371
|
-
* @description
|
|
3372
|
-
*
|
|
3373
|
-
*
|
|
3374
|
-
*
|
|
3375
|
-
* @returns An Effect schema that accepts only valid MIME types.
|
|
4383
|
+
* @description Union of every supported PEPPOL business document. Members discriminate cleanly: invoice vs credit note via `invoiceLines`/`creditNoteLines`,
|
|
4384
|
+
* message-level vs invoice response via the `profileId` literal. Decodes and encodes XML strings by dispatching on the root element;
|
|
4385
|
+
* `ApplicationResponse` is split on `cbc:ProfileID`.
|
|
3376
4386
|
*
|
|
3377
|
-
* @
|
|
3378
|
-
*
|
|
4387
|
+
* @example
|
|
4388
|
+
* ```ts
|
|
4389
|
+
* const doc = Schema.decodeUnknownSync(PeppolDocumentSchema)(xml); // decoded document union
|
|
4390
|
+
* ```;
|
|
3379
4391
|
*
|
|
3380
|
-
* @see
|
|
4392
|
+
* @see {@link PeppolDocumentDecoded}
|
|
4393
|
+
* @see {@link PeppolDocumentEncoded}
|
|
3381
4394
|
*/
|
|
3382
|
-
declare
|
|
3383
|
-
//#endregion
|
|
3384
|
-
//#region src/schemas/values/op-status-action-schema.d.ts
|
|
4395
|
+
declare class PeppolDocumentSchema extends PeppolDocumentSchema_base {}
|
|
3385
4396
|
/**
|
|
3386
|
-
* @description
|
|
3387
|
-
*
|
|
3388
|
-
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/OPStatusAction/
|
|
4397
|
+
* @description Encoded form of {@link PeppolDocumentSchema}: the XML string representation.
|
|
3389
4398
|
*/
|
|
3390
|
-
type
|
|
4399
|
+
type PeppolDocumentEncoded = Schema.Codec.Encoded<typeof PeppolDocumentSchema>;
|
|
3391
4400
|
/**
|
|
3392
|
-
* @description
|
|
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/
|
|
4401
|
+
* @description Decoded form of {@link PeppolDocumentSchema}: the union of supported document classes.
|
|
3399
4402
|
*/
|
|
3400
|
-
|
|
3401
|
-
//#endregion
|
|
3402
|
-
//#region src/schemas/values/op-status-reason-schema.d.ts
|
|
4403
|
+
type PeppolDocumentDecoded = Schema.Schema.Type<typeof PeppolDocumentSchema>;
|
|
3403
4404
|
/**
|
|
3404
|
-
* @description
|
|
3405
|
-
*
|
|
3406
|
-
* @see https://docs.peppol.eu/poacc/billing/3.0/codelist/OPStatusReason/
|
|
4405
|
+
* @description This defines the types of documents that are sent/received through the peppol network.
|
|
3407
4406
|
*/
|
|
3408
|
-
type
|
|
4407
|
+
type PeppolDocument = PeppolInvoice | PeppolCreditNote;
|
|
3409
4408
|
/**
|
|
3410
|
-
* @description
|
|
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/
|
|
4409
|
+
* @description This defines the types of message that are sent/received through the peppol network.
|
|
3417
4410
|
*/
|
|
3418
|
-
|
|
3419
|
-
//#endregion
|
|
3420
|
-
//#region src/schemas/values/participant-identifier-code-schema.d.ts
|
|
4411
|
+
type PeppolMessage = PeppolMessageLevelResponse | PeppolInvoiceResponse;
|
|
3421
4412
|
/**
|
|
3422
|
-
* @description
|
|
3423
|
-
*
|
|
3424
|
-
* @see https://docs.peppol.eu/poacc/billing/3.0/
|
|
4413
|
+
* @description Every document type supported by {@link PeppolDocumentSchema}: the billing documents and the response messages.
|
|
3425
4414
|
*/
|
|
3426
|
-
type
|
|
4415
|
+
type PeppolAllDocuments = PeppolDocument | PeppolMessage;
|
|
3427
4416
|
/**
|
|
3428
|
-
* @description
|
|
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.
|
|
4417
|
+
* @description A line from either a {@link PeppolInvoice} or a {@link PeppolCreditNote}.
|
|
3433
4418
|
*/
|
|
3434
|
-
|
|
4419
|
+
type PeppolDocumentLine = PeppolInvoiceLine | PeppolCreditNoteLine;
|
|
3435
4420
|
//#endregion
|
|
3436
|
-
//#region src/schemas/
|
|
4421
|
+
//#region src/schemas/fields/default-customization-id.d.ts
|
|
3437
4422
|
/**
|
|
3438
|
-
* @description
|
|
3439
|
-
*
|
|
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.
|
|
4423
|
+
* @description The default PEPPOL BIS Billing 3.0 customization identifier, which identifies the EN 16931 compliant billing rule set. Used as the decoding default
|
|
4424
|
+
* for the `customizationId` field of {@link PeppolBillingBase}.
|
|
3446
4425
|
*
|
|
3447
|
-
* @
|
|
4426
|
+
* @example
|
|
4427
|
+
* ```ts
|
|
4428
|
+
* DEFAULT_CUSTOMIZATION_ID; // 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0'
|
|
4429
|
+
* ```;
|
|
3448
4430
|
*/
|
|
3449
|
-
declare const
|
|
4431
|
+
declare const DEFAULT_CUSTOMIZATION_ID: 'urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0';
|
|
3450
4432
|
//#endregion
|
|
3451
|
-
//#region src/schemas/
|
|
4433
|
+
//#region src/schemas/fields/default-profile-id.d.ts
|
|
3452
4434
|
/**
|
|
3453
|
-
* @description
|
|
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'`.
|
|
4435
|
+
* @description The default PEPPOL BIS Billing 3.0 profile identifier, which identifies the billing process the document follows. Used as the decoding default for
|
|
4436
|
+
* the `profileId` field of {@link PeppolBillingBase}.
|
|
3457
4437
|
*
|
|
3458
|
-
* @
|
|
3459
|
-
*
|
|
3460
|
-
*
|
|
3461
|
-
*
|
|
4438
|
+
* @example
|
|
4439
|
+
* ```ts
|
|
4440
|
+
* DEFAULT_PROFILE_ID; // 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0'
|
|
4441
|
+
* ```;
|
|
3462
4442
|
*/
|
|
3463
|
-
declare
|
|
4443
|
+
declare const DEFAULT_PROFILE_ID: 'urn:fdc:peppol.eu:2017:poacc:billing:01:1.0';
|
|
3464
4444
|
//#endregion
|
|
3465
|
-
//#region src/schemas/
|
|
4445
|
+
//#region src/schemas/fields/peppol-reference-schema.d.ts
|
|
4446
|
+
declare const PeppolReferenceId_base: OpaqueSchema<PeppolReferenceId, Schema.Struct<{
|
|
4447
|
+
readonly id: Schema.String;
|
|
4448
|
+
}>>;
|
|
3466
4449
|
/**
|
|
3467
|
-
* @description A
|
|
4450
|
+
* @description A reference identifier, such as an order or sales order reference.
|
|
3468
4451
|
*
|
|
3469
|
-
* @
|
|
4452
|
+
* @example
|
|
4453
|
+
* ```ts
|
|
4454
|
+
* { id: '123' }
|
|
4455
|
+
* ```;
|
|
3470
4456
|
*/
|
|
3471
|
-
|
|
4457
|
+
declare class PeppolReferenceId extends PeppolReferenceId_base {}
|
|
3472
4458
|
/**
|
|
3473
|
-
* @description
|
|
3474
|
-
*
|
|
3475
|
-
* @param error - The custom error message to use when validation fails.
|
|
3476
|
-
*
|
|
3477
|
-
* @returns An Effect schema that accepts only valid VAT exemption reason codes.
|
|
4459
|
+
* @description A schema for an optional reference identifier, accepting either {@link PeppolReferenceId} or `undefined`.
|
|
3478
4460
|
*
|
|
3479
|
-
* @
|
|
3480
|
-
*
|
|
3481
|
-
*
|
|
3482
|
-
*
|
|
4461
|
+
* @example
|
|
4462
|
+
* ```ts
|
|
4463
|
+
* peppolReferenceSchema; // Schema.Union([PeppolReferenceId, Schema.Undefined])
|
|
4464
|
+
* ```;
|
|
3483
4465
|
*/
|
|
3484
|
-
declare const
|
|
3485
|
-
//#endregion
|
|
3486
|
-
//#region src/schemas/values/vat-date-code-schema.d.ts
|
|
3487
|
-
type PeppolVatDateCode = VatDateCodesKeys;
|
|
4466
|
+
declare const peppolReferenceSchema: Schema.Union<readonly [typeof PeppolReferenceId, Schema.Undefined]>;
|
|
3488
4467
|
/**
|
|
3489
|
-
* @
|
|
3490
|
-
* - PEPPOL-EN16931-CL006: Invoice period description code must be according to UNCL 2005 D.16B.
|
|
4468
|
+
* @description The decoded type of {@link peppolReferenceSchema}, either a {@link PeppolReferenceId} or `undefined`.
|
|
3491
4469
|
*/
|
|
3492
|
-
|
|
4470
|
+
type PeppolReferenceSchema = Schema.Schema.Type<typeof peppolReferenceSchema>;
|
|
3493
4471
|
//#endregion
|
|
3494
|
-
export {
|
|
3495
|
-
//# sourceMappingURL=index-
|
|
4472
|
+
export { PeppolDocumentResponseDocument as $, PeppolAmountEncoded as $n, PeppolDocumentType as $t, isValidProcess as A, PeppolVatDateCode as An, PeppolContractDocumentReference as At, withoutStatusCodes as B, PeppolBillingReference as Bn, PeppolVatexCode as Bt, PeppolInvoiceResponseSenderParty as C, PeppolPartyTaxSchemeId as Cn, PeppolInvoiceLinePeriod as Ct, TimeIntlUnit as D, PeppolOrderReference as Dn, PeppolLineAllowanceChargeEncoded as Dt, IntlUnit as E, PeppolContact as En, PeppolLineAllowanceCharge as Et, formatQuantityWithUnit as F, PeppolAddress as Fn, PeppolTaxSubTotal as Ft, PeppolInvoiceResponseStatusReasonCodeReason as G, PeppolAllowanceChargeEncoded as Gn, PeppolParticipantIdentifierCode as Gt, PeppolInvoiceResponseDocumentActualResponseStatus as H, BaseAllowanceCharge as Hn, processFromDocumentTypeSchema as Ht, PeppolInvoiceResponseDocumentActualResponse as I, PeppolAddressLine as In, PeppolTaxSubTotalCategory as It, PeppolMessageLevelResponseDocumentResponse as J, PeppolDutyTaxFeeCategoryCode as Jn, PeppolItemClassificationCode as Jt, PeppolMessageLevelResponse as K, PeppolCharge as Kn, PeppolOpStatusReason as Kt, PeppolInvoiceResponseDocumentActualResponseWithStatus as L, PeppolCountryCode as Ln, PeppolTaxSubTotalCategoryEncoded as Lt, isValidCreditNoteTypeCode as M, PeppolDeliveryLocation as Mn, PeppolOriginatorDocumentReference as Mt, getInvoiceTypeCodeDescription as N, PeppolDeliveryParty as Nn, PeppolReceiptDocumentReference as Nt, quantityToIntlUnitMap as O, PeppolLegalMonetaryTotal as On, PeppolLineCharge as Ot, getCreditNoteTypeCodeDescription as P, PeppolDeliveryPartyPartyName as Pn, PeppolTaxTotal as Pt, PeppolStatus as Q, PeppolAmount as Qn, PeppolDocumentTypeScheme as Qt, PeppolInvoiceResponseDocumentActualResponseWithoutStatus as R, PeppolCountryCodeValue as Rn, PeppolTaxCategory as Rt, PeppolInvoiceResponseParty as S, PeppolPartyTaxScheme as Sn, PeppolItemClassification as St, BaseIntlUnit as T, PeppolIdentifier as Tn, PeppolLineAllowance as Tt, PeppolInvoiceResponseStatusReasonCode as U, PeppolAllowance as Un, PeppolProcess as Ut, PeppolInvoiceResponseCondition as V, PeppolInvoiceDocumentReference as Vn, PeppolQuantityUnitCode as Vt, PeppolInvoiceResponseStatusReasonCodeAction as W, PeppolAllowanceCharge as Wn, PeppolProcesses as Wt, PeppolLineReference as X, PeppolChargeReasonCode as Xn, PeppolInvoiceStatusCodes as Xt, PeppolDocumentResponseLineResponse as Y, PeppolDutyTaxFeeCategoryCodeEncoded as Yn, PeppolInvoiceTypeCode as Yt, PeppolDocumentResponseLineResponseContent as Z, PeppolAllowanceChargeReasonCode as Zn, PeppolDocumentTypeValue as Zt, PeppolInvoiceResponse as _, PeppolPartyEndpointId as _n, PeppolCommodityClassifications as _t, DEFAULT_CUSTOMIZATION_ID as a, PeppolCardAccount as an, PeppolId as ar, PeppolInvoice as at, PeppolInvoiceResponseDocumentResponseParty as b, PeppolPartySchema as bn, PeppolSellersItemIdentification as bt, PeppolDocumentDecoded as c, PeppolPaymentMandate as cn, PeppolMimeCode as cr, PeppolInvoiceLineEncoded as ct, PeppolDocumentSchema as d, PeppolPaymentMeansCode as dn, PeppolLinePrice as dt, PeppolDocumentTypeCode as en, PeppolCurrencyCode as er, PeppolDocumentResponseDocumentReference as et, PeppolMessage as f, PeppolPaymentMeansCodeValue as fn, PeppolQuantity as ft, isPeppolMessageLevelResponse as g, PeppolPayeePartyName as gn, PeppolBuyersItemIdentification as gt, isPeppolInvoiceResponse as h, PeppolPayeePartyLegalEntity as hn, PeppolAdditionalItemProperties as ht, DEFAULT_PROFILE_ID as i, PeppolPaymentTerms as in, PeppolAttachmentExternalReference as ir, PeppolCreditNoteLineEncoded as it, isValidInvoiceTypeCode as j, PeppolDelivery as jn, PeppolDespatchDocumentReference as jt, quantityUnitCodeToIntlUnit as k, PeppolInvoicePeriod as kn, PeppolBillingBase as kt, PeppolDocumentEncoded as l, PeppolPaymentMandatePayerFinancialAccountId as ln, PeppolBase64 as lr, PeppolBaseLine as lt, isPeppolInvoice as m, PeppolPayeePartyIdentification as mn, PriceAllowanceCharge as mt, PeppolReferenceSchema as n, PeppolApplicationResponseTypeCode as nn, PeppolAdditionalDocumentReference as nr, PeppolCreditNote as nt, PeppolAllDocuments as o, PeppolPayeeFinancialAccount as on, PeppolAdditionalDocumentReferenceCode as or, PeppolProjectReference as ot, isPeppolCreditNote as p, PeppolPayeeParty as pn, PeppolLinePriceAllowanceCharge as pt, PeppolXsdTime as q, PeppolTaxCategoryTaxSchemeId as qn, PeppolOpStatusAction as qt, peppolReferenceSchema as r, PeppolTaxRepresentative as rn, PeppolAttachment as rr, PeppolCreditNoteLine as rt, PeppolDocument as s, PeppolPayeeFinancialAccountFinancialInstitutionBranch as sn, PeppolBinaryObject as sr, PeppolInvoiceLine as st, PeppolReferenceId as t, PeppolCreditNoteTypeCode as tn, PeppolCurrencyCodeEncoded as tr, PeppolMessageLevelResponseParty as tt, PeppolDocumentLine as u, PeppolPaymentMeans as un, PeppolIsoDateString as ur, PeppolOrderLineReference as ut, PeppolInvoiceResponseDocumentReference as v, PeppolPartyIdentification as vn, PeppolLineItem as vt, PeppolVatRegex as w, PeppolPartyLegalEntity as wn, BaseLineAllowanceCharge as wt, PeppolInvoiceResponseDocumentResponsePartyName as x, PeppolElectronicAddressCode as xn, PeppolStandardItemIdentification as xt, PeppolInvoiceResponseDocumentResponse as y, PeppolPartyName as yn, PeppolOriginCountryCode as yt, withStatusCodes as z, PeppolIcdCode as zn, PeppolTaxSchemeId as zt };
|
|
4473
|
+
//# sourceMappingURL=index-XG-N6PcG.d.ts.map
|