gotrip-fx-transaction-form 1.0.206-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,95 @@
1
+ import { TCampaignRow, TCouponDetail, TCouponRow } from '../types/coupon';
2
+ export type TCouponListParams = {
3
+ page?: number;
4
+ limit?: number;
5
+ status?: string;
6
+ search?: string;
7
+ productType?: string;
8
+ provider?: string;
9
+ campaignId?: number;
10
+ };
11
+ export declare const useCoupon: (id?: string, isEdit?: boolean) => {
12
+ listingLoading: boolean;
13
+ rows: TCouponRow[];
14
+ listTotal: number;
15
+ fetchList: (params?: TCouponListParams) => Promise<{
16
+ ok: true;
17
+ } | {
18
+ ok: false;
19
+ }>;
20
+ formLoading: boolean;
21
+ saving: boolean;
22
+ patchingStatus: boolean;
23
+ campaignLoading: boolean;
24
+ campaignRows: TCampaignRow[];
25
+ campaignDetail: TCampaignRow | null;
26
+ campaignDetailLoading: boolean;
27
+ campaignStatusPatching: boolean;
28
+ fetchCoupon: () => Promise<{
29
+ ok: true;
30
+ data: TCouponDetail | undefined;
31
+ } | {
32
+ ok: false;
33
+ data: undefined;
34
+ }>;
35
+ saveCoupon: (payload: unknown) => Promise<{
36
+ ok: true;
37
+ data: any;
38
+ error?: undefined;
39
+ } | {
40
+ ok: false;
41
+ error: unknown;
42
+ data?: undefined;
43
+ }>;
44
+ patchCouponStatus: (nextStatus: "active" | "inactive") => Promise<{
45
+ ok: true;
46
+ error?: undefined;
47
+ } | {
48
+ ok: false;
49
+ error: unknown;
50
+ }>;
51
+ fetchCampaigns: () => Promise<{
52
+ ok: true;
53
+ data: TCampaignRow[];
54
+ } | {
55
+ ok: false;
56
+ data: TCampaignRow[];
57
+ }>;
58
+ createCampaign: (name: string) => Promise<{
59
+ ok: true;
60
+ data: TCampaignRow | undefined;
61
+ error?: undefined;
62
+ } | {
63
+ ok: false;
64
+ error: unknown;
65
+ data?: undefined;
66
+ }>;
67
+ fetchCampaignById: (campaignId: number) => Promise<{
68
+ ok: true;
69
+ data: TCampaignRow | undefined;
70
+ } | {
71
+ ok: false;
72
+ data: undefined;
73
+ }>;
74
+ patchCampaignStatus: (campaignId: number, status: "active" | "inactive") => Promise<{
75
+ ok: true;
76
+ data: TCampaignRow | null;
77
+ error?: undefined;
78
+ } | {
79
+ ok: false;
80
+ error: unknown;
81
+ data?: undefined;
82
+ }>;
83
+ exportCampaignCouponsXlsx: (campaignName: string, params: TCouponListParams) => Promise<{
84
+ ok: true;
85
+ data: {
86
+ blob: Blob;
87
+ fileName: string;
88
+ };
89
+ error?: undefined;
90
+ } | {
91
+ ok: false;
92
+ error: unknown;
93
+ data?: undefined;
94
+ }>;
95
+ };
@@ -0,0 +1,29 @@
1
+ import { ECouponProductType } from '../types/coupon';
2
+ type ValidateCouponParams = {
3
+ code: string;
4
+ orderTotal: number;
5
+ productType: ECouponProductType;
6
+ provider: string;
7
+ tenantId?: number;
8
+ userId?: number;
9
+ };
10
+ type ValidateCouponResult = {
11
+ discountAmount: number;
12
+ finalAmount: number;
13
+ couponId: number;
14
+ couponCode: string;
15
+ description?: string | null;
16
+ };
17
+ export declare const useCouponValidation: () => {
18
+ isApplyingCoupon: boolean;
19
+ validateCoupon: (params: ValidateCouponParams) => Promise<{
20
+ ok: false;
21
+ message: string;
22
+ data?: undefined;
23
+ } | {
24
+ ok: true;
25
+ data: ValidateCouponResult;
26
+ message?: undefined;
27
+ }>;
28
+ };
29
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare const useCreateAutoCoupon: () => {
2
+ createAutoCoupon: (publicId: string) => Promise<{
3
+ couponCode: string | null;
4
+ }>;
5
+ };
@@ -0,0 +1 @@
1
+ export declare const useFxCrossSellEnabled: () => boolean;
@@ -0,0 +1,19 @@
1
+ import { EInsuranceProviderType } from '../types/insurance';
2
+ interface FxPrefillData {
3
+ startDate: Date | null;
4
+ endDate: Date | null;
5
+ destinationCountryId: number | null;
6
+ travellerFullName: string;
7
+ identityDocumentNumber: string | null;
8
+ travellerPhone: string | null;
9
+ }
10
+ export declare const useFxPrefill: (fxtranid: string | null) => {
11
+ fxPrefillData: FxPrefillData | null;
12
+ isLoading: boolean;
13
+ };
14
+ export declare const useUrlParams: () => {
15
+ fxtranid: string | null;
16
+ couponCode: string | null;
17
+ initialProviders: EInsuranceProviderType[];
18
+ };
19
+ export {};
@@ -24,7 +24,10 @@ declare const onePersonSchema: yup.ObjectSchema<{
24
24
  amount: undefined;
25
25
  bankDepartmentId: undefined;
26
26
  }, "">;
