gotrip-fx-transaction-form 1.0.205-dev → 1.0.206

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.
Files changed (209) hide show
  1. package/assets/index.css +1 -1
  2. package/index.js +54591 -42828
  3. package/package.json +1 -1
  4. package/types/components/AddTransaction/Agent.d.ts +3 -2
  5. package/types/components/AddTransaction/FlightInfomation.d.ts +2 -1
  6. package/types/components/AddTransaction/SelectingBankMessageAlerts.d.ts +5 -0
  7. package/types/components/Admin/AgencyUserSelector/AgencyUserSelector.d.ts +7 -0
  8. package/types/components/Admin/AgencyUserSelector/AgencyUserSelectorModal.d.ts +10 -0
  9. package/types/components/ApprovalLinkDropdown/ApprovalLinkDropdown.d.ts +6 -0
  10. package/types/components/ApprovalStatusBadge.d.ts +7 -0
  11. package/types/components/Apps/EmbededIndividualApp.d.ts +2 -1
  12. package/types/components/BankTransferInfo/BankTransferInfoDisplay.d.ts +7 -0
  13. package/types/components/Chat/AdminChatPanel.d.ts +5 -0
  14. package/types/components/Chat/AdminOnlineToggle.d.ts +1 -0
  15. package/types/components/Chat/AdminSessionItem.d.ts +6 -0
  16. package/types/components/Chat/AdminSessionList.d.ts +1 -0
  17. package/types/components/Chat/ChatAvatar.d.ts +9 -0
  18. package/types/components/Chat/ChatButton.d.ts +1 -0
  19. package/types/components/Chat/ChatComposer.d.ts +9 -0
  20. package/types/components/Chat/ChatImageGallery.d.ts +9 -0
  21. package/types/components/Chat/ChatMessage.d.ts +10 -0
  22. package/types/components/Chat/ChatNameForm.d.ts +5 -0
  23. package/types/components/Chat/ChatWidget.d.ts +1 -0
  24. package/types/components/Chat/ChatWindow.d.ts +1 -0
  25. package/types/components/Chat/ImageLightbox.d.ts +11 -0
  26. package/types/components/Chat/OfflineMessageMode.d.ts +1 -0
  27. package/types/components/Chat/QueueStatus.d.ts +1 -0
  28. package/types/components/Chat/SessionInfoHeader.d.ts +10 -0
  29. package/types/components/Chat/TopicSelector.d.ts +6 -0
  30. package/types/components/Chat/TransferSessionModal.d.ts +9 -0
  31. package/types/components/Chat/TypingIndicator.d.ts +7 -0
  32. package/types/components/Common/DateDisplay.d.ts +7 -0
  33. package/types/components/Common/MultiTagCombobox.d.ts +14 -0
  34. package/types/components/Common/PrimaryRadioGroup.d.ts +16 -0
  35. package/types/components/Common/TimeRangeSelect.d.ts +17 -0
  36. package/types/components/Insurance/CreateInsuranceTransactionForm.d.ts +37 -2
  37. package/types/components/Insurance/DateRangePicker.d.ts +2 -1
  38. package/types/components/Insurance/DebtPaymentQrButton.d.ts +8 -0
  39. package/types/components/Insurance/FxInsuranceCouponBox.d.ts +10 -0
  40. package/types/components/Insurance/InsuranceApprovalContent.d.ts +10 -0
  41. package/types/components/Insurance/InsuranceApprovalPageSDK.d.ts +5 -0
  42. package/types/components/Insurance/InsuranceApprovalPaymentStep.d.ts +28 -0
  43. package/types/components/Insurance/InsuranceDatePicker.d.ts +9 -0
  44. package/types/components/Insurance/InsurancePlans/QuickCoveragePlanCard.d.ts +4 -3
  45. package/types/components/Insurance/InsurancePlans/QuickRecommendationsSection.d.ts +18 -0
  46. package/types/components/Insurance/InsuranceSummaryOverview.d.ts +7 -2
  47. package/types/components/Insurance/InsuranceTypeAndPeopleCountFields.d.ts +10 -0
  48. package/types/components/Insurance/InsuredTravelersTable.d.ts +6 -0
  49. package/types/components/Insurance/MotorInsuranceApprovalContent.d.ts +10 -0
  50. package/types/components/Insurance/MotorInsuranceApprovalPageSDK.d.ts +5 -0
  51. package/types/components/Insurance/ProviderApiDebugDialog.d.ts +17 -0
  52. package/types/components/Insurance/SimpleDetail.d.ts +2 -1
  53. package/types/components/Insurance/StepFourPayment.d.ts +32 -5
  54. package/types/components/Insurance/StepOneForm.d.ts +10 -3
  55. package/types/components/Insurance/StepThree.d.ts +7 -2
  56. package/types/components/Insurance/StepThreeBuyerInfo.d.ts +4 -1
  57. package/types/components/Insurance/StepThreeInsuredPeople.d.ts +4 -1
  58. package/types/components/Insurance/documentScanAutofill.d.ts +37 -0
  59. package/types/components/Insurance/insuranceExcelImport.d.ts +13 -0
  60. package/types/components/Insurance/insuredPeopleImport.d.ts +23 -0
  61. package/types/components/Insurance/{FormElements.d.ts → shared/FormElements.d.ts} +13 -3
  62. package/types/components/Insurance/shared/InfoBlockCard.d.ts +10 -0
  63. package/types/components/Insurance/shared/PaymentMethodSelector.d.ts +10 -0
  64. package/types/components/Insurance/shared/SimpleSelect.d.ts +14 -0
  65. package/types/components/Insurance/shared/StepFooter.d.ts +8 -0
  66. package/types/components/Insurance/shared/index.d.ts +5 -0
  67. package/types/components/Insurance/types.d.ts +20 -5
  68. package/types/components/Insurance/validationUtils.d.ts +7 -1
  69. package/types/components/Modal/CancelTransactionModal.d.ts +1 -0
  70. package/types/components/Modal/DebtSettlementQrModal.d.ts +11 -0
  71. package/types/components/Modal/ESimPurchaseModal.d.ts +4 -1
  72. package/types/components/Modal/EsimBankTransferModal.d.ts +13 -0
  73. package/types/components/Modal/InsurancePaymentModal.d.ts +2 -0
  74. package/types/components/Modal/MotorInsurancePaymentModal.d.ts +13 -0
  75. package/types/components/Modal/ProcessingOrderDialog.d.ts +8 -0
  76. package/types/components/MotorInsurance/Bike/BikePremiumSummary.d.ts +9 -0
  77. package/types/components/MotorInsurance/Bike/BikeStepOneForm.d.ts +30 -0
  78. package/types/components/MotorInsurance/Bike/BikeStepThreePayment.d.ts +41 -0
  79. package/types/components/MotorInsurance/Bike/BikeStepTwoVehicleInfo.d.ts +12 -0
  80. package/types/components/MotorInsurance/Bike/CreateBikeInsuranceForm.d.ts +17 -0
  81. package/types/components/MotorInsurance/Bike/index.d.ts +5 -0
  82. package/types/components/MotorInsurance/Car/CarPremiumSummary.d.ts +8 -0
  83. package/types/components/MotorInsurance/Car/CarStepFourPayment.d.ts +45 -0
  84. package/types/components/MotorInsurance/Car/CarStepOneForm.d.ts +27 -0
  85. package/types/components/MotorInsurance/Car/CarStepThreeInfo.d.ts +11 -0
  86. package/types/components/MotorInsurance/Car/CarStepTwoPlan.d.ts +11 -0
  87. package/types/components/MotorInsurance/Car/CreateCarInsuranceForm.d.ts +17 -0
  88. package/types/components/MotorInsurance/Car/car-form.constants.d.ts +23 -0
  89. package/types/components/MotorInsurance/Car/index.d.ts +6 -0
  90. package/types/components/MotorInsurance/CreateMotorInsuranceTransactionForm.d.ts +17 -0
  91. package/types/components/MotorInsurance/DocumentUploadPreview.d.ts +14 -0
  92. package/types/components/MotorInsurance/MotorInsuranceApprovalPaymentStep.d.ts +20 -0
  93. package/types/components/MotorInsurance/image-storage.utils.d.ts +18 -0
  94. package/types/components/MotorInsurance/index.d.ts +4 -0
  95. package/types/components/MotorInsurance/motor-insurance.types.d.ts +335 -0
  96. package/types/components/MotorInsurance/motor-insurance.validation.d.ts +21 -0
  97. package/types/components/Notification/NotificationBell.d.ts +5 -0
  98. package/types/components/Notification/NotificationItem.d.ts +8 -0
  99. package/types/components/Notification/NotificationPanel.d.ts +6 -0
  100. package/types/components/OrderPaymentTypeBadge.d.ts +4 -0
  101. package/types/components/PolicyGroup/InsurancePolicyGroupFormDialog.d.ts +10 -0
  102. package/types/components/TransactionList/PublicIdActionMenu.d.ts +3 -1
  103. package/types/constants/api-urls.d.ts +55 -4
  104. package/types/constants/approval-link.enum.d.ts +4 -0
  105. package/types/constants/business-codes.d.ts +2 -1
  106. package/types/constants/chat-constants.d.ts +3 -0
  107. package/types/constants/env.d.ts +3 -0
  108. package/types/constants/policy-enums.d.ts +11 -0
  109. package/types/constants/regex.d.ts +4 -0
  110. package/types/constants/tenant.d.ts +3 -0
  111. package/types/constants/transaction-status-labels.d.ts +3 -0
  112. package/types/embeded-main.d.ts +3 -0
  113. package/types/hooks/fetchEsimTransaction.d.ts +2 -0
  114. package/types/hooks/transactions/useEducation.hook.d.ts +8 -8
  115. package/types/hooks/transactions/useGroupTransactions.d.ts +10 -10
  116. package/types/hooks/transactions/useImmigration.hook.d.ts +8 -8
  117. package/types/hooks/traveller-confirmation/submit-confirmation.util.d.ts +1 -0
  118. package/types/hooks/traveller-confirmation/traveller-confirmation-flow.d.ts +4 -0
  119. package/types/hooks/traveller-confirmation/types.d.ts +22 -0
  120. package/types/hooks/traveller-confirmation/usePurchaseTravellerConfirmation.d.ts +12 -0
  121. package/types/hooks/traveller-confirmation/useTravellerConfirmationFetch.d.ts +2 -0
  122. package/types/hooks/useAdminDashboard.d.ts +19 -0
  123. package/types/hooks/useAutoSelectBankBranchAndDepartment.d.ts +19 -0
  124. package/types/hooks/useBankOutsideWorkingHoursNotice.d.ts +5 -0
  125. package/types/hooks/useChat.d.ts +25 -0
  126. package/types/hooks/useConfirmTransaction.d.ts +16 -31
  127. package/types/hooks/useCoupon.d.ts +95 -0
  128. package/types/hooks/useCouponValidation.d.ts +29 -0
  129. package/types/hooks/useCreateAutoCoupon.d.ts +5 -0
  130. package/types/hooks/useFxCrossSellEnabled.d.ts +1 -0
  131. package/types/hooks/useFxPrefill.d.ts +19 -0
  132. package/types/hooks/useGroupCustomers.d.ts +12 -9
  133. package/types/hooks/useImportBookers.d.ts +18 -18
  134. package/types/hooks/useImportMembers.d.ts +18 -18
  135. package/types/hooks/useInsuranceData.d.ts +3 -11
  136. package/types/hooks/useInsurancePlans.d.ts +9 -2
  137. package/types/hooks/useInsuranceTransaction.d.ts +39 -4
  138. package/types/hooks/useLocationData.d.ts +22 -0
  139. package/types/hooks/useMotorInsurance.d.ts +17 -0
  140. package/types/hooks/useMotorInsuranceTransaction.d.ts +133 -0
  141. package/types/hooks/useMotorQuote.d.ts +15 -0
  142. package/types/hooks/useNotifications.d.ts +10 -0
  143. package/types/hooks/usePolicyGroups.d.ts +1 -0
  144. package/types/hooks/useTenantList.d.ts +1 -1
  145. package/types/hooks/useUserById.d.ts +7 -0
  146. package/types/hooks/useUserSearch.d.ts +10 -0
  147. package/types/hooks/useUsersByTenantTypes.d.ts +11 -0
  148. package/types/hooks/useVehicleRegistrationScan.d.ts +39 -0
  149. package/types/pages/admin/CreateOrderOnBehalfTest.d.ts +3 -0
  150. package/types/pages/admin/chat/AdminChatPage.d.ts +1 -0
  151. package/types/pages/admin/coupons/CampaignCouponTable.d.ts +13 -0
  152. package/types/pages/admin/coupons/CampaignDetailPage.d.ts +1 -0
  153. package/types/pages/admin/coupons/CampaignListPage.d.ts +1 -0
  154. package/types/pages/admin/coupons/CouponFormPage.d.ts +1 -0
  155. package/types/pages/admin/insurance/create-insurance-transaction/AdminCreateInsuranceTransactionPage.d.ts +2 -0
  156. package/types/pages/admin/insurance/edit-insurance-transaction/AdminEditInsuranceTransactionPage.d.ts +1 -0
  157. package/types/pages/admin/insurance-policy-management/InsurancePolicyManagement.d.ts +1 -0
  158. package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorBikeTransactionPage.d.ts +1 -0
  159. package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorCarTransactionPage.d.ts +1 -0
  160. package/types/pages/admin/motor-insurance/edit-motor-transaction/AdminEditMotorTransactionPage.d.ts +1 -0
  161. package/types/pages/admin/motor-insurance-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
  162. package/types/pages/admin/motor-insurance-transaction-list/MotorInsuranceTransactionListPage.d.ts +5 -0
  163. package/types/pages/agency/home/HomePage.d.ts +1 -0
  164. package/types/pages/agency/home/constants.d.ts +16 -0
  165. package/types/pages/agency/insurance/motor-transaction-approval/MotorInsuranceTransactionApprovalPage.d.ts +3 -0
  166. package/types/pages/agency/insurance/motor-transaction-create/CreateCarInsuranceTransactionPage.d.ts +1 -0
  167. package/types/pages/agency/insurance/motor-transaction-create/CreateMotorInsuranceTransactionPage.d.ts +1 -0
  168. package/types/pages/agency/insurance/motor-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
  169. package/types/pages/agency/insurance/motor-transaction-list/MotorInsuranceTransactionListPage.d.ts +6 -0
  170. package/types/pages/agency/insurance/transaction-approval/InsuranceTransactionApprovalPage.d.ts +3 -0
  171. package/types/pages/agency/insurance/transaction-create/CreateInsuranceTransactionPage.d.ts +2 -0
  172. package/types/pages/agency/traveller-confirmation/PurchaseTravellerConfirmation.d.ts +5 -0
  173. package/types/pages/agency/traveller-confirmation/TravellerPurchaseConfirmation.d.ts +2 -0
  174. package/types/pages/guest/insurance-approval.d.ts +1 -0
  175. package/types/pages/guest/insurance-create.d.ts +3 -1
  176. package/types/pages/guest/motor-insurance-approval.d.ts +1 -0
  177. package/types/pages/guest/motor-insurance-create.d.ts +6 -0
  178. package/types/providers/AppSettingsProvider.d.ts +1 -0
  179. package/types/store/useApprovalStore.d.ts +6 -0
  180. package/types/store/useChatStore.d.ts +35 -0
  181. package/types/store/useNotificationStore.d.ts +16 -0
  182. package/types/store/useTrackingStore.d.ts +10 -0
  183. package/types/types/app-settings.d.ts +13 -1
  184. package/types/types/chat.d.ts +88 -0
  185. package/types/types/coupon.d.ts +70 -0
  186. package/types/types/enum.d.ts +15 -2
  187. package/types/types/insurance-transaction.dto.d.ts +22 -1
  188. package/types/types/insurance.d.ts +19 -2
  189. package/types/types/notification.d.ts +23 -0
  190. package/types/types/response.dto.d.ts +60 -5
  191. package/types/types/sdk.d.ts +9 -1
  192. package/types/types/tracking.dto.d.ts +21 -0
  193. package/types/util/booker-display.d.ts +6 -0
  194. package/types/util/chat.d.ts +31 -0
  195. package/types/util/chatBrowserKey.d.ts +12 -0
  196. package/types/util/couponErrorMessages.d.ts +2 -0
  197. package/types/util/debt-report-display.d.ts +4 -0
  198. package/types/util/formatMessageTime.d.ts +1 -0
  199. package/types/util/formatWaitTime.d.ts +1 -0
  200. package/types/util/formatter.d.ts +6 -0
  201. package/types/util/fx-travelling-messages.d.ts +1 -0
  202. package/types/util/fx.d.ts +15 -0
  203. package/types/util/order-payment-display.d.ts +16 -0
  204. package/types/util/sim-display.d.ts +2 -0
  205. package/types/util/socket.d.ts +6 -1
  206. package/types/util/tracking.d.ts +19 -0
  207. package/types/util/transaction.util.d.ts +2 -1
  208. package/types/utils/bank.d.ts +4 -0
  209. package/types/utils/transaction-confirmation-link.d.ts +9 -0
