gotrip-fx-transaction-form 1.0.202-dev → 1.0.202

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/assets/index.css +1 -1
  2. package/index.js +50632 -40017
  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/Common/DateDisplay.d.ts +7 -0
  14. package/types/components/Common/MultiTagCombobox.d.ts +14 -0
  15. package/types/components/Common/PrimaryRadioGroup.d.ts +16 -0
  16. package/types/components/Common/TimeRangeSelect.d.ts +17 -0
  17. package/types/components/Insurance/CreateInsuranceTransactionForm.d.ts +38 -2
  18. package/types/components/Insurance/DateRangePicker.d.ts +12 -0
  19. package/types/components/Insurance/DebtPaymentQrButton.d.ts +8 -0
  20. package/types/components/Insurance/FxInsuranceCouponBox.d.ts +10 -0
  21. package/types/components/Insurance/InsuranceApprovalContent.d.ts +10 -0
  22. package/types/components/Insurance/InsuranceApprovalPageSDK.d.ts +5 -0
  23. package/types/components/Insurance/InsuranceApprovalPaymentStep.d.ts +28 -0
  24. package/types/components/Insurance/InsuranceDatePicker.d.ts +9 -0
  25. package/types/components/Insurance/InsurancePlans/InsurancePlanList.d.ts +1 -1
  26. package/types/components/Insurance/InsurancePlans/QuickCoveragePlanCard.d.ts +16 -0
  27. package/types/components/Insurance/InsurancePlans/QuickRecommendationsSection.d.ts +18 -0
  28. package/types/components/Insurance/InsuranceSummaryOverview.d.ts +7 -2
  29. package/types/components/Insurance/InsuranceTypeAndPeopleCountFields.d.ts +10 -0
  30. package/types/components/Insurance/InsuredTravelersTable.d.ts +6 -0
  31. package/types/components/Insurance/MotorInsuranceApprovalContent.d.ts +10 -0
  32. package/types/components/Insurance/MotorInsuranceApprovalPageSDK.d.ts +5 -0
  33. package/types/components/Insurance/ProviderApiDebugDialog.d.ts +17 -0
  34. package/types/components/Insurance/SimpleDetail.d.ts +2 -1
  35. package/types/components/Insurance/StepFourPayment.d.ts +32 -5
  36. package/types/components/Insurance/StepOneForm.d.ts +11 -2
  37. package/types/components/Insurance/StepThree.d.ts +29 -0
  38. package/types/components/Insurance/StepThreeBuyerInfo.d.ts +4 -1
  39. package/types/components/Insurance/StepThreeInsuredPeople.d.ts +4 -1
  40. package/types/components/Insurance/documentScanAutofill.d.ts +37 -0
  41. package/types/components/Insurance/insuranceExcelImport.d.ts +13 -0
  42. package/types/components/Insurance/insuredPeopleImport.d.ts +23 -0
  43. package/types/components/Insurance/{FormElements.d.ts → shared/FormElements.d.ts} +13 -3
  44. package/types/components/Insurance/shared/InfoBlockCard.d.ts +10 -0
  45. package/types/components/Insurance/shared/PaymentMethodSelector.d.ts +10 -0
  46. package/types/components/Insurance/shared/SimpleSelect.d.ts +14 -0
  47. package/types/components/Insurance/shared/StepFooter.d.ts +8 -0
  48. package/types/components/Insurance/shared/index.d.ts +5 -0
  49. package/types/components/Insurance/types.d.ts +21 -6
  50. package/types/components/Insurance/validationUtils.d.ts +7 -1
  51. package/types/components/Modal/CancelTransactionModal.d.ts +1 -0
  52. package/types/components/Modal/DebtSettlementQrModal.d.ts +11 -0
  53. package/types/components/Modal/ESimPurchaseModal.d.ts +4 -1
  54. package/types/components/Modal/EsimBankTransferModal.d.ts +13 -0
  55. package/types/components/Modal/InsurancePaymentModal.d.ts +2 -0
  56. package/types/components/Modal/MotorInsurancePaymentModal.d.ts +13 -0
  57. package/types/components/Modal/ProcessingOrderDialog.d.ts +8 -0
  58. package/types/components/MotorInsurance/Bike/BikePremiumSummary.d.ts +9 -0
  59. package/types/components/MotorInsurance/Bike/BikeStepOneForm.d.ts +30 -0
  60. package/types/components/MotorInsurance/Bike/BikeStepThreePayment.d.ts +41 -0
  61. package/types/components/MotorInsurance/Bike/BikeStepTwoVehicleInfo.d.ts +12 -0
  62. package/types/components/MotorInsurance/Bike/CreateBikeInsuranceForm.d.ts +17 -0
  63. package/types/components/MotorInsurance/Bike/index.d.ts +5 -0
  64. package/types/components/MotorInsurance/Car/CarPremiumSummary.d.ts +8 -0
  65. package/types/components/MotorInsurance/Car/CarStepFourPayment.d.ts +45 -0
  66. package/types/components/MotorInsurance/Car/CarStepOneForm.d.ts +27 -0
  67. package/types/components/MotorInsurance/Car/CarStepThreeInfo.d.ts +11 -0
  68. package/types/components/MotorInsurance/Car/CarStepTwoPlan.d.ts +11 -0
  69. package/types/components/MotorInsurance/Car/CreateCarInsuranceForm.d.ts +17 -0
  70. package/types/components/MotorInsurance/Car/car-form.constants.d.ts +23 -0
  71. package/types/components/MotorInsurance/Car/index.d.ts +6 -0
  72. package/types/components/MotorInsurance/CreateMotorInsuranceTransactionForm.d.ts +17 -0
  73. package/types/components/MotorInsurance/DocumentUploadPreview.d.ts +14 -0
  74. package/types/components/MotorInsurance/MotorInsuranceApprovalPaymentStep.d.ts +20 -0
  75. package/types/components/MotorInsurance/image-storage.utils.d.ts +18 -0
  76. package/types/components/MotorInsurance/index.d.ts +4 -0
  77. package/types/components/MotorInsurance/motor-insurance.types.d.ts +335 -0
  78. package/types/components/MotorInsurance/motor-insurance.validation.d.ts +21 -0
  79. package/types/components/Notification/NotificationBell.d.ts +5 -0
  80. package/types/components/Notification/NotificationItem.d.ts +8 -0
  81. package/types/components/Notification/NotificationPanel.d.ts +6 -0
  82. package/types/components/OrderPaymentTypeBadge.d.ts +4 -0
  83. package/types/components/PolicyGroup/InsurancePolicyGroupFormDialog.d.ts +10 -0
  84. package/types/components/TransactionList/PublicIdActionMenu.d.ts +3 -1
  85. package/types/constants/api-urls.d.ts +59 -5
  86. package/types/constants/approval-link.enum.d.ts +4 -0
  87. package/types/constants/business-codes.d.ts +2 -1
  88. package/types/constants/env.d.ts +3 -0
  89. package/types/constants/policy-enums.d.ts +11 -0
  90. package/types/constants/regex.d.ts +4 -0
  91. package/types/constants/tenant.d.ts +3 -0
  92. package/types/constants/transaction-status-labels.d.ts +3 -0
  93. package/types/embeded-main.d.ts +2 -0
  94. package/types/hooks/fetchEsimTransaction.d.ts +2 -0
  95. package/types/hooks/transactions/useGroupTransactions.d.ts +10 -10
  96. package/types/hooks/traveller-confirmation/submit-confirmation.util.d.ts +1 -0
  97. package/types/hooks/traveller-confirmation/traveller-confirmation-flow.d.ts +4 -0
  98. package/types/hooks/traveller-confirmation/types.d.ts +22 -0
  99. package/types/hooks/traveller-confirmation/usePurchaseTravellerConfirmation.d.ts +12 -0
  100. package/types/hooks/traveller-confirmation/useTravellerConfirmationFetch.d.ts +2 -0
  101. package/types/hooks/useAdminDashboard.d.ts +19 -0
  102. package/types/hooks/useAutoSelectBankBranchAndDepartment.d.ts +19 -0
  103. package/types/hooks/useBankOutsideWorkingHoursNotice.d.ts +5 -0
  104. package/types/hooks/useConfirmTransaction.d.ts +15 -31
  105. package/types/hooks/useCoupon.d.ts +95 -0
  106. package/types/hooks/useCouponValidation.d.ts +29 -0
  107. package/types/hooks/useCreateAutoCoupon.d.ts +5 -0
  108. package/types/hooks/useFxPrefill.d.ts +19 -0
  109. package/types/hooks/useGroupCustomers.d.ts +12 -9
  110. package/types/hooks/useInsuranceData.d.ts +3 -11
  111. package/types/hooks/useInsurancePlans.d.ts +13 -1
  112. package/types/hooks/useInsuranceTransaction.d.ts +39 -4
  113. package/types/hooks/useLocationData.d.ts +22 -0
  114. package/types/hooks/useMotorInsurance.d.ts +17 -0
  115. package/types/hooks/useMotorInsuranceTransaction.d.ts +133 -0
  116. package/types/hooks/useMotorQuote.d.ts +15 -0
  117. package/types/hooks/useNotifications.d.ts +10 -0
  118. package/types/hooks/usePolicyGroups.d.ts +1 -0
  119. package/types/hooks/useTenantList.d.ts +3 -4
  120. package/types/hooks/useUserById.d.ts +7 -0
  121. package/types/hooks/useUserSearch.d.ts +10 -0
  122. package/types/hooks/useUsersByTenantTypes.d.ts +11 -0
  123. package/types/hooks/useVehicleRegistrationScan.d.ts +39 -0
  124. package/types/pages/admin/CreateOrderOnBehalfTest.d.ts +3 -0
  125. package/types/pages/admin/coupons/CampaignCouponTable.d.ts +13 -0
  126. package/types/pages/admin/coupons/CampaignDetailPage.d.ts +1 -0
  127. package/types/pages/admin/coupons/CampaignListPage.d.ts +1 -0
  128. package/types/pages/admin/coupons/CouponFormPage.d.ts +1 -0
  129. package/types/pages/admin/insurance/create-insurance-transaction/AdminCreateInsuranceTransactionPage.d.ts +2 -0
  130. package/types/pages/admin/insurance/edit-insurance-transaction/AdminEditInsuranceTransactionPage.d.ts +1 -0
  131. package/types/pages/admin/insurance-policy-management/InsurancePolicyManagement.d.ts +1 -0
  132. package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorBikeTransactionPage.d.ts +1 -0
  133. package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorCarTransactionPage.d.ts +1 -0
  134. package/types/pages/admin/motor-insurance/edit-motor-transaction/AdminEditMotorTransactionPage.d.ts +1 -0
  135. package/types/pages/admin/motor-insurance-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
  136. package/types/pages/admin/motor-insurance-transaction-list/MotorInsuranceTransactionListPage.d.ts +5 -0
  137. package/types/pages/agency/home/HomePage.d.ts +1 -0
  138. package/types/pages/agency/home/constants.d.ts +16 -0
  139. package/types/pages/agency/insurance/motor-transaction-approval/MotorInsuranceTransactionApprovalPage.d.ts +3 -0
  140. package/types/pages/agency/insurance/motor-transaction-create/CreateCarInsuranceTransactionPage.d.ts +1 -0
  141. package/types/pages/agency/insurance/motor-transaction-create/CreateMotorInsuranceTransactionPage.d.ts +1 -0
  142. package/types/pages/agency/insurance/motor-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
  143. package/types/pages/agency/insurance/motor-transaction-list/MotorInsuranceTransactionListPage.d.ts +6 -0
  144. package/types/pages/agency/insurance/transaction-approval/InsuranceTransactionApprovalPage.d.ts +3 -0
  145. package/types/pages/agency/insurance/transaction-create/CreateInsuranceTransactionPage.d.ts +2 -0
  146. package/types/pages/agency/traveller-confirmation/PurchaseTravellerConfirmation.d.ts +5 -0
  147. package/types/pages/agency/traveller-confirmation/TravellerPurchaseConfirmation.d.ts +2 -0
  148. package/types/pages/guest/insurance-approval.d.ts +1 -0
  149. package/types/pages/guest/insurance-create.d.ts +4 -1
  150. package/types/pages/guest/motor-insurance-approval.d.ts +1 -0
  151. package/types/pages/guest/motor-insurance-create.d.ts +6 -0
  152. package/types/providers/AppSettingsProvider.d.ts +1 -0
  153. package/types/store/useApprovalStore.d.ts +6 -0
  154. package/types/store/useNotificationStore.d.ts +16 -0
  155. package/types/store/useTenantStore.d.ts +12 -0
  156. package/types/store/useTrackingStore.d.ts +10 -0
  157. package/types/types/app-settings.d.ts +13 -1
  158. package/types/types/coupon.d.ts +70 -0
  159. package/types/types/enum.d.ts +15 -2
  160. package/types/types/insurance-transaction.dto.d.ts +22 -1
  161. package/types/types/insurance.d.ts +19 -2
  162. package/types/types/notification.d.ts +23 -0
  163. package/types/types/response.dto.d.ts +59 -5
  164. package/types/types/sdk.d.ts +8 -1
  165. package/types/types/tracking.dto.d.ts +21 -0
  166. package/types/util/booker-display.d.ts +6 -0
  167. package/types/util/couponErrorMessages.d.ts +2 -0
  168. package/types/util/debt-report-display.d.ts +4 -0
  169. package/types/util/formatter.d.ts +6 -0
  170. package/types/util/fx-travelling-messages.d.ts +1 -0
  171. package/types/util/fx.d.ts +15 -0
  172. package/types/util/order-payment-display.d.ts +16 -0
  173. package/types/util/sim-display.d.ts +2 -0
  174. package/types/util/tracking.d.ts +19 -0
  175. package/types/util/transaction.util.d.ts +2 -1
  176. package/types/utils/bank.d.ts +4 -0
  177. package/types/utils/transaction-confirmation-link.d.ts +9 -0
