gotrip-fx-transaction-form 1.0.57 → 1.0.58

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 (68) hide show
  1. package/index.js +39933 -27564
  2. package/package.json +1 -1
  3. package/types/components/AddDepartment/AddDepartmentForm.d.ts +2 -1
  4. package/types/components/AddTransaction/BankList.d.ts +15 -10
  5. package/types/components/AddTransaction/UploadingStatus.d.ts +6 -0
  6. package/types/components/AddTransaction/UseCaseSelection.d.ts +1 -15
  7. package/types/components/AddUser/AddMemberForm.d.ts +2 -1
  8. package/types/components/CountrySelector/CountrySelector.d.ts +5 -0
  9. package/types/components/Department/DepartmentCard.d.ts +4 -1
  10. package/types/components/DocumentUpload/DocumentUpload.d.ts +12 -0
  11. package/types/components/ESIM/ProductCard.d.ts +9 -0
  12. package/types/components/Menu/MenuItem.d.ts +7 -1
  13. package/types/components/Menu/ProfileInfo.d.ts +11 -0
  14. package/types/components/Modal/AddDepartmentMemberModal.d.ts +17 -0
  15. package/types/components/Modal/AddDepartmentModal.d.ts +16 -0
  16. package/types/components/Modal/AddMemberModal.d.ts +16 -0
  17. package/types/components/Modal/MemberDetailModel.d.ts +12 -0
  18. package/types/components/Modal/RejectTransactionModal.d.ts +9 -0
  19. package/types/components/Modal/UpdateCommissionPolicyModal.d.ts +9 -0
  20. package/types/components/OrganizationFlow/DepartmentNode.d.ts +21 -0
  21. package/types/components/OrganizationFlow/LayoutFlow.d.ts +44 -0
  22. package/types/components/OrganizationFlow/OrganizationLayoutFlow.d.ts +10 -0
  23. package/types/components/SortSelector/SortSelector.d.ts +14 -0
  24. package/types/components/TransactionDetail/BankBiddingList.d.ts +21 -0
  25. package/types/components/TransactionStatusBadge/TransactionStatusBadge.d.ts +1 -1
  26. package/types/constants/api-urls.d.ts +18 -1
  27. package/types/constants/business-codes.d.ts +2 -1
  28. package/types/constants/env.d.ts +13 -0
  29. package/types/hooks/transactions/useEducation.hook.d.ts +172 -123
  30. package/types/hooks/transactions/useGroupTransactions.d.ts +153 -0
  31. package/types/hooks/transactions/useGuestTransaction.d.ts +66 -0
  32. package/types/hooks/transactions/useImmigration.hook.d.ts +116 -75
  33. package/types/hooks/transactions/useTransferMoneyAbroadTransaction.d.ts +58 -0
  34. package/types/hooks/useBankList.d.ts +6 -0
  35. package/types/hooks/useComissionPolicies.d.ts +6 -0
  36. package/types/hooks/useCommissionCalculation.d.ts +13 -0
  37. package/types/hooks/useDepartmentList.d.ts +1 -0
  38. package/types/hooks/useESimList.d.ts +22 -0
  39. package/types/hooks/useGroupCustomers.d.ts +3 -3
  40. package/types/hooks/useHeaderMenu.d.ts +13 -0
  41. package/types/hooks/useOrganizationStructure.d.ts +9 -0
  42. package/types/hooks/useRequestCustomers.d.ts +1 -126
  43. package/types/hooks/useTransactionList.d.ts +0 -1
  44. package/types/hooks/useUseCases.d.ts +16 -0
  45. package/types/pages/admin/tenant-organization-flow/OrganizationFlow.d.ts +1 -0
  46. package/types/pages/agency/department-detail/AddDepartmentMember.d.ts +8 -0
  47. package/types/pages/agency/department-detail/DepartmentDetail.d.ts +1 -0
  48. package/types/pages/agency/department-list/AddDepartment.d.ts +5 -0
  49. package/types/pages/agency/department-list/DepartmentList.d.ts +2 -0
  50. package/types/pages/agency/esim-listing/ESIMListing.d.ts +6 -0
  51. package/types/pages/agency/organization-flow/OrganizationFlow.d.ts +1 -0
  52. package/types/pages/agency/transaction-detail/GroupTransactionDetail.d.ts +8 -0
  53. package/types/pages/agency/transaction-detail/TransactionDetail.d.ts +3 -0
  54. package/types/pages/agency/transaction-detail/TransferMoneyAbroadTransactionDetail.d.ts +6 -0
  55. package/types/pages/partner/add-member/AddMember.d.ts +1 -1
  56. package/types/pages/partner/department-detail/EditDepartmentModal.d.ts +33 -0
  57. package/types/pages/partner/organization-flow/OrganizationFlow.d.ts +1 -0
  58. package/types/pages/partner/transaction-detail/GroupTransactionDetail.d.ts +7 -0
  59. package/types/pages/partner/transaction-detail/SingularTransactionDetail.d.ts +6 -0
  60. package/types/pages/partner/transaction-detail/TransferMoneyAbroadTransactionDetail.d.ts +6 -0
  61. package/types/pages/partner/transaction-list/GroupTransactionList.d.ts +1 -2
  62. package/types/types/enum.d.ts +18 -1
  63. package/types/types/request.dto.d.ts +6 -0
  64. package/types/types/response.dto.d.ts +64 -1
  65. package/types/types/role.d.ts +5 -0
  66. package/types/types/user.d.ts +2 -1
  67. package/types/util/signed-url.util.d.ts +3 -0
  68. package/types/util/transaction.util.d.ts +1 -1