27
- export declare const useGroupCustomers: (onFinish: () => void) => {
27
+ type UseGroupCustomersOptions = {
28
+ onScrollToAmountError?: () => void;
29
+ };
30
+ export declare const useGroupCustomers: (onFinish: () => void, options?: UseGroupCustomersOptions) => {
28
31
  showAuthorizationLetter: boolean;
29
32
  setShowAuthorizationLetter: import('react').Dispatch<import('react').SetStateAction<boolean>>;
30
33
  onFindFlightInfo: (customer: yup.InferType<typeof onePersonSchema>) => Promise<void>;
@@ -55,11 +58,11 @@ export declare const useGroupCustomers: (onFinish: () => void) => {
55
58
  idNo?: string | undefined;
56
59
  };
57
60
  agreeTerms: NonNullable<boolean | undefined>;
61
+ countryCodeDes: string;
58
62
  reservationNumber: string;
59
63
  airlineCode: string;
60
64
  airlineName: string;
61
65
  departureDate: string;
62
- countryCodeDes: string;
63
66
  countryNameDes: string;
64
67
  }>;
65
68
  setValue: import('react-hook-form').UseFormSetValue<{
@@ -82,11 +85,11 @@ export declare const useGroupCustomers: (onFinish: () => void) => {
82
85
  idNo?: string | undefined;
83
86
  };
84
87
  agreeTerms: NonNullable<boolean | undefined>;
88
+ countryCodeDes: string;
85
89
  reservationNumber: string;
86
90
  airlineCode: string;
87
91
  airlineName: string;
88
92
  departureDate: string;
89
- countryCodeDes: string;
90
93
  countryNameDes: string;
91
94
  }>;
92
95
  watch: import('react-hook-form').UseFormWatch<{
@@ -109,11 +112,11 @@ export declare const useGroupCustomers: (onFinish: () => void) => {
109
112
  idNo?: string | undefined;
110
113
  };
111
114
  agreeTerms: NonNullable<boolean | undefined>;
115
+ countryCodeDes: string;
112
116
  reservationNumber: string;
113
117
  airlineCode: string;
114
118
  airlineName: string;
115
119
  departureDate: string;
116
- countryCodeDes: string;
117
120
  countryNameDes: string;
118
121
  }>;
119
122
  trigger: import('react-hook-form').UseFormTrigger<{
@@ -136,11 +139,11 @@ export declare const useGroupCustomers: (onFinish: () => void) => {
136
139
  idNo?: string | undefined;
137
140
  };
138
141
  agreeTerms: NonNullable<boolean | undefined>;
142
+ countryCodeDes: string;
139
143
  reservationNumber: string;
140
144
  airlineCode: string;
141
145
  airlineName: string;
142
146
  departureDate: string;
143
- countryCodeDes: string;
144
147
  countryNameDes: string;
145
148
  }>;
146
149
  reset: import('react-hook-form').UseFormReset<{
@@ -163,11 +166,11 @@ export declare const useGroupCustomers: (onFinish: () => void) => {
163
166
  idNo?: string | undefined;
164
167
  };
165
168
  agreeTerms: NonNullable<boolean | undefined>;
169
+ countryCodeDes: string;
166
170
  reservationNumber: string;
167
171
  airlineCode: string;
168
172
  airlineName: string;
169
173
  departureDate: string;
170
- countryCodeDes: string;
171
174
  countryNameDes: string;
172
175
  }>;
173
176
  onSelectFile: (event: ChangeEvent<HTMLInputElement>) => Promise<void>;
@@ -233,11 +236,11 @@ export declare const useGroupCustomers: (onFinish: () => void) => {
233
236
  idNo?: string | undefined;
234
237
  };
235
238
  agreeTerms: NonNullable<boolean | undefined>;
239
+ countryCodeDes: string;
236
240
  reservationNumber: string;
237
241
  airlineCode: string;
238
242
  airlineName: string;
239
243
  departureDate: string;
240
- countryCodeDes: string;
241
244
  countryNameDes: string;
242
245
  }, undefined>;