@@ -0,0 +1,70 @@
1
+ export declare enum ECouponProductType {
2
+ BIKE_COMPULSORY = "bike_compulsory",
3
+ CAR_COMPULSORY = "car_compulsory",
4
+ TRAVEL_DOMESTIC = "travel_domestic",
5
+ TRAVEL_INTERNATIONAL = "travel_international",
6
+ ESIM = "esim"
7
+ }
8
+ export type TCouponStatus = 'active' | 'inactive';
9
+ export type TCampaignStatus = 'active' | 'inactive';
10
+ export type TCampaignRef = {
11
+ id: number;
12
+ name: string;
13
+ status: TCampaignStatus;
14
+ };
15
+ export type TCouponConditions = {
16
+ minOrderValue: number | null;
17
+ firstOrderOnly: boolean;
18
+ flashSaleStart: string | null;
19
+ flashSaleEnd: string | null;
20
+ };
21
+ export type TCouponRow = {
22
+ id: number;
23
+ code: string;
24
+ name: string | null;
25
+ campaignId?: number | null;
26
+ campaign?: TCampaignRef | null;
27
+ status: string;
28
+ usedCount: number;
29
+ totalUsageLimit: number | null;
30
+ expireAt: string;
31
+ startAt?: string;
32
+ createdAt?: string;
33
+ discountType: string;
34
+ discountValue: number;
35
+ maxDiscountAmount?: number | null;
36
+ productTypes?: string[] | null;
37
+ providers?: string[] | null;
38
+ };
39
+ export type TCampaignRow = {
40
+ id: number;
41
+ name: string;
42
+ status: TCampaignStatus;
43
+ totalCoupons: number;
44
+ usedCoupons: number;
45
+ createdAt: string;
46
+ };
47
+ export type TCouponAdminSummary = {
48
+ totalCoupons: number;
49
+ activeCoupons: number;
50
+ usageToday: number;
51
+ totalDiscountAmountThisMonth: number;
52
+ };
53
+ export type TCouponDetail = {
54
+ campaignId?: number | null;
55
+ code: string;
56
+ name: string | null;
57
+ description?: string | null;
58
+ status?: TCouponStatus;
59
+ startAt: string;
60
+ expireAt: string;
61
+ totalUsageLimit: number | null;
62
+ tenantIds?: number[] | null;
63
+ userIds?: number[] | null;
64
+ discountType: string;
65
+ discountValue: number;
66
+ maxDiscountAmount: number | null;
67
+ conditions?: TCouponConditions;
68
+ productTypes: string[] | null;
69
+ providers: string[] | null;
70
+ };
@@ -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 only)
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,9 +250,11 @@ 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[];
257
+ crossSell?: boolean;
233
258
  };
