gotrip-fx-transaction-form 1.0.270-dev → 1.0.271-dev
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/index.js +14746 -14666
- package/package.json +1 -1
- package/types/components/Insurance/CreateInsuranceTransactionForm.d.ts +15 -2
- package/types/components/Insurance/StepFourPayment.d.ts +3 -1
- package/types/components/Insurance/StepOneForm.d.ts +2 -1
- package/types/constants/api-urls.d.ts +1 -0
- package/types/hooks/useInsuranceTransaction.d.ts +1 -0
- package/types/pages/admin/insurance/edit-insurance-transaction/AdminEditInsuranceTransactionPage.d.ts +1 -0
- package/types/types/insurance-transaction.dto.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TravelPlanFormValues, CoveragePlanPremium, BuyerFormValues, InsuredPerson } from './types';
|
|
1
3
|
import { ETravelScope } from '../../types/insurance';
|
|
2
4
|
import { IUser } from '../../types/response.dto';
|
|
5
|
+
export type InsuranceFormInitialData = {
|
|
6
|
+
formValues: TravelPlanFormValues;
|
|
7
|
+
selectedPlan: CoveragePlanPremium | null;
|
|
8
|
+
buyerInfo: BuyerFormValues | null;
|
|
9
|
+
insuredPeople: InsuredPerson[];
|
|
10
|
+
recalculatedPremium?: CoveragePlanPremium['premium'] | null;
|
|
11
|
+
waitForApproval?: boolean;
|
|
12
|
+
};
|
|
3
13
|
export interface CreateInsuranceTransactionFormProps {
|
|
4
14
|
storageKey: string;
|
|
5
|
-
title?:
|
|
15
|
+
title?: ReactNode;
|
|
6
16
|
travelScope: ETravelScope;
|
|
7
17
|
onBack?: () => void;
|
|
8
18
|
onSuccess?: (transactionData: any) => void;
|
|
@@ -11,5 +21,8 @@ export interface CreateInsuranceTransactionFormProps {
|
|
|
11
21
|
isAdminMode?: boolean;
|
|
12
22
|
selectedUser?: IUser | null;
|
|
13
23
|
onOpenUserSelector?: () => void;
|
|
24
|
+
initialData?: InsuranceFormInitialData | null;
|
|
25
|
+
mode?: 'create' | 'edit';
|
|
26
|
+
editingPublicId?: string;
|
|
14
27
|
}
|
|
15
|
-
export declare const CreateInsuranceTransactionForm: ({ storageKey, title, travelScope, onBack, onSuccess, scrollable, recommendBoxHeight, isAdminMode, selectedUser, onOpenUserSelector, }: CreateInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const CreateInsuranceTransactionForm: ({ storageKey, title, travelScope, onBack, onSuccess, scrollable, recommendBoxHeight, isAdminMode, selectedUser, onOpenUserSelector, initialData, mode, editingPublicId, }: CreateInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -25,5 +25,7 @@ export interface StepFourPaymentProps {
|
|
|
25
25
|
waitForApproval?: boolean;
|
|
26
26
|
onWaitForApprovalChange?: (value: boolean) => void;
|
|
27
27
|
hasSelectedUser?: boolean;
|
|
28
|
+
submitLabel?: string;
|
|
29
|
+
showApprovalToggle?: boolean;
|
|
28
30
|
}
|
|
29
|
-
export declare const StepFourPayment: ({ travelScope, travelPlan, selectedPlan, buyerInfo, insuredPeople, onBack, onPayment, isProcessing, onPremiumUpdate, onCouponChange, paymentType: paymentTypeProp, isAdminMode, waitForApproval, onWaitForApprovalChange, hasSelectedUser, }: StepFourPaymentProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare const StepFourPayment: ({ travelScope, travelPlan, selectedPlan, buyerInfo, insuredPeople, onBack, onPayment, isProcessing, onPremiumUpdate, onCouponChange, paymentType: paymentTypeProp, isAdminMode, waitForApproval, onWaitForApprovalChange, hasSelectedUser, submitLabel, showApprovalToggle, }: StepFourPaymentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,6 +13,7 @@ interface StepOneFormProps {
|
|
|
13
13
|
isSubmitting?: boolean;
|
|
14
14
|
isStepOneReady?: boolean;
|
|
15
15
|
isGuest?: boolean;
|
|
16
|
+
showQuickRecommendations?: boolean;
|
|
16
17
|
}
|
|
17
|
-
export declare const StepOneForm: ({ control, tripStart, tripEnd, setValue, isDomestic, onQuickPlanSelect, recommendBoxHeight, onBack, onNext, isSubmitting, isStepOneReady, isGuest, }: StepOneFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const StepOneForm: ({ control, tripStart, tripEnd, setValue, isDomestic, onQuickPlanSelect, recommendBoxHeight, onBack, onNext, isSubmitting, isStepOneReady, isGuest, showQuickRecommendations, }: StepOneFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
export {};
|
|
@@ -254,6 +254,7 @@ export declare const ApiUrls: {
|
|
|
254
254
|
calculatePremium: string;
|
|
255
255
|
calculateSinglePlanPremium: string;
|
|
256
256
|
createTransaction: string;
|
|
257
|
+
updateTransaction: (publicId: string) => string;
|
|
257
258
|
quickRecommendations: string;
|
|
258
259
|
quickRecommendationsByCountry: (countryId: number) => string;
|
|
259
260
|
};
|
|
@@ -107,6 +107,7 @@ export declare const useInsuranceTransaction: (options?: {
|
|
|
107
107
|
retryProviderPolicy: () => Promise<void>;
|
|
108
108
|
};
|
|
109
109
|
createTransaction: (payload: CreateTransactionPayload) => Promise<InsuranceTransaction>;
|
|
110
|
+
updateTransaction: (publicId: string, payload: CreateTransactionPayload) => Promise<InsuranceTransaction>;
|
|
110
111
|
isCreatingTransaction: boolean;
|
|
111
112
|
checkTransactionStatus: (publicId: string) => Promise<InsuranceTransaction>;
|
|
112
113
|
approveTransaction: (publicId: string) => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AdminEditInsuranceTransactionPage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -109,6 +109,7 @@ export interface InsuranceTransaction {
|
|
|
109
109
|
approvalStatus?: EApprovalStatus | null;
|
|
110
110
|
approvalBypassed?: boolean;
|
|
111
111
|
createdByAdminId?: number | null;
|
|
112
|
+
updatedByAdminId?: number | null;
|
|
112
113
|
approvedAt?: string | null;
|
|
113
114
|
rejectedAt?: string | null;
|
|
114
115
|
rejectionReasonCode?: string | null;
|