gotrip-fx-transaction-form 1.0.255-dev → 1.0.258-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 +27954 -27891
- package/package.json +1 -1
- package/types/components/Insurance/StepFourPayment.d.ts +7 -3
- package/types/components/MotorInsurance/Bike/BikeStepThreePayment.d.ts +3 -2
- package/types/components/MotorInsurance/Car/CarStepFourPayment.d.ts +3 -2
- package/types/components/MotorInsurance/motor-insurance.types.d.ts +5 -3
- package/types/components/OrderPaymentTypeBadge.d.ts +4 -0
- package/types/constants/env.d.ts +2 -0
- package/types/hooks/useInsuranceTransaction.d.ts +2 -1
- package/types/hooks/useMotorInsuranceTransaction.d.ts +9 -1
- package/types/types/enum.d.ts +4 -0
- package/types/types/insurance-transaction.dto.d.ts +5 -0
- package/types/types/response.dto.d.ts +2 -1
- package/types/util/order-payment-display.d.ts +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TravelPlanFormValues, CoveragePlanPremium, BuyerFormValues, InsuredPerson } from './types';
|
|
2
2
|
import { ETravelScope } from '../../types/insurance';
|
|
3
|
-
import { EPaymentMethod } from '../../types/enum';
|
|
3
|
+
import { EOrderPaymentType, EPaymentMethod } from '../../types/enum';
|
|
4
4
|
export interface StepFourPaymentProps {
|
|
5
5
|
travelScope: ETravelScope;
|
|
6
6
|
travelPlan: TravelPlanFormValues;
|
|
@@ -8,7 +8,10 @@ export interface StepFourPaymentProps {
|
|
|
8
8
|
buyerInfo: BuyerFormValues | null;
|
|
9
9
|
insuredPeople: InsuredPerson[];
|
|
10
10
|
onBack?: () => void;
|
|
11
|
-
onPayment?: (
|
|
11
|
+
onPayment?: (args: {
|
|
12
|
+
paymentMode?: EPaymentMethod;
|
|
13
|
+
paymentType: EOrderPaymentType;
|
|
14
|
+
}) => void;
|
|
12
15
|
isProcessing?: boolean;
|
|
13
16
|
onPremiumUpdate?: (premium: CoveragePlanPremium['premium'] | null) => void;
|
|
14
17
|
onCouponChange?: (coupon: {
|
|
@@ -17,5 +20,6 @@ export interface StepFourPaymentProps {
|
|
|
17
20
|
finalAmount: number;
|
|
18
21
|
description?: string | null;
|
|
19
22
|
} | null) => void;
|
|
23
|
+
paymentType?: EOrderPaymentType;
|
|
20
24
|
}
|
|
21
|
-
export declare const StepFourPayment: ({ travelScope, travelPlan, selectedPlan, buyerInfo, insuredPeople, onBack, onPayment, isProcessing, onPremiumUpdate, onCouponChange, }: StepFourPaymentProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const StepFourPayment: ({ travelScope, travelPlan, selectedPlan, buyerInfo, insuredPeople, onBack, onPayment, isProcessing, onPremiumUpdate, onCouponChange, paymentType: paymentTypeProp, }: StepFourPaymentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EPaymentMethod } from '../../../types/enum';
|
|
1
|
+
import { EOrderPaymentType, EPaymentMethod } from '../../../types/enum';
|
|
2
2
|
import { MotorPlanFormValues, MotorPremiumSummary, VehicleInfoFormValues } from '../motor-insurance.types';
|
|
3
3
|
export interface BikeStepThreePaymentProps {
|
|
4
4
|
planValues: MotorPlanFormValues;
|
|
@@ -15,5 +15,6 @@ export interface BikeStepThreePaymentProps {
|
|
|
15
15
|
isProcessing: boolean;
|
|
16
16
|
isGuest: boolean;
|
|
17
17
|
onBack: () => void;
|
|
18
|
+
paymentType?: EOrderPaymentType;
|
|
18
19
|
}
|
|
19
|
-
export declare const BikeStepThreePayment: ({ planValues, premiumSummary, vehicleInfo, isLoading, paymentMode, onPaymentModeChange, isTermsAgreed, onTermsAgreedChange, isPersonalDataConsentAgreed, onPersonalDataConsentChange, onPayment, isProcessing, isGuest, onBack, }: BikeStepThreePaymentProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const BikeStepThreePayment: ({ planValues, premiumSummary, vehicleInfo, isLoading, paymentMode, onPaymentModeChange, isTermsAgreed, onTermsAgreedChange, isPersonalDataConsentAgreed, onPersonalDataConsentChange, onPayment, isProcessing, isGuest, onBack, paymentType, }: BikeStepThreePaymentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EPaymentMethod } from '../../../types/enum';
|
|
1
|
+
import { EOrderPaymentType, EPaymentMethod } from '../../../types/enum';
|
|
2
2
|
import { CarPlanFormValues, CarPremiumSummary, CarVehicleInfoFormValues } from '../motor-insurance.types';
|
|
3
3
|
interface CarStepFourPaymentProps {
|
|
4
4
|
planValues: CarPlanFormValues;
|
|
@@ -18,6 +18,7 @@ interface CarStepFourPaymentProps {
|
|
|
18
18
|
onBack: () => void;
|
|
19
19
|
getProviderLogoUrl: (providerCode?: string | null) => string | undefined;
|
|
20
20
|
getTermsAgreeHtml: (providerCode?: string | null) => string | undefined;
|
|
21
|
+
paymentType?: EOrderPaymentType;
|
|
21
22
|
}
|
|
22
|
-
export declare const CarStepFourPayment: ({ planValues, premiumSummary, vehicleInfo, buyerCertificateInfo, isLoading, paymentMode, onPaymentModeChange, isTermsAgreed, onTermsAgreedChange, isPersonalDataConsentAgreed, onPersonalDataConsentChange, onPayment, isProcessing, isGuest, onBack, getProviderLogoUrl, getTermsAgreeHtml, }: CarStepFourPaymentProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const CarStepFourPayment: ({ planValues, premiumSummary, vehicleInfo, buyerCertificateInfo, isLoading, paymentMode, onPaymentModeChange, isTermsAgreed, onTermsAgreedChange, isPersonalDataConsentAgreed, onPersonalDataConsentChange, onPayment, isProcessing, isGuest, onBack, getProviderLogoUrl, getTermsAgreeHtml, paymentType, }: CarStepFourPaymentProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
24
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Control, UseFormSetValue } from 'react-hook-form';
|
|
2
|
-
import { EPaymentMethod } from '../../types/enum';
|
|
2
|
+
import { EPaymentMethod, EOrderPaymentType } from '../../types/enum';
|
|
3
3
|
import { EInsuranceProviderType } from '../../types/insurance';
|
|
4
4
|
export declare enum EMotorVehicleType {
|
|
5
5
|
BIKE = "bike",
|
|
@@ -104,7 +104,8 @@ export interface BikePolicyRequestDto {
|
|
|
104
104
|
occupantAccidentPremium?: number;
|
|
105
105
|
totalPremium?: number;
|
|
106
106
|
tax?: number;
|
|
107
|
-
|
|
107
|
+
paymentType: EOrderPaymentType;
|
|
108
|
+
paymentMode?: EPaymentMethod;
|
|
108
109
|
vehicleRegImageUrl?: string;
|
|
109
110
|
idCardImageUrl?: string;
|
|
110
111
|
}
|
|
@@ -285,7 +286,8 @@ export interface CarPolicyRequestDto {
|
|
|
285
286
|
model?: string;
|
|
286
287
|
hideLicensePlate?: boolean;
|
|
287
288
|
hidePremium?: boolean;
|
|
288
|
-
|
|
289
|
+
paymentType: EOrderPaymentType;
|
|
290
|
+
paymentMode?: EPaymentMethod;
|
|
289
291
|
vehicleRegImageUrl?: string;
|
|
290
292
|
idCardImageUrl?: string;
|
|
291
293
|
}
|
package/types/constants/env.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
3
|
import { ETravelScope } from '../types/insurance';
|
|
4
4
|
export interface GetInsuranceTransactionListReqDto {
|
|
5
5
|
page?: number;
|
|
@@ -54,6 +54,7 @@ export interface CreateTransactionPayload {
|
|
|
54
54
|
}>;
|
|
55
55
|
providerSpecific?: Record<string, any>;
|
|
56
56
|
buyerInfo?: Record<string, any>;
|
|
57
|
+
paymentType?: EOrderPaymentType;
|
|
57
58
|
paymentMode?: EPaymentMethod;
|
|
58
59
|
premium?: {
|
|
59
60
|
totalPremium: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransactionStatus } from '../types/enum';
|
|
1
|
+
import { EOrderPaymentType, TransactionStatus } from '../types/enum';
|
|
2
2
|
import { EMotorProvider } from '../components/MotorInsurance/motor-insurance.types';
|
|
3
3
|
export interface MotorInsuranceTransactionDetail {
|
|
4
4
|
id: number;
|
|
@@ -22,6 +22,10 @@ export interface MotorInsuranceTransactionDetail {
|
|
|
22
22
|
status: string;
|
|
23
23
|
publicId: string;
|
|
24
24
|
};
|
|
25
|
+
paymentTypeApplied?: EOrderPaymentType;
|
|
26
|
+
paidAmount?: number;
|
|
27
|
+
unpaidAmount?: number;
|
|
28
|
+
isBypassed?: boolean;
|
|
25
29
|
}
|
|
26
30
|
export interface MotorInsuranceTransactionListItem {
|
|
27
31
|
id: number;
|
|
@@ -43,6 +47,10 @@ export interface MotorInsuranceTransactionListItem {
|
|
|
43
47
|
status: string;
|
|
44
48
|
publicId: string;
|
|
45
49
|
};
|
|
50
|
+
paymentTypeApplied?: EOrderPaymentType;
|
|
51
|
+
paidAmount?: number;
|
|
52
|
+
unpaidAmount?: number;
|
|
53
|
+
isBypassed?: boolean;
|
|
46
54
|
}
|
|
47
55
|
export interface GetMotorInsuranceTransactionListReqDto {
|
|
48
56
|
page?: number;
|
package/types/types/enum.d.ts
CHANGED
|
@@ -95,6 +95,10 @@ export declare enum EPaymentMethod {
|
|
|
95
95
|
TOPUP_BALANCE = "topup_balance",
|
|
96
96
|
BANK_TRANSFER = "bank_transfer"
|
|
97
97
|
}
|
|
98
|
+
export declare enum EOrderPaymentType {
|
|
99
|
+
UP_FRONT = "up_front",
|
|
100
|
+
DEFERRED = "deferred"
|
|
101
|
+
}
|
|
98
102
|
export declare enum EInsuranceTransactionStatus {
|
|
99
103
|
PENDING = "pending",
|
|
100
104
|
PAID = "paid",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EGender, EIdType, EInsuranceType, EPersonType, EPolicyStatus, EPolicyType, EQuoteStatus, ERelationToPrimary, ETravelScope, ETravelType } from './insurance';
|
|
2
|
+
import { EOrderPaymentType } from './enum';
|
|
2
3
|
import { ITransaction } from './response.dto';
|
|
3
4
|
export interface InsuranceQuoteInsured {
|
|
4
5
|
id: number;
|
|
@@ -101,6 +102,10 @@ export interface InsuranceTransaction {
|
|
|
101
102
|
documents?: InsurancePolicyDocument[];
|
|
102
103
|
userId?: number;
|
|
103
104
|
tenantId?: number;
|
|
105
|
+
paymentTypeApplied?: EOrderPaymentType;
|
|
106
|
+
paidAmount?: number;
|
|
107
|
+
unpaidAmount?: number;
|
|
108
|
+
isBypassed?: boolean;
|
|
104
109
|
createdAt: string;
|
|
105
110
|
updatedAt: string;
|
|
106
111
|
quote?: InsuranceQuote;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ECommissionPolicyType, ESimDomesticServices, EsimTransactionStatus, ETenantType, EUseCaseses, TransactionStatus } from './enum';
|
|
1
|
+
import { ECommissionPolicyType, EOrderPaymentType, ESimDomesticServices, EsimTransactionStatus, ETenantType, EUseCaseses, TransactionStatus } from './enum';
|
|
2
2
|
import { EPolicyActionType } from '../constants/policy-enums';
|
|
3
3
|
import { EPermissionKey, EUserRole, EUserStatus } from './user';
|
|
4
4
|
export type LoginRespDto = {
|
|
@@ -257,6 +257,7 @@ export interface ITravelAgencyTenantSettings {
|
|
|
257
257
|
motorInsurance: {
|
|
258
258
|
providers: string[];
|
|
259
259
|
};
|
|
260
|
+
paymentType?: EOrderPaymentType;
|
|
260
261
|
}
|
|
261
262
|
export interface IBankTenantSettings {
|
|
262
263
|
availableCurrencies: string[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { EOrderPaymentType } from '../types/enum';
|
|
2
|
+
export declare function getOrderPaymentStatusShortLabel(params: {
|
|
3
|
+
paymentTypeApplied?: EOrderPaymentType;
|
|
4
|
+
paidAmount?: number;
|
|
5
|
+
unpaidAmount?: number;
|
|
6
|
+
isBypassed?: boolean;
|
|
7
|
+
}): string;
|
|
8
|
+
export declare function getOrderPaymentStatusDetailLabel(params: {
|
|
9
|
+
paymentTypeApplied?: EOrderPaymentType;
|
|
10
|
+
paidAmount?: number;
|
|
11
|
+
unpaidAmount?: number;
|
|
12
|
+
isBypassed?: boolean;
|
|
13
|
+
}): string;
|