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.
- package/assets/index.css +1 -1
- package/index.js +49571 -39059
- package/package.json +1 -1
- package/types/components/AddTransaction/Agent.d.ts +3 -2
- package/types/components/AddTransaction/FlightInfomation.d.ts +2 -1
- package/types/components/AddTransaction/SelectingBankMessageAlerts.d.ts +5 -0
- package/types/components/Admin/AgencyUserSelector/AgencyUserSelector.d.ts +7 -0
- package/types/components/Admin/AgencyUserSelector/AgencyUserSelectorModal.d.ts +10 -0
- package/types/components/ApprovalStatusBadge.d.ts +7 -0
- package/types/components/Apps/EmbededIndividualApp.d.ts +3 -1
- package/types/components/BankTransferInfo/BankTransferInfoDisplay.d.ts +7 -0
- package/types/components/Common/DateDisplay.d.ts +7 -0
- package/types/components/Common/MultiTagCombobox.d.ts +14 -0
- package/types/components/Common/PrimaryRadioGroup.d.ts +16 -0
- package/types/components/Common/TimeRangeSelect.d.ts +17 -0
- package/types/components/Insurance/CreateInsuranceTransactionForm.d.ts +29 -5
- package/types/components/Insurance/DateRangePicker.d.ts +12 -0
- package/types/components/Insurance/InsuranceContentRenderer/DynamicRenderer.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/AccordionBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/ActionButtonBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/ContainerBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/DataRowBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/DividerBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/ListGroupBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/blocks/TextBlock.d.ts +6 -0
- package/types/components/Insurance/InsuranceContentRenderer/types.d.ts +64 -0
- package/types/components/Insurance/InsuranceContentRenderer/utils/richText.d.ts +14 -0
- package/types/components/Insurance/InsuranceContentRenderer/utils/styleMapper.d.ts +6 -0
- package/types/components/Insurance/InsuranceDatePicker.d.ts +9 -0
- package/types/components/Insurance/InsurancePlans/InsurancePlanFilter.d.ts +12 -0
- package/types/components/Insurance/InsurancePlans/InsurancePlanList.d.ts +1 -1
- package/types/components/Insurance/InsurancePlans/QuickCoveragePlanCard.d.ts +16 -0
- package/types/components/Insurance/InsurancePlans/QuickRecommendationsSection.d.ts +18 -0
- package/types/components/Insurance/InsurancePlans/index.d.ts +1 -0
- package/types/components/Insurance/InsuranceSummaryOverview.d.ts +7 -2
- package/types/components/Insurance/InsuranceTypeAndPeopleCountFields.d.ts +10 -0
- package/types/components/Insurance/InsuredTravelersTable.d.ts +6 -0
- package/types/components/Insurance/ProviderApiDebugDialog.d.ts +17 -0
- package/types/components/Insurance/SimpleDetail.d.ts +2 -1
- package/types/components/Insurance/StepFourPayment.d.ts +31 -5
- package/types/components/Insurance/StepOneForm.d.ts +11 -2
- package/types/components/Insurance/StepThree.d.ts +29 -0
- package/types/components/Insurance/StepThreeBuyerInfo.d.ts +4 -1
- package/types/components/Insurance/StepThreeInsuredPeople.d.ts +4 -1
- package/types/components/Insurance/StepTwoPlans.d.ts +9 -1
- package/types/components/Insurance/documentScanAutofill.d.ts +37 -0
- package/types/components/Insurance/insuranceExcelImport.d.ts +13 -0
- package/types/components/Insurance/insuredPeopleImport.d.ts +23 -0
- package/types/components/Insurance/{FormElements.d.ts → shared/FormElements.d.ts} +13 -3
- package/types/components/Insurance/shared/InfoBlockCard.d.ts +10 -0
- package/types/components/Insurance/shared/PaymentMethodSelector.d.ts +10 -0
- package/types/components/Insurance/shared/SimpleSelect.d.ts +14 -0
- package/types/components/Insurance/shared/StepFooter.d.ts +8 -0
- package/types/components/Insurance/shared/index.d.ts +5 -0
- package/types/components/Insurance/types.d.ts +22 -5
- package/types/components/Insurance/validationUtils.d.ts +7 -1
- package/types/components/Modal/CancelTransactionModal.d.ts +1 -0
- package/types/components/Modal/ESimPurchaseModal.d.ts +4 -1
- package/types/components/Modal/EsimBankTransferModal.d.ts +13 -0
- package/types/components/Modal/InsurancePaymentModal.d.ts +2 -0
- package/types/components/Modal/MotorInsurancePaymentModal.d.ts +13 -0
- package/types/components/Modal/ProcessingOrderDialog.d.ts +8 -0
- package/types/components/MotorInsurance/Bike/BikePremiumSummary.d.ts +9 -0
- package/types/components/MotorInsurance/Bike/BikeStepOneForm.d.ts +30 -0
- package/types/components/MotorInsurance/Bike/BikeStepThreePayment.d.ts +26 -0
- package/types/components/MotorInsurance/Bike/BikeStepTwoVehicleInfo.d.ts +12 -0
- package/types/components/MotorInsurance/Bike/CreateBikeInsuranceForm.d.ts +17 -0
- package/types/components/MotorInsurance/Bike/index.d.ts +5 -0
- package/types/components/MotorInsurance/Car/CarPremiumSummary.d.ts +8 -0
- package/types/components/MotorInsurance/Car/CarStepFourPayment.d.ts +30 -0
- package/types/components/MotorInsurance/Car/CarStepOneForm.d.ts +27 -0
- package/types/components/MotorInsurance/Car/CarStepThreeInfo.d.ts +11 -0
- package/types/components/MotorInsurance/Car/CarStepTwoPlan.d.ts +11 -0
- package/types/components/MotorInsurance/Car/CreateCarInsuranceForm.d.ts +17 -0
- package/types/components/MotorInsurance/Car/car-form.constants.d.ts +23 -0
- package/types/components/MotorInsurance/Car/index.d.ts +6 -0
- package/types/components/MotorInsurance/CreateMotorInsuranceTransactionForm.d.ts +17 -0
- package/types/components/MotorInsurance/DocumentUploadPreview.d.ts +14 -0
- package/types/components/MotorInsurance/image-storage.utils.d.ts +18 -0
- package/types/components/MotorInsurance/index.d.ts +4 -0
- package/types/components/MotorInsurance/motor-insurance.types.d.ts +335 -0
- package/types/components/MotorInsurance/motor-insurance.validation.d.ts +21 -0
- package/types/components/Notification/NotificationBell.d.ts +5 -0
- package/types/components/Notification/NotificationItem.d.ts +8 -0
- package/types/components/Notification/NotificationPanel.d.ts +6 -0
- package/types/components/OrderPaymentTypeBadge.d.ts +4 -0
- package/types/components/PolicyGroup/InsurancePolicyGroupFormDialog.d.ts +10 -0
- package/types/components/StepIndicator/StepIndicatorHorizontal.d.ts +2 -1
- package/types/components/TransactionList/PublicIdActionMenu.d.ts +3 -1
- package/types/constants/api-urls.d.ts +50 -1
- package/types/constants/business-codes.d.ts +2 -1
- package/types/constants/env.d.ts +2 -0
- package/types/constants/policy-enums.d.ts +11 -0
- package/types/constants/regex.d.ts +4 -0
- package/types/constants/tenant.d.ts +3 -0
- package/types/constants/transaction-status-labels.d.ts +3 -0
- package/types/embeded-main.d.ts +2 -0
- package/types/hooks/fetchEsimTransaction.d.ts +2 -0
- package/types/hooks/transactions/useGroupTransactions.d.ts +10 -10
- package/types/hooks/traveller-confirmation/submit-confirmation.util.d.ts +1 -0
- package/types/hooks/traveller-confirmation/traveller-confirmation-flow.d.ts +4 -0
- package/types/hooks/traveller-confirmation/types.d.ts +22 -0
- package/types/hooks/traveller-confirmation/usePurchaseTravellerConfirmation.d.ts +12 -0
- package/types/hooks/traveller-confirmation/useTravellerConfirmationFetch.d.ts +2 -0
- package/types/hooks/useAdminDashboard.d.ts +19 -0
- package/types/hooks/useAutoSelectBankBranchAndDepartment.d.ts +19 -0
- package/types/hooks/useBankOutsideWorkingHoursNotice.d.ts +5 -0
- package/types/hooks/useConfirmTransaction.d.ts +12 -31
- package/types/hooks/useCoupon.d.ts +95 -0
- package/types/hooks/useCouponValidation.d.ts +29 -0
- package/types/hooks/useGroupCustomers.d.ts +12 -9
- package/types/hooks/useInsuranceData.d.ts +3 -11
- package/types/hooks/useInsurancePlans.d.ts +13 -1
- package/types/hooks/useInsuranceTransaction.d.ts +34 -4
- package/types/hooks/useLocationData.d.ts +22 -0
- package/types/hooks/useMotorInsurance.d.ts +17 -0
- package/types/hooks/useMotorInsuranceTransaction.d.ts +124 -0
- package/types/hooks/useMotorQuote.d.ts +15 -0
- package/types/hooks/useNotifications.d.ts +10 -0
- package/types/hooks/usePolicyGroups.d.ts +1 -0
- package/types/hooks/useTenantList.d.ts +3 -4
- package/types/hooks/useUserById.d.ts +7 -0
- package/types/hooks/useUserSearch.d.ts +10 -0
- package/types/hooks/useUsersByTenantTypes.d.ts +11 -0
- package/types/hooks/useVehicleRegistrationScan.d.ts +39 -0
- package/types/pages/admin/CreateOrderOnBehalfTest.d.ts +3 -0
- package/types/pages/admin/coupons/CampaignCouponTable.d.ts +13 -0
- package/types/pages/admin/coupons/CampaignDetailPage.d.ts +1 -0
- package/types/pages/admin/coupons/CampaignListPage.d.ts +1 -0
- package/types/pages/admin/coupons/CouponFormPage.d.ts +1 -0
- package/types/pages/admin/insurance/create-insurance-transaction/AdminCreateInsuranceTransactionPage.d.ts +2 -0
- package/types/pages/admin/insurance/edit-insurance-transaction/AdminEditInsuranceTransactionPage.d.ts +1 -0
- package/types/pages/admin/insurance-policy-management/InsurancePolicyManagement.d.ts +1 -0
- package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorBikeTransactionPage.d.ts +1 -0
- package/types/pages/admin/motor-insurance/create-motor-transaction/AdminCreateMotorCarTransactionPage.d.ts +1 -0
- package/types/pages/admin/motor-insurance/edit-motor-transaction/AdminEditMotorTransactionPage.d.ts +1 -0
- package/types/pages/admin/motor-insurance-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
- package/types/pages/admin/motor-insurance-transaction-list/MotorInsuranceTransactionListPage.d.ts +5 -0
- package/types/pages/agency/home/HomePage.d.ts +1 -0
- package/types/pages/agency/home/constants.d.ts +16 -0
- package/types/pages/agency/insurance/motor-transaction-approval/MotorInsuranceTransactionApprovalPage.d.ts +1 -0
- package/types/pages/agency/insurance/motor-transaction-create/CreateCarInsuranceTransactionPage.d.ts +1 -0
- package/types/pages/agency/insurance/motor-transaction-create/CreateMotorInsuranceTransactionPage.d.ts +1 -0
- package/types/pages/agency/insurance/motor-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
- package/types/pages/agency/insurance/motor-transaction-list/MotorInsuranceTransactionListPage.d.ts +6 -0
- package/types/pages/agency/insurance/transaction-approval/InsuranceTransactionApprovalPage.d.ts +1 -0
- package/types/pages/agency/insurance/transaction-create/CreateInsuranceTransactionPage.d.ts +2 -0
- package/types/pages/agency/traveller-confirmation/PurchaseTravellerConfirmation.d.ts +5 -0
- package/types/pages/agency/traveller-confirmation/TravellerPurchaseConfirmation.d.ts +2 -0
- package/types/pages/guest/insurance-create.d.ts +8 -1
- package/types/pages/guest/motor-insurance-create.d.ts +6 -0
- package/types/providers/AppSettingsProvider.d.ts +1 -0
- package/types/store/useNotificationStore.d.ts +16 -0
- package/types/store/useTenantStore.d.ts +12 -0
- package/types/store/useTrackingStore.d.ts +10 -0
- package/types/types/app-settings.d.ts +13 -1
- package/types/types/coupon.d.ts +70 -0
- package/types/types/enum.d.ts +15 -2
- package/types/types/insurance-transaction.dto.d.ts +22 -1
- package/types/types/insurance.d.ts +19 -2
- package/types/types/notification.d.ts +23 -0
- package/types/types/response.dto.d.ts +53 -5
- package/types/types/sdk.d.ts +5 -1
- package/types/types/tracking.dto.d.ts +21 -0
- package/types/util/booker-display.d.ts +6 -0
- package/types/util/couponErrorMessages.d.ts +2 -0
- package/types/util/debt-report-display.d.ts +4 -0
- package/types/util/formatter.d.ts +6 -0
- package/types/util/fx-travelling-messages.d.ts +1 -0
- package/types/util/fx.d.ts +15 -0
- package/types/util/order-payment-display.d.ts +13 -0
- package/types/util/sim-display.d.ts +2 -0
- package/types/util/tracking.d.ts +19 -0
- package/types/util/transaction.util.d.ts +1 -1
- package/types/utils/bank.d.ts +4 -0
- package/types/utils/transaction-confirmation-link.d.ts +9 -0
|
@@ -12,8 +12,8 @@ export declare const useGroupTransactions: () => {
|
|
|
12
12
|
passportNo: string;
|
|
13
13
|
idNo: string;
|
|
14
14
|
exchangeRate: number;
|
|
15
|
-
transactionId: number;
|
|
16
15
|
phoneNumber: string;
|
|
16
|
+
transactionId: number;
|
|
17
17
|
ticketNo: string;
|
|
18
18
|
}[] | undefined;
|
|
19
19
|
}>;
|
|
@@ -28,8 +28,8 @@ export declare const useGroupTransactions: () => {
|
|
|
28
28
|
passportNo: string;
|
|
29
29
|
idNo: string;
|
|
30
30
|
exchangeRate: number;
|
|
31
|
-
transactionId: number;
|
|
32
31
|
phoneNumber: string;
|
|
32
|
+
transactionId: number;
|
|
33
33
|
ticketNo: string;
|
|
34
34
|
}[] | undefined;
|
|
35
35
|
}>;
|
|
@@ -44,8 +44,8 @@ export declare const useGroupTransactions: () => {
|
|
|
44
44
|
passportNo: string;
|
|
45
45
|
idNo: string;
|
|
46
46
|
exchangeRate: number;
|
|
47
|
-
transactionId: number;
|
|
48
47
|
phoneNumber: string;
|
|
48
|
+
transactionId: number;
|
|
49
49
|
ticketNo: string;
|
|
50
50
|
}[] | undefined;
|
|
51
51
|
}>;
|
|
@@ -60,8 +60,8 @@ export declare const useGroupTransactions: () => {
|
|
|
60
60
|
passportNo: string;
|
|
61
61
|
idNo: string;
|
|
62
62
|
exchangeRate: number;
|
|
63
|
-
transactionId: number;
|
|
64
63
|
phoneNumber: string;
|
|
64
|
+
transactionId: number;
|
|
65
65
|
ticketNo: string;
|
|
66
66
|
}[] | undefined;
|
|
67
67
|
}>;
|
|
@@ -76,8 +76,8 @@ export declare const useGroupTransactions: () => {
|
|
|
76
76
|
passportNo: string;
|
|
77
77
|
idNo: string;
|
|
78
78
|
exchangeRate: number;
|
|
79
|
-
transactionId: number;
|
|
80
79
|
phoneNumber: string;
|
|
80
|
+
transactionId: number;
|
|
81
81
|
ticketNo: string;
|
|
82
82
|
}[] | undefined;
|
|
83
83
|
}>;
|
|
@@ -92,8 +92,8 @@ export declare const useGroupTransactions: () => {
|
|
|
92
92
|
passportNo: string;
|
|
93
93
|
idNo: string;
|
|
94
94
|
exchangeRate: number;
|
|
95
|
-
transactionId: number;
|
|
96
95
|
phoneNumber: string;
|
|
96
|
+
transactionId: number;
|
|
97
97
|
ticketNo: string;
|
|
98
98
|
}[] | undefined;
|
|
99
99
|
}, undefined>;
|
|
@@ -108,8 +108,8 @@ export declare const useGroupTransactions: () => {
|
|
|
108
108
|
passportNo: string;
|
|
109
109
|
idNo: string;
|
|
110
110
|
exchangeRate: number;
|
|
111
|
-
transactionId: number;
|
|
112
111
|
phoneNumber: string;
|
|
112
|
+
transactionId: number;
|
|
113
113
|
ticketNo: string;
|
|
114
114
|
}[] | undefined;
|
|
115
115
|
}>;
|
|
@@ -124,8 +124,8 @@ export declare const useGroupTransactions: () => {
|
|
|
124
124
|
passportNo: string;
|
|
125
125
|
idNo: string;
|
|
126
126
|
exchangeRate: number;
|
|
127
|
-
transactionId: number;
|
|
128
127
|
phoneNumber: string;
|
|
128
|
+
transactionId: number;
|
|
129
129
|
ticketNo: string;
|
|
130
130
|
}[] | undefined;
|
|
131
131
|
}>;
|
|
@@ -148,8 +148,8 @@ export declare const useGroupTransactions: () => {
|
|
|
148
148
|
passportNo: string;
|
|
149
149
|
idNo: string;
|
|
150
150
|
exchangeRate: number;
|
|
151
|
-
transactionId: number;
|
|
152
151
|
phoneNumber: string;
|
|
152
|
+
transactionId: number;
|
|
153
153
|
ticketNo: string;
|
|
154
154
|
}[] | undefined;
|
|
155
155
|
}>;
|
|
@@ -164,8 +164,8 @@ export declare const useGroupTransactions: () => {
|
|
|
164
164
|
passportNo: string;
|
|
165
165
|
idNo: string;
|
|
166
166
|
exchangeRate: number;
|
|
167
|
-
transactionId: number;
|
|
168
167
|
phoneNumber: string;
|
|
168
|
+
transactionId: number;
|
|
169
169
|
ticketNo: string;
|
|
170
170
|
}[] | undefined;
|
|
171
171
|
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isConfirmationApiSuccess: (code?: string) => boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TransactionStatus } from '../../types/enum';
|
|
2
|
+
/** Luồng xác nhận mua — `/confirm-purchase/:id` */
|
|
3
|
+
export declare const PURCHASE_CONFIRMATION_STATUSES: TransactionStatus[];
|
|
4
|
+
export declare const PURCHASE_CONFIRMATION_PENDING_STATUS = TransactionStatus.CUSTOMER_PURCHASE_CONFIRMATION;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TransactionStatus } from '../../types/enum';
|
|
2
|
+
import { IAgent, ITransaction } from '../../types/response.dto';
|
|
3
|
+
export type TravellerConfirmationTransaction = {
|
|
4
|
+
id: number;
|
|
5
|
+
bankCode: string;
|
|
6
|
+
bankName: string;
|
|
7
|
+
bookerName?: string;
|
|
8
|
+
bookerEmail?: string;
|
|
9
|
+
ticketNumber: string;
|
|
10
|
+
travellerName: string;
|
|
11
|
+
confirmationToken: string;
|
|
12
|
+
status: TransactionStatus;
|
|
13
|
+
customerCode: string;
|
|
14
|
+
};
|
|
15
|
+
export type TravellerConfirmationContext = {
|
|
16
|
+
transaction: TravellerConfirmationTransaction | null;
|
|
17
|
+
agent: IAgent | null;
|
|
18
|
+
groupTransactions: ITransaction[];
|
|
19
|
+
isLoading: boolean;
|
|
20
|
+
fetchError: string | null;
|
|
21
|
+
refetch: () => Promise<void>;
|
|
22
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TravellerConfirmationTransaction } from './types';
|
|
2
|
+
type Params = {
|
|
3
|
+
transaction: TravellerConfirmationTransaction | null;
|
|
4
|
+
refetch: () => Promise<void>;
|
|
5
|
+
};
|
|
6
|
+
export declare const usePurchaseTravellerConfirmation: ({ transaction, refetch }: Params) => {
|
|
7
|
+
isPending: boolean;
|
|
8
|
+
isCompleted: boolean;
|
|
9
|
+
isSubmitting: boolean;
|
|
10
|
+
submitPurchaseConfirmation: () => Promise<void>;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -10,6 +10,22 @@ export type AdminCurrencyMetric = {
|
|
|
10
10
|
currencyCode: string;
|
|
11
11
|
totalAmount: number;
|
|
12
12
|
};
|
|
13
|
+
export type InsuranceProvider = {
|
|
14
|
+
provider: string;
|
|
15
|
+
successCount: number;
|
|
16
|
+
totalAmount: number;
|
|
17
|
+
};
|
|
18
|
+
export type InsuranceCountry = {
|
|
19
|
+
countryId: number;
|
|
20
|
+
countryName: string;
|
|
21
|
+
count: number;
|
|
22
|
+
amount: number;
|
|
23
|
+
alpha2?: string;
|
|
24
|
+
};
|
|
25
|
+
export type InsuranceMetrics = {
|
|
26
|
+
providers: InsuranceProvider[];
|
|
27
|
+
countries: InsuranceCountry[];
|
|
28
|
+
};
|
|
13
29
|
export type AdminDashboardMetrics = {
|
|
14
30
|
orderMetrics: AdminOrderMetrics;
|
|
15
31
|
currencyMetrics: AdminCurrencyMetric[];
|
|
@@ -18,4 +34,7 @@ export declare const useAdminDashboard: () => {
|
|
|
18
34
|
loading: boolean;
|
|
19
35
|
metrics: AdminDashboardMetrics | null;
|
|
20
36
|
fetchMetrics: (startDate: string, endDate: string) => Promise<void>;
|
|
37
|
+
insuranceMetrics: InsuranceMetrics | null;
|
|
38
|
+
insuranceLoading: boolean;
|
|
39
|
+
fetchInsuranceMetrics: (startDate: string, endDate: string) => Promise<void>;
|
|
21
40
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type BankDepartmentOption = {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
parentId?: number;
|
|
5
|
+
};
|
|
6
|
+
type Params = {
|
|
7
|
+
departmentOptions: BankDepartmentOption[];
|
|
8
|
+
selectedBranch: number | null;
|
|
9
|
+
setSelectedBranch: (id: number | null) => void;
|
|
10
|
+
selectedDepartment: number | null;
|
|
11
|
+
setSelectedDepartment: (id: number | null) => void;
|
|
12
|
+
onDepartmentSelected?: (id: number) => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const useAutoSelectBankBranchAndDepartment: ({ departmentOptions, selectedBranch, setSelectedBranch, selectedDepartment, setSelectedDepartment, onDepartmentSelected, }: Params) => {
|
|
15
|
+
branches: BankDepartmentOption[];
|
|
16
|
+
departments: BankDepartmentOption[];
|
|
17
|
+
shouldShowBranchSelect: boolean;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -1,38 +1,19 @@
|
|
|
1
1
|
import { TransactionStatus } from '../types/enum';
|
|
2
|
-
import { IAgent, ITransaction
|
|
2
|
+
import { IAgent, ITransaction } from '../types/response.dto';
|
|
3
3
|
export type ConfirmTransactionData = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
status: TransactionStatus;
|
|
15
|
-
customerCode: string;
|
|
16
|
-
agent?: IUser;
|
|
17
|
-
groupTransactions?: ITransaction[];
|
|
18
|
-
};
|
|
19
|
-
message: string;
|
|
4
|
+
id: number;
|
|
5
|
+
bankCode: string;
|
|
6
|
+
bankName: string;
|
|
7
|
+
bookerName?: string;
|
|
8
|
+
bookerEmail?: string;
|
|
9
|
+
ticketNumber: string;
|
|
10
|
+
travellerName: string;
|
|
11
|
+
confirmationToken: string;
|
|
12
|
+
status: TransactionStatus;
|
|
13
|
+
customerCode: string;
|
|
20
14
|
};
|
|
21
15
|
export declare const useConfirmTransaction: () => {
|
|
22
|
-
transaction:
|
|
23
|
-
id: number;
|
|
24
|
-
bankCode: string;
|
|
25
|
-
bankName: string;
|
|
26
|
-
bookerName?: string;
|
|
27
|
-
bookerEmail?: string;
|
|
28
|
-
ticketNumber: string;
|
|
29
|
-
travellerName: string;
|
|
30
|
-
confirmationToken: string;
|
|
31
|
-
status: TransactionStatus;
|
|
32
|
-
customerCode: string;
|
|
33
|
-
agent?: IUser;
|
|
34
|
-
groupTransactions?: ITransaction[];
|
|
35
|
-
} | null;
|
|
16
|
+
transaction: ConfirmTransactionData | null;
|
|
36
17
|
agent: IAgent | null;
|
|
37
18
|
groupTransactions: ITransaction[];
|
|
38
19
|
isLoading: boolean;
|
|
@@ -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 {};
|
|
@@ -24,7 +24,10 @@ declare const onePersonSchema: yup.ObjectSchema<{
|
|
|
24
24
|
amount: undefined;
|
|
25
25
|
bankDepartmentId: undefined;
|
|
26
26
|
}, "">;
|
|
27
|
-
|
|
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;
|
|
@@ -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
|
|
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,10 +1,22 @@
|
|
|
1
1
|
import { CoveragePlanPremium, CalculatePremiumRequest, InsuredPerson, TravelPlanFormValues } from '../components/Insurance/types';
|
|
2
|
+
import { ETravelScope } from '../types/insurance';
|
|
3
|
+
import { QuickCoveragePlan } from '../components/Insurance/InsurancePlans/QuickCoveragePlanCard';
|
|
4
|
+
export interface QuickRecommendationsByCountry {
|
|
5
|
+
countryId: number;
|
|
6
|
+
countryName: string;
|
|
7
|
+
plans: QuickCoveragePlan[];
|
|
8
|
+
}
|
|
2
9
|
interface UseInsurancePlansReturn {
|
|
3
10
|
plans: CoveragePlanPremium[];
|
|
4
11
|
loading: boolean;
|
|
5
12
|
error: string | null;
|
|
6
13
|
refetch: () => Promise<void>;
|
|
7
|
-
recalculatePremiumForPlan: (travelPlan: TravelPlanFormValues, insuredPeople: InsuredPerson[], planId: number, provider: string) => Promise<CoveragePlanPremium | null>;
|
|
14
|
+
recalculatePremiumForPlan: (travelPlan: TravelPlanFormValues, insuredPeople: InsuredPerson[], planId: number, provider: string, travelScope: ETravelScope) => Promise<CoveragePlanPremium | null>;
|
|
15
|
+
quickRecommendationsByCountry: QuickRecommendationsByCountry[];
|
|
16
|
+
loadingQuickRecommendations: boolean;
|
|
17
|
+
errorQuickRecommendations: string | null;
|
|
18
|
+
refetchQuickRecommendations: () => Promise<void>;
|
|
19
|
+
fetchQuickRecommendationsByCountry: (countryId: number) => Promise<QuickCoveragePlan[]>;
|
|
8
20
|
}
|
|
9
21
|
export declare const useInsurancePlans: (requestPayload: CalculatePremiumRequest | null) => UseInsurancePlansReturn;
|
|
10
22
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InsuranceTransaction } from '../types/insurance-transaction.dto';
|
|
2
|
-
import { EPaymentMethod, TransactionStatus } from '../types/enum';
|
|
2
|
+
import { EPaymentMethod, EOrderPaymentType, TransactionStatus } from '../types/enum';
|
|
3
|
+
import { EApprovalStatus, ETravelScope } from '../types/insurance';
|
|
3
4
|
export interface GetInsuranceTransactionListReqDto {
|
|
4
5
|
page?: number;
|
|
5
6
|
limit?: number;
|
|
@@ -10,6 +11,12 @@ export interface GetInsuranceTransactionListReqDto {
|
|
|
10
11
|
sortField?: 'date' | 'value';
|
|
11
12
|
sortDirection?: 'asc' | 'desc';
|
|
12
13
|
status?: TransactionStatus;
|
|
14
|
+
publicId?: string;
|
|
15
|
+
primaryInsuredFullName?: string;
|
|
16
|
+
travelScope?: ETravelScope;
|
|
17
|
+
provider?: string;
|
|
18
|
+
approvalStatus?: EApprovalStatus;
|
|
19
|
+
approvalBypassed?: boolean;
|
|
13
20
|
}
|
|
14
21
|
export interface GetInsuranceTransactionListRespDto {
|
|
15
22
|
transactions: InsuranceTransaction[];
|
|
@@ -25,7 +32,10 @@ export interface CreateTransactionPayload {
|
|
|
25
32
|
coverageStartDate: string;
|
|
26
33
|
coverageEndDate: string;
|
|
27
34
|
travelType: string;
|
|
28
|
-
|
|
35
|
+
travelScope: ETravelScope;
|
|
36
|
+
destinationCountryId?: number;
|
|
37
|
+
provinceFromId?: number;
|
|
38
|
+
provinceToId?: number;
|
|
29
39
|
insureds: Array<{
|
|
30
40
|
relationToPrimary: string;
|
|
31
41
|
isPrimary: boolean;
|
|
@@ -46,18 +56,26 @@ export interface CreateTransactionPayload {
|
|
|
46
56
|
}>;
|
|
47
57
|
providerSpecific?: Record<string, any>;
|
|
48
58
|
buyerInfo?: Record<string, any>;
|
|
59
|
+
paymentType?: EOrderPaymentType;
|
|
49
60
|
paymentMode?: EPaymentMethod;
|
|
50
61
|
premium?: {
|
|
51
62
|
totalPremium: number;
|
|
52
63
|
premiumPerPerson: number;
|
|
53
64
|
};
|
|
65
|
+
createdOnBehalfOfUserId?: number;
|
|
66
|
+
approvalStatus?: EApprovalStatus | null;
|
|
67
|
+
approvalBypassed?: boolean;
|
|
54
68
|
}
|
|
55
69
|
export declare const useInsuranceTransactionDetail: (publicId: string | undefined) => {
|
|
56
70
|
transaction: InsuranceTransaction | null;
|
|
57
71
|
planName: string;
|
|
58
72
|
loading: boolean;
|
|
59
73
|
error: string | null;
|
|
60
|
-
refetch: (
|
|
74
|
+
refetch: (options?: {
|
|
75
|
+
silent?: boolean;
|
|
76
|
+
}) => Promise<void>;
|
|
77
|
+
retryProviderLoading: boolean;
|
|
78
|
+
retryProviderPolicy: () => Promise<void>;
|
|
61
79
|
};
|
|
62
80
|
export declare const useInsuranceTransaction: (options?: {
|
|
63
81
|
defaultLimit?: number;
|
|
@@ -82,9 +100,21 @@ export declare const useInsuranceTransaction: (options?: {
|
|
|
82
100
|
planName: string;
|
|
83
101
|
loading: boolean;
|
|
84
102
|
error: string | null;
|
|
85
|
-
refetch: (
|
|
103
|
+
refetch: (options?: {
|
|
104
|
+
silent?: boolean;
|
|
105
|
+
}) => Promise<void>;
|
|
106
|
+
retryProviderLoading: boolean;
|
|
107
|
+
retryProviderPolicy: () => Promise<void>;
|
|
86
108
|
};
|
|
87
109
|
createTransaction: (payload: CreateTransactionPayload) => Promise<InsuranceTransaction>;
|
|
110
|
+
updateTransaction: (publicId: string, payload: CreateTransactionPayload) => Promise<InsuranceTransaction>;
|
|
88
111
|
isCreatingTransaction: boolean;
|
|
89
112
|
checkTransactionStatus: (publicId: string) => Promise<InsuranceTransaction>;
|
|
113
|
+
approveTransaction: (publicId: string) => Promise<void>;
|
|
114
|
+
isApprovingTransaction: boolean;
|
|
115
|
+
rejectTransaction: (publicId: string, payload: {
|
|
116
|
+
code: string;
|
|
117
|
+
text?: string;
|
|
118
|
+
}) => Promise<void>;
|
|
119
|
+
isRejectingTransaction: boolean;
|
|
90
120
|
};
|
|
@@ -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
|
+
};
|