@ripwords/myinvois-client 0.1.6 → 0.1.7

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 (81) hide show
  1. package/package.json +5 -8
  2. package/.prettierrc +0 -8
  3. package/CHANGELOG.md +0 -152
  4. package/bun.lock +0 -460
  5. package/myinvois-cert.conf.template +0 -23
  6. package/scripts/gen-cert.sh +0 -159
  7. package/src/api/platform/platformLogin.ts +0 -34
  8. package/src/index.ts +0 -530
  9. package/src/types/classification-codes.d.ts +0 -115
  10. package/src/types/country-code.d.ts +0 -790
  11. package/src/types/currencies.d.ts +0 -383
  12. package/src/types/documents.d.ts +0 -869
  13. package/src/types/e-invoice.d.ts +0 -41
  14. package/src/types/index.d.ts +0 -24
  15. package/src/types/msic/0X.d.ts +0 -408
  16. package/src/types/msic/1X.d.ts +0 -210
  17. package/src/types/msic/2X.d.ts +0 -266
  18. package/src/types/msic/3X.d.ts +0 -114
  19. package/src/types/msic/4X.d.ts +0 -520
  20. package/src/types/msic/5X.d.ts +0 -144
  21. package/src/types/msic/6X.d.ts +0 -200
  22. package/src/types/msic/7X.d.ts +0 -132
  23. package/src/types/msic/8X.d.ts +0 -210
  24. package/src/types/msic/9X.d.ts +0 -186
  25. package/src/types/msic-codes.d.ts +0 -31
  26. package/src/types/payment-modes.d.ts +0 -41
  27. package/src/types/signatures.d.ts +0 -169
  28. package/src/types/state-codes.d.ts +0 -59
  29. package/src/types/tax-types.d.ts +0 -39
  30. package/src/types/unit/1X.d.ts +0 -16
  31. package/src/types/unit/2X.d.ts +0 -62
  32. package/src/types/unit/3X.d.ts +0 -17
  33. package/src/types/unit/4X.d.ts +0 -44
  34. package/src/types/unit/5X.d.ts +0 -26
  35. package/src/types/unit/6X.d.ts +0 -12
  36. package/src/types/unit/7X.d.ts +0 -12
  37. package/src/types/unit/8X.d.ts +0 -15
  38. package/src/types/unit/9X.d.ts +0 -11
  39. package/src/types/unit/AX.d.ts +0 -202
  40. package/src/types/unit/BX.d.ts +0 -212
  41. package/src/types/unit/CX.d.ts +0 -238
  42. package/src/types/unit/DX.d.ts +0 -212
  43. package/src/types/unit/EX.d.ts +0 -196
  44. package/src/types/unit/FX.d.ts +0 -236
  45. package/src/types/unit/GX.d.ts +0 -254
  46. package/src/types/unit/HX.d.ts +0 -234
  47. package/src/types/unit/IX.d.ts +0 -28
  48. package/src/types/unit/JX.d.ts +0 -190
  49. package/src/types/unit/KX.d.ts +0 -284
  50. package/src/types/unit/LX.d.ts +0 -228
  51. package/src/types/unit/MX.d.ts +0 -288
  52. package/src/types/unit/NX.d.ts +0 -226
  53. package/src/types/unit/OX.d.ts +0 -34
  54. package/src/types/unit/PX.d.ts +0 -224
  55. package/src/types/unit/QX.d.ts +0 -94
  56. package/src/types/unit/RX.d.ts +0 -28
  57. package/src/types/unit/SX.d.ts +0 -56
  58. package/src/types/unit/TX.d.ts +0 -44
  59. package/src/types/unit/UX.d.ts +0 -14
  60. package/src/types/unit/VX.d.ts +0 -13
  61. package/src/types/unit/WX.d.ts +0 -34
  62. package/src/types/unit/XX.d.ts +0 -825
  63. package/src/types/unit/YX.d.ts +0 -17
  64. package/src/types/unit/ZX.d.ts +0 -19
  65. package/src/types/unit-types.d.ts +0 -86
  66. package/src/utils/base64.ts +0 -7
  67. package/src/utils/certificate.ts +0 -60
  68. package/src/utils/document.ts +0 -852
  69. package/src/utils/getBaseUrl.ts +0 -5
  70. package/src/utils/helpers.ts +0 -552
  71. package/src/utils/signature-diagnostics.ts +0 -583
  72. package/src/utils/validation.ts +0 -268
  73. package/test/MyInvoiClientWithRealData.test.ts +0 -40
  74. package/test/MyInvoisClient.test.ts +0 -204
  75. package/test/base64.test.ts +0 -43
  76. package/test/dynamicInvoiceFeatures.test.ts +0 -451
  77. package/test/signAndSubmitInvoice.test.ts +0 -452
  78. package/test/signature-diagnostics.test.ts +0 -130
  79. package/tsconfig.json +0 -39
  80. package/tsdown.config.ts +0 -31
  81. package/vitest.config.ts +0 -8