243
246
  errors: import('react-hook-form').FieldErrors<{
@@ -260,11 +263,11 @@ export declare const useGroupCustomers: (onFinish: () => void) => {
260
263
  idNo?: string | undefined;
261
264
  };
262
265
  agreeTerms: NonNullable<boolean | undefined>;
266
+ countryCodeDes: string;
263
267
  reservationNumber: string;
264
268
  airlineCode: string;
265
269
  airlineName: string;
266
270
  departureDate: string;
267
- countryCodeDes: string;
268
271
  countryNameDes: string;
269
272
  }>;
270
273
  register: import('react-hook-form').UseFormRegister<{
@@ -287,11 +290,11 @@ export declare const useGroupCustomers: (onFinish: () => void) => {
287
290
  idNo?: string | undefined;
288
291
  };
289
292
  agreeTerms: NonNullable<boolean | undefined>;
293
+ countryCodeDes: string;
290
294
  reservationNumber: string;
291
295
  airlineCode: string;
292
296
  airlineName: string;
293
297
  departureDate: string;
294
- countryCodeDes: string;
295
298
  countryNameDes: string;
296
299
  }>;
297
300
  removeCustomer: (index: number) => void;
@@ -9,10 +9,10 @@ declare const groupOfBookerSchema: yup.ObjectSchema<{
9
9
  role_id?: number | null | undefined;
10
10
  status: string;
11
11
  email: string;
12
+ firstName: string;
13
+ lastName: string;
12
14
  phone: string;
13
15
  password: string;
14
- lastName: string;
15
- firstName: string;
16
16
  }[] | undefined;
17
17
  }, yup.AnyObject, {
18
18
  bookers: "";
@@ -30,10 +30,10 @@ export declare const useImportBookers: (onFinish: () => void) => {
30
30
  role_id?: number | null | undefined;
31
31
  status: string;
32
32
  email: string;
33
+ firstName: string;
34
+ lastName: string;
33
35
  phone: string;
34
36
  password: string;
35
- lastName: string;
36
- firstName: string;
37
37
  }[] | undefined;
38
38
  }>;
39
39
  handleSubmit: import('react-hook-form').UseFormHandleSubmit<{
@@ -44,10 +44,10 @@ export declare const useImportBookers: (onFinish: () => void) => {
44
44
  role_id?: number | null | undefined;
45
45
  status: string;
46
46
  email: string;
47
+ firstName: string;
48
+ lastName: string;
47
49
  phone: string;
48
50
  password: string;
49
- lastName: string;
50
- firstName: string;
51
51
  }[] | undefined;
52
52
  }, undefined>;
53
53
  errors: import('react-hook-form').FieldErrors<{
@@ -58,10 +58,10 @@ export declare const useImportBookers: (onFinish: () => void) => {
58
58
  role_id?: number | null | undefined;
59
59
  status: string;
60
60
  email: string;
61
+ firstName: string;
62
+ lastName: string;
61
63
  phone: string;
62
64
  password: string;
63
- lastName: string;
64
- firstName: string;
65
65
  }[] | undefined;
66
66
  }>;
67
67
  getValues: import('react-hook-form').UseFormGetValues<{
@@ -72,10 +72,10 @@ export declare const useImportBookers: (onFinish: () => void) => {
72
72
  role_id?: number | null | undefined;
73
73
  status: string;
74
74
  email: string;
75
+ firstName: string;
76
+ lastName: string;
75
77
  phone: string;
76
78
  password: string;
77
- lastName: string;
78
- firstName: string;
79
79
  }[] | undefined;
80
80
  }>;
81
81
  setValue: import('react-hook-form').UseFormSetValue<{
@@ -86,10 +86,10 @@ export declare const useImportBookers: (onFinish: () => void) => {
86
86
  role_id?: number | null | undefined;
87
87
  status: string;
88
88
  email: string;
89
+ firstName: string;
90
+ lastName: string;
89
91
  phone: string;
90
92
  password: string;
91
- lastName: string;
92
- firstName: string;
93
93
  }[] | undefined;
94
94
  }>;
