gotrip-fx-transaction-form 1.0.238-dev → 1.0.240-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.238-dev",
3
+ "version": "1.0.240-dev",
4
4
  "description": "FX Transaction Form ES6 module",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -2,6 +2,8 @@ import { MotorPremiumSummary as MotorPremiumSummaryType } from '../motor-insuran
2
2
  interface BikePremiumSummaryProps {
3
3
  summary?: MotorPremiumSummaryType | null;
4
4
  isLoading?: boolean;
5
+ /** Provider code (e.g. PVI, MIC) – used to fetch CMS benefits */
6
+ providerCode?: string | null;
5
7
  }
6
- export declare const BikePremiumSummary: ({ summary, isLoading }: BikePremiumSummaryProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const BikePremiumSummary: ({ summary, isLoading, providerCode, }: BikePremiumSummaryProps) => import("react/jsx-runtime").JSX.Element;
7
9
  export {};
@@ -3,9 +3,10 @@ interface BikeStepTwoVehicleInfoProps {
3
3
  initialValues?: Partial<VehicleInfoFormValues>;
4
4
  premiumSummary?: MotorPremiumSummaryType | null;
5
5
  isLoadingQuote?: boolean;
6
+ provider?: string;
6
7
  onSubmit: (values: VehicleInfoFormValues) => void;
7
8
  onBack: () => void;
8
9
  formRef?: (form: HTMLFormElement | null) => void;
9
10
  }
10
- export declare const BikeStepTwoVehicleInfo: ({ initialValues, premiumSummary, isLoadingQuote, onSubmit, formRef, }: BikeStepTwoVehicleInfoProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const BikeStepTwoVehicleInfo: ({ initialValues, premiumSummary, isLoadingQuote, provider, onSubmit, formRef, }: BikeStepTwoVehicleInfoProps) => import("react/jsx-runtime").JSX.Element;
11
12
  export {};
@@ -2,6 +2,7 @@ import { MotorPremiumSummary as MotorPremiumSummaryType } from '../motor-insuran
2
2
  interface CarPremiumSummaryProps {
3
3
  summary: MotorPremiumSummaryType | null | undefined;
4
4
  isLoading?: boolean;
5
+ providerCode?: string | null;
5
6
  }
6
- export declare const CarPremiumSummary: ({ summary, isLoading }: CarPremiumSummaryProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const CarPremiumSummary: ({ summary, isLoading, providerCode }: CarPremiumSummaryProps) => import("react/jsx-runtime").JSX.Element;
7
8
  export {};
@@ -3,8 +3,9 @@ interface CarStepThreeInfoProps {
3
3
  initialValues?: Partial<CarVehicleInfoFormValues>;
4
4
  premiumSummary: MotorPremiumSummaryType | null;
5
5
  isLoadingQuote?: boolean;
6
+ provider?: string;
6
7
  onSubmit: (values: CarVehicleInfoFormValues) => void;
7
8
  formRef?: (form: HTMLFormElement | null) => void;
8
9
  }
9
- export declare const CarStepThreeInfo: ({ initialValues, premiumSummary, isLoadingQuote, onSubmit, formRef, }: CarStepThreeInfoProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const CarStepThreeInfo: ({ initialValues, premiumSummary, isLoadingQuote, provider, onSubmit, formRef, }: CarStepThreeInfoProps) => import("react/jsx-runtime").JSX.Element;
10
11
  export {};
@@ -77,6 +77,7 @@ export interface BikeQuoteResponseDto {
77
77
  success: boolean;
78
78
  totalPremium?: number;
79
79
  mandatoryPremium?: number;
80
+ tax?: number;
80
81
  occupantAccidentPremium?: number;
81
82
  error?: string;
82
83
  }
@@ -101,6 +102,7 @@ export interface BikePolicyRequestDto {
101
102
  insuredOccupantCount?: number;
102
103
  occupantAccidentPremium?: number;
103
104
  totalPremium?: number;
105
+ tax?: number;
104
106
  paymentMode: EPaymentMethod;
105
107
  }
106
108
  /**
@@ -196,8 +198,7 @@ export type CarPlanFormValues = {
196
198
  };
197
199
  export type MotorPremiumSummary = {
198
200
  mandatoryPremium: number;
199
- tndsPersonCompensation: number;
200
- tndsPropertyCompensation: number;
201
+ tax: number;
201
202
  passengerAccidentPremium: number;
202
203
  passengerAccidentLevel: number;
203
204
  passengerAccidentPeopleCount: number;
@@ -232,6 +233,7 @@ export interface CarQuoteResponseDto {
232
233
  success: boolean;
233
234
  totalPremium?: number;
234
235
  mandatoryPremium?: number;
236
+ tax?: number;
235
237
  occupantAccidentPremium?: number;
236
238
  vehicleTypeCode?: string;
237
239
  error?: string;
@@ -270,6 +272,7 @@ export interface CarPolicyRequestDto {
270
272
  chassisNumber: string;
271
273
  engineNumber: string;
272
274
  mandatoryPremium: number;
275
+ tax?: number;
273
276
  occupantAccidentSumInsured?: number;
274
277
  insuredOccupantCount?: number;
275
278
  occupantAccidentPremium?: number;
@@ -0,0 +1,21 @@
1
+ /** Alphanumeric pattern for chassis number */
2
+ export declare const CHASSIS_ALPHANUMERIC_REGEX: RegExp;
3
+ /** Engine number: uppercase letters, digits, hyphen. Len 5-20. */
4
+ export declare const ENGINE_NUMBER_REGEX: RegExp;
5
+ export declare const ENGINE_NUMBER_MIN_LEN = 5;
6
+ export declare const ENGINE_NUMBER_MAX_LEN = 20;
7
+ export declare const CAR_CHASSIS_LEN = 17;
8
+ export declare const BIKE_CHASSIS_MIN_LEN = 12;
9
+ export declare const BIKE_CHASSIS_MAX_LEN = 17;
10
+ /**
11
+ * Validate car chassis number: exactly 17 chars, alphanumeric.
12
+ */
13
+ export declare function validateCarChassisNumber(value: unknown): true | string;
14
+ /**
15
+ * Validate bike chassis number: 12-17 chars, alphanumeric.
16
+ */
17
+ export declare function validateBikeChassisNumber(value: unknown): true | string;
18
+ /**
19
+ * Validate engine number (car and bike): 5-20 chars, [A-Z0-9-].
20
+ */
21
+ export declare function validateEngineNumber(value: unknown): true | string;
@@ -1,4 +1,4 @@
1
- import { BikePolicyRequestDto, BikePolicyResponseDto, BikeQuoteRequestDto, BikeQuoteResponseDto, CarPolicyRequestDto, CarPolicyResponseDto, CarQuoteRequestDto, CarQuoteResponseDto } from '../components/MotorInsurance/motor-insurance.types';
1
+ import { BikePolicyRequestDto, BikePolicyResponseDto, BikeQuoteRequestDto, BikeQuoteResponseDto, CarPolicyRequestDto, CarPolicyResponseDto, CarQuoteRequestDto, CarQuoteResponseDto, EMotorVehicleType } from '../components/MotorInsurance/motor-insurance.types';
2
2
  export declare const useMotorInsurance: () => {
3
3
  createQuoteBike: (provider: string, body: BikeQuoteRequestDto) => Promise<BikeQuoteResponseDto | null>;
4
4
  createPolicyBike: (provider: string, body: BikePolicyRequestDto) => Promise<BikePolicyResponseDto | null>;
@@ -13,4 +13,5 @@ export declare const useMotorInsurance: () => {
13
13
  refetchMotorInsuranceSettings: () => Promise<void>;
14
14
  getMotorProviderLogoUrl: (providerCode?: string | null) => string | undefined;
15
15
  getMotorProviderTermsAgreeHtml: (providerCode?: string | null) => string | undefined;
16
+ getMotorProviderMandatoryPremiumBenefitsHtml: (vehicleType: EMotorVehicleType, providerCode?: string | null) => string | undefined;
16
17
  };
@@ -4,6 +4,7 @@ export interface MotorInsuranceTransactionDetail {
4
4
  transactionPublicId: string;
5
5
  status: string;
6
6
  totalAmount: number;
7
+ tax?: number;
7
8
  providerPolicyId?: string | number;
8
9
  providerPolicyNumber?: string;
9
10
  errorMessage?: string;
@@ -27,6 +28,7 @@ export interface MotorInsuranceTransactionListItem {
27
28
  transactionPublicId: string;
28
29
  status: TransactionStatus;
29
30
  totalAmount: number;
31
+ tax?: number;
30
32
  providerPolicyId?: string | number;
31
33
  providerPolicyNumber?: string;
32
34
  error?: string;