@litepos/payment 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +7 -2
- package/dist/client.js +92 -25
- package/dist/index.d.ts +4 -4
- package/dist/index.js +5 -17
- package/dist/interfaces.d.ts +7 -2
- package/dist/interfaces.js +1 -3
- package/dist/simulator.d.ts +0 -1
- package/dist/simulator.js +3 -8
- package/dist/types/config.d.ts +1 -0
- package/dist/types/config.js +1 -0
- package/dist/types/error.d.ts +0 -1
- package/dist/types/error.js +2 -8
- package/dist/types/status.d.ts +4 -1
- package/dist/types/status.js +10 -8
- package/dist/utils/logger.d.ts +0 -1
- package/dist/utils/logger.js +4 -12
- package/package.json +11 -2
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/interfaces.d.ts.map +0 -1
- package/dist/interfaces.js.map +0 -1
- package/dist/simulator.d.ts.map +0 -1
- package/dist/simulator.js.map +0 -1
- package/dist/types/error.d.ts.map +0 -1
- package/dist/types/error.js.map +0 -1
- package/dist/types/status.d.ts.map +0 -1
- package/dist/types/status.js.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js.map +0 -1
package/dist/client.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import type { PaymentRequest, PaymentResponse, RefundResponse } from './interfaces';
|
|
1
|
+
import type { CancelResponse, PaymentRequest, PaymentResponse, RefundResponse } from './interfaces';
|
|
2
|
+
import { PaymentStatus } from './types/status';
|
|
3
|
+
export declare function validateConfig(method: string, config: unknown): void;
|
|
2
4
|
export declare class LitePosPayment {
|
|
3
5
|
charge(request: PaymentRequest): Promise<PaymentResponse>;
|
|
4
6
|
queryPayment(method: string, transactionId: string, config: Record<string, unknown>): Promise<PaymentResponse>;
|
|
7
|
+
cancelPayment(method: string, transactionId: string, config: Record<string, unknown>): Promise<CancelResponse>;
|
|
5
8
|
refund(method: string, transactionId: string, config: Record<string, unknown>, amount?: number): Promise<RefundResponse>;
|
|
9
|
+
queryRefund(method: string, refundId: string, config: Record<string, unknown>): Promise<RefundResponse>;
|
|
10
|
+
simulateCharge(request: PaymentRequest): PaymentResponse;
|
|
11
|
+
simulateQuery(transactionId: string, status: PaymentStatus): PaymentResponse;
|
|
6
12
|
private getGatewayName;
|
|
7
13
|
}
|
|
8
|
-
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.js
CHANGED
|
@@ -1,70 +1,137 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const error_1 = require("./types/error");
|
|
6
|
-
const logger_1 = require("./utils/logger");
|
|
1
|
+
import { cancelPayment as cancelFiuuPayment, chargeCard, chargeQrCode, queryPayment, refund, validateConfig as validateFiuuConfig } from '@litepos/payment-fiuu';
|
|
2
|
+
import { ValidationError } from './types/error';
|
|
3
|
+
import { PaymentStatus } from './types/status';
|
|
4
|
+
import { logError, logInfo } from './utils/logger';
|
|
7
5
|
// Fixed payment method routing
|
|
8
6
|
const CHARGE_ROUTING = {
|
|
9
|
-
'
|
|
10
|
-
'fiuu-qrcode':
|
|
7
|
+
'FIUU': chargeCard,
|
|
8
|
+
'fiuu-qrcode': chargeQrCode,
|
|
11
9
|
};
|
|
12
10
|
const QUERY_ROUTING = {
|
|
13
|
-
'
|
|
14
|
-
'fiuu-qrcode':
|
|
11
|
+
'FIUU': queryPayment,
|
|
12
|
+
'fiuu-qrcode': queryPayment,
|
|
15
13
|
};
|
|
16
14
|
const REFUND_ROUTING = {
|
|
17
|
-
'
|
|
18
|
-
'fiuu-qrcode':
|
|
15
|
+
'FIUU': refund,
|
|
16
|
+
'fiuu-qrcode': refund,
|
|
19
17
|
};
|
|
20
|
-
|
|
18
|
+
const REFUND_QUERY_ROUTING = {
|
|
19
|
+
'FIUU': queryPayment,
|
|
20
|
+
'fiuu-qrcode': queryPayment,
|
|
21
|
+
};
|
|
22
|
+
const CANCEL_ROUTING = {
|
|
23
|
+
'FIUU': cancelFiuuPayment,
|
|
24
|
+
'fiuu-qrcode': cancelFiuuPayment,
|
|
25
|
+
};
|
|
26
|
+
// Config validation routing
|
|
27
|
+
const VALIDATE_ROUTING = {
|
|
28
|
+
'FIUU': validateFiuuConfig,
|
|
29
|
+
'fiuu-qrcode': validateFiuuConfig,
|
|
30
|
+
};
|
|
31
|
+
// Validate payment method configuration
|
|
32
|
+
export function validateConfig(method, config) {
|
|
33
|
+
const validator = VALIDATE_ROUTING[method];
|
|
34
|
+
if (!validator)
|
|
35
|
+
throw new ValidationError(`Payment method not supported: ${method}`, method);
|
|
36
|
+
validator(config);
|
|
37
|
+
}
|
|
38
|
+
export class LitePosPayment {
|
|
21
39
|
async charge(request) {
|
|
22
40
|
const handler = CHARGE_ROUTING[request.method];
|
|
23
41
|
if (!handler)
|
|
24
|
-
throw new
|
|
42
|
+
throw new ValidationError(`Payment method not supported: ${request.method}`, request.method);
|
|
25
43
|
try {
|
|
26
44
|
const response = await handler(request);
|
|
27
|
-
|
|
45
|
+
logInfo(`${this.getGatewayName(request.method)}: Charge payment, Order ID ${request.orderId}, Transaction ID ${response.transactionId}, Status ${response.status}`);
|
|
28
46
|
return response;
|
|
29
47
|
}
|
|
30
48
|
catch (error) {
|
|
31
|
-
|
|
49
|
+
logError(`${this.getGatewayName(request.method)}: Charge payment failed, Order ID ${request.orderId}`, error);
|
|
32
50
|
throw error;
|
|
33
51
|
}
|
|
34
52
|
}
|
|
35
53
|
async queryPayment(method, transactionId, config) {
|
|
36
54
|
const handler = QUERY_ROUTING[method];
|
|
37
55
|
if (!handler)
|
|
38
|
-
throw new
|
|
56
|
+
throw new ValidationError(`Payment method not supported: ${method}`, method);
|
|
39
57
|
try {
|
|
40
58
|
const response = await handler(transactionId, config);
|
|
41
|
-
|
|
59
|
+
logInfo(`${this.getGatewayName(method)}: Query payment, Transaction ID ${transactionId}, Status ${response.status}`);
|
|
42
60
|
return response;
|
|
43
61
|
}
|
|
44
62
|
catch (error) {
|
|
45
|
-
|
|
63
|
+
logError(`${this.getGatewayName(method)}: Query payment failed, Transaction ID ${transactionId}`, error);
|
|
64
|
+
throw error;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
async cancelPayment(method, transactionId, config) {
|
|
68
|
+
const handler = CANCEL_ROUTING[method];
|
|
69
|
+
if (!handler)
|
|
70
|
+
throw new ValidationError(`Payment method not supported: ${method}`, method);
|
|
71
|
+
try {
|
|
72
|
+
const response = await handler(transactionId, config);
|
|
73
|
+
logInfo(`${this.getGatewayName(method)}: Cancel payment, Transaction ID ${transactionId}, Status ${response.status}`);
|
|
74
|
+
return response;
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
logError(`${this.getGatewayName(method)}: Cancel payment failed, Transaction ID ${transactionId}`, error);
|
|
46
78
|
throw error;
|
|
47
79
|
}
|
|
48
80
|
}
|
|
49
81
|
async refund(method, transactionId, config, amount) {
|
|
50
82
|
const handler = REFUND_ROUTING[method];
|
|
51
83
|
if (!handler)
|
|
52
|
-
throw new
|
|
84
|
+
throw new ValidationError(`Payment method not supported: ${method}`, method);
|
|
53
85
|
try {
|
|
54
86
|
const response = await handler(transactionId, config, amount);
|
|
55
|
-
|
|
87
|
+
logInfo(`${this.getGatewayName(method)}: Refund payment, Transaction ID ${transactionId}, Refund ID ${response.refundId}, Status ${response.status}`);
|
|
56
88
|
return response;
|
|
57
89
|
}
|
|
58
90
|
catch (error) {
|
|
59
|
-
|
|
91
|
+
logError(`${this.getGatewayName(method)}: Refund payment failed, Transaction ID ${transactionId}`, error);
|
|
60
92
|
throw error;
|
|
61
93
|
}
|
|
62
94
|
}
|
|
95
|
+
async queryRefund(method, refundId, config) {
|
|
96
|
+
const handler = REFUND_QUERY_ROUTING[method];
|
|
97
|
+
if (!handler)
|
|
98
|
+
throw new ValidationError(`Payment method not supported: ${method}`, method);
|
|
99
|
+
try {
|
|
100
|
+
const response = await handler(refundId, config);
|
|
101
|
+
logInfo(`${this.getGatewayName(method)}: Query refund, Refund ID ${refundId}, Status ${response.status}`);
|
|
102
|
+
return response;
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
logError(`${this.getGatewayName(method)}: Query refund failed, Refund ID ${refundId}`, error);
|
|
106
|
+
throw error;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
// Simulation methods (for testing, returns mock data without calling adapters)
|
|
110
|
+
simulateCharge(request) {
|
|
111
|
+
const transactionId = `SIM-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
112
|
+
return {
|
|
113
|
+
transactionId,
|
|
114
|
+
status: PaymentStatus.Pending,
|
|
115
|
+
amount: request.amount,
|
|
116
|
+
currency: request.currency,
|
|
117
|
+
qrCodeData: request.method.includes('qrcode') ? `QR_${request.orderId}` : undefined,
|
|
118
|
+
metadata: { simulated: true, ...request.metadata },
|
|
119
|
+
raw: { simulated: true, request },
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
simulateQuery(transactionId, status) {
|
|
123
|
+
return {
|
|
124
|
+
transactionId,
|
|
125
|
+
status,
|
|
126
|
+
amount: 0,
|
|
127
|
+
currency: 'MYR',
|
|
128
|
+
metadata: { simulated: true },
|
|
129
|
+
raw: { simulated: true },
|
|
130
|
+
};
|
|
131
|
+
}
|
|
63
132
|
getGatewayName(method) {
|
|
64
|
-
if (method === '
|
|
133
|
+
if (method === 'FIUU' || method === 'fiuu-qrcode')
|
|
65
134
|
return 'Fiuu';
|
|
66
135
|
return method;
|
|
67
136
|
}
|
|
68
137
|
}
|
|
69
|
-
exports.LitePosPayment = LitePosPayment;
|
|
70
|
-
//# sourceMappingURL=client.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { LitePosPayment } from './client';
|
|
2
|
-
export { PaymentRequest, PaymentResponse, RefundResponse, ValidationResult, } from './interfaces';
|
|
1
|
+
export { LitePosPayment, validateConfig } from './client';
|
|
2
|
+
export { CancelResponse, PaymentRequest, PaymentResponse, RefundResponse, ValidationResult, } from './interfaces';
|
|
3
3
|
export { Simulator } from './simulator';
|
|
4
|
+
export type { PaymentConfig } from './types/config';
|
|
4
5
|
export { PaymentError, ValidationError } from './types/error';
|
|
5
|
-
export { PaymentStatus, RefundStatus } from './types/status';
|
|
6
|
+
export { CancelStatus, PaymentStatus, RefundStatus } from './types/status';
|
|
6
7
|
export { logError, logInfo } from './utils/logger';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.logInfo = exports.logError = exports.RefundStatus = exports.PaymentStatus = exports.ValidationError = exports.PaymentError = exports.Simulator = exports.LitePosPayment = void 0;
|
|
4
1
|
// Main exports
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Object.defineProperty(exports, "Simulator", { enumerable: true, get: function () { return simulator_1.Simulator; } });
|
|
9
|
-
var error_1 = require("./types/error");
|
|
10
|
-
Object.defineProperty(exports, "PaymentError", { enumerable: true, get: function () { return error_1.PaymentError; } });
|
|
11
|
-
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return error_1.ValidationError; } });
|
|
2
|
+
export { LitePosPayment, validateConfig } from './client';
|
|
3
|
+
export { Simulator } from './simulator';
|
|
4
|
+
export { PaymentError, ValidationError } from './types/error';
|
|
12
5
|
// Type exports
|
|
13
|
-
|
|
14
|
-
Object.defineProperty(exports, "PaymentStatus", { enumerable: true, get: function () { return status_1.PaymentStatus; } });
|
|
15
|
-
Object.defineProperty(exports, "RefundStatus", { enumerable: true, get: function () { return status_1.RefundStatus; } });
|
|
6
|
+
export { CancelStatus, PaymentStatus, RefundStatus } from './types/status';
|
|
16
7
|
// Logger exports
|
|
17
|
-
|
|
18
|
-
Object.defineProperty(exports, "logError", { enumerable: true, get: function () { return logger_1.logError; } });
|
|
19
|
-
Object.defineProperty(exports, "logInfo", { enumerable: true, get: function () { return logger_1.logInfo; } });
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
8
|
+
export { logError, logInfo } from './utils/logger';
|
package/dist/interfaces.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PaymentStatus, RefundStatus } from './types/status';
|
|
1
|
+
import type { CancelStatus, PaymentStatus, RefundStatus } from './types/status';
|
|
2
2
|
export interface PaymentRequest {
|
|
3
3
|
method: string;
|
|
4
4
|
amount: number;
|
|
@@ -26,8 +26,13 @@ export interface RefundResponse {
|
|
|
26
26
|
metadata?: Record<string, unknown>;
|
|
27
27
|
raw?: unknown;
|
|
28
28
|
}
|
|
29
|
+
export interface CancelResponse {
|
|
30
|
+
transactionId: string;
|
|
31
|
+
status: CancelStatus;
|
|
32
|
+
metadata?: Record<string, unknown>;
|
|
33
|
+
raw?: unknown;
|
|
34
|
+
}
|
|
29
35
|
export interface ValidationResult {
|
|
30
36
|
valid: boolean;
|
|
31
37
|
errors?: string[];
|
|
32
38
|
}
|
|
33
|
-
//# sourceMappingURL=interfaces.d.ts.map
|
package/dist/interfaces.js
CHANGED
package/dist/simulator.d.ts
CHANGED
package/dist/simulator.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Simulator = void 0;
|
|
4
|
-
const status_1 = require("./types/status");
|
|
1
|
+
import { PaymentStatus } from './types/status';
|
|
5
2
|
// Payment simulator for testing
|
|
6
|
-
class Simulator {
|
|
3
|
+
export class Simulator {
|
|
7
4
|
// Generate transaction ID
|
|
8
5
|
generateTransactionId() {
|
|
9
6
|
return `txn_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
@@ -12,7 +9,7 @@ class Simulator {
|
|
|
12
9
|
simulateCharge(request) {
|
|
13
10
|
return {
|
|
14
11
|
transactionId: this.generateTransactionId(),
|
|
15
|
-
status:
|
|
12
|
+
status: PaymentStatus.Pending,
|
|
16
13
|
amount: request.amount,
|
|
17
14
|
currency: request.currency,
|
|
18
15
|
qrCodeData: request.method.includes('qrcode') ? `QR_${request.orderId}` : undefined,
|
|
@@ -31,5 +28,3 @@ class Simulator {
|
|
|
31
28
|
};
|
|
32
29
|
}
|
|
33
30
|
}
|
|
34
|
-
exports.Simulator = Simulator;
|
|
35
|
-
//# sourceMappingURL=simulator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PaymentConfig = Record<string, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/error.d.ts
CHANGED
package/dist/types/error.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ValidationError = exports.PaymentError = void 0;
|
|
4
1
|
// Base error class for payment errors
|
|
5
|
-
class PaymentError extends Error {
|
|
2
|
+
export class PaymentError extends Error {
|
|
6
3
|
constructor(code, message, method, originalError) {
|
|
7
4
|
super(message);
|
|
8
5
|
this.code = code;
|
|
@@ -11,13 +8,10 @@ class PaymentError extends Error {
|
|
|
11
8
|
this.name = 'PaymentError';
|
|
12
9
|
}
|
|
13
10
|
}
|
|
14
|
-
exports.PaymentError = PaymentError;
|
|
15
11
|
// Validation errors
|
|
16
|
-
class ValidationError extends PaymentError {
|
|
12
|
+
export class ValidationError extends PaymentError {
|
|
17
13
|
constructor(message, method, originalError) {
|
|
18
14
|
super('VALIDATION_ERROR', message, method, originalError);
|
|
19
15
|
this.name = 'ValidationError';
|
|
20
16
|
}
|
|
21
17
|
}
|
|
22
|
-
exports.ValidationError = ValidationError;
|
|
23
|
-
//# sourceMappingURL=error.js.map
|
package/dist/types/status.d.ts
CHANGED
package/dist/types/status.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RefundStatus = exports.PaymentStatus = void 0;
|
|
4
1
|
// Payment status enumeration
|
|
5
|
-
var PaymentStatus;
|
|
2
|
+
export var PaymentStatus;
|
|
6
3
|
(function (PaymentStatus) {
|
|
7
4
|
PaymentStatus["Pending"] = "pending";
|
|
8
5
|
PaymentStatus["Success"] = "success";
|
|
9
6
|
PaymentStatus["Failed"] = "failed";
|
|
10
7
|
PaymentStatus["Cancelled"] = "cancelled";
|
|
11
|
-
})(PaymentStatus || (
|
|
8
|
+
})(PaymentStatus || (PaymentStatus = {}));
|
|
12
9
|
// Refund status enumeration
|
|
13
|
-
var RefundStatus;
|
|
10
|
+
export var RefundStatus;
|
|
14
11
|
(function (RefundStatus) {
|
|
15
12
|
RefundStatus["Pending"] = "pending";
|
|
16
13
|
RefundStatus["Success"] = "success";
|
|
17
14
|
RefundStatus["Failed"] = "failed";
|
|
18
|
-
})(RefundStatus || (
|
|
19
|
-
|
|
15
|
+
})(RefundStatus || (RefundStatus = {}));
|
|
16
|
+
// Cancel status enumeration
|
|
17
|
+
export var CancelStatus;
|
|
18
|
+
(function (CancelStatus) {
|
|
19
|
+
CancelStatus["Success"] = "success";
|
|
20
|
+
CancelStatus["Failed"] = "failed";
|
|
21
|
+
})(CancelStatus || (CancelStatus = {}));
|
package/dist/utils/logger.d.ts
CHANGED
package/dist/utils/logger.js
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.logInfo = logInfo;
|
|
7
|
-
exports.logError = logError;
|
|
8
|
-
const node_process_1 = __importDefault(require("node:process"));
|
|
1
|
+
import process from 'node:process';
|
|
9
2
|
// Fixed logger configuration
|
|
10
3
|
const LOG_ENDPOINT = 'https://logs.xposhq.com/';
|
|
11
4
|
const LOG_API_KEY = 'nRXpIXTQ2TVIAHaSntyjfvQB90LI3LGYgXayDe7URGvXkQfGiR';
|
|
@@ -16,7 +9,7 @@ function sendLog(data) {
|
|
|
16
9
|
...data,
|
|
17
10
|
ddsource: 'node.js',
|
|
18
11
|
service: LOG_SERVICE,
|
|
19
|
-
env:
|
|
12
|
+
env: process.env.NODE_ENV || 'development',
|
|
20
13
|
timestamp: new Date().toISOString(),
|
|
21
14
|
};
|
|
22
15
|
fetch(LOG_ENDPOINT, {
|
|
@@ -28,10 +21,10 @@ function sendLog(data) {
|
|
|
28
21
|
body: JSON.stringify(logPayload),
|
|
29
22
|
}).catch(() => { });
|
|
30
23
|
}
|
|
31
|
-
function logInfo(message, info) {
|
|
24
|
+
export function logInfo(message, info) {
|
|
32
25
|
sendLog({ message, level: 'info', ...info });
|
|
33
26
|
}
|
|
34
|
-
function logError(message, error) {
|
|
27
|
+
export function logError(message, error) {
|
|
35
28
|
const errorData = { message, level: 'error', status: 'error' };
|
|
36
29
|
if (error) {
|
|
37
30
|
if (error instanceof Error) {
|
|
@@ -47,4 +40,3 @@ function logError(message, error) {
|
|
|
47
40
|
}
|
|
48
41
|
sendLog(errorData);
|
|
49
42
|
}
|
|
50
|
-
//# sourceMappingURL=logger.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@litepos/payment",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.0.8",
|
|
4
5
|
"description": "LitePOS payment gateway SDK - Core package",
|
|
5
6
|
"author": "",
|
|
6
7
|
"license": "MIT",
|
|
@@ -10,13 +11,21 @@
|
|
|
10
11
|
"gateway",
|
|
11
12
|
"sdk"
|
|
12
13
|
],
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"default": "./dist/index.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
13
21
|
"main": "dist/index.js",
|
|
22
|
+
"module": "dist/index.js",
|
|
14
23
|
"types": "dist/index.d.ts",
|
|
15
24
|
"files": [
|
|
16
25
|
"dist"
|
|
17
26
|
],
|
|
18
27
|
"dependencies": {
|
|
19
|
-
"@litepos/payment-fiuu": "1.0.
|
|
28
|
+
"@litepos/payment-fiuu": "1.0.8"
|
|
20
29
|
},
|
|
21
30
|
"devDependencies": {
|
|
22
31
|
"typescript": "^5.9.2",
|
package/dist/client.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AA0BnF,qBAAa,cAAc;IACnB,MAAM,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;IAgBzD,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC;IAgB9G,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAgB9H,OAAO,CAAC,cAAc;CAKvB"}
|
package/dist/client.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;AACA,wDAAsF;AACtF,yCAA+C;AAC/C,2CAAkD;AAOlD,+BAA+B;AAC/B,MAAM,cAAc,GAAmC;IACrD,MAAM,EAAE,yBAAU;IAClB,aAAa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AsDC"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC,OAAO,EACL,cAAc,EACd,eAAe,EACf,cAAc,EACd,gBAAgB,GACjB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAG7D,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAG5D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,mCAAyC;AAAhC,wGAAA,cAAc,OAAA;AASvB,yCAAuC;AAA9B,sGAAA,SAAS,OAAA;AAClB,uCAA6D;AAApD,qGAAA,YAAY,OAAA;AAAE,wGAAA,eAAe,OAAA;AAEtC,eAAe;AACf,yCAA4D;AAAnD,uGAAA,aAAa,OAAA;AAAE,sGAAA,YAAY,OAAA;AAEpC,iBAAiB;AACjB,yCAAkD;AAAzC,kGAAA,QAAQ,OAAA;AAAE,iGAAA,OAAO,OAAA"}
|
package/dist/interfaces.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAGjE,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACnC;AAGD,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,aAAa,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,GAAG,CAAC,EAAE,OAAO,CAAA;CACd;AAGD,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,IAAI,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,GAAG,CAAC,EAAE,OAAO,CAAA;CACd;AAGD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAClB"}
|
package/dist/interfaces.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":""}
|
package/dist/simulator.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"simulator.d.ts","sourceRoot":"","sources":["../src/simulator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACnE,OAAO,EAAE,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E;SACzB,CAAA;IACH,CAAC;CACF;AA7BD,8BA6BC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/types/error.ts"],"names":[],"mappings":"AACA,qBAAa,YAAa,SAAQ,KAAK;IAE5B,IAAI,EAAE,MAAM;IAEZ,MAAM,EAAE,MAAM;IACd,aAAa,CAAC,EAAE,GAAG;gBAHnB,IAAI,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACR,MAAM,EAAE,MAAM,EACd,aAAa,CAAC,EAAE,GAAG,YAAA;CAK7B;AAGD,qBAAa,eAAgB,SAAQ,YAAY;gBACnC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,GAAG;CAIjE"}
|
package/dist/types/error.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/types/error.ts"],"names":[],"mappings":";;;AAAA,sCAAsC;AACtC,MAAa,YAAa,SAAQ,KAAK;IACrC,YACS,IAAY,EACnB,OAAe,EACR,MAAc,EACd,aAAmB;QAE1B,KAAK,CAAC,OAAO,CAAC,CAAA;QALP,SAAI,GAAJ,IAAI,CAAQ;QAEZ,WAAM,GAAN,MAAM,CAAQ;QACd,kBAAa,GAAb,aAAa,CAAM;QAG1B,IAAI,CAAC,IAAI,GAAG,cAAc,CAAA;IAC5B,CAAC;CACF;AAVD,oCAUC;AAED,oBAAoB;AACpB,MAAa,eAAgB,SAAQ,YAAY;IAC/C,YAAY,OAAe,EAAE,MAAc,EAAE,aAAmB;QAC9D,KAAK,CAAC,kBAAkB,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,CAAA;QACzD,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAA;IAC/B,CAAC;CACF;AALD,0CAKC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/types/status.ts"],"names":[],"mappings":"AACA,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAGD,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB"}
|
package/dist/types/status.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/types/status.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,oCAAmB,CAAA;IACnB,kCAAiB,CAAA;IACjB,wCAAuB,CAAA;AACzB,CAAC,EALW,aAAa,6BAAb,aAAa,QAKxB;AAED,4BAA4B;AAC5B,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;AACnB,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AA2BA,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAEzE;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,GAAG,IAAI,CAe3D"}
|
package/dist/utils/logger.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":";;;;;AA2BA,0BAEC;AAED,4BAeC;AA9CD,gEAAkC;AAElC,6BAA6B;AAC7B,MAAM,YAAY,GAAG,0BAA0B,CAAA;AAC/C,MAAM,WAA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