gotrip-fx-transaction-form 1.0.260-dev → 1.0.262-dev
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/index.js +1395 -1382
- package/package.json +1 -1
- package/types/components/Insurance/shared/PaymentMethodSelector.d.ts +3 -1
- package/types/components/Insurance/shared/index.d.ts +1 -1
- package/types/components/Modal/EsimBankTransferModal.d.ts +11 -0
- package/types/constants/api-urls.d.ts +1 -0
- package/types/hooks/fetchEsimTransaction.d.ts +2 -0
- package/types/types/enum.d.ts +10 -1
- package/types/types/response.dto.d.ts +21 -5
- package/types/util/debt-report-display.d.ts +4 -0
- package/types/util/sim-display.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { EPaymentMethod } from '../../../types/enum';
|
|
2
|
+
export type PaymentMethodSelectorVariant = 'buttons' | 'radio';
|
|
2
3
|
interface PaymentMethodSelectorProps {
|
|
3
4
|
value: EPaymentMethod;
|
|
4
5
|
onChange: (value: EPaymentMethod) => void;
|
|
5
6
|
showTopupBalance?: boolean;
|
|
7
|
+
variant?: PaymentMethodSelectorVariant;
|
|
6
8
|
}
|
|
7
|
-
export declare function PaymentMethodSelector({ value, onChange, showTopupBalance, }: PaymentMethodSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function PaymentMethodSelector({ value, onChange, showTopupBalance, variant, }: PaymentMethodSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
8
10
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { PaymentMethodSelector } from './PaymentMethodSelector';
|
|
1
|
+
export { PaymentMethodSelector, type PaymentMethodSelectorVariant } from './PaymentMethodSelector';
|
|
2
2
|
export { InfoBlockCard } from './InfoBlockCard';
|
|
3
3
|
export { StepFooter } from './StepFooter';
|
|
4
4
|
export { SimpleSelect } from './SimpleSelect';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface EsimBankTransferModalProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
qrCodeUrl: string;
|
|
6
|
+
transactionPublicId?: string;
|
|
7
|
+
amount: number;
|
|
8
|
+
onSuccess?: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare const EsimBankTransferModal: React.FC<EsimBankTransferModalProps>;
|
|
11
|
+
export default EsimBankTransferModal;
|
package/types/types/enum.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export declare enum TransactionStatus {
|
|
|
16
16
|
}
|
|
17
17
|
export declare enum EsimTransactionStatus {
|
|
18
18
|
CREATED = "created",
|
|
19
|
+
PENDING_PAYMENT = "pending_payment",
|
|
20
|
+
PAID = "paid",
|
|
19
21
|
WAITING_FOR_RETURN = "waiting_for_return",
|
|
20
22
|
RETURNED = "returned",
|
|
21
23
|
OUT_OF_STOCK = "out_of_stock",
|
|
@@ -93,7 +95,14 @@ export declare const E_TOP_UP_VALUES: {
|
|
|
93
95
|
export declare enum EPaymentMethod {
|
|
94
96
|
PRIMARY_BALANCE = "primary_balance",
|
|
95
97
|
TOPUP_BALANCE = "topup_balance",
|
|
96
|
-
BANK_TRANSFER = "bank_transfer"
|
|
98
|
+
BANK_TRANSFER = "bank_transfer",
|
|
99
|
+
ADMIN_PAYMENT = "admin_payment"
|
|
100
|
+
}
|
|
101
|
+
/** Wallet vs bank QR; matches API `EPaymentMode` (eSIM create / list). */
|
|
102
|
+
export declare enum EPaymentMode {
|
|
103
|
+
TOPUP_BALANCE = "topup_balance",
|
|
104
|
+
BANK_TRANSFER = "bank_transfer",
|
|
105
|
+
ADMIN_PAYMENT = "admin_payment"
|
|
97
106
|
}
|
|
98
107
|
export declare enum EOrderPaymentType {
|
|
99
108
|
UP_FRONT = "up_front",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ECommissionPolicyType, EOrderPaymentType, ESimDomesticServices, EsimTransactionStatus, ETenantType, EUseCaseses, TransactionStatus } from './enum';
|
|
1
|
+
import { ECommissionPolicyType, EPaymentMode, EOrderPaymentType, ESimDomesticServices, EsimTransactionStatus, ETenantType, EUseCaseses, TransactionStatus } from './enum';
|
|
2
2
|
import { EPolicyActionType } from '../constants/policy-enums';
|
|
3
3
|
import { EPermissionKey, EUserRole, EUserStatus } from './user';
|
|
4
4
|
export type LoginRespDto = {
|
|
@@ -132,6 +132,10 @@ export type IESimTransaction = {
|
|
|
132
132
|
id: number;
|
|
133
133
|
esimTransactionId: number;
|
|
134
134
|
vndAmount?: number;
|
|
135
|
+
paymentAmount?: number;
|
|
136
|
+
couponId?: number;
|
|
137
|
+
couponCode?: string;
|
|
138
|
+
couponDiscountAmount?: number;
|
|
135
139
|
originalVndAmount?: number;
|
|
136
140
|
amount?: number;
|
|
137
141
|
packageId?: number;
|
|
@@ -140,6 +144,7 @@ export type IESimTransaction = {
|
|
|
140
144
|
agencyOrderId?: number;
|
|
141
145
|
orderCode?: string;
|
|
142
146
|
status: EsimTransactionStatus;
|
|
147
|
+
paymentMode: EPaymentMode;
|
|
143
148
|
lastSyncedAt?: Date;
|
|
144
149
|
publicId: string;
|
|
145
150
|
createdResponseLog?: Record<string, any>;
|
|
@@ -286,6 +291,11 @@ export type GetESimTransactionListRespDto = {
|
|
|
286
291
|
page: number;
|
|
287
292
|
limit: number;
|
|
288
293
|
};
|
|
294
|
+
export type CreateEsimTransactionBankTransferResponse = {
|
|
295
|
+
qrCodeUrl: string;
|
|
296
|
+
transactionPublicId: string;
|
|
297
|
+
totalAmount: number;
|
|
298
|
+
};
|
|
289
299
|
export type GetUserListRespDto = {
|
|
290
300
|
users: IUser[];
|
|
291
301
|
total: number;
|
|
@@ -530,7 +540,9 @@ export declare enum EDebtReportStatus {
|
|
|
530
540
|
}
|
|
531
541
|
export declare enum ETransactionReportType {
|
|
532
542
|
FX = "fx",
|
|
533
|
-
ESIM = "esim"
|
|
543
|
+
ESIM = "esim",
|
|
544
|
+
INSURANCE = "insurance",
|
|
545
|
+
MOTOR_INSURANCE = "motor_insurance"
|
|
534
546
|
}
|
|
535
547
|
export declare enum ESimType {
|
|
536
548
|
ESIM = "esim",
|
|
@@ -548,10 +560,13 @@ export type IDebtReportTransaction = {
|
|
|
548
560
|
customerEmail?: string;
|
|
549
561
|
amount: number;
|
|
550
562
|
amountVnd: number;
|
|
551
|
-
currency
|
|
552
|
-
bankName
|
|
553
|
-
publicId
|
|
563
|
+
currency?: string;
|
|
564
|
+
bankName?: string;
|
|
565
|
+
publicId?: string;
|
|
554
566
|
bankTransactionId?: string;
|
|
567
|
+
insuranceProvider?: string;
|
|
568
|
+
insuranceType?: string;
|
|
569
|
+
policyId?: string;
|
|
555
570
|
createdAt: string;
|
|
556
571
|
commissionAmount: number;
|
|
557
572
|
};
|
|
@@ -563,6 +578,7 @@ export type IDebtReport = {
|
|
|
563
578
|
endDate: string;
|
|
564
579
|
transactionType: ETransactionReportType;
|
|
565
580
|
totalCommissionVnd: number;
|
|
581
|
+
totalAmountVnd: number;
|
|
566
582
|
totalCommissionByBank: Record<string, number>;
|
|
567
583
|
numSuccessfulTransactions: number;
|
|
568
584
|
status: EDebtReportStatus;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ETransactionReportType } from '../types/response.dto';
|
|
2
|
+
export declare const getDebtReportTransactionTypeText: (type: ETransactionReportType) => string;
|
|
3
|
+
export declare const isFxDebtReportType: (type: ETransactionReportType) => boolean;
|
|
4
|
+
export declare const getDebtReportInsuranceTypeText: (insuranceType?: string | null) => string;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { EOrderType } from '../hooks/useSimTransactionGrouped';
|
|
2
|
+
import { EPaymentMode } from '../types/enum';
|
|
2
3
|
export declare const getSimTypeDisplay: (simType?: string) => string;
|
|
3
4
|
export declare const getSimPaymentTypeDisplay: (paymentType?: string) => string;
|
|
4
5
|
export declare const getSimTransactionTypeDisplay: (type?: EOrderType) => string;
|
|
6
|
+
export declare const getEsimPaymentModeDisplay: (mode?: EPaymentMode | string) => string;
|
|
5
7
|
export declare const getSimProviderDisplay: (provider?: string) => string;
|
|
6
8
|
export declare const getSimStatusDisplay: (status?: string) => {
|
|
7
9
|
text: string;
|