95
95
  watch: import('react-hook-form').UseFormWatch<{
@@ -100,10 +100,10 @@ export declare const useImportBookers: (onFinish: () => void) => {
100
100
  role_id?: number | null | undefined;
101
101
  status: string;
102
102
  email: string;
103
+ firstName: string;
104
+ lastName: string;
103
105
  phone: string;
104
106
  password: string;
105
- lastName: string;
106
- firstName: string;
107
107
  }[] | undefined;
108
108
  }>;
109
109
  trigger: import('react-hook-form').UseFormTrigger<{
@@ -114,10 +114,10 @@ export declare const useImportBookers: (onFinish: () => void) => {
114
114
  role_id?: number | null | undefined;
115
115
  status: string;
116
116
  email: string;
117
+ firstName: string;
118
+ lastName: string;
117
119
  phone: string;
118
120
  password: string;
119
- lastName: string;
120
- firstName: string;
121
121
  }[] | undefined;
122
122
  }>;
123
123
  reset: import('react-hook-form').UseFormReset<{
@@ -128,10 +128,10 @@ export declare const useImportBookers: (onFinish: () => void) => {
128
128
  role_id?: number | null | undefined;
129
129
  status: string;
130
130
  email: string;
131
+ firstName: string;
132
+ lastName: string;
131
133
  phone: string;
132
134
  password: string;
133
- lastName: string;
134
- firstName: string;
135
135
  }[] | undefined;
136
136
  }>;
137
137
  onSubmit: (data: yup.InferType<typeof groupOfBookerSchema>) => Promise<void>;
@@ -5,10 +5,10 @@ declare const groupOfMemberSchema: yup.ObjectSchema<{
5
5
  uuid?: string | undefined;
6
6
  status: string;
7
7
  email: string;
8
+ firstName: string;
9
+ lastName: string;
8
10
  phone: string;
9
11
  password: string;
10
- lastName: string;
11
- firstName: string;
12
12
  }[] | undefined;
13
13
  }, yup.AnyObject, {
14
14
  members: "";
@@ -23,10 +23,10 @@ export declare const useImportMembers: (onFinish: () => void) => {
23
23
  uuid?: string | undefined;
24
24
  status: string;
25
25
  email: string;
26
+ firstName: string;
27
+ lastName: string;
26
28
  phone: string;
27
29
  password: string;
28
- lastName: string;
29
- firstName: string;
30
30
  }[] | undefined;
31
31
  }>;
32
32
  handleSubmit: import('react-hook-form').UseFormHandleSubmit<{
@@ -34,10 +34,10 @@ export declare const useImportMembers: (onFinish: () => void) => {
34
34
  uuid?: string | undefined;
35
35
  status: string;
36
36
  email: string;
37
+ firstName: string;
38
+ lastName: string;
37
39
  phone: string;
38
40
  password: string;
39
- lastName: string;
40
- firstName: string;
41
41
  }[] | undefined;
42
42
  }, undefined>;
43
43
  errors: import('react-hook-form').FieldErrors<{
@@ -45,10 +45,10 @@ export declare const useImportMembers: (onFinish: () => void) => {
45
45
  uuid?: string | undefined;
46
46
  status: string;
47
47
  email: string;
48
+ firstName: string;
49
+ lastName: string;
48
50
  phone: string;
49
51
  password: string;
50
- lastName: string;
51
- firstName: string;
52
52
  }[] | undefined;
53
53
  }>;
54
54
  getValues: import('react-hook-form').UseFormGetValues<{
@@ -56,10 +56,10 @@ export declare const useImportMembers: (onFinish: () => void) => {
56
56
  uuid?: string | undefined;
57
57
  status: string;
58
58
  email: string;
59
+ firstName: string;
60
+ lastName: string;
59
61
  phone: string;
60
62
  password: string;
61
- lastName: string;
62
- firstName: string;
63
63
  }[] | undefined;
64
64
  }>;
65
65
  setValue: import('react-hook-form').UseFormSetValue<{
@@ -67,10 +67,10 @@ export declare const useImportMembers: (onFinish: () => void) => {
67
67
  uuid?: string | undefined;
68
68
  status: string;
69
69
  email: string;
70
+ firstName: string;
71
+ lastName: string;
70
72
  phone: string;
71
73
  password: string;
72
- lastName: string;
73
- firstName: string;
74
74
  }[] | undefined;
75
75
  }>;
