gotrip-fx-transaction-form 1.0.124 → 1.0.126

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 (56) hide show
  1. package/index.js +20698 -19999
  2. package/package.json +1 -1
  3. package/types/components/Modal/ExtendHoldModal.d.ts +14 -0
  4. package/types/components/PolicyGroup/PolicyGroupActionMenu.d.ts +12 -0
  5. package/types/components/PolicyGroup/PolicyGroupFormDialog.d.ts +10 -0
  6. package/types/components/SIM/SIMSearchForm.d.ts +10 -0
  7. package/types/components/SIM/SIMSelectionGrid.d.ts +17 -0
  8. package/types/components/SIM/Stepper.d.ts +13 -0
  9. package/types/components/SimTransactionStatusBadge/SimTransactionStatusBadge.d.ts +6 -0
  10. package/types/constants/api-urls.d.ts +34 -0
  11. package/types/constants/business-codes.d.ts +5 -0
  12. package/types/constants/env.d.ts +0 -4
  13. package/types/constants/policy-enums.d.ts +28 -0
  14. package/types/design-systems/Dialog/Dialog.d.ts +2 -0
  15. package/types/design-systems/Dialog/DialogContext.d.ts +11 -0
  16. package/types/design-systems/Select/SelectSearchable.d.ts +2 -1
  17. package/types/hooks/useBookedPhoneNumbers.d.ts +24 -0
  18. package/types/hooks/useBookedSimList.d.ts +28 -0
  19. package/types/hooks/useDataOrderList.d.ts +38 -0
  20. package/types/hooks/useDataPackageSearch.d.ts +17 -0
  21. package/types/hooks/usePolicyGroups.d.ts +45 -0
  22. package/types/hooks/useProviderPricing.d.ts +14 -0
  23. package/types/hooks/useSimGridList.d.ts +43 -0
  24. package/types/hooks/useSimHandlers.d.ts +58 -0
  25. package/types/hooks/useSimPackageList.d.ts +123 -0
  26. package/types/hooks/useSimPricing.d.ts +30 -0
  27. package/types/hooks/useSimTransactionGroupDetail.d.ts +50 -0
  28. package/types/hooks/useSimTransactionGrouped.d.ts +44 -0
  29. package/types/pages/admin/email-history-listing/EmailHistoryListing.d.ts +1 -1
  30. package/types/pages/admin/esim-listing/ESimListing.d.ts +1 -6
  31. package/types/pages/admin/esim-transaction-list/ESimTransactionList.d.ts +1 -3
  32. package/types/pages/admin/policy-management/PolicyManagement.d.ts +1 -0
  33. package/types/pages/admin/task-list/TaskList.d.ts +1 -2
  34. package/types/pages/admin/tenant-list/TenantList.d.ts +1 -5
  35. package/types/pages/admin/transaction-list/TransactionList.d.ts +1 -3
  36. package/types/pages/agency/booked-numbers/BookedNumbersPage.d.ts +20 -0
  37. package/types/pages/agency/data-order-list/DataOrderList.d.ts +5 -0
  38. package/types/pages/agency/data-package/DataPackageConfirmModal.d.ts +12 -0
  39. package/types/pages/agency/data-package/DataPackagePurchase.d.ts +1 -0
  40. package/types/pages/agency/group-sim-transaction-detail/GroupSimTransactionDetail.d.ts +1 -0
  41. package/types/pages/agency/sim-booking-list/SimBookingList.d.ts +6 -0
  42. package/types/pages/agency/sim-listing/SimSearchList.d.ts +3 -0
  43. package/types/pages/agency/sim-order/BookedPhoneNumbersModal.d.ts +25 -0
  44. package/types/pages/agency/sim-order/SimOrderPage.d.ts +3 -0
  45. package/types/pages/agency/sim-package-search/SimPackageSearchPage.d.ts +3 -0
  46. package/types/pages/agency/sim-transaction-detail/SimTransactionDetail.d.ts +1 -0
  47. package/types/pages/agency/sim-transaction-list/Description.d.ts +6 -0
  48. package/types/pages/agency/sim-transaction-list/SimTransactionList.d.ts +6 -0
  49. package/types/providers/UnleashProvider.d.ts +4 -0
  50. package/types/types/booked-numbers.dto.d.ts +32 -0
  51. package/types/types/enum.d.ts +4 -0
  52. package/types/types/response.dto.d.ts +30 -1
  53. package/types/types/sim-transaction.dto.d.ts +64 -0
  54. package/types/types/sim.dto.d.ts +21 -0
  55. package/types/util/phone-formatter.d.ts +2 -0
  56. package/types/util/sim-display.d.ts +9 -0
