gotrip-fx-transaction-form 1.0.192-dev → 1.0.192

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 (173) hide show
  1. package/assets/index.css +1 -1
  2. package/index.js +51207 -40767
  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/ApprovalStatusBadge.d.ts +7 -0
  10. package/types/components/Apps/EmbededIndividualApp.d.ts +3 -1
  11. package/types/components/BankTransferInfo/BankTransferInfoDisplay.d.ts +7 -0
  12. package/types/components/Common/DateDisplay.d.ts +7 -0
  13. package/types/components/Common/MultiTagCombobox.d.ts +14 -0
  14. package/types/components/Common/PrimaryRadioGroup.d.ts +16 -0
  15. package/types/components/Common/TimeRangeSelect.d.ts +17 -0
  16. package/types/components/Department/DepartmentCard.d.ts +3 -1
  17. package/types/components/Insurance/CreateInsuranceTransactionForm.d.ts +23 -5
  18. package/types/components/Insurance/DateRangePicker.d.ts +12 -0
  19. package/types/components/Insurance/InsuranceContentRenderer/DynamicRenderer.d.ts +6 -0
  20. package/types/components/Insurance/InsuranceContentRenderer/blocks/AccordionBlock.d.ts +6 -0
  21. package/types/components/Insurance/InsuranceContentRenderer/blocks/ActionButtonBlock.d.ts +6 -0
  22. package/types/components/Insurance/InsuranceContentRenderer/blocks/ContainerBlock.d.ts +6 -0
  23. package/types/components/Insurance/InsuranceContentRenderer/blocks/DataRowBlock.d.ts +6 -0
  24. package/types/components/Insurance/InsuranceContentRenderer/blocks/DividerBlock.d.ts +6 -0
  25. package/types/components/Insurance/InsuranceContentRenderer/blocks/ListGroupBlock.d.ts +6 -0
  26. package/types/components/Insurance/InsuranceContentRenderer/blocks/TextBlock.d.ts +6 -0
  27. package/types/components/Insurance/InsuranceContentRenderer/types.d.ts +64 -0
  28. package/types/components/Insurance/InsuranceContentRenderer/utils/richText.d.ts +14 -0
  29. package/types/components/Insurance/InsuranceContentRenderer/utils/styleMapper.d.ts +6 -0
  30. package/types/components/Insurance/InsuranceDatePicker.d.ts +9 -0
  31. package/types/components/Insurance/InsurancePlans/InsurancePlanFilter.d.ts +12 -0
  32. package/types/components/Insurance/InsurancePlans/InsurancePlanList.d.ts +1 -1
  33. package/types/components/Insurance/InsurancePlans/QuickCoveragePlanCard.d.ts +16 -0
  34. package/types/components/Insurance/InsurancePlans/QuickRecommendationsSection.d.ts +18 -0
  35. package/types/components/Insurance/InsurancePlans/index.d.ts +1 -0
  36. package/types/components/Insurance/InsuranceSummaryOverview.d.ts +7 -2
  37. package/types/components/Insurance/InsuranceTypeAndPeopleCountFields.d.ts +10 -0
  38. package/types/components/Insurance/InsuredTravelersTable.d.ts +6 -0
  39. package/types/components/Insurance/ProviderApiDebugDialog.d.ts +17 -0
  40. package/types/components/Insurance/SimpleDetail.d.ts +2 -1
  41. package/types/components/Insurance/StepFourPayment.d.ts +25 -5
  42. package/types/components/Insurance/StepOneForm.d.ts +11 -2
  43. package/types/components/Insurance/StepThree.d.ts +29 -0
  44. package/types/components/Insurance/StepThreeBuyerInfo.d.ts +4 -1
  45. package/types/components/Insurance/StepThreeInsuredPeople.d.ts +4 -1
  46. package/types/components/Insurance/StepTwoPlans.d.ts +9 -1
  47. package/types/components/Insurance/documentScanAutofill.d.ts +37 -0
  48. package/types/components/Insurance/insuranceExcelImport.d.ts +13 -0
  49. package/types/components/Insurance/insuredPeopleImport.d.ts +23 -0
  50. package/types/components/Insurance/{FormElements.d.ts → shared/FormElements.d.ts} +13 -3
  51. package/types/components/Insurance/shared/InfoBlockCard.d.ts +10 -0
  52. package/types/components/Insurance/shared/PaymentMethodSelector.d.ts +10 -0
  53. package/types/components/Insurance/shared/SimpleSelect.d.ts +14 -0
  54. package/types/components/Insurance/shared/StepFooter.d.ts +8 -0
  55. package/types/components/Insurance/shared/index.d.ts +5 -0
  56. package/types/components/Insurance/types.d.ts +22 -5
  57. package/types/components/Insurance/validationUtils.d.ts +7 -1
  58. package/types/components/Modal/CancelTransactionModal.d.ts +1 -0
  59. package/types/components/Modal/ESimPurchaseModal.d.ts +4 -1
  60. package/types/components/Modal/EsimBankTransferModal.d.ts +13 -0
  61. package/types/components/Modal/InsurancePaymentModal.d.ts +2 -0
  62. package/types/components/Modal/MotorInsurancePaymentModal.d.ts +13 -0
  63. package/types/components/Modal/ProcessingOrderDialog.d.ts +8 -0
  64. package/types/components/Modal/UpdateTenantCommissionInputCell.d.ts +14 -13
  65. package/types/components/MotorInsurance/Bike/BikePremiumSummary.d.ts +9 -0
  66. package/types/components/MotorInsurance/Bike/BikeStepOneForm.d.ts +30 -0
  67. package/types/components/MotorInsurance/Bike/BikeStepThreePayment.d.ts +26 -0
  68. package/types/components/MotorInsurance/Bike/BikeStepTwoVehicleInfo.d.ts +12 -0
  69. package/types/components/MotorInsurance/Bike/CreateBikeInsuranceForm.d.ts +17 -0
  70. package/types/components/MotorInsurance/Bike/index.d.ts +5 -0
  71. package/types/components/MotorInsurance/Car/CarPremiumSummary.d.ts +8 -0
  72. package/types/components/MotorInsurance/Car/CarStepFourPayment.d.ts +30 -0
  73. package/types/components/MotorInsurance/Car/CarStepOneForm.d.ts +27 -0
  74. package/types/components/MotorInsurance/Car/CarStepThreeInfo.d.ts +11 -0
  75. package/types/components/MotorInsurance/Car/CarStepTwoPlan.d.ts +11 -0
  76. package/types/components/MotorInsurance/Car/CreateCarInsuranceForm.d.ts +17 -0
  77. package/types/components/MotorInsurance/Car/car-form.constants.d.ts +23 -0
  78. package/types/components/MotorInsurance/Car/index.d.ts +6 -0
  79. package/types/components/MotorInsurance/CreateMotorInsuranceTransactionForm.d.ts +17 -0
  80. package/types/components/MotorInsurance/DocumentUploadPreview.d.ts +14 -0
  81. package/types/components/MotorInsurance/image-storage.utils.d.ts +18 -0
  82. package/types/components/MotorInsurance/index.d.ts +4 -0
  83. package/types/components/MotorInsurance/motor-insurance.types.d.ts +335 -0
  84. package/types/components/MotorInsurance/motor-insurance.validation.d.ts +21 -0
  85. package/types/components/Notification/NotificationBell.d.ts +5 -0
  86. package/types/components/Notification/NotificationItem.d.ts +8 -0
  87. package/types/components/Notification/NotificationPanel.d.ts +6 -0
  88. package/types/components/OrderPaymentTypeBadge.d.ts +4 -0
  89. package/types/components/PolicyGroup/CommissionPolicyGroupFormDialog.d.ts +16 -0
  90. package/types/components/PolicyGroup/CommissionPolicyGroupListView.d.ts +11 -0
  91. package/types/components/PolicyGroup/InsurancePolicyGroupFormDialog.d.ts +10 -0
  92. package/types/components/PolicyGroup/PolicyRulesEditor.d.ts +54 -0
  93. package/types/components/PolicyGroup/PolicyTypes.d.ts +41 -0
  94. package/types/components/PolicyGroup/PricingPolicyListView.d.ts +11 -0
  95. package/types/components/StepIndicator/StepIndicatorHorizontal.d.ts +2 -1
  96. package/types/constants/api-urls.d.ts +63 -6
  97. package/types/constants/business-codes.d.ts +2 -1
  98. package/types/constants/commission-policy-constants.d.ts +5 -0
  99. package/types/constants/env.d.ts +2 -0
  100. package/types/constants/policy-enums.d.ts +18 -1
  101. package/types/constants/regex.d.ts +4 -0
  102. package/types/embeded-main.d.ts +1 -0
  103. package/types/hooks/fetchEsimTransaction.d.ts +2 -0
  104. package/types/hooks/transactions/useGroupTransactions.d.ts +10 -10
  105. package/types/hooks/useAdminDashboard.d.ts +19 -0
  106. package/types/hooks/useBankOutsideWorkingHoursNotice.d.ts +5 -0
  107. package/types/hooks/useComissionPolicies.d.ts +6 -6
  108. package/types/hooks/useCoupon.d.ts +95 -0
  109. package/types/hooks/useCouponValidation.d.ts +29 -0
  110. package/types/hooks/useGroupCustomers.d.ts +12 -9
  111. package/types/hooks/useInsuranceData.d.ts +3 -11
  112. package/types/hooks/useInsurancePlans.d.ts +13 -1
  113. package/types/hooks/useInsuranceTransaction.d.ts +34 -4
  114. package/types/hooks/useLocationData.d.ts +22 -0
  115. package/types/hooks/useMotorInsurance.d.ts +17 -0
  116. package/types/hooks/useMotorInsuranceTransaction.d.ts +124 -0
  117. package/types/hooks/useMotorQuote.d.ts +15 -0
  118. package/types/hooks/useNotifications.d.ts +10 -0
  119. package/types/hooks/usePolicyGroups.d.ts +17 -1
  120. package/types/hooks/useTenantList.d.ts +5 -4
  121. package/types/hooks/useUserById.d.ts +7 -0
  122. package/types/hooks/useUserList.d.ts +3 -1
  123. package/types/hooks/useUserSearch.d.ts +10 -0
  124. package/types/hooks/useUsersByTenantTypes.d.ts +11 -0
  125. package/types/hooks/useVehicleRegistrationScan.d.ts +39 -0
  126. package/types/pages/admin/CreateOrderOnBehalfTest.d.ts +3 -0
  127. package/types/pages/admin/coupons/CampaignCouponTable.d.ts +13 -0
  128. package/types/pages/admin/coupons/CampaignDetailPage.d.ts +1 -0
  129. package/types/pages/admin/coupons/CampaignListPage.d.ts +1 -0
  130. package/types/pages/admin/coupons/CouponFormPage.d.ts +1 -0
  131. package/types/pages/admin/fx-commission-policy/FxCommissionPolicyManagement.d.ts +1 -0
  132. package/types/pages/admin/insurance/create-insurance-transaction/AdminCreateInsuranceTransactionPage.d.ts +2 -0
  133. package/types/pages/admin/insurance/edit-insurance-transaction/AdminEditInsuranceTransactionPage.d.ts +1 -0
  134. package/types/pages/admin/insurance-policy-management/InsurancePolicyManagement.d.ts +1 -0
  135. package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorBikeTransactionPage.d.ts +1 -0
  136. package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorCarTransactionPage.d.ts +1 -0
  137. package/types/pages/admin/motor-insurance/edit-motor-transaction/AdminEditMotorTransactionPage.d.ts +1 -0
  138. package/types/pages/admin/motor-insurance-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
  139. package/types/pages/admin/motor-insurance-transaction-list/MotorInsuranceTransactionListPage.d.ts +5 -0
  140. package/types/pages/agency/home/HomePage.d.ts +1 -0
  141. package/types/pages/agency/home/constants.d.ts +16 -0
  142. package/types/pages/agency/insurance/motor-transaction-approval/MotorInsuranceTransactionApprovalPage.d.ts +1 -0
  143. package/types/pages/agency/insurance/motor-transaction-create/CreateCarInsuranceTransactionPage.d.ts +1 -0
  144. package/types/pages/agency/insurance/motor-transaction-create/CreateMotorInsuranceTransactionPage.d.ts +1 -0
  145. package/types/pages/agency/insurance/motor-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
  146. package/types/pages/agency/insurance/motor-transaction-list/MotorInsuranceTransactionListPage.d.ts +6 -0
  147. package/types/pages/agency/insurance/transaction-approval/InsuranceTransactionApprovalPage.d.ts +1 -0
  148. package/types/pages/agency/insurance/transaction-create/CreateInsuranceTransactionPage.d.ts +2 -0
  149. package/types/pages/guest/insurance-create.d.ts +8 -1
  150. package/types/pages/guest/motor-insurance-create.d.ts +6 -0
  151. package/types/providers/AppSettingsProvider.d.ts +1 -0
  152. package/types/store/useNotificationStore.d.ts +16 -0
  153. package/types/store/useTenantStore.d.ts +12 -0
  154. package/types/store/useTrackingStore.d.ts +8 -0
  155. package/types/types/app-settings.d.ts +13 -1
  156. package/types/types/coupon.d.ts +70 -0
  157. package/types/types/enum.d.ts +14 -1
  158. package/types/types/insurance-transaction.dto.d.ts +21 -1
  159. package/types/types/insurance.d.ts +19 -2
  160. package/types/types/notification.d.ts +23 -0
  161. package/types/types/response.dto.d.ts +78 -8
  162. package/types/types/sdk.d.ts +5 -1
  163. package/types/types/tracking.dto.d.ts +19 -0
  164. package/types/util/booker-display.d.ts +6 -0
  165. package/types/util/couponErrorMessages.d.ts +2 -0
  166. package/types/util/debt-report-display.d.ts +4 -0
  167. package/types/util/formatter.d.ts +6 -0
  168. package/types/util/fx-travelling-messages.d.ts +1 -0
  169. package/types/util/fx.d.ts +15 -0
  170. package/types/util/order-payment-display.d.ts +13 -0
  171. package/types/util/sim-display.d.ts +2 -0
  172. package/types/util/tracking.d.ts +29 -0
  173. package/types/util/transaction.util.d.ts +1 -1
