hub-3a-payment-encoder 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/LICENSE +165 -0
  2. package/README.md +158 -0
  3. package/dist/helpers/EncodePayment.d.ts +10 -0
  4. package/dist/helpers/EncodePayment.d.ts.map +1 -0
  5. package/dist/helpers/EncodePayment.js +27 -0
  6. package/dist/helpers/EncodePayment.js.map +1 -0
  7. package/dist/helpers/IntentCodes.d.ts +10 -0
  8. package/dist/helpers/IntentCodes.d.ts.map +1 -0
  9. package/dist/helpers/IntentCodes.js +172 -0
  10. package/dist/helpers/IntentCodes.js.map +1 -0
  11. package/dist/helpers/PaymentModels.d.ts +8 -0
  12. package/dist/helpers/PaymentModels.d.ts.map +1 -0
  13. package/dist/helpers/PaymentModels.js +53 -0
  14. package/dist/helpers/PaymentModels.js.map +1 -0
  15. package/dist/helpers/constants.d.ts +55 -0
  16. package/dist/helpers/constants.d.ts.map +1 -0
  17. package/dist/helpers/constants.js +56 -0
  18. package/dist/helpers/constants.js.map +1 -0
  19. package/dist/helpers/stringHelpers.d.ts +16 -0
  20. package/dist/helpers/stringHelpers.d.ts.map +1 -0
  21. package/dist/helpers/stringHelpers.js +52 -0
  22. package/dist/helpers/stringHelpers.js.map +1 -0
  23. package/dist/helpers/validation.d.ts +41 -0
  24. package/dist/helpers/validation.d.ts.map +1 -0
  25. package/dist/helpers/validation.js +169 -0
  26. package/dist/helpers/validation.js.map +1 -0
  27. package/dist/index.d.ts +5 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +5 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/types/BarcodePaymentSettings.d.ts +6 -0
  32. package/dist/types/BarcodePaymentSettings.d.ts.map +1 -0
  33. package/dist/types/BarcodePaymentSettings.js +2 -0
  34. package/dist/types/BarcodePaymentSettings.js.map +1 -0
  35. package/dist/types/PaymentParams.d.ts +17 -0
  36. package/dist/types/PaymentParams.d.ts.map +1 -0
  37. package/dist/types/PaymentParams.js +20 -0
  38. package/dist/types/PaymentParams.js.map +1 -0
  39. package/package.json +47 -0
