@ripwords/myinvois-client 0.2.6 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/documentManagement.d.ts +2 -2
- package/dist/api/documentSubmission.d.ts +3 -3
- package/dist/api/documentSubmission.js +2 -2
- package/dist/api/documentTypeManagement.d.ts +2 -2
- package/dist/api/notificationManagement.d.ts +2 -2
- package/dist/api/platformLogin.d.ts +2 -2
- package/dist/api/taxpayerValidation.d.ts +4 -3
- package/dist/api/taxpayerValidation.js +2 -2
- package/dist/{document-djvnrrZo.cjs → document-BgPF4b8T.cjs} +20 -3
- package/dist/document-BgPF4b8T.cjs.map +1 -0
- package/dist/{document-BvyYSCPx.js → document-CX2DalTX.js} +19 -2
- package/dist/{documentSubmission-695VhFA8.js → documentSubmission-BszHhgyA.js} +1 -1
- package/dist/{documentSubmission-CK1zOsSV.cjs → documentSubmission-DTnOLqdW.cjs} +2 -2
- package/dist/documentSubmission-DTnOLqdW.cjs.map +1 -0
- package/dist/{documents-BuU5vKSi.d.cts → documents-BXxJLeMe.d.cts} +221 -24
- package/dist/{documents-Bw8tPK9r.d.ts → documents-BrbgAg2U.d.ts} +220 -23
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/index25.cjs +1 -1
- package/dist/index27.cjs +1 -1
- package/dist/index3.cjs +2 -2
- package/dist/index62.cts.map +1 -1
- package/dist/index66.cts.map +1 -1
- package/dist/index67.cts.map +1 -1
- package/dist/index7.cjs +2 -1
- package/dist/index70.cts.map +1 -1
- package/dist/{taxpayer-Rnw1l38P.d.ts → taxpayer-B5jvXdII.d.ts} +1 -1
- package/dist/{taxpayer-C2ZUMCP6.d.cts → taxpayer-ONpnw0na.d.cts} +2 -2
- package/dist/{taxpayerValidation-CSuifcY1.cjs → taxpayerValidation-BYaf78Qb.cjs} +12 -3
- package/dist/taxpayerValidation-BYaf78Qb.cjs.map +1 -0
- package/dist/{taxpayerValidation-DiLGJg1l.js → taxpayerValidation-D7oTGE4j.js} +6 -3
- package/dist/types/documents.d.ts +2 -2
- package/dist/types/index.d.ts +3 -3
- package/dist/types/taxpayer.d.ts +2 -2
- package/dist/utils/document.d.ts +20 -20
- package/dist/utils/document.js +1 -1
- package/dist/utils/signature-diagnostics.d.ts +2 -2
- package/dist/utils/signature-diagnostics.js +1 -1
- package/dist/utils/validation.d.ts +2 -2
- package/package.json +1 -1
- package/dist/document-djvnrrZo.cjs.map +0 -1
- package/dist/documentSubmission-CK1zOsSV.cjs.map +0 -1
- package/dist/taxpayerValidation-CSuifcY1.cjs.map +0 -1
|
@@ -259,6 +259,210 @@ interface InvoiceV1_1 {
|
|
|
259
259
|
/** Total tax amounts and subtotals. */
|
|
260
260
|
taxTotal: TaxTotal;
|
|
261
261
|
}
|
|
262
|
+
interface CreditNoteV1_1 {
|
|
263
|
+
/** Supplier information (AccountingSupplierParty). */
|
|
264
|
+
supplier: Supplier;
|
|
265
|
+
/** Buyer information (AccountingCustomerParty). */
|
|
266
|
+
buyer: Buyer;
|
|
267
|
+
|
|
268
|
+
/** e-Invoice version. Fixed value '1.1'. */
|
|
269
|
+
eInvoiceVersion: '1.1';
|
|
270
|
+
/** e-Invoice type code for Credit Note. Fixed value '02'. */
|
|
271
|
+
eInvoiceTypeCode: EInvoiceTypeCode;
|
|
272
|
+
/** Document reference number used by Supplier for internal tracking purpose. Max 50 chars. */
|
|
273
|
+
eInvoiceCodeOrNumber: string;
|
|
274
|
+
/** LHDNM Unique Identifier Number of the original invoice / document that is being adjusted. 26 chars. */
|
|
275
|
+
originalEInvoiceReferenceNumber: string;
|
|
276
|
+
/** Date of issuance (YYYY-MM-DD) in UTC. Must be the current date. */
|
|
277
|
+
eInvoiceDate: string;
|
|
278
|
+
/** Time of issuance (HH:mm:ssZ) in UTC. Must be the current time. */
|
|
279
|
+
eInvoiceTime: string;
|
|
280
|
+
|
|
281
|
+
/** Specific currency that is used to represent the monetary value stated in the e-Invoice. */
|
|
282
|
+
invoiceCurrencyCode: CurrencyCode;
|
|
283
|
+
/** Rate at which non-Malaysian currency will be converted into Malaysian Ringgit.
|
|
284
|
+
* Mandatory when invoiceCurrencyCode is not 'MYR'.
|
|
285
|
+
*/
|
|
286
|
+
currencyExchangeRate?: number;
|
|
287
|
+
|
|
288
|
+
/** Credit note line items. */
|
|
289
|
+
creditNoteLineItems: InvoiceLineItem[];
|
|
290
|
+
|
|
291
|
+
/** Overall monetary totals for the credit note. */
|
|
292
|
+
legalMonetaryTotal: LegalMonetaryTotal;
|
|
293
|
+
/** Total tax amounts and subtotals. */
|
|
294
|
+
taxTotal: TaxTotal;
|
|
295
|
+
}
|
|
296
|
+
interface DebitNoteV1_1 {
|
|
297
|
+
/** Supplier information (AccountingSupplierParty). */
|
|
298
|
+
supplier: Supplier;
|
|
299
|
+
/** Buyer information (AccountingCustomerParty). */
|
|
300
|
+
buyer: Buyer;
|
|
301
|
+
|
|
302
|
+
/** e-Invoice version. Fixed value '1.1'. */
|
|
303
|
+
eInvoiceVersion: '1.1';
|
|
304
|
+
/** e-Invoice type code for Debit Note. Fixed value '03'. */
|
|
305
|
+
eInvoiceTypeCode: EInvoiceTypeCode;
|
|
306
|
+
/** Document reference number used by Supplier for internal tracking purpose. Max 50 chars. */
|
|
307
|
+
eInvoiceCodeOrNumber: string;
|
|
308
|
+
/** LHDNM Unique Identifier Number of the original invoice / document that is being adjusted. Mandatory where applicable (Debit/Credit/Refund notes). */
|
|
309
|
+
originalEInvoiceReferenceNumber: string;
|
|
310
|
+
/** Date of issuance (YYYY-MM-DD) in UTC. Must be the current date. */
|
|
311
|
+
eInvoiceDate: string;
|
|
312
|
+
/** Time of issuance (HH:mm:ssZ) in UTC. Must be the current time. */
|
|
313
|
+
eInvoiceTime: string;
|
|
314
|
+
|
|
315
|
+
/** Specific currency that is used to represent the monetary value stated in the e-Invoice. */
|
|
316
|
+
invoiceCurrencyCode: CurrencyCode;
|
|
317
|
+
/** Rate at which non-Malaysian currency will be converted into Malaysian Ringgit.
|
|
318
|
+
* Mandatory when invoiceCurrencyCode is not 'MYR'.
|
|
319
|
+
*/
|
|
320
|
+
currencyExchangeRate?: number;
|
|
321
|
+
|
|
322
|
+
/** Debit note line items (InvoiceLine section with required fields). */
|
|
323
|
+
debitNoteLineItems: InvoiceLineItem[];
|
|
324
|
+
|
|
325
|
+
/** Overall monetary totals for the debit note. */
|
|
326
|
+
legalMonetaryTotal: LegalMonetaryTotal;
|
|
327
|
+
/** Total tax amounts and subtotals. */
|
|
328
|
+
taxTotal: TaxTotal;
|
|
329
|
+
}
|
|
330
|
+
interface RefundNoteV1_1 {
|
|
331
|
+
/** Supplier information (AccountingSupplierParty). */
|
|
332
|
+
supplier: Supplier;
|
|
333
|
+
/** Buyer information (AccountingCustomerParty). */
|
|
334
|
+
buyer: Buyer;
|
|
335
|
+
|
|
336
|
+
/** e-Invoice version. Fixed value '1.1'. */
|
|
337
|
+
eInvoiceVersion: '1.1';
|
|
338
|
+
/** e-Invoice type code for Refund Note. Fixed value '04'. */
|
|
339
|
+
eInvoiceTypeCode: EInvoiceTypeCode;
|
|
340
|
+
/** Document reference number used by Supplier for internal tracking purpose. Max 50 chars. */
|
|
341
|
+
eInvoiceCodeOrNumber: string;
|
|
342
|
+
/** LHDNM Unique Identifier Number of the original invoice / document that is being adjusted. Mandatory where applicable (Debit/Credit/Refund notes). */
|
|
343
|
+
originalEInvoiceReferenceNumber: string;
|
|
344
|
+
/** Date of issuance (YYYY-MM-DD) in UTC. Must be the current date. */
|
|
345
|
+
eInvoiceDate: string;
|
|
346
|
+
/** Time of issuance (HH:mm:ssZ) in UTC. Must be the current time. */
|
|
347
|
+
eInvoiceTime: string;
|
|
348
|
+
|
|
349
|
+
/** Specific currency that is used to represent the monetary value stated in the e-Invoice. */
|
|
350
|
+
invoiceCurrencyCode: CurrencyCode;
|
|
351
|
+
/** Rate at which non-Malaysian currency will be converted into Malaysian Ringgit.
|
|
352
|
+
* Mandatory when invoiceCurrencyCode is not 'MYR'.
|
|
353
|
+
*/
|
|
354
|
+
currencyExchangeRate?: number;
|
|
355
|
+
|
|
356
|
+
/** Refund note line items. */
|
|
357
|
+
refundNoteLineItems: InvoiceLineItem[];
|
|
358
|
+
|
|
359
|
+
/** Overall monetary totals for the refund note. */
|
|
360
|
+
legalMonetaryTotal: LegalMonetaryTotal;
|
|
361
|
+
/** Total tax amounts and subtotals. */
|
|
362
|
+
taxTotal: TaxTotal;
|
|
363
|
+
}
|
|
364
|
+
interface SelfBilledInvoiceV1_1 {
|
|
365
|
+
/** Supplier information (AccountingSupplierParty). */
|
|
366
|
+
supplier: Supplier;
|
|
367
|
+
/** Buyer information (AccountingCustomerParty). */
|
|
368
|
+
buyer: Buyer;
|
|
369
|
+
|
|
370
|
+
/** e-Invoice version. Fixed value '1.1'. */
|
|
371
|
+
eInvoiceVersion: '1.1';
|
|
372
|
+
/** e-Invoice type code for Self-Billed Invoice. Fixed value '11'. */
|
|
373
|
+
eInvoiceTypeCode: EInvoiceTypeCode;
|
|
374
|
+
/** Document reference number used by Buyer (acting as issuer) for internal tracking purpose. Max 50 chars. */
|
|
375
|
+
eInvoiceCodeOrNumber: string;
|
|
376
|
+
/** Date of issuance (YYYY-MM-DD) in UTC. Must be the current date. */
|
|
377
|
+
eInvoiceDate: string;
|
|
378
|
+
/** Time of issuance (HH:mm:ssZ) in UTC. Must be the current time. */
|
|
379
|
+
eInvoiceTime: string;
|
|
380
|
+
|
|
381
|
+
/** Specific currency used to represent the monetary values stated in the e-Invoice. */
|
|
382
|
+
invoiceCurrencyCode: CurrencyCode;
|
|
383
|
+
/** Currency exchange rate to MYR when invoiceCurrencyCode is not 'MYR'. Mandatory where applicable. */
|
|
384
|
+
currencyExchangeRate?: number;
|
|
385
|
+
|
|
386
|
+
/** Frequency of billing (e.g., Daily, Monthly). Optional. */
|
|
387
|
+
frequencyOfBilling?: string;
|
|
388
|
+
/** Billing period start date (YYYY-MM-DD). Optional but allowed; include to match spec for optional elements. */
|
|
389
|
+
billingPeriodStartDate?: string;
|
|
390
|
+
/** Billing period end date (YYYY-MM-DD). Optional. */
|
|
391
|
+
billingPeriodEndDate?: string;
|
|
392
|
+
|
|
393
|
+
/** Invoice line items. */
|
|
394
|
+
invoiceLineItems: InvoiceLineItem[];
|
|
395
|
+
|
|
396
|
+
/** Overall monetary totals for the invoice. */
|
|
397
|
+
legalMonetaryTotal: LegalMonetaryTotal;
|
|
398
|
+
/** Total tax amounts and subtotals. */
|
|
399
|
+
taxTotal: TaxTotal;
|
|
400
|
+
}
|
|
401
|
+
interface SelfBilledCreditNoteV1_1 {
|
|
402
|
+
/** Supplier information. */
|
|
403
|
+
supplier: Supplier;
|
|
404
|
+
/** Buyer information. */
|
|
405
|
+
buyer: Buyer;
|
|
406
|
+
|
|
407
|
+
/** Fixed e-Invoice version '1.1'. */
|
|
408
|
+
eInvoiceVersion: '1.1';
|
|
409
|
+
/** e-Invoice type code for Self-Billed Credit Note (code '12'). */
|
|
410
|
+
eInvoiceTypeCode: EInvoiceTypeCode;
|
|
411
|
+
/** Internal document reference number issued by Buyer. Max 50 chars. */
|
|
412
|
+
eInvoiceCodeOrNumber: string;
|
|
413
|
+
/** LHDNM unique identifier of the original self-billed invoice being adjusted. */
|
|
414
|
+
originalEInvoiceReferenceNumber: string;
|
|
415
|
+
/** Date of issuance (YYYY-MM-DD, UTC). */
|
|
416
|
+
eInvoiceDate: string;
|
|
417
|
+
/** Time of issuance (HH:mm:ssZ, UTC). */
|
|
418
|
+
eInvoiceTime: string;
|
|
419
|
+
|
|
420
|
+
/** Currency code for monetary values. */
|
|
421
|
+
invoiceCurrencyCode: CurrencyCode;
|
|
422
|
+
/** Exchange rate to MYR – required when invoiceCurrencyCode ≠ 'MYR'. */
|
|
423
|
+
currencyExchangeRate?: number;
|
|
424
|
+
|
|
425
|
+
/** Line items for the credit note. */
|
|
426
|
+
selfBilledCreditNoteLineItems: InvoiceLineItem[];
|
|
427
|
+
|
|
428
|
+
/** Monetary totals. */
|
|
429
|
+
legalMonetaryTotal: LegalMonetaryTotal;
|
|
430
|
+
/** Tax totals. */
|
|
431
|
+
taxTotal: TaxTotal;
|
|
432
|
+
}
|
|
433
|
+
interface SelfBilledRefundNoteV1_1 {
|
|
434
|
+
/** Supplier information issued in the self-billed refund note. */
|
|
435
|
+
supplier: Supplier;
|
|
436
|
+
/** Buyer information (issuer of the self-billed document). */
|
|
437
|
+
buyer: Buyer;
|
|
438
|
+
|
|
439
|
+
/** Fixed e-Invoice version. */
|
|
440
|
+
eInvoiceVersion: '1.1';
|
|
441
|
+
/** e-Invoice type code for Self-Billed Refund Note (code '14'). */
|
|
442
|
+
eInvoiceTypeCode: EInvoiceTypeCode;
|
|
443
|
+
/** Internal tracking reference number. Max 50 chars. */
|
|
444
|
+
eInvoiceCodeOrNumber: string;
|
|
445
|
+
/** Original self-billed invoice UUID being adjusted (mandatory for refund/credit/debit). */
|
|
446
|
+
originalEInvoiceReferenceNumber: string;
|
|
447
|
+
/** Issue date (YYYY-MM-DD, UTC). */
|
|
448
|
+
eInvoiceDate: string;
|
|
449
|
+
/** Issue time (HH:mm:ssZ, UTC). */
|
|
450
|
+
eInvoiceTime: string;
|
|
451
|
+
|
|
452
|
+
/** Document currency code. */
|
|
453
|
+
invoiceCurrencyCode: CurrencyCode;
|
|
454
|
+
/** Exchange rate to MYR when currency ≠ 'MYR'. */
|
|
455
|
+
currencyExchangeRate?: number;
|
|
456
|
+
|
|
457
|
+
/** Line items contained in the refund note. */
|
|
458
|
+
selfBilledRefundNoteLineItems: InvoiceLineItem[];
|
|
459
|
+
|
|
460
|
+
/** Monetary totals for the document. */
|
|
461
|
+
legalMonetaryTotal: LegalMonetaryTotal;
|
|
462
|
+
/** Tax totals for the document. */
|
|
463
|
+
taxTotal: TaxTotal;
|
|
464
|
+
}
|
|
465
|
+
type AllDocumentsV1_1 = InvoiceV1_1 | CreditNoteV1_1 | DebitNoteV1_1 | RefundNoteV1_1 | SelfBilledInvoiceV1_1 | SelfBilledCreditNoteV1_1 | SelfBilledRefundNoteV1_1;
|
|
262
466
|
type SubmissionStatus = 'InProgress' | 'Valid' | 'PartiallyValid' | 'Invalid';
|
|
263
467
|
type DocumentStatus = 'Valid' | 'Invalid' | 'Cancelled' | 'Submitted';
|
|
264
468
|
type StandardError = {
|
|
@@ -665,28 +869,7 @@ interface InvoiceSubmission {
|
|
|
665
869
|
SignatureValue: {
|
|
666
870
|
_: string;
|
|
667
871
|
}[];
|
|
668
|
-
SignedInfo:
|
|
669
|
-
CanonicalizationMethod: {
|
|
670
|
-
_: string;
|
|
671
|
-
Algorithm: string;
|
|
672
|
-
}[];
|
|
673
|
-
SignatureMethod: {
|
|
674
|
-
_: string;
|
|
675
|
-
Algorithm: string;
|
|
676
|
-
}[];
|
|
677
|
-
Reference: {
|
|
678
|
-
Id: string;
|
|
679
|
-
Type: string;
|
|
680
|
-
URI: string;
|
|
681
|
-
DigestMethod: {
|
|
682
|
-
_: string;
|
|
683
|
-
Algorithm: string;
|
|
684
|
-
}[];
|
|
685
|
-
DigestValue: {
|
|
686
|
-
_: string;
|
|
687
|
-
}[];
|
|
688
|
-
}[];
|
|
689
|
-
}[];
|
|
872
|
+
SignedInfo: SignedInfoObject[];
|
|
690
873
|
}[];
|
|
691
874
|
}[];
|
|
692
875
|
}[];
|
|
@@ -703,6 +886,20 @@ interface InvoiceSubmission {
|
|
|
703
886
|
_: string;
|
|
704
887
|
}[];
|
|
705
888
|
}[];
|
|
889
|
+
|
|
890
|
+
/** Billing reference linking to original invoice (used for credit/debit/refund). Optional. */
|
|
891
|
+
BillingReference?: {
|
|
892
|
+
InvoiceDocumentReference: {
|
|
893
|
+
/** LHDNM Unique Identifier Number */
|
|
894
|
+
UUID: {
|
|
895
|
+
_: string;
|
|
896
|
+
}[];
|
|
897
|
+
/** Internal ID (e-Invoice Code/Number) */
|
|
898
|
+
ID: {
|
|
899
|
+
_: string;
|
|
900
|
+
}[];
|
|
901
|
+
}[];
|
|
902
|
+
}[];
|
|
706
903
|
}
|
|
707
904
|
|
|
708
905
|
/** Represents the complete UBL document structure with namespace declarations */
|
|
@@ -926,5 +1123,5 @@ interface DocumentTypeVersionResponse {
|
|
|
926
1123
|
activeTo: string;
|
|
927
1124
|
}
|
|
928
1125
|
//#endregion
|
|
929
|
-
export { Address, Buyer, CompleteInvoice, DocumentStatus, DocumentSummary, DocumentTypeResponse, DocumentTypeVersion, DocumentTypeVersionResponse, DocumentTypesResponse, DocumentValidationResult, DocumentValidationStepResult, FinalDocumentData, GetSubmissionResponse, InvoiceLineItem, InvoiceSubmission, InvoiceV1_1, LegalMonetaryTotal, RegistrationType, ResponseDocument, SignedInfoObject, SignedInvoiceSubmission, SignedPropertiesData, SignedPropertiesObject, SigningCredentials, StandardError, SubmissionResponse, SubmissionStatus, Supplier, TaxCategory, TaxSubtotal, TaxTotal, UBLDocument, WorkflowParameter };
|
|
930
|
-
//# sourceMappingURL=documents-
|
|
1126
|
+
export { Address, AllDocumentsV1_1, Buyer, CompleteInvoice, CreditNoteV1_1, DebitNoteV1_1, DocumentStatus, DocumentSummary, DocumentTypeResponse, DocumentTypeVersion, DocumentTypeVersionResponse, DocumentTypesResponse, DocumentValidationResult, DocumentValidationStepResult, FinalDocumentData, GetSubmissionResponse, InvoiceLineItem, InvoiceSubmission, InvoiceV1_1, LegalMonetaryTotal, RefundNoteV1_1, RegistrationType, ResponseDocument, SelfBilledCreditNoteV1_1, SelfBilledInvoiceV1_1, SelfBilledRefundNoteV1_1, SignedInfoObject, SignedInvoiceSubmission, SignedPropertiesData, SignedPropertiesObject, SigningCredentials, StandardError, SubmissionResponse, SubmissionStatus, Supplier, TaxCategory, TaxSubtotal, TaxTotal, UBLDocument, WorkflowParameter };
|
|
1127
|
+
//# sourceMappingURL=documents-BXxJLeMe.d.cts.map
|
|
@@ -259,6 +259,210 @@ interface InvoiceV1_1 {
|
|
|
259
259
|
/** Total tax amounts and subtotals. */
|
|
260
260
|
taxTotal: TaxTotal;
|
|
261
261
|
}
|
|
262
|
+
interface CreditNoteV1_1 {
|
|
263
|
+
/** Supplier information (AccountingSupplierParty). */
|
|
264
|
+
supplier: Supplier;
|
|
265
|
+
/** Buyer information (AccountingCustomerParty). */
|
|
266
|
+
buyer: Buyer;
|
|
267
|
+
|
|
268
|
+
/** e-Invoice version. Fixed value '1.1'. */
|
|
269
|
+
eInvoiceVersion: '1.1';
|
|
270
|
+
/** e-Invoice type code for Credit Note. Fixed value '02'. */
|
|
271
|
+
eInvoiceTypeCode: EInvoiceTypeCode;
|
|
272
|
+
/** Document reference number used by Supplier for internal tracking purpose. Max 50 chars. */
|
|
273
|
+
eInvoiceCodeOrNumber: string;
|
|
274
|
+
/** LHDNM Unique Identifier Number of the original invoice / document that is being adjusted. 26 chars. */
|
|
275
|
+
originalEInvoiceReferenceNumber: string;
|
|
276
|
+
/** Date of issuance (YYYY-MM-DD) in UTC. Must be the current date. */
|
|
277
|
+
eInvoiceDate: string;
|
|
278
|
+
/** Time of issuance (HH:mm:ssZ) in UTC. Must be the current time. */
|
|
279
|
+
eInvoiceTime: string;
|
|
280
|
+
|
|
281
|
+
/** Specific currency that is used to represent the monetary value stated in the e-Invoice. */
|
|
282
|
+
invoiceCurrencyCode: CurrencyCode;
|
|
283
|
+
/** Rate at which non-Malaysian currency will be converted into Malaysian Ringgit.
|
|
284
|
+
* Mandatory when invoiceCurrencyCode is not 'MYR'.
|
|
285
|
+
*/
|
|
286
|
+
currencyExchangeRate?: number;
|
|
287
|
+
|
|
288
|
+
/** Credit note line items. */
|
|
289
|
+
creditNoteLineItems: InvoiceLineItem[];
|
|
290
|
+
|
|
291
|
+
/** Overall monetary totals for the credit note. */
|
|
292
|
+
legalMonetaryTotal: LegalMonetaryTotal;
|
|
293
|
+
/** Total tax amounts and subtotals. */
|
|
294
|
+
taxTotal: TaxTotal;
|
|
295
|
+
}
|
|
296
|
+
interface DebitNoteV1_1 {
|
|
297
|
+
/** Supplier information (AccountingSupplierParty). */
|
|
298
|
+
supplier: Supplier;
|
|
299
|
+
/** Buyer information (AccountingCustomerParty). */
|
|
300
|
+
buyer: Buyer;
|
|
301
|
+
|
|
302
|
+
/** e-Invoice version. Fixed value '1.1'. */
|
|
303
|
+
eInvoiceVersion: '1.1';
|
|
304
|
+
/** e-Invoice type code for Debit Note. Fixed value '03'. */
|
|
305
|
+
eInvoiceTypeCode: EInvoiceTypeCode;
|
|
306
|
+
/** Document reference number used by Supplier for internal tracking purpose. Max 50 chars. */
|
|
307
|
+
eInvoiceCodeOrNumber: string;
|
|
308
|
+
/** LHDNM Unique Identifier Number of the original invoice / document that is being adjusted. Mandatory where applicable (Debit/Credit/Refund notes). */
|
|
309
|
+
originalEInvoiceReferenceNumber: string;
|
|
310
|
+
/** Date of issuance (YYYY-MM-DD) in UTC. Must be the current date. */
|
|
311
|
+
eInvoiceDate: string;
|
|
312
|
+
/** Time of issuance (HH:mm:ssZ) in UTC. Must be the current time. */
|
|
313
|
+
eInvoiceTime: string;
|
|
314
|
+
|
|
315
|
+
/** Specific currency that is used to represent the monetary value stated in the e-Invoice. */
|
|
316
|
+
invoiceCurrencyCode: CurrencyCode;
|
|
317
|
+
/** Rate at which non-Malaysian currency will be converted into Malaysian Ringgit.
|
|
318
|
+
* Mandatory when invoiceCurrencyCode is not 'MYR'.
|
|
319
|
+
*/
|
|
320
|
+
currencyExchangeRate?: number;
|
|
321
|
+
|
|
322
|
+
/** Debit note line items (InvoiceLine section with required fields). */
|
|
323
|
+
debitNoteLineItems: InvoiceLineItem[];
|
|
324
|
+
|
|
325
|
+
/** Overall monetary totals for the debit note. */
|
|
326
|
+
legalMonetaryTotal: LegalMonetaryTotal;
|
|
327
|
+
/** Total tax amounts and subtotals. */
|
|
328
|
+
taxTotal: TaxTotal;
|
|
329
|
+
}
|
|
330
|
+
interface RefundNoteV1_1 {
|
|
331
|
+
/** Supplier information (AccountingSupplierParty). */
|
|
332
|
+
supplier: Supplier;
|
|
333
|
+
/** Buyer information (AccountingCustomerParty). */
|
|
334
|
+
buyer: Buyer;
|
|
335
|
+
|
|
336
|
+
/** e-Invoice version. Fixed value '1.1'. */
|
|
337
|
+
eInvoiceVersion: '1.1';
|
|
338
|
+
/** e-Invoice type code for Refund Note. Fixed value '04'. */
|
|
339
|
+
eInvoiceTypeCode: EInvoiceTypeCode;
|
|
340
|
+
/** Document reference number used by Supplier for internal tracking purpose. Max 50 chars. */
|
|
341
|
+
eInvoiceCodeOrNumber: string;
|
|
342
|
+
/** LHDNM Unique Identifier Number of the original invoice / document that is being adjusted. Mandatory where applicable (Debit/Credit/Refund notes). */
|
|
343
|
+
originalEInvoiceReferenceNumber: string;
|
|
344
|
+
/** Date of issuance (YYYY-MM-DD) in UTC. Must be the current date. */
|
|
345
|
+
eInvoiceDate: string;
|
|
346
|
+
/** Time of issuance (HH:mm:ssZ) in UTC. Must be the current time. */
|
|
347
|
+
eInvoiceTime: string;
|
|
348
|
+
|
|
349
|
+
/** Specific currency that is used to represent the monetary value stated in the e-Invoice. */
|
|
350
|
+
invoiceCurrencyCode: CurrencyCode;
|
|
351
|
+
/** Rate at which non-Malaysian currency will be converted into Malaysian Ringgit.
|
|
352
|
+
* Mandatory when invoiceCurrencyCode is not 'MYR'.
|
|
353
|
+
*/
|
|
354
|
+
currencyExchangeRate?: number;
|
|
355
|
+
|
|
356
|
+
/** Refund note line items. */
|
|
357
|
+
refundNoteLineItems: InvoiceLineItem[];
|
|
358
|
+
|
|
359
|
+
/** Overall monetary totals for the refund note. */
|
|
360
|
+
legalMonetaryTotal: LegalMonetaryTotal;
|
|
361
|
+
/** Total tax amounts and subtotals. */
|
|
362
|
+
taxTotal: TaxTotal;
|
|
363
|
+
}
|
|
364
|
+
interface SelfBilledInvoiceV1_1 {
|
|
365
|
+
/** Supplier information (AccountingSupplierParty). */
|
|
366
|
+
supplier: Supplier;
|
|
367
|
+
/** Buyer information (AccountingCustomerParty). */
|
|
368
|
+
buyer: Buyer;
|
|
369
|
+
|
|
370
|
+
/** e-Invoice version. Fixed value '1.1'. */
|
|
371
|
+
eInvoiceVersion: '1.1';
|
|
372
|
+
/** e-Invoice type code for Self-Billed Invoice. Fixed value '11'. */
|
|
373
|
+
eInvoiceTypeCode: EInvoiceTypeCode;
|
|
374
|
+
/** Document reference number used by Buyer (acting as issuer) for internal tracking purpose. Max 50 chars. */
|
|
375
|
+
eInvoiceCodeOrNumber: string;
|
|
376
|
+
/** Date of issuance (YYYY-MM-DD) in UTC. Must be the current date. */
|
|
377
|
+
eInvoiceDate: string;
|
|
378
|
+
/** Time of issuance (HH:mm:ssZ) in UTC. Must be the current time. */
|
|
379
|
+
eInvoiceTime: string;
|
|
380
|
+
|
|
381
|
+
/** Specific currency used to represent the monetary values stated in the e-Invoice. */
|
|
382
|
+
invoiceCurrencyCode: CurrencyCode;
|
|
383
|
+
/** Currency exchange rate to MYR when invoiceCurrencyCode is not 'MYR'. Mandatory where applicable. */
|
|
384
|
+
currencyExchangeRate?: number;
|
|
385
|
+
|
|
386
|
+
/** Frequency of billing (e.g., Daily, Monthly). Optional. */
|
|
387
|
+
frequencyOfBilling?: string;
|
|
388
|
+
/** Billing period start date (YYYY-MM-DD). Optional but allowed; include to match spec for optional elements. */
|
|
389
|
+
billingPeriodStartDate?: string;
|
|
390
|
+
/** Billing period end date (YYYY-MM-DD). Optional. */
|
|
391
|
+
billingPeriodEndDate?: string;
|
|
392
|
+
|
|
393
|
+
/** Invoice line items. */
|
|
394
|
+
invoiceLineItems: InvoiceLineItem[];
|
|
395
|
+
|
|
396
|
+
/** Overall monetary totals for the invoice. */
|
|
397
|
+
legalMonetaryTotal: LegalMonetaryTotal;
|
|
398
|
+
/** Total tax amounts and subtotals. */
|
|
399
|
+
taxTotal: TaxTotal;
|
|
400
|
+
}
|
|
401
|
+
interface SelfBilledCreditNoteV1_1 {
|
|
402
|
+
/** Supplier information. */
|
|
403
|
+
supplier: Supplier;
|
|
404
|
+
/** Buyer information. */
|
|
405
|
+
buyer: Buyer;
|
|
406
|
+
|
|
407
|
+
/** Fixed e-Invoice version '1.1'. */
|
|
408
|
+
eInvoiceVersion: '1.1';
|
|
409
|
+
/** e-Invoice type code for Self-Billed Credit Note (code '12'). */
|
|
410
|
+
eInvoiceTypeCode: EInvoiceTypeCode;
|
|
411
|
+
/** Internal document reference number issued by Buyer. Max 50 chars. */
|
|
412
|
+
eInvoiceCodeOrNumber: string;
|
|
413
|
+
/** LHDNM unique identifier of the original self-billed invoice being adjusted. */
|
|
414
|
+
originalEInvoiceReferenceNumber: string;
|
|
415
|
+
/** Date of issuance (YYYY-MM-DD, UTC). */
|
|
416
|
+
eInvoiceDate: string;
|
|
417
|
+
/** Time of issuance (HH:mm:ssZ, UTC). */
|
|
418
|
+
eInvoiceTime: string;
|
|
419
|
+
|
|
420
|
+
/** Currency code for monetary values. */
|
|
421
|
+
invoiceCurrencyCode: CurrencyCode;
|
|
422
|
+
/** Exchange rate to MYR – required when invoiceCurrencyCode ≠ 'MYR'. */
|
|
423
|
+
currencyExchangeRate?: number;
|
|
424
|
+
|
|
425
|
+
/** Line items for the credit note. */
|
|
426
|
+
selfBilledCreditNoteLineItems: InvoiceLineItem[];
|
|
427
|
+
|
|
428
|
+
/** Monetary totals. */
|
|
429
|
+
legalMonetaryTotal: LegalMonetaryTotal;
|
|
430
|
+
/** Tax totals. */
|
|
431
|
+
taxTotal: TaxTotal;
|
|
432
|
+
}
|
|
433
|
+
interface SelfBilledRefundNoteV1_1 {
|
|
434
|
+
/** Supplier information issued in the self-billed refund note. */
|
|
435
|
+
supplier: Supplier;
|
|
436
|
+
/** Buyer information (issuer of the self-billed document). */
|
|
437
|
+
buyer: Buyer;
|
|
438
|
+
|
|
439
|
+
/** Fixed e-Invoice version. */
|
|
440
|
+
eInvoiceVersion: '1.1';
|
|
441
|
+
/** e-Invoice type code for Self-Billed Refund Note (code '14'). */
|
|
442
|
+
eInvoiceTypeCode: EInvoiceTypeCode;
|
|
443
|
+
/** Internal tracking reference number. Max 50 chars. */
|
|
444
|
+
eInvoiceCodeOrNumber: string;
|
|
445
|
+
/** Original self-billed invoice UUID being adjusted (mandatory for refund/credit/debit). */
|
|
446
|
+
originalEInvoiceReferenceNumber: string;
|
|
447
|
+
/** Issue date (YYYY-MM-DD, UTC). */
|
|
448
|
+
eInvoiceDate: string;
|
|
449
|
+
/** Issue time (HH:mm:ssZ, UTC). */
|
|
450
|
+
eInvoiceTime: string;
|
|
451
|
+
|
|
452
|
+
/** Document currency code. */
|
|
453
|
+
invoiceCurrencyCode: CurrencyCode;
|
|
454
|
+
/** Exchange rate to MYR when currency ≠ 'MYR'. */
|
|
455
|
+
currencyExchangeRate?: number;
|
|
456
|
+
|
|
457
|
+
/** Line items contained in the refund note. */
|
|
458
|
+
selfBilledRefundNoteLineItems: InvoiceLineItem[];
|
|
459
|
+
|
|
460
|
+
/** Monetary totals for the document. */
|
|
461
|
+
legalMonetaryTotal: LegalMonetaryTotal;
|
|
462
|
+
/** Tax totals for the document. */
|
|
463
|
+
taxTotal: TaxTotal;
|
|
464
|
+
}
|
|
465
|
+
type AllDocumentsV1_1 = InvoiceV1_1 | CreditNoteV1_1 | DebitNoteV1_1 | RefundNoteV1_1 | SelfBilledInvoiceV1_1 | SelfBilledCreditNoteV1_1 | SelfBilledRefundNoteV1_1;
|
|
262
466
|
type SubmissionStatus = 'InProgress' | 'Valid' | 'PartiallyValid' | 'Invalid';
|
|
263
467
|
type DocumentStatus = 'Valid' | 'Invalid' | 'Cancelled' | 'Submitted';
|
|
264
468
|
type StandardError = {
|
|
@@ -665,28 +869,7 @@ interface InvoiceSubmission {
|
|
|
665
869
|
SignatureValue: {
|
|
666
870
|
_: string;
|
|
667
871
|
}[];
|
|
668
|
-
SignedInfo:
|
|
669
|
-
CanonicalizationMethod: {
|
|
670
|
-
_: string;
|
|
671
|
-
Algorithm: string;
|
|
672
|
-
}[];
|
|
673
|
-
SignatureMethod: {
|
|
674
|
-
_: string;
|
|
675
|
-
Algorithm: string;
|
|
676
|
-
}[];
|
|
677
|
-
Reference: {
|
|
678
|
-
Id: string;
|
|
679
|
-
Type: string;
|
|
680
|
-
URI: string;
|
|
681
|
-
DigestMethod: {
|
|
682
|
-
_: string;
|
|
683
|
-
Algorithm: string;
|
|
684
|
-
}[];
|
|
685
|
-
DigestValue: {
|
|
686
|
-
_: string;
|
|
687
|
-
}[];
|
|
688
|
-
}[];
|
|
689
|
-
}[];
|
|
872
|
+
SignedInfo: SignedInfoObject[];
|
|
690
873
|
}[];
|
|
691
874
|
}[];
|
|
692
875
|
}[];
|
|
@@ -703,6 +886,20 @@ interface InvoiceSubmission {
|
|
|
703
886
|
_: string;
|
|
704
887
|
}[];
|
|
705
888
|
}[];
|
|
889
|
+
|
|
890
|
+
/** Billing reference linking to original invoice (used for credit/debit/refund). Optional. */
|
|
891
|
+
BillingReference?: {
|
|
892
|
+
InvoiceDocumentReference: {
|
|
893
|
+
/** LHDNM Unique Identifier Number */
|
|
894
|
+
UUID: {
|
|
895
|
+
_: string;
|
|
896
|
+
}[];
|
|
897
|
+
/** Internal ID (e-Invoice Code/Number) */
|
|
898
|
+
ID: {
|
|
899
|
+
_: string;
|
|
900
|
+
}[];
|
|
901
|
+
}[];
|
|
902
|
+
}[];
|
|
706
903
|
}
|
|
707
904
|
|
|
708
905
|
/** Represents the complete UBL document structure with namespace declarations */
|
|
@@ -926,4 +1123,4 @@ interface DocumentTypeVersionResponse {
|
|
|
926
1123
|
activeTo: string;
|
|
927
1124
|
}
|
|
928
1125
|
//#endregion
|
|
929
|
-
export { Address, Buyer, CompleteInvoice, DocumentStatus, DocumentSummary, DocumentTypeResponse, DocumentTypeVersion, DocumentTypeVersionResponse, DocumentTypesResponse, DocumentValidationResult, DocumentValidationStepResult, FinalDocumentData, GetSubmissionResponse, InvoiceLineItem, InvoiceSubmission, InvoiceV1_1, LegalMonetaryTotal, RegistrationType, ResponseDocument, SignedInfoObject, SignedInvoiceSubmission, SignedPropertiesData, SignedPropertiesObject, SigningCredentials, StandardError, SubmissionResponse, SubmissionStatus, Supplier, TaxCategory, TaxSubtotal, TaxTotal, UBLDocument, WorkflowParameter };
|
|
1126
|
+
export { Address, AllDocumentsV1_1, Buyer, CompleteInvoice, CreditNoteV1_1, DebitNoteV1_1, DocumentStatus, DocumentSummary, DocumentTypeResponse, DocumentTypeVersion, DocumentTypeVersionResponse, DocumentTypesResponse, DocumentValidationResult, DocumentValidationStepResult, FinalDocumentData, GetSubmissionResponse, InvoiceLineItem, InvoiceSubmission, InvoiceV1_1, LegalMonetaryTotal, RefundNoteV1_1, RegistrationType, ResponseDocument, SelfBilledCreditNoteV1_1, SelfBilledInvoiceV1_1, SelfBilledRefundNoteV1_1, SignedInfoObject, SignedInvoiceSubmission, SignedPropertiesData, SignedPropertiesObject, SigningCredentials, StandardError, SubmissionResponse, SubmissionStatus, Supplier, TaxCategory, TaxSubtotal, TaxTotal, UBLDocument, WorkflowParameter };
|
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const require_documentManagement = require('./documentManagement-DQ7JEcBq.cjs');
|
|
2
|
-
require('./document-
|
|
3
|
-
const require_documentSubmission = require('./documentSubmission-
|
|
2
|
+
require('./document-BgPF4b8T.cjs');
|
|
3
|
+
const require_documentSubmission = require('./documentSubmission-DTnOLqdW.cjs');
|
|
4
4
|
const require_documentTypeManagement = require('./documentTypeManagement-DXRLfTsW.cjs');
|
|
5
5
|
const require_notificationManagement = require('./notificationManagement-C_qrFwWL.cjs');
|
|
6
6
|
const require_platformLogin = require('./platformLogin-CPiPiVUh.cjs');
|
|
7
|
-
const require_taxpayerValidation = require('./taxpayerValidation-
|
|
7
|
+
const require_taxpayerValidation = require('./taxpayerValidation-BYaf78Qb.cjs');
|
|
8
8
|
const require_certificate = require('./certificate-CxsfE91s.cjs');
|
|
9
9
|
const require_getBaseUrl = require('./getBaseUrl-D2iJdUGL.cjs');
|
|
10
10
|
|