@@ -0,0 +1,3 @@
1
+ export declare const TransactionDetail: ({ showLayout }: {
2
+ showLayout?: boolean;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { ITransaction } from '../../../types/response.dto';
2
+ type TransferMoneyAbroadTransactionDetailProps = {
3
+ transaction: ITransaction;
4
+ };
5
+ export declare const TransferMoneyAbroadTransactionDetail: ({ transaction, }: TransferMoneyAbroadTransactionDetailProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,5 +1,5 @@
1
1
  type AddMemberProps = {
2
2
  onSubmitSuccess: () => void;
3
3
  };
4
- export declare const AddMember: (props: AddMemberProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const AddMember: ({ onSubmitSuccess }: AddMemberProps) => import("react/jsx-runtime").JSX.Element;
5
5
  export {};
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ declare const editDepartmentSchema: z.ZodObject<{
3
+ name: z.ZodString;
4
+ address: z.ZodOptional<z.ZodString>;
5
+ transferName: z.ZodOptional<z.ZodString>;
6
+ transferNumber: z.ZodOptional<z.ZodString>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ name: string;
9
+ address?: string | undefined;
10
+ transferName?: string | undefined;
11
+ transferNumber?: string | undefined;
12
+ }, {
13
+ name: string;
14
+ address?: string | undefined;
15
+ transferName?: string | undefined;
16
+ transferNumber?: string | undefined;
17
+ }>;
18
+ type EditDepartmentFormData = z.infer<typeof editDepartmentSchema>;
19
+ interface EditDepartmentModalProps {
20
+ isOpen: boolean;
21
+ onClose: () => void;
22
+ onSubmit: (data: EditDepartmentFormData) => Promise<void>;
23
+ initialData?: {
24
+ name: string;
25
+ address: string;
26
+ transferName?: string;
27
+ transferNumber?: string;
28
+ };
29
+ isBankTenant: boolean;
30
+ departmentDisplay: string;
31
+ }
32
+ export declare const EditDepartmentModal: ({ isOpen, onClose, onSubmit, initialData, isBankTenant, departmentDisplay, }: EditDepartmentModalProps) => import("react/jsx-runtime").JSX.Element;
33
+ export {};
@@ -0,0 +1 @@
1
+ export declare const OrganizationFlow: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { ITransaction } from '../../../types/response.dto';
2
+ type GroupTransactionDetailProps = {
3
+ transactions: ITransaction[];
4
+ onTransactionsUpdate?: () => void;
5
+ };
6
+ export declare const GroupTransactionDetail: ({ transactions, onTransactionsUpdate, }: GroupTransactionDetailProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ITransaction } from '../../../types/response.dto';
2
+ type GuestTransactionDetailProps = {
3
+ transaction: ITransaction;
4
+ };
5
+ export declare const SingularTransactionDetail: ({ transaction }: GuestTransactionDetailProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ITransaction } from '../../../types/response.dto';
2
+ type TransferMoneyAbroadTransactionDetailProps = {
3
+ transaction: ITransaction;
4
+ };
5
+ export declare const TransferMoneyAbroadTransactionDetail: ({ transaction, }: TransferMoneyAbroadTransactionDetailProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,7 +1,6 @@
1
1
  type Props = {
2
- showLayout?: boolean;
3
2
  hideAddButton?: boolean;
4
3
  defaultLimit?: number;
5
4
  };
6
- export declare const GroupTransactionList: ({ showLayout, defaultLimit }: Props) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const GroupTransactionList: ({ defaultLimit }: Props) => import("react/jsx-runtime").JSX.Element;
7
6
  export {};
@@ -1,9 +1,9 @@
1
1
  export declare enum TransactionStatus {
2
2
  CREATED = "created",
3
3
  PENDING_ADMIN_CHECK_INFO = "pending_admin_check_info",
4
- PENDING_APPROVAL = "pending_approval",
5
4
  BANK_APPROVED = "bank_approved",
6
5
  BANK_REJECTED = "bank_rejected",
6
+ PENDING_BIDDING = "pending_bidding",
7
7
  SENT_TO_BANK = "sent_to_bank",
8
8
  SENT_CONFIRMATION = "sent_confirmation_to_customer",
9
9
  CONFIRMED = "confirmed",// customer confirmed transaction request via zns
@@ -22,3 +22,20 @@ export declare enum ETenantType {
22
22
  TRAVEL_AGENCY = "travel_agency",
23
23
  STANDALONE_BOOKER = "standalone_booker"
24
24
  }
25
+ export declare enum EUseCaseses {
26
+ TRAVEL = "TRAVEL",// khách lẻ
27
+ TRAVEL_GROUP = "TRAVEL_GROUP",// khách đoàn
28
+ EDUCATION = "EDUCATION",
29
+ MEDICAL = "MEDICAL",
30
+ INHERITANCE = "INHERITANCE",
31
+ SUBSIDY = "SUBSIDY",
32
+ IMMIGRATION = "IMMIGRATION",
33
+ BUSINESS = "BUSINESS"
34
+ }
35
+ export declare enum ECommissionPolicyType {
36
+ FX = "FX"
37
+ }
38
+ export declare enum ECommissionPolicyCalculationType {
39
+ FIXED = "FIXED_AMOUNT",
40
+ PERCENT = "PERCENT"
41
+ }
@@ -16,3 +16,9 @@ export type GetTransactionListReqDto = {
16
16
  currencyCode?: string;
17
17
  groupPublicId?: string;
18
18
  };
19
+ export type GetESimPackageListReqDto = {
20
+ page?: number;
21
+ limit?: number;
22
+ sort?: string[];
23
+ columnFilters?: Record<string, any>;
24
+ };
@@ -1,8 +1,9 @@
1
- import { ETenantType, TransactionStatus } from './enum';
1
+ import { ECommissionPolicyCalculationType, ECommissionPolicyType, ETenantType, EUseCaseses, TransactionStatus } from './enum';
2
2
  import { EPermissionKey, EUserRole, EUserStatus } from './user';
3
3
  export type LoginRespDto = {
4
4
  accessToken: string;
5
5
  user: {
6
+ id: number;
6
7
  email: string;
7
8
  firstName?: string;
8
9
  lastName?: string;
@@ -38,14 +39,18 @@ export declare enum ETransactionType {
38
39
  TRAVEL = "TRAVEL",
39
40
  TRAVEL_GROUP = "TRAVEL_GROUP",
40
41
  STUDY = "STUDY",
42
+ EDUCATION = "EDUCATION",
41
43
  BUSINESS = "BUSINESS",
42
44
  IMMIGRATION = "IMMIGRATION"
43
45
  }
44
46
  export type ITransaction = {
45
47
  id: number;
48
+ fxTransactionId?: number;
46
49
  publicId: string;
47
50
  amount: number;
48
51
  comission: number;
52
+ exchangeRate: number;
53
+ receiptCreatedAt?: Date;
49
54
  status: TransactionStatus;
50
55
  exchangeCurrencyCode: string;
51
56
  bankCode: string;
@@ -66,17 +71,46 @@ export type ITransaction = {
66
71
  user?: IUser;
67
72
  agent?: IUser;
68
73
  totalSubTransaction?: number;
74
+ totalApprovedTransaction?: number;
75
+ totalRejectedTransaction?: number;
69
76
  groupPublicId?: string;
70
77
  documents: any[];
71
78
  bankDepartment?: IDepartment;
72
79
  cancelReason?: string;
73
80
  bankResponseLog?: Record<string, any>;
81
+ bids?: IBid[];
74
82
  };
83
+ export interface IBankWorkingHours {
84
+ workdays: {
85
+ from: string;
86
+ to: string;
87
+ };
88
+ saturday: {
89
+ from: string;
90
+ to: string;
91
+ };
92
+ sunday: {
93
+ from: string;
94
+ to: string;
95
+ };
96
+ }
97
+ export interface ITravelAgencyTenantSettings {
98
+ [key: string]: any;
99
+ }
100
+ export interface IBankTenantSettings {
101
+ availableCurrencies: string[];
102
+ useCases: EUseCaseses[];
103
+ availableAPI: {
104
+ [key in EUseCaseses]: boolean;
105
+ };
106
+ workingTime: IBankWorkingHours;
107
+ }
75
108
  export type ITenant = {
76
109
  id: number;
77
110
  shortName: string;
78
111
  name: string;
79
112
  type: ETenantType;
113
+ settings: IBankTenantSettings | ITravelAgencyTenantSettings;
80
114
  };
81
115
  export type GetTransactionListRespDto = {
82
116
  transactions: ITransaction[];
@@ -135,6 +169,7 @@ export type IDepartment = {
135
169
  name: string;
136
170
  parentId?: number;
137
171
  address: string;
172
+ users?: IUser[];
138
173
  };
139
174
  export type IRole = {
140
175
  id: number;
@@ -164,6 +199,7 @@ export type IUser = {
164
199
  };
165
200
  export type IBid = {
166
201
  id: number;
202
+ bankShortName: string;
167
203
  status: EBidStatus;
168
204
  price: number;
169
205
  total: number;
@@ -203,4 +239,31 @@ export type IPermission = {
203
239
  description: string;
204
240
  globalPermission: IGlobalPermission;
205
241
  };
242
+ export interface ICommissionPolicy {
243
+ currencyCode?: string;
244
+ userId?: number;
245
+ tenantId?: number;
246
+ bankId?: number;
247
+ departmentId?: number;
248
+ type: ECommissionPolicyType;
249
+ directType: ECommissionPolicyCalculationType;
250
+ viaRefType: ECommissionPolicyCalculationType;
251
+ indirectType: ECommissionPolicyCalculationType;
252
+ byFixedAmountDirect?: number;
253
+ byPercentDirect?: number;
254
+ byFixedAmountViaRef?: number;
255
+ byPercentViaRef?: number;
256
+ byFixedAmountIndirect?: number;
257
+ byPercentIndirect?: number;
258
+ createdBy?: string;
259
+ updatedBy?: string;
260
+ }
261
+ export type ESimPackage = {
262
+ planId: number;
263
+ name: string;
264
+ data: string;
265
+ validity: string;
266
+ countries: string[];
267
+ price: number;
268
+ };
206
269
  export {};
@@ -0,0 +1,5 @@
1
+ export declare enum EPredefineRole {
2
+ PARTNER_ADMIN = "partner_admin",
3
+ DEPARTMENT_ADMIN = "department_admin",
4
+ MEMBER = "member"
5
+ }
@@ -43,5 +43,6 @@ export declare enum EPermissionKey {
43
43
  TRANSACTION_BID = "TRANSACTION_BID",
44
44
  VIEW_REPORT = "VIEW_REPORT",
45
45
  ADMIN = "ADMIN",
46
- PARTNER_ADMIN = "PARTNER_ADMIN"
46
+ PARTNER_ADMIN = "PARTNER_ADMIN",
47
+ VIEW_ORGANIZATION_STRUCTURE = "VIEW_ORGANIZATION_STRUCTURE"
47
48
  }
@@ -0,0 +1,3 @@
1
+ import { SignedUrl } from '../types/response.dto';
2
+ export declare const generateUploadSignedUrl: (filePath: string, fileType: string) => Promise<SignedUrl>;
3
+ export declare const uploadFileToGCS: (signedUrl: SignedUrl, file: File, fileType: string) => Promise<any>;
@@ -1,2 +1,2 @@
1
1
  import { ETransactionType } from '../types/response.dto';
2
- export declare const getTransactionType: (type: ETransactionType) => "Du học" | "Du lịch" | "Du lịch (Nhóm)" | "Kinh doanh" | "Di trú";
2
+ export declare const getTransactionType: (type: ETransactionType) => "Du học" | ETransactionType.STUDY | "Du lịch" | "Du lịch (Nhóm)" | "Kinh doanh" | "Di trú";