gotrip-fx-transaction-form 1.0.240-dev → 1.0.241-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.240-dev",
3
+ "version": "1.0.241-dev",
4
4
  "description": "FX Transaction Form ES6 module",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -1,5 +1,6 @@
1
1
  import { Control, UseFormSetValue } from 'react-hook-form';
2
2
  import { EPaymentMethod } from '../../types/enum';
3
+ import { EInsuranceProviderType } from '../../types/insurance';
3
4
  export declare enum EMotorVehicleType {
4
5
  BIKE = "bike",
5
6
  CAR = "car"
@@ -47,7 +48,7 @@ export declare enum EVehicleTypeCode {
47
48
  BUS = "BUS",
48
49
  CARGO_STANDARD = "CARGO_STANDARD"
49
50
  }
50
- export type EMotorProvider = 'PVI' | 'DBV' | 'BAO_MINH';
51
+ export type EMotorProvider = EInsuranceProviderType.PVI | EInsuranceProviderType.MIC;
51
52
  export type MotorPlanFormValues = {
52
53
  vehicleType: EBikeVehicleType;
53
54
  durationYears: 1 | 2 | 3;
@@ -1,12 +1,12 @@
1
- import { BikePolicyRequestDto, BikePolicyResponseDto, BikeQuoteRequestDto, BikeQuoteResponseDto, CarPolicyRequestDto, CarPolicyResponseDto, CarQuoteRequestDto, CarQuoteResponseDto, EMotorVehicleType } from '../components/MotorInsurance/motor-insurance.types';
1
+ import { BikePolicyRequestDto, BikePolicyResponseDto, BikeQuoteRequestDto, BikeQuoteResponseDto, CarPolicyRequestDto, CarPolicyResponseDto, CarQuoteRequestDto, CarQuoteResponseDto, EMotorProvider, EMotorVehicleType } from '../components/MotorInsurance/motor-insurance.types';
2
2
  export declare const useMotorInsurance: () => {
3
- createQuoteBike: (provider: string, body: BikeQuoteRequestDto) => Promise<BikeQuoteResponseDto | null>;
4
- createPolicyBike: (provider: string, body: BikePolicyRequestDto) => Promise<BikePolicyResponseDto | null>;
5
- createQuoteCar: (provider: string, body: CarQuoteRequestDto) => Promise<CarQuoteResponseDto | null>;
6
- createPolicyCar: (provider: string, body: CarPolicyRequestDto) => Promise<CarPolicyResponseDto | null>;
3
+ createQuoteBike: (provider: EMotorProvider, body: BikeQuoteRequestDto) => Promise<BikeQuoteResponseDto | null>;
4
+ createPolicyBike: (provider: EMotorProvider, body: BikePolicyRequestDto) => Promise<BikePolicyResponseDto | null>;
5
+ createQuoteCar: (provider: EMotorProvider, body: CarQuoteRequestDto) => Promise<CarQuoteResponseDto | null>;
6
+ createPolicyCar: (provider: EMotorProvider, body: CarPolicyRequestDto) => Promise<CarPolicyResponseDto | null>;
7
7
  isCreatingQuote: boolean;
8
8
  isCreatingPolicy: boolean;
9
- providers: string[];
9
+ providers: EMotorProvider[];
10
10
  loadingProviders: boolean;
11
11
  motorInsuranceSettings: Record<string, any>;
12
12
  loadingMotorInsuranceSettings: boolean;
@@ -1,4 +1,5 @@
1
1
  import { TransactionStatus } from '../types/enum';
2
+ import { EMotorProvider } from '../components/MotorInsurance/motor-insurance.types';
2
3
  export interface MotorInsuranceTransactionDetail {
3
4
  id: number;
4
5
  transactionPublicId: string;
@@ -13,7 +14,7 @@ export interface MotorInsuranceTransactionDetail {
13
14
  licensePlate?: string;
14
15
  startDate?: string;
15
16
  endDate?: string;
16
- provider: string;
17
+ provider: EMotorProvider;
17
18
  chassisNumber?: string;
18
19
  engineNumber?: string;
19
20
  metadata?: Record<string, unknown>;
@@ -37,7 +38,7 @@ export interface MotorInsuranceTransactionListItem {
37
38
  tenantName?: string;
38
39
  ownerName?: string;
39
40
  licensePlate?: string;
40
- provider: string;
41
+ provider: EMotorProvider;
41
42
  transaction?: {
42
43
  status: string;
43
44
  publicId: string;
@@ -29,7 +29,8 @@ export declare enum EIdType {
29
29
  export declare enum EInsuranceProviderType {
30
30
  TMIV = "TMIV",
31
31
  MSIG = "MSIG",
32
- PVI = "PVI"
32
+ PVI = "PVI",
33
+ MIC = "MIC"
33
34
  }
34
35
  export declare enum EInsuranceType {
35
36
  INDIVIDUAL = "individual",