@@ -0,0 +1,22 @@
1
+ export interface Province {
2
+ id: number;
3
+ name: string;
4
+ tmivId: string;
5
+ }
6
+ export interface Ward {
7
+ id: number;
8
+ name: string;
9
+ tmivId: string;
10
+ stateId: number;
11
+ }
12
+ export interface UseLocationDataReturn {
13
+ provinces: Province[];
14
+ wardsByState: Record<number, Ward[]>;
15
+ loadingProvinces: boolean;
16
+ loadingWardStateId: number | null;
17
+ provincesError: string | null;
18
+ wardsErrorByState: Record<number, string | undefined>;
19
+ refetchProvinces: () => void;
20
+ fetchWardsByState: (stateId: number) => Promise<void>;
21
+ }
22
+ export declare function useLocationData(): UseLocationDataReturn;
@@ -0,0 +1,17 @@
1
+ import { BikePolicyRequestDto, BikePolicyResponseDto, BikeQuoteRequestDto, BikeQuoteResponseDto, CarPolicyRequestDto, CarPolicyResponseDto, CarQuoteRequestDto, CarQuoteResponseDto, EMotorProvider, EMotorVehicleType } from '../components/MotorInsurance/motor-insurance.types';
2
+ export declare const useMotorInsurance: () => {
3
+ createQuoteBike: (provider: EMotorProvider, body: BikeQuoteRequestDto) => Promise<BikeQuoteResponseDto | null>;
4
+ createPolicyBike: (provider: EMotorProvider, body: BikePolicyRequestDto) => Promise<BikePolicyResponseDto | null>;
5
+ createQuoteCar: (provider: EMotorProvider, body: CarQuoteRequestDto) => Promise<CarQuoteResponseDto | null>;
6
+ createPolicyCar: (provider: EMotorProvider, body: CarPolicyRequestDto) => Promise<CarPolicyResponseDto | null>;
7
+ isCreatingQuote: boolean;
8
+ isCreatingPolicy: boolean;
9
+ providers: EMotorProvider[];
10
+ loadingProviders: boolean;
11
+ motorInsuranceSettings: Record<string, any>;
12
+ loadingMotorInsuranceSettings: boolean;
13
+ refetchMotorInsuranceSettings: () => Promise<void>;
14
+ getMotorProviderLogoUrl: (providerCode?: string | null) => string | undefined;
15
+ getMotorProviderTermsAgreeHtml: (providerCode?: string | null) => string | undefined;
16
+ getMotorProviderMandatoryPremiumBenefitsHtml: (vehicleType: EMotorVehicleType, providerCode?: string | null) => string | undefined;
17
+ };
@@ -0,0 +1,133 @@
1
+ import { EPaymentMethod, EOrderPaymentType, TransactionStatus } from '../types/enum';
2
+ import { EMotorProvider, EMotorVehicleType } from '../components/MotorInsurance/motor-insurance.types';
3
+ import { DebtPaymentQrResponse } from '../types/response.dto';
4
+ export interface MotorInsuranceTransactionDetail {
5
+ id: number;
6
+ transactionPublicId: string;
7
+ status: string;
8
+ totalAmount: number;
9
+ tax?: number;
10
+ providerPolicyId?: string | number;
11
+ providerPolicyNumber?: string;
12
+ errorMessage?: string;
13
+ vehicleType?: EMotorVehicleType;
14
+ ownerName?: string;
15
+ licensePlate?: string;
16
+ startDate?: string;
17
+ endDate?: string;
18
+ provider: EMotorProvider;
19
+ chassisNumber?: string;
20
+ engineNumber?: string;
21
+ metadata?: Record<string, unknown>;
22
+ transaction?: {
23
+ status: string;
24
+ publicId: string;
25
+ };
26
+ paymentTypeApplied?: EOrderPaymentType;
27
+ paidAmount?: number;
28
+ unpaidAmount?: number;
29
+ isBypassed?: boolean;
30
+ }
31
+ export interface MotorInsuranceTransactionListItem {
32
+ id: number;
33
+ orderId: number;
34
+ transactionPublicId: string;
35
+ status: TransactionStatus;
36
+ totalAmount: number;
37
+ tax?: number;
38
+ providerPolicyId?: string | number;
39
+ providerPolicyNumber?: string;
40
+ error?: string;
41
+ createdAt?: string;
42
+ vehicleType?: string;
43
+ tenantName?: string;
44
+ ownerName?: string;
45
+ licensePlate?: string;
46
+ provider: EMotorProvider;
47
+ transaction?: {
48
+ status: string;
49
+ publicId: string;
50
+ };
51
+ paymentTypeApplied?: EOrderPaymentType;
52
+ paidAmount?: number;
53
+ unpaidAmount?: number;
54
+ isBypassed?: boolean;
55
+ metadata?: Record<string, unknown>;
56
+ }
57
+ export interface GetMotorInsuranceTransactionListReqDto {
58
+ page?: number;
59
+ limit?: number;
60
+ minValue?: number;
61
+ maxValue?: number;
62
+ startDate?: string;
63
+ endDate?: string;
64
+ sortField?: 'date' | 'value';
65
+ sortDirection?: 'asc' | 'desc';
66
+ status?: TransactionStatus;
67
+ publicId?: string;
68
+ ownerName?: string;
69
+ vehicleType?: string;
70
+ provider?: string;
71
+ approvalStatus?: string;
72
+ approvalBypassed?: boolean;
73
+ }
74
+ export interface GetMotorInsuranceTransactionListRespDto {
75
+ transactions: MotorInsuranceTransactionListItem[];
76
+ total: number;
77
+ page: number;
78
+ limit: number;
79
+ }
80
+ export declare const useMotorInsuranceTransactionDetail: (publicId: string | undefined) => {
81
+ transaction: MotorInsuranceTransactionDetail | null;
82
+ loading: boolean;
83
+ error: string | null;
84
+ refetch: (options?: {
85
+ silent?: boolean;
86
+ }) => Promise<void>;
87
+ retryProviderLoading: boolean;
88
+ retryProviderPolicy: () => Promise<void>;
89
+ fetchDebtPaymentQr: (targetPublicId: string) => Promise<DebtPaymentQrResponse>;
90
+ };
91
+ export declare const useMotorInsuranceTransaction: (options?: {
92
+ defaultLimit?: number;
93
+ publicId?: string;
94
+ }) => {
95
+ list: {
96
+ transactions: MotorInsuranceTransactionListItem[];
97
+ total: number;
98
+ loading: boolean;
99
+ page: number;
100
+ limit: number;
101
+ filters: Omit<GetMotorInsuranceTransactionListReqDto, "page" | "limit">;
102
+ refetchData: () => void;
103
+ setPage: import('react').Dispatch<import('react').SetStateAction<number>>;
104
+ setLimit: (nextLimit: number) => void;
105
+ updateFilters: (newFilters: Partial<Omit<GetMotorInsuranceTransactionListReqDto, "page" | "limit">>, options?: {
106
+ replace?: boolean;
107
+ }) => void;
108
+ };
109
+ detail: {
110
+ transaction: MotorInsuranceTransactionDetail | null;
111
+ loading: boolean;
112
+ error: string | null;
113
+ refetch: (options?: {
114
+ silent?: boolean;
115
+ }) => Promise<void>;
116
+ retryProviderLoading: boolean;
117
+ retryProviderPolicy: () => Promise<void>;
118
+ fetchDebtPaymentQr: (targetPublicId: string) => Promise<DebtPaymentQrResponse>;
119
+ };
120
+ checkTransactionStatus: (publicId: string) => Promise<MotorInsuranceTransactionDetail | null>;
121
+ fetchDebtPaymentQr: (publicId: string) => Promise<DebtPaymentQrResponse>;
122
+ approveTransaction: (publicId: string, payload?: {
123
+ paymentMode?: EPaymentMethod;
124
+ paymentType?: EOrderPaymentType;
125
+ }) => Promise<any>;
126
+ isApprovingTransaction: boolean;
127
+ rejectTransaction: (publicId: string, payload: {
128
+ code: string;
129
+ text?: string;
130
+ }) => Promise<void>;
131
+ isRejectingTransaction: boolean;
132
+ updateTransaction: (publicId: string, payload: Record<string, unknown>) => Promise<MotorInsuranceTransactionDetail>;
133
+ };
@@ -0,0 +1,15 @@
1
+ import { CarPlanFormValues, CarPremiumSummary, MotorPlanFormValues, MotorPremiumSummary, EVehicleUsageType, EMotorProvider } from '../components/MotorInsurance/motor-insurance.types';
2
+ interface UseCarQuoteResult {
3
+ quoteResult: CarPremiumSummary | null;
4
+ quoteResultRef: React.MutableRefObject<CarPremiumSummary | null>;
5
+ calculateQuote: (planValues: CarPlanFormValues, createQuoteCar: (provider: EMotorProvider, payload: any) => Promise<any>, vehicleUsageType?: EVehicleUsageType) => void;
6
+ resetQuote: () => void;
7
+ }
8
+ export declare const useCarQuote: () => UseCarQuoteResult;
9
+ interface UseBikeQuoteResult {
10
+ quoteResult: MotorPremiumSummary | null;
11
+ calculateQuote: (planValues: MotorPlanFormValues, createQuoteBike: (provider: EMotorProvider, payload: any) => Promise<any>) => void;
12
+ resetQuote: () => void;
13
+ }
14
+ export declare const useBikeQuote: () => UseBikeQuoteResult;
15
+ export {};
@@ -0,0 +1,10 @@
1
+ import { INotification } from '../types/notification';
2
+ export declare const useNotifications: () => {
3
+ fetchNotifications: (page?: number, limit?: number) => Promise<{
4
+ data: INotification[];
5
+ total: number;
6
+ }>;
7
+ fetchUnreadCount: () => Promise<number>;
8
+ markAsRead: (id: number) => Promise<INotification>;
9
+ markAllAsRead: () => Promise<void>;
10
+ };
@@ -3,6 +3,7 @@ export interface PolicyDto {
3
3
  name: string;
4
4
  description?: string;
5
5
  type: string;
6
+ calculatorType?: string;
6
7
  conditions: Record<string, any>;
7
8
  action: {
8
9
  type: EPolicyActionType;
@@ -1,9 +1,8 @@
1
- import { ITenant } from '../types/response.dto';
2
- export declare const useTenantList: (options?: {
1
+ export declare const useTenantList: (tenantTypes?: string[], options?: {
3
2
  skipFetch?: boolean;
4
3
  }) => {
5
- tenants: ITenant[];
4
+ tenants: import('../types/response.dto').ITenant[];
6
5
  loading: boolean;
7
- refetchData: () => void;
6
+ refetchData: () => Promise<void>;
8
7
  removeTenant: (tenantId: number) => Promise<void>;
9
8
  };
@@ -0,0 +1,7 @@
1
+ import { IUser } from '../types/response.dto';
2
+ type UseUserByIdResult = {
3
+ user: IUser | null;
4
+ loading: boolean;
5
+ };
6
+ export declare const useUserById: (userId?: number | null) => UseUserByIdResult;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ import { IUser } from '../types/response.dto';
2
+ interface UseUserSearchResult {
3
+ users: IUser[];
4
+ loading: boolean;
5
+ error: string | null;
6
+ search: (query: string) => void;
7
+ membersTenantId: number | null;
8
+ }
9
+ export declare const useUserSearch: (tenantId: number | null, debounceMs?: number) => UseUserSearchResult;
10
+ export {};
@@ -0,0 +1,11 @@
1
+ export type TUserByTenantTypeOption = {
2
+ label: string;
3
+ value: string;
4
+ };
5
+ /**
6
+ * Loads all users in tenants of type standalone_booker / travel_agency.
7
+ */
8
+ export declare function useUsersByTenantTypes(): {
9
+ options: TUserByTenantTypeOption[];
10
+ loading: boolean;
11
+ };
@@ -0,0 +1,39 @@
1
+ export interface CarRegistrationOcrData {
2
+ licensePlate: string;
3
+ chassisNumber: string;
4
+ engineNumber: string;
5
+ manufacturingYear: number | null;
6
+ seatCount: number | null;
7
+ ownerName: string;
8
+ brand: string;
9
+ model: string;
10
+ color: string;
11
+ registrationDate: string;
12
+ isCommercialTransport: boolean;
13
+ gcsUrl?: string;
14
+ filePath?: string;
15
+ }
16
+ export interface BikeRegistrationOcrData {
17
+ licensePlate: string;
18
+ chassisNumber: string;
19
+ engineNumber: string;
20
+ ownerName: string;
21
+ address: string;
22
+ brand: string;
23
+ model: string;
24
+ color: string;
25
+ engineCapacity: number | null;
26
+ registrationDate: string;
27
+ gcsUrl?: string;
28
+ filePath?: string;
29
+ }
30
+ export declare const useCarRegistrationScan: () => {
31
+ scanCarRegistration: (file: File) => Promise<CarRegistrationOcrData | null>;
32
+ isScanning: boolean;
33
+ scanError: string | null;
34
+ };
35
+ export declare const useBikeRegistrationScan: () => {
36
+ scanBikeRegistration: (file: File) => Promise<BikeRegistrationOcrData | null>;
37
+ isScanning: boolean;
38
+ scanError: string | null;
39
+ };
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ export declare const CreateOrderOnBehalfTest: React.FC;
3
+ export default CreateOrderOnBehalfTest;
@@ -0,0 +1,13 @@
1
+ import { TCouponRow } from '../../../types/coupon';
2
+ type Props = {
3
+ loading: boolean;
4
+ rows: TCouponRow[];
5
+ page: number;
6
+ pageSize: number;
7
+ listTotal: number;
8
+ onEdit: (couponId: number) => void;
9
+ onPageChange: (page: number) => void;
10
+ onPageSizeChange: (size: number) => void;
11
+ };
12
+ export declare const CampaignCouponTable: ({ loading, rows, page, pageSize, listTotal, onEdit, onPageChange, onPageSizeChange, }: Props) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1 @@
1
+ export declare const CampaignDetailPage: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const CampaignListing: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const CouponForm: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const AdminCreateInternationalInsuranceTransactionPage: () => import("react/jsx-runtime").JSX.Element;
2
+ export declare const AdminCreateDomesticInsuranceTransactionPage: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const AdminEditInsuranceTransactionPage: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const InsurancePolicyManagement: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const AdminCreateMotorBikeTransactionPage: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const AdminCreateMotorCarTransactionPage: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const AdminEditMotorTransactionPage: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const AdminMotorInsuranceTransactionDetailPage: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ type Props = {
2
+ defaultLimit?: number;
3
+ };
4
+ export declare const AdminMotorInsuranceTransactionListPage: (props: Props) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1 @@
1
+ export declare const HomePage: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ export type AgencyHomeCard = {
2
+ key: string;
3
+ title: string;
4
+ description: string;
5
+ actionLabel: string;
6
+ path?: string;
7
+ disabled?: boolean;
8
+ iconUrl?: string;
9
+ };
10
+ export type AgencyHomeSection = {
11
+ key: string;
12
+ title: string;
13
+ cards: AgencyHomeCard[];
14
+ };
15
+ export declare const TEMP_PRODUCT_IMAGE = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='160' viewBox='0 0 280 160'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0%25' stop-color='%23edf2ff'/%3E%3Cstop offset='100%25' stop-color='%23dbeafe'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='280' height='160' rx='18' fill='url(%23g)'/%3E%3Crect x='36' y='38' width='120' height='84' rx='14' fill='%23ffffff' stroke='%239bb4ff' stroke-width='3'/%3E%3Ccircle cx='206' cy='54' r='24' fill='%23bfdbfe'/%3E%3Ccircle cx='230' cy='82' r='20' fill='%2393c5fd'/%3E%3Cpath d='M68 82h56M68 98h70' stroke='%233b82f6' stroke-width='7' stroke-linecap='round'/%3E%3C/svg%3E";
16
+ export declare const AGENCY_HOME_SECTIONS: AgencyHomeSection[];
@@ -0,0 +1,3 @@
1
+ import { MotorInsuranceApprovalContent } from '../../../../components/Insurance/MotorInsuranceApprovalContent';
2
+ export declare const MotorInsuranceTransactionApprovalPage: () => import("react/jsx-runtime").JSX.Element;
3
+ export { MotorInsuranceApprovalContent as MotorInsuranceTransactionApprovalPageContent };
@@ -0,0 +1 @@
1
+ export declare const CreateCarInsuranceTransactionPage: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const CreateMotorInsuranceTransactionPage: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const MotorInsuranceTransactionDetailPage: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ defaultLimit?: number;
3
+ };
4
+ export declare const MotorInsuranceTransactionListContent: (props: Props) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const MotorInsuranceTransactionListPage: () => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ import { InsuranceApprovalContent } from '../../../../components/Insurance/InsuranceApprovalContent';
2
+ export declare const InsuranceTransactionApprovalPage: () => import("react/jsx-runtime").JSX.Element;
3
+ export { InsuranceApprovalContent as InsuranceTransactionApprovalPageContent };
@@ -1 +1,3 @@
1
+ export declare const CreateInternationalInsuranceTransactionPage: () => import("react/jsx-runtime").JSX.Element;
2
+ export declare const CreateDomesticInsuranceTransactionPage: () => import("react/jsx-runtime").JSX.Element;
1
3
  export declare const CreateInsuranceTransactionPage: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { TravellerConfirmationContext } from '../../../hooks/traveller-confirmation/types';
2
+ type Props = TravellerConfirmationContext;
3
+ /** Màn xác nhận mua — `/confirm-purchase/:id` */
4
+ export declare const PurchaseTravellerConfirmation: ({ transaction, agent, groupTransactions, refetch, }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,2 @@
1
+ /** Luồng xác nhận mua — `/confirm-purchase/:id` */
2
+ export declare const TravellerPurchaseConfirmation: () => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare const InsuranceApprovalPage: () => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,8 @@
1
+ import { ETravelScope } from '../../types/insurance';
1
2
  interface CreateGuestInsuranceTransactionPageProps {
2
3
  scrollable?: boolean;
4
+ recommendBoxHeight?: string;
5
+ travelScope: ETravelScope;
3
6
  }
4
- export declare const CreateGuestInsuranceTransactionPage: ({ scrollable, }: CreateGuestInsuranceTransactionPageProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const CreateGuestInsuranceTransactionPage: ({ scrollable, recommendBoxHeight, travelScope, }: CreateGuestInsuranceTransactionPageProps) => import("react/jsx-runtime").JSX.Element;
5
8
  export {};
@@ -0,0 +1 @@
1
+ export declare const MotorInsuranceApprovalPage: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { EMotorVehicleType } from '../../components/MotorInsurance/motor-insurance.types';
2
+ export interface CreateGuestMotorInsuranceTransactionPageProps {
3
+ vehicleType: EMotorVehicleType;
4
+ scrollable?: boolean;
5
+ }
6
+ export declare const CreateGuestMotorInsuranceTransactionPage: ({ vehicleType, scrollable, }: CreateGuestMotorInsuranceTransactionPageProps) => import("react/jsx-runtime").JSX.Element;
@@ -16,6 +16,7 @@ type FeatureFlags = {
16
16
  vnptSim: ToggleFeatureFlag;
17
17
  vnptData: ToggleFeatureFlag;
18
18
  insurance: InsuranceFeatureFlag;
19
+ motorInsurance: InsuranceFeatureFlag;
19
20
  };
20
21
  type AppSettings = {
21
22
  featureFlags: FeatureFlags;
@@ -0,0 +1,6 @@
1
+ interface ApprovalStoreState {
2
+ publicId: string | null;
3
+ setPublicId: (publicId: string | null) => void;
4
+ }
5
+ export declare const useApprovalStore: import('zustand').UseBoundStore<import('zustand').StoreApi<ApprovalStoreState>>;
6
+ export {};
@@ -0,0 +1,16 @@
1
+ import { INotification } from '../types/notification';
2
+ interface NotificationStore {
3
+ notifications: INotification[];
4
+ unreadCount: number;
5
+ hasMore: boolean;
6
+ page: number;
7
+ addNotification: (notification: INotification) => void;
8
+ setNotifications: (notifications: INotification[], total: number) => void;
9
+ setUnreadCount: (count: number) => void;
10
+ markAsRead: (id: number) => void;
11
+ markAllAsRead: () => void;
12
+ setPage: (page: number) => void;
13
+ setHasMore: (hasMore: boolean) => void;
14
+ }
15
+ export declare const useNotificationStore: import('zustand').UseBoundStore<import('zustand').StoreApi<NotificationStore>>;
16
+ export {};
@@ -0,0 +1,12 @@
1
+ import { ITenant } from '../types/response.dto';
2
+ interface TenantStoreState {
3
+ tenants: ITenant[];
4
+ loading: boolean;
5
+ isFetching: boolean;
6
+ lastFetched: number | null;
7
+ fetchTenants: () => Promise<void>;
8
+ refetchTenants: () => Promise<void>;
9
+ removeTenant: (tenantId: number) => Promise<void>;
10
+ }
11
+ export declare const useTenantStore: import('zustand').UseBoundStore<import('zustand').StoreApi<TenantStoreState>>;
12
+ export {};
@@ -0,0 +1,10 @@
1
+ import { TrackingDto } from '../types/tracking.dto';
2
+ export type TrackingState = {
3
+ anonymousId: string | null;
4
+ utm: Record<string, string> | null;
5
+ getAnonymousUid: () => string;
6
+ getTrackingData: () => TrackingDto;
7
+ setUtm: (utm: Record<string, string> | null) => void;
8
+ _saveAnonymousUid: (uid: string) => void;
9
+ };
10
+ export declare const useTrackingStore: import('zustand').UseBoundStore<import('zustand').StoreApi<TrackingState>>;
@@ -30,18 +30,30 @@ export interface IAppSettingsResponse {
30
30
  }
31
31
  export interface IBankFxTravellingMessages {
32
32
  invalid_time_range?: string | null;
33
- selecting_bank_message?: string | null;
33
+ selecting_bank_message?: string | string[] | null;
34
34
  singular_form_notes?: string[];
35
35
  currency_notes?: string[];
36
+ currency_notes_by_currency_unit?: Record<string, string[]>;
36
37
  }
37
38
  export interface IBankFxTravellingAgentSetting {
38
39
  enable?: boolean;
40
+ notes?: string[];
41
+ disableNotes?: string[];
39
42
  }
40
43
  export type IBankFxMaxAmount = Record<string, number | null | undefined>;
44
+ /** Single number = same limit for all currencies; object = per-currency limits */
45
+ export type IBankFxMaxAmountByCountryLimit = IBankFxMaxAmount | number | null;
46
+ export interface IBankFxMaxAmountByCountry {
47
+ visa_countries?: string[];
48
+ visa_max_amount?: IBankFxMaxAmountByCountryLimit;
49
+ non_visa_max_amount?: IBankFxMaxAmountByCountryLimit;
50
+ [key: string]: unknown;
51
+ }
41
52
  export interface IBankFxTravellingSetting {
42
53
  minimum_date_before_take_off_date?: number | null;
43
54
  maximum_date_before_take_off_date?: number | null;
44
55
  max_amount?: IBankFxMaxAmount;
56
+ max_amount_by_country?: IBankFxMaxAmountByCountry;
45
57
  agent?: IBankFxTravellingAgentSetting;
46
58
  messages?: IBankFxTravellingMessages;
47
59
  [key: string]: unknown;
@@ -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
+ };