@@ -0,0 +1,50 @@
1
+ export interface ISimTransactionGroupDetail {
2
+ groupPublicId: string;
3
+ phoneNumbers: string[];
4
+ quantity: number;
5
+ totalAmount: number;
6
+ packageInfo?: any;
7
+ customerInfo?: any;
8
+ deliveryInfo?: any;
9
+ simType?: string;
10
+ provider: string;
11
+ status: string;
12
+ notes: string;
13
+ type: string;
14
+ createdAt: string;
15
+ transactions: Array<{
16
+ id: number;
17
+ msisdn: string;
18
+ orderAmount?: number;
19
+ status: string;
20
+ type: string;
21
+ provider: string;
22
+ providerOrderId?: string;
23
+ providerBookingId?: string;
24
+ createdAt: string;
25
+ errorMessage?: string;
26
+ pricingInfo?: {
27
+ activationFee?: number;
28
+ simPrice?: number;
29
+ packagePrice?: number;
30
+ shippingFee?: number;
31
+ totalAmount?: number;
32
+ quantity?: number;
33
+ };
34
+ }>;
35
+ }
36
+ export interface GetSimTransactionGroupDetailRespDto {
37
+ success: boolean;
38
+ data?: ISimTransactionGroupDetail;
39
+ error?: string;
40
+ }
41
+ type Props = {
42
+ groupPublicId: string;
43
+ };
44
+ export declare const useSimTransactionGroupDetail: ({ groupPublicId }: Props) => {
45
+ groupDetail: ISimTransactionGroupDetail | null;
46
+ loading: boolean;
47
+ error: string | null;
48
+ refetchData: (silent?: boolean) => void;
49
+ };
50
+ export {};
@@ -0,0 +1,44 @@
1
+ export declare enum EOrderType {
2
+ Booking = "booking",
3
+ Order = "order"
4
+ }
5
+ export interface ISimTransactionGrouped {
6
+ id: number;
7
+ groupPublicId: string;
8
+ quantity: number;
9
+ status: string;
10
+ type: EOrderType;
11
+ provider: string;
12
+ simType?: string;
13
+ paymentType?: string;
14
+ totalAmount?: number;
15
+ createdAt: string;
16
+ updatedAt: string;
17
+ firstTransactionId: number;
18
+ firstMsisdn: string;
19
+ successful: number;
20
+ failed: number;
21
+ }
22
+ export interface GetSimTransactionGroupedRespDto {
23
+ transactions: ISimTransactionGrouped[];
24
+ total: number;
25
+ }
26
+ export interface GetSimTransactionGroupedReqDto {
27
+ page?: number;
28
+ limit?: number;
29
+ }
30
+ type Props = {
31
+ defaultLimit?: number;
32
+ };
33
+ export declare const useSimTransactionGrouped: ({ defaultLimit }: Props) => {
34
+ transactions: ISimTransactionGrouped[];
35
+ total: number;
36
+ loading: boolean;
37
+ page: number;
38
+ limit: number;
39
+ refetchData: () => void;
40
+ setPage: import('react').Dispatch<import('react').SetStateAction<number>>;
41
+ setLimit: (limit: number) => void;
42
+ setLoading: import('react').Dispatch<import('react').SetStateAction<boolean>>;
43
+ };
44
+ export {};
@@ -2,5 +2,5 @@ type Props = {
2
2
  showLayout?: boolean;
3
3
  defaultLimit?: number;
4
4
  };
