@ripwords/myinvois-client 0.2.34 → 0.2.35
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 +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 +2 -2
- package/dist/{documents-BWpJ0B3C.d.cts → documents-4B5YOXeb.d.cts} +2 -2
- package/dist/{documents-DRQ6_toX.d.ts → documents-ChNlyKB2.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index10.cjs +4 -24
- package/dist/index11.cjs +22 -0
- package/dist/index12.cjs +2 -33
- package/dist/index13.cjs +2 -23
- package/dist/index14.cjs +330 -0
- package/dist/{index29.cjs.map → index14.cjs.map} +1 -1
- package/dist/index15.cjs +193 -0
- package/dist/{index30.cjs.map → index15.cjs.map} +1 -1
- package/dist/index16.cjs +62 -0
- package/dist/index16.cjs.map +1 -0
- package/dist/index17.cjs +531 -4
- package/dist/index17.cjs.map +1 -0
- package/dist/index18.cjs +195 -6
- package/dist/index18.cjs.map +1 -0
- package/dist/index19.cjs +0 -5
- package/dist/index2.cjs +4 -61
- package/dist/index20.cjs +24 -2
- package/dist/index20.cjs.map +1 -0
- package/dist/index21.cjs +0 -3
- package/dist/index22.cjs +0 -6
- package/dist/index23.cjs +28 -3
- package/dist/index23.cjs.map +1 -0
- package/dist/index24.cjs +21 -9
- package/dist/index24.cjs.map +1 -1
- package/dist/index25.cjs +0 -5
- package/dist/index26.cjs +33 -21
- package/dist/{index12.cjs.map → index26.cjs.map} +1 -1
- package/dist/index27.cjs +23 -2
- package/dist/{index13.cjs.map → index27.cjs.map} +1 -1
- package/dist/index28.cjs +0 -3
- package/dist/index29.cjs +0 -330
- package/dist/index3.cjs +6 -531
- package/dist/index30.cjs +0 -193
- package/dist/index4.cjs +4 -195
- package/dist/index5.cjs +3 -0
- package/dist/index6.cjs +2 -24
- package/dist/index7.cjs +6 -0
- package/dist/index8.cjs +4 -0
- package/dist/index9.cjs +9 -25
- package/dist/index9.cjs.map +1 -1
- package/dist/{taxpayer-DtyHXKwz.d.ts → taxpayer-C9VMf0iv.d.ts} +1 -1
- package/dist/{taxpayer-CApK7x_O.d.cts → taxpayer-DubRo4qZ.d.cts} +2 -2
- package/dist/types/documents.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/taxpayer.d.ts +2 -2
- package/dist/utils/document.d.ts +2 -2
- package/dist/utils/signature-diagnostics.d.ts +2 -2
- package/dist/utils/validation.d.ts +2 -2
- package/package.json +1 -1
- package/dist/index10.cjs.map +0 -1
- package/dist/index2.cjs.map +0 -1
- package/dist/index3.cjs.map +0 -1
- package/dist/index4.cjs.map +0 -1
- package/dist/index6.cjs.map +0 -1
package/dist/index30.cjs
CHANGED
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/utils/validation.ts
|
|
3
|
-
/**
|
|
4
|
-
* Validates TIN format based on registration type
|
|
5
|
-
*/
|
|
6
|
-
const validateTIN = (tin, registrationType) => {
|
|
7
|
-
const errors = [];
|
|
8
|
-
if (!tin) {
|
|
9
|
-
errors.push({
|
|
10
|
-
field: "tin",
|
|
11
|
-
code: "TIN_REQUIRED",
|
|
12
|
-
message: "TIN is required",
|
|
13
|
-
severity: "error"
|
|
14
|
-
});
|
|
15
|
-
return errors;
|
|
16
|
-
}
|
|
17
|
-
if (registrationType === "BRN" && !tin.startsWith("C")) errors.push({
|
|
18
|
-
field: "tin",
|
|
19
|
-
code: "TIN_FORMAT_INVALID",
|
|
20
|
-
message: "Company TIN should start with \"C\" for BRN registration",
|
|
21
|
-
severity: "warning"
|
|
22
|
-
});
|
|
23
|
-
if (registrationType === "NRIC" && !tin.startsWith("IG")) errors.push({
|
|
24
|
-
field: "tin",
|
|
25
|
-
code: "TIN_FORMAT_INVALID",
|
|
26
|
-
message: "Individual TIN should start with \"IG\" for NRIC registration",
|
|
27
|
-
severity: "warning"
|
|
28
|
-
});
|
|
29
|
-
if (tin.length > 14) errors.push({
|
|
30
|
-
field: "tin",
|
|
31
|
-
code: "TIN_LENGTH_INVALID",
|
|
32
|
-
message: "TIN cannot exceed 14 characters",
|
|
33
|
-
severity: "error"
|
|
34
|
-
});
|
|
35
|
-
return errors;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* Validates contact number format (E.164 standard)
|
|
39
|
-
*/
|
|
40
|
-
const validateContactNumber = (contactNumber) => {
|
|
41
|
-
const errors = [];
|
|
42
|
-
if (!contactNumber || contactNumber === "NA") return errors;
|
|
43
|
-
const e164Regex = /^\+[1-9]\d{1,14}$/;
|
|
44
|
-
if (!e164Regex.test(contactNumber)) errors.push({
|
|
45
|
-
field: "contactNumber",
|
|
46
|
-
code: "CONTACT_FORMAT_INVALID",
|
|
47
|
-
message: "Contact number must be in E.164 format (e.g., +60123456789)",
|
|
48
|
-
severity: "error"
|
|
49
|
-
});
|
|
50
|
-
if (contactNumber.length < 8) errors.push({
|
|
51
|
-
field: "contactNumber",
|
|
52
|
-
code: "CONTACT_LENGTH_INVALID",
|
|
53
|
-
message: "Contact number must be at least 8 characters",
|
|
54
|
-
severity: "error"
|
|
55
|
-
});
|
|
56
|
-
return errors;
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Validates monetary amounts
|
|
60
|
-
*/
|
|
61
|
-
const validateMonetaryAmount = (amount, fieldName, maxDigits = 18, maxDecimals = 2) => {
|
|
62
|
-
const errors = [];
|
|
63
|
-
if (amount < 0) errors.push({
|
|
64
|
-
field: fieldName,
|
|
65
|
-
code: "AMOUNT_NEGATIVE",
|
|
66
|
-
message: `${fieldName} cannot be negative`,
|
|
67
|
-
severity: "error"
|
|
68
|
-
});
|
|
69
|
-
const amountStr = amount.toString();
|
|
70
|
-
const [integerPart, decimalPart] = amountStr.split(".");
|
|
71
|
-
if (integerPart && integerPart.length > maxDigits - maxDecimals) errors.push({
|
|
72
|
-
field: fieldName,
|
|
73
|
-
code: "AMOUNT_DIGITS_EXCEEDED",
|
|
74
|
-
message: `${fieldName} exceeds maximum ${maxDigits} digits`,
|
|
75
|
-
severity: "error"
|
|
76
|
-
});
|
|
77
|
-
if (decimalPart && decimalPart.length > maxDecimals) errors.push({
|
|
78
|
-
field: fieldName,
|
|
79
|
-
code: "AMOUNT_DECIMALS_EXCEEDED",
|
|
80
|
-
message: `${fieldName} exceeds maximum ${maxDecimals} decimal places`,
|
|
81
|
-
severity: "error"
|
|
82
|
-
});
|
|
83
|
-
return errors;
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Validates line item tax calculation consistency for both fixed rate and percentage taxation
|
|
87
|
-
*/
|
|
88
|
-
const validateLineItemTax = (item, index) => {
|
|
89
|
-
const errors = [];
|
|
90
|
-
const tolerance = .01;
|
|
91
|
-
const hasFixedRate = item.taxPerUnitAmount !== void 0 && item.baseUnitMeasure !== void 0;
|
|
92
|
-
const hasPercentageRate = item.taxRate !== void 0;
|
|
93
|
-
if (!hasFixedRate && !hasPercentageRate) {
|
|
94
|
-
errors.push({
|
|
95
|
-
field: `lineItem[${index}]`,
|
|
96
|
-
code: "TAX_METHOD_MISSING",
|
|
97
|
-
message: `Line item ${index + 1} must specify either taxRate (for percentage) or taxPerUnitAmount + baseUnitMeasure (for fixed rate)`,
|
|
98
|
-
severity: "error"
|
|
99
|
-
});
|
|
100
|
-
return errors;
|
|
101
|
-
}
|
|
102
|
-
if (hasFixedRate && hasPercentageRate) errors.push({
|
|
103
|
-
field: `lineItem[${index}]`,
|
|
104
|
-
code: "TAX_METHOD_CONFLICT",
|
|
105
|
-
message: `Line item ${index + 1} cannot have both percentage and fixed rate tax methods`,
|
|
106
|
-
severity: "error"
|
|
107
|
-
});
|
|
108
|
-
if (hasFixedRate) {
|
|
109
|
-
if (item.baseUnitMeasureCode === void 0) errors.push({
|
|
110
|
-
field: `lineItem[${index}].baseUnitMeasureCode`,
|
|
111
|
-
code: "UNIT_CODE_MISSING",
|
|
112
|
-
message: `Line item ${index + 1} with fixed rate tax must specify baseUnitMeasureCode`,
|
|
113
|
-
severity: "error"
|
|
114
|
-
});
|
|
115
|
-
const expectedTaxAmount = item.taxPerUnitAmount * item.baseUnitMeasure;
|
|
116
|
-
if (Math.abs(item.taxAmount - expectedTaxAmount) > tolerance) errors.push({
|
|
117
|
-
field: `lineItem[${index}].taxAmount`,
|
|
118
|
-
code: "FIXED_TAX_CALCULATION_MISMATCH",
|
|
119
|
-
message: `Line item ${index + 1} tax amount (${item.taxAmount}) doesn't match fixed rate calculation (${item.taxPerUnitAmount} × ${item.baseUnitMeasure} = ${expectedTaxAmount})`,
|
|
120
|
-
severity: "error"
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
if (hasPercentageRate && !hasFixedRate) {
|
|
124
|
-
const expectedTaxAmount = item.totalTaxableAmountPerLine * item.taxRate / 100;
|
|
125
|
-
if (Math.abs(item.taxAmount - expectedTaxAmount) > tolerance) errors.push({
|
|
126
|
-
field: `lineItem[${index}].taxAmount`,
|
|
127
|
-
code: "PERCENTAGE_TAX_CALCULATION_MISMATCH",
|
|
128
|
-
message: `Line item ${index + 1} tax amount (${item.taxAmount}) doesn't match percentage calculation (${item.totalTaxableAmountPerLine} × ${item.taxRate}% = ${expectedTaxAmount})`,
|
|
129
|
-
severity: "error"
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
return errors;
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* Validates tax calculation consistency
|
|
136
|
-
*/
|
|
137
|
-
const validateTaxCalculations = (invoice) => {
|
|
138
|
-
const errors = [];
|
|
139
|
-
invoice.invoiceLineItems.forEach((item, index) => {
|
|
140
|
-
errors.push(...validateLineItemTax(item, index));
|
|
141
|
-
});
|
|
142
|
-
const expectedTaxExclusive = invoice.invoiceLineItems.reduce((sum, item) => sum + item.totalTaxableAmountPerLine, 0);
|
|
143
|
-
const expectedTaxAmount = invoice.invoiceLineItems.reduce((sum, item) => sum + item.taxAmount, 0);
|
|
144
|
-
const tolerance = .01;
|
|
145
|
-
if (Math.abs(invoice.legalMonetaryTotal.taxExclusiveAmount - expectedTaxExclusive) > tolerance) errors.push({
|
|
146
|
-
field: "legalMonetaryTotal.taxExclusiveAmount",
|
|
147
|
-
code: "TAX_EXCLUSIVE_MISMATCH",
|
|
148
|
-
message: `Tax exclusive amount (${invoice.legalMonetaryTotal.taxExclusiveAmount}) doesn't match sum of line items (${expectedTaxExclusive})`,
|
|
149
|
-
severity: "error"
|
|
150
|
-
});
|
|
151
|
-
if (Math.abs(invoice.taxTotal.taxAmount - expectedTaxAmount) > tolerance) errors.push({
|
|
152
|
-
field: "taxTotal.taxAmount",
|
|
153
|
-
code: "TAX_AMOUNT_MISMATCH",
|
|
154
|
-
message: `Tax amount (${invoice.taxTotal.taxAmount}) doesn't match sum of line item taxes (${expectedTaxAmount})`,
|
|
155
|
-
severity: "error"
|
|
156
|
-
});
|
|
157
|
-
return errors;
|
|
158
|
-
};
|
|
159
|
-
/**
|
|
160
|
-
* Main validation function for complete invoice
|
|
161
|
-
*/
|
|
162
|
-
const validateInvoice = (invoice) => {
|
|
163
|
-
const allErrors = [];
|
|
164
|
-
allErrors.push(...validateTIN(invoice.supplier.tin, invoice.supplier.registrationType));
|
|
165
|
-
allErrors.push(...validateTIN(invoice.buyer.tin, invoice.buyer.registrationType));
|
|
166
|
-
allErrors.push(...validateContactNumber(invoice.supplier.contactNumber));
|
|
167
|
-
allErrors.push(...validateContactNumber(invoice.buyer.contactNumber));
|
|
168
|
-
allErrors.push(...validateMonetaryAmount(invoice.legalMonetaryTotal.taxExclusiveAmount, "taxExclusiveAmount"));
|
|
169
|
-
allErrors.push(...validateMonetaryAmount(invoice.legalMonetaryTotal.payableAmount, "payableAmount"));
|
|
170
|
-
allErrors.push(...validateMonetaryAmount(invoice.taxTotal.taxAmount, "taxAmount"));
|
|
171
|
-
invoice.invoiceLineItems.forEach((item, index) => {
|
|
172
|
-
allErrors.push(...validateMonetaryAmount(item.unitPrice, `lineItem[${index}].unitPrice`));
|
|
173
|
-
allErrors.push(...validateMonetaryAmount(item.taxAmount, `lineItem[${index}].taxAmount`));
|
|
174
|
-
allErrors.push(...validateMonetaryAmount(item.totalTaxableAmountPerLine, `lineItem[${index}].totalTaxableAmountPerLine`));
|
|
175
|
-
});
|
|
176
|
-
allErrors.push(...validateTaxCalculations(invoice));
|
|
177
|
-
const errors = allErrors.filter((e) => e.severity === "error");
|
|
178
|
-
const warnings = allErrors.filter((e) => e.severity === "warning");
|
|
179
|
-
return {
|
|
180
|
-
isValid: errors.length === 0,
|
|
181
|
-
errors,
|
|
182
|
-
warnings
|
|
183
|
-
};
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
//#endregion
|
|
187
|
-
exports.validateContactNumber = validateContactNumber;
|
|
188
|
-
exports.validateInvoice = validateInvoice;
|
|
189
|
-
exports.validateLineItemTax = validateLineItemTax;
|
|
190
|
-
exports.validateMonetaryAmount = validateMonetaryAmount;
|
|
191
|
-
exports.validateTIN = validateTIN;
|
|
192
|
-
exports.validateTaxCalculations = validateTaxCalculations;
|
|
193
|
-
//# sourceMappingURL=index30.cjs.map
|
package/dist/index4.cjs
CHANGED
|
@@ -1,196 +1,5 @@
|
|
|
1
|
+
const require_documentTypeManagement = require('./documentTypeManagement-D_-LiQVg.cjs');
|
|
1
2
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* Provides a more readable way to reference currency codes.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* const currency = CurrencyCodeEnum.MYR;
|
|
9
|
-
* console.log(currency); // Output: "MYR"
|
|
10
|
-
*/
|
|
11
|
-
let CurrencyCodeEnum = /* @__PURE__ */ function(CurrencyCodeEnum$1) {
|
|
12
|
-
CurrencyCodeEnum$1["AED"] = "AED";
|
|
13
|
-
CurrencyCodeEnum$1["AFN"] = "AFN";
|
|
14
|
-
CurrencyCodeEnum$1["ALL"] = "ALL";
|
|
15
|
-
CurrencyCodeEnum$1["AMD"] = "AMD";
|
|
16
|
-
CurrencyCodeEnum$1["ANG"] = "ANG";
|
|
17
|
-
CurrencyCodeEnum$1["AOA"] = "AOA";
|
|
18
|
-
CurrencyCodeEnum$1["ARS"] = "ARS";
|
|
19
|
-
CurrencyCodeEnum$1["AUD"] = "AUD";
|
|
20
|
-
CurrencyCodeEnum$1["AWG"] = "AWG";
|
|
21
|
-
CurrencyCodeEnum$1["AZN"] = "AZN";
|
|
22
|
-
CurrencyCodeEnum$1["BAM"] = "BAM";
|
|
23
|
-
CurrencyCodeEnum$1["BBD"] = "BBD";
|
|
24
|
-
CurrencyCodeEnum$1["BDT"] = "BDT";
|
|
25
|
-
CurrencyCodeEnum$1["BGN"] = "BGN";
|
|
26
|
-
CurrencyCodeEnum$1["BHD"] = "BHD";
|
|
27
|
-
CurrencyCodeEnum$1["BIF"] = "BIF";
|
|
28
|
-
CurrencyCodeEnum$1["BMD"] = "BMD";
|
|
29
|
-
CurrencyCodeEnum$1["BND"] = "BND";
|
|
30
|
-
CurrencyCodeEnum$1["BOB"] = "BOB";
|
|
31
|
-
CurrencyCodeEnum$1["BOV"] = "BOV";
|
|
32
|
-
CurrencyCodeEnum$1["BRL"] = "BRL";
|
|
33
|
-
CurrencyCodeEnum$1["BSD"] = "BSD";
|
|
34
|
-
CurrencyCodeEnum$1["BTN"] = "BTN";
|
|
35
|
-
CurrencyCodeEnum$1["BWP"] = "BWP";
|
|
36
|
-
CurrencyCodeEnum$1["BYN"] = "BYN";
|
|
37
|
-
CurrencyCodeEnum$1["BZD"] = "BZD";
|
|
38
|
-
CurrencyCodeEnum$1["CAD"] = "CAD";
|
|
39
|
-
CurrencyCodeEnum$1["CDF"] = "CDF";
|
|
40
|
-
CurrencyCodeEnum$1["CHE"] = "CHE";
|
|
41
|
-
CurrencyCodeEnum$1["CHF"] = "CHF";
|
|
42
|
-
CurrencyCodeEnum$1["CHW"] = "CHW";
|
|
43
|
-
CurrencyCodeEnum$1["CLF"] = "CLF";
|
|
44
|
-
CurrencyCodeEnum$1["CLP"] = "CLP";
|
|
45
|
-
CurrencyCodeEnum$1["CNY"] = "CNY";
|
|
46
|
-
CurrencyCodeEnum$1["COP"] = "COP";
|
|
47
|
-
CurrencyCodeEnum$1["COU"] = "COU";
|
|
48
|
-
CurrencyCodeEnum$1["CRC"] = "CRC";
|
|
49
|
-
CurrencyCodeEnum$1["CUC"] = "CUC";
|
|
50
|
-
CurrencyCodeEnum$1["CUP"] = "CUP";
|
|
51
|
-
CurrencyCodeEnum$1["CVE"] = "CVE";
|
|
52
|
-
CurrencyCodeEnum$1["CZK"] = "CZK";
|
|
53
|
-
CurrencyCodeEnum$1["DJF"] = "DJF";
|
|
54
|
-
CurrencyCodeEnum$1["DKK"] = "DKK";
|
|
55
|
-
CurrencyCodeEnum$1["DOP"] = "DOP";
|
|
56
|
-
CurrencyCodeEnum$1["DZD"] = "DZD";
|
|
57
|
-
CurrencyCodeEnum$1["EGP"] = "EGP";
|
|
58
|
-
CurrencyCodeEnum$1["ERN"] = "ERN";
|
|
59
|
-
CurrencyCodeEnum$1["ETB"] = "ETB";
|
|
60
|
-
CurrencyCodeEnum$1["EUR"] = "EUR";
|
|
61
|
-
CurrencyCodeEnum$1["FJD"] = "FJD";
|
|
62
|
-
CurrencyCodeEnum$1["FKP"] = "FKP";
|
|
63
|
-
CurrencyCodeEnum$1["GBP"] = "GBP";
|
|
64
|
-
CurrencyCodeEnum$1["GEL"] = "GEL";
|
|
65
|
-
CurrencyCodeEnum$1["GHS"] = "GHS";
|
|
66
|
-
CurrencyCodeEnum$1["GIP"] = "GIP";
|
|
67
|
-
CurrencyCodeEnum$1["GMD"] = "GMD";
|
|
68
|
-
CurrencyCodeEnum$1["GNF"] = "GNF";
|
|
69
|
-
CurrencyCodeEnum$1["GTQ"] = "GTQ";
|
|
70
|
-
CurrencyCodeEnum$1["GYD"] = "GYD";
|
|
71
|
-
CurrencyCodeEnum$1["HKD"] = "HKD";
|
|
72
|
-
CurrencyCodeEnum$1["HNL"] = "HNL";
|
|
73
|
-
CurrencyCodeEnum$1["HRK"] = "HRK";
|
|
74
|
-
CurrencyCodeEnum$1["HTG"] = "HTG";
|
|
75
|
-
CurrencyCodeEnum$1["HUF"] = "HUF";
|
|
76
|
-
CurrencyCodeEnum$1["IDR"] = "IDR";
|
|
77
|
-
CurrencyCodeEnum$1["ILS"] = "ILS";
|
|
78
|
-
CurrencyCodeEnum$1["INR"] = "INR";
|
|
79
|
-
CurrencyCodeEnum$1["IQD"] = "IQD";
|
|
80
|
-
CurrencyCodeEnum$1["IRR"] = "IRR";
|
|
81
|
-
CurrencyCodeEnum$1["ISK"] = "ISK";
|
|
82
|
-
CurrencyCodeEnum$1["JMD"] = "JMD";
|
|
83
|
-
CurrencyCodeEnum$1["JOD"] = "JOD";
|
|
84
|
-
CurrencyCodeEnum$1["JPY"] = "JPY";
|
|
85
|
-
CurrencyCodeEnum$1["KES"] = "KES";
|
|
86
|
-
CurrencyCodeEnum$1["KGS"] = "KGS";
|
|
87
|
-
CurrencyCodeEnum$1["KHR"] = "KHR";
|
|
88
|
-
CurrencyCodeEnum$1["KMF"] = "KMF";
|
|
89
|
-
CurrencyCodeEnum$1["KPW"] = "KPW";
|
|
90
|
-
CurrencyCodeEnum$1["KRW"] = "KRW";
|
|
91
|
-
CurrencyCodeEnum$1["KWD"] = "KWD";
|
|
92
|
-
CurrencyCodeEnum$1["KYD"] = "KYD";
|
|
93
|
-
CurrencyCodeEnum$1["KZT"] = "KZT";
|
|
94
|
-
CurrencyCodeEnum$1["LAK"] = "LAK";
|
|
95
|
-
CurrencyCodeEnum$1["LBP"] = "LBP";
|
|
96
|
-
CurrencyCodeEnum$1["LKR"] = "LKR";
|
|
97
|
-
CurrencyCodeEnum$1["LRD"] = "LRD";
|
|
98
|
-
CurrencyCodeEnum$1["LSL"] = "LSL";
|
|
99
|
-
CurrencyCodeEnum$1["LYD"] = "LYD";
|
|
100
|
-
CurrencyCodeEnum$1["MAD"] = "MAD";
|
|
101
|
-
CurrencyCodeEnum$1["MDL"] = "MDL";
|
|
102
|
-
CurrencyCodeEnum$1["MGA"] = "MGA";
|
|
103
|
-
CurrencyCodeEnum$1["MKD"] = "MKD";
|
|
104
|
-
CurrencyCodeEnum$1["MMK"] = "MMK";
|
|
105
|
-
CurrencyCodeEnum$1["MNT"] = "MNT";
|
|
106
|
-
CurrencyCodeEnum$1["MOP"] = "MOP";
|
|
107
|
-
CurrencyCodeEnum$1["MRU"] = "MRU";
|
|
108
|
-
CurrencyCodeEnum$1["MUR"] = "MUR";
|
|
109
|
-
CurrencyCodeEnum$1["MVR"] = "MVR";
|
|
110
|
-
CurrencyCodeEnum$1["MWK"] = "MWK";
|
|
111
|
-
CurrencyCodeEnum$1["MXN"] = "MXN";
|
|
112
|
-
CurrencyCodeEnum$1["MXV"] = "MXV";
|
|
113
|
-
CurrencyCodeEnum$1["MYR"] = "MYR";
|
|
114
|
-
CurrencyCodeEnum$1["MZN"] = "MZN";
|
|
115
|
-
CurrencyCodeEnum$1["NAD"] = "NAD";
|
|
116
|
-
CurrencyCodeEnum$1["NGN"] = "NGN";
|
|
117
|
-
CurrencyCodeEnum$1["NIO"] = "NIO";
|
|
118
|
-
CurrencyCodeEnum$1["NOK"] = "NOK";
|
|
119
|
-
CurrencyCodeEnum$1["NPR"] = "NPR";
|
|
120
|
-
CurrencyCodeEnum$1["NZD"] = "NZD";
|
|
121
|
-
CurrencyCodeEnum$1["OMR"] = "OMR";
|
|
122
|
-
CurrencyCodeEnum$1["PAB"] = "PAB";
|
|
123
|
-
CurrencyCodeEnum$1["PEN"] = "PEN";
|
|
124
|
-
CurrencyCodeEnum$1["PGK"] = "PGK";
|
|
125
|
-
CurrencyCodeEnum$1["PHP"] = "PHP";
|
|
126
|
-
CurrencyCodeEnum$1["PKR"] = "PKR";
|
|
127
|
-
CurrencyCodeEnum$1["PLN"] = "PLN";
|
|
128
|
-
CurrencyCodeEnum$1["PYG"] = "PYG";
|
|
129
|
-
CurrencyCodeEnum$1["QAR"] = "QAR";
|
|
130
|
-
CurrencyCodeEnum$1["RON"] = "RON";
|
|
131
|
-
CurrencyCodeEnum$1["RSD"] = "RSD";
|
|
132
|
-
CurrencyCodeEnum$1["RUB"] = "RUB";
|
|
133
|
-
CurrencyCodeEnum$1["RWF"] = "RWF";
|
|
134
|
-
CurrencyCodeEnum$1["SAR"] = "SAR";
|
|
135
|
-
CurrencyCodeEnum$1["SBD"] = "SBD";
|
|
136
|
-
CurrencyCodeEnum$1["SCR"] = "SCR";
|
|
137
|
-
CurrencyCodeEnum$1["SDG"] = "SDG";
|
|
138
|
-
CurrencyCodeEnum$1["SEK"] = "SEK";
|
|
139
|
-
CurrencyCodeEnum$1["SGD"] = "SGD";
|
|
140
|
-
CurrencyCodeEnum$1["SHP"] = "SHP";
|
|
141
|
-
CurrencyCodeEnum$1["SLL"] = "SLL";
|
|
142
|
-
CurrencyCodeEnum$1["SOS"] = "SOS";
|
|
143
|
-
CurrencyCodeEnum$1["SRD"] = "SRD";
|
|
144
|
-
CurrencyCodeEnum$1["SSP"] = "SSP";
|
|
145
|
-
CurrencyCodeEnum$1["STN"] = "STN";
|
|
146
|
-
CurrencyCodeEnum$1["SVC"] = "SVC";
|
|
147
|
-
CurrencyCodeEnum$1["SYP"] = "SYP";
|
|
148
|
-
CurrencyCodeEnum$1["SZL"] = "SZL";
|
|
149
|
-
CurrencyCodeEnum$1["THB"] = "THB";
|
|
150
|
-
CurrencyCodeEnum$1["TJS"] = "TJS";
|
|
151
|
-
CurrencyCodeEnum$1["TMT"] = "TMT";
|
|
152
|
-
CurrencyCodeEnum$1["TND"] = "TND";
|
|
153
|
-
CurrencyCodeEnum$1["TOP"] = "TOP";
|
|
154
|
-
CurrencyCodeEnum$1["TRY"] = "TRY";
|
|
155
|
-
CurrencyCodeEnum$1["TTD"] = "TTD";
|
|
156
|
-
CurrencyCodeEnum$1["TWD"] = "TWD";
|
|
157
|
-
CurrencyCodeEnum$1["TZS"] = "TZS";
|
|
158
|
-
CurrencyCodeEnum$1["UAH"] = "UAH";
|
|
159
|
-
CurrencyCodeEnum$1["UGX"] = "UGX";
|
|
160
|
-
CurrencyCodeEnum$1["USD"] = "USD";
|
|
161
|
-
CurrencyCodeEnum$1["USN"] = "USN";
|
|
162
|
-
CurrencyCodeEnum$1["UYI"] = "UYI";
|
|
163
|
-
CurrencyCodeEnum$1["UYU"] = "UYU";
|
|
164
|
-
CurrencyCodeEnum$1["UYW"] = "UYW";
|
|
165
|
-
CurrencyCodeEnum$1["UZS"] = "UZS";
|
|
166
|
-
CurrencyCodeEnum$1["VED"] = "VED";
|
|
167
|
-
CurrencyCodeEnum$1["VES"] = "VES";
|
|
168
|
-
CurrencyCodeEnum$1["VND"] = "VND";
|
|
169
|
-
CurrencyCodeEnum$1["VUV"] = "VUV";
|
|
170
|
-
CurrencyCodeEnum$1["WST"] = "WST";
|
|
171
|
-
CurrencyCodeEnum$1["XAF"] = "XAF";
|
|
172
|
-
CurrencyCodeEnum$1["XAG"] = "XAG";
|
|
173
|
-
CurrencyCodeEnum$1["XAU"] = "XAU";
|
|
174
|
-
CurrencyCodeEnum$1["XBA"] = "XBA";
|
|
175
|
-
CurrencyCodeEnum$1["XBB"] = "XBB";
|
|
176
|
-
CurrencyCodeEnum$1["XBC"] = "XBC";
|
|
177
|
-
CurrencyCodeEnum$1["XBD"] = "XBD";
|
|
178
|
-
CurrencyCodeEnum$1["XCD"] = "XCD";
|
|
179
|
-
CurrencyCodeEnum$1["XDR"] = "XDR";
|
|
180
|
-
CurrencyCodeEnum$1["XOF"] = "XOF";
|
|
181
|
-
CurrencyCodeEnum$1["XPD"] = "XPD";
|
|
182
|
-
CurrencyCodeEnum$1["XPF"] = "XPF";
|
|
183
|
-
CurrencyCodeEnum$1["XPT"] = "XPT";
|
|
184
|
-
CurrencyCodeEnum$1["XSU"] = "XSU";
|
|
185
|
-
CurrencyCodeEnum$1["XUA"] = "XUA";
|
|
186
|
-
CurrencyCodeEnum$1["XXX"] = "XXX";
|
|
187
|
-
CurrencyCodeEnum$1["YER"] = "YER";
|
|
188
|
-
CurrencyCodeEnum$1["ZAR"] = "ZAR";
|
|
189
|
-
CurrencyCodeEnum$1["ZMW"] = "ZMW";
|
|
190
|
-
CurrencyCodeEnum$1["ZWL"] = "ZWL";
|
|
191
|
-
return CurrencyCodeEnum$1;
|
|
192
|
-
}({});
|
|
193
|
-
|
|
194
|
-
//#endregion
|
|
195
|
-
exports.CurrencyCodeEnum = CurrencyCodeEnum;
|
|
196
|
-
//# sourceMappingURL=index4.cjs.map
|
|
3
|
+
exports.getDocumentType = require_documentTypeManagement.getDocumentType;
|
|
4
|
+
exports.getDocumentTypeVersion = require_documentTypeManagement.getDocumentTypeVersion;
|
|
5
|
+
exports.getDocumentTypes = require_documentTypeManagement.getDocumentTypes;
|
package/dist/index5.cjs
CHANGED
package/dist/index6.cjs
CHANGED
|
@@ -1,25 +1,3 @@
|
|
|
1
|
+
const require_platformLogin = require('./platformLogin-Ch6hFKoU.cjs');
|
|
1
2
|
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Enum representing the allowed codes for e-Invoice types with descriptive names.
|
|
5
|
-
* Provides a more readable way to reference e-Invoice types compared to using raw codes.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* const invoiceCode = EInvoiceTypeCodeEnum.Invoice;
|
|
9
|
-
* console.log(invoiceCode); // Output: "01"
|
|
10
|
-
*/
|
|
11
|
-
let EInvoiceTypeCodeEnum = /* @__PURE__ */ function(EInvoiceTypeCodeEnum$1) {
|
|
12
|
-
EInvoiceTypeCodeEnum$1["Invoice"] = "01";
|
|
13
|
-
EInvoiceTypeCodeEnum$1["CreditNote"] = "02";
|
|
14
|
-
EInvoiceTypeCodeEnum$1["DebitNote"] = "03";
|
|
15
|
-
EInvoiceTypeCodeEnum$1["RefundNote"] = "04";
|
|
16
|
-
EInvoiceTypeCodeEnum$1["SelfBilledInvoice"] = "11";
|
|
17
|
-
EInvoiceTypeCodeEnum$1["SelfBilledCreditNote"] = "12";
|
|
18
|
-
EInvoiceTypeCodeEnum$1["SelfBilledDebitNote"] = "13";
|
|
19
|
-
EInvoiceTypeCodeEnum$1["SelfBilledRefundNote"] = "14";
|
|
20
|
-
return EInvoiceTypeCodeEnum$1;
|
|
21
|
-
}({});
|
|
22
|
-
|
|
23
|
-
//#endregion
|
|
24
|
-
exports.EInvoiceTypeCodeEnum = EInvoiceTypeCodeEnum;
|
|
25
|
-
//# sourceMappingURL=index6.cjs.map
|
|
3
|
+
exports.platformLogin = require_platformLogin.platformLogin;
|
package/dist/index7.cjs
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
require('./formatIdValue-i67o4kyD.cjs');
|
|
2
|
+
const require_taxpayerValidation = require('./taxpayerValidation-D_jGaVty.cjs');
|
|
3
|
+
|
|
4
|
+
exports.taxpayerQRCode = require_taxpayerValidation.taxpayerQRCode;
|
|
5
|
+
exports.tinSearch = require_taxpayerValidation.tinSearch;
|
|
6
|
+
exports.verifyTin = require_taxpayerValidation.verifyTin;
|
package/dist/index8.cjs
CHANGED
package/dist/index9.cjs
CHANGED
|
@@ -1,29 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
//#region src/
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
NotificationTypeEnum$1[NotificationTypeEnum$1["Taxpayer profile changed"] = 11] = "Taxpayer profile changed";
|
|
10
|
-
NotificationTypeEnum$1[NotificationTypeEnum$1["Document rejection initiated"] = 15] = "Document rejection initiated";
|
|
11
|
-
NotificationTypeEnum$1[NotificationTypeEnum$1["ERP data validation"] = 26] = "ERP data validation";
|
|
12
|
-
NotificationTypeEnum$1[NotificationTypeEnum$1["Documents processing summary"] = 33] = "Documents processing summary";
|
|
13
|
-
NotificationTypeEnum$1[NotificationTypeEnum$1["Document Template Published"] = 34] = "Document Template Published";
|
|
14
|
-
NotificationTypeEnum$1[NotificationTypeEnum$1["Document Template Deletion"] = 35] = "Document Template Deletion";
|
|
15
|
-
return NotificationTypeEnum$1;
|
|
16
|
-
}({});
|
|
17
|
-
let NotificationStatusEnum = /* @__PURE__ */ function(NotificationStatusEnum$1) {
|
|
18
|
-
NotificationStatusEnum$1[NotificationStatusEnum$1["New"] = 1] = "New";
|
|
19
|
-
NotificationStatusEnum$1[NotificationStatusEnum$1["Pending"] = 2] = "Pending";
|
|
20
|
-
NotificationStatusEnum$1[NotificationStatusEnum$1["Batched"] = 3] = "Batched";
|
|
21
|
-
NotificationStatusEnum$1[NotificationStatusEnum$1["Delivered"] = 4] = "Delivered";
|
|
22
|
-
NotificationStatusEnum$1[NotificationStatusEnum$1["Error"] = 5] = "Error";
|
|
23
|
-
return NotificationStatusEnum$1;
|
|
24
|
-
}({});
|
|
2
|
+
//#region src/utils/base64.ts
|
|
3
|
+
function encodeToBase64(content) {
|
|
4
|
+
return Buffer.from(content).toString("base64");
|
|
5
|
+
}
|
|
6
|
+
function decodeFromBase64(content) {
|
|
7
|
+
return Buffer.from(content, "base64").toString("utf-8");
|
|
8
|
+
}
|
|
25
9
|
|
|
26
10
|
//#endregion
|
|
27
|
-
exports.
|
|
28
|
-
exports.
|
|
11
|
+
exports.decodeFromBase64 = decodeFromBase64;
|
|
12
|
+
exports.encodeToBase64 = encodeToBase64;
|
|
29
13
|
//# sourceMappingURL=index9.cjs.map
|
package/dist/index9.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index9.cjs","names":[],"sources":["../src/
|
|
1
|
+
{"version":3,"file":"index9.cjs","names":["content: string"],"sources":["../src/utils/base64.ts"],"sourcesContent":["export function encodeToBase64(content: string): string {\n return Buffer.from(content).toString('base64')\n}\n\nexport function decodeFromBase64(content: string): string {\n return Buffer.from(content, 'base64').toString('utf-8')\n}\n"],"mappings":";;AAAA,SAAgB,eAAeA,SAAyB;AACtD,QAAO,OAAO,KAAK,QAAQ,CAAC,SAAS,SAAS;AAC/C;AAED,SAAgB,iBAAiBA,SAAyB;AACxD,QAAO,OAAO,KAAK,SAAS,SAAS,CAAC,SAAS,QAAQ;AACxD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MSICCode } from "./msic-codes-CIKdPqag.cjs";
|
|
2
|
-
import { RegistrationType } from "./documents-
|
|
2
|
+
import { RegistrationType } from "./documents-4B5YOXeb.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/types/taxpayer.d.ts
|
|
5
5
|
interface TaxpayerQRCodeResponse {
|
|
@@ -32,4 +32,4 @@ interface TinSearchResponse {
|
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
34
|
export { TaxpayerQRCodeResponse, TinSearchParams, TinSearchResponse };
|
|
35
|
-
//# sourceMappingURL=taxpayer-
|
|
35
|
+
//# sourceMappingURL=taxpayer-DubRo4qZ.d.cts.map
|
|
@@ -51,5 +51,5 @@ import "../YX-F34sJ7Ik.js";
|
|
|
51
51
|
import "../ZX-CDQOfsHh.js";
|
|
52
52
|
import "../XX-DOA-10JW.js";
|
|
53
53
|
import "../unit-types-VgYXIwTT.js";
|
|
54
|
-
import { 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 } from "../documents-
|
|
54
|
+
import { 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 } from "../documents-ChNlyKB2.js";
|
|
55
55
|
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/types/index.d.ts
CHANGED
|
@@ -51,11 +51,11 @@ import "../YX-F34sJ7Ik.js";
|
|
|
51
51
|
import "../ZX-CDQOfsHh.js";
|
|
52
52
|
import "../XX-DOA-10JW.js";
|
|
53
53
|
import { UnitType, UnitTypeCode } from "../unit-types-VgYXIwTT.js";
|
|
54
|
-
import { 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 } from "../documents-
|
|
54
|
+
import { 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 } from "../documents-ChNlyKB2.js";
|
|
55
55
|
import { PaymentMode, PaymentModeCode, PaymentModeCodeEnum } from "../payment-modes-g3DzLmWb.js";
|
|
56
56
|
import { CanonicalizationMethod, Cert, CertDigest, DigestMethod, IssuerDigitalSignature, IssuerSerial, KeyInfo, QualifyingProperties, Reference, SignatureMethod, SignedInfo, SignedProperties, SignedSignatureProperties, SigningCertificate, Transform, X509Data } from "../signatures-CerHUrj3.js";
|
|
57
57
|
import { Notification, NotificationDeliveryAttempt, NotificationMetadata, NotificationResponse, NotificationSearchParams, NotificationStatus, NotificationStatusEnum, NotificationType, NotificationTypeEnum } from "../notifications-sFhgh3rJ.js";
|
|
58
|
-
import { TaxpayerQRCodeResponse, TinSearchParams, TinSearchResponse } from "../taxpayer-
|
|
58
|
+
import { TaxpayerQRCodeResponse, TinSearchParams, TinSearchResponse } from "../taxpayer-C9VMf0iv.js";
|
|
59
59
|
import { Fetch } from "../utils-C4FoVKLq.js";
|
|
60
60
|
import { ClientCredentials, TokenResponse } from "../index-CygwSf0x.js";
|
|
61
61
|
export { Address, AllDocumentsV1_1, Buyer, CanonicalizationMethod, Cert, CertDigest, Classification, ClassificationCode, ClassificationCodeEnum, ClientCredentials, CompleteInvoice, Country, CountryCode, CountryCodeEnum, CountryNameEnum, CreditNoteV1_1, Currency, CurrencyCode, CurrencyCodeEnum, DebitNoteV1_1, DigestMethod, DocumentStatus, DocumentSummary, DocumentTypeResponse, DocumentTypeVersion, DocumentTypeVersionResponse, DocumentTypesResponse, DocumentValidationResult, DocumentValidationStepResult, EInvoiceType, EInvoiceTypeCode, EInvoiceTypeCodeEnum, Fetch, FinalDocumentData, GetSubmissionResponse, InvoiceLineItem, InvoiceSubmission, InvoiceV1_1, IssuerDigitalSignature, IssuerSerial, KeyInfo, LegalMonetaryTotal, MSICCode, Notification, NotificationDeliveryAttempt, NotificationMetadata, NotificationResponse, NotificationSearchParams, NotificationStatus, NotificationStatusEnum, NotificationType, NotificationTypeEnum, PaymentMode, PaymentModeCode, PaymentModeCodeEnum, QualifyingProperties, Reference, RefundNoteV1_1, RegistrationType, ResponseDocument, SelfBilledCreditNoteV1_1, SelfBilledInvoiceV1_1, SelfBilledRefundNoteV1_1, SignatureMethod, SignedInfo, SignedInfoObject, SignedInvoiceSubmission, SignedProperties, SignedPropertiesData, SignedPropertiesObject, SignedSignatureProperties, SigningCertificate, SigningCredentials, StandardError, State, StateCode, StateCodeEnum, SubmissionResponse, SubmissionStatus, Supplier, TaxCategory, TaxSubtotal, TaxTotal, TaxType, TaxTypeCode, TaxTypeCodeEnum, TaxpayerQRCodeResponse, TinSearchParams, TinSearchResponse, TokenResponse, Transform, UBLDocument, UnitType, UnitTypeCode, WorkflowParameter, X509Data };
|
package/dist/types/taxpayer.d.ts
CHANGED
|
@@ -51,6 +51,6 @@ import "../YX-F34sJ7Ik.js";
|
|
|
51
51
|
import "../ZX-CDQOfsHh.js";
|
|
52
52
|
import "../XX-DOA-10JW.js";
|
|
53
53
|
import "../unit-types-VgYXIwTT.js";
|
|
54
|
-
import "../documents-
|
|
55
|
-
import { TaxpayerQRCodeResponse, TinSearchParams, TinSearchResponse } from "../taxpayer-
|
|
54
|
+
import "../documents-ChNlyKB2.js";
|
|
55
|
+
import { TaxpayerQRCodeResponse, TinSearchParams, TinSearchResponse } from "../taxpayer-C9VMf0iv.js";
|
|
56
56
|
export { TaxpayerQRCodeResponse, TinSearchParams, TinSearchResponse };
|
package/dist/utils/document.d.ts
CHANGED
|
@@ -51,11 +51,11 @@ import "../YX-F34sJ7Ik.js";
|
|
|
51
51
|
import "../ZX-CDQOfsHh.js";
|
|
52
52
|
import "../XX-DOA-10JW.js";
|
|
53
53
|
import { UnitTypeCode } from "../unit-types-VgYXIwTT.js";
|
|
54
|
-
import { AllDocumentsV1_1, CompleteInvoice, InvoiceLineItem, InvoiceSubmission, SignedInfoObject, SignedPropertiesObject, SigningCredentials, UBLDocument } from "../documents-
|
|
54
|
+
import { AllDocumentsV1_1, CompleteInvoice, InvoiceLineItem, InvoiceSubmission, SignedInfoObject, SignedPropertiesObject, SigningCredentials, UBLDocument } from "../documents-ChNlyKB2.js";
|
|
55
55
|
import "../payment-modes-g3DzLmWb.js";
|
|
56
56
|
import "../signatures-CerHUrj3.js";
|
|
57
57
|
import "../notifications-sFhgh3rJ.js";
|
|
58
|
-
import "../taxpayer-
|
|
58
|
+
import "../taxpayer-C9VMf0iv.js";
|
|
59
59
|
import "../utils-C4FoVKLq.js";
|
|
60
60
|
import "../index-CygwSf0x.js";
|
|
61
61
|
|
|
@@ -51,11 +51,11 @@ import "../YX-F34sJ7Ik.js";
|
|
|
51
51
|
import "../ZX-CDQOfsHh.js";
|
|
52
52
|
import "../XX-DOA-10JW.js";
|
|
53
53
|
import "../unit-types-VgYXIwTT.js";
|
|
54
|
-
import { InvoiceV1_1 } from "../documents-
|
|
54
|
+
import { InvoiceV1_1 } from "../documents-ChNlyKB2.js";
|
|
55
55
|
import "../payment-modes-g3DzLmWb.js";
|
|
56
56
|
import "../signatures-CerHUrj3.js";
|
|
57
57
|
import "../notifications-sFhgh3rJ.js";
|
|
58
|
-
import "../taxpayer-
|
|
58
|
+
import "../taxpayer-C9VMf0iv.js";
|
|
59
59
|
import "../utils-C4FoVKLq.js";
|
|
60
60
|
import "../index-CygwSf0x.js";
|
|
61
61
|
|
|
@@ -51,11 +51,11 @@ import "../YX-F34sJ7Ik.js";
|
|
|
51
51
|
import "../ZX-CDQOfsHh.js";
|
|
52
52
|
import "../XX-DOA-10JW.js";
|
|
53
53
|
import "../unit-types-VgYXIwTT.js";
|
|
54
|
-
import { InvoiceLineItem, InvoiceV1_1 } from "../documents-
|
|
54
|
+
import { InvoiceLineItem, InvoiceV1_1 } from "../documents-ChNlyKB2.js";
|
|
55
55
|
import "../payment-modes-g3DzLmWb.js";
|
|
56
56
|
import "../signatures-CerHUrj3.js";
|
|
57
57
|
import "../notifications-sFhgh3rJ.js";
|
|
58
|
-
import "../taxpayer-
|
|
58
|
+
import "../taxpayer-C9VMf0iv.js";
|
|
59
59
|
import "../utils-C4FoVKLq.js";
|
|
60
60
|
import "../index-CygwSf0x.js";
|
|
61
61
|
|
package/package.json
CHANGED
package/dist/index10.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index10.cjs","names":[],"sources":["../src/types/payment-modes.d.ts"],"sourcesContent":["/**\n * Represents the allowed codes for payment modes.\n * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/payment-methods/\n */\nexport type PaymentModeCode =\n | '01' // Cash\n | '02' // Cheque\n | '03' // Bank Transfer\n | '04' // Credit Card\n | '05' // Debit Card\n | '06' // e-Wallet / Digital Wallet\n | '07' // Digital Bank\n | '08' // Others\n\n/**\n * Enum representing the allowed payment mode codes with descriptive names.\n * Provides a more readable way to reference payment modes.\n *\n * @example\n * const mode = PaymentModeCodeEnum.Cash;\n * console.log(mode); // Output: \"01\"\n */\nexport enum PaymentModeCodeEnum {\n Cash = '01',\n Cheque = '02',\n BankTransfer = '03',\n CreditCard = '04',\n DebitCard = '05',\n EWalletDigitalWallet = '06',\n DigitalBank = '07',\n Others = '08',\n}\n\n/**\n * Interface representing a payment mode entry.\n * Contains the code and its corresponding description.\n */\nexport interface PaymentMode {\n code: PaymentModeCode\n description: string\n}\n"],"mappings":";;;;;;;;;;AAsBA,IAAY,sEAAL;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACD"}
|
package/dist/index2.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index2.cjs","names":[],"sources":["../src/types/classification-codes.d.ts"],"sourcesContent":["/**\n * Represents the allowed classification codes for e-Invoice items.\n * Based on the documentation: https://sdk.myinvois.hasil.gov.my/codes/classification-codes/\n */\nexport type ClassificationCode =\n | '001' // Breastfeeding equipment\n | '002' // Child care centres and kindergartens fees\n | '003' // Computer, smartphone or tablet\n | '004' // Consolidated e-Invoice\n | '005' // Construction materials (as specified under Fourth Schedule of the Lembaga Pembangunan Industri Pembinaan Malaysia Act 1994)\n | '006' // Disbursement\n | '007' // Donation\n | '008' // e-Commerce - e-Invoice to buyer / purchaser\n | '009' // e-Commerce - Self-billed e-Invoice to seller, logistics, etc.\n | '010' // Education fees\n | '011' // Goods on consignment (Consignor)\n | '012' // Goods on consignment (Consignee)\n | '013' // Gym membership\n | '014' // Insurance - Education and medical benefits\n | '015' // Insurance - Takaful or life insurance\n | '016' // Interest and financing expenses\n | '017' // Internet subscription\n | '018' // Land and building\n | '019' // Medical examination for learning disabilities and early intervention or rehabilitation treatments of learning disabilities\n | '020' // Medical examination or vaccination expenses\n | '021' // Medical expenses for serious diseases\n | '022' // Others\n | '023' // Petroleum operations (as defined in Petroleum (Income Tax) Act 1967)\n | '024' // Private retirement scheme or deferred annuity scheme\n | '025' // Motor vehicle\n | '026' // Subscription of books / journals / magazines / newspapers / other similar publications\n | '027' // Reimbursement\n | '028' // Rental of motor vehicle\n | '029' // EV charging facilities (Installation, rental, sale / purchase or subscription fees)\n | '030' // Repair and maintenance\n | '031' // Research and development\n | '032' // Foreign income\n | '033' // Self-billed - Betting and gaming\n | '034' // Self-billed - Importation of goods\n | '035' // Self-billed - Importation of services\n | '036' // Self-billed - Others\n | '037' // Self-billed - Monetary payment to agents, dealers or distributors\n | '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\n | '039' // Supporting equipment for disabled person\n | '040' // Voluntary contribution to approved provident fund\n | '041' // Dental examination or treatment\n | '042' // Fertility treatment\n | '043' // Treatment and home care nursing, daycare centres and residential care centers\n | '044' // Vouchers, gift cards, loyalty points, etc\n | '045' // Self-billed - Non-monetary payment to agents, dealers or distributors\n\n/**\n * Enum representing the allowed classification codes with descriptive names.\n * Provides a more readable way to reference classification codes.\n *\n * @example\n * const code = ClassificationCodeEnum.ComputerSmartphoneOrTablet;\n * console.log(code); // Output: \"003\"\n */\nexport enum ClassificationCodeEnum {\n BreastfeedingEquipment = '001',\n ChildCareCentresAndKindergartensFees = '002',\n ComputerSmartphoneOrTablet = '003',\n ConsolidatedEInvoice = '004',\n ConstructionMaterials = '005',\n Disbursement = '006',\n Donation = '007',\n ECommerceEInvoiceToBuyer = '008',\n ECommerceSelfBilledToSellerLogistics = '009',\n EducationFees = '010',\n GoodsOnConsignmentConsignor = '011',\n GoodsOnConsignmentConsignee = '012',\n GymMembership = '013',\n InsuranceEducationMedicalBenefits = '014',\n InsuranceTakafulLife = '015',\n InterestFinancingExpenses = '016',\n InternetSubscription = '017',\n LandAndBuilding = '018',\n MedicalExamLearningDisabilities = '019',\n MedicalExamVaccination = '020',\n MedicalExpensesSeriousDiseases = '021',\n Others = '022',\n PetroleumOperations = '023',\n PrivateRetirementSchemeDeferredAnnuity = '024',\n MotorVehicle = '025',\n SubscriptionBooksJournalsEtc = '026',\n Reimbursement = '027',\n RentalOfMotorVehicle = '028',\n EVChargingFacilities = '029',\n RepairAndMaintenance = '030',\n ResearchAndDevelopment = '031',\n ForeignIncome = '032',\n SelfBilledBettingGaming = '033',\n SelfBilledImportationGoods = '034',\n SelfBilledImportationServices = '035',\n SelfBilledOthers = '036',\n SelfBilledMonetaryPaymentToAgents = '037',\n SportsEquipmentRentalFeesEtc = '038',\n SupportingEquipmentDisabledPerson = '039',\n VoluntaryContributionProvidentFund = '040',\n DentalExamTreatment = '041',\n FertilityTreatment = '042',\n TreatmentHomeCareNursingEtc = '043',\n VouchersGiftCardsLoyaltyPoints = '044',\n SelfBilledNonMonetaryPaymentToAgents = '045',\n}\n\n/**\n * Interface representing a classification code entry.\n * Contains the code and its corresponding description.\n */\nexport interface Classification {\n code: ClassificationCode\n description: string\n}\n"],"mappings":";;;;;;;;;;AA2DA,IAAY,4EAAL;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACD"}
|