gotrip-fx-transaction-form 1.0.196-dev → 1.0.196
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 +49571 -39059
- 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/ApprovalStatusBadge.d.ts +7 -0
- package/types/components/Apps/EmbededIndividualApp.d.ts +3 -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 +29 -5
- package/types/components/Insurance/DateRangePicker.d.ts +12 -0
- package/types/components/Insurance/InsuranceContentRenderer/DynamicRenderer.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/AccordionBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/ActionButtonBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/ContainerBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/DataRowBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/DividerBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/ListGroupBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/TextBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/types.d.ts +64 -0
- package/types/components/Insurance/InsuranceContentRenderer/utils/richText.d.ts +14 -0
- package/types/components/Insurance/InsuranceContentRenderer/utils/styleMapper.d.ts +6 -0
- package/types/components/Insurance/InsuranceDatePicker.d.ts +9 -0
- package/types/components/Insurance/InsurancePlans/InsurancePlanFilter.d.ts +12 -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/InsurancePlans/index.d.ts +1 -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/ProviderApiDebugDialog.d.ts +17 -0
- package/types/components/Insurance/SimpleDetail.d.ts +2 -1
- package/types/components/Insurance/StepFourPayment.d.ts +31 -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/StepTwoPlans.d.ts +9 -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 +22 -5
- package/types/components/Insurance/validationUtils.d.ts +7 -1
- package/types/components/Modal/CancelTransactionModal.d.ts +1 -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 +26 -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 +30 -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/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/StepIndicator/StepIndicatorHorizontal.d.ts +2 -1
- package/types/components/TransactionList/PublicIdActionMenu.d.ts +3 -1
- package/types/constants/api-urls.d.ts +50 -1
- package/types/constants/business-codes.d.ts +2 -1
- package/types/constants/env.d.ts +2 -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 +12 -31
- package/types/hooks/useCoupon.d.ts +95 -0
- package/types/hooks/useCouponValidation.d.ts +29 -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 +34 -4
- package/types/hooks/useLocationData.d.ts +22 -0
- package/types/hooks/useMotorInsurance.d.ts +17 -0
- package/types/hooks/useMotorInsuranceTransaction.d.ts +124 -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 +1 -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 +1 -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-create.d.ts +8 -1
- package/types/pages/guest/motor-insurance-create.d.ts +6 -0
- package/types/providers/AppSettingsProvider.d.ts +1 -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 +53 -5
- package/types/types/sdk.d.ts +5 -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 +13 -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 +1 -1
- package/types/utils/bank.d.ts +4 -0
- package/types/utils/transaction-confirmation-link.d.ts +9 -0
|
@@ -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,19 @@ 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
|
+
};
|
|
270
311
|
export type GetUserListRespDto = {
|
|
271
312
|
users: IUser[];
|
|
272
313
|
total: number;
|
|
@@ -352,6 +393,7 @@ export type IUser = {
|
|
|
352
393
|
departments?: IDepartment[];
|
|
353
394
|
roles?: IRole[];
|
|
354
395
|
tenant?: ITenant;
|
|
396
|
+
tenantId?: number;
|
|
355
397
|
permissions?: EPermissionKey[];
|
|
356
398
|
balance?: {
|
|
357
399
|
amount: number;
|
|
@@ -511,7 +553,9 @@ export declare enum EDebtReportStatus {
|
|
|
511
553
|
}
|
|
512
554
|
export declare enum ETransactionReportType {
|
|
513
555
|
FX = "fx",
|
|
514
|
-
ESIM = "esim"
|
|
556
|
+
ESIM = "esim",
|
|
557
|
+
INSURANCE = "insurance",
|
|
558
|
+
MOTOR_INSURANCE = "motor_insurance"
|
|
515
559
|
}
|
|
516
560
|
export declare enum ESimType {
|
|
517
561
|
ESIM = "esim",
|
|
@@ -529,10 +573,13 @@ export type IDebtReportTransaction = {
|
|
|
529
573
|
customerEmail?: string;
|
|
530
574
|
amount: number;
|
|
531
575
|
amountVnd: number;
|
|
532
|
-
currency
|
|
533
|
-
bankName
|
|
534
|
-
publicId
|
|
576
|
+
currency?: string;
|
|
577
|
+
bankName?: string;
|
|
578
|
+
publicId?: string;
|
|
535
579
|
bankTransactionId?: string;
|
|
580
|
+
insuranceProvider?: string;
|
|
581
|
+
insuranceType?: string;
|
|
582
|
+
policyId?: string;
|
|
536
583
|
createdAt: string;
|
|
537
584
|
commissionAmount: number;
|
|
538
585
|
};
|
|
@@ -544,6 +591,7 @@ export type IDebtReport = {
|
|
|
544
591
|
endDate: string;
|
|
545
592
|
transactionType: ETransactionReportType;
|
|
546
593
|
totalCommissionVnd: number;
|
|
594
|
+
totalAmountVnd: number;
|
|
547
595
|
totalCommissionByBank: Record<string, number>;
|
|
548
596
|
numSuccessfulTransactions: number;
|
|
549
597
|
status: EDebtReportStatus;
|
package/types/types/sdk.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
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"
|
|
4
8
|
}
|
|
@@ -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,13 @@
|
|
|
1
|
+
import { EOrderPaymentType } from '../types/enum';
|
|
2
|
+
export declare function getOrderPaymentStatusShortLabel(params: {
|
|
3
|
+
paymentTypeApplied?: EOrderPaymentType;
|
|
4
|
+
paidAmount?: number;
|
|
5
|
+
unpaidAmount?: number;
|
|
6
|
+
isBypassed?: boolean;
|
|
7
|
+
}): string;
|
|
8
|
+
export declare function getOrderPaymentStatusDetailLabel(params: {
|
|
9
|
+
paymentTypeApplied?: EOrderPaymentType;
|
|
10
|
+
paidAmount?: number;
|
|
11
|
+
unpaidAmount?: number;
|
|
12
|
+
isBypassed?: boolean;
|
|
13
|
+
}): 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,4 @@
|
|
|
1
1
|
import { ESimPackageDataLimitTimeframe, ESimPackageDataLimitUnit, ESimPackageValidityType, ETransactionType } from '../types/response.dto';
|
|
2
|
-
export declare const getTransactionType: (type: ETransactionType) => ETransactionType.STUDY | "Du học" | "Du lịch" | "Du lịch (Nhóm)" | "
|
|
2
|
+
export declare const getTransactionType: (type: ETransactionType) => ETransactionType.STUDY | "Du học" | "Kinh doanh" | "Du lịch" | "Du lịch (Nhóm)" | "Di trú";
|
|
3
3
|
export declare const formatDataLimit: (dataLimit: number, dataLimitUnit: ESimPackageDataLimitUnit, dataLimitTimeframe: ESimPackageDataLimitTimeframe) => string;
|
|
4
4
|
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;
|