gotrip-fx-transaction-form 1.0.235-dev → 1.0.236-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 (32) hide show
  1. package/index.js +17747 -17723
  2. package/package.json +1 -1
  3. package/types/components/Insurance/InsuranceDatePicker.d.ts +9 -0
  4. package/types/components/Insurance/{FormElements.d.ts → shared/FormElements.d.ts} +11 -1
  5. package/types/components/Insurance/shared/InfoBlockCard.d.ts +10 -0
  6. package/types/components/Insurance/shared/InsuranceRadioGroup.d.ts +14 -0
  7. package/types/components/Insurance/shared/PaymentMethodSelector.d.ts +8 -0
  8. package/types/components/Insurance/shared/SimpleSelect.d.ts +14 -0
  9. package/types/components/Insurance/shared/StepFooter.d.ts +8 -0
  10. package/types/components/Insurance/shared/index.d.ts +6 -0
  11. package/types/components/Modal/MotorInsurancePaymentModal.d.ts +11 -0
  12. package/types/components/MotorInsurance/Bike/BikePremiumSummary.d.ts +7 -0
  13. package/types/components/MotorInsurance/Bike/BikeStepOneForm.d.ts +10 -0
  14. package/types/components/MotorInsurance/Bike/BikeStepThreePayment.d.ts +17 -0
  15. package/types/components/MotorInsurance/Bike/BikeStepTwoVehicleInfo.d.ts +11 -0
  16. package/types/components/MotorInsurance/Bike/CreateBikeInsuranceForm.d.ts +7 -0
  17. package/types/components/MotorInsurance/Bike/index.d.ts +5 -0
  18. package/types/components/MotorInsurance/Car/CarPremiumSummary.d.ts +7 -0
  19. package/types/components/MotorInsurance/Car/CarStepOneForm.d.ts +9 -0
  20. package/types/components/MotorInsurance/Car/CarStepTwoVehicleInfo.d.ts +11 -0
  21. package/types/components/MotorInsurance/Car/CreateCarInsuranceForm.d.ts +8 -0
  22. package/types/components/MotorInsurance/Car/index.d.ts +4 -0
  23. package/types/components/MotorInsurance/CreateMotorInsuranceTransactionForm.d.ts +9 -0
  24. package/types/components/MotorInsurance/index.d.ts +4 -0
  25. package/types/components/MotorInsurance/motor-insurance.types.d.ts +57 -0
  26. package/types/constants/api-urls.d.ts +8 -0
  27. package/types/constants/regex.d.ts +2 -0
  28. package/types/hooks/useMotorInsurance.d.ts +62 -0
  29. package/types/hooks/useMotorInsuranceTransaction.d.ts +94 -0
  30. package/types/pages/agency/insurance/motor-transaction-create/CreateMotorInsuranceTransactionPage.d.ts +1 -0
  31. package/types/pages/agency/insurance/motor-transaction-detail/MotorInsuranceTransactionDetailPage.d.ts +1 -0
  32. package/types/pages/agency/insurance/motor-transaction-list/MotorInsuranceTransactionListPage.d.ts +6 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gotrip-fx-transaction-form",
3
- "version": "1.0.235-dev",
3
+ "version": "1.0.236-dev",
4
4
  "description": "FX Transaction Form ES6 module",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -0,0 +1,9 @@
1
+ import { default as DatePicker } from 'react-datepicker';
2
+ export interface DatePickerInputProps {
3
+ value?: string;
4
+ onClick?: () => void;
5
+ placeholder?: string;
6
+ }
7
+ /** Shared date picker input with calendar icon. Use as customInput for react-datepicker. */
8
+ export declare const DatePickerInput: import('react').ForwardRefExoticComponent<DatePickerInputProps & import('react').RefAttributes<HTMLInputElement>>;
9
+ export { DatePicker };
@@ -1,6 +1,6 @@
1
1
  import { Control, FieldPath, FieldValues, RegisterOptions } from 'react-hook-form';
2
2
  import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
