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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gotrip-fx-transaction-form",
3
- "version": "1.0.288-dev",
3
+ "version": "1.0.289-dev",
4
4
  "description": "FX Transaction Form ES6 module",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -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) => Promise<void>;
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) => Promise<void>;
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
  };