@ripwords/myinvois-client 0.0.7 → 0.0.8

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 (54) hide show
  1. package/bun.lock +25 -25
  2. package/dist/index.cjs +39 -19
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.ts +2316 -463
  5. package/dist/index.js +16 -19
  6. package/package.json +17 -17
  7. package/src/api/platform/taxpayerLogin.ts +28 -0
  8. package/src/types/index.d.ts +12 -0
  9. package/src/types/unit/1X.d.ts +16 -0
  10. package/src/types/unit/2X.d.ts +62 -0
  11. package/src/types/unit/3X.d.ts +17 -0
  12. package/src/types/unit/4X.d.ts +44 -0
  13. package/src/types/unit/5X.d.ts +26 -0
  14. package/src/types/unit/6X.d.ts +12 -0
  15. package/src/types/unit/7X.d.ts +12 -0
  16. package/src/types/unit/8X.d.ts +15 -0
  17. package/src/types/unit/9X.d.ts +11 -0
  18. package/src/types/unit/AX.d.ts +202 -0
  19. package/src/types/unit/BX.d.ts +212 -0
  20. package/src/types/unit/CX.d.ts +238 -0
  21. package/src/types/unit/DX.d.ts +212 -0
  22. package/src/types/unit/EX.d.ts +196 -0
  23. package/src/types/unit/FX.d.ts +236 -0
  24. package/src/types/unit/GX.d.ts +254 -0
  25. package/src/types/unit/HX.d.ts +234 -0
  26. package/src/types/unit/IX.d.ts +28 -0
  27. package/src/types/unit/JX.d.ts +190 -0
  28. package/src/types/unit/KX.d.ts +284 -0
  29. package/src/types/unit/LX.d.ts +228 -0
  30. package/src/types/unit/MX.d.ts +288 -0
  31. package/src/types/unit/NX.d.ts +226 -0
  32. package/src/types/unit/OX.d.ts +34 -0
  33. package/src/types/unit/PX.d.ts +224 -0
  34. package/src/types/unit/QX.d.ts +94 -0
  35. package/src/types/unit/RX.d.ts +28 -0
  36. package/src/types/unit/SX.d.ts +56 -0
  37. package/src/types/unit/TX.d.ts +44 -0
  38. package/src/types/unit/UX.d.ts +14 -0
  39. package/src/types/unit/VX.d.ts +13 -0
  40. package/src/types/unit/WX.d.ts +34 -0
  41. package/src/types/unit/XX.d.ts +825 -0
  42. package/src/types/unit/YX.d.ts +17 -0
  43. package/src/types/unit/ZX.d.ts +19 -0
  44. package/src/types/unit-types.d.ts +71 -575
  45. package/src/utils/MyInvoisClient.ts +11 -33
  46. package/src/utils/getBaseUrl.ts +5 -0
  47. package/test/{MyInvoiClientRealData.test.ts → MyInvoiClientWithRealData.test.ts} +13 -1
  48. package/test/MyInvoisClient.test.ts +4 -7
  49. package/dist/cjs/index.cjs +0 -75
  50. package/dist/cjs/index.cjs.map +0 -1
  51. package/dist/cjs/multipart-parser-Bu3ikqFQ.cjs +0 -182
  52. package/dist/cjs/multipart-parser-Bu3ikqFQ.cjs.map +0 -1
  53. package/dist/cjs/node-qs2pnN6F.cjs +0 -4124
  54. package/dist/cjs/node-qs2pnN6F.cjs.map +0 -1
@@ -0,0 +1,224 @@
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
+ }
@@ -0,0 +1,94 @@
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
+ }
@@ -0,0 +1,28 @@
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
+ }
@@ -0,0 +1,56 @@
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
+ }
@@ -0,0 +1,44 @@
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
+ }
@@ -0,0 +1,14 @@
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
+ }
@@ -0,0 +1,13 @@
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
+ }
@@ -0,0 +1,34 @@
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
+ }