gotrip-fx-transaction-form 1.0.196-dev → 1.0.196

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/assets/index.css +1 -1
  2. package/index.js +49571 -39059
  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/Insurance/CreateInsuranceTransactionForm.d.ts +29 -5
  17. package/types/components/Insurance/DateRangePicker.d.ts +12 -0
  18. package/types/components/Insurance/InsuranceContentRenderer/DynamicRenderer.d.ts +6 -0
  19. package/types/components/Insurance/InsuranceContentRenderer/blocks/AccordionBlock.d.ts +6 -0
  20. package/types/components/Insurance/InsuranceContentRenderer/blocks/ActionButtonBlock.d.ts +6 -0
  21. package/types/components/Insurance/InsuranceContentRenderer/blocks/ContainerBlock.d.ts +6 -0
  22. package/types/components/Insurance/InsuranceContentRenderer/blocks/DataRowBlock.d.ts +6 -0
  23. package/types/components/Insurance/InsuranceContentRenderer/blocks/DividerBlock.d.ts +6 -0
  24. package/types/components/Insurance/InsuranceContentRenderer/blocks/ListGroupBlock.d.ts +6 -0
  25. package/types/components/Insurance/InsuranceContentRenderer/blocks/TextBlock.d.ts +6 -0
  26. package/types/components/Insurance/InsuranceContentRenderer/types.d.ts +64 -0
  27. package/types/components/Insurance/InsuranceContentRenderer/utils/richText.d.ts +14 -0
  28. package/types/components/Insurance/InsuranceContentRenderer/utils/styleMapper.d.ts +6 -0
  29. package/types/components/Insurance/InsuranceDatePicker.d.ts +9 -0
  30. package/types/components/Insurance/InsurancePlans/InsurancePlanFilter.d.ts +12 -0
  31. package/types/components/Insurance/InsurancePlans/InsurancePlanList.d.ts +1 -1
  32. package/types/components/Insurance/InsurancePlans/QuickCoveragePlanCard.d.ts +16 -0
  33. package/types/components/Insurance/InsurancePlans/QuickRecommendationsSection.d.ts +18 -0
  34. package/types/components/Insurance/InsurancePlans/index.d.ts +1 -0
  35. package/types/components/Insurance/InsuranceSummaryOverview.d.ts +7 -2
  36. package/types/components/Insurance/InsuranceTypeAndPeopleCountFields.d.ts +10 -0
  37. package/types/components/Insurance/InsuredTravelersTable.d.ts +6 -0
  38. package/types/components/Insurance/ProviderApiDebugDialog.d.ts +17 -0
  39. package/types/components/Insurance/SimpleDetail.d.ts +2 -1
  40. package/types/components/Insurance/StepFourPayment.d.ts +31 -5
  41. package/types/components/Insurance/StepOneForm.d.ts +11 -2
  42. package/types/components/Insurance/StepThree.d.ts +29 -0
  43. package/types/components/Insurance/StepThreeBuyerInfo.d.ts +4 -1
  44. package/types/components/Insurance/StepThreeInsuredPeople.d.ts +4 -1
  45. package/types/components/Insurance/StepTwoPlans.d.ts +9 -1
  46. package/types/components/Insurance/documentScanAutofill.d.ts +37 -0
  47. package/types/components/Insurance/insuranceExcelImport.d.ts +13 -0
  48. package/types/components/Insurance/insuredPeopleImport.d.ts +23 -0
  49. package/types/components/Insurance/{FormElements.d.ts → shared/FormElements.d.ts} +13 -3
  50. package/types/components/Insurance/shared/InfoBlockCard.d.ts +10 -0
  51. package/types/components/Insurance/shared/PaymentMethodSelector.d.ts +10 -0
  52. package/types/components/Insurance/shared/SimpleSelect.d.ts +14 -0
  53. package/types/components/Insurance/shared/StepFooter.d.ts +8 -0
  54. package/types/components/Insurance/shared/index.d.ts +5 -0
  55. package/types/components/Insurance/types.d.ts +22 -5
  56. package/types/components/Insurance/validationUtils.d.ts +7 -1
  57. package/types/components/Modal/CancelTransactionModal.d.ts +1 -0
  58. package/types/components/Modal/ESimPurchaseModal.d.ts +4 -1
  59. package/types/components/Modal/EsimBankTransferModal.d.ts +13 -0
  60. package/types/components/Modal/InsurancePaymentModal.d.ts +2 -0
  61. package/types/components/Modal/MotorInsurancePaymentModal.d.ts +13 -0
  62. package/types/components/Modal/ProcessingOrderDialog.d.ts +8 -0
  63. package/types/components/MotorInsurance/Bike/BikePremiumSummary.d.ts +9 -0
  64. package/types/components/MotorInsurance/Bike/BikeStepOneForm.d.ts +30 -0
  65. package/types/components/MotorInsurance/Bike/BikeStepThreePayment.d.ts +26 -0
  66. package/types/components/MotorInsurance/Bike/BikeStepTwoVehicleInfo.d.ts +12 -0
  67. package/types/components/MotorInsurance/Bike/CreateBikeInsuranceForm.d.ts +17 -0
  68. package/types/components/MotorInsurance/Bike/index.d.ts +5 -0
  69. package/types/components/MotorInsurance/Car/CarPremiumSummary.d.ts +8 -0
  70. package/types/components/MotorInsurance/Car/CarStepFourPayment.d.ts +30 -0
  71. package/types/components/MotorInsurance/Car/CarStepOneForm.d.ts +27 -0
  72. package/types/components/MotorInsurance/Car/CarStepThreeInfo.d.ts +11 -0
  73. package/types/components/MotorInsurance/Car/CarStepTwoPlan.d.ts +11 -0
  74. package/types/components/MotorInsurance/Car/CreateCarInsuranceForm.d.ts +17 -0
  75. package/types/components/MotorInsurance/Car/car-form.constants.d.ts +23 -0
  76. package/types/components/MotorInsurance/Car/index.d.ts +6 -0
  77. package/types/components/MotorInsurance/CreateMotorInsuranceTransactionForm.d.ts +17 -0
  78. package/types/components/MotorInsurance/DocumentUploadPreview.d.ts +14 -0
  79. package/types/components/MotorInsurance/image-storage.utils.d.ts +18 -0
  80. package/types/components/MotorInsurance/index.d.ts +4 -0
  81. package/types/components/MotorInsurance/motor-insurance.types.d.ts +335 -0
  82. package/types/components/MotorInsurance/motor-insurance.validation.d.ts +21 -0
  83. package/types/components/Notification/NotificationBell.d.ts +5 -0
  84. package/types/components/Notification/NotificationItem.d.ts +8 -0
  85. package/types/components/Notification/NotificationPanel.d.ts +6 -0
  86. package/types/components/OrderPaymentTypeBadge.d.ts +4 -0
  87. package/types/components/PolicyGroup/InsurancePolicyGroupFormDialog.d.ts +10 -0
  88. package/types/components/StepIndicator/StepIndicatorHorizontal.d.ts +2 -1
  89. package/types/components/TransactionList/PublicIdActionMenu.d.ts +3 -1
  90. package/types/constants/api-urls.d.ts +50 -1
  91. package/types/constants/business-codes.d.ts +2 -1
  92. package/types/constants/env.d.ts +2 -0
  93. package/types/constants/policy-enums.d.ts +11 -0
  94. package/types/constants/regex.d.ts +4 -0
  95. package/types/constants/tenant.d.ts +3 -0
  96. package/types/constants/transaction-status-labels.d.ts +3 -0
  97. package/types/embeded-main.d.ts +2 -0
  98. package/types/hooks/fetchEsimTransaction.d.ts +2 -0
  99. package/types/hooks/transactions/useGroupTransactions.d.ts +10 -10
  100. package/types/hooks/traveller-confirmation/submit-confirmation.util.d.ts +1 -0
  101. package/types/hooks/traveller-confirmation/traveller-confirmation-flow.d.ts +4 -0
  102. package/types/hooks/traveller-confirmation/types.d.ts +22 -0
  103. package/types/hooks/traveller-confirmation/usePurchaseTravellerConfirmation.d.ts +12 -0
  104. package/types/hooks/traveller-confirmation/useTravellerConfirmationFetch.d.ts +2 -0
  105. package/types/hooks/useAdminDashboard.d.ts +19 -0
  106. package/types/hooks/useAutoSelectBankBranchAndDepartment.d.ts +19 -0
  107. package/types/hooks/useBankOutsideWorkingHoursNotice.d.ts +5 -0
  108. package/types/hooks/useConfirmTransaction.d.ts +12 -31
  109. package/types/hooks/useCoupon.d.ts +95 -0
  110. package/types/hooks/useCouponValidation.d.ts +29 -0
  111. package/types/hooks/useGroupCustomers.d.ts +12 -9
  112. package/types/hooks/useInsuranceData.d.ts +3 -11
  113. package/types/hooks/useInsurancePlans.d.ts +13 -1
  114. package/types/hooks/useInsuranceTransaction.d.ts +34 -4
  115. package/types/hooks/useLocationData.d.ts +22 -0
  116. package/types/hooks/useMotorInsurance.d.ts +17 -0
  117. package/types/hooks/useMotorInsuranceTransaction.d.ts +124 -0
  118. package/types/hooks/useMotorQuote.d.ts +15 -0
  119. package/types/hooks/useNotifications.d.ts +10 -0
  120. package/types/hooks/usePolicyGroups.d.ts +1 -0
  121. package/types/hooks/useTenantList.d.ts +3 -4
  122. package/types/hooks/useUserById.d.ts +7 -0
  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/insurance/create-insurance-transaction/AdminCreateInsuranceTransactionPage.d.ts +2 -0
  132. package/types/pages/admin/insurance/edit-insurance-transaction/AdminEditInsuranceTransactionPage.d.ts +1 -0
  133. package/types/pages/admin/insurance-policy-management/InsurancePolicyManagement.d.ts +1 -0
  134. package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorBikeTransactionPage.d.ts +1 -0
  135. package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorCarTransactionPage.d.ts +1 -0
  136. package/types/pages/admin/motor-insurance/edit-motor-transaction/AdminEditMotorTransactionPage.d.ts +1 -0
  137. package/types/pages/admin/motor-insurance-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
  138. package/types/pages/admin/motor-insurance-transaction-list/MotorInsuranceTransactionListPage.d.ts +5 -0
  139. package/types/pages/agency/home/HomePage.d.ts +1 -0
  140. package/types/pages/agency/home/constants.d.ts +16 -0
  141. package/types/pages/agency/insurance/motor-transaction-approval/MotorInsuranceTransactionApprovalPage.d.ts +1 -0
  142. package/types/pages/agency/insurance/motor-transaction-create/CreateCarInsuranceTransactionPage.d.ts +1 -0
  143. package/types/pages/agency/insurance/motor-transaction-create/CreateMotorInsuranceTransactionPage.d.ts +1 -0
  144. package/types/pages/agency/insurance/motor-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
  145. package/types/pages/agency/insurance/motor-transaction-list/MotorInsuranceTransactionListPage.d.ts +6 -0
  146. package/types/pages/agency/insurance/transaction-approval/InsuranceTransactionApprovalPage.d.ts +1 -0
  147. package/types/pages/agency/insurance/transaction-create/CreateInsuranceTransactionPage.d.ts +2 -0
  148. package/types/pages/agency/traveller-confirmation/PurchaseTravellerConfirmation.d.ts +5 -0
  149. package/types/pages/agency/traveller-confirmation/TravellerPurchaseConfirmation.d.ts +2 -0
  150. package/types/pages/guest/insurance-create.d.ts +8 -1
  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/useNotificationStore.d.ts +16 -0
  154. package/types/store/useTenantStore.d.ts +12 -0
  155. package/types/store/useTrackingStore.d.ts +10 -0
  156. package/types/types/app-settings.d.ts +13 -1
  157. package/types/types/coupon.d.ts +70 -0
  158. package/types/types/enum.d.ts +15 -2
  159. package/types/types/insurance-transaction.dto.d.ts +22 -1
  160. package/types/types/insurance.d.ts +19 -2
  161. package/types/types/notification.d.ts +23 -0
  162. package/types/types/response.dto.d.ts +53 -5
  163. package/types/types/sdk.d.ts +5 -1
  164. package/types/types/tracking.dto.d.ts +21 -0
  165. package/types/util/booker-display.d.ts +6 -0
  166. package/types/util/couponErrorMessages.d.ts +2 -0
  167. package/types/util/debt-report-display.d.ts +4 -0
  168. package/types/util/formatter.d.ts +6 -0
  169. package/types/util/fx-travelling-messages.d.ts +1 -0
  170. package/types/util/fx.d.ts +15 -0
  171. package/types/util/order-payment-display.d.ts +13 -0
  172. package/types/util/sim-display.d.ts +2 -0
  173. package/types/util/tracking.d.ts +19 -0
  174. package/types/util/transaction.util.d.ts +1 -1
  175. package/types/utils/bank.d.ts +4 -0
  176. package/types/utils/transaction-confirmation-link.d.ts +9 -0