3
- import { EDocumentType, DocumentScanResult } from '../../hooks/useDocumentScan';
3
+ import { EDocumentType, DocumentScanResult } from '../../../hooks/useDocumentScan';
4
4
  export declare const FieldLabel: ({ label, tooltip }: {
5
5
  label: string;
6
6
  tooltip?: string;
@@ -49,6 +49,16 @@ interface FormInputFieldProps<T extends FieldValues> {
49
49
  disabled?: boolean;
50
50
  }
51
51
  export declare function FormInputField<T extends FieldValues>({ name, control, label, required, placeholder, type, rules, leftIcon, rightIcon, showScanButton, documentType, onScanClick, onScanComplete, showValidationState, isValid, disabled, }: FormInputFieldProps<T>): import("react/jsx-runtime").JSX.Element;
52
+ interface FormTextareaFieldProps<T extends FieldValues> {
53
+ name: FieldPath<T>;
54
+ control: Control<T>;
55
+ label: string;
56
+ required?: boolean;
57
+ placeholder?: string;
58
+ rules?: RegisterOptions<T>;
59
+ rows?: number;
60
+ }
61
+ export declare function FormTextareaField<T extends FieldValues>({ name, control, label, required, placeholder, rules, rows, }: FormTextareaFieldProps<T>): import("react/jsx-runtime").JSX.Element;
52
62
  interface CountryComboboxProps {
53
63
  options: {
54
64
  value: string;
@@ -0,0 +1,10 @@
1
+ import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
+ import { ReactNode } from 'react';
3
+ interface InfoBlockCardProps {
4
+ title: string;
5
+ icon?: IconDefinition;
6
+ onEdit?: () => void;
7
+ children: ReactNode;
8
+ }
9
+ export declare function InfoBlockCard({ title, icon, onEdit, children }: InfoBlockCardProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,14 @@
1
+ interface InsuranceRadioGroupOption<T extends string> {
2
+ value: T;
3
+ label: string;
4
+ }
5
+ interface InsuranceRadioGroupProps<T extends string> {
6
+ value: T;
7
+ onValueChange: (value: T) => void;
8
+ options: InsuranceRadioGroupOption<T>[];
9
+ direction?: 'row' | 'column';
10
+ gap?: number;
11
+ disabled?: boolean;
12
+ }
13
+ export declare function InsuranceRadioGroup<T extends string>({ value, onValueChange, options, direction, gap, disabled, }: InsuranceRadioGroupProps<T>): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,8 @@
1
+ import { EPaymentMethod } from '../../../types/enum';
2
+ interface PaymentMethodSelectorProps {
3
+ value: EPaymentMethod;
4
+ onChange: (value: EPaymentMethod) => void;
5
+ showTopupBalance?: boolean;
6
+ }
7
+ export declare function PaymentMethodSelector({ value, onChange, showTopupBalance, }: PaymentMethodSelectorProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,14 @@
1
+ interface SimpleSelectOption<T> {
2
+ value: T;
3
+ label: string;
4
+ }
5
+ interface SimpleSelectProps<T> {
6
+ value: T;
7
+ onChange: (value: T) => void;
8
+ options: SimpleSelectOption<T>[];
9
+ placeholder?: string;
10
+ size?: 'sm' | 'md';
11
+ minWidth?: number;
12
+ }
13
+ export declare function SimpleSelect<T extends string | number>({ value, onChange, options, placeholder, size, minWidth, }: SimpleSelectProps<T>): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,8 @@
1
+ interface StepFooterProps {
2
+ onBack: () => void;
3
+ onNext?: () => void;
4
+ nextLabel?: string;
5
+ nextDisabled?: boolean;
6
+ }
7
+ export declare function StepFooter({ onBack, onNext, nextLabel, nextDisabled, }: StepFooterProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ export { InsuranceRadioGroup } from './InsuranceRadioGroup';
2
+ export { PaymentMethodSelector } from './PaymentMethodSelector';
3
+ export { InfoBlockCard } from './InfoBlockCard';
4
+ export { StepFooter } from './StepFooter';
5
+ export { SimpleSelect } from './SimpleSelect';
6
+ export { FieldLabel, InfoBanner, OptionCard, DateInput, InputType, FormInputField, FormTextareaField, CountryCombobox, ProvinceCombobox, WardCombobox, } from './FormElements';
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ interface MotorInsurancePaymentModalProps {
3
+ open: boolean;
4
+ onClose: () => void;
5
+ qrCodeUrl: string;
6
+ transactionPublicId?: string;
7
+ amount: number;
8
+ onSuccess?: () => void;
9
+ }
10
+ declare const MotorInsurancePaymentModal: React.FC<MotorInsurancePaymentModalProps>;
11
+ export default MotorInsurancePaymentModal;
@@ -0,0 +1,7 @@
1
+ import { MotorPremiumSummary as MotorPremiumSummaryType } from '../motor-insurance.types';
2
+ interface BikePremiumSummaryProps {
3
+ summary?: MotorPremiumSummaryType | null;
4
+ isLoading?: boolean;
5
+ }
6
+ export declare const BikePremiumSummary: ({ summary, isLoading }: BikePremiumSummaryProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ import { MotorPlanFormValues, MotorPremiumSummary as MotorPremiumSummaryType } from '../motor-insurance.types';
2
+ import { Control, UseFormSetValue } from 'react-hook-form';
3
+ type BikeStepOneFormProps = {
4
+ control: Control<MotorPlanFormValues>;
5
+ setValue: UseFormSetValue<MotorPlanFormValues>;
6
+ premiumSummary?: MotorPremiumSummaryType | null;
7
+ isLoadingQuote?: boolean;
8
+ };
9
+ export declare const BikeStepOneForm: ({ control, setValue, premiumSummary, isLoadingQuote, }: BikeStepOneFormProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,17 @@
1
+ import { EPaymentMethod } from '../../../types/enum';
2
+ import { MotorPlanFormValues, MotorPremiumSummary, VehicleInfoFormValues } from '../motor-insurance.types';
3
+ export interface BikeStepThreePaymentProps {
4
+ planValues: MotorPlanFormValues;
5
+ premiumSummary: MotorPremiumSummary | null;
6
+ vehicleInfo: VehicleInfoFormValues | null;
7
+ isLoading: boolean;
8
+ paymentMode: EPaymentMethod;
9
+ onPaymentModeChange: (mode: EPaymentMethod) => void;
10
+ isTermsAgreed: boolean;
11
+ onTermsAgreedChange: (agreed: boolean) => void;
12
+ onPayment: () => void;
13
+ isProcessing: boolean;
14
+ isGuest: boolean;
15
+ onBack: () => void;
16
+ }
17
+ export declare const BikeStepThreePayment: ({ planValues, premiumSummary, vehicleInfo, isLoading, paymentMode, onPaymentModeChange, isTermsAgreed, onTermsAgreedChange, onPayment, isProcessing, isGuest, onBack, }: BikeStepThreePaymentProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { VehicleInfoFormValues, MotorPremiumSummary as MotorPremiumSummaryType } from '../motor-insurance.types';
2
+ interface BikeStepTwoVehicleInfoProps {
3
+ initialValues?: Partial<VehicleInfoFormValues>;
4
+ premiumSummary?: MotorPremiumSummaryType | null;
5
+ isLoadingQuote?: boolean;
6
+ onSubmit: (values: VehicleInfoFormValues) => void;
7
+ onBack: () => void;
8
+ formRef?: (form: HTMLFormElement | null) => void;
9
+ }
10
+ export declare const BikeStepTwoVehicleInfo: ({ initialValues, premiumSummary, isLoadingQuote, onSubmit, formRef, }: BikeStepTwoVehicleInfoProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,7 @@
1
+ export interface CreateBikeInsuranceFormProps {
2
+ storageKey: string;
3
+ title?: string;
4
+ onBack?: () => void;
5
+ onSuccess?: (transactionData: unknown) => void;
6
+ }
7
+ export declare const CreateBikeInsuranceForm: ({ storageKey, title, onBack, onSuccess, }: CreateBikeInsuranceFormProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ export { BikePremiumSummary } from './BikePremiumSummary';
2
+ export { BikeStepOneForm } from './BikeStepOneForm';
3
+ export { BikeStepTwoVehicleInfo } from './BikeStepTwoVehicleInfo';
4
+ export { BikeStepThreePayment } from './BikeStepThreePayment';
5
+ export { CreateBikeInsuranceForm } from './CreateBikeInsuranceForm';
@@ -0,0 +1,7 @@
1
+ import { MotorPremiumSummary as MotorPremiumSummaryType } from '../motor-insurance.types';
2
+ interface CarPremiumSummaryProps {
3
+ summary: MotorPremiumSummaryType;
4
+ }
5
+ /** Temporary placeholder for car insurance premium summary. */
6
+ export declare const CarPremiumSummary: ({ summary }: CarPremiumSummaryProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,9 @@
1
+ import { Control } from 'react-hook-form';
2
+ import { MotorPlanFormValues } from '../motor-insurance.types';
3
+ interface CarStepOneFormProps {
4
+ control: Control<MotorPlanFormValues>;
5
+ setValue: (name: keyof MotorPlanFormValues, value: unknown) => void;
6
+ }
7
+ /** Temporary placeholder for car insurance step one form. */
8
+ export declare const CarStepOneForm: (_props: CarStepOneFormProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,11 @@
1
+ import { VehicleInfoFormValues, MotorPremiumSummary as MotorPremiumSummaryType } from '../motor-insurance.types';
2
+ interface CarStepTwoVehicleInfoProps {
3
+ initialValues?: Partial<VehicleInfoFormValues>;
4
+ premiumSummary: MotorPremiumSummaryType;
5
+ onSubmit: (values: VehicleInfoFormValues) => void;
6
+ onBack: () => void;
7
+ formRef?: (form: HTMLFormElement | null) => void;
8
+ }
9
+ /** Temporary placeholder for car insurance vehicle info form. */
10
+ export declare const CarStepTwoVehicleInfo: (_props: CarStepTwoVehicleInfoProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,8 @@
1
+ export interface CreateCarInsuranceFormProps {
2
+ storageKey: string;
3
+ title?: string;
4
+ onBack?: () => void;
5
+ onSuccess?: (transactionData: unknown) => void;
6
+ }
7
+ /** Temporary placeholder for car insurance transaction form. */
8
+ export declare const CreateCarInsuranceForm: ({ title, }: CreateCarInsuranceFormProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export { CarPremiumSummary } from './CarPremiumSummary';
2
+ export { CarStepOneForm } from './CarStepOneForm';
3
+ export { CarStepTwoVehicleInfo } from './CarStepTwoVehicleInfo';
4
+ export { CreateCarInsuranceForm } from './CreateCarInsuranceForm';
@@ -0,0 +1,9 @@
1
+ import { MotorVehicleType } from './motor-insurance.types';
2
+ export interface CreateMotorInsuranceTransactionFormProps {
3
+ vehicleType: MotorVehicleType;
4
+ storageKey: string;
5
+ title?: string;
6
+ onBack?: () => void;
7
+ onSuccess?: (transactionData: unknown) => void;
8
+ }
9
+ export declare const CreateMotorInsuranceTransactionForm: ({ vehicleType, storageKey, title, onBack, onSuccess, }: CreateMotorInsuranceTransactionFormProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export { BikePremiumSummary, BikeStepOneForm, BikeStepTwoVehicleInfo, CreateBikeInsuranceForm } from './Bike';
2
+ export { CarPremiumSummary, CarStepOneForm, CarStepTwoVehicleInfo, CreateCarInsuranceForm } from './Car';
3
+ export { CreateMotorInsuranceTransactionForm } from './CreateMotorInsuranceTransactionForm';
4
+ export * from './motor-insurance.types';
@@ -0,0 +1,57 @@
1
+ import { Control, UseFormSetValue } from 'react-hook-form';
2
+ export type MotorVehicleType = 'bike' | 'car';
3
+ export type EMotorVehicleType = 'under_50cc' | 'over_50cc' | 'three_wheel';
4
+ export declare enum EBikeEngineCategory {
5
+ BELOW_50CC = "BL50",
6
+ ABOVE_50CC = "AB50",
7
+ ELECTRIC = "ELEC",
8
+ THREE_WHEEL = "3WHL",
9
+ SIMILAR_MOTOR = "SIM"
10
+ }
11
+ export type EMotorProvider = 'PVI' | 'DBV' | 'BAO_MINH';
12
+ export type MotorPlanFormValues = {
13
+ vehicleType: EMotorVehicleType;
14
+ durationYears: 1 | 2 | 3;
15
+ startDate: Date | null;
16
+ endDate: Date | null;
17
+ provider: EMotorProvider;
18
+ passengerAccidentEnabled: boolean;
19
+ passengerAccidentLevel: number;
20
+ passengerAccidentCount: number;
21
+ };
22
+ export type VehicleInfoFormValues = {
23
+ ownerFullName: string;
24
+ ownerAddress: string;
25
+ ownerIdNumber: string;
26
+ hasLicensePlate: boolean;
27
+ licensePlate: string;
28
+ chassisNumber: string;
29
+ engineNumber: string;
30
+ certificatePhone: string;
31
+ certificateEmail: string;
32
+ };
33
+ export type MotorPremiumSummary = {
34
+ tndsPremium: number;
35
+ tndsPersonCompensation: number;
36
+ tndsPropertyCompensation: number;
37
+ passengerAccidentPremium: number;
38
+ passengerAccidentLevel: number;
39
+ passengerAccidentPeopleCount: number;
40
+ totalPremium: number;
41
+ };
42
+ export declare const VEHICLE_TYPE_LABELS: Record<EMotorVehicleType, string>;
43
+ export declare const BIKE_VEHICLE_TYPE_CODE_LABELS: Record<string, string>;
44
+ export declare const getBikeVehicleTypeCodeLabel: (code?: string | null) => string;
45
+ export declare const DURATION_LABELS: Record<1 | 2 | 3, string>;
46
+ export declare const PASSENGER_ACCIDENT_LEVELS: {
47
+ value: number;
48
+ label: string;
49
+ }[];
50
+ export type MotorStepOneFormProps = {
51
+ control: Control<MotorPlanFormValues>;
52
+ setValue: UseFormSetValue<MotorPlanFormValues>;
53
+ premiumSummary?: MotorPremiumSummary;
54
+ onNext: () => void;
55
+ onBack?: () => void;
56
+ isStepReady: boolean;
57
+ };
@@ -223,6 +223,14 @@ export declare const ApiUrls: {
223
223
  streets: string;
224
224
  };
225
225
  };
226
+ motorInsurance: {
227
+ motorInsuranceSettings: string;
228
+ providers: string;
229
+ createBikeQuote: (provider: string) => string;
230
+ createBikeTransaction: (provider: string) => string;
231
+ transactionList: string;
232
+ transactionDetail: (publicId: string) => string;
233
+ };
226
234
  insuranceHandlers: {
227
235
  providers: string;
228
236
  coveragePlans: (provider: string) => string;
@@ -2,3 +2,5 @@ export declare const vietnamPhoneRegex: RegExp;
2
2
  export declare const vietnamLocalPhoneRegex: RegExp;
3
3
  export declare const vietnamInternationalPhoneRegex: RegExp;
4
4
  export declare const idNumberRegex: RegExp;
5
+ /** Vietnamese license plate: XXXX-XXX.XX | XXXX-XXXXX | XXXXXXXX | XXXXXXXXX */
6
+ export declare const licensePlateRegex: RegExp;
@@ -0,0 +1,62 @@
1
+ import { EBikeEngineCategory } from '../components/MotorInsurance/motor-insurance.types';
2
+ import { EPaymentMethod, TransactionStatus } from '../types/enum';
3
+ /** Bike quote request - matches API CreateQuoteRequestBikeDto */
4
+ export interface BikeQuoteRequest {
5
+ startDate: string;
6
+ endDate: string;
7
+ vehicleTypeCode: EBikeEngineCategory;
8
+ occupantAccidentSumInsured?: number;
9
+ insuredOccupantCount?: number;
10
+ }
11
+ /** Bike quote response from provider */
12
+ export interface BikeQuoteResponse {
13
+ success: boolean;
14
+ totalPremium?: number;
15
+ mandatoryPremium?: number;
16
+ occupantAccidentPremium?: number;
17
+ error?: string;
18
+ }
19
+ /** Bike policy request - matches API CreatePolicyRequestBikeDto */
20
+ export interface BikePolicyRequest {
21
+ startDate: string;
22
+ endDate: string;
23
+ ownerName: string;
24
+ ownerAddress: string;
25
+ customerEmail: string;
26
+ phoneNumber?: string;
27
+ licensePlate: string;
28
+ engineNumber: string;
29
+ chassisNumber: string;
30
+ vehicleTypeCode: EBikeEngineCategory;
31
+ brand?: string;
32
+ manufacturingYear?: string;
33
+ occupantAccidentSumInsured?: number;
34
+ insuredOccupantCount?: number;
35
+ occupantAccidentPremium?: number;
36
+ totalPremium?: number;
37
+ paymentMode?: EPaymentMethod;
38
+ }
39
+ /** Bike policy response - includes transactionPublicId, qrCodeUrl for bank_transfer */
40
+ export interface BikePolicyResponse {
41
+ policyId?: number | string;
42
+ policyNumber?: string;
43
+ transactionPublicId?: string;
44
+ orderId?: number;
45
+ qrCodeUrl?: string;
46
+ totalAmount?: number;
47
+ status?: TransactionStatus;
48
+ error?: string;
49
+ }
50
+ export declare const useMotorInsurance: () => {
51
+ createQuoteBike: (provider: string, body: BikeQuoteRequest) => Promise<BikeQuoteResponse | null>;
52
+ createPolicyBike: (provider: string, body: BikePolicyRequest) => Promise<BikePolicyResponse | null>;
53
+ isCreatingQuote: boolean;
54
+ isCreatingPolicy: boolean;
55
+ providers: string[];
56
+ loadingProviders: boolean;
57
+ motorInsuranceSettings: Record<string, any>;
58
+ loadingMotorInsuranceSettings: boolean;
59
+ refetchMotorInsuranceSettings: () => Promise<void>;
60
+ getMotorProviderLogoUrl: (providerCode?: string | null) => string | undefined;
61
+ getMotorProviderTermsAgreeHtml: (providerCode?: string | null) => string | undefined;
62
+ };
@@ -0,0 +1,94 @@
1
+ import { TransactionStatus } from '../types/enum';
2
+ export interface MotorInsuranceTransactionDetail {
3
+ id: number;
4
+ transactionPublicId: string;
5
+ status: string;
6
+ totalAmount: number;
7
+ providerPolicyId?: string | number;
8
+ providerPolicyNumber?: string;
9
+ errorMessage?: string;
10
+ vehicleType?: string;
11
+ ownerName?: string;
12
+ licensePlate?: string;
13
+ startDate?: string;
14
+ endDate?: string;
15
+ provider: string;
16
+ chassisNumber?: string;
17
+ engineNumber?: string;
18
+ metadata?: Record<string, unknown>;
19
+ transaction?: {
20
+ status: string;
21
+ publicId: string;
22
+ };
23
+ }
24
+ export interface MotorInsuranceTransactionListItem {
25
+ id: number;
26
+ orderId: number;
27
+ transactionPublicId: string;
28
+ status: TransactionStatus;
29
+ totalAmount: number;
30
+ providerPolicyId?: string | number;
31
+ providerPolicyNumber?: string;
32
+ error?: string;
33
+ createdAt?: string;
34
+ vehicleType?: string;
35
+ ownerName?: string;
36
+ licensePlate?: string;
37
+ provider: string;
38
+ transaction?: {
39
+ status: string;
40
+ publicId: string;
41
+ };
42
+ }
43
+ export interface GetMotorInsuranceTransactionListReqDto {
44
+ page?: number;
45
+ limit?: number;
46
+ minValue?: number;
47
+ maxValue?: number;
48
+ startDate?: string;
49
+ endDate?: string;
50
+ sortField?: 'date' | 'value';
51
+ sortDirection?: 'asc' | 'desc';
52
+ status?: TransactionStatus;
53
+ publicId?: string;
54
+ ownerName?: string;
55
+ vehicleType?: string;
56
+ }
57
+ export interface GetMotorInsuranceTransactionListRespDto {
58
+ transactions: MotorInsuranceTransactionListItem[];
59
+ total: number;
60
+ page: number;
61
+ limit: number;
62
+ }
63
+ export declare const useMotorInsuranceTransactionDetail: (publicId: string | undefined) => {
64
+ transaction: MotorInsuranceTransactionDetail | null;
65
+ loading: boolean;
66
+ error: string | null;
67
+ refetch: () => Promise<void>;
68
+ };
69
+ export declare const useMotorInsuranceTransaction: (options?: {
70
+ defaultLimit?: number;
71
+ publicId?: string;
72
+ }) => {
73
+ list: {
74
+ transactions: MotorInsuranceTransactionListItem[];
75
+ total: number;
76
+ loading: boolean;
77
+ page: number;
78
+ limit: number;
79
+ filters: Omit<GetMotorInsuranceTransactionListReqDto, "page" | "limit">;
80
+ refetchData: () => void;
81
+ setPage: import('react').Dispatch<import('react').SetStateAction<number>>;
82
+ setLimit: (nextLimit: number) => void;
83
+ updateFilters: (newFilters: Partial<Omit<GetMotorInsuranceTransactionListReqDto, "page" | "limit">>, options?: {
84
+ replace?: boolean;
85
+ }) => void;
86
+ };
87
+ detail: {
88
+ transaction: MotorInsuranceTransactionDetail | null;
89
+ loading: boolean;
90
+ error: string | null;
91
+ refetch: () => Promise<void>;
92
+ };
93
+ checkTransactionStatus: (publicId: string) => Promise<MotorInsuranceTransactionDetail | null>;
94
+ };
@@ -0,0 +1 @@
1
+ export declare const CreateMotorInsuranceTransactionPage: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const MotorInsuranceTransactionDetailPage: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ defaultLimit?: number;
3
+ };
4
+ export declare const MotorInsuranceTransactionListContent: (props: Props) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const MotorInsuranceTransactionListPage: () => import("react/jsx-runtime").JSX.Element;
6
+ export {};