gotrip-fx-transaction-form 1.0.288-dev → 1.0.289-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 +2156 -2148
- package/package.json +1 -1
- package/types/components/Insurance/InsuranceApprovalPaymentStep.d.ts +27 -0
- package/types/components/MotorInsurance/MotorInsuranceApprovalPaymentStep.d.ts +19 -0
- package/types/hooks/useInsuranceTransaction.d.ts +4 -1
- package/types/hooks/useMotorInsuranceTransaction.d.ts +7 -2
package/package.json
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EPaymentMethod, EOrderPaymentType } from '../../types/enum';
|
|
2
|
+
import { EInsuranceType } from '../../types/insurance';
|
|
3
|
+
export interface InsuranceApprovalPaymentStepProps {
|
|
4
|
+
user?: any;
|
|
5
|
+
amount: number;
|
|
6
|
+
discountAmount?: number;
|
|
7
|
+
couponCode?: string;
|
|
8
|
+
couponDescription?: string;
|
|
9
|
+
isApproving?: boolean;
|
|
10
|
+
isRejecting?: boolean;
|
|
11
|
+
onApprove?: (paymentMode: EPaymentMethod | undefined, paymentType: EOrderPaymentType) => void;
|
|
12
|
+
onReject?: (reason: string, text?: string) => void;
|
|
13
|
+
insuranceType?: EInsuranceType;
|
|
14
|
+
adultsCount?: number;
|
|
15
|
+
teenagerCount?: number;
|
|
16
|
+
childrenCount?: number;
|
|
17
|
+
freeTeenagerCount?: number;
|
|
18
|
+
freeChildrenCount?: number;
|
|
19
|
+
premiumPerPerson?: number;
|
|
20
|
+
isLoadingPremium?: boolean;
|
|
21
|
+
termsDetailsHtml?: string;
|
|
22
|
+
termsAgreeHtml?: string;
|
|
23
|
+
startDate?: string | Date;
|
|
24
|
+
travelScope?: string;
|
|
25
|
+
planName?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const InsuranceApprovalPaymentStep: ({ user, amount, discountAmount, couponCode, couponDescription, isApproving, isRejecting, onApprove, onReject, insuranceType, adultsCount, teenagerCount, childrenCount, freeTeenagerCount, freeChildrenCount, premiumPerPerson, isLoadingPremium, termsDetailsHtml, termsAgreeHtml, startDate, travelScope, planName, }: InsuranceApprovalPaymentStepProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EPaymentMethod, EOrderPaymentType } from '../../types/enum';
|
|
2
|
+
export interface MotorInsuranceApprovalPaymentStepProps {
|
|
3
|
+
user?: any;
|
|
4
|
+
amount: number;
|
|
5
|
+
premiumBeforeDiscount?: number;
|
|
6
|
+
discountAmount?: number;
|
|
7
|
+
isApproving?: boolean;
|
|
8
|
+
isRejecting?: boolean;
|
|
9
|
+
onApprove?: (paymentMode: EPaymentMethod | undefined, paymentType: EOrderPaymentType) => void;
|
|
10
|
+
onReject?: (reason: string, text?: string) => void;
|
|
11
|
+
termsDetailsHtml?: string;
|
|
12
|
+
termsAgreeHtml?: string;
|
|
13
|
+
startDate?: string | Date;
|
|
14
|
+
planName?: string;
|
|
15
|
+
tax?: number;
|
|
16
|
+
mandatoryPremium?: number;
|
|
17
|
+
passengerAccidentPremium?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare const MotorInsuranceApprovalPaymentStep: ({ user, amount, premiumBeforeDiscount, discountAmount, isApproving, isRejecting, onApprove, onReject, termsDetailsHtml, termsAgreeHtml, startDate, planName, tax, mandatoryPremium, passengerAccidentPremium, }: MotorInsuranceApprovalPaymentStepProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -110,7 +110,10 @@ export declare const useInsuranceTransaction: (options?: {
|
|
|
110
110
|
updateTransaction: (publicId: string, payload: CreateTransactionPayload) => Promise<InsuranceTransaction>;
|
|
111
111
|
isCreatingTransaction: boolean;
|
|
112
112
|
checkTransactionStatus: (publicId: string) => Promise<InsuranceTransaction>;
|
|
113
|
-
approveTransaction: (publicId: string
|
|
113
|
+
approveTransaction: (publicId: string, payload: {
|
|
114
|
+
paymentMode?: EPaymentMethod;
|
|
115
|
+
paymentType: EOrderPaymentType;
|
|
116
|
+
}) => Promise<any>;
|
|
114
117
|
isApprovingTransaction: boolean;
|
|
115
118
|
rejectTransaction: (publicId: string, payload: {
|
|
116
119
|
code: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EOrderPaymentType, TransactionStatus } from '../types/enum';
|
|
1
|
+
import { EPaymentMethod, EOrderPaymentType, TransactionStatus } from '../types/enum';
|
|
2
2
|
import { EMotorProvider, EMotorVehicleType } from '../components/MotorInsurance/motor-insurance.types';
|
|
3
3
|
export interface MotorInsuranceTransactionDetail {
|
|
4
4
|
id: number;
|
|
@@ -115,10 +115,15 @@ export declare const useMotorInsuranceTransaction: (options?: {
|
|
|
115
115
|
retryProviderPolicy: () => Promise<void>;
|
|
116
116
|
};
|
|
117
117
|
checkTransactionStatus: (publicId: string) => Promise<MotorInsuranceTransactionDetail | null>;
|
|
118
|
-
approveTransaction: (publicId: string
|
|
118
|
+
approveTransaction: (publicId: string, payload?: {
|
|
119
|
+
paymentMode?: EPaymentMethod;
|
|
120
|
+
paymentType?: EOrderPaymentType;
|
|
121
|
+
}) => Promise<any>;
|
|
122
|
+
isApprovingTransaction: boolean;
|
|
119
123
|
rejectTransaction: (publicId: string, payload: {
|
|
120
124
|
code: string;
|
|
121
125
|
text?: string;
|
|
122
126
|
}) => Promise<void>;
|
|
127
|
+
isRejectingTransaction: boolean;
|
|
123
128
|
updateTransaction: (publicId: string, payload: Record<string, unknown>) => Promise<MotorInsuranceTransactionDetail>;
|
|
124
129
|
};
|