gotrip-fx-transaction-form 1.0.225-dev → 1.0.227-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.225-dev",
3
+ "version": "1.0.227-dev",
4
4
  "description": "FX Transaction Form ES6 module",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -1,9 +1,11 @@
1
+ import { ETravelScope } from '../../types/insurance';
1
2
  export interface CreateInsuranceTransactionFormProps {
2
3
  storageKey: string;
3
4
  title?: string;
5
+ travelScope: ETravelScope;
4
6
  onBack?: () => void;
5
7
  onSuccess?: (transactionData: any) => void;
6
8
  scrollable?: boolean;
7
9
  recommendBoxHeight?: string;
8
10
  }
9
- export declare const CreateInsuranceTransactionForm: ({ storageKey, title, onBack, onSuccess, scrollable, recommendBoxHeight, }: CreateInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const CreateInsuranceTransactionForm: ({ storageKey, title, travelScope, onBack, onSuccess, scrollable, recommendBoxHeight, }: CreateInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
@@ -10,6 +10,7 @@ export type InsuranceSummaryOverviewProps = {
10
10
  trip: {
11
11
  policyTypeLabel: string;
12
12
  travelTypeLabel: string;
13
+ destinationOrRouteLabel?: string;
13
14
  destinationLabel: string;
14
15
  insuranceTypeLabel: string;
15
16
  tripStart?: Date | string | null;
@@ -1,6 +1,8 @@
1
1
  import { TravelPlanFormValues, CoveragePlanPremium, BuyerFormValues, InsuredPerson } from './types';
2
+ import { ETravelScope } from '../../types/insurance';
2
3
  import { EPaymentMethod } from '../../types/enum';
3
- interface StepFourPaymentProps {
4
+ export interface StepFourPaymentProps {
5
+ travelScope: ETravelScope;
4
6
  travelPlan: TravelPlanFormValues;
5
7
  selectedPlan: CoveragePlanPremium | null;
6
8
  buyerInfo: BuyerFormValues | null;
@@ -10,5 +12,4 @@ interface StepFourPaymentProps {
10
12
  isProcessing?: boolean;
11
13
  onPremiumUpdate?: (premium: CoveragePlanPremium['premium'] | null) => void;
12
14
  }
13
- export declare const StepFourPayment: ({ travelPlan, selectedPlan, buyerInfo, insuredPeople, onBack, onPayment, isProcessing, onPremiumUpdate, }: StepFourPaymentProps) => import("react/jsx-runtime").JSX.Element;
14
- export {};
15
+ export declare const StepFourPayment: ({ travelScope, travelPlan, selectedPlan, buyerInfo, insuredPeople, onBack, onPayment, isProcessing, onPremiumUpdate, }: StepFourPaymentProps) => import("react/jsx-runtime").JSX.Element;
@@ -5,6 +5,7 @@ interface StepOneFormProps {
5
5
  tripStart: Date | null;
6
6
  tripEnd: Date | null;
7
7
  setValue: (name: keyof TravelPlanFormValues, value: any) => void;
8
+ isDomestic?: boolean;
8
9
  onQuickPlanSelect?: (plan: CoveragePlanPremium, countryId: number, values: InsuranceTypeAndPeopleCountValues) => void;
9
10
  recommendBoxHeight?: string;
10
11
  onBack?: () => void;
@@ -13,5 +14,5 @@ interface StepOneFormProps {
13
14
  isStepOneReady?: boolean;
14
15
  isGuest?: boolean;
15
16
  }
16
- export declare const StepOneForm: ({ control, tripStart, tripEnd, setValue, onQuickPlanSelect, recommendBoxHeight, onBack, onNext, isSubmitting, isStepOneReady, isGuest, }: StepOneFormProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const StepOneForm: ({ control, tripStart, tripEnd, setValue, isDomestic, onQuickPlanSelect, recommendBoxHeight, onBack, onNext, isSubmitting, isStepOneReady, isGuest, }: StepOneFormProps) => import("react/jsx-runtime").JSX.Element;
17
18
  export {};
@@ -14,6 +14,7 @@ interface StepThreeProps {
14
14
  adultsCount: number | null;
15
15
  teenagersCount: number | null;
16
16
  childrenCount: number | null;
17
+ isDomestic: boolean;
17
18
  onBuyerInfoSubmit: (data: BuyerFormValues) => void;
18
19
  onInsuredPeopleSubmit: (people: InsuredPerson[]) => void;
19
20
  onStepThreeBack: () => void;
@@ -21,5 +22,5 @@ interface StepThreeProps {
21
22
  buyerInfoFormRef: React.RefObject<HTMLFormElement | null>;
22
23
  insuredPeopleFormRef: React.RefObject<HTMLFormElement | null>;
23
24
  }
24
- export declare const StepThree: ({ control, tripStart, tripEnd, stepThreeChildStep, onStepThreeChildStepClick, selectedPlan, buyerInfo, insuredPeople, insuranceType, adultsCount, teenagersCount, childrenCount, onBuyerInfoSubmit, onInsuredPeopleSubmit, onStepThreeBack, onDatesChange, buyerInfoFormRef, insuredPeopleFormRef, }: StepThreeProps) => import("react/jsx-runtime").JSX.Element;
25
+ export declare const StepThree: ({ control, tripStart, tripEnd, stepThreeChildStep, onStepThreeChildStepClick, selectedPlan, buyerInfo, insuredPeople, insuranceType, adultsCount, teenagersCount, childrenCount, isDomestic, onBuyerInfoSubmit, onInsuredPeopleSubmit, onStepThreeBack, onDatesChange, buyerInfoFormRef, insuredPeopleFormRef, }: StepThreeProps) => import("react/jsx-runtime").JSX.Element;
25
26
  export {};
@@ -4,6 +4,7 @@ interface StepThreeBuyerInfoProps {
4
4
  onSubmit: (values: BuyerFormValues) => void;
5
5
  onBack: () => void;
6
6
  onFormRef?: (form: HTMLFormElement | null) => void;
7
+ isDomestic?: boolean;
7
8
  }
8
- export declare const StepThreeBuyerInfo: ({ initialValues, onSubmit, onBack: _onBack, onFormRef, }: StepThreeBuyerInfoProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const StepThreeBuyerInfo: ({ initialValues, onSubmit, onBack: _onBack, onFormRef, isDomestic, }: StepThreeBuyerInfoProps) => import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -6,6 +6,7 @@ interface StepThreeInsuredPeopleProps {
6
6
  adultsCount: number;
7
7
  teenagersCount: number;
8
8
  childrenCount: number;
9
+ isDomestic: boolean;
9
10
  providerCode?: string | null;
10
11
  buyerInfo?: {
11
12
  isInsuredPerson?: boolean;
@@ -14,5 +15,5 @@ interface StepThreeInsuredPeopleProps {
14
15
  onBack: () => void;
15
16
  onFormRef?: (form: HTMLFormElement | null) => void;
16
17
  }
17
- export declare const StepThreeInsuredPeople: ({ initialPeople, providerCode, buyerInfo, onSubmit, onFormRef, }: StepThreeInsuredPeopleProps) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const StepThreeInsuredPeople: ({ initialPeople, isDomestic, providerCode, buyerInfo, onSubmit, onFormRef, }: StepThreeInsuredPeopleProps) => import("react/jsx-runtime").JSX.Element;
18
19
  export {};
@@ -1,4 +1,4 @@
1
- import { EDestination, EGender, EIdType, EInsuranceType, EPolicyType, ERelationToPrimary, ETravelType, EPersonType, EPersonValidationStatus } from '../../types/insurance';
1
+ import { EDestination, EGender, EIdType, EInsuranceType, EPolicyType, ERelationToPrimary, ETravelType, EPersonType, EPersonValidationStatus, ETravelScope } from '../../types/insurance';
2
2
  export type InsuranceFormValues = {
3
3
  provider: string;
4
4
  type: EInsuranceType;
@@ -79,16 +79,22 @@ export type CoveragePlanQuote = {
79
79
  };
80
80
  export type TravelPlanFormValues = {
81
81
  destinationCountryId: number | null;
82
+ provinceFromId: number | null;
83
+ provinceToId: number | null;
82
84
  startDate: Date | null;
83
85
  endDate: Date | null;
84
86
  insuranceType: EInsuranceType;
85
87
  adultsCount: number;
86
88
  teenagerCount: number;
87
89
  childrenCount: number;
90
+ travelScope?: ETravelScope;
88
91
  };
89
92
  export type InsuranceTypeAndPeopleCountValues = Pick<TravelPlanFormValues, 'insuranceType' | 'adultsCount' | 'teenagerCount' | 'childrenCount'>;
90
93
  export type CalculatePremiumRequest = {
91
- destinationCountryId: number;
94
+ travelScope: ETravelScope;
95
+ destinationCountryId?: number;
96
+ provinceFromId?: number;
97
+ provinceToId?: number;
92
98
  startDate: string;
93
99
  endDate: string;
94
100
  insuranceType?: EInsuranceType;
@@ -1,11 +1,12 @@
1
1
  import { CoveragePlanPremium, CalculatePremiumRequest, InsuredPerson, TravelPlanFormValues } from '../components/Insurance/types';
2
+ import { ETravelScope } from '../types/insurance';
2
3
  import { QuickCoveragePlan } from '../components/Insurance/InsurancePlans/QuickCoveragePlanCard';
3
4
  interface UseInsurancePlansReturn {
4
5
  plans: CoveragePlanPremium[];
5
6
  loading: boolean;
6
7
  error: string | null;
7
8
  refetch: () => Promise<void>;
8
- recalculatePremiumForPlan: (travelPlan: TravelPlanFormValues, insuredPeople: InsuredPerson[], planId: number, provider: string) => Promise<CoveragePlanPremium | null>;
9
+ recalculatePremiumForPlan: (travelPlan: TravelPlanFormValues, insuredPeople: InsuredPerson[], planId: number, provider: string, travelScope: ETravelScope) => Promise<CoveragePlanPremium | null>;
9
10
  quickRecommendations: QuickCoveragePlan[];
10
11
  loadingQuickRecommendations: boolean;
11
12
  errorQuickRecommendations: string | null;
@@ -1,5 +1,6 @@
1
1
  import { InsuranceTransaction } from '../types/insurance-transaction.dto';
2
2
  import { EPaymentMethod, TransactionStatus } from '../types/enum';
3
+ import { ETravelScope } from '../types/insurance';
3
4
  export interface GetInsuranceTransactionListReqDto {
4
5
  page?: number;
5
6
  limit?: number;
@@ -12,6 +13,7 @@ export interface GetInsuranceTransactionListReqDto {
12
13
  status?: TransactionStatus;
13
14
  publicId?: string;
14
15
  primaryInsuredFullName?: string;
16
+ travelScope?: ETravelScope;
15
17
  }
16
18
  export interface GetInsuranceTransactionListRespDto {
17
19
  transactions: InsuranceTransaction[];
@@ -27,7 +29,10 @@ export interface CreateTransactionPayload {
27
29
  coverageStartDate: string;
28
30
  coverageEndDate: string;
29
31
  travelType: string;
30
- destinationCountryId: number;
32
+ travelScope: ETravelScope;
33
+ destinationCountryId?: number;
34
+ provinceFromId?: number;
35
+ provinceToId?: number;
31
36
  insureds: Array<{
32
37
  relationToPrimary: string;
33
38
  isPrimary: boolean;
@@ -1 +1,3 @@
1
+ export declare const CreateInternationalInsuranceTransactionPage: () => import("react/jsx-runtime").JSX.Element;
2
+ export declare const CreateDomesticInsuranceTransactionPage: () => import("react/jsx-runtime").JSX.Element;
1
3
  export declare const CreateInsuranceTransactionPage: () => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { EGender, EIdType, EInsuranceType, EPersonType, EPolicyStatus, EPolicyType, EQuoteStatus, ERelationToPrimary, ETravelType } from './insurance';
1
+ import { EGender, EIdType, EInsuranceType, EPersonType, EPolicyStatus, EPolicyType, EQuoteStatus, ERelationToPrimary, ETravelScope, ETravelType } from './insurance';
2
2
  import { ITransaction } from './response.dto';
3
3
  export interface InsuranceQuoteInsured {
4
4
  id: number;
@@ -84,6 +84,7 @@ export interface InsuranceTransaction {
84
84
  type: EInsuranceType;
85
85
  policyType: EPolicyType;
86
86
  travelType: ETravelType;
87
+ travelScope: ETravelScope;
87
88
  status: EPolicyStatus;
88
89
  totalAmount: number;
89
90
  providerPolicyId?: string;
@@ -2,6 +2,10 @@ export declare enum ETravelType {
2
2
  SINGLE = "single",
3
3
  ANNUAL = "annual"
4
4
  }
5
+ export declare enum ETravelScope {
6
+ INTERNATIONAL = "international",
7
+ DOMESTIC = "domestic"
8
+ }
5
9
  export declare enum ERelationToPrimary {
6
10
  SELF = "self",
7
11
  SPOUSE = "spouse",