234
259
  esimOutbound: Record<string, any>;
235
260
  esimInbound: Record<string, any>;
@@ -239,6 +264,10 @@ export interface ITravelAgencyTenantSettings {
239
264
  insurance: {
240
265
  providers: string[];
241
266
  };
267
+ motorInsurance: {
268
+ providers: string[];
269
+ };
270
+ paymentType?: EOrderPaymentType;
242
271
  }
243
272
  export interface IBankTenantSettings {
244
273
  availableCurrencies: string[];
@@ -267,6 +296,25 @@ export type GetESimTransactionListRespDto = {
267
296
  page: number;
268
297
  limit: number;
269
298
  };
299
+ export type BankTransferInfo = {
300
+ bankAccount: string;
301
+ accountName: string;
302
+ amount: number;
303
+ transferContent: string;
304
+ bankCode: string;
305
+ };
306
+ export type CreateEsimTransactionBankTransferResponse = {
307
+ qrCodeUrl: string;
308
+ transactionPublicId: string;
309
+ totalAmount: number;
310
+ bankTransferInfo?: BankTransferInfo;
311
+ };
312
+ export type DebtPaymentQrResponse = {
313
+ qrCodeUrl: string;
314
+ transactionPublicId: string;
315
+ totalAmount: number;
316
+ bankTransferInfo?: BankTransferInfo;
317
+ };
270
318
  export type GetUserListRespDto = {
271
319
  users: IUser[];
272
320
  total: number;
@@ -352,6 +400,7 @@ export type IUser = {
352
400
  departments?: IDepartment[];
353
401
  roles?: IRole[];
354
402
  tenant?: ITenant;
403
+ tenantId?: number;
355
404
  permissions?: EPermissionKey[];
356
405
  balance?: {
357
406
  amount: number;
@@ -511,7 +560,9 @@ export declare enum EDebtReportStatus {
511
560
  }
512
561
  export declare enum ETransactionReportType {
513
562
  FX = "fx",
514
- ESIM = "esim"
563
+ ESIM = "esim",
564
+ INSURANCE = "insurance",
565
+ MOTOR_INSURANCE = "motor_insurance"
515
566
  }
516
567
  export declare enum ESimType {
517
568
  ESIM = "esim",
@@ -529,10 +580,13 @@ export type IDebtReportTransaction = {
529
580
  customerEmail?: string;
530
581
  amount: number;
531
582
  amountVnd: number;
532
- currency: string;
533
- bankName: string;
534
- publicId: string;
583
+ currency?: string;
584
+ bankName?: string;
585
+ publicId?: string;
535
586
  bankTransactionId?: string;
587
+ insuranceProvider?: string;
588
+ insuranceType?: string;
589
+ policyId?: string;
536
590
  createdAt: string;
537
591
  commissionAmount: number;
538
592
  };
@@ -544,6 +598,7 @@ export type IDebtReport = {
544
598
  endDate: string;
545
599
  transactionType: ETransactionReportType;
546
600
  totalCommissionVnd: number;
601
+ totalAmountVnd: number;
547
602
  totalCommissionByBank: Record<string, number>;
548
603
  numSuccessfulTransactions: number;
549
604
  status: EDebtReportStatus;
@@ -1,4 +1,12 @@
1
1
  export declare enum ESdkFormType {
2
2
  FX = "fx",
3
- INSURANCE = "insurance"
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",
11
+ CHAT_SUPPORT = "chat_support"
4
12
  }
@@ -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,31 @@
1
+ import { ETenantType } from '../types/enum';
2
+ import { IChatMessage } from '../types/chat';
3
+ export declare const getAvatarColor: (userId: number) => string;
4
+ export declare const getAvatarInitials: (firstName?: string, lastName?: string) => string;
5
+ export declare const getNameInitials: (fullName?: string) => string;
6
+ /** Join first + last name, falling back to `fallback` when both are empty. */
7
+ export declare const getFullName: (info?: {
8
+ firstName?: string;
9
+ lastName?: string;
10
+ } | null, fallback?: string) => string;
11
+ /** Whether the given user belongs to the internal (SYSTEM) tenant, i.e. an admin. */
12
+ export declare const isAdminUser: (user?: {
13
+ tenant?: {
14
+ type?: ETenantType;
15
+ } | null;
16
+ } | null) => boolean;
17
+ /**
18
+ * Legacy image messages stored their URLs as a JSON array string in `content`.
19
+ * Parse defensively, falling back to treating the raw content as a single URL.
20
+ */
21
+ export declare const parseImageUrls: (content: string) => string[];
22
+ /**
23
+ * Image URLs for a message. Prefers the structured `media` column; falls back
24
+ * to the legacy `messageType === 'image'` content-as-JSON encoding.
25
+ */
26
+ export declare const getMessageImages: (message: IChatMessage) => string[];
27
+ /**
28
+ * Text of a message to display as a bubble/caption. The legacy image encoding
29
+ * stored a JSON URL array in `content`, which must not be shown as text.
30
+ */
31
+ export declare const getMessageText: (message: IChatMessage) => string;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Stable per-browser chat identity. Read-or-create a UUID in localStorage.
3
+ *
4
+ * The same agency identity (e.g. all visitors of a tenant behind one api-key)
5
+ * is split into one chat session per browser using this key. It is sent to the
6
+ * backend on every chat request (REST header `x-chat-browser-key`) and on the
7
+ * socket handshake (`auth.browserKey`).
8
+ *
9
+ * Idempotent: the first call on a browser writes the key; later calls reuse it.
10
+ * Call it once at app bootstrap so the key exists before any chat call fires.
11
+ */
12
+ export declare const getChatBrowserKey: () => string;
@@ -0,0 +1,2 @@
1
+ export declare function getBusinessMessageFromCode(code: string | undefined | null): string;
2
+ export declare function getCouponErrorCodeFromAxios(err: unknown): string | undefined;
@@ -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;
@@ -0,0 +1 @@
1
+ export declare const formatMessageTime: (dateString: string) => string;
@@ -0,0 +1 @@
1
+ export declare const formatWaitTime: (waitTimeSeconds?: number) => 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;
@@ -1,8 +1,13 @@
1
1
  import { Socket } from 'socket.io-client';
2
+ /**
3
+ * Request browser notification permission. Call from a user gesture
4
+ * (e.g. opening the chat widget or an admin going online).
5
+ */
6
+ export declare const requestNotificationPermission: () => void;
2
7
  /**
3
8
  * Initialize Socket.IO connection with authentication token
4
9
  */
5
- export declare const initializeSocket: (token: string) => Socket;
10
+ export declare const initializeSocket: (token?: string) => Socket;
6
11
  /**
7
12
  * Get the current socket instance
8
13
  */
@@ -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 getTransactionType: (type: ETransactionType) => ETransactionType.STUDY | "Du học" | "Du lịch" | "Du lịch (Nhóm)" | "Kinh doanh" | "Di trú";
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;