@@ -0,0 +1,17 @@
1
+ import { EMotorVehicleType } from './motor-insurance.types';
2
+ import { IUser } from '../../types/response.dto';
3
+ export interface CreateMotorInsuranceTransactionFormProps {
4
+ vehicleType: EMotorVehicleType;
5
+ storageKey: string;
6
+ title?: string;
7
+ onBack?: () => void;
8
+ onSuccess?: (transactionData: unknown) => void;
9
+ scrollable?: boolean;
10
+ isAdminMode?: boolean;
11
+ selectedUser?: IUser | null;
12
+ onOpenUserSelector?: () => void;
13
+ mode?: 'create' | 'edit';
14
+ editingPublicId?: string;
15
+ initialData?: Record<string, any>;
16
+ }
17
+ export declare const CreateMotorInsuranceTransactionForm: ({ vehicleType, storageKey, title, onBack, onSuccess, scrollable, isAdminMode, selectedUser, onOpenUserSelector, mode, editingPublicId, initialData, }: CreateMotorInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ export interface DocumentUploadPreviewProps {
2
+ label: string;
3
+ scanningLabel?: string;
4
+ icon: React.ElementType;
5
+ isScanning: boolean;
6
+ file: File | null;
7
+ /** Data URL restored from storage when no File object is available (e.g. after page reload) */
8
+ persistedPreviewUrl?: string | null;
9
+ scanError?: string | null;
10
+ accept?: string;
11
+ onFileSelect: (file: File) => void;
12
+ onRemove: () => void;
13
+ }
14
+ export declare const DocumentUploadPreview: ({ label, scanningLabel, icon, isScanning, file, persistedPreviewUrl, scanError, accept, onFileSelect, onRemove, }: DocumentUploadPreviewProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ export type StoredImageData = {
2
+ dataUrl?: string | null;
3
+ gcsUrl?: string | null;
4
+ };
5
+ export type ImageCaptureData = {
6
+ dataUrl: string;
7
+ gcsUrl?: string;
8
+ };
9
+ export declare const normalizeStoredImageData: (value: unknown) => {
10
+ previewUrl: string | null;
11
+ gcsUrl: string | null;
12
+ };
13
+ export declare const buildStoredImageData: (imageData: ImageCaptureData) => StoredImageData;
14
+ export declare const buildPreviewDataUrlForStorage: (file: File, options?: {
15
+ maxDimension?: number;
16
+ jpegQuality?: number;
17
+ }) => Promise<string>;
18
+ export declare const resolveImageUrlForPayload: (gcsUrl: string | null, previewUrl: string | null) => string | undefined;
@@ -0,0 +1,4 @@
1
+ export { BikePremiumSummary, BikeStepOneForm, BikeStepTwoVehicleInfo, CreateBikeInsuranceForm, } from './Bike';
2
+ export { CarPremiumSummary, CarStepOneForm, CreateCarInsuranceForm } from './Car';
3
+ export { CreateMotorInsuranceTransactionForm } from './CreateMotorInsuranceTransactionForm';
4
+ export * from './motor-insurance.types';
@@ -0,0 +1,335 @@
1
+ import { Control, UseFormSetValue } from 'react-hook-form';
2
+ import { EPaymentMethod, EOrderPaymentType } from '../../types/enum';
3
+ import { EInsuranceProviderType } from '../../types/insurance';
4
+ export declare enum EMotorVehicleType {
5
+ BIKE = "bike",
6
+ CAR = "car"
7
+ }
8
+ export declare enum EBikeVehicleType {
9
+ UNDER_50CC = "under_50cc",
10
+ OVER_50CC = "over_50cc",
11
+ THREE_WHEEL = "three_wheel"
12
+ }
13
+ export declare enum EBikeEngineCategory {
14
+ BELOW_50CC = "BL50",
15
+ ABOVE_50CC = "AB50",
16
+ ELECTRIC = "ELEC",
17
+ THREE_WHEEL = "3WHL",
18
+ SIMILAR_MOTOR = "SIM"
19
+ }
20
+ /**
21
+ * Purpose code.
22
+ */
23
+ export declare enum EPurposeTypeCode {
24
+ BUSINESS = "BUSINESS",
25
+ NON_BUSINESS = "NON_BUSINESS"
26
+ }
27
+ /**
28
+ * Vehicle usage type enum.
29
+ */
30
+ export declare enum EVehicleUsageType {
31
+ PASSENGER = "PASSENGER",
32
+ CARGO = "CARGO",
33
+ PASSENGER_CARGO = "PASSENGER_CARGO",
34
+ SPECIAL_PURPOSE = "SPECIAL_PURPOSE"
35
+ }
36
+ /**
37
+ * High-level vehicle type enum.
38
+ */
39
+ export declare enum EVehicleTypeCode {
40
+ PASSENGER_STANDARD = "PASSENGER_STANDARD",
41
+ DRIVING_TRAINING = "DRIVING_TRAINING",
42
+ TRACTOR_HEAD = "TRACTOR_HEAD",
43
+ AMBULANCE = "AMBULANCE",
44
+ MONEY_TRUCK = "MONEY_TRUCK",
45
+ TRACTOR = "TRACTOR",
46
+ OTHER_SPECIAL_CAR = "OTHER_SPECIAL_CAR",
47
+ TAXI = "TAXI",
48
+ BUS = "BUS",
49
+ CARGO_STANDARD = "CARGO_STANDARD"
50
+ }
51
+ export type EMotorProvider = EInsuranceProviderType.PVI | EInsuranceProviderType.MIC;
52
+ export type MotorPlanFormValues = {
53
+ vehicleType: EBikeVehicleType;
54
+ durationYears: 1 | 2 | 3;
55
+ startDate: Date | null;
56
+ endDate: Date | null;
57
+ provider: EMotorProvider;
58
+ passengerAccidentEnabled: boolean;
59
+ passengerAccidentLevel: number;
60
+ passengerAccidentCount: number;
61
+ };
62
+ /**
63
+ * DTO for bike quote API (aligned with backend BikeQuoteRequest).
64
+ */
65
+ export interface BikeQuoteRequestDto {
66
+ /** Coverage start date, format yyyy-MM-dd */
67
+ startDate: string;
68
+ /** Coverage end date, format yyyy-MM-dd */
69
+ endDate: string;
70
+ vehicleTypeCode: EBikeEngineCategory;
71
+ occupantAccidentSumInsured?: number;
72
+ insuredOccupantCount?: number;
73
+ }
74
+ /**
75
+ * DTO for bike quote response.
76
+ */
77
+ export interface BikeQuoteResponseDto {
78
+ success: boolean;
79
+ totalPremium?: number;
80
+ mandatoryPremium?: number;
81
+ tax?: number;
82
+ occupantAccidentPremium?: number;
83
+ error?: string;
84
+ }
85
+ /**
86
+ * DTO for creating bike policy/certificate (BikePolicyRequest).
87
+ */
88
+ export interface BikePolicyRequestDto {
89
+ /** Start date, yyyy-MM-dd or dd/MM/yyyy depending on provider */
90
+ startDate: string;
91
+ endDate: string;
92
+ ownerName: string;
93
+ ownerAddress: string;
94
+ customerEmail: string;
95
+ phoneNumber?: string;
96
+ licensePlate: string;
97
+ engineNumber: string;
98
+ chassisNumber: string;
99
+ vehicleTypeCode: EBikeEngineCategory;
100
+ brand?: string;
101
+ manufacturingYear?: string;
102
+ occupantAccidentSumInsured?: number;
103
+ insuredOccupantCount?: number;
104
+ occupantAccidentPremium?: number;
105
+ totalPremium?: number;
106
+ tax?: number;
107
+ paymentType: EOrderPaymentType;
108
+ paymentMode?: EPaymentMethod;
109
+ vehicleRegImageUrl?: string;
110
+ idCardImageUrl?: string;
111
+ }
112
+ /**
113
+ * DTO for bike policy response (BikePolicyResponse).
114
+ * Includes extra info used for displaying result / QR code.
115
+ */
116
+ export interface BikePolicyResponseDto {
117
+ policyId?: number | string;
118
+ policyNumber?: string;
119
+ transactionPublicId?: string;
120
+ orderId?: number;
121
+ qrCodeUrl?: string;
122
+ totalAmount?: number;
123
+ status?: string;
124
+ error?: string;
125
+ }
126
+ export type VehicleInfoFormValues = {
127
+ ownerFullName: string;
128
+ ownerAddress: string;
129
+ ownerIdNumber: string;
130
+ hasLicensePlate: boolean;
131
+ licensePlate: string;
132
+ chassisNumber: string;
133
+ engineNumber: string;
134
+ certificatePhone: string;
135
+ certificateEmail: string;
136
+ };
137
+ /** Insurance owner type: individual or company */
138
+ export declare enum EOwnerType {
139
+ INDIVIDUAL = "individual",
140
+ COMPANY = "company"
141
+ }
142
+ /**
143
+ * Vehicle info for car policies extends the shared motor vehicle info
144
+ * with optional car-only attributes that may be required by providers.
145
+ */
146
+ export type CarVehicleInfoFormValues = VehicleInfoFormValues & {
147
+ /** Manufacturing year as string (for exact provider mapping if needed) */
148
+ manufacturingYearText?: string;
149
+ /** Years in use */
150
+ yearInUse?: number | null;
151
+ /** Owner type: individual (name, idNumber) or company (companyName, taxNumber) */
152
+ ownerType?: EOwnerType | string;
153
+ /** Company name (when ownerType is company) */
154
+ companyName?: string;
155
+ /** Company tax number (when ownerType is company) */
156
+ companyTaxNumber?: string;
157
+ /** Province/state ID for address */
158
+ stateId?: number | null;
159
+ /** Ward/commune ID for address */
160
+ wardId?: number | null;
161
+ /** Whether user wants hard copy certificate */
162
+ hardCopyEnabled?: boolean;
163
+ /** Address to receive hard copy certificate (when hardCopyEnabled is true) */
164
+ receiveAddress?: string;
165
+ };
166
+ /**
167
+ * Car-specific plan values used across the car motor insurance wizard.
168
+ *
169
+ * Step 1 captures vehicle configuration (manufacturing year, purpose, seats, ...),
170
+ * Step 2 adds provider + duration + effective dates, and optional passenger accident cover.
171
+ *
172
+ * These fields are intentionally generic so they can be mapped to different
173
+ * provider DTOs on the backend (purpose codes, special transport flags, etc.).
174
+ */
175
+ export type CarPlanFormValues = {
176
+ /** Manufacturing year */
177
+ manufacturingYear: number | null;
178
+ /** Whether the car is used for commercial transport */
179
+ isCommercialUse: boolean;
180
+ /** Usage purpose code (from API) */
181
+ usagePurposeCode: EVehicleUsageType | null;
182
+ /** Vehicle type code – sub of purpose + usage (EVehicleTypeCode). */
183
+ vehicleTypeCode: EVehicleTypeCode | null;
184
+ /** Number of seats (1–45) */
185
+ seatCount: number | null;
186
+ /** Load capacity in tons; required when usage is cargo (Chở hàng) */
187
+ loadCapacity: number | null;
188
+ /** Insurance duration in years */
189
+ durationYears: 1 | 2 | 3;
190
+ /** Coverage start date */
191
+ startDate: Date | null;
192
+ /** Coverage end date */
193
+ endDate: Date | null;
194
+ /** Insurance provider */
195
+ provider: EMotorProvider;
196
+ /** Enable/disable passenger accident coverage */
197
+ passengerAccidentEnabled: boolean;
198
+ /** Passenger accident sum insured per person per accident */
199
+ passengerAccidentLevel: number;
200
+ /** Number of passengers covered for accident */
201
+ passengerAccidentCount: number;
202
+ };
203
+ export type MotorPremiumSummary = {
204
+ mandatoryPremium: number;
205
+ tax: number;
206
+ passengerAccidentPremium: number;
207
+ passengerAccidentLevel: number;
208
+ passengerAccidentPeopleCount: number;
209
+ totalPremium: number;
210
+ };
211
+ /** Alias for readability when working with car flows. */
212
+ export type CarPremiumSummary = MotorPremiumSummary;
213
+ /**
214
+ * DTO for car quote API (aligned with backend MotorCreateQuoteRequestCar / TESTING_MOTOR_INSURANCE.md).
215
+ */
216
+ export interface CarQuoteRequestDto {
217
+ /** Coverage start date, format yyyy-MM-dd */
218
+ startDate: string;
219
+ /** Coverage end date, format yyyy-MM-dd */
220
+ endDate: string;
221
+ purposeTypeCode: EPurposeTypeCode;
222
+ vehicleUsageType: EVehicleUsageType;
223
+ vehicleTypeCode: EVehicleTypeCode;
224
+ /** Number of seats */
225
+ numberOfSeats: number;
226
+ /** Load capacity in tons */
227
+ loadCapacity?: number;
228
+ /** Passenger accident sum insured */
229
+ occupantAccidentSumInsured?: number;
230
+ /** Number of passengers covered for accident */
231
+ insuredOccupantCount?: number;
232
+ }
233
+ /**
234
+ * DTO for car quote response (MotorCreateQuoteResponse).
235
+ */
236
+ export interface CarQuoteResponseDto {
237
+ success: boolean;
238
+ totalPremium?: number;
239
+ mandatoryPremium?: number;
240
+ tax?: number;
241
+ occupantAccidentPremium?: number;
242
+ vehicleTypeCode?: string;
243
+ error?: string;
244
+ }
245
+ /**
246
+ * DTO for creating car policy/certificate (aligned with MotorCreatePolicyRequestCar).
247
+ */
248
+ export interface CarPolicyRequestDto {
249
+ totalPremium: number;
250
+ /** Coverage start date, format yyyy-MM-dd */
251
+ startDate: string;
252
+ /** Coverage end date, format yyyy-MM-dd */
253
+ endDate: string;
254
+ ownerName: string;
255
+ ownerAddress: string;
256
+ /** Contact/buyer name: ownerName (individual) or companyName (company) */
257
+ customerName: string;
258
+ customerAddress?: string;
259
+ ownerType?: EOwnerType | string;
260
+ ownerIdNumber?: string;
261
+ companyName?: string;
262
+ companyTaxNumber?: string;
263
+ hardCopyEnabled?: boolean;
264
+ receiveAddress?: string;
265
+ stateId?: number | null;
266
+ wardId?: number | null;
267
+ customerEmail: string;
268
+ phoneNumber?: string;
269
+ purposeTypeCode: EPurposeTypeCode;
270
+ vehicleUsageType: EVehicleUsageType;
271
+ vehicleTypeCode: EVehicleTypeCode;
272
+ numberOfSeats: number;
273
+ /** Load capacity in tons */
274
+ loadCapacity?: number;
275
+ licensePlate: string;
276
+ chassisNumber: string;
277
+ engineNumber: string;
278
+ mandatoryPremium: number;
279
+ tax?: number;
280
+ occupantAccidentSumInsured?: number;
281
+ insuredOccupantCount?: number;
282
+ occupantAccidentPremium?: number;
283
+ manufacturingYear?: string;
284
+ yearInUse?: string;
285
+ brand?: string;
286
+ model?: string;
287
+ hideLicensePlate?: boolean;
288
+ hidePremium?: boolean;
289
+ paymentType: EOrderPaymentType;
290
+ paymentMode?: EPaymentMethod;
291
+ vehicleRegImageUrl?: string;
292
+ idCardImageUrl?: string;
293
+ }
294
+ /**
295
+ * DTO for car policy response (MotorCreatePolicyResponse).
296
+ */
297
+ export interface CarPolicyResponseDto {
298
+ success?: boolean;
299
+ policyId?: number | string;
300
+ policyNumber?: string;
301
+ certificateUrl?: string;
302
+ transactionPublicId?: string;
303
+ qrCodeUrl?: string;
304
+ totalAmount?: number;
305
+ status?: string;
306
+ error?: string;
307
+ }
308
+ export declare const VEHICLE_TYPE_LABELS: Record<EBikeVehicleType, string>;
309
+ export declare const BIKE_VEHICLE_TYPE_CODE_LABELS: Record<string, string>;
310
+ export declare const getBikeVehicleTypeCodeLabel: (code?: string | null) => string;
311
+ /** Car vehicle type code labels (loại vận chuyển đặc biệt) for display. */
312
+ export declare const CAR_VEHICLE_TYPE_CODE_LABELS: Record<string, string>;
313
+ export declare const getVehicleTypeLabel: (vehicleType?: string) => string;
314
+ export declare const getPassengerAccidentLevelLabel: (value?: number | null) => string;
315
+ /** Purpose type (mục đích sử dụng kinh doanh/không kinh doanh) labels. */
316
+ export declare const PURPOSE_TYPE_LABELS: Record<EPurposeTypeCode, string>;
317
+ export declare const getCarPurposeTypeLabel: (code?: string | null) => string;
318
+ /** Usage purpose (mục đích sử dụng) labels for display. */
319
+ export declare const USAGE_PURPOSE_LABELS: Record<EVehicleUsageType, string>;
320
+ export declare const getCarUsagePurposeLabel: (code?: string | null) => string;
321
+ export declare const getCarVehicleTypeCodeLabel: (code?: string | null) => string;
322
+ export declare const getOwnerTypeLabel: (ownerType?: string | null) => string;
323
+ export declare const DURATION_LABELS: Record<1 | 1.5 | 2 | 2.5 | 3, string>;
324
+ export declare const PASSENGER_ACCIDENT_LEVELS: {
325
+ value: number;
326
+ label: string;
327
+ }[];
328
+ export type MotorStepOneFormProps = {
329
+ control: Control<MotorPlanFormValues>;
330
+ setValue: UseFormSetValue<MotorPlanFormValues>;
331
+ premiumSummary?: MotorPremiumSummary;
332
+ onNext: () => void;
333
+ onBack?: () => void;
334
+ isStepReady: boolean;
335
+ };
@@ -0,0 +1,21 @@
1
+ /** Alphanumeric pattern for chassis number */
2
+ export declare const CHASSIS_ALPHANUMERIC_REGEX: RegExp;
3
+ /** Engine number: uppercase letters, digits, hyphen. Len 5-20. */
4
+ export declare const ENGINE_NUMBER_REGEX: RegExp;
5
+ export declare const ENGINE_NUMBER_MIN_LEN = 5;
6
+ export declare const ENGINE_NUMBER_MAX_LEN = 20;
7
+ export declare const CAR_CHASSIS_LEN = 17;
8
+ export declare const BIKE_CHASSIS_MIN_LEN = 12;
9
+ export declare const BIKE_CHASSIS_MAX_LEN = 17;
10
+ /**
11
+ * Validate car chassis number: exactly 17 chars, alphanumeric.
12
+ */
13
+ export declare function validateCarChassisNumber(value: unknown): true | string;
14
+ /**
15
+ * Validate bike chassis number: 12-17 chars, alphanumeric.
16
+ */
17
+ export declare function validateBikeChassisNumber(value: unknown): true | string;
18
+ /**
19
+ * Validate engine number (car and bike): 5-20 chars, [A-Z0-9-].
20
+ */
21
+ export declare function validateEngineNumber(value: unknown): true | string;
@@ -0,0 +1,5 @@
1
+ interface NotificationBellProps {
2
+ onNavigate?: () => void;
3
+ }
4
+ export declare const NotificationBell: ({ onNavigate }: NotificationBellProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,8 @@
1
+ import { INotification } from '../../types/notification';
2
+ interface NotificationItemProps {
3
+ notification: INotification;
4
+ onClose?: () => void;
5
+ onNavigate?: () => void;
6
+ }
7
+ export declare const NotificationItem: ({ notification, onClose, onNavigate }: NotificationItemProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ interface NotificationPanelProps {
2
+ onClose: () => void;
3
+ onNavigate?: () => void;
4
+ }
5
+ export declare const NotificationPanel: ({ onClose, onNavigate }: NotificationPanelProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ import { EOrderPaymentType } from '../types/enum';
2
+ export declare function OrderPaymentTypeBadge({ paymentTypeApplied, }: {
3
+ paymentTypeApplied?: EOrderPaymentType;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ interface Props {
2
+ isOpen: boolean;
3
+ onClose: () => void;
4
+ onSubmit: (payload: any) => Promise<boolean>;
5
+ editingGroup: any | null;
6
+ loading: boolean;
7
+ tenants: any[];
8
+ }
9
+ export declare const InsurancePolicyGroupFormDialog: ({ isOpen, onClose, onSubmit, editingGroup, loading, tenants, }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -5,6 +5,7 @@ type Step = {
5
5
  interface StepIndicatorHorizontalProps {
6
6
  currentStep: number;
7
7
  steps: Step[];
8
+ onStepClick?: (stepNumber: number) => void;
8
9
  }
9
- export declare const StepIndicatorHorizontal: ({ currentStep, steps }: StepIndicatorHorizontalProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const StepIndicatorHorizontal: ({ currentStep, steps, onStepClick, }: StepIndicatorHorizontalProps) => import("react/jsx-runtime").JSX.Element;
10
11
  export {};
@@ -1,5 +1,7 @@
1
+ import { TransactionStatus } from '../../types/enum';
1
2
  type Props = {
2
3
  publicId: string;
4
+ status?: TransactionStatus;
3
5
  };
4
- export declare const PublicIdActionMenu: ({ publicId }: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const PublicIdActionMenu: ({ publicId, status }: Props) => import("react/jsx-runtime").JSX.Element;
5
7
  export {};
@@ -22,9 +22,11 @@ export declare const ApiUrls: {
22
22
  list: string;
23
23
  getSignedUrls: string;
24
24
  esimTransactionList: string;
25
+ esimTransactionDetail: (publicId: string) => string;
25
26
  create: string;
26
27
  createMany: string;
27
28
  confirm: string;
29
+ purchaseConfirm: string;
28
30
  sendBankTransaction: string;
29
31
  checkTicketStatus: string;
30
32
  getByBankTransactionId: (transactionId: string) => string;
@@ -70,6 +72,10 @@ export declare const ApiUrls: {
70
72
  uploadIdentityDocuments: string;
71
73
  saveReaderHistory: string;
72
74
  getReaderHistories: string;
75
+ extractCarRegistration: string;
76
+ extractCarRegistrationFromBase64: string;
77
+ extractBikeRegistration: string;
78
+ extractBikeRegistrationFromBase64: string;
73
79
  };
74
80
  bid: {
75
81
  list: string;
@@ -88,6 +94,7 @@ export declare const ApiUrls: {
88
94
  removeMembers: string;
89
95
  organizationTree: string;
90
96
  abbankList: string;
97
+ bankDepartmentList: (shortName: string) => string;
91
98
  departmentsByTenantTypes: (types: string) => string;
92
99
  usersByTenantTypes: (types: string) => string;
93
100
  };
@@ -105,6 +112,7 @@ export declare const ApiUrls: {
105
112
  requestOtp: string;
106
113
  changePasswordWithOtp: string;
107
114
  list: string;
115
+ getUserByTenantTypes: string;
108
116
  approveUser: string;
109
117
  bookerList: string;
110
118
  createBooker: string;
@@ -134,6 +142,7 @@ export declare const ApiUrls: {
134
142
  getTransactionCountByStatus: string;
135
143
  getTransactionCountByDate: string;
136
144
  adminDashboardMetrics: string;
145
+ insuranceMetrics: string;
137
146
  };
138
147
  tenantHandlers: {
139
148
  list: string;
@@ -161,7 +170,9 @@ export declare const ApiUrls: {
161
170
  updateTenantCommissionPolicies: (tenantId: number, policyGroupId: number) => string;
162
171
  updateTenantCommissionPoliciesLegacy: (tenantId: number) => string;
163
172
  getMemberCommissionPoliciesByMemberId: (memberId: number) => string;
164
- updateMemberCommissionPoliciesByMemberId: (memberId: number) => string;
173
+ createMemberCommissionPoliciesByMemberId: (memberId: number) => string;
174
+ updateMemberCommissionPoliciesByMemberId: (memberId: number, policyGroupId: number) => string;
175
+ updateMemberCommissionPoliciesByMemberIdLegacy: (memberId: number) => string;
165
176
  create: string;
166
177
  update: (id: number) => string;
167
178
  };
@@ -221,16 +232,54 @@ export declare const ApiUrls: {
221
232
  streets: string;
222
233
  };
223
234
  };
235
+ motorInsurance: {
236
+ motorInsuranceSettings: string;
237
+ providers: string;
238
+ createBikeQuote: (provider: string) => string;
239
+ createBikeTransaction: (provider: string) => string;
240
+ createCarQuote: (provider: string) => string;
241
+ createCarTransaction: (provider: string) => string;
242
+ transactionList: string;
243
+ transactionDetail: (publicId: string) => string;
244
+ retryProviderPolicy: (publicId: string) => string;
245
+ approveTransaction: (publicId: string) => string;
246
+ rejectTransaction: (publicId: string) => string;
247
+ updateTransaction: (publicId: string) => string;
248
+ };
224
249
  insuranceHandlers: {
225
250
  providers: string;
226
251
  coveragePlans: (provider: string) => string;
227
252
  transactionDetail: (publicId: string) => string;
253
+ retryProviderPolicy: (publicId: string) => string;
254
+ approveTransaction: (publicId: string) => string;
255
+ rejectTransaction: (publicId: string) => string;
228
256
  transactionList: string;
229
257
  coveragePlanQuotes: (provider: string) => string;
230
258
  travelInsuranceSettings: string;
231
259
  calculatePremium: string;
232
260
  calculateSinglePlanPremium: string;
233
261
  createTransaction: string;
262
+ updateTransaction: (publicId: string) => string;
263
+ quickRecommendations: string;
264
+ quickRecommendationsByCountry: (countryId: number) => string;
265
+ };
266
+ couponHandlers: {
267
+ validate: string;
268
+ list: string;
269
+ summary: string;
270
+ campaignList: string;
271
+ campaignDetail: (id: number) => string;
272
+ campaignCreate: string;
273
+ campaignExport: (id: number) => string;
274
+ campaignPatchStatus: (id: number) => string;
275
+ detail: (id: number) => string;
276
+ create: string;
277
+ update: (id: number) => string;
278
+ patchStatus: (id: number) => string;
279
+ };
280
+ location: {
281
+ provinces: string;
282
+ wards: (stateId: number | string) => string;
234
283
  };
235
284
  insuranceLocation: {
236
285
  countries: string;
@@ -43,5 +43,6 @@ export declare enum BusinessCodes {
43
43
  SIM_ORDER_CREATION_FAILED = "B_062",
44
44
  SIM_PACKAGE_NOT_FOUND = "B_065",
45
45
  SIM_TRANSACTION_GROUP_NOT_FOUND = "B_064",
46
- BALANCE_INSUFFICIENT = "B_040"
46
+ BALANCE_INSUFFICIENT = "B_040",
47
+ FX_AMOUNT_EXCEEDS_MAX_LIMIT = "B_070"
47
48
  }
@@ -14,6 +14,8 @@ export declare const Env: {
14
14
  API_URL: any;
15
15
  BUILD_FOR: any;
16
16
  BOOKER_URL: any;
17
+ PARTNER_URL: any;
18
+ ADMIN_URL: any;
17
19
  CLARITY_KEY: any;
18
20
  GUEST_API_KEY: any;
19
21
  };
@@ -32,3 +32,14 @@ export declare enum EPolicyType {
32
32
  DISCOUNT = "discount",
33
33
  BONUS = "bonus"
34
34
  }
35
+ export declare enum EPolicyCalculatorType {
36
+ LEVEL = "level",
37
+ INDEPENDENT = "independent"
38
+ }
39
+ /** Insurance product type for policy rules. INTERNATION_TRAVEL = du lịch quốc tế; DOMESTIC_TRAVEL = du lịch nội địa; MLI = Xe máy dân sự bắt buộc; ALI = Xe hơi dân sự bắt buộc. */
40
+ export declare enum EInsuranceProductType {
41
+ INTERNATION_TRAVEL = "international_travel",
42
+ DOMESTIC_TRAVEL = "domestic_travel",
43
+ MLI = "mli",
44
+ ALI = "ali"
45
+ }
@@ -2,3 +2,7 @@ export declare const vietnamPhoneRegex: RegExp;
2
2
  export declare const vietnamLocalPhoneRegex: RegExp;
3
3
  export declare const vietnamInternationalPhoneRegex: RegExp;
4
4
  export declare const idNumberRegex: RegExp;
5
+ /** Vietnamese motorcycle license plate: XXXX-XXX.XX | XXXX-XXXXX | XXXXXXXX | XXXXXXXXX */
6
+ export declare const licensePlateRegex: RegExp;
7
+ /** Vietnamese car license plate: XXX-XXX.XX | XXXX-XXX.XX | XXX-XXXXX | XXXX-XXXXX | XXXXXXXX | XXXXXXXXX */
8
+ export declare const carLicensePlateRegex: RegExp;
@@ -6,4 +6,7 @@ export declare const tenantTypeOptions: {
6
6
  export declare const BANK_CODES: {
7
7
  readonly TCB: "TCB";
8
8
  readonly ABBANK: "ABBANK";
9
+ readonly VPBANK: "VPBANK";
9
10
  };
11
+ /** Banks with department selection + ZNS confirmation (ABBANK, VPBANK) */
12
+ export declare const BANKS_WITH_DEPARTMENT_AND_ZNS_FLOW: readonly ["ABBANK", "VPBANK"];
@@ -0,0 +1,3 @@
1
+ import { TransactionStatus } from '../types/enum';
2
+ export declare const CUSTOMER_PURCHASE_CONFIRMATION_STATUS_LABEL = "Ch\u1EDD KH x\u00E1c nh\u1EADn thanh to\u00E1n";
3
+ export declare const TRANSACTION_STATUS_LABELS: Partial<Record<TransactionStatus, string>>;
@@ -4,6 +4,8 @@ type InitProps = {
4
4
  container?: HTMLElement;
5
5
  apiKey: string;
6
6
  type?: ESdkFormType;
7
+ scrollable?: boolean;
8
+ utm?: Record<string, string> | null;
7
9
  };
8
10
  interface GoTripSDKProps {
9
11
  init: (props: InitProps) => void;
@@ -0,0 +1,2 @@
1
+ import { IESimTransaction } from '../types/response.dto';
2
+ export declare function fetchEsimTransactionByPublicId(publicId: string): Promise<IESimTransaction | null>;