gotrip-fx-transaction-form 1.0.150 → 1.0.186-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.
Files changed (52) hide show
  1. package/assets/index.css +1 -1
  2. package/index.js +41454 -31295
  3. package/package.json +1 -1
  4. package/types/components/Apps/EmbededIndividualApp.d.ts +3 -1
  5. package/types/components/Insurance/CountryWithFlag.d.ts +23 -0
  6. package/types/components/Insurance/CreateInsuranceTransactionForm.d.ts +10 -0
  7. package/types/components/Insurance/FormElements.d.ts +36 -3
  8. package/types/components/Insurance/InsurancePlans/BenefitDetailsModal.d.ts +11 -0
  9. package/types/components/Insurance/InsurancePlans/InsurancePlanCard.d.ts +28 -0
  10. package/types/components/Insurance/InsurancePlans/InsurancePlanList.d.ts +21 -0
  11. package/types/components/Insurance/InsurancePlans/index.d.ts +2 -0
  12. package/types/components/Insurance/RelationshipSelect.d.ts +22 -0
  13. package/types/components/Insurance/SimpleDetail.d.ts +2 -1
  14. package/types/components/Insurance/StepFourPayment.d.ts +14 -0
  15. package/types/components/Insurance/StepOneForm.d.ts +2 -1
  16. package/types/components/Insurance/StepOneFormV2.d.ts +10 -0
  17. package/types/components/Insurance/StepThreeBuyerInfo.d.ts +9 -0
  18. package/types/components/Insurance/StepThreeInsuredPeople.d.ts +17 -0
  19. package/types/components/Insurance/StepTwoPlansV2.d.ts +10 -0
  20. package/types/components/Insurance/countryUtils.d.ts +10 -0
  21. package/types/components/Insurance/types.d.ts +69 -2
  22. package/types/components/Insurance/validationRules.d.ts +4 -0
  23. package/types/components/Insurance/validationUtils.d.ts +12 -0
  24. package/types/components/Modal/InsurancePaymentModal.d.ts +11 -0
  25. package/types/components/StepIndicator/StepIndicatorCard.d.ts +11 -0
  26. package/types/components/StepIndicator/StepIndicatorHorizontal.d.ts +10 -0
  27. package/types/components/StepIndicator/index.d.ts +2 -0
  28. package/types/constants/api-urls.d.ts +5 -0
  29. package/types/constants/countries.d.ts +2 -0
  30. package/types/embeded-main.d.ts +2 -0
  31. package/types/hooks/useBookedSimGrouped.d.ts +38 -0
  32. package/types/hooks/useBookedTransactionGroupDetail.d.ts +40 -0
  33. package/types/hooks/useDocumentScan.d.ts +22 -0
  34. package/types/hooks/useInsuranceData.d.ts +4 -5
  35. package/types/hooks/useInsurancePlans.d.ts +10 -0
  36. package/types/hooks/useInsuranceTransaction.d.ts +39 -0
  37. package/types/hooks/useParseDocumentData.d.ts +10 -0
  38. package/types/pages/agency/booked-sim-list/BookedSimDescription.d.ts +6 -0
  39. package/types/pages/agency/booked-sim-list/BookedSimList.d.ts +6 -0
  40. package/types/pages/agency/booked-sim-transaction-detail/BookedGroupSimTransactionDetail.d.ts +1 -0
  41. package/types/pages/agency/insurance/transaction-create/CreateInsuranceTransactionPageV2.d.ts +1 -0
  42. package/types/pages/agency/role-list/RoleList.d.ts +2 -0
  43. package/types/pages/guest/insurance-create.d.ts +1 -0
  44. package/types/store/useAuthStore.d.ts +1 -0
  45. package/types/types/enum.d.ts +8 -1
  46. package/types/types/insurance-transaction.dto.d.ts +4 -1
  47. package/types/types/insurance.d.ts +13 -2
  48. package/types/types/sdk.d.ts +4 -0
  49. package/types/types/user.d.ts +5 -1
  50. package/types/util/insurance.util.d.ts +4 -0
  51. package/types/components/Insurance/StepIndicator.d.ts +0 -10
  52. package/types/pages/agency/group-sim-transaction-detail/GroupSimTransactionDetail.d.ts +0 -1
@@ -1,4 +1,5 @@
1
1
  import { InsuranceTransaction } from '../types/insurance-transaction.dto';