76
76
  watch: import('react-hook-form').UseFormWatch<{
@@ -78,10 +78,10 @@ export declare const useImportMembers: (onFinish: () => void) => {
78
78
  uuid?: string | undefined;
79
79
  status: string;
80
80
  email: string;
81
+ firstName: string;
82
+ lastName: string;
81
83
  phone: string;
82
84
  password: string;
83
- lastName: string;
84
- firstName: string;
85
85
  }[] | undefined;
86
86
  }>;
87
87
  trigger: import('react-hook-form').UseFormTrigger<{
@@ -89,10 +89,10 @@ export declare const useImportMembers: (onFinish: () => void) => {
89
89
  uuid?: string | undefined;
90
90
  status: string;
91
91
  email: string;
92
+ firstName: string;
93
+ lastName: string;
92
94
  phone: string;
93
95
  password: string;
94
- lastName: string;
95
- firstName: string;
96
96
  }[] | undefined;
97
97
  }>;
98
98
  reset: import('react-hook-form').UseFormReset<{
@@ -100,10 +100,10 @@ export declare const useImportMembers: (onFinish: () => void) => {
100
100
  uuid?: string | undefined;
101
101
  status: string;
102
102
  email: string;
103
+ firstName: string;
104
+ lastName: string;
103
105
  phone: string;
104
106
  password: string;
105
- lastName: string;
106
- firstName: string;
107
107
  }[] | undefined;
108
108
  }>;
109
109
  onSubmit: (data: yup.InferType<typeof groupOfMemberSchema>) => Promise<void>;
@@ -1,25 +1,17 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { CoveragePlanQuotesRequestPayload, CoveragePlanQuotesResponse } from '../components/Insurance/types';
3
3
  import { EGender, EInsuranceType, EPolicyType, ERelationToPrimary, ETravelType, EPersonType } from '../types/insurance';
4
+ import { Province, Ward } from './useLocationData';
4
5
  interface Country {
5
6
  id: number;
6
7
  name: string;
7
8
  tmivId: string;
8
9
  }
