@ripwords/myinvois-client 0.0.1

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.
@@ -0,0 +1,3810 @@
1
+
2
+ //#region src/types/e-invoice.d.ts
3
+ /**
4
+ * Represents the allowed codes for e-Invoice types.
5
+ * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/e-invoice-types/
6
+ */
7
+ type EInvoiceTypeCode =
8
+ | '01' // Invoice
9
+ | '02' // Credit Note
10
+ | '03' // Debit Note
11
+ | '04' // Refund Note
12
+ | '11' // Self-billed Invoice
13
+ | '12' // Self-billed Credit Note
14
+ | '13' // Self-billed Debit Note
15
+ | '14'
16
+ /**
17
+ * Interface representing an e-Invoice type entry.
18
+ * Contains the code and its corresponding description.
19
+ */
20
+ interface EInvoiceType {
21
+ code: EInvoiceTypeCode
22
+ description: string
23
+ }
24
+ /**
25
+ * Enum representing the allowed codes for e-Invoice types with descriptive names.
26
+ * Provides a more readable way to reference e-Invoice types compared to using raw codes.
27
+ *
28
+ * @example
29
+ * const invoiceCode = EInvoiceTypeCodeEnum.Invoice;
30
+ * console.log(invoiceCode); // Output: "01"
31
+ */
32
+ declare enum EInvoiceTypeCodeEnum {
33
+ Invoice = '01',
34
+ CreditNote = '02',
35
+ DebitNote = '03',
36
+ RefundNote = '04',
37
+ SelfBilledInvoice = '11',
38
+ SelfBilledCreditNote = '12',
39
+ SelfBilledDebitNote = '13',
40
+ SelfBilledRefundNote = '14',
41
+ }
42
+
43
+ //#endregion
44
+ //#region src/types/currencies.d.ts
45
+ /**
46
+ * Represents the allowed ISO-4217 3-letter currency codes.
47
+ * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/currencies/
48
+ */
49
+ type CurrencyCode =
50
+ | 'AED'
51
+ | 'AFN'
52
+ | 'ALL'
53
+ | 'AMD'
54
+ | 'ANG'
55
+ | 'AOA'
56
+ | 'ARS'
57
+ | 'AUD'
58
+ | 'AWG'
59
+ | 'AZN'
60
+ | 'BAM'
61
+ | 'BBD'
62
+ | 'BDT'
63
+ | 'BGN'
64
+ | 'BHD'
65
+ | 'BIF'
66
+ | 'BMD'
67
+ | 'BND'
68
+ | 'BOB'
69
+ | 'BOV'
70
+ | 'BRL'
71
+ | 'BSD'
72
+ | 'BTN'
73
+ | 'BWP'
74
+ | 'BYN'
75
+ | 'BZD'
76
+ | 'CAD'
77
+ | 'CDF'
78
+ | 'CHE'
79
+ | 'CHF'
80
+ | 'CHW'
81
+ | 'CLF'
82
+ | 'CLP'
83
+ | 'CNY'
84
+ | 'COP'
85
+ | 'COU'
86
+ | 'CRC'
87
+ | 'CUC'
88
+ | 'CUP'
89
+ | 'CVE'
90
+ | 'CZK'
91
+ | 'DJF'
92
+ | 'DKK'
93
+ | 'DOP'
94
+ | 'DZD'
95
+ | 'EGP'
96
+ | 'ERN'
97
+ | 'ETB'
98
+ | 'EUR'
99
+ | 'FJD'
100
+ | 'FKP'
101
+ | 'GBP'
102
+ | 'GEL'
103
+ | 'GHS'
104
+ | 'GIP'
105
+ | 'GMD'
106
+ | 'GNF'
107
+ | 'GTQ'
108
+ | 'GYD'
109
+ | 'HKD'
110
+ | 'HNL'
111
+ | 'HRK'
112
+ | 'HTG'
113
+ | 'HUF'
114
+ | 'IDR'
115
+ | 'ILS'
116
+ | 'INR'
117
+ | 'IQD'
118
+ | 'IRR'
119
+ | 'ISK'
120
+ | 'JMD'
121
+ | 'JOD'
122
+ | 'JPY'
123
+ | 'KES'
124
+ | 'KGS'
125
+ | 'KHR'
126
+ | 'KMF'
127
+ | 'KPW'
128
+ | 'KRW'
129
+ | 'KWD'
130
+ | 'KYD'
131
+ | 'KZT'
132
+ | 'LAK'
133
+ | 'LBP'
134
+ | 'LKR'
135
+ | 'LRD'
136
+ | 'LSL'
137
+ | 'LYD'
138
+ | 'MAD'
139
+ | 'MDL'
140
+ | 'MGA'
141
+ | 'MKD'
142
+ | 'MMK'
143
+ | 'MNT'
144
+ | 'MOP'
145
+ | 'MRU'
146
+ | 'MUR'
147
+ | 'MVR'
148
+ | 'MWK'
149
+ | 'MXN'
150
+ | 'MXV'
151
+ | 'MYR'
152
+ | 'MZN'
153
+ | 'NAD'
154
+ | 'NGN'
155
+ | 'NIO'
156
+ | 'NOK'
157
+ | 'NPR'
158
+ | 'NZD'
159
+ | 'OMR'
160
+ | 'PAB'
161
+ | 'PEN'
162
+ | 'PGK'
163
+ | 'PHP'
164
+ | 'PKR'
165
+ | 'PLN'
166
+ | 'PYG'
167
+ | 'QAR'
168
+ | 'RON'
169
+ | 'RSD'
170
+ | 'RUB'
171
+ | 'RWF'
172
+ | 'SAR'
173
+ | 'SBD'
174
+ | 'SCR'
175
+ | 'SDG'
176
+ | 'SEK'
177
+ | 'SGD'
178
+ | 'SHP'
179
+ | 'SLL'
180
+ | 'SOS'
181
+ | 'SRD'
182
+ | 'SSP'
183
+ | 'STN'
184
+ | 'SVC'
185
+ | 'SYP'
186
+ | 'SZL'
187
+ | 'THB'
188
+ | 'TJS'
189
+ | 'TMT'
190
+ | 'TND'
191
+ | 'TOP'
192
+ | 'TRY'
193
+ | 'TTD'
194
+ | 'TWD'
195
+ | 'TZS'
196
+ | 'UAH'
197
+ | 'UGX'
198
+ | 'USD'
199
+ | 'USN'
200
+ | 'UYI'
201
+ | 'UYU'
202
+ | 'UYW'
203
+ | 'UZS'
204
+ | 'VED'
205
+ | 'VES'
206
+ | 'VND'
207
+ | 'VUV'
208
+ | 'WST'
209
+ | 'XAF'
210
+ | 'XAG'
211
+ | 'XAU'
212
+ | 'XBA'
213
+ | 'XBB'
214
+ | 'XBC'
215
+ | 'XBD'
216
+ | 'XCD'
217
+ | 'XDR'
218
+ | 'XOF'
219
+ | 'XPD'
220
+ | 'XPF'
221
+ | 'XPT'
222
+ | 'XSU'
223
+ | 'XUA'
224
+ | 'XXX'
225
+ | 'YER'
226
+ | 'ZAR'
227
+ | 'ZMW'
228
+ | 'ZWL'
229
+ /**
230
+ * Enum representing the allowed ISO-4217 3-letter currency codes.
231
+ * Provides a more readable way to reference currency codes.
232
+ *
233
+ * @example
234
+ * const currency = CurrencyCodeEnum.MYR;
235
+ * console.log(currency); // Output: "MYR"
236
+ */
237
+ declare enum CurrencyCodeEnum {
238
+ AED = 'AED',
239
+ AFN = 'AFN',
240
+ ALL = 'ALL',
241
+ AMD = 'AMD',
242
+ ANG = 'ANG',
243
+ AOA = 'AOA',
244
+ ARS = 'ARS',
245
+ AUD = 'AUD',
246
+ AWG = 'AWG',
247
+ AZN = 'AZN',
248
+ BAM = 'BAM',
249
+ BBD = 'BBD',
250
+ BDT = 'BDT',
251
+ BGN = 'BGN',
252
+ BHD = 'BHD',
253
+ BIF = 'BIF',
254
+ BMD = 'BMD',
255
+ BND = 'BND',
256
+ BOB = 'BOB',
257
+ BOV = 'BOV',
258
+ BRL = 'BRL',
259
+ BSD = 'BSD',
260
+ BTN = 'BTN',
261
+ BWP = 'BWP',
262
+ BYN = 'BYN',
263
+ BZD = 'BZD',
264
+ CAD = 'CAD',
265
+ CDF = 'CDF',
266
+ CHE = 'CHE',
267
+ CHF = 'CHF',
268
+ CHW = 'CHW',
269
+ CLF = 'CLF',
270
+ CLP = 'CLP',
271
+ CNY = 'CNY',
272
+ COP = 'COP',
273
+ COU = 'COU',
274
+ CRC = 'CRC',
275
+ CUC = 'CUC',
276
+ CUP = 'CUP',
277
+ CVE = 'CVE',
278
+ CZK = 'CZK',
279
+ DJF = 'DJF',
280
+ DKK = 'DKK',
281
+ DOP = 'DOP',
282
+ DZD = 'DZD',
283
+ EGP = 'EGP',
284
+ ERN = 'ERN',
285
+ ETB = 'ETB',
286
+ EUR = 'EUR',
287
+ FJD = 'FJD',
288
+ FKP = 'FKP',
289
+ GBP = 'GBP',
290
+ GEL = 'GEL',
291
+ GHS = 'GHS',
292
+ GIP = 'GIP',
293
+ GMD = 'GMD',
294
+ GNF = 'GNF',
295
+ GTQ = 'GTQ',
296
+ GYD = 'GYD',
297
+ HKD = 'HKD',
298
+ HNL = 'HNL',
299
+ HRK = 'HRK',
300
+ HTG = 'HTG',
301
+ HUF = 'HUF',
302
+ IDR = 'IDR',
303
+ ILS = 'ILS',
304
+ INR = 'INR',
305
+ IQD = 'IQD',
306
+ IRR = 'IRR',
307
+ ISK = 'ISK',
308
+ JMD = 'JMD',
309
+ JOD = 'JOD',
310
+ JPY = 'JPY',
311
+ KES = 'KES',
312
+ KGS = 'KGS',
313
+ KHR = 'KHR',
314
+ KMF = 'KMF',
315
+ KPW = 'KPW',
316
+ KRW = 'KRW',
317
+ KWD = 'KWD',
318
+ KYD = 'KYD',
319
+ KZT = 'KZT',
320
+ LAK = 'LAK',
321
+ LBP = 'LBP',
322
+ LKR = 'LKR',
323
+ LRD = 'LRD',
324
+ LSL = 'LSL',
325
+ LYD = 'LYD',
326
+ MAD = 'MAD',
327
+ MDL = 'MDL',
328
+ MGA = 'MGA',
329
+ MKD = 'MKD',
330
+ MMK = 'MMK',
331
+ MNT = 'MNT',
332
+ MOP = 'MOP',
333
+ MRU = 'MRU',
334
+ MUR = 'MUR',
335
+ MVR = 'MVR',
336
+ MWK = 'MWK',
337
+ MXN = 'MXN',
338
+ MXV = 'MXV',
339
+ MYR = 'MYR',
340
+ MZN = 'MZN',
341
+ NAD = 'NAD',
342
+ NGN = 'NGN',
343
+ NIO = 'NIO',
344
+ NOK = 'NOK',
345
+ NPR = 'NPR',
346
+ NZD = 'NZD',
347
+ OMR = 'OMR',
348
+ PAB = 'PAB',
349
+ PEN = 'PEN',
350
+ PGK = 'PGK',
351
+ PHP = 'PHP',
352
+ PKR = 'PKR',
353
+ PLN = 'PLN',
354
+ PYG = 'PYG',
355
+ QAR = 'QAR',
356
+ RON = 'RON',
357
+ RSD = 'RSD',
358
+ RUB = 'RUB',
359
+ RWF = 'RWF',
360
+ SAR = 'SAR',
361
+ SBD = 'SBD',
362
+ SCR = 'SCR',
363
+ SDG = 'SDG',
364
+ SEK = 'SEK',
365
+ SGD = 'SGD',
366
+ SHP = 'SHP',
367
+ SLL = 'SLL',
368
+ SOS = 'SOS',
369
+ SRD = 'SRD',
370
+ SSP = 'SSP',
371
+ STN = 'STN',
372
+ SVC = 'SVC',
373
+ SYP = 'SYP',
374
+ SZL = 'SZL',
375
+ THB = 'THB',
376
+ TJS = 'TJS',
377
+ TMT = 'TMT',
378
+ TND = 'TND',
379
+ TOP = 'TOP',
380
+ TRY = 'TRY',
381
+ TTD = 'TTD',
382
+ TWD = 'TWD',
383
+ TZS = 'TZS',
384
+ UAH = 'UAH',
385
+ UGX = 'UGX',
386
+ USD = 'USD',
387
+ USN = 'USN',
388
+ UYI = 'UYI',
389
+ UYU = 'UYU',
390
+ UYW = 'UYW',
391
+ UZS = 'UZS',
392
+ VED = 'VED',
393
+ VES = 'VES',
394
+ VND = 'VND',
395
+ VUV = 'VUV',
396
+ WST = 'WST',
397
+ XAF = 'XAF',
398
+ XAG = 'XAG',
399
+ XAU = 'XAU',
400
+ XBA = 'XBA',
401
+ XBB = 'XBB',
402
+ XBC = 'XBC',
403
+ XBD = 'XBD',
404
+ XCD = 'XCD',
405
+ XDR = 'XDR',
406
+ XOF = 'XOF',
407
+ XPD = 'XPD',
408
+ XPF = 'XPF',
409
+ XPT = 'XPT',
410
+ XSU = 'XSU',
411
+ XUA = 'XUA',
412
+ XXX = 'XXX',
413
+ YER = 'YER',
414
+ ZAR = 'ZAR',
415
+ ZMW = 'ZMW',
416
+ ZWL = 'ZWL',
417
+ }
418
+ /**
419
+ * Interface representing a currency entry.
420
+ * Contains the ISO-4217 code and the currency name.
421
+ */
422
+ interface Currency {
423
+ code: CurrencyCode
424
+ name: string
425
+ }
426
+
427
+ //#endregion
428
+ //#region src/types/signatures.d.ts
429
+ /**
430
+ * Represents the Digest Method structure used within the signature.
431
+ */
432
+ interface DigestMethod {
433
+ /** Algorithm used for digest. Should be http://www.w3.org/2001/04/xmlenc#sha256 */
434
+ Algorithm: string
435
+ }
436
+ /**
437
+ * Represents the Cert Digest structure.
438
+ */
439
+ interface CertDigest {
440
+ /** Digest method details. */
441
+ "ds:DigestMethod": DigestMethod
442
+ /** Base64 encoded HEX-SHA256 certificate information (CertDigest). */
443
+ "ds:DigestValue": string // base64binary
444
+ }
445
+ /**
446
+ * Represents the Issuer Serial structure within the Signing Certificate.
447
+ */
448
+ interface IssuerSerial {
449
+ /** CN of the certificate issuer (Organization name). */
450
+ "ds:X509IssuerName": string
451
+ /** Digital certificate serial number. */
452
+ "ds:X509SerialNumber": string // xsd:normalizedString -> string
453
+ }
454
+ /**
455
+ * Represents the Certificate structure within Signing Certificate.
456
+ */
457
+ interface Cert {
458
+ /** Certificate digest details. */
459
+ "xades:CertDigest": CertDigest
460
+ /** Issuer details. */
461
+ "xades:IssuerSerial": IssuerSerial
462
+ }
463
+ /**
464
+ * Represents the Signing Certificate structure.
465
+ */
466
+ interface SigningCertificate {
467
+ /** Certificate details. */
468
+ "xades:Cert": Cert
469
+ }
470
+ /**
471
+ * Represents the Signed Signature Properties.
472
+ */
473
+ interface SignedSignatureProperties {
474
+ /** UTC timestamp of signing (YYYY-MM-DDTHH:mm:ssZ). */
475
+ "xades:SigningTime": string // dateTime
476
+ /** Signing certificate details. */
477
+ "xades:SigningCertificate": SigningCertificate
478
+ // Note: Other optional properties like SignaturePolicyIdentifier might exist
479
+ }
480
+ /**
481
+ * Represents the Signed Properties structure.
482
+ */
483
+ interface SignedProperties {
484
+ /** Target attribute, should be 'signature'. */
485
+ Target: string
486
+ /** ID attribute, should be 'id-xades-signed-props'. */
487
+ Id: string
488
+ /** Signed signature properties. */
489
+ "xades:SignedSignatureProperties": SignedSignatureProperties
490
+ }
491
+ /**
492
+ * Represents the Qualifying Properties structure (Object element).
493
+ */
494
+ interface QualifyingProperties {
495
+ /** Target attribute, should be 'signature'. */
496
+ Target: string
497
+ /** Signed properties details. */
498
+ "xades:SignedProperties": SignedProperties
499
+ // Note: UnsignedProperties might exist but are not detailed in the mandatory part
500
+ }
501
+ /**
502
+ * Represents the X509 Data structure within KeyInfo.
503
+ */
504
+ interface X509Data {
505
+ /** Base64 encoded X509 certificate. */
506
+ "ds:X509Certificate": string // base64binary
507
+ }
508
+ /**
509
+ * Represents the Key Information structure.
510
+ */
511
+ interface KeyInfo {
512
+ /** X509 certificate data. */
513
+ "ds:X509Data": X509Data
514
+ }
515
+ /**
516
+ * Represents the Transform structure within Reference.
517
+ */
518
+ interface Transform {
519
+ /** Algorithm attribute for the transform. */
520
+ Algorithm: string
521
+ }
522
+ /**
523
+ * Represents a Reference within SignedInfo.
524
+ */
525
+ interface Reference {
526
+ /** ID attribute for the reference (e.g., 'id-doc-signed-data', 'id-xades-signed-props'). */
527
+ Id?: string
528
+ /** URI attribute for the reference (e.g., '', '#id-xades-signed-props'). */
529
+ URI: string
530
+ /** Optional Transforms applied. */
531
+ "ds:Transforms"?: {
532
+ "ds:Transform": Transform | Transform[] // Can be single or multiple transforms
533
+ }
534
+ /** Digest method details. */
535
+ "ds:DigestMethod": DigestMethod
536
+ /** Base64 encoded digest value (DocDigest or PropsDigest). */
537
+ "ds:DigestValue": string // base64binary
538
+ }
539
+ /**
540
+ * Represents the Canonicalization Method structure.
541
+ */
542
+ interface CanonicalizationMethod {
543
+ /** Algorithm used for canonicalization. Should be http://www.w3.org/2006/12/xml-c14n11 */
544
+ Algorithm: string
545
+ }
546
+ /**
547
+ * Represents the Signature Method structure.
548
+ */
549
+ interface SignatureMethod {
550
+ /** Algorithm used for signing. Should be http://www.w3.org/2001/04/xmldsig-more#rsa-sha256 */
551
+ Algorithm: string
552
+ }
553
+ /**
554
+ * Represents the Signed Information structure.
555
+ */
556
+ interface SignedInfo {
557
+ /** Canonicalization method details. */
558
+ "ds:CanonicalizationMethod": CanonicalizationMethod
559
+ /** Signature method details. */
560
+ "ds:SignatureMethod": SignatureMethod
561
+ /** References to signed data and properties. Should contain two references. */
562
+ "ds:Reference": [Reference, Reference] // Expecting two: one for document, one for signed properties
563
+ }
564
+ /**
565
+ * Represents the root Signature element (IssuerDigitalSignature).
566
+ * Based on the documentation: https://sdk.myinvois.hasil.gov.my/signature/
567
+ * Conforms to XAdES enveloped signature requirements for UBL.
568
+ */
569
+ interface IssuerDigitalSignature {
570
+ /** ID attribute, should be 'DocSig'. */
571
+ Id: string
572
+ /** Signed information details. */
573
+ "ds:SignedInfo": SignedInfo
574
+ /** Base64 encoded signature value (Sig). */
575
+ "ds:SignatureValue": string // base64binary
576
+ /** Public key information (certificate). */
577
+ "ds:KeyInfo": KeyInfo
578
+ /** Object containing signed properties. */
579
+ "ds:Object": {
580
+ "xades:QualifyingProperties": QualifyingProperties
581
+ }
582
+ }
583
+
584
+ //#endregion
585
+ //#region src/types/tax-types.d.ts
586
+ /**
587
+ * Represents the allowed codes for tax types.
588
+ * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/tax-types/
589
+ */
590
+ type TaxTypeCode =
591
+ | '01' // Sales Tax
592
+ | '02' // Service Tax
593
+ | '03' // Tourism Tax
594
+ | '04' // High-Value Goods Tax
595
+ | '05' // Sales Tax on Low Value Goods
596
+ | '06' // Not Applicable
597
+ | 'E'
598
+ /**
599
+ * Enum representing the allowed tax type codes with descriptive names.
600
+ * Provides a more readable way to reference tax types.
601
+ *
602
+ * @example
603
+ * const code = TaxTypeCodeEnum.SalesTax;
604
+ * console.log(code); // Output: "01"
605
+ */
606
+ declare enum TaxTypeCodeEnum {
607
+ SalesTax = '01',
608
+ ServiceTax = '02',
609
+ TourismTax = '03',
610
+ HighValueGoodsTax = '04',
611
+ SalesTaxLowValueGoods = '05',
612
+ NotApplicable = '06',
613
+ TaxExemption = 'E',
614
+ }
615
+ /**
616
+ * Interface representing a tax type entry.
617
+ * Contains the code and its corresponding description.
618
+ */
619
+ interface TaxType {
620
+ code: TaxTypeCode
621
+ description: string
622
+ }
623
+
624
+ //#endregion
625
+ //#region src/types/country-code.d.ts
626
+ /**
627
+ * Represents the allowed ISO-3166 alpha-3 country codes.
628
+ * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/countries/
629
+ */
630
+ type CountryCode =
631
+ | "ABW"
632
+ | "AFG"
633
+ | "AGO"
634
+ | "AIA"
635
+ | "ALA"
636
+ | "ALB"
637
+ | "AND"
638
+ | "ANT"
639
+ | "ARE"
640
+ | "ARG"
641
+ | "ARM"
642
+ | "ASM"
643
+ | "ATA"
644
+ | "ATF"
645
+ | "ATG"
646
+ | "AUS"
647
+ | "AUT"
648
+ | "AZE"
649
+ | "BDI"
650
+ | "BEL"
651
+ | "BEN"
652
+ | "BES"
653
+ | "BFA"
654
+ | "BGD"
655
+ | "BGR"
656
+ | "BHR"
657
+ | "BHS"
658
+ | "BIH"
659
+ | "BLM"
660
+ | "BLR"
661
+ | "BLZ"
662
+ | "BMU"
663
+ | "BOL"
664
+ | "BRA"
665
+ | "BRB"
666
+ | "BRN"
667
+ | "BTN"
668
+ | "BVT"
669
+ | "BWA"
670
+ | "CAF"
671
+ | "CAN"
672
+ | "CCK"
673
+ | "CHE"
674
+ | "CHL"
675
+ | "CHN"
676
+ | "CIV"
677
+ | "CMR"
678
+ | "COD"
679
+ | "COG"
680
+ | "COK"
681
+ | "COL"
682
+ | "COM"
683
+ | "CPV"
684
+ | "CRI"
685
+ | "CUB"
686
+ | "CUW"
687
+ | "CXR"
688
+ | "CYM"
689
+ | "CYP"
690
+ | "CZE"
691
+ | "DEU"
692
+ | "DJI"
693
+ | "DMA"
694
+ | "DNK"
695
+ | "DOM"
696
+ | "DZA"
697
+ | "ECU"
698
+ | "EGY"
699
+ | "ERI"
700
+ | "ESH"
701
+ | "ESP"
702
+ | "EST"
703
+ | "ETH"
704
+ | "FIN"
705
+ | "FJI"
706
+ | "FLK"
707
+ | "FRA"
708
+ | "FRO"
709
+ | "FSM"
710
+ | "GAB"
711
+ | "GBR"
712
+ | "GEO"
713
+ | "GGY"
714
+ | "GHA"
715
+ | "GIB"
716
+ | "GIN"
717
+ | "GLP"
718
+ | "GMB"
719
+ | "GNB"
720
+ | "GNQ"
721
+ | "GRC"
722
+ | "GRD"
723
+ | "GRL"
724
+ | "GTM"
725
+ | "GUF"
726
+ | "GUM"
727
+ | "GUY"
728
+ | "HKG"
729
+ | "HMD"
730
+ | "HND"
731
+ | "HRV"
732
+ | "HTI"
733
+ | "HUN"
734
+ | "IDN"
735
+ | "IMN"
736
+ | "IND"
737
+ | "IOT"
738
+ | "IRL"
739
+ | "IRN"
740
+ | "IRQ"
741
+ | "ISL"
742
+ | "ISR"
743
+ | "ITA"
744
+ | "JAM"
745
+ | "JEY"
746
+ | "JOR"
747
+ | "JPN"
748
+ | "KAZ"
749
+ | "KEN"
750
+ | "KGZ"
751
+ | "KHM"
752
+ | "KIR"
753
+ | "KNA"
754
+ | "KOR"
755
+ | "KWT"
756
+ | "LAO"
757
+ | "LBN"
758
+ | "LBR"
759
+ | "LBY"
760
+ | "LCA"
761
+ | "LIE"
762
+ | "LKA"
763
+ | "LSO"
764
+ | "LTU"
765
+ | "LUX"
766
+ | "LVA"
767
+ | "MAC"
768
+ | "MAF"
769
+ | "MAR"
770
+ | "MCO"
771
+ | "MDA"
772
+ | "MDG"
773
+ | "MDV"
774
+ | "MEX"
775
+ | "MHL"
776
+ | "MKD"
777
+ | "MLI"
778
+ | "MLT"
779
+ | "MMR"
780
+ | "MNE"
781
+ | "MNG"
782
+ | "MNP"
783
+ | "MOZ"
784
+ | "MRT"
785
+ | "MSR"
786
+ | "MTQ"
787
+ | "MUS"
788
+ | "MWI"
789
+ | "MYS"
790
+ | "MYT"
791
+ | "NAM"
792
+ | "NCL"
793
+ | "NER"
794
+ | "NFK"
795
+ | "NGA"
796
+ | "NIC"
797
+ | "NIU"
798
+ | "NLD"
799
+ | "NOR"
800
+ | "NPL"
801
+ | "NRU"
802
+ | "NZL"
803
+ | "OMN"
804
+ | "PAK"
805
+ | "PAN"
806
+ | "PCN"
807
+ | "PER"
808
+ | "PHL"
809
+ | "PLW"
810
+ | "PNG"
811
+ | "POL"
812
+ | "PRI"
813
+ | "PRK"
814
+ | "PRT"
815
+ | "PRY"
816
+ | "PSE"
817
+ | "PYF"
818
+ | "QAT"
819
+ | "REU"
820
+ | "ROU"
821
+ | "RUS"
822
+ | "RWA"
823
+ | "SAU"
824
+ | "SDN"
825
+ | "SEN"
826
+ | "SGP"
827
+ | "SGS"
828
+ | "SHN"
829
+ | "SJM"
830
+ | "SLB"
831
+ | "SLE"
832
+ | "SLV"
833
+ | "SMR"
834
+ | "SOM"
835
+ | "SPM"
836
+ | "SRB"
837
+ | "SSD"
838
+ | "STP"
839
+ | "SUR"
840
+ | "SVK"
841
+ | "SVN"
842
+ | "SWE"
843
+ | "SWZ"
844
+ | "SXM"
845
+ | "SYC"
846
+ | "SYR"
847
+ | "TCA"
848
+ | "TCD"
849
+ | "TGO"
850
+ | "THA"
851
+ | "TJK"
852
+ | "TKL"
853
+ | "TKM"
854
+ | "TLS"
855
+ | "TON"
856
+ | "TTO"
857
+ | "TUN"
858
+ | "TUR"
859
+ | "TUV"
860
+ | "TWN"
861
+ | "TZA"
862
+ | "UGA"
863
+ | "UKR"
864
+ | "UMI"
865
+ | "URY"
866
+ | "USA"
867
+ | "UZB"
868
+ | "VAT"
869
+ | "VCT"
870
+ | "VEN"
871
+ | "VGB"
872
+ | "VIR"
873
+ | "VNM"
874
+ | "VUT"
875
+ | "WLF"
876
+ | "WSM"
877
+ | "XKX"
878
+ | "YEM"
879
+ | "ZAF"
880
+ | "ZMB"
881
+ | "ZWE"
882
+ /**
883
+ * Enum representing the allowed ISO-3166 alpha-3 country codes.
884
+ * Provides a more readable way to reference country codes.
885
+ *
886
+ * @example
887
+ * const malaysiaCode = CountryCodeEnum.MYS;
888
+ * console.log(malaysiaCode); // Output: "MYS"
889
+ */
890
+ declare enum CountryCodeEnum {
891
+ ABW = "ABW",
892
+ AFG = "AFG",
893
+ AGO = "AGO",
894
+ AIA = "AIA",
895
+ ALA = "ALA",
896
+ ALB = "ALB",
897
+ AND = "AND",
898
+ ANT = "ANT",
899
+ ARE = "ARE",
900
+ ARG = "ARG",
901
+ ARM = "ARM",
902
+ ASM = "ASM",
903
+ ATA = "ATA",
904
+ ATF = "ATF",
905
+ ATG = "ATG",
906
+ AUS = "AUS",
907
+ AUT = "AUT",
908
+ AZE = "AZE",
909
+ BDI = "BDI",
910
+ BEL = "BEL",
911
+ BEN = "BEN",
912
+ BES = "BES",
913
+ BFA = "BFA",
914
+ BGD = "BGD",
915
+ BGR = "BGR",
916
+ BHR = "BHR",
917
+ BHS = "BHS",
918
+ BIH = "BIH",
919
+ BLM = "BLM",
920
+ BLR = "BLR",
921
+ BLZ = "BLZ",
922
+ BMU = "BMU",
923
+ BOL = "BOL",
924
+ BRA = "BRA",
925
+ BRB = "BRB",
926
+ BRN = "BRN",
927
+ BTN = "BTN",
928
+ BVT = "BVT",
929
+ BWA = "BWA",
930
+ CAF = "CAF",
931
+ CAN = "CAN",
932
+ CCK = "CCK",
933
+ CHE = "CHE",
934
+ CHL = "CHL",
935
+ CHN = "CHN",
936
+ CIV = "CIV",
937
+ CMR = "CMR",
938
+ COD = "COD",
939
+ COG = "COG",
940
+ COK = "COK",
941
+ COL = "COL",
942
+ COM = "COM",
943
+ CPV = "CPV",
944
+ CRI = "CRI",
945
+ CUB = "CUB",
946
+ CUW = "CUW",
947
+ CXR = "CXR",
948
+ CYM = "CYM",
949
+ CYP = "CYP",
950
+ CZE = "CZE",
951
+ DEU = "DEU",
952
+ DJI = "DJI",
953
+ DMA = "DMA",
954
+ DNK = "DNK",
955
+ DOM = "DOM",
956
+ DZA = "DZA",
957
+ ECU = "ECU",
958
+ EGY = "EGY",
959
+ ERI = "ERI",
960
+ ESH = "ESH",
961
+ ESP = "ESP",
962
+ EST = "EST",
963
+ ETH = "ETH",
964
+ FIN = "FIN",
965
+ FJI = "FJI",
966
+ FLK = "FLK",
967
+ FRA = "FRA",
968
+ FRO = "FRO",
969
+ FSM = "FSM",
970
+ GAB = "GAB",
971
+ GBR = "GBR",
972
+ GEO = "GEO",
973
+ GGY = "GGY",
974
+ GHA = "GHA",
975
+ GIB = "GIB",
976
+ GIN = "GIN",
977
+ GLP = "GLP",
978
+ GMB = "GMB",
979
+ GNB = "GNB",
980
+ GNQ = "GNQ",
981
+ GRC = "GRC",
982
+ GRD = "GRD",
983
+ GRL = "GRL",
984
+ GTM = "GTM",
985
+ GUF = "GUF",
986
+ GUM = "GUM",
987
+ GUY = "GUY",
988
+ HKG = "HKG",
989
+ HMD = "HMD",
990
+ HND = "HND",
991
+ HRV = "HRV",
992
+ HTI = "HTI",
993
+ HUN = "HUN",
994
+ IDN = "IDN",
995
+ IMN = "IMN",
996
+ IND = "IND",
997
+ IOT = "IOT",
998
+ IRL = "IRL",
999
+ IRN = "IRN",
1000
+ IRQ = "IRQ",
1001
+ ISL = "ISL",
1002
+ ISR = "ISR",
1003
+ ITA = "ITA",
1004
+ JAM = "JAM",
1005
+ JEY = "JEY",
1006
+ JOR = "JOR",
1007
+ JPN = "JPN",
1008
+ KAZ = "KAZ",
1009
+ KEN = "KEN",
1010
+ KGZ = "KGZ",
1011
+ KHM = "KHM",
1012
+ KIR = "KIR",
1013
+ KNA = "KNA",
1014
+ KOR = "KOR",
1015
+ KWT = "KWT",
1016
+ LAO = "LAO",
1017
+ LBN = "LBN",
1018
+ LBR = "LBR",
1019
+ LBY = "LBY",
1020
+ LCA = "LCA",
1021
+ LIE = "LIE",
1022
+ LKA = "LKA",
1023
+ LSO = "LSO",
1024
+ LTU = "LTU",
1025
+ LUX = "LUX",
1026
+ LVA = "LVA",
1027
+ MAC = "MAC",
1028
+ MAF = "MAF",
1029
+ MAR = "MAR",
1030
+ MCO = "MCO",
1031
+ MDA = "MDA",
1032
+ MDG = "MDG",
1033
+ MDV = "MDV",
1034
+ MEX = "MEX",
1035
+ MHL = "MHL",
1036
+ MKD = "MKD",
1037
+ MLI = "MLI",
1038
+ MLT = "MLT",
1039
+ MMR = "MMR",
1040
+ MNE = "MNE",
1041
+ MNG = "MNG",
1042
+ MNP = "MNP",
1043
+ MOZ = "MOZ",
1044
+ MRT = "MRT",
1045
+ MSR = "MSR",
1046
+ MTQ = "MTQ",
1047
+ MUS = "MUS",
1048
+ MWI = "MWI",
1049
+ MYS = "MYS",
1050
+ MYT = "MYT",
1051
+ NAM = "NAM",
1052
+ NCL = "NCL",
1053
+ NER = "NER",
1054
+ NFK = "NFK",
1055
+ NGA = "NGA",
1056
+ NIC = "NIC",
1057
+ NIU = "NIU",
1058
+ NLD = "NLD",
1059
+ NOR = "NOR",
1060
+ NPL = "NPL",
1061
+ NRU = "NRU",
1062
+ NZL = "NZL",
1063
+ OMN = "OMN",
1064
+ PAK = "PAK",
1065
+ PAN = "PAN",
1066
+ PCN = "PCN",
1067
+ PER = "PER",
1068
+ PHL = "PHL",
1069
+ PLW = "PLW",
1070
+ PNG = "PNG",
1071
+ POL = "POL",
1072
+ PRI = "PRI",
1073
+ PRK = "PRK",
1074
+ PRT = "PRT",
1075
+ PRY = "PRY",
1076
+ PSE = "PSE",
1077
+ PYF = "PYF",
1078
+ QAT = "QAT",
1079
+ REU = "REU",
1080
+ ROU = "ROU",
1081
+ RUS = "RUS",
1082
+ RWA = "RWA",
1083
+ SAU = "SAU",
1084
+ SDN = "SDN",
1085
+ SEN = "SEN",
1086
+ SGP = "SGP",
1087
+ SGS = "SGS",
1088
+ SHN = "SHN",
1089
+ SJM = "SJM",
1090
+ SLB = "SLB",
1091
+ SLE = "SLE",
1092
+ SLV = "SLV",
1093
+ SMR = "SMR",
1094
+ SOM = "SOM",
1095
+ SPM = "SPM",
1096
+ SRB = "SRB",
1097
+ SSD = "SSD",
1098
+ STP = "STP",
1099
+ SUR = "SUR",
1100
+ SVK = "SVK",
1101
+ SVN = "SVN",
1102
+ SWE = "SWE",
1103
+ SWZ = "SWZ",
1104
+ SXM = "SXM",
1105
+ SYC = "SYC",
1106
+ SYR = "SYR",
1107
+ TCA = "TCA",
1108
+ TCD = "TCD",
1109
+ TGO = "TGO",
1110
+ THA = "THA",
1111
+ TJK = "TJK",
1112
+ TKL = "TKL",
1113
+ TKM = "TKM",
1114
+ TLS = "TLS",
1115
+ TON = "TON",
1116
+ TTO = "TTO",
1117
+ TUN = "TUN",
1118
+ TUR = "TUR",
1119
+ TUV = "TUV",
1120
+ TWN = "TWN",
1121
+ TZA = "TZA",
1122
+ UGA = "UGA",
1123
+ UKR = "UKR",
1124
+ UMI = "UMI",
1125
+ URY = "URY",
1126
+ USA = "USA",
1127
+ UZB = "UZB",
1128
+ VAT = "VAT",
1129
+ VCT = "VCT",
1130
+ VEN = "VEN",
1131
+ VGB = "VGB",
1132
+ VIR = "VIR",
1133
+ VNM = "VNM",
1134
+ VUT = "VUT",
1135
+ WLF = "WLF",
1136
+ WSM = "WSM",
1137
+ XKX = "XKX",
1138
+ YEM = "YEM",
1139
+ ZAF = "ZAF",
1140
+ ZMB = "ZMB",
1141
+ ZWE = "ZWE",
1142
+ }
1143
+ /**
1144
+ * Enum mapping ISO-3166 alpha-3 country codes to their corresponding country names.
1145
+ * Provides a way to easily retrieve the name of a country using its code.
1146
+ *
1147
+ * @example
1148
+ * import { CountryCodeEnum, CountryNameEnum } from './country-code';
1149
+ * const malaysiaName = CountryNameEnum[CountryCodeEnum.MYS];
1150
+ * console.log(malaysiaName); // Output: MALAYSIA
1151
+ */
1152
+ declare enum CountryNameEnum {
1153
+ ABW = "ARUBA",
1154
+ AFG = "AFGHANISTAN",
1155
+ AGO = "ANGOLA",
1156
+ AIA = "ANGUILLA",
1157
+ ALA = "ALAND ISLANDS",
1158
+ ALB = "ALBANIA",
1159
+ AND = "ANDORA",
1160
+ ANT = "NETHERLANDS ANTILLES",
1161
+ ARE = "UNITED ARAB EMIRATES",
1162
+ ARG = "ARGENTINA",
1163
+ ARM = "ARMENIA",
1164
+ ASM = "AMERICAN SAMOA",
1165
+ ATA = "ANTARCTICA",
1166
+ ATF = "FRENCH SOUTHERN TERRITORIES",
1167
+ ATG = "ANTIGUA AND BARBUDA",
1168
+ AUS = "AUSTRALIA",
1169
+ AUT = "AUSTRIA",
1170
+ AZE = "AZERBAIDJAN",
1171
+ BDI = "BURUNDI",
1172
+ BEL = "BELGIUM",
1173
+ BEN = "BENIN",
1174
+ BES = "BONAIRE, SINT EUSTATIUS AND SABA",
1175
+ BFA = "BURKINA FASO",
1176
+ BGD = "BANGLADESH",
1177
+ BGR = "BULGARIA",
1178
+ BHR = "BAHRAIN",
1179
+ BHS = "BAHAMAS",
1180
+ BIH = "BOSNIA AND HERZEGOVINA",
1181
+ BLM = "SAINT BARTHELEMY",
1182
+ BLR = "BELARUS",
1183
+ BLZ = "BELIZE",
1184
+ BMU = "BERMUDA",
1185
+ BOL = "BOLIVIA",
1186
+ BRA = "BRAZIL",
1187
+ BRB = "BARBADOS",
1188
+ BRN = "BRUNEI DARUSSALAM",
1189
+ BTN = "BHUTAN",
1190
+ BVT = "BOUVET ISLAND",
1191
+ BWA = "BOTSWANA",
1192
+ CAF = "CENTRAL AFRICAN REPUBLIC",
1193
+ CAN = "CANADA",
1194
+ CCK = "COCOS ISLAND",
1195
+ CHE = "SWITZERLAND",
1196
+ CHL = "CHILE",
1197
+ CHN = "CHINA",
1198
+ CIV = "COTE D'IVOIRE",
1199
+ CMR = "CAMEROON",
1200
+ COD = "CONGO, THE DEMOCRATIC REPUBLIC",
1201
+ COG = "CONGO",
1202
+ COK = "COOK ISLANDS",
1203
+ COL = "COLOMBIA",
1204
+ COM = "COMOROS",
1205
+ CPV = "CAPE VERDE",
1206
+ CRI = "COSTA RICA",
1207
+ CUB = "CUBA",
1208
+ CUW = "CURACAO",
1209
+ CXR = "CHRISTMAS ISLANDS",
1210
+ CYM = "CAYMAN ISLANDS",
1211
+ CYP = "CYPRUS",
1212
+ CZE = "CZECH REPUBLIC",
1213
+ DEU = "GERMANY",
1214
+ DJI = "DJIBOUTI",
1215
+ DMA = "DOMINICA",
1216
+ DNK = "DENMARK",
1217
+ DOM = "DOMINICAN REPUBLIC",
1218
+ DZA = "ALGERIA",
1219
+ ECU = "ECUADOR",
1220
+ EGY = "EGYPT",
1221
+ ERI = "ERITREA",
1222
+ ESH = "WESTERN SAHARA",
1223
+ ESP = "SPAIN",
1224
+ EST = "ESTONIA",
1225
+ ETH = "ETHIOPIA",
1226
+ FIN = "FINLAND",
1227
+ FJI = "FIJI",
1228
+ FLK = "FALKLAND ISLANDS (MALVINAS)",
1229
+ FRA = "FRANCE",
1230
+ FRO = "FAEROE ISLANDS",
1231
+ FSM = "MICRONESIA, FEDERATED STATES OF",
1232
+ GAB = "GABON",
1233
+ GBR = "UNITED KINGDOM",
1234
+ GEO = "GEORGIA",
1235
+ GGY = "GUERNSEY",
1236
+ GHA = "GHANA",
1237
+ GIB = "GIBRALTAR",
1238
+ GIN = "GUINEA",
1239
+ GLP = "GUADELOUPE",
1240
+ GMB = "GAMBIA",
1241
+ GNB = "GUINEA-BISSAU",
1242
+ GNQ = "EQUATORIAL GUINEA",
1243
+ GRC = "GREECE",
1244
+ GRD = "GRENADA",
1245
+ GRL = "GREENLAND",
1246
+ GTM = "GUATEMALA",
1247
+ GUF = "FRENCH GUIANA",
1248
+ GUM = "GUAM",
1249
+ GUY = "GUYANA",
1250
+ HKG = "HONG KONG",
1251
+ HMD = "HEARD AND MCDONALD ISLANDS",
1252
+ HND = "HONDURAS",
1253
+ HRV = "CROATIA",
1254
+ HTI = "HAITI",
1255
+ HUN = "HUNGARY",
1256
+ IDN = "INDONESIA",
1257
+ IMN = "ISLE OF MAN",
1258
+ IND = "INDIA",
1259
+ IOT = "BRITISH INDIAN OCEAN TERRITORY",
1260
+ IRL = "IRELAND",
1261
+ IRN = "IRAN",
1262
+ IRQ = "IRAQ",
1263
+ ISL = "ICELAND",
1264
+ ISR = "ISRAEL",
1265
+ ITA = "ITALY",
1266
+ JAM = "JAMAICA",
1267
+ JEY = "JERSEY (CHANNEL ISLANDS)",
1268
+ JOR = "JORDAN",
1269
+ JPN = "JAPAN",
1270
+ KAZ = "KAZAKHSTAN",
1271
+ KEN = "KENYA",
1272
+ KGZ = "KYRGYZSTAN",
1273
+ KHM = "CAMBODIA",
1274
+ KIR = "KIRIBATI",
1275
+ KNA = "ST.KITTS AND NEVIS",
1276
+ KOR = "THE REPUBLIC OF KOREA",
1277
+ KWT = "KUWAIT",
1278
+ LAO = "LAOS",
1279
+ LBN = "LEBANON",
1280
+ LBR = "LIBERIA",
1281
+ LBY = "LIBYAN ARAB JAMAHIRIYA",
1282
+ LCA = "SAINT LUCIA",
1283
+ LIE = "LIECHTENSTEIN",
1284
+ LKA = "SRI LANKA",
1285
+ LSO = "LESOTHO",
1286
+ LTU = "LITHUANIA",
1287
+ LUX = "LUXEMBOURG",
1288
+ LVA = "LATVIA",
1289
+ MAC = "MACAO",
1290
+ MAF = "SAINT MARTIN (FRENCH PART)",
1291
+ MAR = "MOROCCO",
1292
+ MCO = "MONACO",
1293
+ MDA = "MOLDOVA, REPUBLIC OF",
1294
+ MDG = "MADAGASCAR",
1295
+ MDV = "MALDIVES",
1296
+ MEX = "MEXICO",
1297
+ MHL = "MARSHALL ISLANDS",
1298
+ MKD = "MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF",
1299
+ MLI = "MALI",
1300
+ MLT = "MALTA",
1301
+ MMR = "MYANMAR",
1302
+ MNE = "MONTENEGRO",
1303
+ MNG = "MONGOLIA",
1304
+ MNP = "NORTHERN MARIANA ISLANDS",
1305
+ MOZ = "MOZAMBIQUE",
1306
+ MRT = "MAURITANIA",
1307
+ MSR = "MONTSERRAT",
1308
+ MTQ = "MARTINIQUE",
1309
+ MUS = "MAURITIUS",
1310
+ MWI = "MALAWI",
1311
+ MYS = "MALAYSIA",
1312
+ MYT = "MAYOTTE",
1313
+ NAM = "NAMIBIA",
1314
+ NCL = "NEW CALEDONIA",
1315
+ NER = "NIGER",
1316
+ NFK = "NORFOLK ISLAND",
1317
+ NGA = "NIGERIA",
1318
+ NIC = "NICARAGUA",
1319
+ NIU = "NIUE",
1320
+ NLD = "NETHERLANDS",
1321
+ NOR = "NORWAY",
1322
+ NPL = "NEPAL",
1323
+ NRU = "NAURU",
1324
+ NZL = "NEW ZEALAND",
1325
+ OMN = "OMAN",
1326
+ PAK = "PAKISTAN",
1327
+ PAN = "PANAMA",
1328
+ PCN = "PITCAIRN",
1329
+ PER = "PERU",
1330
+ PHL = "PHILIPPINES",
1331
+ PLW = "PALAU",
1332
+ PNG = "PAPUA NEW GUINEA",
1333
+ POL = "POLAND",
1334
+ PRI = "PUERTO RICO",
1335
+ PRK = "DEMOC.PEOPLES REP.OF KOREA",
1336
+ PRT = "PORTUGAL",
1337
+ PRY = "PARAGUAY",
1338
+ PSE = "PALESTINIAN TERRITORY, OCCUPIED",
1339
+ PYF = "FRENCH POLYNESIA",
1340
+ QAT = "QATAR",
1341
+ REU = "REUNION",
1342
+ ROU = "ROMANIA",
1343
+ RUS = "RUSSIAN FEDERATION (USSR)",
1344
+ RWA = "RWANDA",
1345
+ SAU = "SAUDI ARABIA",
1346
+ SDN = "SUDAN",
1347
+ SEN = "SENEGAL",
1348
+ SGP = "SINGAPORE",
1349
+ SGS = "SOUTH GEORGIA AND THE SOUTH SANDWICH ISLAND",
1350
+ SHN = "ST. HELENA",
1351
+ SJM = "SVALBARD AND JAN MAYEN ISLANDS",
1352
+ SLB = "SOLOMON ISLANDS",
1353
+ SLE = "SIERRA LEONE",
1354
+ SLV = "EL SALVADOR",
1355
+ SMR = "SAN MARINO",
1356
+ SOM = "SOMALIA",
1357
+ SPM = "ST. PIERRE AND MIQUELON",
1358
+ SRB = "SERBIA",
1359
+ SSD = "SOUTH SUDAN",
1360
+ STP = "SAO TOME AND PRINCIPE",
1361
+ SUR = "SURINAME",
1362
+ SVK = "SLOVAK REPUBLIC",
1363
+ SVN = "SLOVENIA",
1364
+ SWE = "SWEDEN",
1365
+ SWZ = "ESWATINI, KINGDOM OF (SWAZILAND)",
1366
+ SXM = "SINT MAARTEN (DUTCH PART)",
1367
+ SYC = "SEYCHELLES",
1368
+ SYR = "SYRIAN ARAB REPUBLIC",
1369
+ TCA = "TURKS AND CAICOS ISLANDS",
1370
+ TCD = "CHAD",
1371
+ TGO = "TOGO",
1372
+ THA = "THAILAND",
1373
+ TJK = "TAJIKISTAN",
1374
+ TKL = "TOKELAU",
1375
+ TKM = "TURKMENISTAN",
1376
+ TLS = "TIMOR-LESTE",
1377
+ TON = "TONGA",
1378
+ TTO = "TRINIDAD AND TOBAGO",
1379
+ TUN = "TUNISIA",
1380
+ TUR = "TURKIYE",
1381
+ TUV = "TUVALU",
1382
+ TWN = "TAIWAN",
1383
+ TZA = "TANZANIA UNITED REPUBLIC",
1384
+ UGA = "UGANDA",
1385
+ UKR = "UKRAINE",
1386
+ UMI = "UNITED STATES MINOR OUTLYING ISLANDS",
1387
+ URY = "URUGUAY",
1388
+ USA = "UNITED STATES OF AMERICA",
1389
+ UZB = "UZBEKISTAN",
1390
+ VAT = "VATICAN CITY STATE (HOLY SEE)",
1391
+ VCT = "SAINT VINCENT AND GRENADINES",
1392
+ VEN = "VENEZUELA",
1393
+ VGB = "VIRGIN ISLANDS(BRITISH)",
1394
+ VIR = "VIRGIN ISLANDS(US)",
1395
+ VNM = "VIETNAM",
1396
+ VUT = "VANUATU",
1397
+ WLF = "WALLIS AND FUTUNA ISLANDS",
1398
+ WSM = "SAMOA",
1399
+ XKX = "KOSOVO",
1400
+ YEM = "YEMEN",
1401
+ ZAF = "SOUTH AFRICA",
1402
+ ZMB = "ZAMBIA",
1403
+ ZWE = "ZIMBABWE",
1404
+ }
1405
+ /**
1406
+ * Interface representing a country code entry.
1407
+ * Contains the ISO-3166 alpha-3 code and the country name.
1408
+ */
1409
+ interface Country {
1410
+ code: CountryCode
1411
+ name: string
1412
+ }
1413
+
1414
+ //#endregion
1415
+ //#region src/types/classification-codes.d.ts
1416
+ /**
1417
+ * Represents the allowed classification codes for e-Invoice items.
1418
+ * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/classification-codes/
1419
+ */
1420
+ type ClassificationCode =
1421
+ | '001' // Breastfeeding equipment
1422
+ | '002' // Child care centres and kindergartens fees
1423
+ | '003' // Computer, smartphone or tablet
1424
+ | '004' // Consolidated e-Invoice
1425
+ | '005' // Construction materials (as specified under Fourth Schedule of the Lembaga Pembangunan Industri Pembinaan Malaysia Act 1994)
1426
+ | '006' // Disbursement
1427
+ | '007' // Donation
1428
+ | '008' // e-Commerce - e-Invoice to buyer / purchaser
1429
+ | '009' // e-Commerce - Self-billed e-Invoice to seller, logistics, etc.
1430
+ | '010' // Education fees
1431
+ | '011' // Goods on consignment (Consignor)
1432
+ | '012' // Goods on consignment (Consignee)
1433
+ | '013' // Gym membership
1434
+ | '014' // Insurance - Education and medical benefits
1435
+ | '015' // Insurance - Takaful or life insurance
1436
+ | '016' // Interest and financing expenses
1437
+ | '017' // Internet subscription
1438
+ | '018' // Land and building
1439
+ | '019' // Medical examination for learning disabilities and early intervention or rehabilitation treatments of learning disabilities
1440
+ | '020' // Medical examination or vaccination expenses
1441
+ | '021' // Medical expenses for serious diseases
1442
+ | '022' // Others
1443
+ | '023' // Petroleum operations (as defined in Petroleum (Income Tax) Act 1967)
1444
+ | '024' // Private retirement scheme or deferred annuity scheme
1445
+ | '025' // Motor vehicle
1446
+ | '026' // Subscription of books / journals / magazines / newspapers / other similar publications
1447
+ | '027' // Reimbursement
1448
+ | '028' // Rental of motor vehicle
1449
+ | '029' // EV charging facilities (Installation, rental, sale / purchase or subscription fees)
1450
+ | '030' // Repair and maintenance
1451
+ | '031' // Research and development
1452
+ | '032' // Foreign income
1453
+ | '033' // Self-billed - Betting and gaming
1454
+ | '034' // Self-billed - Importation of goods
1455
+ | '035' // Self-billed - Importation of services
1456
+ | '036' // Self-billed - Others
1457
+ | '037' // Self-billed - Monetary payment to agents, dealers or distributors
1458
+ | '038' // Sports equipment, rental / entry fees for sports facilities, registration in sports competition or sports training fees imposed by associations / sports clubs / companies registered with the Sports Commissioner or Companies Commission of Malaysia and carrying out sports activities as listed under the Sports Development Act 1997
1459
+ | '039' // Supporting equipment for disabled person
1460
+ | '040' // Voluntary contribution to approved provident fund
1461
+ | '041' // Dental examination or treatment
1462
+ | '042' // Fertility treatment
1463
+ | '043' // Treatment and home care nursing, daycare centres and residential care centers
1464
+ | '044' // Vouchers, gift cards, loyalty points, etc
1465
+ | '045'
1466
+ /**
1467
+ * Enum representing the allowed classification codes with descriptive names.
1468
+ * Provides a more readable way to reference classification codes.
1469
+ *
1470
+ * @example
1471
+ * const code = ClassificationCodeEnum.ComputerSmartphoneOrTablet;
1472
+ * console.log(code); // Output: "003"
1473
+ */
1474
+ declare enum ClassificationCodeEnum {
1475
+ BreastfeedingEquipment = '001',
1476
+ ChildCareCentresAndKindergartensFees = '002',
1477
+ ComputerSmartphoneOrTablet = '003',
1478
+ ConsolidatedEInvoice = '004',
1479
+ ConstructionMaterials = '005',
1480
+ Disbursement = '006',
1481
+ Donation = '007',
1482
+ ECommerceEInvoiceToBuyer = '008',
1483
+ ECommerceSelfBilledToSellerLogistics = '009',
1484
+ EducationFees = '010',
1485
+ GoodsOnConsignmentConsignor = '011',
1486
+ GoodsOnConsignmentConsignee = '012',
1487
+ GymMembership = '013',
1488
+ InsuranceEducationMedicalBenefits = '014',
1489
+ InsuranceTakafulLife = '015',
1490
+ InterestFinancingExpenses = '016',
1491
+ InternetSubscription = '017',
1492
+ LandAndBuilding = '018',
1493
+ MedicalExamLearningDisabilities = '019',
1494
+ MedicalExamVaccination = '020',
1495
+ MedicalExpensesSeriousDiseases = '021',
1496
+ Others = '022',
1497
+ PetroleumOperations = '023',
1498
+ PrivateRetirementSchemeDeferredAnnuity = '024',
1499
+ MotorVehicle = '025',
1500
+ SubscriptionBooksJournalsEtc = '026',
1501
+ Reimbursement = '027',
1502
+ RentalOfMotorVehicle = '028',
1503
+ EVChargingFacilities = '029',
1504
+ RepairAndMaintenance = '030',
1505
+ ResearchAndDevelopment = '031',
1506
+ ForeignIncome = '032',
1507
+ SelfBilledBettingGaming = '033',
1508
+ SelfBilledImportationGoods = '034',
1509
+ SelfBilledImportationServices = '035',
1510
+ SelfBilledOthers = '036',
1511
+ SelfBilledMonetaryPaymentToAgents = '037',
1512
+ SportsEquipmentRentalFeesEtc = '038',
1513
+ SupportingEquipmentDisabledPerson = '039',
1514
+ VoluntaryContributionProvidentFund = '040',
1515
+ DentalExamTreatment = '041',
1516
+ FertilityTreatment = '042',
1517
+ TreatmentHomeCareNursingEtc = '043',
1518
+ VouchersGiftCardsLoyaltyPoints = '044',
1519
+ SelfBilledNonMonetaryPaymentToAgents = '045',
1520
+ }
1521
+ /**
1522
+ * Interface representing a classification code entry.
1523
+ * Contains the code and its corresponding description.
1524
+ */
1525
+ interface Classification {
1526
+ code: ClassificationCode
1527
+ description: string
1528
+ }
1529
+
1530
+ //#endregion
1531
+ //#region src/types/unit-types.d.ts
1532
+ /**
1533
+ * Represents the allowed codes for Unit of Measurement types.
1534
+ * Based on UN/ECE Recommendation 20, Revision 17 (2021) as per the documentation:
1535
+ * https://sdk.myinvois.hasil.gov.my/codes/unit-types/
1536
+ * NOTE: This list is incomplete as the provided documentation snippet omitted a large number of codes.
1537
+ */
1538
+ type UnitTypeCode =
1539
+ | '10'
1540
+ | '11'
1541
+ | '13'
1542
+ | '14'
1543
+ | '15'
1544
+ | '1I'
1545
+ | '20'
1546
+ | '21'
1547
+ | '22'
1548
+ | '23'
1549
+ | '24'
1550
+ | '25'
1551
+ | '27'
1552
+ | '28'
1553
+ | '2A'
1554
+ | '2B'
1555
+ | '2C'
1556
+ | '2G'
1557
+ | '2H'
1558
+ | '2I'
1559
+ | '2J'
1560
+ | '2K'
1561
+ | '2L'
1562
+ | '2M'
1563
+ | '2N'
1564
+ | '2P'
1565
+ | '2Q'
1566
+ | '2R'
1567
+ | '2U'
1568
+ | '2X'
1569
+ | '2Y'
1570
+ | '2Z'
1571
+ | '33'
1572
+ | '34'
1573
+ | '35'
1574
+ | '37'
1575
+ | '38'
1576
+ | '3B'
1577
+ | '3C'
1578
+ | '40'
1579
+ | '41'
1580
+ | '4C'
1581
+ | '4G'
1582
+ | '4H'
1583
+ | '4K'
1584
+ | '4L'
1585
+ | '4M'
1586
+ | '4N'
1587
+ | '4O'
1588
+ | '4P'
1589
+ | '4Q'
1590
+ | '4R'
1591
+ | '4T'
1592
+ | '4U'
1593
+ | '4W'
1594
+ | '4X'
1595
+ | '56'
1596
+ | '57'
1597
+ | '58'
1598
+ | '59'
1599
+ | '5A'
1600
+ | '5B'
1601
+ | '5E'
1602
+ | '5J'
1603
+ | '60'
1604
+ | '61'
1605
+ | '74'
1606
+ | '77'
1607
+ | '80'
1608
+ | '81'
1609
+ | '85'
1610
+ | '87'
1611
+ | '89'
1612
+ | '91'
1613
+ | 'A10'
1614
+ | 'A11'
1615
+ | 'A12'
1616
+ | 'A13'
1617
+ | 'A14'
1618
+ | 'A15'
1619
+ | 'A16'
1620
+ | 'A17'
1621
+ | 'A18'
1622
+ | 'A19'
1623
+ | 'A2'
1624
+ | 'A20'
1625
+ | 'A21'
1626
+ | 'A22'
1627
+ | 'A23'
1628
+ | 'A24'
1629
+ | 'A26'
1630
+ | 'A27'
1631
+ | 'A28'
1632
+ | 'A29'
1633
+ | 'A3'
1634
+ | 'A30'
1635
+ | 'A31'
1636
+ | 'A32'
1637
+ | 'A33'
1638
+ | 'A34'
1639
+ | 'A35'
1640
+ | 'A36'
1641
+ | 'A37'
1642
+ | 'A38'
1643
+ | 'A39'
1644
+ | 'A4'
1645
+ | 'A40'
1646
+ | 'A41'
1647
+ | 'A42'
1648
+ | 'A43'
1649
+ | 'A44'
1650
+ | 'A45'
1651
+ | 'A47'
1652
+ | 'A48'
1653
+ | 'A49'
1654
+ | 'A5'
1655
+ | 'A53'
1656
+ | 'A54'
1657
+ | 'A55'
1658
+ | 'A56'
1659
+ | 'A59'
1660
+ | 'A6'
1661
+ | 'A68'
1662
+ | 'A69'
1663
+ | 'A7'
1664
+ | 'A70'
1665
+ | 'A71'
1666
+ | 'A73'
1667
+ | 'A74'
1668
+ | 'A75'
1669
+ | 'A76'
1670
+ | 'A8'
1671
+ | 'A84'
1672
+ | 'A85'
1673
+ | 'A86'
1674
+ | 'A87'
1675
+ | 'A88'
1676
+ | 'A89'
1677
+ // ... (Codes omitted in provided documentation) ...
1678
+ | 'XQP'
1679
+ | 'XQQ'
1680
+ | 'XQR'
1681
+ | 'XQS'
1682
+ | 'XRD'
1683
+ | 'XRG'
1684
+ | 'XRJ'
1685
+ | 'XRK'
1686
+ | 'XRL'
1687
+ | 'XRO'
1688
+ | 'XRT'
1689
+ | 'XRZ'
1690
+ | 'XSA'
1691
+ | 'XSB'
1692
+ | 'XSC'
1693
+ | 'XSD'
1694
+ | 'XSE'
1695
+ | 'XSH'
1696
+ | 'XSI'
1697
+ | 'XSK'
1698
+ | 'XSL'
1699
+ | 'XSM'
1700
+ | 'XSO'
1701
+ | 'XSP'
1702
+ | 'XSS'
1703
+ | 'XST'
1704
+ | 'XSU'
1705
+ | 'XSV'
1706
+ | 'XSW'
1707
+ | 'XSX'
1708
+ | 'XSY'
1709
+ | 'XSZ'
1710
+ | 'XT1'
1711
+ | 'XTB'
1712
+ | 'XTC'
1713
+ | 'XTD'
1714
+ | 'XTE'
1715
+ | 'XTG'
1716
+ | 'XTI'
1717
+ | 'XTK'
1718
+ | 'XTL'
1719
+ | 'XTN'
1720
+ | 'XTO'
1721
+ | 'XTR'
1722
+ | 'XTS'
1723
+ | 'XTT'
1724
+ | 'XTU'
1725
+ | 'XTV'
1726
+ | 'XTW'
1727
+ | 'XTY'
1728
+ | 'XTZ'
1729
+ | 'XUC'
1730
+ | 'XUN'
1731
+ | 'XVA'
1732
+ | 'XVG'
1733
+ | 'XVI'
1734
+ | 'XVK'
1735
+ | 'XVL'
1736
+ | 'XVN'
1737
+ | 'XVO'
1738
+ | 'XVP'
1739
+ | 'XVQ'
1740
+ | 'XVR'
1741
+ | 'XVS'
1742
+ | 'XVY'
1743
+ | 'XWA'
1744
+ | 'XWB'
1745
+ | 'XWC'
1746
+ | 'XWD'
1747
+ | 'XWF'
1748
+ | 'XWG'
1749
+ | 'XWH'
1750
+ | 'XWJ'
1751
+ | 'XWK'
1752
+ | 'XWL'
1753
+ | 'XWM'
1754
+ | 'XWN'
1755
+ | 'XWP'
1756
+ | 'XWQ'
1757
+ | 'XWR'
1758
+ | 'XWS'
1759
+ | 'XWT'
1760
+ | 'XWU'
1761
+ | 'XWV'
1762
+ | 'XWW'
1763
+ | 'XWX'
1764
+ | 'XWY'
1765
+ | 'XWZ'
1766
+ | 'XXA'
1767
+ | 'XXB'
1768
+ | 'XXC'
1769
+ | 'XXD'
1770
+ | 'XXF'
1771
+ | 'XXG'
1772
+ | 'XXH'
1773
+ | 'XXJ'
1774
+ | 'XXK'
1775
+ | 'XYA'
1776
+ | 'XYB'
1777
+ | 'XYC'
1778
+ | 'XYD'
1779
+ | 'XYF'
1780
+ | 'XYG'
1781
+ | 'XYH'
1782
+ | 'XYJ'
1783
+ | 'XYK'
1784
+ | 'XYL'
1785
+ | 'XYM'
1786
+ | 'XYN'
1787
+ | 'XYP'
1788
+ | 'XYQ'
1789
+ | 'XYR'
1790
+ | 'XYS'
1791
+ | 'XYT'
1792
+ | 'XYV'
1793
+ | 'XYW'
1794
+ | 'XYX'
1795
+ | 'XYY'
1796
+ | 'XYZ'
1797
+ | 'XZA'
1798
+ | 'XZB'
1799
+ | 'XZC'
1800
+ | 'XZD'
1801
+ | 'XZF'
1802
+ | 'XZG'
1803
+ | 'XZH'
1804
+ | 'XZJ'
1805
+ | 'XZK'
1806
+ | 'XZL'
1807
+ | 'XZM'
1808
+ | 'XZN'
1809
+ | 'XZP'
1810
+ | 'XZQ'
1811
+ | 'XZR'
1812
+ | 'XZS'
1813
+ | 'XZT'
1814
+ | 'XZU'
1815
+ | 'XZV'
1816
+ | 'XZW'
1817
+ | 'XZX'
1818
+ | 'XZY'
1819
+ | 'XZZ'
1820
+ /**
1821
+ * Enum representing the allowed Unit of Measurement codes with descriptive names.
1822
+ * Provides a more readable way to reference unit types.
1823
+ * NOTE: This enum is incomplete as the provided documentation snippet omitted a large number of codes.
1824
+ *
1825
+ * @example
1826
+ * const code = UnitTypeCodeEnum.KilogramPerSquareMetre;
1827
+ * console.log(code); // Output: "28"
1828
+ */
1829
+ declare enum UnitTypeCodeEnum {
1830
+ Group = '10',
1831
+ Outfit = '11',
1832
+ Ration = '13',
1833
+ Shot = '14',
1834
+ StickMilitary = '15',
1835
+ FixedRate = '1I',
1836
+ TwentyFootContainer = '20',
1837
+ FortyFootContainer = '21',
1838
+ DecilitrePerGram = '22',
1839
+ GramPerCubicCentimetre = '23',
1840
+ TheoreticalPound = '24',
1841
+ GramPerSquareCentimetre = '25',
1842
+ TheoreticalTon = '27',
1843
+ KilogramPerSquareMetre = '28',
1844
+ RadianPerSecond = '2A',
1845
+ RadianPerSecondSquared = '2B',
1846
+ Roentgen = '2C',
1847
+ VoltAC = '2G',
1848
+ VoltDC = '2H',
1849
+ BritishThermalUnitInternationalTablePerHour = '2I',
1850
+ CubicCentimetrePerSecond = '2J',
1851
+ CubicFootPerHour = '2K',
1852
+ CubicFootPerMinute = '2L',
1853
+ CentimetrePerSecond = '2M',
1854
+ Decibel = '2N',
1855
+ Kilobyte = '2P',
1856
+ Kilobecquerel = '2Q',
1857
+ Kilocurie = '2R',
1858
+ Megagram = '2U',
1859
+ MetrePerMinute = '2X',
1860
+ Milliroentgen = '2Y',
1861
+ Millivolt = '2Z',
1862
+ KilopascalSquareMetrePerGram = '33',
1863
+ KilopascalPerMillimetre = '34',
1864
+ MillilitrePerSquareCentimetreSecond = '35',
1865
+ OuncePerSquareFoot = '37',
1866
+ OuncePerSquareFootPer0_01inch = '38',
1867
+ Megajoule = '3B',
1868
+ Manmonth = '3C',
1869
+ MillilitrePerSecond = '40',
1870
+ MillilitrePerMinute = '41',
1871
+ Centistokes = '4C',
1872
+ Microlitre = '4G',
1873
+ MicrometreMicron = '4H',
1874
+ Milliampere = '4K',
1875
+ Megabyte = '4L',
1876
+ MilligramPerHour = '4M',
1877
+ Megabecquerel = '4N',
1878
+ Microfarad = '4O',
1879
+ NewtonPerMetre = '4P',
1880
+ OunceInch = '4Q',
1881
+ OunceFoot = '4R',
1882
+ Picofarad = '4T',
1883
+ PoundPerHour = '4U',
1884
+ TonUSPerHour = '4W',
1885
+ KilolitrePerHour = '4X',
1886
+ Sitas = '56',
1887
+ Mesh = '57',
1888
+ NetKilogram = '58',
1889
+ PartPerMillion = '59',
1890
+ BarrelUSPerMinute = '5A',
1891
+ Batch = '5B',
1892
+ MMSCFDay = '5E',
1893
+ HydraulicHorsePower = '5J',
1894
+ PercentWeight = '60',
1895
+ PartPerBillionUS = '61',
1896
+ Millipascal = '74',
1897
+ MilliInch = '77',
1898
+ PoundPerSquareInchAbsolute = '80',
1899
+ Henry = '81',
1900
+ FootPoundForce = '85',
1901
+ PoundPerCubicFoot = '87',
1902
+ Poise = '89',
1903
+ Stokes = '91',
1904
+ AmpereSquareMetrePerJouleSecond = 'A10',
1905
+ Angstrom = 'A11',
1906
+ AstronomicalUnit = 'A12',
1907
+ Attojoule = 'A13',
1908
+ Barn = 'A14',
1909
+ BarnPerElectronvolt = 'A15',
1910
+ BarnPerSteradianElectronvolt = 'A16',
1911
+ BarnPerSteradian = 'A17',
1912
+ BecquerelPerKilogram = 'A18',
1913
+ BecquerelPerCubicMetre = 'A19',
1914
+ AmperePerCentimetre = 'A2',
1915
+ BritishThermalUnitInternationalTablePerSecondSquareFootDegreeRankine = 'A20',
1916
+ BritishThermalUnitInternationalTablePerPoundDegreeRankine = 'A21',
1917
+ BritishThermalUnitInternationalTablePerSecondFootDegreeRankine = 'A22',
1918
+ BritishThermalUnitInternationalTablePerHourSquareFootDegreeRankine = 'A23',
1919
+ CandelaPerSquareMetre = 'A24',
1920
+ CoulombMetre = 'A26',
1921
+ CoulombMetreSquaredPerVolt = 'A27',
1922
+ CoulombPerCubicCentimetre = 'A28',
1923
+ CoulombPerCubicMetre = 'A29',
1924
+ AmperePerMillimetre = 'A3',
1925
+ CoulombPerCubicMillimetre = 'A30',
1926
+ CoulombPerKilogramSecond = 'A31',
1927
+ CoulombPerMole = 'A32',
1928
+ CoulombPerSquareCentimetre = 'A33',
1929
+ CoulombPerSquareMetre = 'A34',
1930
+ CoulombPerSquareMillimetre = 'A35',
1931
+ CubicCentimetrePerMole = 'A36',
1932
+ CubicDecimetrePerMole = 'A37',
1933
+ CubicMetrePerCoulomb = 'A38',
1934
+ CubicMetrePerKilogram = 'A39',
1935
+ AmperePerSquareCentimetre = 'A4',
1936
+ CubicMetrePerMole = 'A40',
1937
+ AmperePerSquareMetre = 'A41',
1938
+ CuriePerKilogram = 'A42',
1939
+ DeadweightTonnage = 'A43',
1940
+ Decalitre = 'A44',
1941
+ Decametre = 'A45',
1942
+ Decitex = 'A47',
1943
+ DegreeRankine = 'A48',
1944
+ Denier = 'A49',
1945
+ AmpereSquareMetre = 'A5',
1946
+ Electronvolt = 'A53',
1947
+ ElectronvoltPerMetre = 'A54',
1948
+ ElectronvoltSquareMetre = 'A55',
1949
+ ElectronvoltSquareMetrePerKilogram = 'A56',
1950
+ _8PartCloudCover = 'A59', // Enum member names cannot start with a number
1951
+ AmperePerSquareMetreKelvinSquared = 'A6',
1952
+ Exajoule = 'A68',
1953
+ FaradPerMetre = 'A69',
1954
+ AmperePerSquareMillimetre = 'A7',
1955
+ Femtojoule = 'A70',
1956
+ Femtometre = 'A71',
1957
+ FootPerSecondSquared = 'A73',
1958
+ FootPoundForcePerSecond = 'A74',
1959
+ FreightTon = 'A75',
1960
+ Gal = 'A76',
1961
+ AmpereSecond = 'A8',
1962
+ GigacoulombPerCubicMetre = 'A84',
1963
+ Gigaelectronvolt = 'A85',
1964
+ Gigahertz = 'A86',
1965
+ Gigaohm = 'A87',
1966
+ GigaohmMetre = 'A88',
1967
+ Gigapascal = 'A89',
1968
+ // ... (Codes omitted in provided documentation) ...
1969
+ BoxWoodenNaturalWoodOrdinary = 'XQP',
1970
+ BoxWoodenNaturalWoodWithSiftProofWalls = 'XQQ',
1971
+ BoxPlasticExpanded = 'XQR',
1972
+ BoxPlasticSolid = 'XQS',
1973
+ Rod = 'XRD',
1974
+ Ring = 'XRG',
1975
+ RackClothingHanger = 'XRJ',
1976
+ Rack = 'XRK',
1977
+ Reel = 'XRL',
1978
+ Roll = 'XRO',
1979
+ Rednet = 'XRT',
1980
+ RodsInBundleBunchTruss = 'XRZ',
1981
+ Sack = 'XSA',
1982
+ Slab = 'XSB',
1983
+ CrateShallow = 'XSC',
1984
+ Spindle = 'XSD',
1985
+ SeaChest = 'XSE',
1986
+ Sachet = 'XSH',
1987
+ Skid = 'XSI',
1988
+ CaseSkeleton = 'XSK',
1989
+ Slipsheet = 'XSL',
1990
+ Sheetmetal = 'XSM',
1991
+ Spool = 'XSO',
1992
+ SheetPlasticWrapping = 'XSP',
1993
+ CaseSteel = 'XSS',
1994
+ Sheet = 'XST',
1995
+ Suitcase = 'XSU',
1996
+ EnvelopeSteel = 'XSV',
1997
+ Shrinkwrapped = 'XSW',
1998
+ Set = 'XSX',
1999
+ Sleeve = 'XSY',
2000
+ SheetsInBundleBunchTruss = 'XSZ',
2001
+ Tablet = 'XT1',
2002
+ Tub = 'XTB',
2003
+ TeaChest = 'XTC',
2004
+ TubeCollapsible = 'XTD',
2005
+ Tyre = 'XTE',
2006
+ TankContainerGeneric = 'XTG',
2007
+ Tierce = 'XTI',
2008
+ TankRectangular = 'XTK',
2009
+ TubWithLid = 'XTL',
2010
+ Tin = 'XTN',
2011
+ Tun = 'XTO',
2012
+ Trunk = 'XTR',
2013
+ Truss = 'XTS',
2014
+ BagTote = 'XTT',
2015
+ Tube = 'XTU',
2016
+ TubeWithNozzle = 'XTV',
2017
+ PalletTriwall = 'XTW',
2018
+ TankCylindrical = 'XTY',
2019
+ TubesInBundleBunchTruss = 'XTZ',
2020
+ Uncaged = 'XUC',
2021
+ Unit = 'XUN',
2022
+ Vat = 'XVA',
2023
+ BulkGasAt1031MbarAnd15C = 'XVG',
2024
+ Vial = 'XVI',
2025
+ Vanpack = 'XVK',
2026
+ BulkLiquid = 'XVL',
2027
+ Vehicle = 'XVN',
2028
+ BulkSolidLargeParticlesNodules = 'XVO',
2029
+ VacuumPacked = 'XVP',
2030
+ BulkLiquefiedGasAtAbnormalTemperaturePressure = 'XVQ',
2031
+ BulkSolidGranularParticlesGrains = 'XVR',
2032
+ BulkScrapMetal = 'XVS',
2033
+ BulkSolidFineParticlesPowders = 'XVY',
2034
+ IntermediateBulkContainer = 'XWA',
2035
+ Wickerbottle = 'XWB',
2036
+ IntermediateBulkContainerSteel = 'XWC',
2037
+ IntermediateBulkContainerAluminium = 'XWD',
2038
+ IntermediateBulkContainerMetal = 'XWF',
2039
+ IntermediateBulkContainerSteelPressurisedGreaterThan10Kpa = 'XWG',
2040
+ IntermediateBulkContainerAluminiumPressurisedGreaterThan10Kpa = 'XWH',
2041
+ IntermediateBulkContainerMetalPressure10Kpa = 'XWJ',
2042
+ IntermediateBulkContainerSteelLiquid = 'XWK',
2043
+ IntermediateBulkContainerAluminiumLiquid = 'XWL',
2044
+ IntermediateBulkContainerMetalLiquid = 'XWM',
2045
+ IntermediateBulkContainerWovenPlasticWithoutCoatLiner = 'XWN',
2046
+ IntermediateBulkContainerWovenPlasticCoated = 'XWP',
2047
+ IntermediateBulkContainerWovenPlasticWithLiner = 'XWQ',
2048
+ IntermediateBulkContainerWovenPlasticCoatedAndLiner = 'XWR',
2049
+ IntermediateBulkContainerPlasticFilm = 'XWS',
2050
+ IntermediateBulkContainerTextileWithOutCoatLiner = 'XWT',
2051
+ IntermediateBulkContainerNaturalWoodWithInnerLiner = 'XWU',
2052
+ IntermediateBulkContainerTextileCoated = 'XWV',
2053
+ IntermediateBulkContainerTextileWithLiner = 'XWW',
2054
+ IntermediateBulkContainerTextileCoatedAndLiner = 'XWX',
2055
+ IntermediateBulkContainerPlywoodWithInnerLiner = 'XWY',
2056
+ IntermediateBulkContainerReconstitutedWoodWithInnerLiner = 'XWZ',
2057
+ BagWovenPlasticWithoutInnerCoatLiner = 'XXA',
2058
+ BagWovenPlasticSiftProof = 'XXB',
2059
+ BagWovenPlasticWaterResistant = 'XXC',
2060
+ BagPlasticsFilm = 'XXD',
2061
+ BagTextileWithoutInnerCoatLiner = 'XXF',
2062
+ BagTextileSiftProof = 'XXG',
2063
+ BagTextileWaterResistant = 'XXH',
2064
+ BagPaperMultiWall = 'XXJ',
2065
+ BagPaperMultiWallWaterResistant = 'XXK',
2066
+ CompositePackagingPlasticReceptacleInSteelDrum = 'XYA',
2067
+ CompositePackagingPlasticReceptacleInSteelCrateBox = 'XYB',
2068
+ CompositePackagingPlasticReceptacleInAluminiumDrum = 'XYC',
2069
+ CompositePackagingPlasticReceptacleInAluminiumCrate = 'XYD',
2070
+ CompositePackagingPlasticReceptacleInWoodenBox = 'XYF',
2071
+ CompositePackagingPlasticReceptacleInPlywoodDrum = 'XYG',
2072
+ CompositePackagingPlasticReceptacleInPlywoodBox = 'XYH',
2073
+ CompositePackagingPlasticReceptacleInFibreDrum = 'XYJ',
2074
+ CompositePackagingPlasticReceptacleInFibreboardBox = 'XYK',
2075
+ CompositePackagingPlasticReceptacleInPlasticDrum = 'XYL',
2076
+ CompositePackagingPlasticReceptacleInSolidPlasticBox = 'XYM',
2077
+ CompositePackagingGlassReceptacleInSteelDrum = 'XYN',
2078
+ CompositePackagingGlassReceptacleInSteelCrateBox = 'XYP',
2079
+ CompositePackagingGlassReceptacleInAluminiumDrum = 'XYQ',
2080
+ CompositePackagingGlassReceptacleInAluminiumCrate = 'XYR',
2081
+ CompositePackagingGlassReceptacleInWoodenBox = 'XYS',
2082
+ CompositePackagingGlassReceptacleInPlywoodDrum = 'XYT',
2083
+ CompositePackagingGlassReceptacleInWickerworkHamper = 'XYV',
2084
+ CompositePackagingGlassReceptacleInFibreDrum = 'XYW',
2085
+ CompositePackagingGlassReceptacleInFibreboardBox = 'XYX',
2086
+ CompositePackagingGlassReceptacleInExpandablePlasticPack = 'XYY',
2087
+ CompositePackagingGlassReceptacleInSolidPlasticPack = 'XYZ',
2088
+ IntermediateBulkContainerPaperMultiWall = 'XZA',
2089
+ BagLarge = 'XZB',
2090
+ IntermediateBulkContainerPaperMultiWallWaterResistant = 'XZC',
2091
+ IntermediateBulkContainerRigidPlasticWithStructuralEquipmentSolids = 'XZD',
2092
+ IntermediateBulkContainerRigidPlasticFreestandingSolids = 'XZF',
2093
+ IntermediateBulkContainerRigidPlasticWithStructuralEquipmentPressurised = 'XZG',
2094
+ IntermediateBulkContainerRigidPlasticFreestandingPressurised = 'XZH',
2095
+ IntermediateBulkContainerRigidPlasticWithStructuralEquipmentLiquids = 'XZJ',
2096
+ IntermediateBulkContainerRigidPlasticFreestandingLiquids = 'XZK',
2097
+ IntermediateBulkContainerCompositeRigidPlasticSolids = 'XZL',
2098
+ IntermediateBulkContainerCompositeFlexiblePlasticSolids = 'XZM',
2099
+ IntermediateBulkContainerCompositeRigidPlasticPressurised = 'XZN',
2100
+ IntermediateBulkContainerCompositeFlexiblePlasticPressurised = 'XZP',
2101
+ IntermediateBulkContainerCompositeRigidPlasticLiquids = 'XZQ',
2102
+ IntermediateBulkContainerCompositeFlexiblePlasticLiquids = 'XZR',
2103
+ IntermediateBulkContainerComposite = 'XZS',
2104
+ IntermediateBulkContainerFibreboard = 'XZT',
2105
+ IntermediateBulkContainerFlexible = 'XZU',
2106
+ IntermediateBulkContainerMetalOtherThanSteel = 'XZV',
2107
+ IntermediateBulkContainerNaturalWood = 'XZW',
2108
+ IntermediateBulkContainerPlywood = 'XZX',
2109
+ IntermediateBulkContainerReconstitutedWood = 'XZY',
2110
+ MutuallyDefined = 'XZZ',
2111
+ }
2112
+ /**
2113
+ * Interface representing a Unit of Measurement entry.
2114
+ * Contains the code and its corresponding name.
2115
+ */
2116
+ interface UnitType {
2117
+ code: UnitTypeCode
2118
+ name: string
2119
+ }
2120
+
2121
+ //#endregion
2122
+ //#region src/types/payment-modes.d.ts
2123
+ /**
2124
+ * Represents the allowed codes for payment modes.
2125
+ * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/payment-methods/
2126
+ */
2127
+ type PaymentModeCode =
2128
+ | '01' // Cash
2129
+ | '02' // Cheque
2130
+ | '03' // Bank Transfer
2131
+ | '04' // Credit Card
2132
+ | '05' // Debit Card
2133
+ | '06' // e-Wallet / Digital Wallet
2134
+ | '07' // Digital Bank
2135
+ | '08'
2136
+ /**
2137
+ * Enum representing the allowed payment mode codes with descriptive names.
2138
+ * Provides a more readable way to reference payment modes.
2139
+ *
2140
+ * @example
2141
+ * const mode = PaymentModeCodeEnum.Cash;
2142
+ * console.log(mode); // Output: "01"
2143
+ */
2144
+ declare enum PaymentModeCodeEnum {
2145
+ Cash = '01',
2146
+ Cheque = '02',
2147
+ BankTransfer = '03',
2148
+ CreditCard = '04',
2149
+ DebitCard = '05',
2150
+ EWalletDigitalWallet = '06',
2151
+ DigitalBank = '07',
2152
+ Others = '08',
2153
+ }
2154
+ /**
2155
+ * Interface representing a payment mode entry.
2156
+ * Contains the code and its corresponding description.
2157
+ */
2158
+ interface PaymentMode {
2159
+ code: PaymentModeCode
2160
+ description: string
2161
+ }
2162
+
2163
+ //#endregion
2164
+ //#region src/types/documents/invoice-1_1.d.ts
2165
+ /**
2166
+ * Represents a physical address.
2167
+ * Based on the Address section of the documentation.
2168
+ */
2169
+ interface Address {
2170
+ /** Main address line. Max 150 chars.
2171
+ * @example Lot 66
2172
+ */
2173
+ addressLine0: string
2174
+ /** Additional address line. Max 150 chars.
2175
+ * @example Bangunan Merdeka
2176
+ */
2177
+ addressLine1?: string
2178
+ /** Additional address line. Max 150 chars.
2179
+ * @example Persiaran Jaya
2180
+ */
2181
+ addressLine2?: string
2182
+ /** Postal code. Max 50 chars.
2183
+ * @example 50480
2184
+ */
2185
+ postalZone?: string
2186
+ /** City name. Max 50 chars. */
2187
+ cityName: string
2188
+ /** State code. Refer to /codes/state-codes/. Max 50 chars. */
2189
+ state: string
2190
+ /** Country code (ISO 3166-1). Refer to /codes/countries/. Max 3 chars. */
2191
+ country: string // MYS
2192
+ }
2193
+ /**
2194
+ * Represents the supplier information.
2195
+ * Based on the Supplier section of the documentation.
2196
+ */
2197
+ interface Supplier {
2198
+ /** Supplier's name. Max 300 chars.
2199
+ * @example Test Supplier Sdn Bhd
2200
+ */
2201
+ name: string
2202
+ /** Supplier's Tax Identification Number (TIN). Max 14 chars.
2203
+ * @example 1234567890
2204
+ */
2205
+ tin: string
2206
+ /**
2207
+ * Supplier's Registration / Identification Number / Passport Number.
2208
+ * Format depends on schemeID: NRIC (12), BRN (20), PASSPORT (12), ARMY (12).
2209
+ * @example BRN: 202001234567
2210
+ */
2211
+ registrationNumber: string
2212
+ /** Supplier's SST registration number. Max 35 chars. "NA" if not applicable/available.
2213
+ * @example W10-1808-32000059
2214
+ */
2215
+ sstRegistrationNumber?: string
2216
+ /** Supplier's email address (RFC 5321/5322). Max 320 chars.
2217
+ * @example name@supplier.com
2218
+ */
2219
+ email?: string
2220
+ /** Supplier's address. */
2221
+ address: Address
2222
+ /** Supplier's contact number (E.164 standard). Max 20 chars.
2223
+ * @example +60123456789
2224
+ */
2225
+ contactNumber: string
2226
+ }
2227
+ /**
2228
+ * Represents the buyer information.
2229
+ * Based on the Buyer section of the documentation.
2230
+ */
2231
+ interface Buyer {
2232
+ /** Buyer's name. Max 300 chars.
2233
+ * @example Hebat Group
2234
+ */
2235
+ name: string
2236
+ /** Buyer's Tax Identification Number (TIN). Max 14 chars.
2237
+ * @example C2584563200
2238
+ */
2239
+ tin: string
2240
+ /**
2241
+ * Buyer's Registration / Identification Number / Passport Number.
2242
+ * Format depends on schemeID: NRIC (12), BRN (20), PASSPORT (12), ARMY (12).
2243
+ * @example BRN: 202001234567
2244
+ */
2245
+ registrationNumber: string
2246
+ /**
2247
+ * Buyer's SST registration number. Max 35 chars.
2248
+ * Mandatory for SST-registrants. Can be "NA" if not available.
2249
+ * Allows up to two numbers separated by ';'.
2250
+ * @example W10-1909-32000060
2251
+ */
2252
+ sstRegistrationNumber: string
2253
+ /** Buyer's email address (RFC 5321/5322). Max 320 chars.
2254
+ * @example name@buyer.com
2255
+ */
2256
+ email?: string
2257
+ /** Buyer's address. */
2258
+ address: Address
2259
+ /** Buyer's contact number (E.164 standard). Max 20 chars. "NA" allowed for consolidated e-invoice.
2260
+ * @example +60123456789
2261
+ */
2262
+ contactNumber: string
2263
+ }
2264
+ /**
2265
+ * Represents a single line item in an invoice.
2266
+ * Based on the Invoice Line Item section of the documentation.
2267
+ * https://sdk.myinvois.hasil.gov.my/documents/invoice-v1-1/#invoice-line-item
2268
+ */
2269
+ interface InvoiceLineItem {
2270
+ /**
2271
+ * Item classification code. Refer to /codes/item-classifications/. Max 50 chars.
2272
+ * @example 001
2273
+ */
2274
+ itemClassificationCode: ClassificationCode
2275
+ /**
2276
+ * Item description. Max 300 chars.
2277
+ * @example Laptop
2278
+ */
2279
+ itemDescription: string
2280
+ /**
2281
+ * Unit price before tax. Max 18 digits, 6 decimal places.
2282
+ * @example 1500.00
2283
+ */
2284
+ unitPrice: number
2285
+ /**
2286
+ * Tax type code. Refer to /codes/tax-types/. Max 2 chars.
2287
+ * @example 01
2288
+ */
2289
+ taxType: TaxTypeCode
2290
+ /**
2291
+ * Tax rate. Max 18 digits, 2 decimal places.
2292
+ * @example 6.00
2293
+ */
2294
+ taxRate: number
2295
+ /**
2296
+ * Tax amount. Max 18 digits, 2 decimal places.
2297
+ * @example 90.00
2298
+ */
2299
+ taxAmount: number
2300
+ /**
2301
+ * Tax exemption reason code. Refer to /codes/tax-exemption-reasons/. Max 2 chars.
2302
+ * Mandatory if tax rate is 0%.
2303
+ * @example 02
2304
+ */
2305
+ taxExemptionReasonCode?: string
2306
+ /**
2307
+ * Tax exemption reason amount. Max 18 digits, 2 decimal places.
2308
+ * Mandatory if tax rate is 0%.
2309
+ * @example 1500.00
2310
+ */
2311
+ taxExemptionReasonAmount?: number
2312
+ /**
2313
+ * Total taxable amount per line (Quantity * Unit Price - Discount Amount). Max 18 digits, 2 decimal places.
2314
+ * @example 1500.00
2315
+ */
2316
+ totalTaxableAmountPerLine: number
2317
+ /**
2318
+ * Total amount per line including tax (Total Taxable Amount Per Line + Tax Amount). Max 18 digits, 2 decimal places.
2319
+ * @example 1590.00
2320
+ */
2321
+ totalAmountPerLine: number
2322
+ /**
2323
+ * Quantity of items. Max 18 digits, 6 decimal places.
2324
+ * @example 1.000000
2325
+ */
2326
+ quantity?: number
2327
+ /**
2328
+ * Measurement unit. Max 50 chars.
2329
+ * @example UNIT
2330
+ */
2331
+ measurement?: UnitTypeCode
2332
+ /**
2333
+ * Discount rate. Max 18 digits, 2 decimal places.
2334
+ * @example 0.00
2335
+ */
2336
+ discountRate?: number
2337
+ /**
2338
+ * Discount amount. Max 18 digits, 2 decimal places.
2339
+ * @example 0.00
2340
+ */
2341
+ discountAmount?: number
2342
+ /**
2343
+ * Payment account ID for self-billed invoices. Max 50 chars.
2344
+ * @example Account123
2345
+ */
2346
+ paymentAccountID?: string
2347
+ /**
2348
+ * Payment terms description. Max 100 chars.
2349
+ * @example Payment within 30 days
2350
+ */
2351
+ paymentTerms?: string
2352
+ /**
2353
+ * Country of origin code (ISO 3166-1). Refer to /codes/countries/. Max 3 chars.
2354
+ * @example MYS
2355
+ */
2356
+ countryOfOrigin?: CountryCode
2357
+ }
2358
+ /** Represents monetary totals for the invoice. Based on UBL cac:LegalMonetaryTotal. */
2359
+ interface LegalMonetaryTotal {
2360
+ /** Total amount exclusive of taxes. Max 18 digits, 2 decimal places. */
2361
+ taxExclusiveAmount: number
2362
+ /** Total amount inclusive of taxes. Max 18 digits, 2 decimal places. */
2363
+ taxInclusiveAmount: number
2364
+ /** Total allowance amount. Max 18 digits, 2 decimal places. */
2365
+ allowanceTotalAmount?: number
2366
+ /** Total charge amount. Max 18 digits, 2 decimal places. */
2367
+ chargeTotalAmount?: number
2368
+ /** Total prepaid amount. Max 18 digits, 2 decimal places. */
2369
+ prepaidAmount?: number
2370
+ /** Rounding amount applied to the total. Max 18 digits, 2 decimal places. */
2371
+ payableRoundingAmount?: number
2372
+ /** The final payable amount. Max 18 digits, 2 decimal places. */
2373
+ payableAmount: number
2374
+ }
2375
+ /** Represents tax category information. Based on UBL cac:TaxCategory. */
2376
+ interface TaxCategory {
2377
+ /** Tax type code. Refer to /codes/tax-types/. Max 2 chars. */
2378
+ taxTypeCode: TaxTypeCode
2379
+ /** Tax rate percentage. Max 18 digits, 2 decimal places. */
2380
+ taxRate: number
2381
+ /** Tax exemption reason code. Refer to /codes/tax-exemption-reasons/. Max 2 chars. */
2382
+ taxExemptionReasonCode?: string
2383
+ /** Tax exemption reason description. Max 300 chars. */
2384
+ taxExemptionReason?: string
2385
+ }
2386
+ /** Represents a subtotal for a specific tax category. Based on UBL cac:TaxSubtotal. */
2387
+ interface TaxSubtotal {
2388
+ /** Taxable amount for this category. Max 18 digits, 2 decimal places. */
2389
+ taxableAmount: number
2390
+ /** Tax amount for this category. Max 18 digits, 2 decimal places. */
2391
+ taxAmount: number
2392
+ /** Tax category details. */
2393
+ taxCategory: TaxCategory
2394
+ }
2395
+ /** Represents the total tax amount for the invoice. Based on UBL cac:TaxTotal. */
2396
+ interface TaxTotal {
2397
+ /** Total tax amount for the entire invoice. Max 18 digits, 2 decimal places. */
2398
+ taxAmount: number
2399
+ /** Array of tax subtotals. */
2400
+ taxSubtotals?: TaxSubtotal[]
2401
+ }
2402
+ /** Represents payment means information. Based on UBL cac:PaymentMeans. */
2403
+ interface PaymentMeans {
2404
+ /** Payment means code. Refer to /codes/payment-modes/. Max 2 chars. */
2405
+ paymentMeansCode: PaymentModeCode
2406
+ /** Payment due date (YYYY-MM-DD). Max 10 chars. */
2407
+ paymentDueDate?: string
2408
+ /** Payer's financial account ID. Max 50 chars. */
2409
+ payerFinancialAccountID?: string
2410
+ /** Payee's financial account ID. Max 50 chars. */
2411
+ payeeFinancialAccountID?: string
2412
+ /** Payment terms description. Max 100 chars. */
2413
+ paymentTerms?: string
2414
+ }
2415
+ /** Represents allowances or charges at the document level. Based on UBL cac:AllowanceCharge. */
2416
+ interface AllowanceCharge {
2417
+ /** Indicator: true for charge, false for allowance. */
2418
+ chargeIndicator: boolean
2419
+ /** Reason code for the allowance or charge. Refer to codes (if available). Max 50 chars */
2420
+ reasonCode?: string
2421
+ /** Reason description for the allowance or charge. Max 300 chars. */
2422
+ reason: string
2423
+ /** Multiplier factor (e.g., percentage rate). Max 18 digits, 2 decimal places */
2424
+ multiplierFactorNumeric?: number
2425
+ /** Amount of the allowance or charge. Max 18 digits, 2 decimal places. */
2426
+ amount: number
2427
+ /** Base amount for calculation (if applicable). Max 18 digits, 2 decimal places. */
2428
+ baseAmount?: number
2429
+ /** Tax category applied to this allowance/charge (if taxable). */
2430
+ taxCategory?: TaxCategory // Reusing TaxCategory
2431
+ }
2432
+ /** Represents delivery information. Based on UBL cac:Delivery. */
2433
+ interface Delivery {
2434
+ /** Actual delivery date (YYYY-MM-DD). Max 10 chars. */
2435
+ actualDeliveryDate?: string
2436
+ /** Delivery location address. */
2437
+ deliveryLocation?: Address // Reusing Address type
2438
+ /** Party responsible for delivery (optional, structure similar to Buyer/Supplier but minimal). */
2439
+ deliveryParty?: {
2440
+ /** Name of the delivery party. Max 300 chars. */
2441
+ name?: string
2442
+ }
2443
+ }
2444
+ /**
2445
+ * Represents the core Invoice v1.1 document structure.
2446
+ * Based on the Core section of the documentation.
2447
+ */
2448
+ interface InvoiceV1_1 {
2449
+ /** Supplier information. */
2450
+ supplier: Supplier
2451
+ /** Buyer information. */
2452
+ buyer: Buyer
2453
+ /** e-Invoice version. Fixed value '1.1'. */
2454
+ eInvoiceVersion: '1.1'
2455
+ /** e-Invoice type code. Refer to /codes/e-invoice-types/. Max 2 chars. */
2456
+ eInvoiceTypeCode: EInvoiceTypeCode // e.g., '01'
2457
+ /** Document reference number used by Supplier. Max 50 chars. */
2458
+ eInvoiceCodeOrNumber: string // e.g., 'INV12345'
2459
+ /** Date of issuance (YYYY-MM-DD) in UTC. Max 10 chars. */
2460
+ eInvoiceDate: string // e.g., '2017-11-26'
2461
+ /** Time of issuance (HH:mm:ssZ) in UTC. Max 9 chars. */
2462
+ eInvoiceTime: string // e.g., '15:30:00Z'
2463
+ /** Issuer's digital signature. Refer to /signature/ documentation. */
2464
+ issuerDigitalSignature: IssuerDigitalSignature
2465
+ /** Invoice currency code. Refer to /codes/currencies/. Max 3 chars. */
2466
+ invoiceCurrencyCode: CurrencyCode // e.g., 'MYR'
2467
+ /** Invoice line items. */
2468
+ invoiceLineItems: InvoiceLineItem[]
2469
+ /**
2470
+ * Currency exchange rate to MYR. Max 15 decimal places.
2471
+ * Mandatory if InvoiceCurrencyCode is not MYR.
2472
+ */
2473
+ currencyExchangeRate?: number // e.g., 1.0 or 4.75
2474
+ /** Frequency of billing description. Max 50 chars. */
2475
+ frequencyOfBilling?: string // e.g., 'Monthly'
2476
+ /** Billing period start date (YYYY-MM-DD). Max 10 chars. */
2477
+ billingPeriodStartDate?: string // e.g., '2017-11-01'
2478
+ /** Billing period end date (YYYY-MM-DD). Max 10 chars. */
2479
+ billingPeriodEndDate?: string // e.g., '2017-11-30'
2480
+
2481
+ /** Overall monetary totals for the invoice. */
2482
+ legalMonetaryTotal: LegalMonetaryTotal
2483
+ /** Total tax amounts and subtotals. */
2484
+ taxTotal: TaxTotal
2485
+ /** Payment means details. Can occur multiple times. */
2486
+ paymentMeans?: PaymentMeans[]
2487
+ /** Document-level allowances or charges. Can occur multiple times. */
2488
+ allowanceCharges?: AllowanceCharge[]
2489
+ /** Delivery information. */
2490
+ delivery?: Delivery
2491
+ }
2492
+
2493
+ //#endregion
2494
+ //#region src/types/state-codes.d.ts
2495
+ /**
2496
+ * Represents the allowed codes for Malaysian states and federal territories.
2497
+ * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/state-codes/
2498
+ */
2499
+ type StateCode =
2500
+ | '01' // Johor
2501
+ | '02' // Kedah
2502
+ | '03' // Kelantan
2503
+ | '04' // Melaka
2504
+ | '05' // Negeri Sembilan
2505
+ | '06' // Pahang
2506
+ | '07' // Pulau Pinang
2507
+ | '08' // Perak
2508
+ | '09' // Perlis
2509
+ | '10' // Selangor
2510
+ | '11' // Terengganu
2511
+ | '12' // Sabah
2512
+ | '13' // Sarawak
2513
+ | '14' // Wilayah Persekutuan Kuala Lumpur
2514
+ | '15' // Wilayah Persekutuan Labuan
2515
+ | '16' // Wilayah Persekutuan Putrajaya
2516
+ | '17'
2517
+ /**
2518
+ * Enum representing the allowed state codes with descriptive names.
2519
+ * Provides a more readable way to reference states.
2520
+ *
2521
+ * @example
2522
+ * const code = StateCodeEnum.Selangor;
2523
+ * console.log(code); // Output: "10"
2524
+ */
2525
+ declare enum StateCodeEnum {
2526
+ Johor = '01',
2527
+ Kedah = '02',
2528
+ Kelantan = '03',
2529
+ Melaka = '04',
2530
+ NegeriSembilan = '05',
2531
+ Pahang = '06',
2532
+ PulauPinang = '07',
2533
+ Perak = '08',
2534
+ Perlis = '09',
2535
+ Selangor = '10',
2536
+ Terengganu = '11',
2537
+ Sabah = '12',
2538
+ Sarawak = '13',
2539
+ WPKualaLumpur = '14',
2540
+ WPLabuan = '15',
2541
+ WPPutrajaya = '16',
2542
+ NotApplicable = '17',
2543
+ }
2544
+ /**
2545
+ * Interface representing a state code entry.
2546
+ * Contains the code and its corresponding name.
2547
+ */
2548
+ interface State {
2549
+ code: StateCode
2550
+ name: string
2551
+ }
2552
+
2553
+ //#endregion
2554
+ //#region src/types/msic/0X.d.ts
2555
+ type MSIC_0X_CODE =
2556
+ | '00000'
2557
+ | '01111'
2558
+ | '01112'
2559
+ | '01113'
2560
+ | '01119'
2561
+ | '01120'
2562
+ | '01131'
2563
+ | '01132'
2564
+ | '01133'
2565
+ | '01134'
2566
+ | '01135'
2567
+ | '01136'
2568
+ | '01137'
2569
+ | '01138'
2570
+ | '01140'
2571
+ | '01150'
2572
+ | '01160'
2573
+ | '01191'
2574
+ | '01192'
2575
+ | '01193'
2576
+ | '01199'
2577
+ | '01210'
2578
+ | '01221'
2579
+ | '01222'
2580
+ | '01223'
2581
+ | '01224'
2582
+ | '01225'
2583
+ | '01226'
2584
+ | '01227'
2585
+ | '01228'
2586
+ | '01229'
2587
+ | '01231'
2588
+ | '01232'
2589
+ | '01233'
2590
+ | '01239'
2591
+ | '01241'
2592
+ | '01249'
2593
+ | '01251'
2594
+ | '01252'
2595
+ | '01253'
2596
+ | '01259'
2597
+ | '01261'
2598
+ | '01262'
2599
+ | '01263'
2600
+ | '01269'
2601
+ | '01271'
2602
+ | '01272'
2603
+ | '01273'
2604
+ | '01279'
2605
+ | '01281'
2606
+ | '01282'
2607
+ | '01283'
2608
+ | '01284'
2609
+ | '01285'
2610
+ | '01289'
2611
+ | '01291'
2612
+ | '01292'
2613
+ | '01293'
2614
+ | '01294'
2615
+ | '01295'
2616
+ | '01296'
2617
+ | '01299'
2618
+ | '01301'
2619
+ | '01302'
2620
+ | '01303'
2621
+ | '01304'
2622
+ | '01411'
2623
+ | '01412'
2624
+ | '01413'
2625
+ | '01420'
2626
+ | '01430'
2627
+ | '01441'
2628
+ | '01442'
2629
+ | '01443'
2630
+ | '01450'
2631
+ | '01461'
2632
+ | '01462'
2633
+ | '01463'
2634
+ | '01464'
2635
+ | '01465'
2636
+ | '01466'
2637
+ | '01467'
2638
+ | '01468'
2639
+ | '01469'
2640
+ | '01491'
2641
+ | '01492'
2642
+ | '01493'
2643
+ | '01494'
2644
+ | '01495'
2645
+ | '01496'
2646
+ | '01497'
2647
+ | '01499'
2648
+ | '01500'
2649
+ | '01610'
2650
+ | '01620'
2651
+ | '01631'
2652
+ | '01632'
2653
+ | '01633'
2654
+ | '01634'
2655
+ | '01640'
2656
+ | '01701'
2657
+ | '01702'
2658
+ | '02101'
2659
+ | '02102'
2660
+ | '02103'
2661
+ | '02104'
2662
+ | '02105'
2663
+ | '02201'
2664
+ | '02202'
2665
+ | '02203'
2666
+ | '02204'
2667
+ | '02301'
2668
+ | '02302'
2669
+ | '02303'
2670
+ | '02309'
2671
+ | '02401'
2672
+ | '02402'
2673
+ | '03111'
2674
+ | '03112'
2675
+ | '03113'
2676
+ | '03114'
2677
+ | '03115'
2678
+ | '03119'
2679
+ | '03121'
2680
+ | '03122'
2681
+ | '03123'
2682
+ | '03124'
2683
+ | '03129'
2684
+ | '03211'
2685
+ | '03212'
2686
+ | '03213'
2687
+ | '03214'
2688
+ | '03215'
2689
+ | '03216'
2690
+ | '03217'
2691
+ | '03218'
2692
+ | '03219'
2693
+ | '03221'
2694
+ | '03222'
2695
+ | '03223'
2696
+ | '03224'
2697
+ | '03225'
2698
+ | '03229'
2699
+ | '05100'
2700
+ | '05200'
2701
+ | '06101'
2702
+ | '06102'
2703
+ | '06103'
2704
+ | '06104'
2705
+ | '06201'
2706
+ | '06202'
2707
+ | '06203'
2708
+ | '06204'
2709
+ | '06205'
2710
+ | '07101'
2711
+ | '07102'
2712
+ | '07210'
2713
+ | '07291'
2714
+ | '07292'
2715
+ | '07293'
2716
+ | '07294'
2717
+ | '07295'
2718
+ | '07296'
2719
+ | '07297'
2720
+ | '07298'
2721
+ | '07299'
2722
+ | '08101'
2723
+ | '08102'
2724
+ | '08103'
2725
+ | '08104'
2726
+ | '08105'
2727
+ | '08106'
2728
+ | '08107'
2729
+ | '08108'
2730
+ | '08109'
2731
+ | '08911'
2732
+ | '08912'
2733
+ | '08913'
2734
+ | '08914'
2735
+ | '08915'
2736
+ | '08916'
2737
+ | '08917'
2738
+ | '08918'
2739
+ | '08921'
2740
+ | '08922'
2741
+ | '08923'
2742
+ | '08931'
2743
+ | '08932'
2744
+ | '08933'
2745
+ | '08991'
2746
+ | '08992'
2747
+ | '08993'
2748
+ | '08994'
2749
+ | '08995'
2750
+ | '08996'
2751
+ | '08999'
2752
+ | '09101'
2753
+ | '09102'
2754
+ | '09900'
2755
+
2756
+ //#endregion
2757
+ //#region src/types/msic/1X.d.ts
2758
+ type MSIC_1X_CODE =
2759
+ | '10101'
2760
+ | '10102'
2761
+ | '10103'
2762
+ | '10104'
2763
+ | '10109'
2764
+ | '10201'
2765
+ | '10202'
2766
+ | '10203'
2767
+ | '10204'
2768
+ | '10205'
2769
+ | '10301'
2770
+ | '10302'
2771
+ | '10303'
2772
+ | '10304'
2773
+ | '10305'
2774
+ | '10306'
2775
+ | '10401'
2776
+ | '10402'
2777
+ | '10403'
2778
+ | '10404'
2779
+ | '10405'
2780
+ | '10406'
2781
+ | '10407'
2782
+ | '10501'
2783
+ | '10502'
2784
+ | '10509'
2785
+ | '10611'
2786
+ | '10612'
2787
+ | '10613'
2788
+ | '10619'
2789
+ | '10621'
2790
+ | '10622'
2791
+ | '10623'
2792
+ | '10711'
2793
+ | '10712'
2794
+ | '10713'
2795
+ | '10714'
2796
+ | '10721'
2797
+ | '10722'
2798
+ | '10731'
2799
+ | '10732'
2800
+ | '10733'
2801
+ | '10741'
2802
+ | '10742'
2803
+ | '10750'
2804
+ | '10791'
2805
+ | '10792'
2806
+ | '10793'
2807
+ | '10794'
2808
+ | '10795'
2809
+ | '10799'
2810
+ | '10800'
2811
+ | '11010'
2812
+ | '11020'
2813
+ | '11030'
2814
+ | '11041'
2815
+ | '11042'
2816
+ | '12000'
2817
+ | '13110'
2818
+ | '13120'
2819
+ | '13131'
2820
+ | '13132'
2821
+ | '13139'
2822
+ | '13910'
2823
+ | '13921'
2824
+ | '13922'
2825
+ | '13930'
2826
+ | '13940'
2827
+ | '13990'
2828
+ | '14101'
2829
+ | '14102'
2830
+ | '14103'
2831
+ | '14109'
2832
+ | '14200'
2833
+ | '14300'
2834
+ | '15110'
2835
+ | '15120'
2836
+ | '15201'
2837
+ | '15202'
2838
+ | '15203'
2839
+ | '15209'
2840
+ | '16211'
2841
+ | '16221'
2842
+ | '16222'
2843
+ | '16230'
2844
+ | '16291'
2845
+ | '16292'
2846
+ | '17010'
2847
+ | '17020'
2848
+ | '17091'
2849
+ | '17092'
2850
+ | '17093'
2851
+ | '17094'
2852
+ | '17099'
2853
+ | '18110'
2854
+ | '18120'
2855
+ | '18200'
2856
+ | '19100'
2857
+ | '19201'
2858
+ | '19202'
2859
+
2860
+ //#endregion
2861
+ //#region src/types/msic/2X.d.ts
2862
+ type MSIC_2X_CODE =
2863
+ | '20111'
2864
+ | '20112'
2865
+ | '20113'
2866
+ | '20119'
2867
+ | '20121'
2868
+ | '20129'
2869
+ | '20131'
2870
+ | '20132'
2871
+ | '20133'
2872
+ | '20210'
2873
+ | '20221'
2874
+ | '20222'
2875
+ | '20231'
2876
+ | '20232'
2877
+ | '20291'
2878
+ | '20292'
2879
+ | '20299'
2880
+ | '20300'
2881
+ | '21001'
2882
+ | '21002'
2883
+ | '21003'
2884
+ | '21004'
2885
+ | '21005'
2886
+ | '21006'
2887
+ | '21007'
2888
+ | '21009'
2889
+ | '22111'
2890
+ | '22112'
2891
+ | '22191'
2892
+ | '22192'
2893
+ | '22193'
2894
+ | '22199'
2895
+ | '22201'
2896
+ | '22202'
2897
+ | '22203'
2898
+ | '22204'
2899
+ | '22205'
2900
+ | '22209'
2901
+ | '23101'
2902
+ | '23102'
2903
+ | '23109'
2904
+ | '23911'
2905
+ | '23912'
2906
+ | '23921'
2907
+ | '23929'
2908
+ | '23930'
2909
+ | '23941'
2910
+ | '23942'
2911
+ | '23951'
2912
+ | '23952'
2913
+ | '23953'
2914
+ | '23959'
2915
+ | '23960'
2916
+ | '23990'
2917
+ | '24101'
2918
+ | '24102'
2919
+ | '24103'
2920
+ | '24104'
2921
+ | '24109'
2922
+ | '24201'
2923
+ | '24202'
2924
+ | '24209'
2925
+ | '24311'
2926
+ | '24312'
2927
+ | '24320'
2928
+ | '25111'
2929
+ | '25112'
2930
+ | '25113'
2931
+ | '25119'
2932
+ | '25120'
2933
+ | '25130'
2934
+ | '25200'
2935
+ | '25910'
2936
+ | '25920'
2937
+ | '25930'
2938
+ | '25991'
2939
+ | '25992'
2940
+ | '25993'
2941
+ | '25994'
2942
+ | '25999'
2943
+ | '26101'
2944
+ | '26102'
2945
+ | '26103'
2946
+ | '26104'
2947
+ | '26105'
2948
+ | '26109'
2949
+ | '26201'
2950
+ | '26202'
2951
+ | '26300'
2952
+ | '26400'
2953
+ | '26511'
2954
+ | '26512'
2955
+ | '26520'
2956
+ | '26600'
2957
+ | '26701'
2958
+ | '26702'
2959
+ | '26800'
2960
+ | '27101'
2961
+ | '27102'
2962
+ | '27200'
2963
+ | '27310'
2964
+ | '27320'
2965
+ | '27330'
2966
+ | '27400'
2967
+ | '27500'
2968
+ | '27900'
2969
+ | '28110'
2970
+ | '28120'
2971
+ | '28130'
2972
+ | '28140'
2973
+ | '28150'
2974
+ | '28160'
2975
+ | '28170'
2976
+ | '28180'
2977
+ | '28191'
2978
+ | '28192'
2979
+ | '28199'
2980
+ | '28210'
2981
+ | '28220'
2982
+ | '28230'
2983
+ | '28240'
2984
+ | '28250'
2985
+ | '28260'
2986
+ | '28290'
2987
+ | '29101'
2988
+ | '29102'
2989
+ | '29200'
2990
+ | '29300'
2991
+
2992
+ //#endregion
2993
+ //#region src/types/msic/3X.d.ts
2994
+ type MSIC_3X_CODE =
2995
+ | '30110'
2996
+ | '30120'
2997
+ | '30200'
2998
+ | '30300'
2999
+ | '30400'
3000
+ | '30910'
3001
+ | '30920'
3002
+ | '30990'
3003
+ | '31001'
3004
+ | '31002'
3005
+ | '31003'
3006
+ | '31009'
3007
+ | '32110'
3008
+ | '32120'
3009
+ | '32200'
3010
+ | '32300'
3011
+ | '32400'
3012
+ | '32500'
3013
+ | '32901'
3014
+ | '32909'
3015
+ | '33110'
3016
+ | '33120'
3017
+ | '33131'
3018
+ | '33132'
3019
+ | '33133'
3020
+ | '33140'
3021
+ | '33150'
3022
+ | '33190'
3023
+ | '33200'
3024
+ | '35101'
3025
+ | '35102'
3026
+ | '35201'
3027
+ | '35202'
3028
+ | '35203'
3029
+ | '35301'
3030
+ | '35302'
3031
+ | '35303'
3032
+ | '36001'
3033
+ | '36002'
3034
+ | '37000'
3035
+ | '38111'
3036
+ | '38112'
3037
+ | '38113'
3038
+ | '38114'
3039
+ | '38115'
3040
+ | '38121'
3041
+ | '38122'
3042
+ | '38210'
3043
+ | '38220'
3044
+ | '38301'
3045
+ | '38302'
3046
+ | '38303'
3047
+ | '38304'
3048
+ | '38309'
3049
+ | '39000'
3050
+
3051
+ //#endregion
3052
+ //#region src/types/msic/4X.d.ts
3053
+ type MSIC_4X_CODE =
3054
+ | '41001'
3055
+ | '41002'
3056
+ | '41003'
3057
+ | '41009'
3058
+ | '42101'
3059
+ | '42102'
3060
+ | '42103'
3061
+ | '42104'
3062
+ | '42105'
3063
+ | '42106'
3064
+ | '42109'
3065
+ | '42201'
3066
+ | '42202'
3067
+ | '42203'
3068
+ | '42204'
3069
+ | '42205'
3070
+ | '42206'
3071
+ | '42207'
3072
+ | '42209'
3073
+ | '42901'
3074
+ | '42902'
3075
+ | '42903'
3076
+ | '42904'
3077
+ | '42905'
3078
+ | '42906'
3079
+ | '42909'
3080
+ | '43110'
3081
+ | '43121'
3082
+ | '43122'
3083
+ | '43123'
3084
+ | '43124'
3085
+ | '43125'
3086
+ | '43126'
3087
+ | '43129'
3088
+ | '43211'
3089
+ | '43212'
3090
+ | '43213'
3091
+ | '43214'
3092
+ | '43215'
3093
+ | '43216'
3094
+ | '43219'
3095
+ | '43221'
3096
+ | '43222'
3097
+ | '43223'
3098
+ | '43224'
3099
+ | '43225'
3100
+ | '43226'
3101
+ | '43227'
3102
+ | '43228'
3103
+ | '43229'
3104
+ | '43291'
3105
+ | '43292'
3106
+ | '43293'
3107
+ | '43294'
3108
+ | '43295'
3109
+ | '43299'
3110
+ | '43301'
3111
+ | '43302'
3112
+ | '43303'
3113
+ | '43304'
3114
+ | '43305'
3115
+ | '43306'
3116
+ | '43307'
3117
+ | '43309'
3118
+ | '43901'
3119
+ | '43902'
3120
+ | '43903'
3121
+ | '43904'
3122
+ | '43905'
3123
+ | '43906'
3124
+ | '43907'
3125
+ | '43909'
3126
+ | '45101'
3127
+ | '45102'
3128
+ | '45103'
3129
+ | '45104'
3130
+ | '45105'
3131
+ | '45106'
3132
+ | '45109'
3133
+ | '45201'
3134
+ | '45202'
3135
+ | '45203'
3136
+ | '45204'
3137
+ | '45205'
3138
+ | '45300'
3139
+ | '45401'
3140
+ | '45402'
3141
+ | '45403'
3142
+ | '46100'
3143
+ | '46201'
3144
+ | '46202'
3145
+ | '46203'
3146
+ | '46204'
3147
+ | '46205'
3148
+ | '46209'
3149
+ | '46311'
3150
+ | '46312'
3151
+ | '46313'
3152
+ | '46314'
3153
+ | '46319'
3154
+ | '46321'
3155
+ | '46322'
3156
+ | '46323'
3157
+ | '46324'
3158
+ | '46325'
3159
+ | '46326'
3160
+ | '46327'
3161
+ | '46329'
3162
+ | '46411'
3163
+ | '46412'
3164
+ | '46413'
3165
+ | '46414'
3166
+ | '46415'
3167
+ | '46416'
3168
+ | '46417'
3169
+ | '46419'
3170
+ | '46421'
3171
+ | '46422'
3172
+ | '46431'
3173
+ | '46432'
3174
+ | '46433'
3175
+ | '46434'
3176
+ | '46441'
3177
+ | '46442'
3178
+ | '46443'
3179
+ | '46444'
3180
+ | '46491'
3181
+ | '46492'
3182
+ | '46493'
3183
+ | '46494'
3184
+ | '46495'
3185
+ | '46496'
3186
+ | '46497'
3187
+ | '46499'
3188
+ | '46510'
3189
+ | '46521'
3190
+ | '46522'
3191
+ | '46531'
3192
+ | '46532'
3193
+ | '46591'
3194
+ | '46592'
3195
+ | '46593'
3196
+ | '46594'
3197
+ | '46595'
3198
+ | '46596'
3199
+ | '46599'
3200
+ | '46611'
3201
+ | '46612'
3202
+ | '46619'
3203
+ | '46621'
3204
+ | '46622'
3205
+ | '46631'
3206
+ | '46632'
3207
+ | '46633'
3208
+ | '46634'
3209
+ | '46635'
3210
+ | '46636'
3211
+ | '46637'
3212
+ | '46639'
3213
+ | '46691'
3214
+ | '46692'
3215
+ | '46693'
3216
+ | '46694'
3217
+ | '46695'
3218
+ | '46696'
3219
+ | '46697'
3220
+ | '46698'
3221
+ | '46699'
3222
+ | '46901'
3223
+ | '46902'
3224
+ | '46909'
3225
+ | '47111'
3226
+ | '47112'
3227
+ | '47113'
3228
+ | '47114'
3229
+ | '47191'
3230
+ | '47192'
3231
+ | '47193'
3232
+ | '47194'
3233
+ | '47199'
3234
+ | '47211'
3235
+ | '47212'
3236
+ | '47213'
3237
+ | '47214'
3238
+ | '47215'
3239
+ | '47216'
3240
+ | '47217'
3241
+ | '47219'
3242
+ | '47221'
3243
+ | '47222'
3244
+ | '47230'
3245
+ | '47300'
3246
+ | '47412'
3247
+ | '47413'
3248
+ | '47420'
3249
+ | '47510'
3250
+ | '47531'
3251
+ | '47532'
3252
+ | '47533'
3253
+ | '47591'
3254
+ | '47592'
3255
+ | '47593'
3256
+ | '47594'
3257
+ | '47595'
3258
+ | '47596'
3259
+ | '47597'
3260
+ | '47598'
3261
+ | '47611'
3262
+ | '47612'
3263
+ | '47631'
3264
+ | '47632'
3265
+ | '47633'
3266
+ | '47634'
3267
+ | '47635'
3268
+ | '47640'
3269
+ | '47711'
3270
+ | '47712'
3271
+ | '47713'
3272
+ | '47721'
3273
+ | '47722'
3274
+ | '47731'
3275
+ | '47732'
3276
+ | '47733'
3277
+ | '47734'
3278
+ | '47735'
3279
+ | '47736'
3280
+ | '47737'
3281
+ | '47738'
3282
+ | '47739'
3283
+ | '47741'
3284
+ | '47742'
3285
+ | '47743'
3286
+ | '47744'
3287
+ | '47749'
3288
+ | '47810'
3289
+ | '47820'
3290
+ | '47891'
3291
+ | '47893'
3292
+ | '47894'
3293
+ | '47895'
3294
+ | '47911'
3295
+ | '47912'
3296
+ | '47913'
3297
+ | '47914'
3298
+ | '47992'
3299
+ | '47999'
3300
+ | '49110'
3301
+ | '49120'
3302
+ | '49211'
3303
+ | '49212'
3304
+ | '49221'
3305
+ | '49222'
3306
+ | '49223'
3307
+ | '49224'
3308
+ | '49225'
3309
+ | '49229'
3310
+ | '49230'
3311
+ | '49300'
3312
+
3313
+ //#endregion
3314
+ //#region src/types/msic/5X.d.ts
3315
+ type MSIC_5X_CODE =
3316
+ | '50111'
3317
+ | '50112'
3318
+ | '50113'
3319
+ | '50121'
3320
+ | '50122'
3321
+ | '50211'
3322
+ | '50212'
3323
+ | '50220'
3324
+ | '51101'
3325
+ | '51102'
3326
+ | '51103'
3327
+ | '51201'
3328
+ | '51202'
3329
+ | '51203'
3330
+ | '52100'
3331
+ | '52211'
3332
+ | '52212'
3333
+ | '52213'
3334
+ | '52214'
3335
+ | '52219'
3336
+ | '52221'
3337
+ | '52222'
3338
+ | '52229'
3339
+ | '52231'
3340
+ | '52232'
3341
+ | '52233'
3342
+ | '52234'
3343
+ | '52239'
3344
+ | '52241'
3345
+ | '52249'
3346
+ | '52291'
3347
+ | '52292'
3348
+ | '52299'
3349
+ | '53100'
3350
+ | '53200'
3351
+ | '55101'
3352
+ | '55102'
3353
+ | '55103'
3354
+ | '55104'
3355
+ | '55105'
3356
+ | '55106'
3357
+ | '55107'
3358
+ | '55108'
3359
+ | '55109'
3360
+ | '55200'
3361
+ | '55900'
3362
+ | '56103'
3363
+ | '56104'
3364
+ | '56105'
3365
+ | '56106'
3366
+ | '56107'
3367
+ | '56210'
3368
+ | '56290'
3369
+ | '56301'
3370
+ | '56302'
3371
+ | '56303'
3372
+ | '56304'
3373
+ | '56309'
3374
+ | '58110'
3375
+ | '58120'
3376
+ | '58130'
3377
+ | '58190'
3378
+ | '58201'
3379
+ | '58202'
3380
+ | '58203'
3381
+ | '59110'
3382
+ | '59120'
3383
+ | '59130'
3384
+ | '59140'
3385
+ | '59200'
3386
+
3387
+ //#endregion
3388
+ //#region src/types/msic/6X.d.ts
3389
+ type MSIC_6X_CODE =
3390
+ | '60100'
3391
+ | '60200'
3392
+ | '61101'
3393
+ | '61102'
3394
+ | '61201'
3395
+ | '61202'
3396
+ | '61300'
3397
+ | '61901'
3398
+ | '61902'
3399
+ | '61903'
3400
+ | '61904'
3401
+ | '61905'
3402
+ | '61909'
3403
+ | '62010'
3404
+ | '62021'
3405
+ | '62022'
3406
+ | '62091'
3407
+ | '62099'
3408
+ | '63111'
3409
+ | '63112'
3410
+ | '63120'
3411
+ | '63910'
3412
+ | '63990'
3413
+ | '64110'
3414
+ | '64191'
3415
+ | '64192'
3416
+ | '64193'
3417
+ | '64194'
3418
+ | '64195'
3419
+ | '64199'
3420
+ | '64200'
3421
+ | '64301'
3422
+ | '64302'
3423
+ | '64303'
3424
+ | '64304'
3425
+ | '64309'
3426
+ | '64910'
3427
+ | '64921'
3428
+ | '64922'
3429
+ | '64923'
3430
+ | '64924'
3431
+ | '64925'
3432
+ | '64929'
3433
+ | '64991'
3434
+ | '64992'
3435
+ | '64993'
3436
+ | '64999'
3437
+ | '65111'
3438
+ | '65112'
3439
+ | '65121'
3440
+ | '65122'
3441
+ | '65123'
3442
+ | '65124'
3443
+ | '65125'
3444
+ | '65201'
3445
+ | '65202'
3446
+ | '65203'
3447
+ | '65204'
3448
+ | '65205'
3449
+ | '65206'
3450
+ | '65207'
3451
+ | '65301'
3452
+ | '65302'
3453
+ | '66111'
3454
+ | '66112'
3455
+ | '66113'
3456
+ | '66114'
3457
+ | '66119'
3458
+ | '66121'
3459
+ | '66122'
3460
+ | '66123'
3461
+ | '66124'
3462
+ | '66125'
3463
+ | '66129'
3464
+ | '66191'
3465
+ | '66192'
3466
+ | '66199'
3467
+ | '66211'
3468
+ | '66212'
3469
+ | '66221'
3470
+ | '66222'
3471
+ | '66223'
3472
+ | '66224'
3473
+ | '66290'
3474
+ | '66301'
3475
+ | '66302'
3476
+ | '66303'
3477
+ | '68101'
3478
+ | '68102'
3479
+ | '68103'
3480
+ | '68104'
3481
+ | '68109'
3482
+ | '68201'
3483
+ | '68202'
3484
+ | '68203'
3485
+ | '68209'
3486
+ | '69100'
3487
+ | '69200'
3488
+
3489
+ //#endregion
3490
+ //#region src/types/msic/7X.d.ts
3491
+ type MSIC_7X_CODE =
3492
+ | '70100'
3493
+ | '70201'
3494
+ | '70202'
3495
+ | '70203'
3496
+ | '70209'
3497
+ | '71101'
3498
+ | '71102'
3499
+ | '71103'
3500
+ | '71109'
3501
+ | '71200'
3502
+ | '72101'
3503
+ | '72102'
3504
+ | '72103'
3505
+ | '72104'
3506
+ | '72105'
3507
+ | '72106'
3508
+ | '72109'
3509
+ | '72201'
3510
+ | '72202'
3511
+ | '72209'
3512
+ | '73100'
3513
+ | '73200'
3514
+ | '74101'
3515
+ | '74102'
3516
+ | '74103'
3517
+ | '74109'
3518
+ | '74200'
3519
+ | '74901'
3520
+ | '74902'
3521
+ | '74903'
3522
+ | '74904'
3523
+ | '74905'
3524
+ | '74909'
3525
+ | '75000'
3526
+ | '77101'
3527
+ | '77102'
3528
+ | '77211'
3529
+ | '77212'
3530
+ | '77213'
3531
+ | '77219'
3532
+ | '77220'
3533
+ | '77291'
3534
+ | '77292'
3535
+ | '77293'
3536
+ | '77294'
3537
+ | '77295'
3538
+ | '77296'
3539
+ | '77297'
3540
+ | '77299'
3541
+ | '77301'
3542
+ | '77302'
3543
+ | '77303'
3544
+ | '77304'
3545
+ | '77305'
3546
+ | '77306'
3547
+ | '77307'
3548
+ | '77309'
3549
+ | '77400'
3550
+ | '78100'
3551
+ | '78200'
3552
+ | '78300'
3553
+ | '79110'
3554
+ | '79120'
3555
+ | '79900'
3556
+
3557
+ //#endregion
3558
+ //#region src/types/msic/8X.d.ts
3559
+ type MSIC_8X_CODE =
3560
+ | '80100'
3561
+ | '80200'
3562
+ | '80300'
3563
+ | '81100'
3564
+ | '81210'
3565
+ | '81291'
3566
+ | '81292'
3567
+ | '81293'
3568
+ | '81294'
3569
+ | '81295'
3570
+ | '81296'
3571
+ | '81297'
3572
+ | '81299'
3573
+ | '81300'
3574
+ | '82110'
3575
+ | '82191'
3576
+ | '82192'
3577
+ | '82193'
3578
+ | '82194'
3579
+ | '82195'
3580
+ | '82196'
3581
+ | '82199'
3582
+ | '82200'
3583
+ | '82301'
3584
+ | '82302'
3585
+ | '82910'
3586
+ | '82920'
3587
+ | '82990'
3588
+ | '84111'
3589
+ | '84112'
3590
+ | '84121'
3591
+ | '84122'
3592
+ | '84123'
3593
+ | '84124'
3594
+ | '84125'
3595
+ | '84126'
3596
+ | '84129'
3597
+ | '84131'
3598
+ | '84132'
3599
+ | '84133'
3600
+ | '84134'
3601
+ | '84135'
3602
+ | '84136'
3603
+ | '84137'
3604
+ | '84138'
3605
+ | '84139'
3606
+ | '84210'
3607
+ | '84220'
3608
+ | '84231'
3609
+ | '84232'
3610
+ | '84233'
3611
+ | '84234'
3612
+ | '84235'
3613
+ | '84236'
3614
+ | '84239'
3615
+ | '84300'
3616
+ | '85101'
3617
+ | '85102'
3618
+ | '85103'
3619
+ | '85104'
3620
+ | '85211'
3621
+ | '85212'
3622
+ | '85221'
3623
+ | '85222'
3624
+ | '85301'
3625
+ | '85302'
3626
+ | '85411'
3627
+ | '85412'
3628
+ | '85419'
3629
+ | '85421'
3630
+ | '85429'
3631
+ | '85491'
3632
+ | '85492'
3633
+ | '85493'
3634
+ | '85494'
3635
+ | '85499'
3636
+ | '85500'
3637
+ | '86101'
3638
+ | '86102'
3639
+ | '86201'
3640
+ | '86202'
3641
+ | '86203'
3642
+ | '86901'
3643
+ | '86902'
3644
+ | '86903'
3645
+ | '86904'
3646
+ | '86905'
3647
+ | '86906'
3648
+ | '86909'
3649
+ | '87101'
3650
+ | '87102'
3651
+ | '87103'
3652
+ | '87201'
3653
+ | '87209'
3654
+ | '87300'
3655
+ | '87901'
3656
+ | '87902'
3657
+ | '87909'
3658
+ | '88101'
3659
+ | '88109'
3660
+ | '88901'
3661
+ | '88902'
3662
+ | '88909'
3663
+
3664
+ //#endregion
3665
+ //#region src/types/msic/9X.d.ts
3666
+ type MSIC_9X_CODE =
3667
+ | '90001'
3668
+ | '90002'
3669
+ | '90003'
3670
+ | '90004'
3671
+ | '90005'
3672
+ | '90006'
3673
+ | '90007'
3674
+ | '90009'
3675
+ | '91011'
3676
+ | '91012'
3677
+ | '91021'
3678
+ | '91022'
3679
+ | '91031'
3680
+ | '91032'
3681
+ | '92000'
3682
+ | '93111'
3683
+ | '93112'
3684
+ | '93113'
3685
+ | '93114'
3686
+ | '93115'
3687
+ | '93116'
3688
+ | '93117'
3689
+ | '93118'
3690
+ | '93119'
3691
+ | '93120'
3692
+ | '93191'
3693
+ | '93192'
3694
+ | '93193'
3695
+ | '93199'
3696
+ | '93210'
3697
+ | '93291'
3698
+ | '93292'
3699
+ | '93293'
3700
+ | '93294'
3701
+ | '93295'
3702
+ | '93296'
3703
+ | '93297'
3704
+ | '93299'
3705
+ | '94110'
3706
+ | '94120'
3707
+ | '94200'
3708
+ | '94910'
3709
+ | '94920'
3710
+ | '94990'
3711
+ | '95111'
3712
+ | '95112'
3713
+ | '95113'
3714
+ | '95121'
3715
+ | '95122'
3716
+ | '95123'
3717
+ | '95124'
3718
+ | '95125'
3719
+ | '95126'
3720
+ | '95127'
3721
+ | '95211'
3722
+ | '95212'
3723
+ | '95213'
3724
+ | '95214'
3725
+ | '95221'
3726
+ | '95222'
3727
+ | '95230'
3728
+ | '95240'
3729
+ | '95291'
3730
+ | '95292'
3731
+ | '95293'
3732
+ | '95294'
3733
+ | '95295'
3734
+ | '95296'
3735
+ | '95299'
3736
+ | '96011'
3737
+ | '96012'
3738
+ | '96013'
3739
+ | '96014'
3740
+ | '96020'
3741
+ | '96031'
3742
+ | '96032'
3743
+ | '96033'
3744
+ | '96034'
3745
+ | '96035'
3746
+ | '96091'
3747
+ | '96092'
3748
+ | '96093'
3749
+ | '96094'
3750
+ | '96095'
3751
+ | '96096'
3752
+ | '96097'
3753
+ | '96099'
3754
+ | '97000'
3755
+ | '98100'
3756
+ | '98200'
3757
+ | '99000'
3758
+
3759
+ //#endregion
3760
+ //#region src/types/msic-codes.d.ts
3761
+ type MSICCode = {
3762
+ code: string
3763
+ description: string
3764
+ msicCategoryReference: string
3765
+ }
3766
+ /**
3767
+ * Represents the allowed 5-digit Malaysia Standard Industrial Classification (MSIC) codes.
3768
+ * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/msic-codes/
3769
+ * Interface representing an MSIC code entry.
3770
+ * Contains the 5-digit code and its description.
3771
+ */
3772
+ interface MsicEntry {
3773
+ code:
3774
+ | MSIC_0X_CODE
3775
+ | MSIC_1X_CODE
3776
+ | MSIC_2X_CODE
3777
+ | MSIC_3X_CODE
3778
+ | MSIC_4X_CODE
3779
+ | MSIC_5X_CODE
3780
+ | MSIC_6X_CODE
3781
+ | MSIC_7X_CODE
3782
+ | MSIC_8X_CODE
3783
+ | MSIC_9X_CODE
3784
+ description: string
3785
+ }
3786
+
3787
+ //#endregion
3788
+ //#region src/utils/MyInvoisClient.d.ts
3789
+ declare class MyInvoisClient {
3790
+ private readonly baseUrl;
3791
+ private readonly clientId;
3792
+ private readonly clientSecret;
3793
+ private token;
3794
+ private tokenExpiration;
3795
+ constructor(clientId: string, clientSecret: string, environment: 'sandbox' | 'production');
3796
+ private refreshToken;
3797
+ private getToken;
3798
+ private fetch;
3799
+ /**
3800
+ * Validates a TIN against a NRIC
3801
+ *
3802
+ * @param tin
3803
+ * @param nric
3804
+ * @returns
3805
+ */
3806
+ verifyTin(tin: string, nric: string): Promise<boolean>;
3807
+ }
3808
+
3809
+ //#endregion
3810
+ export { Address, AllowanceCharge, Buyer, CanonicalizationMethod, Cert, CertDigest, Classification, ClassificationCode, ClassificationCodeEnum, Country, CountryCode, CountryCodeEnum, CountryNameEnum, Currency, CurrencyCode, CurrencyCodeEnum, Delivery, DigestMethod, EInvoiceType, EInvoiceTypeCode, EInvoiceTypeCodeEnum, InvoiceLineItem, InvoiceV1_1, IssuerDigitalSignature, IssuerSerial, KeyInfo, LegalMonetaryTotal, MSICCode, MsicEntry, MyInvoisClient, PaymentMeans, PaymentMode, PaymentModeCode, PaymentModeCodeEnum, QualifyingProperties, Reference, SignatureMethod, SignedInfo, SignedProperties, SignedSignatureProperties, SigningCertificate, State, StateCode, StateCodeEnum, Supplier, TaxCategory, TaxSubtotal, TaxTotal, TaxType, TaxTypeCode, TaxTypeCodeEnum, Transform, UnitType, UnitTypeCode, UnitTypeCodeEnum, X509Data };