package/LICENSE ADDED
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
package/README.md ADDED
@@ -0,0 +1,158 @@
1
+ # hub-3a-payment-encoder
2
+
3
+ This encoder converts Croatian HUB-3A payment slips into text format suitable for 2D barcode generation.
4
+
5
+ **NOTE:** This library does **not generate** the 2D barcode bitmap, only the text that is encoded in the barcode. To generate the actual 2D bitmap, you can use another library such as [PDF417-js](https://www.npmjs.com/package/pdf417)
6
+
7
+ This library is derived from the original library [https://github.com/Bikonja/generator-barkoda-uplatnica](https://github.com/Bikonja/generator-barkoda-uplatnica)
8
+
9
+ ## Legacy Implementation
10
+
11
+ The original JavaScript implementation used as a reference for the TypeScript version can be found in the `docs/BarcodePayment.js` directory. The legacy version supports:
12
+ - jQuery dependency for array operations
13
+ - Singleton pattern with global `window.BarcodePayment` object
14
+ - Manual validation without IBAN library
15
+ - HRK currency support (old implementation)
16
+
17
+ **Note:** The new TypeScript implementation uses:
18
+ - Modern ES6+ TypeScript code
19
+ - `ibantools` library for IBAN validation
20
+ - EUR currency (according to current standard)
21
+ - Functional approach instead of singleton pattern
22
+ - Improved error accumulation (bitwise OR)
23
+
24
+ # How to install
25
+ ```bash
26
+ npm i hub-3a-payment-encoder
27
+ ```
28
+
29
+ # API
30
+ ## Functions
31
+ `string` ***EncodePayment***(*paymentParams*:`PaymentParams`, *settings*?:`Partial<BarcodePaymentSettings>`)
32
+
33
+ Encodes playment parameters into HUB 3A compatible text format used in 2D bar codes
34
+
35
+ **Params:**
36
+ * *paymentParams*:`PaymentParams` = payment slip data
37
+ * *settings*:`Partial<BarcodePaymentSettings>` = (optional) validation settings
38
+
39
+ **Returns:** HUB 3A 2D barcode string
40
+
41
+ ## Data structures
42
+ ```typescript
43
+ export interface PaymentParams {
44
+ Iznos:string
45
+ ImePlatitelja:string
46
+ AdresaPlatitelja:string
47
+ SjedistePlatitelja:string
48
+ Primatelj:string
49
+ AdresaPrimatelja:string
50
+ SjedistePrimatelja:string
51
+ IBAN:string
52
+ ModelPlacanja:string
53
+ PozivNaBroj:string
54
+ SifraNamjene:string
55
+ OpisPlacanja:string
56
+ }
57
+ ```
58
+
59
+ **Important notes:**
60
+ - `Iznos` - must be formatted with a **comma** as the decimal separator (e.g., "123,45", not "123.45")
61
+ - `ModelPlacanja` - must contain the **"HR" prefix** (e.g., "HR00", "HR01", "HR99")
62
+ - All fields are strings, including `Iznos`
63
+ - For Croatian alphabet characters (Š, Đ, Č, Ć, Ž), each character counts as 2 bytes
64
+
65
+ ## Validation Functions
66
+
67
+ The library exports several validation functions:
68
+ - `IsIBANValid(iban: string): boolean` - Validates IBAN format using the ibantools library
69
+ - `IsPaymentModelValid(paymentModel: string): boolean` - Validates payment model codes (HR00-HR99)
70
+ - `IsIntentCodeValid(intentCode: string): boolean` - Validates SEPA purpose codes
71
+ - `IsCalloutNumberValid(calloutNumber: string, paymentModel: string): boolean` - **⚠️ NOT IMPLEMENTED** - Always returns `true`. Proper validation by payment model is not yet available.
72
+ - `ValidatePaymentParams(paymentParams: PaymentParams, settings?: BarcodePaymentSettings): ValidationResult` - Validates all payment parameters
73
+
74
+ **Note:** The `ValidateCalloutNumber` setting in `BarcodePaymentSettings` is available but has no effect since `IsCalloutNumberValid` is not implemented.
75
+
76
+ # Examples
77
+ ```typescript
78
+ import { EncodePayment, ValidatePaymentParams, ValidationResult } from 'hub-3a-payment-encoder';
79
+
80
+ const paymentParams = {
81
+ Iznos:"123,55", // NOTE: use comma, not period!
82
+ ImePlatitelja:"Ivan Horvat",
83
+ AdresaPlatitelja:"Ilica 23",
84
+ SjedistePlatitelja:"10000 Zagreb",
85
+ Primatelj:"VODOOPSKRBA I ODVODNJA D.O.O.",
86
+ AdresaPrimatelja:"FOLNEGOVIĆEVA 1",
87
+ SjedistePrimatelja:"ZAGREB",
88
+ IBAN:"HR8924020061100679445",
89
+ ModelPlacanja: "HR01", // MUST contain "HR" prefix!
90
+ PozivNaBroj:"1231213-33452457-12386",
91
+ SifraNamjene:"WTER",
92
+ OpisPlacanja:"RAČUN BROJ 12362444",
93
+ };
94
+
95
+ // Option 1: Explicit validation before encoding
96
+ const validation_result = ValidatePaymentParams(paymentParams, {
97
+ ValidateIBAN: true,
98
+ ValidateCalloutNumber: false
99
+ });
100
+
101
+ if(validation_result !== ValidationResult.OK) {
102
+ console.log(`Payment params are invalid - validation result = ${validation_result}`);
103
+
104
+ // You can check for specific errors using bitwise operators
105
+ if(validation_result & ValidationResult.IBANInvalid) {
106
+ console.log("IBAN is invalid");
107
+ }
108
+ if(validation_result & ValidationResult.PricePatternInvalid) {
109
+ console.log("Price format is invalid");
110
+ }
111
+ } else {
112
+ const hub3a_text = EncodePayment(paymentParams);
113
+ // ... pass the generated `hub3a_text` to a 2D barcode generation library
114
+ }
115
+
116
+ // Option 2: Direct encoding (with automatic validation)
117
+ try {
118
+ const hub3a_text = EncodePayment(paymentParams, {
119
+ ValidateIBAN: true,
120
+ ValidateCalloutNumber: false
121
+ });
122
+
123
+ // ... pass the generated `hub3a_text` to a 2D barcode generation library
124
+
125
+ } catch(ex: any) {
126
+ // EncodePayment validates the payment slip data
127
+ // -> if validation fails, an error will be thrown
128
+ console.log("Payment slip failed validation:", ex.message);
129
+ }
130
+
131
+ ```
132
+ # Testing
133
+
134
+ The project uses Jest for unit testing.
135
+
136
+ ## Running tests
137
+
138
+ ```bash
139
+ # Run all tests
140
+ npm test
141
+
142
+ # Run tests in watch mode (automatically re-run on changes)
143
+ npm run test:watch
144
+
145
+ # Run tests with code coverage report
146
+ npm run test:coverage
147
+ ```
148
+
149
+ ## Test coverage
150
+
151
+ Current coverage: **96.57%**
152
+
153
+ The test suite includes:
154
+ - **validation.test.ts** - 94 tests for all validation functions
155
+ - **encoding.test.ts** - 36 tests for HUB-3A encoding
156
+ - **stringHelpers.test.ts** - 16 tests for helper functions
157
+
158
+ All tests are written based on the behavior of the legacy `BarcodePayment.js` implementation.
@@ -0,0 +1,10 @@
1
+ import { BarcodePaymentSettings } from "../types/BarcodePaymentSettings.js";
2
+ import { PaymentParams } from "../types/PaymentParams.js";
3
+ /**
4
+ * Encodes playment parameters into HUB 3A compatible text format used in 2D bar codes
5
+ * @param paymentParams all the info related to payment
6
+ * @param settings settings
7
+ * @returns
8
+ */
9
+ export declare function EncodePayment(paymentParams: PaymentParams, settings?: Partial<BarcodePaymentSettings>): string;
10
+ //# sourceMappingURL=EncodePayment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EncodePayment.d.ts","sourceRoot":"","sources":["../../lib/helpers/EncodePayment.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAmB,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE3E;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,aAAa,EAAC,aAAa,EAAE,QAAQ,GAAC,OAAO,CAAC,sBAAsB,CAAM,GAAE,MAAM,CAiC/G"}
@@ -0,0 +1,27 @@
1
+ import { ValidationResult, _currency, _delimiter, _header } from "./constants.js";
2
+ import { ConcatenateStrings, EncodePrice } from "./stringHelpers.js";
3
+ import { ValidatePaymentParams } from "./validation.js";
4
+ import { IsPaymentParams } from "../types/PaymentParams.js";
5
+ /**
6
+ * Encodes playment parameters into HUB 3A compatible text format used in 2D bar codes
7
+ * @param paymentParams all the info related to payment
8
+ * @param settings settings
9
+ * @returns
10
+ */
11
+ export function EncodePayment(paymentParams, settings = {}) {
12
+ if (!(IsPaymentParams(paymentParams))) {
13
+ throw new Error(`invalid payment params object`);
14
+ }
15
+ const validationResult = ValidatePaymentParams(paymentParams, {
16
+ // default settings values
17
+ ValidateIBAN: true,
18
+ ValidateCalloutNumber: false,
19
+ ...settings,
20
+ });
21
+ if (validationResult != ValidationResult.OK) {
22
+ throw new Error(`param validation failed with code ${validationResult}`);
23
+ }
24
+ return ConcatenateStrings(_header, _delimiter, _currency, _delimiter, EncodePrice(paymentParams.Iznos), _delimiter, paymentParams.ImePlatitelja, _delimiter, paymentParams.AdresaPlatitelja, _delimiter, paymentParams.SjedistePlatitelja, _delimiter, paymentParams.Primatelj, _delimiter, paymentParams.AdresaPrimatelja, _delimiter, paymentParams.SjedistePrimatelja, _delimiter, paymentParams.IBAN, _delimiter, paymentParams.ModelPlacanja, _delimiter, paymentParams.PozivNaBroj, _delimiter, paymentParams.SifraNamjene, _delimiter, paymentParams.OpisPlacanja, _delimiter);
25
+ }
26
+ ;
27
+ //# sourceMappingURL=EncodePayment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EncodePayment.js","sourceRoot":"","sources":["../../lib/helpers/EncodePayment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAuB,MAAM,gBAAgB,CAAC;AACvG,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAAE,eAAe,EAAiB,MAAM,2BAA2B,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,aAA2B,EAAE,WAA2C,EAAE;IAEvG,IAAI,CAAC,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;IACjD,CAAC;IAED,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,aAAa,EAAE;QAC7D,0BAA0B;QAC1B,YAAY,EAAE,IAAI;QAClB,qBAAqB,EAAE,KAAK;QAC5B,GAAG,QAAQ;KACX,CAAC,CAAC;IAEH,IAAI,gBAAgB,IAAI,gBAAgB,CAAC,EAAE,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,qCAAqC,gBAAgB,EAAE,CAAC,CAAA;IACzE,CAAC;IAED,OAAO,kBAAkB,CACxB,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,UAAU,EACrB,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,UAAU,EAC5C,aAAa,CAAC,aAAa,EAAE,UAAU,EACvC,aAAa,CAAC,gBAAgB,EAAE,UAAU,EAC1C,aAAa,CAAC,kBAAkB,EAAE,UAAU,EAC5C,aAAa,CAAC,SAAS,EAAE,UAAU,EACnC,aAAa,CAAC,gBAAgB,EAAE,UAAU,EAC1C,aAAa,CAAC,kBAAkB,EAAE,UAAU,EAC5C,aAAa,CAAC,IAAI,EAAE,UAAU,EAC9B,aAAa,CAAC,aAAa,EAAE,UAAU,EACvC,aAAa,CAAC,WAAW,EAAE,UAAU,EACrC,aAAa,CAAC,YAAY,EAAE,UAAU,EACtC,aAAa,CAAC,YAAY,EAAE,UAAU,CACtC,CAAC;AACH,CAAC;AAAA,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Kod namjene
3
+ * Enumerations and helper classes
4
+ * Source: PBZ net banking website
5
+ */
6
+ export declare const IntentCodes: Array<{
7
+ code: string;
8
+ title: string;
9
+ }>;
10
+ //# sourceMappingURL=IntentCodes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntentCodes.d.ts","sourceRoot":"","sources":["../../lib/helpers/IntentCodes.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAC,KAAK,CAAC;IAAC,IAAI,EAAC,MAAM,CAAC;IAAC,KAAK,EAAC,MAAM,CAAA;CAAC,CAqKzD,CAAA"}
@@ -0,0 +1,172 @@
1
+ /**
2
+ * Kod namjene
3
+ * Enumerations and helper classes
4
+ * Source: PBZ net banking website
5
+ */
6
+ export const IntentCodes = [
7
+ { code: "ACCT", title: "ACCT (Upravljanje računom)" },
8
+ { code: "ADCS", title: "ADCS (Isplate za donacije, sponzorstva, savjetodavne, intelektualne i druge usluge)" },
9
+ { code: "ADMG", title: "ADMG (Administracija)" },
10
+ { code: "ADVA", title: "ADVA (Predujam)" },
11
+ { code: "AEMP", title: "AEMP (Naknada za zapošljavanje)" },
12
+ { code: "AGRT", title: "AGRT (Poljoprivredni transfer)" },
13
+ { code: "AIRB", title: "AIRB (Zračni)" },
14
+ { code: "ALLW", title: "ALLW (Naknada)" },
15
+ { code: "ALMY", title: "ALMY (Plaćanje alimentacije)" },
16
+ { code: "ANNI", title: "ANNI (Renta)" },
17
+ { code: "ANTS", title: "ANTS (Usluge anestezije)" },
18
+ { code: "AREN", title: "AREN (Knjiženje računa potraživanja)" },
19
+ { code: "BBSC", title: "BBSC (Rodiljna naknada)" },
20
+ { code: "BECH", title: "BECH (Dječji doplatak)" },
21
+ { code: "BENE", title: "BENE (Naknada za nezaposlenost/invaliditet)" },
22
+ { code: "BEXP", title: "BEXP (Poslovni troškovi)" },
23
+ { code: "BLDM", title: "BLDM (Održavanje zgrada)" },
24
+ { code: "BOCE", title: "BOCE (Knjiženje konverzije u Back Office-u)" },
25
+ { code: "BONU", title: "BONU (Novčana nagrada (bonus).)" },
26
+ { code: "BUSB", title: "BUSB (Autobusni)" },
27
+ { code: "CAFI", title: "CAFI (Skrbničke naknade (interne))" },
28
+ { code: "CASH", title: "CASH (Prijenos gotovine)" },
29
+ { code: "CBFF", title: "CBFF (Transakcija se odnosi na kapitalnu štednju, općenito)" },
30
+ { code: "CBFR", title: "CBFR (Transakcija se odnosi na kapitalnu štednju za mirovinu)" },
31
+ { code: "CBLK", title: "CBLK (Masovni kliring kartica)" },
32
+ { code: "CBTV", title: "CBTV (Račun za kabelsku TV)" },
33
+ { code: "CCRD", title: "CCRD (Plaćanje na račun kreditne kartice)" },
34
+ { code: "CDBL", title: "CDBL (Plaćanje računa za kreditnu karticu)" },
35
+ { code: "CDCB", title: "CDCB (Kartično plaćanje uz gotovinski povrat (Cashback))" },
36
+ { code: "CDCD", title: "CDCD (Gotovinska isplata)" },
37
+ { code: "CDCS", title: "CDCS (Isplata gotovine s naknadom)" },
38
+ { code: "CDDP", title: "CDDP (Kartično plaćanje s odgodom)" },
39
+ { code: "CDOC", title: "CDOC (Originalno odobrenje)" },
40
+ { code: "CDQC", title: "CDQC (Zamjenska gotovina)" },
41
+ { code: "CFDI", title: "CFDI (Plaćanje dospjele glavnice)" },
42
+ { code: "CFEE", title: "CFEE (Naknada za poništenje)" },
43
+ { code: "CGDD", title: "CGDD (Direktno terećenje nastalo kao rezultat kartične transakcije)" },
44
+ { code: "CHAR", title: "CHAR (Dobrotvorno plaćanje)" },
45
+ { code: "CLPR", title: "CLPR (Otplata glavnice kredita za automobil)" },
46
+ { code: "CMDT", title: "CMDT (Plaćanje roba)" },
47
+ { code: "COLL", title: "COLL (Naplata)" },
48
+ { code: "COMC", title: "COMC (Komercijalno plaćanje)" },
49
+ { code: "COMM", title: "COMM (Provizija)" },
50
+ { code: "COMT", title: "COMT (Konsolidirano plaćanje treće strane za račun potrošača.)" },
51
+ { code: "COST", title: "COST (Troškovi)" },
52
+ { code: "CPKC", title: "CPKC (Troškovi parkiranja)" },
53
+ { code: "CPYR", title: "CPYR (Autorsko pravo)" },
54
+ { code: "CSDB", title: "CSDB (Gotovinska isplata)" },
55
+ { code: "CSLP", title: "CSLP (Isplata socijalnih zajmova društava banci)" },
56
+ { code: "CVCF", title: "CVCF (Ustanova za usluge skrbi za rekonvalescente)" },
57
+ { code: "DBTC", title: "DBTC (Naplata putem terećenja)" },
58
+ { code: "DCRD", title: "DCRD (Plaćanje na račun debitne kartice.)" },
59
+ { code: "DEPT", title: "DEPT (Depozit)" },
60
+ { code: "DERI", title: "DERI (Derivati (izvedenice))" },
61
+ { code: "DIVD", title: "DIVD (Dividenda)" },
62
+ { code: "DMEQ", title: "DMEQ (Trajna medicinska pomagala)" },
63
+ { code: "DNTS", title: "DNTS (Zubarske usluge)" },
64
+ { code: "EDUC", title: "EDUC (Troškovi školovanja)" },
65
+ { code: "ELEC", title: "ELEC (Račun za električnu energiju)" },
66
+ { code: "ENRG", title: "ENRG (Energenti)" },
67
+ { code: "ESTX", title: "ESTX (Porez na ostavštinu)" },
68
+ { code: "ETUP", title: "ETUP (Doplata e-novca)" },
69
+ { code: "FAND", title: "FAND (Isplata naknade za elementarne nepogode)" },
70
+ { code: "FCOL", title: "FCOL (Naplata naknade po kartičnoj transakciji)" },
71
+ { code: "FCPM", title: "FCPM (Zakašnjele naknade)" },
72
+ { code: "FERB", title: "FERB (Trajektni)" },
73
+ { code: "FREX", title: "FREX (Devizno tržište)" },
74
+ { code: "FWLV", title: "FWLV (Porez na strane radnike)" },
75
+ { code: "GASB", title: "GASB (Račun za plin)" },
76
+ { code: "GDDS", title: "GDDS (Kupovina-prodaja roba)" },
77
+ { code: "GDSV", title: "GDSV (Kupovina/prodaja roba i usluga)" },
78
+ { code: "GFRP", title: "GFRP (Naknada za nezaposlene u toku stečaja)" },
79
+ { code: "GOVI", title: "GOVI (Državno osiguranje)" },
80
+ { code: "GOVT", title: "GOVT (Plaćanje države)" },
81
+ { code: "GSCB", title: "GSCB (Kupovina-prodaja roba i usluga uz gotovinski povrat)" },
82
+ { code: "GSTX", title: "GSTX (Porez na robu i usluge)" },
83
+ { code: "GVEA", title: "GVEA (Austrijski državni zaposlenici, Kategorija A)" },
84
+ { code: "GVEB", title: "GVEB (Austrijski državni zaposlenici, Kategorija B)" },
85
+ { code: "GVEC", title: "GVEC (Austrijski državni zaposlenici, Kategorija C)" },
86
+ { code: "GVED", title: "GVED (Austrijski državni zaposlenici, Kategorija D)" },
87
+ { code: "GWLT", title: "GWLT (Isplata žrtvama rata i invalidima)" },
88
+ { code: "HEDG", title: "HEDG (Omeđivanje rizika (Hedging))" },
89
+ { code: "HLRP", title: "HLRP (Otplata stambenog kredita)" },
90
+ { code: "HLTC", title: "HLTC (Kućna njega bolesnika)" },
91
+ { code: "HLTI", title: "HLTI (Zdravstveno osiguranje)" },
92
+ { code: "HREC", title: "HREC (Transakcija se odnosi na doprinos poslodavca za troškove stanovanja)" },
93
+ { code: "HSPC", title: "HSPC (Bolnička njega)" },
94
+ { code: "HSTX", title: "HSTX (Porez na stambeni prostor)" },
95
+ { code: "ICCP", title: "ICCP (Neopozivo plaćanje sa računa kreditne kartice)" },
96
+ { code: "ICRF", title: "ICRF (Ustanova socijalne skrbi)" },
97
+ { code: "IDCP", title: "IDCP (Neopozivo plaćanje sa računa debitne kartice)" },
98
+ { code: "IHRP", title: "IHRP (Plaćanje rate pri kupnji na otplatu)" },
99
+ { code: "INPC", title: "INPC (Premija osiguranja za vozilo)" },
100
+ { code: "INSM", title: "INSM (Rata)" },
101
+ { code: "INSU", title: "INSU (Premija osiguranja)" },
102
+ { code: "INTC", title: "INTC (Plaćanje unutar društva)" },
103
+ { code: "INTE", title: "INTE (Kamata)" },
104
+ { code: "INTX", title: "INTX (Porez na dohodak)" },
105
+ { code: "INVS", title: "INVS (Plaćanje za fondove i vrijednosnice)" },
106
+ { code: "IVPT", title: "IVPT (Plaćanje računa)" },
107
+ { code: "LBRI", title: "LBRI (Osiguranje iz rada)" },
108
+ { code: "LICF", title: "LICF (Naknada za licencu)" },
109
+ { code: "LIFI", title: "LIFI (Životno osiguranje)" },
110
+ { code: "LIMA", title: "LIMA (Upravljanje likvidnošću)" },
111
+ { code: "LOAN", title: "LOAN (Zajam)" },
112
+ { code: "LOAR", title: "LOAR (Otplata zajma)" },
113
+ { code: "LTCF", title: "LTCF (Ustanova dugoročne zdravstvene skrbi)" },
114
+ { code: "MDCS", title: "MDCS (Medicinske usluge)" },
115
+ { code: "MSVC", title: "MSVC (Višestruke vrste usluga)" },
116
+ { code: "MTUP", title: "MTUP (Doplata mobilnog uređaja (bon))" },
117
+ { code: "NETT", title: "NETT (Saldiranje (netiranje))" },
118
+ { code: "NITX", title: "NITX (Porez na neto dohodak)" },
119
+ { code: "NOWS", title: "NOWS (Nenavedeno)" },
120
+ { code: "NWCH", title: "NWCH (Troškovi za mrežu)" },
121
+ { code: "NWCM", title: "NWCM (Mrežna komunikacija)" },
122
+ { code: "OFEE", title: "OFEE (Početna naknada (Opening Fee))" },
123
+ { code: "OTHR", title: "OTHR (Ostalo)" },
124
+ { code: "OTLC", title: "OTLC (Račun za ostale telekom usluge)" },
125
+ { code: "PADD", title: "PADD (Izravno terećenje)" },
126
+ { code: "PAYR", title: "PAYR (Obračun plaća)" },
127
+ { code: "PENO", title: "PENO (Prisilna naplata)" },
128
+ { code: "PENS", title: "PENS (Plaćanje mirovine)" },
129
+ { code: "PHON", title: "PHON (Telefonski račun)" },
130
+ { code: "POPE", title: "POPE (Knjiženje mjesta kupnje)" },
131
+ { code: "PPTI", title: "PPTI (Osiguranje imovine)" },
132
+ { code: "PRCP", title: "PRCP (Plaćanje cijene)" },
133
+ { code: "PRME", title: "PRME (Plemeniti metali)" },
134
+ { code: "PTSP", title: "PTSP (Uvjeti plaćanja)" },
135
+ { code: "PTXP", title: "PTXP (Porez na imovinu)" },
136
+ { code: "RCKE", title: "RCKE (Knjiženje ponovne prezentacije čeka)" },
137
+ { code: "RCPT", title: "RCPT (Plaćanje blagajničke potvrde. (ReceiptPayment))" },
138
+ { code: "RDTX", title: "RDTX (Cestarina)" },
139
+ { code: "REBT", title: "REBT (Plaćanje popusta/rabata)" },
140
+ { code: "REFU", title: "REFU (Povrat)" },
141
+ { code: "RENT", title: "RENT (Najam)" },
142
+ { code: "RHBS", title: "RHBS (Isplata za vrijeme profesionalne rehabilitacije)" },
143
+ { code: "RIMB", title: "RIMB (Povrat prethodne pogrešne transakcije)" },
144
+ { code: "RINP", title: "RINP (Plaćanje rata koje se ponavljaju)" },
145
+ { code: "RLWY", title: "RLWY (Željeznički)" },
146
+ { code: "ROYA", title: "ROYA (Tantijeme)" },
147
+ { code: "SALA", title: "SALA (Plaćanje plaće)" },
148
+ { code: "SAVG", title: "SAVG (Štednja)" },
149
+ { code: "SCVE", title: "SCVE (Kupovina/prodaja usluga)" },
150
+ { code: "SECU", title: "SECU (Vrijednosni papiri)" },
151
+ { code: "SEPI", title: "SEPI (Kupnja vrijednosnica (interna))" },
152
+ { code: "SSBE", title: "SSBE (Naknada socijalnog osiguranja)" },
153
+ { code: "STDY", title: "STDY (Studiranje)" },
154
+ { code: "SUBS", title: "SUBS (Pretplata)" },
155
+ { code: "SUPP", title: "SUPP (Plaćanje dobavljača)" },
156
+ { code: "TAXR", title: "TAXR (Povrat poreza)" },
157
+ { code: "TAXS", title: "TAXS (Plaćanje poreza)" },
158
+ { code: "TBIL", title: "TBIL (Troškovi telekomunikacija)" },
159
+ { code: "TCSC", title: "TCSC (Gradske naknade)" },
160
+ { code: "TELI", title: "TELI (Transakcija inicirana telefonom)" },
161
+ { code: "TRAD", title: "TRAD (Trgovinske usluge)" },
162
+ { code: "TREA", title: "TREA (Plaćanje riznice)" },
163
+ { code: "TRFD", title: "TRFD (Zaklada)" },
164
+ { code: "TRPT", title: "TRPT (Prepaid cestarina (ENC))" },
165
+ { code: "UBIL", title: "UBIL (Komunalne usluge)" },
166
+ { code: "VATX", title: "VATX (Plaćanje poreza na dodatnu vrijednost)" },
167
+ { code: "VIEW", title: "VIEW (Usluge oftalmološke skrbi)" },
168
+ { code: "WEBI", title: "WEBI (Transakcija inicirana internetom)" },
169
+ { code: "WHLD", title: "WHLD (Porez po odbitku)" },
170
+ { code: "WTER", title: "WTER (Račun za vodu)" }
171
+ ];
172
+ //# sourceMappingURL=IntentCodes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IntentCodes.js","sourceRoot":"","sources":["../../lib/helpers/IntentCodes.ts"],"names":[],"mappings":"AACA;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAsC;IAC7D,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,EAAC;IAChD,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,qFAAqF,EAAC;IACzG,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,uBAAuB,EAAC;IAC3C,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,iBAAiB,EAAC;IACrC,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,iCAAiC,EAAC;IACrD,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,gCAAgC,EAAC;IACpD,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,eAAe,EAAC;IACnC,EAAC,IA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AAsB,EAAC;CAC1C,CAAA"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * TODO: Add validation rules for every payment model
3
+ * Source: FINA website - http://www.fina.hr/fgs.axd?id=16090&usg=AFQjCNF8XEhnL9POBo5CccBjCWW9gzBJJg&sig2=b5VcZvu4wgv185jhJR-U_w&cad=rja
4
+ */
5
+ export declare const PaymentModels: Array<{
6
+ model: string;
7
+ }>;
8
+ //# sourceMappingURL=PaymentModels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentModels.d.ts","sourceRoot":"","sources":["../../lib/helpers/PaymentModels.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAC,KAAK,CAAC;IAAC,KAAK,EAAC,MAAM,CAAA;CAAC,CA+C7C,CAAA"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * TODO: Add validation rules for every payment model
3
+ * Source: FINA website - http://www.fina.hr/fgs.axd?id=16090&usg=AFQjCNF8XEhnL9POBo5CccBjCWW9gzBJJg&sig2=b5VcZvu4wgv185jhJR-U_w&cad=rja
4
+ */
5
+ export const PaymentModels = [
6
+ { model: "HR00" },
7
+ { model: "HR01" },
8
+ { model: "HR02" },
9
+ { model: "HR03" },
10
+ { model: "HR04" },
11
+ { model: "HR05" },
12
+ { model: "HR06" },
13
+ { model: "HR07" },
14
+ { model: "HR08" },
15
+ { model: "HR09" },
16
+ { model: "HR10" },
17
+ { model: "HR11" },
18
+ { model: "HR12" },
19
+ { model: "HR13" },
20
+ { model: "HR14" },
21
+ { model: "HR15" },
22
+ { model: "HR16" },
23
+ { model: "HR17" },
24
+ { model: "HR18" },
25
+ { model: "HR23" },
26
+ { model: "HR24" },
27
+ { model: "HR26" },
28
+ { model: "HR27" },
29
+ { model: "HR28" },
30
+ { model: "HR29" },
31
+ { model: "HR30" },
32
+ { model: "HR31" },
33
+ { model: "HR33" },
34
+ { model: "HR34" },
35
+ { model: "HR40" },
36
+ { model: "HR41" },
37
+ { model: "HR42" },
38
+ { model: "HR43" },
39
+ { model: "HR55" },
40
+ { model: "HR62" },
41
+ { model: "HR63" },
42
+ { model: "HR64" },
43
+ { model: "HR65" },
44
+ { model: "HR67" },
45
+ { model: "HR68" },
46
+ { model: "HR69" },
47
+ { model: "HR99" },
48
+ { model: "HR25" },
49
+ { model: "HR83" },
50
+ { model: "HR84" },
51
+ { model: "HR50" }
52
+ ];
53
+ //# sourceMappingURL=PaymentModels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentModels.js","sourceRoot":"","sources":["../../lib/helpers/PaymentModels.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAyB;IACjD,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;IACjB,EAAE,KAAK,EAAE,MAAM,EAAE;CACjB,CAAA"}
@@ -0,0 +1,55 @@
1
+ /** UTF-8 characters stored into single byte */
2
+ export declare const _allowedSingleByteCharacters: Array<string>;
3
+ /** UTF-8 characters stored into two bytes */
4
+ export declare const _allowedTwoByteCharacters: Array<string>;
5
+ /** all allowed characters */
6
+ export declare const _allowedCharacters: Array<string>;
7
+ export declare const _priceFieldLength: number;
8
+ export declare const _pricePattern: string;
9
+ export declare const _delimiter: string;
10
+ export declare const _header: string;
11
+ export declare const _currency: string;
12
+ export declare const _paymentModelPrefix: string;
13
+ export declare const MaxLengths: {
14
+ Price: number;
15
+ PayerName: number;
16
+ PayerAddress: number;
17
+ PayerHQ: number;
18
+ ReceiverName: number;
19
+ ReceiverAddress: number;
20
+ ReceiverHQ: number;
21
+ IBAN: number;
22
+ PaymentModel: number;
23
+ CalloutNumber: number;
24
+ IntentCode: number;
25
+ Description: number;
26
+ };
27
+ export declare enum ValidationResult {
28
+ OK = 0,
29
+ InvalidPaymentParams = 1,
30
+ PricePatternInvalid = 2,
31
+ PriceMaxLengthExceeded = 4,
32
+ PayerNameInvalid = 8,
33
+ PayerNameMaxLengthExceeded = 16,
34
+ PayerAddressInvalid = 32,
35
+ PayerAddressMaxLengthExceeded = 64,
36
+ PayerHQInvalid = 128,
37
+ PayerHQMaxLengthExceeded = 256,
38
+ ReceiverNameInvalid = 512,
39
+ ReceiverNameMaxLengthExceeded = 1024,
40
+ ReceiverAddressInvalid = 2048,
41
+ ReceiverAddressMaxLengthExceeded = 4096,
42
+ ReceiverHQInvalid = 8192,
43
+ ReceiverHQMaxLengthExceeded = 16384,
44
+ IBANInvalid = 32768,
45
+ IBANMaxLengthExceeded = 65536,
46
+ PaymentModelInvalid = 131072,
47
+ PaymentModelMaxLengthExceeded = 262144,
48
+ CalloutNumberInvalid = 524288,
49
+ CalloutNumberMaxLengthExceeded = 1048576,
50
+ IntentCodeInvalid = 2097152,
51
+ IntentCodeMaxLengthExceeded = 4194304,
52
+ DescriptionInvalid = 8388608,
53
+ DescriptionMaxLengthExceeded = 16777216
54
+ }
55
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../lib/helpers/constants.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,eAAO,MAAM,4BAA4B,EAAC,KAAK,CAAC,MAAM,CAAmX,CAAA;AACza,8CAA8C;AAC9C,eAAO,MAAM,yBAAyB,EAAC,KAAK,CAAC,MAAM,CAAwD,CAAA;AAC3G,8BAA8B;AAC9B,eAAO,MAAM,kBAAkB,EAAC,KAAK,CAAC,MAAM,CAAsE,CAAC;AAEnH,eAAO,MAAM,iBAAiB,EAAC,MAAW,CAAC;AAC3C,eAAO,MAAM,aAAa,EAAC,MAA4B,CAAC;AAExD,eAAO,MAAM,UAAU,EAAC,MAAkC,CAAC;AAC3D,eAAO,MAAM,OAAO,EAAC,MAAmB,CAAC;AACzC,eAAO,MAAM,SAAS,EAAC,MAAc,CAAA;AACrC,eAAO,MAAM,mBAAmB,EAAC,MAAa,CAAC;AAE/C,eAAO,MAAM,UAAU;;;;;;;;;;;;;CAatB,CAAC;AAEF,oBAAY,gBAAgB;IACxB,EAAE,IAAI;IAEN,oBAAoB,IAAI;IAExB,mBAAmB,IAAI;IACvB,sBAAsB,IAAI;IAE1B,gBAAgB,IAAI;IACpB,0BAA0B,KAAK;IAE/B,mBAAmB,KAAK;IACxB,6BAA6B,KAAK;IAElC,cAAc,MAAM;IACpB,wBAAwB,MAAM;IAE9B,mBAAmB,MAAM;IACzB,6BAA6B,OAAO;IAEpC,sBAAsB,OAAO;IAC7B,gCAAgC,OAAO;IAEvC,iBAAiB,OAAO;IACxB,2BAA2B,QAAQ;IAEnC,WAAW,QAAQ;IACnB,qBAAqB,QAAQ;IAE7B,mBAAmB,SAAS;IAC5B,6BAA6B,SAAS;IAEtC,oBAAoB,SAAS;IAC7B,8BAA8B,UAAU;IAExC,iBAAiB,UAAU;IAC3B,2BAA2B,UAAU;IAErC,kBAAkB,UAAU;IAC5B,4BAA4B,WAAW;CAC1C"}
@@ -0,0 +1,56 @@
1
+ /** UTF-8 characters stored into single byte */
2
+ export const _allowedSingleByteCharacters = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", " ", ",", ".", ":", "-", "+", "?", "'", "/", "(", ")"];
3
+ /** UTF-8 characters stored into two bytes */
4
+ export const _allowedTwoByteCharacters = ["Š", "Đ", "Č", "Ć", "Ž", "š", "đ", "č", "ć", "ž"];
5
+ /** all allowed characters */
6
+ export const _allowedCharacters = [..._allowedSingleByteCharacters, ..._allowedTwoByteCharacters];
7
+ export const _priceFieldLength = 15;
8
+ export const _pricePattern = "^[0-9]+,[0-9]{2}$";
9
+ export const _delimiter = String.fromCharCode(0x0A);
10
+ export const _header = "HRVHUB30";
11
+ export const _currency = "EUR";
12
+ export const _paymentModelPrefix = "HR";
13
+ export const MaxLengths = {
14
+ Price: 16,
15
+ PayerName: 30,
16
+ PayerAddress: 27,
17
+ PayerHQ: 27,
18
+ ReceiverName: 25,
19
+ ReceiverAddress: 25,
20
+ ReceiverHQ: 27,
21
+ IBAN: 21,
22
+ PaymentModel: 4,
23
+ CalloutNumber: 22,
24
+ IntentCode: 4,
25
+ Description: 35
26
+ };
27
+ export var ValidationResult;
28
+ (function (ValidationResult) {
29
+ ValidationResult[ValidationResult["OK"] = 0] = "OK";
30
+ ValidationResult[ValidationResult["InvalidPaymentParams"] = 1] = "InvalidPaymentParams";
31
+ ValidationResult[ValidationResult["PricePatternInvalid"] = 2] = "PricePatternInvalid";
32
+ ValidationResult[ValidationResult["PriceMaxLengthExceeded"] = 4] = "PriceMaxLengthExceeded";
33
+ ValidationResult[ValidationResult["PayerNameInvalid"] = 8] = "PayerNameInvalid";
34
+ ValidationResult[ValidationResult["PayerNameMaxLengthExceeded"] = 16] = "PayerNameMaxLengthExceeded";
35
+ ValidationResult[ValidationResult["PayerAddressInvalid"] = 32] = "PayerAddressInvalid";
36
+ ValidationResult[ValidationResult["PayerAddressMaxLengthExceeded"] = 64] = "PayerAddressMaxLengthExceeded";
37
+ ValidationResult[ValidationResult["PayerHQInvalid"] = 128] = "PayerHQInvalid";
38
+ ValidationResult[ValidationResult["PayerHQMaxLengthExceeded"] = 256] = "PayerHQMaxLengthExceeded";
39
+ ValidationResult[ValidationResult["ReceiverNameInvalid"] = 512] = "ReceiverNameInvalid";
40
+ ValidationResult[ValidationResult["ReceiverNameMaxLengthExceeded"] = 1024] = "ReceiverNameMaxLengthExceeded";
41
+ ValidationResult[ValidationResult["ReceiverAddressInvalid"] = 2048] = "ReceiverAddressInvalid";
42
+ ValidationResult[ValidationResult["ReceiverAddressMaxLengthExceeded"] = 4096] = "ReceiverAddressMaxLengthExceeded";
43
+ ValidationResult[ValidationResult["ReceiverHQInvalid"] = 8192] = "ReceiverHQInvalid";
44
+ ValidationResult[ValidationResult["ReceiverHQMaxLengthExceeded"] = 16384] = "ReceiverHQMaxLengthExceeded";
45
+ ValidationResult[ValidationResult["IBANInvalid"] = 32768] = "IBANInvalid";
46
+ ValidationResult[ValidationResult["IBANMaxLengthExceeded"] = 65536] = "IBANMaxLengthExceeded";
47
+ ValidationResult[ValidationResult["PaymentModelInvalid"] = 131072] = "PaymentModelInvalid";
48
+ ValidationResult[ValidationResult["PaymentModelMaxLengthExceeded"] = 262144] = "PaymentModelMaxLengthExceeded";
49
+ ValidationResult[ValidationResult["CalloutNumberInvalid"] = 524288] = "CalloutNumberInvalid";
50
+ ValidationResult[ValidationResult["CalloutNumberMaxLengthExceeded"] = 1048576] = "CalloutNumberMaxLengthExceeded";
51
+ ValidationResult[ValidationResult["IntentCodeInvalid"] = 2097152] = "IntentCodeInvalid";
52
+ ValidationResult[ValidationResult["IntentCodeMaxLengthExceeded"] = 4194304] = "IntentCodeMaxLengthExceeded";
53
+ ValidationResult[ValidationResult["DescriptionInvalid"] = 8388608] = "DescriptionInvalid";
54
+ ValidationResult[ValidationResult["DescriptionMaxLengthExceeded"] = 16777216] = "DescriptionMaxLengthExceeded";
55
+ })(ValidationResult || (ValidationResult = {}));
56
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../lib/helpers/constants.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,MAAM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AuC,CAAA;AAC3C,CAAC,EAxCW,gBAAgB,KAAhB,gBAAgB,QAwC3B"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Utility function: calculates byte length of UTF-8 string
3
+ * @param {string} str string which length is to be determined
4
+ * @returns {number} length of a string
5
+ */
6
+ export declare const GetLength: (str: string) => number;
7
+ export declare const PadLeft: (str: string, len: number, pad: string) => string;
8
+ export declare const StringNotDefinedOrEmpty: (str: string | undefined | null) => boolean;
9
+ export declare const EncodePrice: (price: string) => string;
10
+ /**
11
+ * Concatinates give list of string
12
+ * @param {string[]} args list of strings
13
+ * @returns
14
+ */
15
+ export declare const ConcatenateStrings: (...args: Array<string | undefined>) => string;
16
+ //# sourceMappingURL=stringHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringHelpers.d.ts","sourceRoot":"","sources":["../../lib/helpers/stringHelpers.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAC,CAAC,GAAG,EAAC,MAAM,KAAG,MAkBpC,CAAA;AAED,eAAO,MAAM,OAAO,GAAI,KAAI,MAAM,EAAE,KAAI,MAAM,EAAE,KAAI,MAAM,KAAE,MAM3D,CAAA;AAED,eAAO,MAAM,uBAAuB,GAAI,KAAK,MAAM,GAAG,SAAS,GAAG,IAAI,KAAE,OAEvE,CAAA;AAED,eAAO,MAAM,WAAW,GAAI,OAAM,MAAM,KAAE,MAGzC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,GAAG,MAAK,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,KAAE,MAUrE,CAAA"}
@@ -0,0 +1,52 @@
1
+ import { _allowedSingleByteCharacters, _allowedTwoByteCharacters } from "./constants.js";
2
+ /**
3
+ * Utility function: calculates byte length of UTF-8 string
4
+ * @param {string} str string which length is to be determined
5
+ * @returns {number} length of a string
6
+ */
7
+ export const GetLength = (str) => {
8
+ let len = 0;
9
+ if (!StringNotDefinedOrEmpty(str)) {
10
+ for (let i = 0; i < str.length; ++i) {
11
+ let c = str[i];
12
+ if (_allowedTwoByteCharacters.indexOf(c) !== -1) {
13
+ len += 2;
14
+ }
15
+ else if (_allowedSingleByteCharacters.indexOf(c) !== -1) {
16
+ len += 1;
17
+ }
18
+ else {
19
+ return -1;
20
+ }
21
+ }
22
+ }
23
+ return len;
24
+ };
25
+ export const PadLeft = (str, len, pad) => {
26
+ while (str.length < len) {
27
+ str = pad + str;
28
+ }
29
+ return str;
30
+ };
31
+ export const StringNotDefinedOrEmpty = (str) => {
32
+ return str === undefined || str === null || str.length == 0;
33
+ };
34
+ export const EncodePrice = (price) => {
35
+ const fullLength = 15;
36
+ return PadLeft(price.replace(',', ''), fullLength, '0');
37
+ };
38
+ /**
39
+ * Concatinates give list of string
40
+ * @param {string[]} args list of strings
41
+ * @returns
42
+ */
43
+ export const ConcatenateStrings = (...args) => {
44
+ let res = '';
45
+ for (var i = 0; i < args.length; ++i) {
46
+ if (typeof (args[i]) != 'undefined') {
47
+ res += args[i];
48
+ }
49
+ }
50
+ return res;
51
+ };
52
+ //# sourceMappingURL=stringHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stringHelpers.js","sourceRoot":"","sources":["../../lib/helpers/stringHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEzF;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAwB,CAAC,GAAU,EAAE,EAAE;IACzD,IAAI,GAAG,GAAG,CAAC,CAAC;IAEZ,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,EAAE,CAAC;QAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;YAClC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;YAEf,IAAI,yBAAyB,CAAC,OAAO,CAAC,CA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,IAAI,WAAW,EAAE,CAAC;YACjC,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;IACL,CAAC;IAED,OAAO,GAAG,CAAC;AACf,CAAC,CAAA"}
@@ -0,0 +1,41 @@
1
+ import { BarcodePaymentSettings } from "../types/BarcodePaymentSettings.js";
2
+ import { PaymentParams } from "../types/PaymentParams.js";
3
+ import { ValidationResult } from "./constants.js";
4
+ /**
5
+ * Validates IBAN
6
+ * @param {string} iban IBAN which needs to be checked
7
+ * @returns {boolean} true ako je IBAN ispravan
8
+ */
9
+ export declare function IsIBANValid(iban: string): boolean;
10
+ /**
11
+ * Validates payment model
12
+ * @param {string} paymentModel payment model
13
+ * @returns {boolean}
14
+ */
15
+ export declare function IsPaymentModelValid(paymentModel: string): boolean;
16
+ /**
17
+ * Validates callout number (reference number) according to payment model
18
+ *
19
+ * **⚠️ NOT CURRENTLY IMPLEMENTED** - This function always returns `true`.
20
+ * Proper validation by payment model is not yet implemented.
21
+ *
22
+ * @param calloutNumber - The reference number (poziv na broj) to validate
23
+ * @param paymentModel - The payment model code (e.g., "HR00", "HR01")
24
+ * @returns Always returns `true` - validation not implemented
25
+ *
26
+ * @see https://www.fina.hr/ngsite/content/download/13714/208442/1
27
+ */
28
+ export declare function IsCalloutNumberValid(calloutNumber: string, paymentModel: string): boolean;
29
+ /**
30
+ * Validira kod namjene
31
+ * @param {string} intentCode kod namjene koji treba validirati
32
+ * @returns {boolean}
33
+ */
34
+ export declare function IsIntentCodeValid(intentCode: string): boolean;
35
+ /**
36
+ * Validira sve parametre plaćanja
37
+ * @param {PaymentParams} paymentParams parametri koje treba validirati
38
+ * @returns {boolean}
39
+ */
40
+ export declare function ValidatePaymentParams(paymentParams: PaymentParams, settings: BarcodePaymentSettings): ValidationResult;
41
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../lib/helpers/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAmB,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAA6B,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAM7E;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAE,OAAO,CAEhD;AAED;;;;GAIG;AACF,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAE,OAAO,CAEjE;AAED;;;;;;;;;;;GAWG;AAEF,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAE,OAAO,CAIzF;AAED;;;;GAIG;AACF,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAE,OAAO,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAC,sBAAsB,GAAE,gBAAgB,CAiJpH"}
@@ -0,0 +1,169 @@
1
+ import { IsPaymentParams } from "../types/PaymentParams.js";
2
+ import { _pricePattern, MaxLengths, ValidationResult } from "./constants.js";
3
+ import { IntentCodes } from "./IntentCodes.js";
4
+ import { PaymentModels } from "./PaymentModels.js";
5
+ import { GetLength, StringNotDefinedOrEmpty } from "./stringHelpers.js";
6
+ import { isValidIBAN } from 'ibantools';
7
+ /**
8
+ * Validates IBAN
9
+ * @param {string} iban IBAN which needs to be checked
10
+ * @returns {boolean} true ako je IBAN ispravan
11
+ */
12
+ export function IsIBANValid(iban) {
13
+ return (isValidIBAN(iban));
14
+ }
15
+ /**
16
+ * Validates payment model
17
+ * @param {string} paymentModel payment model
18
+ * @returns {boolean}
19
+ */
20
+ export function IsPaymentModelValid(paymentModel) {
21
+ return (PaymentModels.find((value) => value.model === paymentModel) !== undefined);
22
+ }
23
+ /**
24
+ * Validates callout number (reference number) according to payment model
25
+ *
26
+ * **⚠️ NOT CURRENTLY IMPLEMENTED** - This function always returns `true`.
27
+ * Proper validation by payment model is not yet implemented.
28
+ *
29
+ * @param calloutNumber - The reference number (poziv na broj) to validate
30
+ * @param paymentModel - The payment model code (e.g., "HR00", "HR01")
31
+ * @returns Always returns `true` - validation not implemented
32
+ *
33
+ * @see https://www.fina.hr/ngsite/content/download/13714/208442/1
34
+ */
35
+ export function IsCalloutNumberValid(calloutNumber, paymentModel) {
36
+ // TODO: Implement callout number validation by model
37
+ // https://www.fina.hr/ngsite/content/download/13714/208442/1
38
+ return true;
39
+ }
40
+ /**
41
+ * Validira kod namjene
42
+ * @param {string} intentCode kod namjene koji treba validirati
43
+ * @returns {boolean}
44
+ */
45
+ export function IsIntentCodeValid(intentCode) {
46
+ return (IntentCodes.find((value) => value.code === intentCode) !== undefined);
47
+ }
48
+ /**
49
+ * Validira sve parametre plaćanja
50
+ * @param {PaymentParams} paymentParams parametri koje treba validirati
51
+ * @returns {boolean}
52
+ */
53
+ export function ValidatePaymentParams(paymentParams, settings) {
54
+ if (!(IsPaymentParams(paymentParams))) {
55
+ return ValidationResult.InvalidPaymentParams;
56
+ }
57
+ let result = ValidationResult.OK;
58
+ let fieldLength = -1;
59
+ // Price
60
+ fieldLength = GetLength(paymentParams.Iznos);
61
+ if (fieldLength > MaxLengths.Price) {
62
+ result |= ValidationResult.PriceMaxLengthExceeded;
63
+ }
64
+ if (StringNotDefinedOrEmpty(paymentParams.Iznos) || (fieldLength == -1 || paymentParams.Iznos.match(_pricePattern) == null)) {
65
+ result |= ValidationResult.PricePatternInvalid;
66
+ }
67
+ // Payer name
68
+ fieldLength = GetLength(paymentParams.ImePlatitelja);
69
+ if (fieldLength > MaxLengths.PayerName) {
70
+ result |= ValidationResult.PayerNameMaxLengthExceeded;
71
+ }
72
+ if (StringNotDefinedOrEmpty(paymentParams.ImePlatitelja) || fieldLength == -1) {
73
+ result |= ValidationResult.PayerNameInvalid;
74
+ }
75
+ // Payer address
76
+ fieldLength = GetLength(paymentParams.AdresaPlatitelja);
77
+ if (fieldLength > MaxLengths.PayerAddress) {
78
+ result |= ValidationResult.PayerAddressMaxLengthExceeded;
79
+ }
80
+ if (StringNotDefinedOrEmpty(paymentParams.AdresaPlatitelja) || fieldLength == -1) {
81
+ result |= ValidationResult.PayerAddressInvalid;
82
+ }
83
+ // Payer HQ
84
+ fieldLength = GetLength(paymentParams.SjedistePlatitelja);
85
+ if (fieldLength > MaxLengths.PayerHQ) {
86
+ result |= ValidationResult.PayerHQMaxLengthExceeded;
87
+ }
88
+ if (StringNotDefinedOrEmpty(paymentParams.SjedistePlatitelja) || fieldLength == -1) {
89
+ result |= ValidationResult.PayerHQInvalid;
90
+ }
91
+ // Receiver name
92
+ fieldLength = GetLength(paymentParams.Primatelj);
93
+ if (fieldLength > MaxLengths.ReceiverName) {
94
+ result |= ValidationResult.ReceiverNameMaxLengthExceeded;
95
+ }
96
+ if (StringNotDefinedOrEmpty(paymentParams.Primatelj) || fieldLength == -1) {
97
+ result |= ValidationResult.ReceiverNameInvalid;
98
+ }
99
+ // Receiver address
100
+ fieldLength = GetLength(paymentParams.AdresaPrimatelja);
101
+ if (fieldLength > MaxLengths.ReceiverAddress) {
102
+ result |= ValidationResult.ReceiverAddressMaxLengthExceeded;
103
+ }
104
+ if (StringNotDefinedOrEmpty(paymentParams.AdresaPrimatelja) || fieldLength == -1) {
105
+ result |= ValidationResult.ReceiverAddressInvalid;
106
+ }
107
+ // Receiver HQ
108
+ fieldLength = GetLength(paymentParams.SjedistePrimatelja);
109
+ if (fieldLength > MaxLengths.ReceiverHQ) {
110
+ result |= ValidationResult.ReceiverHQMaxLengthExceeded;
111
+ }
112
+ if (StringNotDefinedOrEmpty(paymentParams.SjedistePrimatelja) || fieldLength == -1) {
113
+ result |= ValidationResult.ReceiverHQInvalid;
114
+ }
115
+ // IBAN
116
+ fieldLength = GetLength(paymentParams.IBAN);
117
+ if (fieldLength > MaxLengths.IBAN) {
118
+ result |= ValidationResult.IBANMaxLengthExceeded;
119
+ }
120
+ if (StringNotDefinedOrEmpty(paymentParams.IBAN) || fieldLength == -1) {
121
+ result |= ValidationResult.IBANInvalid;
122
+ }
123
+ if (settings.ValidateIBAN && !StringNotDefinedOrEmpty(paymentParams.IBAN) && !IsIBANValid(paymentParams.IBAN)) {
124
+ result |= ValidationResult.IBANInvalid;
125
+ }
126
+ // Payment model
127
+ fieldLength = GetLength(paymentParams.ModelPlacanja);
128
+ if (fieldLength > MaxLengths.PaymentModel) {
129
+ result |= ValidationResult.PaymentModelMaxLengthExceeded;
130
+ }
131
+ if (!StringNotDefinedOrEmpty(paymentParams.ModelPlacanja) && fieldLength == -1) {
132
+ result |= ValidationResult.PaymentModelInvalid;
133
+ }
134
+ if (!StringNotDefinedOrEmpty(paymentParams.ModelPlacanja) && !IsPaymentModelValid(paymentParams.ModelPlacanja)) {
135
+ result |= ValidationResult.PaymentModelInvalid;
136
+ }
137
+ // Callout number
138
+ fieldLength = GetLength(paymentParams.PozivNaBroj);
139
+ if (fieldLength > MaxLengths.CalloutNumber) {
140
+ result |= ValidationResult.CalloutNumberMaxLengthExceeded;
141
+ }
142
+ if (!StringNotDefinedOrEmpty(paymentParams.PozivNaBroj) && fieldLength == -1) {
143
+ result |= ValidationResult.CalloutNumberInvalid;
144
+ }
145
+ if (settings.ValidateCalloutNumber && !StringNotDefinedOrEmpty(paymentParams.PozivNaBroj) && !IsCalloutNumberValid(paymentParams.PozivNaBroj, paymentParams.ModelPlacanja)) {
146
+ result |= ValidationResult.CalloutNumberInvalid;
147
+ }
148
+ // Intent code
149
+ fieldLength = GetLength(paymentParams.SifraNamjene);
150
+ if (fieldLength > MaxLengths.IntentCode) {
151
+ result |= ValidationResult.IntentCodeMaxLengthExceeded;
152
+ }
153
+ if (!StringNotDefinedOrEmpty(paymentParams.SifraNamjene) && fieldLength == -1) {
154
+ result |= ValidationResult.IntentCodeInvalid;
155
+ }
156
+ if (!StringNotDefinedOrEmpty(paymentParams.SifraNamjene) && !IsIntentCodeValid(paymentParams.SifraNamjene)) {
157
+ result |= ValidationResult.IntentCodeInvalid;
158
+ }
159
+ // Description
160
+ fieldLength = GetLength(paymentParams.OpisPlacanja);
161
+ if (fieldLength > MaxLengths.Description) {
162
+ result |= ValidationResult.DescriptionMaxLengthExceeded;
163
+ }
164
+ if (StringNotDefinedOrEmpty(paymentParams.OpisPlacanja) || fieldLength == -1) {
165
+ result |= ValidationResult.DescriptionInvalid;
166
+ }
167
+ return result;
168
+ }
169
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../lib/helpers/validation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAiB,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACpC,OAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9B,CAAC;AAED;;;;GAIG;AACF,MAAM,UAAU,mBAAmB,CAAC,YAAoB;IACrD,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,KAAK,YAAY,CAAC,KAAK,SAAS,CAAC,CAAC;AACvF,CAAC;AAED;;;;;;;;;;;GAWG;AAEF,MAAM,UAAU,oBAAoB,CAAC,aAAqB,EAAE,YAAoB;IAC7E,qDAAqD;IACrD,6DAA6D;IAC7D,OAAO,IAAI,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACF,MAAM,UAAU,iBAAiB,CAAC,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iBAAiB,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE,CAAC;QACzG,MAAM,IAAI,gBAAgB,CAAC,iBAAiB,CAAC;IACjD,CAAC;IAED,cAAc;IACd,WAAW,GAAG,SAAS,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IACpD,IAAI,WAAW,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;QACvC,MAAM,IAAI,gBAAgB,CAAC,4BAA4B,CAAC;IAC5D,CAAC;IAED,IAAI,uBAAuB,CAAC,aAAa,CAAC,YAAY,CAAC,IAAI,WAAW,IAAI,CAAC,CAAC,EAAE,CAAC;QAC3E,MAAM,IAAI,gBAAgB,CAAC,kBAAkB,CAAC;IAClD,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { ValidationResult } from "./helpers/constants.js";
2
+ import { EncodePayment } from "./helpers/EncodePayment.js";
3
+ import { IsIBANValid, IsPaymentModelValid, IsCalloutNumberValid, IsIntentCodeValid, ValidatePaymentParams } from "./helpers/validation.js";
4
+ export { EncodePayment, IsIBANValid, IsPaymentModelValid, IsCalloutNumberValid, IsIntentCodeValid, ValidatePaymentParams, ValidationResult };
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAE3I,OAAO,EACH,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EACnB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ import { ValidationResult } from "./helpers/constants.js";
2
+ import { EncodePayment } from "./helpers/EncodePayment.js";
3
+ import { IsIBANValid, IsPaymentModelValid, IsCalloutNumberValid, IsIntentCodeValid, ValidatePaymentParams } from "./helpers/validation.js";
4
+ export { EncodePayment, IsIBANValid, IsPaymentModelValid, IsCalloutNumberValid, IsIntentCodeValid, ValidatePaymentParams, ValidationResult };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAE3I,OAAO,EACH,aAAa,EACb,WAAW,EACX,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EACnB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export interface BarcodePaymentSettings {
2
+ ValidateIBAN: boolean;
3
+ /** NOT IMPLEMENTED */
4
+ ValidateCalloutNumber: boolean;
5
+ }
6
+ //# sourceMappingURL=BarcodePaymentSettings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BarcodePaymentSettings.d.ts","sourceRoot":"","sources":["../../lib/types/BarcodePaymentSettings.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACtC,YAAY,EAAC,OAAO,CAAC;IACrB,sBAAsB;IACtB,qBAAqB,EAAC,OAAO,CAAC;CAC9B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=BarcodePaymentSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BarcodePaymentSettings.js","sourceRoot":"","sources":["../../lib/types/BarcodePaymentSettings.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ export interface PaymentParams {
2
+ Iznos: string;
3
+ ImePlatitelja: string;
4
+ AdresaPlatitelja: string;
5
+ SjedistePlatitelja: string;
6
+ Primatelj: string;
7
+ AdresaPrimatelja: string;
8
+ SjedistePrimatelja: string;
9
+ IBAN: string;
10
+ ModelPlacanja: string;
11
+ PozivNaBroj: string;
12
+ SifraNamjene: string;
13
+ OpisPlacanja: string;
14
+ }
15
+ declare function IsPaymentParams(p: PaymentParams): p is PaymentParams;
16
+ export { IsPaymentParams };
17
+ //# sourceMappingURL=PaymentParams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentParams.d.ts","sourceRoot":"","sources":["../../lib/types/PaymentParams.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAC,MAAM,CAAA;IACZ,aAAa,EAAC,MAAM,CAAA;IACpB,gBAAgB,EAAC,MAAM,CAAA;IACvB,kBAAkB,EAAC,MAAM,CAAA;IACzB,SAAS,EAAC,MAAM,CAAA;IAChB,gBAAgB,EAAC,MAAM,CAAA;IACvB,kBAAkB,EAAC,MAAM,CAAA;IACzB,IAAI,EAAC,MAAM,CAAA;IACX,aAAa,EAAC,MAAM,CAAA;IACpB,WAAW,EAAC,MAAM,CAAA;IAClB,YAAY,EAAC,MAAM,CAAA;IACnB,YAAY,EAAC,MAAM,CAAA;CACtB;AAED,iBAAS,eAAe,CAAC,CAAC,EAAC,aAAa,GAAG,CAAC,IAAI,aAAa,CAiB5D;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,20 @@
1
+ function IsPaymentParams(p) {
2
+ if (p === null || p === undefined || typeof p !== 'object') {
3
+ return false;
4
+ }
5
+ return typeof p.Iznos !== 'undefined' && p.Iznos !== null &&
6
+ typeof p.ImePlatitelja !== 'undefined' && p.ImePlatitelja !== null &&
7
+ typeof p.AdresaPlatitelja !== 'undefined' && p.AdresaPlatitelja !== null &&
8
+ typeof p.SjedistePlatitelja !== 'undefined' && p.SjedistePlatitelja !== null &&
9
+ typeof p.Primatelj !== 'undefined' && p.Primatelj !== null &&
10
+ typeof p.AdresaPrimatelja !== 'undefined' && p.AdresaPrimatelja !== null &&
11
+ typeof p.SjedistePrimatelja !== 'undefined' && p.SjedistePrimatelja !== null &&
12
+ typeof p.IBAN !== 'undefined' && p.IBAN !== null &&
13
+ typeof p.ModelPlacanja !== 'undefined' && p.ModelPlacanja !== null &&
14
+ typeof p.PozivNaBroj !== 'undefined' && p.PozivNaBroj !== null &&
15
+ typeof p.SifraNamjene !== 'undefined' && p.SifraNamjene !== null &&
16
+ typeof p.OpisPlacanja !== 'undefined' && p.OpisPlacanja !== null;
17
+ }
18
+ ;
19
+ export { IsPaymentParams };
20
+ //# sourceMappingURL=PaymentParams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentParams.js","sourceRoot":"","sources":["../../lib/types/PaymentParams.ts"],"names":[],"mappings":"AAeA,SAAS,eAAe,CAAC,CAAe;IACpC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QACzD,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,OAAO,OAAQ,CAAmB,CAAC,KAAK,KAAK,WAAW,IAAK,CAAmB,CAAC,KAAK,KAAK,IAAI;QACxF,OAAQ,CAAmB,CAAC,aAAa,KAAK,WAAW,IAAK,CAAmB,CAAC,aAAa,KAAK,IAAI;QACxG,OAAQ,CAAmB,CAAC,gBAAgB,KAAK,WAAW,IAAK,CAAmB,CAAC,gBAAgB,KAAK,IAAI;QAC9G,OAAQ,CAAmB,CAAC,kBAAkB,KAAK,WAAW,IAAK,CAAmB,CAAC,kBAAkB,KAAK,IAAI;QAClH,OAAQ,CAAmB,CAAC,SAAS,KAAK,WAAW,IAAK,CAAmB,CAAC,SAAS,KAAK,IAAI;QAChG,OAAQ,CAAmB,CAAC,gBAAgB,KAAK,WAAW,IAAK,CAAmB,CAAC,gBAAgB,KAAK,IAAI;QAC9G,OAAQ,CAAmB,CAAC,kBAAkB,KAAK,WAAW,IAAK,CAAmB,CAAC,kBAAkB,KAAK,IAAI;QAClH,OAAQ,CAAmB,CAAC,IAAI,KAAK,WAAW,IAAK,CAAmB,CAAC,IAAI,KAAK,IAAI;QACtF,OAAQ,CAAmB,CAAC,aAAa,KAAK,WAAW,IAAK,CAAmB,CAAC,aAAa,KAAK,IAAI;QACxG,OAAQ,CAAmB,CAAC,WAAW,KAAK,WAAW,IAAK,CAAmB,CAAC,WAAW,KAAK,IAAI;QACpG,OAAQ,CAAmB,CAAC,YAAY,KAAK,WAAW,IAAK,CAAmB,CAAC,YAAY,KAAK,IAAI;QACtG,OAAQ,CAAmB,CAAC,YAAY,KAAK,WAAW,IAAK,CAAmB,CAAC,YAAY,KAAK,IAAI,CAAC;AAClH,CAAC;AAAA,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "hub-3a-payment-encoder",
3
+ "version": "1.0.0",
4
+ "description": "Croatian HUB-3A payment slip encoder for 2D barcode generation",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.js"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "README.md",
19
+ "LICENSE"
20
+ ],
21
+ "scripts": {
22
+ "build": "tsc",
23
+ "prepublishOnly": "npm test && npm run build",
24
+ "test": "jest",
25
+ "test:watch": "jest --watch",
26
+ "test:coverage": "jest --coverage"
27
+ },
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/knee-cola/hub-3a-payment-encoder.git"
31
+ },
32
+ "author": "Nikola Derežić",
33
+ "license": "LGPL-3.0-or-later",
34
+ "bugs": {
35
+ "url": "https://github.com/knee-cola/hub-3a-payment-encoder/issues"
36
+ },
37
+ "homepage": "https://github.com/knee-cola/hub-3a-payment-encoder#readme",
38
+ "dependencies": {
39
+ "ibantools": "^4.1.3"
40
+ },
41
+ "devDependencies": {
42
+ "@types/jest": "^30.0.0",
43
+ "jest": "^30.2.0",
44
+ "ts-jest": "^29.4.5",
45
+ "typescript": "^5.9.3"
46
+ }
47
+ }