9
- export interface Province {
10
- id: number;
11
- name: string;
12
- tmivId: string;
13
- }
14
- export interface Ward {
15
- id: number;
16
- name: string;
17
- tmivId: string;
18
- stateId: number;
19
- }
10
+ export type { Province, Ward } from './useLocationData';
20
11
  type InsuranceDataContextValue = {
21
12
  providers: string[];
22
13
  countries: Country[];
14
+ vietnamCountryId: number | null;
23
15
  provinces: Province[];
24
16
  wardsByState: Record<number, Ward[]>;
25
17
  loadingProviders: boolean;
@@ -1,15 +1,22 @@
1
1
  import { CoveragePlanPremium, CalculatePremiumRequest, InsuredPerson, TravelPlanFormValues } from '../components/Insurance/types';
2
+ import { ETravelScope } from '../types/insurance';
2
3
  import { QuickCoveragePlan } from '../components/Insurance/InsurancePlans/QuickCoveragePlanCard';
4
+ export interface QuickRecommendationsByCountry {
5
+ countryId: number;
6
+ countryName: string;
7
+ plans: QuickCoveragePlan[];
8
+ }
3
9
  interface UseInsurancePlansReturn {
4
10
  plans: CoveragePlanPremium[];
5
11
  loading: boolean;
6
12
  error: string | null;
7
13
  refetch: () => Promise<void>;
8
- recalculatePremiumForPlan: (travelPlan: TravelPlanFormValues, insuredPeople: InsuredPerson[], planId: number, provider: string) => Promise<CoveragePlanPremium | null>;
9
- quickRecommendations: QuickCoveragePlan[];
14
+ recalculatePremiumForPlan: (travelPlan: TravelPlanFormValues, insuredPeople: InsuredPerson[], planId: number, provider: string, travelScope: ETravelScope) => Promise<CoveragePlanPremium | null>;
15
+ quickRecommendationsByCountry: QuickRecommendationsByCountry[];
10
16
  loadingQuickRecommendations: boolean;
11
17
  errorQuickRecommendations: string | null;
12
18
  refetchQuickRecommendations: () => Promise<void>;
19
+ fetchQuickRecommendationsByCountry: (countryId: number) => Promise<QuickCoveragePlan[]>;
13
20
  }
14
21
  export declare const useInsurancePlans: (requestPayload: CalculatePremiumRequest | null) => UseInsurancePlansReturn;
15
22
  export {};
@@ -1,5 +1,7 @@
1
1
  import { InsuranceTransaction } from '../types/insurance-transaction.dto';
2
- import { EPaymentMethod, TransactionStatus } from '../types/enum';
2
+ import { DebtPaymentQrResponse } from '../types/response.dto';
3
+ import { EPaymentMethod, EOrderPaymentType, TransactionStatus } from '../types/enum';
4
+ import { EApprovalStatus, ETravelScope } from '../types/insurance';
3
5
  export interface GetInsuranceTransactionListReqDto {
4
6
  page?: number;
5
7
  limit?: number;
@@ -10,6 +12,12 @@ export interface GetInsuranceTransactionListReqDto {
10
12
  sortField?: 'date' | 'value';
11
13
  sortDirection?: 'asc' | 'desc';
12
14
  status?: TransactionStatus;
15
+ publicId?: string;
16
+ primaryInsuredFullName?: string;
17
+ travelScope?: ETravelScope;
18
+ provider?: string;
19
+ approvalStatus?: EApprovalStatus;
20
+ approvalBypassed?: boolean;
13
21
  }
14
22
  export interface GetInsuranceTransactionListRespDto {
15
23
  transactions: InsuranceTransaction[];
@@ -25,7 +33,10 @@ export interface CreateTransactionPayload {
25
33
  coverageStartDate: string;
26
34
  coverageEndDate: string;
27
35
  travelType: string;
28
- destinationCountryId: number;
36
+ travelScope: ETravelScope;
37
+ destinationCountryId?: number;
38
+ provinceFromId?: number;
39
+ provinceToId?: number;
29
40
  insureds: Array<{
30
41
  relationToPrimary: string;
31
42
  isPrimary: boolean;
@@ -46,18 +57,26 @@ export interface CreateTransactionPayload {
46
57
  }>;
47
58
  providerSpecific?: Record<string, any>;
48
59
  buyerInfo?: Record<string, any>;
60
+ paymentType?: EOrderPaymentType;
49
61
  paymentMode?: EPaymentMethod;
50
62
  premium?: {
51
63
  totalPremium: number;
52
64
  premiumPerPerson: number;
53
65
  };
66
+ createdOnBehalfOfUserId?: number;
67
+ approvalStatus?: EApprovalStatus | null;
68
+ approvalBypassed?: boolean;
54
69
  }
55
70
  export declare const useInsuranceTransactionDetail: (publicId: string | undefined) => {
56
71
  transaction: InsuranceTransaction | null;
57
72
  planName: string;
58
73
  loading: boolean;
59
74
  error: string | null;
60
- refetch: () => Promise<void>;
75
+ refetch: (options?: {
76
+ silent?: boolean;
77
+ }) => Promise<void>;
78
+ retryProviderLoading: boolean;
79
+ retryProviderPolicy: () => Promise<void>;
61
80
  };
62
81
  export declare const useInsuranceTransaction: (options?: {
63
82
  defaultLimit?: number;
@@ -82,9 +101,25 @@ export declare const useInsuranceTransaction: (options?: {
82
101
  planName: string;
83
102
  loading: boolean;
84
103
  error: string | null;
85
- refetch: () => Promise<void>;
104
+ refetch: (options?: {
105
+ silent?: boolean;
106
+ }) => Promise<void>;
107
+ retryProviderLoading: boolean;
108
+ retryProviderPolicy: () => Promise<void>;
86
109
  };
87
110
  createTransaction: (payload: CreateTransactionPayload) => Promise<InsuranceTransaction>;
111
+ updateTransaction: (publicId: string, payload: CreateTransactionPayload) => Promise<InsuranceTransaction>;
88
112
  isCreatingTransaction: boolean;
89
113
  checkTransactionStatus: (publicId: string) => Promise<InsuranceTransaction>;
114
+ fetchDebtPaymentQr: (publicId: string) => Promise<DebtPaymentQrResponse>;
115
+ approveTransaction: (publicId: string, payload: {
116
+ paymentMode?: EPaymentMethod;
117
+ paymentType: EOrderPaymentType;
118
+ }) => Promise<any>;
119
+ isApprovingTransaction: boolean;
120
+ rejectTransaction: (publicId: string, payload: {
121
+ code: string;
122
+ text?: string;
123
+ }) => Promise<void>;
124
+ isRejectingTransaction: boolean;
90
125
  };
@@ -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
+ };