2
+ import { EPaymentMethod } from '../types/enum';
2
3
  export interface GetInsuranceTransactionListReqDto {
3
4
  page?: number;
4
5
  limit?: number;
@@ -15,6 +16,41 @@ export interface GetInsuranceTransactionListRespDto {
15
16
  page: number;
16
17
  limit: number;
17
18
  }
19
+ export interface CreateTransactionPayload {
20
+ provider: string;
21
+ type: string;
22
+ policyType: string;
23
+ coveragePlanId: number;
24
+ coverageStartDate: string;
25
+ coverageEndDate: string;
26
+ travelType: string;
27
+ destinationCountryId: number;
28
+ insureds: Array<{
29
+ relationToPrimary: string;
30
+ isPrimary: boolean;
31
+ fullName: string;
32
+ dateOfBirth: string;
33
+ gender: string;
34
+ idType: string;
35
+ idNumber: string;
36
+ nationality: number;
37
+ email?: string;
38
+ phone?: string;
39
+ address?: string;
40
+ wardId?: number;
41
+ stateId?: number;
42
+ countryId?: number;
43
+ additionalInfo?: Record<string, any>;
44
+ personType?: string;
45
+ }>;
46
+ providerSpecific?: Record<string, any>;
47
+ buyerInfo?: Record<string, any>;
48
+ paymentMode?: EPaymentMethod;
49
+ premium?: {
50
+ totalPremium: number;
51
+ premiumPerPerson: number;
52
+ };
53
+ }
18
54
  export declare const useInsuranceTransactionDetail: (publicId: string | undefined) => {
19
55
  transaction: InsuranceTransaction | null;
20
56
  planName: string;
@@ -48,4 +84,7 @@ export declare const useInsuranceTransaction: (options?: {
48
84
  refetch: () => Promise<void>;
49
85
  };
50
86
  createPolicyFromQuote: (quoteId: number) => Promise<any>;
87
+ createTransaction: (payload: CreateTransactionPayload) => Promise<InsuranceTransaction>;
88
+ isCreatingTransaction: boolean;
89
+ checkTransactionStatus: (publicId: string) => Promise<InsuranceTransaction>;
51
90
  };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Hook for parsing and formatting document scan data
3
+ */
4
+ export declare const useParseDocumentData: () => {
5
+ formatDateToYYYYMMDD: (dateStr: string | undefined) => string;
6
+ findCountryIdByNationality: (nationality: string | undefined, countryOptions: Array<{
7
+ value: string;
8
+ label: string;
9
+ }>) => number | null;
10
+ };
@@ -0,0 +1,6 @@
1
+ import { IBookedSimGroupedItem } from '../../../hooks/useBookedSimGrouped';
2
+ type Props = {
3
+ transaction: IBookedSimGroupedItem;
4
+ };
5
+ export declare const BookedSimDescription: ({ transaction }: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ showLayout?: boolean;
3
+ defaultLimit?: number;
4
+ };
5
+ export declare const BookedSimList: ({ defaultLimit }: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1 @@
1
+ export declare const BookedGroupSimTransactionDetail: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const CreateInsuranceTransactionPageV2: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const RoleList: () => import("react/jsx-runtime").JSX.Element;
2
+ export default RoleList;
@@ -0,0 +1 @@
1
+ export declare const CreateGuestInsuranceTransactionPage: () => import("react/jsx-runtime").JSX.Element;
@@ -17,4 +17,5 @@ export type AuthState = {
17
17
  departmentDisplay: string;
18
18
  };
19
19
  export declare const useAuthStore: import('zustand').UseBoundStore<import('zustand').StoreApi<AuthState>>;
20
+ export declare const useIsGuest: () => boolean;
20
21
  export {};
@@ -91,5 +91,12 @@ export declare const E_TOP_UP_VALUES: {
91
91
  };
92
92
  export declare enum EPaymentMethod {
93
93
  PRIMARY_BALANCE = "primary_balance",
94
- TOPUP_BALANCE = "topup_balance"
94
+ TOPUP_BALANCE = "topup_balance",
95
+ BANK_TRANSFER = "bank_transfer"
96
+ }
97
+ export declare enum EInsuranceTransactionStatus {
98
+ PENDING = "pending",
99
+ PAID = "paid",
100
+ SUCCESS = "success",
101
+ FAILED = "failed"
95
102
  }
@@ -1,4 +1,4 @@
1
- import { EGender, EIdType, EInsuranceType, EPolicyStatus, EPolicyType, EQuoteStatus, ERelationToPrimary, ETravelType } from './insurance';
1
+ import { EGender, EIdType, EInsuranceType, EPersonType, EPolicyStatus, EPolicyType, EQuoteStatus, ERelationToPrimary, ETravelType } from './insurance';
2
2
  import { ITransaction } from './response.dto';
3
3
  export interface InsuranceQuoteInsured {
4
4
  id: number;
@@ -19,6 +19,7 @@ export interface InsuranceQuoteInsured {
19
19
  stateId?: number;
20
20
  countryId?: number;
21
21
  additionalInfo?: Record<string, any>;
22
+ personType?: EPersonType;
22
23
  }
23
24
  export interface InsuranceQuote {
24
25
  id: number;
@@ -43,6 +44,7 @@ export interface InsuranceQuote {
43
44
  providerData?: Record<string, any>;
44
45
  providerResponse?: Record<string, any>;
45
46
  validUntil?: string;
47
+ buyerInfo?: Record<string, any>;
46
48
  insureds?: InsuranceQuoteInsured[];
47
49
  createdAt: string;
48
50
  updatedAt: string;
@@ -70,6 +72,7 @@ export interface PolicyInsured {
70
72
  stateId?: number;
71
73
  countryId?: number;
72
74
  additionalInfo?: Record<string, any>;
75
+ personType?: EPersonType;
73
76
  }
74
77
  export interface InsuranceTransaction {
75
78
  id: number;
@@ -24,7 +24,8 @@ export declare enum EIdType {
24
24
  }
25
25
  export declare enum EInsuranceProviderType {
26
26
  TMIV = "TMIV",
27
- MSIG = "MSIG"
27
+ MSIG = "MSIG",
28
+ PVI = "PVI"
28
29
  }
29
30
  export declare enum EInsuranceType {
30
31
  INDIVIDUAL = "individual",
@@ -51,10 +52,20 @@ export declare enum EPolicyStatus {
51
52
  ACTIVE = "active",
52
53
  CANCELLED = "cancelled",
53
54
  EXPIRED = "expired",
54
- PENDING = "pending"
55
+ PENDING = "pending",
56
+ FAILED = "failed"
55
57
  }
56
58
  export declare enum EDestination {
57
59
  WORLDWIDE = "worldwide",
58
60
  ASIA = "asia",
59
61
  ASEAN = "asean"
60
62
  }
63
+ export declare enum EPersonType {
64
+ ADULT = "adult",
65
+ CHILDREN = "children"
66
+ }
67
+ export declare enum EPersonValidationStatus {
68
+ VALID = "valid",
69
+ NEEDS_CHECK = "needs_check",
70
+ NOT_ENTERED = "not_entered"
71
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum ESdkFormType {
2
+ FX = "fx",
3
+ INSURANCE = "insurance"
4
+ }
@@ -68,5 +68,9 @@ export declare enum EPermissionKey {
68
68
  VIEW_SYSTEM_JOB_LIST = "VIEW_SYSTEM_JOB_LIST",
69
69
  RETRY_SYSTEM_JOB = "RETRY_SYSTEM_JOB",
70
70
  DELTE_SYSTEM_JOB = "DELTE_SYSTEM_JOB",
71
- CHANGE_SYSTEM_JOB_PARAMS = "CHANGE_SYSTEM_JOB_PARAMS"
71
+ CHANGE_SYSTEM_JOB_PARAMS = "CHANGE_SYSTEM_JOB_PARAMS",
72
+ CREATE_INSURANCE_ORDER = "CREATE_INSURANCE_ORDER",
73
+ VIEW_INSURANCE_LIST = "VIEW_INSURANCE_LIST",
74
+ UPDATE_INSURANCE_ORDER = "UPDATE_INSURANCE_ORDER",
75
+ VIEW_INSURANCE_DETAIL = "VIEW_INSURANCE_DETAIL"
72
76
  }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Get Vietnamese label for insurance region/destination
3
+ */
4
+ export declare const getRegionLabel: (regionValue: string | null | undefined) => string;
@@ -1,10 +0,0 @@
1
- type Step = {
2
- id: number;
3
- title: string;
4
- };
5
- interface StepIndicatorProps {
6
- currentStep: number;
7
- steps: Step[];
8
- }
9
- export declare const StepIndicator: ({ currentStep, steps }: StepIndicatorProps) => import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1 +0,0 @@
1
- export declare const GroupSimTransactionDetail: () => import("react/jsx-runtime").JSX.Element;