5
- export declare const EmailHistoryListing: ({ showLayout, defaultLimit }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const EmailHistoryListing: ({ defaultLimit }: Props) => import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -1,6 +1 @@
1
- type Props = {
2
- showLayout?: boolean;
3
- defaultLimit?: number;
4
- };
5
- export declare const ESimListing: ({ showLayout }: Props) => import("react/jsx-runtime").JSX.Element;
6
- export {};
1
+ export declare const ESimListing: () => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,5 @@
1
1
  type Props = {
2
- showLayout?: boolean;
3
- hideAddButton?: boolean;
4
2
  defaultLimit?: number;
5
3
  };
6
- export declare const ESimTransactionList: ({ showLayout, defaultLimit }: Props) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const ESimTransactionList: ({ defaultLimit }: Props) => import("react/jsx-runtime").JSX.Element;
7
5
  export {};
@@ -0,0 +1 @@
1
+ export declare const PolicyManagement: () => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,5 @@
1
1
  type Props = {
2
- showLayout?: boolean;
3
2
  defaultLimit?: number;
4
3
  };
5
- export declare const TaskList: ({ showLayout, defaultLimit }: Props) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const TaskList: ({ defaultLimit }: Props) => import("react/jsx-runtime").JSX.Element;
6
5
  export {};
@@ -1,5 +1 @@
1
- type Props = {
2
- showLayout?: boolean;
3
- };
4
- export declare const TenantList: ({ showLayout }: Props) => import("react/jsx-runtime").JSX.Element;
5
- export {};
1
+ export declare const TenantList: () => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,5 @@
1
1
  type Props = {
2
- showLayout?: boolean;
3
- hideAddButton?: boolean;
4
2
  defaultLimit?: number;
5
3
  };
6
- export declare const TransactionList: ({ showLayout, defaultLimit }: Props) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const TransactionList: ({ defaultLimit }: Props) => import("react/jsx-runtime").JSX.Element;
7
5
  export {};
@@ -0,0 +1,20 @@
1
+ import { default as React } from 'react';
2
+ import { ISIMCard } from '../../../types/sim.dto';
3
+ interface BookingResult {
4
+ msisdn: string;
5
+ success: boolean;
6
+ bookingId?: string;
7
+ providerResponse?: string;
8
+ providerData?: any;
9
+ error?: string;
10
+ }
11
+ interface BookedNumbersPageProps {
12
+ onBackToSelection?: () => void;
13
+ selectedSims?: ISIMCard[];
14
+ bookingResults?: {
15
+ successfulBookings: BookingResult[];
16
+ failedBookings: BookingResult[];
17
+ };
18
+ }
19
+ declare const BookedNumbersPage: React.FC<BookedNumbersPageProps>;
20
+ export default BookedNumbersPage;
@@ -0,0 +1,5 @@
1
+ type Props = {
2
+ defaultLimit?: number;
3
+ };
4
+ export declare const DataOrderList: ({ defaultLimit }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,12 @@
1
+ import { IDataPackage } from '../../../hooks/useDataPackageSearch';
2
+ interface DataPackageConfirmModalProps {
3
+ isOpen: boolean;
4
+ onClose: () => void;
5
+ onConfirm: () => void;
6
+ selectedPackage: IDataPackage | null;
7
+ phoneNumber: string;
8
+ formatPrice: (price: number) => string;
9
+ loading?: boolean;
10
+ }
11
+ export declare const DataPackageConfirmModal: ({ isOpen, onClose, onConfirm, selectedPackage, phoneNumber, formatPrice, loading, }: DataPackageConfirmModalProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1 @@
1
+ export declare const DataPackagePurchase: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const GroupSimTransactionDetail: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ showLayout?: boolean;
3
+ defaultLimit?: number;
4
+ };
5
+ export declare const SimBookingList: ({ defaultLimit }: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ declare const SimSearchList: React.FC;
3
+ export default SimSearchList;
@@ -0,0 +1,25 @@
1
+ import { default as React } from 'react';
2
+ interface BookedPhoneNumber {
3
+ id: string;
4
+ msisdn: string;
5
+ transactionId?: number;
6
+ bookingDate: string;
7
+ status: string;
8
+ provider: string;
9
+ paymentType: string;
10
+ customerName?: string;
11
+ customerPhone?: string;
12
+ expiresAt?: string;
13
+ orderAmount?: number;
14
+ }
15
+ interface BookedPhoneNumbersModalProps {
16
+ isOpen: boolean;
17
+ onClose: () => void;
18
+ bookedNumbers: BookedPhoneNumber[];
19
+ onSelect: (selectedNumbers: string[]) => void;
20
+ loading?: boolean;
21
+ selectedPackage?: any;
22
+ currentSelectedNumbers?: string[];
23
+ }
24
+ export declare const BookedPhoneNumbersModal: React.FC<BookedPhoneNumbersModalProps>;
25
+ export {};
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ export declare const SimOrderPage: React.FC;
3
+ export default SimOrderPage;
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ export declare const SimPackageSearchPage: React.FC;
3
+ export default SimPackageSearchPage;
@@ -0,0 +1 @@
1
+ export declare const SimTransactionDetail: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ISimTransactionGrouped } from '../../../hooks/useSimTransactionGrouped';
2
+ type Props = {
3
+ transaction: ISimTransactionGrouped;
4
+ };
5
+ export declare const Description: ({ 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 SimTransactionList: ({ defaultLimit }: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ export declare const UnleashProvider: ({ children }: {
3
+ children: React.ReactNode;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,32 @@
1
+ export interface BookedNumber {
2
+ id: string;
3
+ number: string;
4
+ status: 'success' | 'error';
5
+ errorType?: string;
6
+ orderId: string;
7
+ createdAt?: Date;
8
+ updatedAt?: Date;
9
+ }
10
+ export interface OrderStatus {
11
+ orderId: string;
12
+ progress: number;
13
+ currentStep: number;
14
+ totalSteps: number;
15
+ status: 'processing' | 'completed' | 'failed';
16
+ createdAt?: Date;
17
+ updatedAt?: Date;
18
+ }
19
+ export interface BookedNumbersResponse {
20
+ orderStatus: OrderStatus;
21
+ bookedNumbers: BookedNumber[];
22
+ totalCount: number;
23
+ successCount: number;
24
+ errorCount: number;
25
+ }
26
+ export interface BookedNumbersFilters {
27
+ orderId?: string;
28
+ status?: 'success' | 'error';
29
+ errorType?: string;
30
+ limit?: number;
31
+ offset?: number;
32
+ }
@@ -41,6 +41,10 @@ export declare enum EUseCaseses {
41
41
  IMMIGRATION = "IMMIGRATION",
42
42
  BUSINESS = "BUSINESS"
43
43
  }
44
+ export declare enum ESimDomesticServices {
45
+ SIM = "SIM",
46
+ DATA_PACKAGE = "DATA_PACKAGE"
47
+ }
44
48
  export declare enum ECommissionPolicyType {
45
49
  FX = "FX"
46
50
  }
@@ -1,4 +1,4 @@
1
- import { ECommissionPolicyCalculationType, ECommissionPolicyType, EsimTransactionStatus, ETenantType, EUseCaseses, TransactionStatus } from './enum';
1
+ import { ECommissionPolicyCalculationType, ECommissionPolicyType, ESimDomesticServices, EsimTransactionStatus, ETenantType, EUseCaseses, TransactionStatus } from './enum';
2
2
  import { EPermissionKey, EUserRole, EUserStatus } from './user';
3
3
  export type LoginRespDto = {
4
4
  accessToken: string;
@@ -214,12 +214,16 @@ export interface ITravelAgencyTenantSettings {
214
214
  fx: boolean;
215
215
  esimOutbound: boolean;
216
216
  esimInbound: boolean;
217
+ simDomestic: boolean;
217
218
  };
218
219
  fx: {
219
220
  useCases: EUseCaseses[];
220
221
  };
221
222
  esimOutbound: Record<string, any>;
222
223
  esimInbound: Record<string, any>;
224
+ simDomestic: {
225
+ services: ESimDomesticServices[];
226
+ };
223
227
  }
224
228
  export interface IBankTenantSettings {
225
229
  availableCurrencies: string[];
@@ -473,6 +477,14 @@ export declare enum ETransactionReportType {
473
477
  FX = "fx",
474
478
  ESIM = "esim"
475
479
  }
480
+ export declare enum ESimType {
481
+ ESIM = "esim",
482
+ PHYSICAL = "physical"
483
+ }
484
+ export declare enum ESimPaymentType {
485
+ PREPAID = "prepaid",
486
+ POSTPAID = "postpaid"
487
+ }
476
488
  export type IDebtReportTransaction = {
477
489
  transactionId: number;
478
490
  transactionType: ETransactionReportType;
@@ -511,4 +523,21 @@ export type GetDebtReportListRespDto = {
511
523
  debtReports: IDebtReport[];
512
524
  total: number;
513
525
  };
526
+ export declare enum ESimTransactionStatus {
527
+ COMPLETED = "completed",
528
+ BOOKED = "booked"
529
+ }
530
+ export interface IBookedSim {
531
+ id: number;
532
+ msisdn: string;
533
+ createdAt: string;
534
+ status: 'booked' | 'sold';
535
+ paymentType: ESimPaymentType;
536
+ provider: string;
537
+ simType: ESimType | null;
538
+ purchasedDate: string | Date | null;
539
+ hasOrder: boolean;
540
+ providerExpiresAt?: string | Date;
541
+ expiresAt?: string | Date;
542
+ }
514
543
  export {};
@@ -0,0 +1,64 @@
1
+ export interface ISimTransaction {
2
+ id: number;
3
+ transactionId?: number;
4
+ msisdn: string;
5
+ type: 'booking' | 'order';
6
+ provider: 'vnpt' | 'viettel' | 'mobifone' | 'vinaphone';
7
+ simType?: 'prepaid' | 'postpaid';
8
+ status: 'created' | 'booked' | 'completed' | 'cancelled' | 'expired' | 'failed';
9
+ providerBookingId?: string;
10
+ providerOrderId?: string;
11
+ providerData?: any;
12
+ providerResponse?: any;
13
+ errorMessage?: string;
14
+ expiresAt?: string;
15
+ orderAmount?: number;
16
+ userId?: number;
17
+ tenantId?: number;
18
+ customerInfo?: any;
19
+ deliveryInfo?: any;
20
+ dataPackage?: any;
21
+ createdAt: string;
22
+ updatedAt: string;
23
+ deletedAt?: string;
24
+ transaction?: {
25
+ id: number;
26
+ publicId: string;
27
+ groupPublicId: string;
28
+ type: string;
29
+ status: string;
30
+ createdAt: string;
31
+ updatedAt: string;
32
+ };
33
+ user?: {
34
+ id: number;
35
+ firstName: string;
36
+ lastName: string;
37
+ email: string;
38
+ phone: string;
39
+ };
40
+ tenant?: {
41
+ id: number;
42
+ name: string;
43
+ shortName: string;
44
+ };
45
+ }
46
+ export interface GetSimTransactionListRespDto {
47
+ transactions: ISimTransaction[];
48
+ total: number;
49
+ }
50
+ export interface GetSimTransactionListReqDto {
51
+ page?: number;
52
+ limit?: number;
53
+ status?: string;
54
+ provider?: string;
55
+ simType?: string;
56
+ type?: string;
57
+ msisdn?: string;
58
+ publicId?: string;
59
+ groupPublicId?: string;
60
+ userId?: number;
61
+ tenantId?: number;
62
+ startDate?: string;
63
+ endDate?: string;
64
+ }
@@ -0,0 +1,21 @@
1
+ export declare enum ESIMType {
2
+ PREPAID = "prepaid",
3
+ POSTPAID = "postpaid"
4
+ }
5
+ export interface ISIMCard {
6
+ id: number;
7
+ msisdn: string;
8
+ type: ESIMType;
9
+ providerData: any;
10
+ isSelected: boolean;
11
+ }
12
+ export interface ISIMSearchFilters {
13
+ textSearch: string[];
14
+ type: ESIMType | null;
15
+ limit: number;
16
+ }
17
+ export interface ISIMSearchResponse {
18
+ sims: ISIMCard[];
19
+ total: number;
20
+ selectedCount: number;
21
+ }
@@ -0,0 +1,2 @@
1
+ export declare const formatPhoneNumberForDisplay: (phoneNumber: string) => string;
2
+ export declare const isVietnamesePhoneNumber: (phoneNumber: string) => boolean;
@@ -0,0 +1,9 @@
1
+ import { EOrderType } from '../hooks/useSimTransactionGrouped';
2
+ export declare const getSimTypeDisplay: (simType?: string) => string;
3
+ export declare const getSimPaymentTypeDisplay: (paymentType?: string) => string;
4
+ export declare const getSimTransactionTypeDisplay: (type?: EOrderType) => string;
5
+ export declare const getSimProviderDisplay: (provider?: string) => string;
6
+ export declare const getSimStatusDisplay: (status?: string) => {
7
+ text: string;
8
+ color: string;
9
+ };