@@ -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
+ };
@@ -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,6 +102,18 @@ 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;
@@ -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,5 @@
1
- import { ECommissionPolicyCalculationType, ECommissionPolicyType, ESimDomesticServices, EsimTransactionStatus, ETenantType, EUseCaseses, TransactionStatus } from './enum';
1
+ import { ECommissionPolicyType, EPaymentMode, EOrderPaymentType, ESimDomesticServices, EsimTransactionStatus, ETenantType, EUseCaseses, TransactionStatus } from './enum';
2
+ import { EPolicyActionType } from '../constants/policy-enums';
2
3
  import { EPermissionKey, EUserRole, EUserStatus } from './user';
3
4
  export type LoginRespDto = {
4
5
  accessToken: string;
@@ -105,6 +106,20 @@ export type ITransaction = {
105
106
  fileUrls?: IFileUrls;
106
107
  cancelledAt?: string;
107
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
+ };
108
123
  assignedUserId?: number;
109
124
  assignedUser?: {
110
125
  id: number;
@@ -117,6 +132,10 @@ export type IESimTransaction = {
117
132
  id: number;
118
133
  esimTransactionId: number;
119
134
  vndAmount?: number;
135
+ paymentAmount?: number;
136
+ couponId?: number;
137
+ couponCode?: string;
138
+ couponDiscountAmount?: number;
120
139
  originalVndAmount?: number;
121
140
  amount?: number;
122
141
  packageId?: number;
@@ -125,6 +144,11 @@ export type IESimTransaction = {
125
144
  agencyOrderId?: number;
126
145
  orderCode?: string;
127
146
  status: EsimTransactionStatus;
147
+ paymentMode?: EPaymentMode;
148
+ paymentTypeApplied?: EOrderPaymentType;
149
+ paidAmount?: number;
150
+ unpaidAmount?: number;
151
+ isBypassed?: boolean;
128
152
  lastSyncedAt?: Date;
129
153
  publicId: string;
130
154
  createdResponseLog?: Record<string, any>;
@@ -226,6 +250,7 @@ export interface ITravelAgencyTenantSettings {
226
250
  esimInbound: boolean;
227
251
  simDomestic: boolean;
228
252
  insurance: boolean;
253
+ motorInsurance: boolean;
229
254
  };
230
255
  fx: {
231
256
  useCases: EUseCaseses[];
@@ -238,6 +263,10 @@ export interface ITravelAgencyTenantSettings {
238
263
  insurance: {
239
264
  providers: string[];
240
265
  };
266
+ motorInsurance: {
267
+ providers: string[];
268
+ };
269
+ paymentType?: EOrderPaymentType;
241
270
  }
242
271
  export interface IBankTenantSettings {
243
272
  availableCurrencies: string[];
@@ -266,6 +295,19 @@ export type GetESimTransactionListRespDto = {
266
295
  page: number;
267
296
  limit: number;
268
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
+ };
269
311
  export type GetUserListRespDto = {
270
312
  users: IUser[];
271
313
  total: number;
@@ -351,6 +393,7 @@ export type IUser = {
351
393
  departments?: IDepartment[];
352
394
  roles?: IRole[];
353
395
  tenant?: ITenant;
396
+ tenantId?: number;
354
397
  permissions?: EPermissionKey[];
355
398
  balance?: {
356
399
  amount: number;
@@ -401,6 +444,27 @@ export type IPermission = {
401
444
  description: string;
402
445
  globalPermission: IGlobalPermission;
403
446
  };
447
+ export interface IRemappedCommissionPolicy {
448
+ userId: number | null;
449
+ tenantId: number;
450
+ departmentId: number | null;
451
+ bankCode: string;
452
+ currencyCode: string;
453
+ action: {
454
+ direct: {
455
+ type: string;
456
+ value: number;
457
+ };
458
+ viaRef: {
459
+ type: string;
460
+ value: number;
461
+ };
462
+ indirect: {
463
+ type: string;
464
+ value: number;
465
+ };
466
+ };
467
+ }
404
468
  export interface ICommissionPolicy {
405
469
  currencyCode?: string;
406
470
  userId?: number;
@@ -409,9 +473,9 @@ export interface ICommissionPolicy {
409
473
  memberId?: number;
410
474
  bankId?: number;
411
475
  type: ECommissionPolicyType;
412
- directType: ECommissionPolicyCalculationType;
413
- viaRefType: ECommissionPolicyCalculationType;
414
- indirectType: ECommissionPolicyCalculationType;
476
+ directType: EPolicyActionType;
477
+ viaRefType: EPolicyActionType;
478
+ indirectType: EPolicyActionType;
415
479
  byFixedAmountDirect?: number;
416
480
  byPercentDirect?: number;
417
481
  byFixedAmountViaRef?: number;
@@ -489,7 +553,9 @@ export declare enum EDebtReportStatus {
489
553
  }
490
554
  export declare enum ETransactionReportType {
491
555
  FX = "fx",
492
- ESIM = "esim"
556
+ ESIM = "esim",
557
+ INSURANCE = "insurance",
558
+ MOTOR_INSURANCE = "motor_insurance"
493
559
  }
494
560
  export declare enum ESimType {
495
561
  ESIM = "esim",
@@ -507,10 +573,13 @@ export type IDebtReportTransaction = {
507
573
  customerEmail?: string;
508
574
  amount: number;
509
575
  amountVnd: number;
510
- currency: string;
511
- bankName: string;
512
- publicId: string;
576
+ currency?: string;
577
+ bankName?: string;
578
+ publicId?: string;
513
579
  bankTransactionId?: string;
580
+ insuranceProvider?: string;
581
+ insuranceType?: string;
582
+ policyId?: string;
514
583
  createdAt: string;
515
584
  commissionAmount: number;
516
585
  };
@@ -522,6 +591,7 @@ export type IDebtReport = {
522
591
  endDate: string;
523
592
  transactionType: ETransactionReportType;
524
593
  totalCommissionVnd: number;
594
+ totalAmountVnd: number;
525
595
  totalCommissionByBank: Record<string, number>;
526
596
  numSuccessfulTransactions: number;
527
597
  status: EDebtReportStatus;
@@ -1,4 +1,8 @@
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"
4
8
  }
@@ -0,0 +1,19 @@
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
+ }
15
+ /**
16
+ * Type helper to extend any DTO with tracking fields
17
+ * Usage: type MyDtoWithTracking = WithTracking<MyDto>
18
+ */
19
+ 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,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;
@@ -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,29 @@
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
+ * Parse tracking parameters from URL query string
18
+ * Extracts gclid, fbid, campaign, etc. from URL
19
+ */
20
+ export declare const parseTrackingParamsFromUrl: () => {
21
+ gclid?: string;
22
+ fbid?: string;
23
+ campaign?: string;
24
+ [key: string]: string | undefined;
25
+ };
26
+ /**
27
+ * Validate tracking data
28
+ */
29
+ 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)" | "Kinh doanh" | "Di trú";
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;