@@ -1,224 +0,0 @@
1
- /**
2
- * Unit type codes starting with 'P'.
3
- */
4
- export type UnitTypeCode_PX =
5
- | 'P1'
6
- | 'P10'
7
- | 'P11'
8
- | 'P12'
9
- | 'P13'
10
- | 'P14'
11
- | 'P15'
12
- | 'P16'
13
- | 'P17'
14
- | 'P18'
15
- | 'P19'
16
- | 'P2'
17
- | 'P20'
18
- | 'P21'
19
- | 'P22'
20
- | 'P23'
21
- | 'P24'
22
- | 'P25'
23
- | 'P26'
24
- | 'P27'
25
- | 'P28'
26
- | 'P29'
27
- | 'P30'
28
- | 'P31'
29
- | 'P32'
30
- | 'P33'
31
- | 'P34'
32
- | 'P35'
33
- | 'P36'
34
- | 'P37'
35
- | 'P38'
36
- | 'P39'
37
- | 'P40'
38
- | 'P41'
39
- | 'P42'
40
- | 'P43'
41
- | 'P44'
42
- | 'P45'
43
- | 'P46'
44
- | 'P47'
45
- | 'P48'
46
- | 'P49'
47
- | 'P5'
48
- | 'P50'
49
- | 'P51'
50
- | 'P52'
51
- | 'P53'
52
- | 'P54'
53
- | 'P55'
54
- | 'P56'
55
- | 'P57'
56
- | 'P58'
57
- | 'P59'
58
- | 'P60'
59
- | 'P61'
60
- | 'P62'
61
- | 'P63'
62
- | 'P64'
63
- | 'P65'
64
- | 'P66'
65
- | 'P67'
66
- | 'P68'
67
- | 'P69'
68
- | 'P70'
69
- | 'P71'
70
- | 'P72'
71
- | 'P73'
72
- | 'P74'
73
- | 'P75'
74
- | 'P76'
75
- | 'P77'
76
- | 'P78'
77
- | 'P79'
78
- | 'P80'
79
- | 'P81'
80
- | 'P82'
81
- | 'P83'
82
- | 'P84'
83
- | 'P85'
84
- | 'P86'
85
- | 'P87'
86
- | 'P88'
87
- | 'P89'
88
- | 'P90'
89
- | 'P91'
90
- | 'P92'
91
- | 'P93'
92
- | 'P94'
93
- | 'P95'
94
- | 'P96'
95
- | 'P97'
96
- | 'P98'
97
- | 'P99'
98
- | 'PAL'
99
- | 'PD'
100
- | 'PFL'
101
- | 'PGL'
102
- | 'PI'
103
- | 'PLA'
104
- | 'PO'
105
- | 'PQ'
106
- | 'PR'
107
- | 'PS'
108
- | 'PTD'
109
- | 'PTI'
110
- | 'PTL'
111
- | 'PTN'
112
-
113
- /**
114
- * Enum representing unit type codes starting with 'P'.
115
- */
116
- export enum UnitTypeCodeEnum_PX {
117
- Percent = 'P1',
118
- CoulombPerMetre = 'P10',
119
- Kiloweber = 'P11',
120
- Gamma = 'P12',
121
- Kilotesla = 'P13',
122
- JoulePerSecond = 'P14',
123
- JoulePerMinute = 'P15',
124
- JoulePerHour = 'P16',
125
- JoulePerDay = 'P17',
126
- KilojoulePerSecond = 'P18',
127
- KilojoulePerMinute = 'P19',
128
- PoundPerFoot = 'P2',
129
- KilojoulePerHour = 'P20',
130
- KilojoulePerDay = 'P21',
131
- Nanoohm = 'P22',
132
- OhmCircularMilPerFoot = 'P23',
133
- Kilohenry = 'P24',
134
- LumenPerSquareFoot = 'P25',
135
- Phot = 'P26',
136
- Footcandle = 'P27',
137
- CandelaPerSquareInch = 'P28',
138
- Footlambert = 'P29',
139
- Lambert = 'P30',
140
- Stilb = 'P31',
141
- CandelaPerSquareFoot = 'P32',
142
- Kilocandela = 'P33',
143
- Millicandela = 'P34',
144
- HefnerKerze = 'P35',
145
- InternationalCandle = 'P36',
146
- BritishThermalUnitInternationalTablePerSquareFoot = 'P37',
147
- BritishThermalUnitThermochemicalPerSquareFoot = 'P38',
148
- CalorieThermochemicalPerSquareCentimetre = 'P39',
149
- Langley = 'P40',
150
- DecadeLogarithmic = 'P41',
151
- PascalSquaredSecond = 'P42',
152
- BelPerMetre = 'P43',
153
- PoundMole = 'P44',
154
- PoundMolePerSecond = 'P45',
155
- PoundMolePerMinute = 'P46',
156
- KilomolePerKilogram = 'P47',
157
- PoundMolePerPound = 'P48',
158
- NewtonSquareMetrePerAmpere = 'P49',
159
- FivePack = 'P5',
160
- WeberMetre = 'P50',
161
- MolPerKilogramPascal = 'P51',
162
- MolPerCubicMetrePascal = 'P52',
163
- UnitPole = 'P53',
164
- MilligrayPerSecond = 'P54',
165
- MicrograyPerSecond = 'P55',
166
- NanograyPerSecond = 'P56',
167
- GrayPerMinute = 'P57',
168
- MilligrayPerMinute = 'P58',
169
- MicrograyPerMinute = 'P59',
170
- NanograyPerMinute = 'P60',
171
- GrayPerHour = 'P61',
172
- MilligrayPerHour = 'P62',
173
- MicrograyPerHour = 'P63',
174
- NanograyPerHour = 'P64',
175
- SievertPerSecond = 'P65',
176
- MillisievertPerSecond = 'P66',
177
- MicrosievertPerSecond = 'P67',
178
- NanosievertPerSecond = 'P68',
179
- RemPerSecond = 'P69',
180
- SievertPerHour = 'P70',
181
- MillisievertPerHour = 'P71',
182
- MicrosievertPerHour = 'P72',
183
- NanosievertPerHour = 'P73',
184
- SievertPerMinute = 'P74',
185
- MillisievertPerMinute = 'P75',
186
- MicrosievertPerMinute = 'P76',
187
- NanosievertPerMinute = 'P77',
188
- ReciprocalSquareInch = 'P78',
189
- PascalSquareMetrePerKilogram = 'P79',
190
- MillipascalPerMetre = 'P80',
191
- KilopascalPerMetre = 'P81',
192
- HectopascalPerMetre = 'P82',
193
- StandardAtmospherePerMetre = 'P83',
194
- TechnicalAtmospherePerMetre = 'P84',
195
- TorrPerMetre = 'P85',
196
- PsiPerInch = 'P86',
197
- CubicMetrePerSecondSquareMetre = 'P87',
198
- Rhe = 'P88',
199
- PoundForceFootPerInch = 'P89',
200
- PoundForceInchPerInch = 'P90',
201
- Perm0DegreesC = 'P91',
202
- Perm23DegreesC = 'P92',
203
- BytePerSecond = 'P93',
204
- KilobytePerSecond = 'P94',
205
- MegabytePerSecond = 'P95',
206
- ReciprocalVolt = 'P96',
207
- ReciprocalRadian = 'P97',
208
- PascalToThePowerSumOfStoichiometricNumbers = 'P98',
209
- MolePerCubivMetreToThePowerSumOfStoichiometricNumbers = 'P99',
210
- Pascal = 'PAL',
211
- Pad = 'PD',
212
- ProofLitre = 'PFL',
213
- ProofGallon = 'PGL',
214
- Pitch = 'PI',
215
- DegreePlato = 'PLA',
216
- PoundPerInchOfLength = 'PO',
217
- PagePerInch = 'PQ',
218
- Pair = 'PR',
219
- PoundForcePerSquareInch = 'PS',
220
- DryPintUS = 'PTD',
221
- PintUK = 'PTI',
222
- LiquidPintUS = 'PTL',
223
- Portion = 'PTN',
224
- }
@@ -1,94 +0,0 @@
1
- /**
2
- * Unit type codes starting with 'Q'.
3
- */
4
- export type UnitTypeCode_QX =
5
- | 'Q10'
6
- | 'Q11'
7
- | 'Q12'
8
- | 'Q13'
9
- | 'Q14'
10
- | 'Q15'
11
- | 'Q16'
12
- | 'Q17'
13
- | 'Q18'
14
- | 'Q19'
15
- | 'Q20'
16
- | 'Q21'
17
- | 'Q22'
18
- | 'Q23'
19
- | 'Q24'
20
- | 'Q25'
21
- | 'Q26'
22
- | 'Q27'
23
- | 'Q28'
24
- | 'Q29'
25
- | 'Q3'
26
- | 'Q30'
27
- | 'Q31'
28
- | 'Q32'
29
- | 'Q33'
30
- | 'Q34'
31
- | 'Q35'
32
- | 'Q36'
33
- | 'Q37'
34
- | 'Q38'
35
- | 'Q39'
36
- | 'Q40'
37
- | 'Q41'
38
- | 'Q42'
39
- | 'QA'
40
- | 'QAN'
41
- | 'QB'
42
- | 'QR'
43
- | 'QTD'
44
- | 'QTI'
45
- | 'QTL'
46
- | 'QTR'
47
-
48
- /**
49
- * Enum representing unit type codes starting with 'Q'.
50
- */
51
- export enum UnitTypeCodeEnum_QX {
52
- JoulePerTesla = 'Q10',
53
- Erlang = 'Q11',
54
- Octet = 'Q12',
55
- OctetPerSecond = 'Q13',
56
- Shannon = 'Q14',
57
- Hartley = 'Q15',
58
- NaturalUnitOfInformation = 'Q16',
59
- ShannonPerSecond = 'Q17',
60
- HartleyPerSecond = 'Q18',
61
- NaturalUnitOfInformationPerSecond = 'Q19',
62
- SecondPerKilogram = 'Q20',
63
- WattSquareMetre = 'Q21',
64
- SecondPerRadianCubicMetre = 'Q22',
65
- ReciprocalWeber = 'Q23',
66
- ReciprocalInch = 'Q24',
67
- Dioptre = 'Q25',
68
- Ratio = 'Q26', // 1/1
69
- NewtonMetrePerMetre = 'Q27',
70
- KilogramPerSquareMetrePascalSecond = 'Q28',
71
- MicrogramPerHectogram = 'Q29',
72
- Meal = 'Q3',
73
- PH = 'Q30', // potential of Hydrogen
74
- KilojoulePerGram = 'Q31',
75
- Femtolitre = 'Q32',
76
- Picolitre = 'Q33',
77
- Nanolitre = 'Q34',
78
- MegawattsPerMinute = 'Q35',
79
- SquareMetrePerCubicMetre = 'Q36',
80
- StandardCubicMetrePerDay = 'Q37',
81
- StandardCubicMetrePerHour = 'Q38',
82
- NormalizedCubicMetrePerDay = 'Q39',
83
- NormalizedCubicMetrePerHour = 'Q40',
84
- JoulePerNormalizedCubicMetre = 'Q41',
85
- JoulePerStandardCubicMetre = 'Q42',
86
- PageFacsimile = 'QA',
87
- QuarterYear = 'QAN',
88
- PageHardcopy = 'QB',
89
- Quire = 'QR',
90
- DryQuartUS = 'QTD',
91
- QuartUK = 'QTI',
92
- LiquidQuartUS = 'QTL',
93
- QuarterUK = 'QTR', // Weight
94
- }
@@ -1,28 +0,0 @@
1
- /**
2
- * Unit type codes starting with 'R'.
3
- */
4
- export type UnitTypeCode_RX =
5
- | 'R1'
6
- | 'R9'
7
- | 'RH'
8
- | 'RM'
9
- | 'ROM'
10
- | 'RP'
11
- | 'RPM'
12
- | 'RPS'
13
- | 'RT'
14
-
15
- /**
16
- * Enum representing unit type codes starting with 'R'.
17
- */
18
- export enum UnitTypeCodeEnum_RX {
19
- Pica = 'R1',
20
- ThousandCubicMetre = 'R9',
21
- OperatingHour = 'RH',
22
- Ream = 'RM',
23
- Room = 'ROM',
24
- PoundPerReam = 'RP',
25
- RevolutionsPerMinute = 'RPM',
26
- RevolutionsPerSecond = 'RPS',
27
- RevenueTonMile = 'RT',
28
- }
@@ -1,56 +0,0 @@
1
- /**
2
- * Unit type codes starting with 'S'.
3
- */
4
- export type UnitTypeCode_SX =
5
- | 'S3'
6
- | 'S4'
7
- | 'SAN'
8
- | 'SCO'
9
- | 'SCR'
10
- | 'SEC'
11
- | 'SET'
12
- | 'SG'
13
- | 'SIE'
14
- | 'SM3'
15
- | 'SMI'
16
- | 'SQ'
17
- | 'SQR'
18
- | 'SR'
19
- | 'STC'
20
- | 'STI'
21
- | 'STK'
22
- | 'STL'
23
- | 'STN'
24
- | 'STW'
25
- | 'SW'
26
- | 'SX'
27
- | 'SYR'
28
-
29
- /**
30
- * Enum representing unit type codes starting with 'S'.
31
- */
32
- export enum UnitTypeCodeEnum_SX {
33
- SquareFootPerSecond = 'S3',
34
- SquareMetrePerSecond = 'S4',
35
- HalfYear = 'SAN', // 6 months
36
- Score = 'SCO',
37
- Scruple = 'SCR',
38
- SecondTime = 'SEC', // [unit of time]
39
- Set = 'SET',
40
- Segment = 'SG',
41
- Siemens = 'SIE',
42
- StandardCubicMetre = 'SM3',
43
- StatuteMile = 'SMI',
44
- Square = 'SQ',
45
- SquareRoofing = 'SQR',
46
- Strip = 'SR',
47
- Stick = 'STC',
48
- StoneUK = 'STI',
49
- StickCigarette = 'STK',
50
- StandardLitre = 'STL',
51
- ShortTon = 'STN', // ton (US) or short ton (UK/US)
52
- Straw = 'STW',
53
- Skein = 'SW',
54
- Shipment = 'SX',
55
- Syringe = 'SYR',
56
- }
@@ -1,44 +0,0 @@
1
- /**
2
- * Unit type codes starting with 'T'.
3
- */
4
- export type UnitTypeCode_TX =
5
- | 'T0'
6
- | 'T3'
7
- | 'TAH'
8
- | 'TAN'
9
- | 'TI'
10
- | 'TIC'
11
- | 'TIP'
12
- | 'TKM'
13
- | 'TMS'
14
- | 'TNE'
15
- | 'TP'
16
- | 'TPI'
17
- | 'TPR'
18
- | 'TQD'
19
- | 'TRL'
20
- | 'TST'
21
- | 'TTS'
22
-
23
- /**
24
- * Enum representing unit type codes starting with 'T'.
25
- */
26
- export enum UnitTypeCodeEnum_TX {
27
- TelecomLineInService = 'T0',
28
- ThousandPiece = 'T3',
29
- KiloampereHour = 'TAH',
30
- TotalAcidNumber = 'TAN',
31
- ThousandSquareInch = 'TI',
32
- MetricTonIncContainer = 'TIC',
33
- MetricTonIncInnerPack = 'TIP',
34
- TonneKilometre = 'TKM',
35
- KgImportedMeatLessOffal = 'TMS',
36
- Tonne = 'TNE',
37
- TenPack = 'TP',
38
- TeethPerInch = 'TPI',
39
- TenPair = 'TPR',
40
- ThousandCubicMetrePerDay = 'TQD',
41
- TrillionEUR = 'TRL',
42
- TenSet = 'TST',
43
- TenThousandSticks = 'TTS',
44
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * Unit type codes starting with 'U'.
3
- */
4
- export type UnitTypeCode_UX = 'U1' | 'U2' | 'UB' | 'UC'
5
-
6
- /**
7
- * Enum representing unit type codes starting with 'U'.
8
- */
9
- export enum UnitTypeCodeEnum_UX {
10
- Treatment = 'U1',
11
- Tablet = 'U2',
12
- TelecomLineInServiceAvg = 'UB',
13
- TelecomPort = 'UC',
14
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * Unit type codes starting with 'V'.
3
- */
4
- export type UnitTypeCode_VX = 'VA' | 'VLT' | 'VP'
5
-
6
- /**
7
- * Enum representing unit type codes starting with 'V'.
8
- */
9
- export enum UnitTypeCodeEnum_VX {
10
- VoltAmperePerKilogram = 'VA',
11
- Volt = 'VLT',
12
- PercentVolume = 'VP',
13
- }
@@ -1,34 +0,0 @@
1
- /**
2
- * Unit type codes starting with 'W'.
3
- */
4
- export type UnitTypeCode_WX =
5
- | 'W2'
6
- | 'WA'
7
- | 'WB'
8
- | 'WCD'
9
- | 'WE'
10
- | 'WEB'
11
- | 'WEE'
12
- | 'WG'
13
- | 'WHR'
14
- | 'WM'
15
- | 'WSD'
16
- | 'WTT'
17
-
18
- /**
19
- * Enum representing unit type codes starting with 'W'.
20
- */
21
- export enum UnitTypeCodeEnum_WX {
22
- WetKilo = 'W2',
23
- WattPerKilogram = 'WA',
24
- WetPound = 'WB',
25
- Cord = 'WCD',
26
- WetTon = 'WE',
27
- Weber = 'WEB',
28
- Week = 'WEE',
29
- WineGallon = 'WG',
30
- WattHour = 'WHR',
31
- WorkingMonth = 'WM',
32
- Standard = 'WSD',
33
- Watt = 'WTT',
34
- }