gotrip-fx-transaction-form 1.0.202-dev → 1.0.202
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/assets/index.css +1 -1
- package/index.js +50632 -40017
- package/package.json +1 -1
- package/types/components/AddTransaction/Agent.d.ts +3 -2
- package/types/components/AddTransaction/FlightInfomation.d.ts +2 -1
- package/types/components/AddTransaction/SelectingBankMessageAlerts.d.ts +5 -0
- package/types/components/Admin/AgencyUserSelector/AgencyUserSelector.d.ts +7 -0
- package/types/components/Admin/AgencyUserSelector/AgencyUserSelectorModal.d.ts +10 -0
- package/types/components/ApprovalLinkDropdown/ApprovalLinkDropdown.d.ts +6 -0
- package/types/components/ApprovalStatusBadge.d.ts +7 -0
- package/types/components/Apps/EmbededIndividualApp.d.ts +2 -1
- package/types/components/BankTransferInfo/BankTransferInfoDisplay.d.ts +7 -0
- package/types/components/Common/DateDisplay.d.ts +7 -0
- package/types/components/Common/MultiTagCombobox.d.ts +14 -0
- package/types/components/Common/PrimaryRadioGroup.d.ts +16 -0
- package/types/components/Common/TimeRangeSelect.d.ts +17 -0
- package/types/components/Insurance/CreateInsuranceTransactionForm.d.ts +38 -2
- package/types/components/Insurance/DateRangePicker.d.ts +12 -0
- package/types/components/Insurance/DebtPaymentQrButton.d.ts +8 -0
- package/types/components/Insurance/FxInsuranceCouponBox.d.ts +10 -0
- package/types/components/Insurance/InsuranceApprovalContent.d.ts +10 -0
- package/types/components/Insurance/InsuranceApprovalPageSDK.d.ts +5 -0
- package/types/components/Insurance/InsuranceApprovalPaymentStep.d.ts +28 -0
- package/types/components/Insurance/InsuranceDatePicker.d.ts +9 -0
- package/types/components/Insurance/InsurancePlans/InsurancePlanList.d.ts +1 -1
- package/types/components/Insurance/InsurancePlans/QuickCoveragePlanCard.d.ts +16 -0
- package/types/components/Insurance/InsurancePlans/QuickRecommendationsSection.d.ts +18 -0
- package/types/components/Insurance/InsuranceSummaryOverview.d.ts +7 -2
- package/types/components/Insurance/InsuranceTypeAndPeopleCountFields.d.ts +10 -0
- package/types/components/Insurance/InsuredTravelersTable.d.ts +6 -0
- package/types/components/Insurance/MotorInsuranceApprovalContent.d.ts +10 -0
- package/types/components/Insurance/MotorInsuranceApprovalPageSDK.d.ts +5 -0
- package/types/components/Insurance/ProviderApiDebugDialog.d.ts +17 -0
- package/types/components/Insurance/SimpleDetail.d.ts +2 -1
- package/types/components/Insurance/StepFourPayment.d.ts +32 -5
- package/types/components/Insurance/StepOneForm.d.ts +11 -2
- package/types/components/Insurance/StepThree.d.ts +29 -0
- package/types/components/Insurance/StepThreeBuyerInfo.d.ts +4 -1
- package/types/components/Insurance/StepThreeInsuredPeople.d.ts +4 -1
- package/types/components/Insurance/documentScanAutofill.d.ts +37 -0
- package/types/components/Insurance/insuranceExcelImport.d.ts +13 -0
- package/types/components/Insurance/insuredPeopleImport.d.ts +23 -0
- package/types/components/Insurance/{FormElements.d.ts → shared/FormElements.d.ts} +13 -3
- package/types/components/Insurance/shared/InfoBlockCard.d.ts +10 -0
- package/types/components/Insurance/shared/PaymentMethodSelector.d.ts +10 -0
- package/types/components/Insurance/shared/SimpleSelect.d.ts +14 -0
- package/types/components/Insurance/shared/StepFooter.d.ts +8 -0
- package/types/components/Insurance/shared/index.d.ts +5 -0
- package/types/components/Insurance/types.d.ts +21 -6
- package/types/components/Insurance/validationUtils.d.ts +7 -1
- package/types/components/Modal/CancelTransactionModal.d.ts +1 -0
- package/types/components/Modal/DebtSettlementQrModal.d.ts +11 -0
- package/types/components/Modal/ESimPurchaseModal.d.ts +4 -1
- package/types/components/Modal/EsimBankTransferModal.d.ts +13 -0
- package/types/components/Modal/InsurancePaymentModal.d.ts +2 -0
- package/types/components/Modal/MotorInsurancePaymentModal.d.ts +13 -0
- package/types/components/Modal/ProcessingOrderDialog.d.ts +8 -0
- package/types/components/MotorInsurance/Bike/BikePremiumSummary.d.ts +9 -0
- package/types/components/MotorInsurance/Bike/BikeStepOneForm.d.ts +30 -0
- package/types/components/MotorInsurance/Bike/BikeStepThreePayment.d.ts +41 -0
- package/types/components/MotorInsurance/Bike/BikeStepTwoVehicleInfo.d.ts +12 -0
- package/types/components/MotorInsurance/Bike/CreateBikeInsuranceForm.d.ts +17 -0
- package/types/components/MotorInsurance/Bike/index.d.ts +5 -0
- package/types/components/MotorInsurance/Car/CarPremiumSummary.d.ts +8 -0
- package/types/components/MotorInsurance/Car/CarStepFourPayment.d.ts +45 -0
- package/types/components/MotorInsurance/Car/CarStepOneForm.d.ts +27 -0
- package/types/components/MotorInsurance/Car/CarStepThreeInfo.d.ts +11 -0
- package/types/components/MotorInsurance/Car/CarStepTwoPlan.d.ts +11 -0
- package/types/components/MotorInsurance/Car/CreateCarInsuranceForm.d.ts +17 -0
- package/types/components/MotorInsurance/Car/car-form.constants.d.ts +23 -0
- package/types/components/MotorInsurance/Car/index.d.ts +6 -0
- package/types/components/MotorInsurance/CreateMotorInsuranceTransactionForm.d.ts +17 -0
- package/types/components/MotorInsurance/DocumentUploadPreview.d.ts +14 -0
- package/types/components/MotorInsurance/MotorInsuranceApprovalPaymentStep.d.ts +20 -0
- package/types/components/MotorInsurance/image-storage.utils.d.ts +18 -0
- package/types/components/MotorInsurance/index.d.ts +4 -0
- package/types/components/MotorInsurance/motor-insurance.types.d.ts +335 -0
- package/types/components/MotorInsurance/motor-insurance.validation.d.ts +21 -0
- package/types/components/Notification/NotificationBell.d.ts +5 -0
- package/types/components/Notification/NotificationItem.d.ts +8 -0
- package/types/components/Notification/NotificationPanel.d.ts +6 -0
- package/types/components/OrderPaymentTypeBadge.d.ts +4 -0
- package/types/components/PolicyGroup/InsurancePolicyGroupFormDialog.d.ts +10 -0
- package/types/components/TransactionList/PublicIdActionMenu.d.ts +3 -1
- package/types/constants/api-urls.d.ts +59 -5
- package/types/constants/approval-link.enum.d.ts +4 -0
- package/types/constants/business-codes.d.ts +2 -1
- package/types/constants/env.d.ts +3 -0
- package/types/constants/policy-enums.d.ts +11 -0
- package/types/constants/regex.d.ts +4 -0
- package/types/constants/tenant.d.ts +3 -0
- package/types/constants/transaction-status-labels.d.ts +3 -0
- package/types/embeded-main.d.ts +2 -0
- package/types/hooks/fetchEsimTransaction.d.ts +2 -0
- package/types/hooks/transactions/useGroupTransactions.d.ts +10 -10
- package/types/hooks/traveller-confirmation/submit-confirmation.util.d.ts +1 -0
- package/types/hooks/traveller-confirmation/traveller-confirmation-flow.d.ts +4 -0
- package/types/hooks/traveller-confirmation/types.d.ts +22 -0
- package/types/hooks/traveller-confirmation/usePurchaseTravellerConfirmation.d.ts +12 -0
- package/types/hooks/traveller-confirmation/useTravellerConfirmationFetch.d.ts +2 -0
- package/types/hooks/useAdminDashboard.d.ts +19 -0
- package/types/hooks/useAutoSelectBankBranchAndDepartment.d.ts +19 -0
- package/types/hooks/useBankOutsideWorkingHoursNotice.d.ts +5 -0
- package/types/hooks/useConfirmTransaction.d.ts +15 -31
- package/types/hooks/useCoupon.d.ts +95 -0
- package/types/hooks/useCouponValidation.d.ts +29 -0
- package/types/hooks/useCreateAutoCoupon.d.ts +5 -0
- package/types/hooks/useFxPrefill.d.ts +19 -0
- package/types/hooks/useGroupCustomers.d.ts +12 -9
- package/types/hooks/useInsuranceData.d.ts +3 -11
- package/types/hooks/useInsurancePlans.d.ts +13 -1
- package/types/hooks/useInsuranceTransaction.d.ts +39 -4
- package/types/hooks/useLocationData.d.ts +22 -0
- package/types/hooks/useMotorInsurance.d.ts +17 -0
- package/types/hooks/useMotorInsuranceTransaction.d.ts +133 -0
- package/types/hooks/useMotorQuote.d.ts +15 -0
- package/types/hooks/useNotifications.d.ts +10 -0
- package/types/hooks/usePolicyGroups.d.ts +1 -0
- package/types/hooks/useTenantList.d.ts +3 -4
- package/types/hooks/useUserById.d.ts +7 -0
- package/types/hooks/useUserSearch.d.ts +10 -0
- package/types/hooks/useUsersByTenantTypes.d.ts +11 -0
- package/types/hooks/useVehicleRegistrationScan.d.ts +39 -0
- package/types/pages/admin/CreateOrderOnBehalfTest.d.ts +3 -0
- package/types/pages/admin/coupons/CampaignCouponTable.d.ts +13 -0
- package/types/pages/admin/coupons/CampaignDetailPage.d.ts +1 -0
- package/types/pages/admin/coupons/CampaignListPage.d.ts +1 -0
- package/types/pages/admin/coupons/CouponFormPage.d.ts +1 -0
- package/types/pages/admin/insurance/create-insurance-transaction/AdminCreateInsuranceTransactionPage.d.ts +2 -0
- package/types/pages/admin/insurance/edit-insurance-transaction/AdminEditInsuranceTransactionPage.d.ts +1 -0
- package/types/pages/admin/insurance-policy-management/InsurancePolicyManagement.d.ts +1 -0
- package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorBikeTransactionPage.d.ts +1 -0
- package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorCarTransactionPage.d.ts +1 -0
- package/types/pages/admin/motor-insurance/edit-motor-transaction/AdminEditMotorTransactionPage.d.ts +1 -0
- package/types/pages/admin/motor-insurance-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
- package/types/pages/admin/motor-insurance-transaction-list/MotorInsuranceTransactionListPage.d.ts +5 -0
- package/types/pages/agency/home/HomePage.d.ts +1 -0
- package/types/pages/agency/home/constants.d.ts +16 -0
- package/types/pages/agency/insurance/motor-transaction-approval/MotorInsuranceTransactionApprovalPage.d.ts +3 -0
- package/types/pages/agency/insurance/motor-transaction-create/CreateCarInsuranceTransactionPage.d.ts +1 -0
- package/types/pages/agency/insurance/motor-transaction-create/CreateMotorInsuranceTransactionPage.d.ts +1 -0
- package/types/pages/agency/insurance/motor-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
- package/types/pages/agency/insurance/motor-transaction-list/MotorInsuranceTransactionListPage.d.ts +6 -0
- package/types/pages/agency/insurance/transaction-approval/InsuranceTransactionApprovalPage.d.ts +3 -0
- package/types/pages/agency/insurance/transaction-create/CreateInsuranceTransactionPage.d.ts +2 -0
- package/types/pages/agency/traveller-confirmation/PurchaseTravellerConfirmation.d.ts +5 -0
- package/types/pages/agency/traveller-confirmation/TravellerPurchaseConfirmation.d.ts +2 -0
- package/types/pages/guest/insurance-approval.d.ts +1 -0
- package/types/pages/guest/insurance-create.d.ts +4 -1
- package/types/pages/guest/motor-insurance-approval.d.ts +1 -0
- package/types/pages/guest/motor-insurance-create.d.ts +6 -0
- package/types/providers/AppSettingsProvider.d.ts +1 -0
- package/types/store/useApprovalStore.d.ts +6 -0
- package/types/store/useNotificationStore.d.ts +16 -0
- package/types/store/useTenantStore.d.ts +12 -0
- package/types/store/useTrackingStore.d.ts +10 -0
- package/types/types/app-settings.d.ts +13 -1
- package/types/types/coupon.d.ts +70 -0
- package/types/types/enum.d.ts +15 -2
- package/types/types/insurance-transaction.dto.d.ts +22 -1
- package/types/types/insurance.d.ts +19 -2
- package/types/types/notification.d.ts +23 -0
- package/types/types/response.dto.d.ts +59 -5
- package/types/types/sdk.d.ts +8 -1
- package/types/types/tracking.dto.d.ts +21 -0
- package/types/util/booker-display.d.ts +6 -0
- package/types/util/couponErrorMessages.d.ts +2 -0
- package/types/util/debt-report-display.d.ts +4 -0
- package/types/util/formatter.d.ts +6 -0
- package/types/util/fx-travelling-messages.d.ts +1 -0
- package/types/util/fx.d.ts +15 -0
- package/types/util/order-payment-display.d.ts +16 -0
- package/types/util/sim-display.d.ts +2 -0
- package/types/util/tracking.d.ts +19 -0
- package/types/util/transaction.util.d.ts +2 -1
- package/types/utils/bank.d.ts +4 -0
- package/types/utils/transaction-confirmation-link.d.ts +9 -0
package/types/types/enum.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare enum TransactionStatus {
|
|
|
7
7
|
SENT_TO_BANK = "sent_to_bank",
|
|
8
8
|
SENT_CONFIRMATION = "sent_confirmation_to_customer",
|
|
9
9
|
CONFIRMED = "confirmed",// customer confirmed transaction request via zns
|
|
10
|
-
CUSTOMER_PURCHASE_CONFIRMATION = "customer_purchase_confirmation",// waiting for customer to confirm via ZNS (ABBANK
|
|
10
|
+
CUSTOMER_PURCHASE_CONFIRMATION = "customer_purchase_confirmation",// waiting for customer to confirm via ZNS (ABBANK, VPBANK)
|
|
11
11
|
CANCELED = "cancelled",
|
|
12
12
|
SUCCESS = "success",
|
|
13
13
|
PAID = "paid",
|
|
@@ -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,18 @@ 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"
|
|
106
|
+
}
|
|
107
|
+
export declare enum EOrderPaymentType {
|
|
108
|
+
UP_FRONT = "up_front",
|
|
109
|
+
DEFERRED = "deferred"
|
|
97
110
|
}
|
|
98
111
|
export declare enum EInsuranceTransactionStatus {
|
|
99
112
|
PENDING = "pending",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { EGender, EIdType, EInsuranceType, EPersonType, EPolicyStatus, EPolicyType, EQuoteStatus, ERelationToPrimary, ETravelType } from './insurance';
|
|
1
|
+
import { EGender, EIdType, EInsuranceType, EApprovalStatus, EPersonType, EPolicyStatus, EPolicyType, EQuoteStatus, ERelationToPrimary, ETravelScope, ETravelType } from './insurance';
|
|
2
|
+
import { EOrderPaymentType } from './enum';
|
|
2
3
|
import { ITransaction } from './response.dto';
|
|
3
4
|
export interface InsuranceQuoteInsured {
|
|
4
5
|
id: number;
|
|
@@ -36,6 +37,8 @@ export interface InsuranceQuote {
|
|
|
36
37
|
travelType: ETravelType;
|
|
37
38
|
destination?: string;
|
|
38
39
|
destinationId?: number;
|
|
40
|
+
provinceFromId?: number;
|
|
41
|
+
provinceToId?: number;
|
|
39
42
|
basePremium: number;
|
|
40
43
|
taxAmount: number;
|
|
41
44
|
totalPremium: number;
|
|
@@ -84,8 +87,13 @@ export interface InsuranceTransaction {
|
|
|
84
87
|
type: EInsuranceType;
|
|
85
88
|
policyType: EPolicyType;
|
|
86
89
|
travelType: ETravelType;
|
|
90
|
+
travelScope: ETravelScope;
|
|
87
91
|
status: EPolicyStatus;
|
|
88
92
|
totalAmount: number;
|
|
93
|
+
premiumBeforeDiscount?: number;
|
|
94
|
+
couponId?: number;
|
|
95
|
+
couponCode?: string;
|
|
96
|
+
couponDiscountAmount?: number;
|
|
89
97
|
providerPolicyId?: string;
|
|
90
98
|
providerPolicyNumber?: string;
|
|
91
99
|
providerData?: Record<string, any>;
|
|
@@ -94,8 +102,21 @@ export interface InsuranceTransaction {
|
|
|
94
102
|
documents?: InsurancePolicyDocument[];
|
|
95
103
|
userId?: number;
|
|
96
104
|
tenantId?: number;
|
|
105
|
+
paymentTypeApplied?: EOrderPaymentType;
|
|
106
|
+
paidAmount?: number;
|
|
107
|
+
unpaidAmount?: number;
|
|
108
|
+
isBypassed?: boolean;
|
|
109
|
+
approvalStatus?: EApprovalStatus | null;
|
|
110
|
+
approvalBypassed?: boolean;
|
|
111
|
+
createdByAdminId?: number | null;
|
|
112
|
+
updatedByAdminId?: number | null;
|
|
113
|
+
approvedAt?: string | null;
|
|
114
|
+
rejectedAt?: string | null;
|
|
115
|
+
rejectionReasonCode?: string | null;
|
|
116
|
+
rejectionReasonText?: string | null;
|
|
97
117
|
createdAt: string;
|
|
98
118
|
updatedAt: string;
|
|
99
119
|
quote?: InsuranceQuote;
|
|
100
120
|
policyInsureds?: PolicyInsured[];
|
|
121
|
+
utm?: Record<string, string>;
|
|
101
122
|
}
|
|
@@ -2,6 +2,10 @@ export declare enum ETravelType {
|
|
|
2
2
|
SINGLE = "single",
|
|
3
3
|
ANNUAL = "annual"
|
|
4
4
|
}
|
|
5
|
+
export declare enum ETravelScope {
|
|
6
|
+
INTERNATIONAL = "international",
|
|
7
|
+
DOMESTIC = "domestic"
|
|
8
|
+
}
|
|
5
9
|
export declare enum ERelationToPrimary {
|
|
6
10
|
SELF = "self",
|
|
7
11
|
SPOUSE = "spouse",
|
|
@@ -20,13 +24,16 @@ export declare enum ERelationToPrimary {
|
|
|
20
24
|
}
|
|
21
25
|
export declare enum EIdType {
|
|
22
26
|
PASSPORT = "passport",
|
|
23
|
-
ID_CARD = "id_card"
|
|
27
|
+
ID_CARD = "id_card",
|
|
28
|
+
TAX_CODE = "tax_code"
|
|
24
29
|
}
|
|
25
30
|
export declare enum EInsuranceProviderType {
|
|
26
31
|
TMIV = "TMIV",
|
|
27
32
|
MSIG = "MSIG",
|
|
28
|
-
PVI = "PVI"
|
|
33
|
+
PVI = "PVI",
|
|
34
|
+
MIC = "MIC"
|
|
29
35
|
}
|
|
36
|
+
export declare const INSURANCE_PROVIDER_LABELS: Record<EInsuranceProviderType, string>;
|
|
30
37
|
export declare enum EInsuranceType {
|
|
31
38
|
INDIVIDUAL = "individual",
|
|
32
39
|
FAMILY = "family",
|
|
@@ -55,6 +62,11 @@ export declare enum EPolicyStatus {
|
|
|
55
62
|
PENDING = "pending",
|
|
56
63
|
FAILED = "failed"
|
|
57
64
|
}
|
|
65
|
+
export declare enum EApprovalStatus {
|
|
66
|
+
PENDING_APPROVAL = "pending_approval",
|
|
67
|
+
APPROVED = "approved",
|
|
68
|
+
REJECTED = "rejected"
|
|
69
|
+
}
|
|
58
70
|
export declare enum EDestination {
|
|
59
71
|
WORLDWIDE = "worldwide",
|
|
60
72
|
ASIA = "asia",
|
|
@@ -62,6 +74,7 @@ export declare enum EDestination {
|
|
|
62
74
|
}
|
|
63
75
|
export declare enum EPersonType {
|
|
64
76
|
ADULT = "adult",
|
|
77
|
+
TEENAGER = "teenager",
|
|
65
78
|
CHILDREN = "children"
|
|
66
79
|
}
|
|
67
80
|
export declare enum EPersonValidationStatus {
|
|
@@ -69,3 +82,7 @@ export declare enum EPersonValidationStatus {
|
|
|
69
82
|
NEEDS_CHECK = "needs_check",
|
|
70
83
|
NOT_ENTERED = "not_entered"
|
|
71
84
|
}
|
|
85
|
+
export declare enum EBuyerType {
|
|
86
|
+
INDIVIDUAL = "individual",
|
|
87
|
+
COMPANY = "company"
|
|
88
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare enum ENotificationType {
|
|
2
|
+
INSURANCE_PENDING_APPROVAL = "insurance_pending_approval",
|
|
3
|
+
INSURANCE_APPROVED = "insurance_approved",
|
|
4
|
+
INSURANCE_REJECTED = "insurance_rejected",
|
|
5
|
+
INSURANCE_UPDATED = "insurance_updated",
|
|
6
|
+
MOTOR_INSURANCE_PENDING_APPROVAL = "motor_insurance_pending_approval",
|
|
7
|
+
MOTOR_INSURANCE_APPROVED = "motor_insurance_approved",
|
|
8
|
+
MOTOR_INSURANCE_REJECTED = "motor_insurance_rejected",
|
|
9
|
+
MOTOR_INSURANCE_UPDATED = "motor_insurance_updated"
|
|
10
|
+
}
|
|
11
|
+
export interface INotification {
|
|
12
|
+
id: number;
|
|
13
|
+
type: ENotificationType;
|
|
14
|
+
title: string;
|
|
15
|
+
message: string;
|
|
16
|
+
isRead: boolean;
|
|
17
|
+
readAt: string | null;
|
|
18
|
+
metadata: {
|
|
19
|
+
path?: string;
|
|
20
|
+
publicId?: string;
|
|
21
|
+
} | null;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ECommissionPolicyType, 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 = {
|
|
@@ -106,6 +106,20 @@ export type ITransaction = {
|
|
|
106
106
|
fileUrls?: IFileUrls;
|
|
107
107
|
cancelledAt?: string;
|
|
108
108
|
cancelledResponse?: Record<string, any>;
|
|
109
|
+
cancelledBy?: string;
|
|
110
|
+
cancelledUser?: {
|
|
111
|
+
id: number;
|
|
112
|
+
email?: string;
|
|
113
|
+
firstName?: string;
|
|
114
|
+
lastName?: string;
|
|
115
|
+
};
|
|
116
|
+
approvedBy?: string;
|
|
117
|
+
approvedUser?: {
|
|
118
|
+
id: number;
|
|
119
|
+
email?: string;
|
|
120
|
+
firstName?: string;
|
|
121
|
+
lastName?: string;
|
|
122
|
+
};
|
|
109
123
|
assignedUserId?: number;
|
|
110
124
|
assignedUser?: {
|
|
111
125
|
id: number;
|
|
@@ -118,6 +132,10 @@ export type IESimTransaction = {
|
|
|
118
132
|
id: number;
|
|
119
133
|
esimTransactionId: number;
|
|
120
134
|
vndAmount?: number;
|
|
135
|
+
paymentAmount?: number;
|
|
136
|
+
couponId?: number;
|
|
137
|
+
couponCode?: string;
|
|
138
|
+
couponDiscountAmount?: number;
|
|
121
139
|
originalVndAmount?: number;
|
|
122
140
|
amount?: number;
|
|
123
141
|
packageId?: number;
|
|
@@ -126,6 +144,11 @@ export type IESimTransaction = {
|
|
|
126
144
|
agencyOrderId?: number;
|
|
127
145
|
orderCode?: string;
|
|
128
146
|
status: EsimTransactionStatus;
|
|
147
|
+
paymentMode?: EPaymentMode;
|
|
148
|
+
paymentTypeApplied?: EOrderPaymentType;
|
|
149
|
+
paidAmount?: number;
|
|
150
|
+
unpaidAmount?: number;
|
|
151
|
+
isBypassed?: boolean;
|
|
129
152
|
lastSyncedAt?: Date;
|
|
130
153
|
publicId: string;
|
|
131
154
|
createdResponseLog?: Record<string, any>;
|
|
@@ -227,6 +250,7 @@ export interface ITravelAgencyTenantSettings {
|
|
|
227
250
|
esimInbound: boolean;
|
|
228
251
|
simDomestic: boolean;
|
|
229
252
|
insurance: boolean;
|
|
253
|
+
motorInsurance: boolean;
|
|
230
254
|
};
|
|
231
255
|
fx: {
|
|
232
256
|
useCases: EUseCaseses[];
|
|
@@ -239,6 +263,10 @@ export interface ITravelAgencyTenantSettings {
|
|
|
239
263
|
insurance: {
|
|
240
264
|
providers: string[];
|
|
241
265
|
};
|
|
266
|
+
motorInsurance: {
|
|
267
|
+
providers: string[];
|
|
268
|
+
};
|
|
269
|
+
paymentType?: EOrderPaymentType;
|
|
242
270
|
}
|
|
243
271
|
export interface IBankTenantSettings {
|
|
244
272
|
availableCurrencies: string[];
|
|
@@ -267,6 +295,25 @@ export type GetESimTransactionListRespDto = {
|
|
|
267
295
|
page: number;
|
|
268
296
|
limit: number;
|
|
269
297
|
};
|
|
298
|
+
export type BankTransferInfo = {
|
|
299
|
+
bankAccount: string;
|
|
300
|
+
accountName: string;
|
|
301
|
+
amount: number;
|
|
302
|
+
transferContent: string;
|
|
303
|
+
bankCode: string;
|
|
304
|
+
};
|
|
305
|
+
export type CreateEsimTransactionBankTransferResponse = {
|
|
306
|
+
qrCodeUrl: string;
|
|
307
|
+
transactionPublicId: string;
|
|
308
|
+
totalAmount: number;
|
|
309
|
+
bankTransferInfo?: BankTransferInfo;
|
|
310
|
+
};
|
|
311
|
+
export type DebtPaymentQrResponse = {
|
|
312
|
+
qrCodeUrl: string;
|
|
313
|
+
transactionPublicId: string;
|
|
314
|
+
totalAmount: number;
|
|
315
|
+
bankTransferInfo?: BankTransferInfo;
|
|
316
|
+
};
|
|
270
317
|
export type GetUserListRespDto = {
|
|
271
318
|
users: IUser[];
|
|
272
319
|
total: number;
|
|
@@ -352,6 +399,7 @@ export type IUser = {
|
|
|
352
399
|
departments?: IDepartment[];
|
|
353
400
|
roles?: IRole[];
|
|
354
401
|
tenant?: ITenant;
|
|
402
|
+
tenantId?: number;
|
|
355
403
|
permissions?: EPermissionKey[];
|
|
356
404
|
balance?: {
|
|
357
405
|
amount: number;
|
|
@@ -511,7 +559,9 @@ export declare enum EDebtReportStatus {
|
|
|
511
559
|
}
|
|
512
560
|
export declare enum ETransactionReportType {
|
|
513
561
|
FX = "fx",
|
|
514
|
-
ESIM = "esim"
|
|
562
|
+
ESIM = "esim",
|
|
563
|
+
INSURANCE = "insurance",
|
|
564
|
+
MOTOR_INSURANCE = "motor_insurance"
|
|
515
565
|
}
|
|
516
566
|
export declare enum ESimType {
|
|
517
567
|
ESIM = "esim",
|
|
@@ -529,10 +579,13 @@ export type IDebtReportTransaction = {
|
|
|
529
579
|
customerEmail?: string;
|
|
530
580
|
amount: number;
|
|
531
581
|
amountVnd: number;
|
|
532
|
-
currency
|
|
533
|
-
bankName
|
|
534
|
-
publicId
|
|
582
|
+
currency?: string;
|
|
583
|
+
bankName?: string;
|
|
584
|
+
publicId?: string;
|
|
535
585
|
bankTransactionId?: string;
|
|
586
|
+
insuranceProvider?: string;
|
|
587
|
+
insuranceType?: string;
|
|
588
|
+
policyId?: string;
|
|
536
589
|
createdAt: string;
|
|
537
590
|
commissionAmount: number;
|
|
538
591
|
};
|
|
@@ -544,6 +597,7 @@ export type IDebtReport = {
|
|
|
544
597
|
endDate: string;
|
|
545
598
|
transactionType: ETransactionReportType;
|
|
546
599
|
totalCommissionVnd: number;
|
|
600
|
+
totalAmountVnd: number;
|
|
547
601
|
totalCommissionByBank: Record<string, number>;
|
|
548
602
|
numSuccessfulTransactions: number;
|
|
549
603
|
status: EDebtReportStatus;
|
package/types/types/sdk.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
export declare enum ESdkFormType {
|
|
2
2
|
FX = "fx",
|
|
3
|
-
|
|
3
|
+
INTERNATIONAL_INSURANCE = "international_insurance",
|
|
4
|
+
DOMESTIC_INSURANCE = "domestic_insurance",
|
|
5
|
+
MOTOR_INSURANCE_CAR = "motor_insurance_car",
|
|
6
|
+
MOTOR_INSURANCE_BIKE = "motor_insurance_bike",
|
|
7
|
+
EXCHANGE_RATE_TABLE = "exchange_rate_table",
|
|
8
|
+
INSURANCE_APPROVAL = "insurance_approval",
|
|
9
|
+
MOTOR_INSURANCE_CAR_APPROVAL = "motor_insurance_car_approval",
|
|
10
|
+
MOTOR_INSURANCE_BIKE_APPROVAL = "motor_insurance_bike_approval"
|
|
4
11
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tracking DTO interface for tracking user behavior
|
|
3
|
+
* This interface can be extended with additional tracking fields in the future
|
|
4
|
+
*/
|
|
5
|
+
export interface TrackingDto {
|
|
6
|
+
/** Anonymous user ID for tracking unauthenticated users */
|
|
7
|
+
anonymousId?: string;
|
|
8
|
+
/** Google Click ID for tracking Google Ads campaigns */
|
|
9
|
+
gclid?: string;
|
|
10
|
+
/** Facebook Click ID for tracking Facebook Ads campaigns */
|
|
11
|
+
fbid?: string;
|
|
12
|
+
/** Campaign identifier */
|
|
13
|
+
campaign?: string;
|
|
14
|
+
/** UTM and ad network parameters (utm_source, utm_campaign, gclid, fbclid, ttclid, etc.) */
|
|
15
|
+
utm?: Record<string, string>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Type helper to extend any DTO with tracking fields
|
|
19
|
+
* Usage: type MyDtoWithTracking = WithTracking<MyDto>
|
|
20
|
+
*/
|
|
21
|
+
export type WithTracking<T> = T & TrackingDto;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IUser } from '../types/response.dto';
|
|
2
|
+
export declare function formatBookerHeadingWithEmail(user: IUser): string;
|
|
3
|
+
export declare function getBookerSelectionButtonLabel(selectedUser: IUser | null): string;
|
|
4
|
+
export declare function getSelectedUserDisplay(selectedUser: IUser | null): string;
|
|
5
|
+
/** Clickable hint when admin must pick / re-pick booker */
|
|
6
|
+
export declare const BOOKER_SELECT_GUIDE_VI = "ch\u01B0a ch\u1ECDn ng\u01B0\u1EDDi d\u00F9ng";
|
|
@@ -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;
|
|
@@ -2,3 +2,9 @@ export declare const formatter: Intl.NumberFormat;
|
|
|
2
2
|
export declare const formatCurrencyWithoutVND: (value: number | string) => string;
|
|
3
3
|
export declare const formatCurrency: (value: number | string) => string;
|
|
4
4
|
export declare const upperFirstLetter: (str: string) => string;
|
|
5
|
+
/**
|
|
6
|
+
* Parse a locale-formatted number string (e.g. "100,000") to a number for filter/API use.
|
|
7
|
+
* Returns undefined for empty input or invalid numbers.
|
|
8
|
+
*/
|
|
9
|
+
export declare const parseFilterNumber: (s: string) => number | undefined;
|
|
10
|
+
export declare const formatDate: (date: string | Date | null | undefined, format?: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizeSelectingBankMessages(config: string | string[] | null | undefined, fallback: string | null): string[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IBankFxTravellingSetting } from '../types/app-settings';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the effective max amount for the given currency and destination country.
|
|
4
|
+
* If max_amount_by_country is set: visa countries use visa_max_amount, else non_visa_max_amount.
|
|
5
|
+
* Falls back to max_amount when max_amount_by_country is not configured or has no value for the currency.
|
|
6
|
+
*
|
|
7
|
+
* CMS config (use alpha2 codes in visa_countries; form sends alpha2):
|
|
8
|
+
* "max_amount_by_country": {
|
|
9
|
+
* "visa_countries": ["US", "GB", "FR", "CN", "JP", "KR"],
|
|
10
|
+
* "visa_max_amount": 10000,
|
|
11
|
+
* "non_visa_max_amount": 2000
|
|
12
|
+
* }
|
|
13
|
+
* Or per-currency: "visa_max_amount": { "USD": 10000, "EUR": 8000 }
|
|
14
|
+
*/
|
|
15
|
+
export declare function getEffectiveConfiguredMaxAmount(travellingConfig: IBankFxTravellingSetting | undefined, currencyKey: string, countryCodeDes: string | undefined): number | null | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EOrderPaymentType } from '../types/enum';
|
|
2
|
+
import { EApprovalStatus } from '../types/insurance';
|
|
3
|
+
export declare function getPaymentTypeLabel(paymentType?: EOrderPaymentType | string): string;
|
|
4
|
+
export declare function getApprovalStatusLabel(approvalBypassed?: boolean, approvalStatus?: EApprovalStatus | string | null): string;
|
|
5
|
+
export declare function getOrderPaymentStatusShortLabel(params: {
|
|
6
|
+
paymentTypeApplied?: EOrderPaymentType;
|
|
7
|
+
paidAmount?: number;
|
|
8
|
+
unpaidAmount?: number;
|
|
9
|
+
isBypassed?: boolean;
|
|
10
|
+
}): string;
|
|
11
|
+
export declare function getOrderPaymentStatusDetailLabel(params: {
|
|
12
|
+
paymentTypeApplied?: EOrderPaymentType;
|
|
13
|
+
paidAmount?: number;
|
|
14
|
+
unpaidAmount?: number;
|
|
15
|
+
isBypassed?: boolean;
|
|
16
|
+
}): 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;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate a new anonymous user ID (15 chars, url-safe).
|
|
3
|
+
* @see https://alex7kom.github.io/nano-nanoid-cc/
|
|
4
|
+
*/
|
|
5
|
+
export declare const generateAnonymousUid: (size?: number) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Save anonymous UID to both cookie and localStorage
|
|
8
|
+
* This ensures persistence across different storage mechanisms
|
|
9
|
+
*/
|
|
10
|
+
export declare const saveAnonymousUid: (uid: string) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Get anonymous UID with priority: cookie first, then localStorage
|
|
13
|
+
* If not found, generates a new one and saves it
|
|
14
|
+
*/
|
|
15
|
+
export declare const getAnonymousUid: () => string;
|
|
16
|
+
/**
|
|
17
|
+
* Validate tracking data
|
|
18
|
+
*/
|
|
19
|
+
export declare const validateTrackingData: (data: any) => boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ESimPackageDataLimitTimeframe, ESimPackageDataLimitUnit, ESimPackageValidityType, ETransactionType } from '../types/response.dto';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const getTransactionStatusLabel: (status?: string) => string;
|
|
3
|
+
export declare const getTransactionType: (type: ETransactionType) => ETransactionType.STUDY | "Du học" | "Kinh doanh" | "Du lịch" | "Du lịch (Nhóm)" | "Di trú";
|
|
3
4
|
export declare const formatDataLimit: (dataLimit: number, dataLimitUnit: ESimPackageDataLimitUnit, dataLimitTimeframe: ESimPackageDataLimitTimeframe) => string;
|
|
4
5
|
export declare const formatValidity: (validityPeriod: number, validityType: ESimPackageValidityType) => string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BANK_CODES, BANKS_WITH_DEPARTMENT_AND_ZNS_FLOW } from '../constants/tenant';
|
|
2
|
+
export declare const getBankLogoUrl: (bankCodeOrShortName?: string | null) => string | null;
|
|
3
|
+
export declare const isBankWithDepartmentAndZnsFlow: (shortName?: string | null) => shortName is (typeof BANKS_WITH_DEPARTMENT_AND_ZNS_FLOW)[number];
|
|
4
|
+
export { BANK_CODES };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TransactionStatus } from '../types/enum';
|
|
2
|
+
/** Logic cũ — nút "Copy link xác nhận" (link `/confirm/`) */
|
|
3
|
+
export declare const CUSTOMER_CONFIRMATION_LINK_STATUS_VALUES: readonly [TransactionStatus.SENT_CONFIRMATION, TransactionStatus.CUSTOMER_PURCHASE_CONFIRMATION, "sent_confirmation_to_customer", "customer_purchase_confirmation"];
|
|
4
|
+
/** Chỉ nút "Copy link xác nhận mua" (link `/confirm-purchase/`) */
|
|
5
|
+
export declare const CUSTOMER_PURCHASE_CONFIRMATION_LINK_STATUS_VALUES: readonly [TransactionStatus.CUSTOMER_PURCHASE_CONFIRMATION, "customer_purchase_confirmation"];
|
|
6
|
+
export declare const canCopyCustomerConfirmationLink: (status?: TransactionStatus | string | null) => boolean;
|
|
7
|
+
export declare const canCopyCustomerPurchaseConfirmationLink: (status?: TransactionStatus | string | null) => boolean;
|
|
8
|
+
export declare const getCustomerConfirmationLink: (publicId: string) => string;
|
|
9
|
+
export declare const getCustomerPurchaseConfirmationLink: (publicId: string) => string;
|