@tap-payments/auth-jsconnect 2.1.23-test → 2.1.25-test

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 (167) hide show
  1. package/build/@types/app.d.ts +48 -1
  2. package/build/@types/app.js +12 -0
  3. package/build/@types/form.d.ts +24 -8
  4. package/build/api/axios.js +2 -2
  5. package/build/api/data.d.ts +8 -0
  6. package/build/api/data.js +16 -0
  7. package/build/api/entity.d.ts +28 -1
  8. package/build/api/entity.js +26 -1
  9. package/build/api/index.d.ts +13 -3
  10. package/build/api/index.js +2 -2
  11. package/build/api/individual.d.ts +4 -0
  12. package/build/api/location.d.ts +5 -0
  13. package/build/api/location.js +19 -0
  14. package/build/app/rootReducer.d.ts +1 -0
  15. package/build/app/rootReducer.js +3 -1
  16. package/build/app/settings.js +1 -1
  17. package/build/app/store.d.ts +2 -0
  18. package/build/assets/locales/ar.json +21 -1
  19. package/build/assets/locales/en.json +21 -1
  20. package/build/components/SimpleList/SimpleList.d.ts +2 -1
  21. package/build/components/SimpleList/SimpleList.js +22 -10
  22. package/build/constants/api.d.ts +3 -0
  23. package/build/constants/api.js +7 -1
  24. package/build/constants/app.d.ts +7 -1
  25. package/build/constants/app.js +51 -8
  26. package/build/constants/validation.d.ts +1 -0
  27. package/build/constants/validation.js +1 -0
  28. package/build/features/app/brand/brandStore.d.ts +97 -0
  29. package/build/features/app/brand/brandStore.js +618 -0
  30. package/build/features/app/entity/entityStore.d.ts +11 -23
  31. package/build/features/app/entity/entityStore.js +212 -295
  32. package/build/features/bank/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +3 -2
  33. package/build/features/brand/Brand.d.ts +7 -0
  34. package/build/features/brand/Brand.js +69 -0
  35. package/build/features/brand/index.d.ts +1 -0
  36. package/build/features/brand/index.js +1 -0
  37. package/build/features/{entity/screens/Customers/CustomerLocations.d.ts → brand/screens/BrandActivities/ActivitiesList.d.ts} +34 -61
  38. package/build/features/{entity/screens/EntityInfoConfirm → brand/screens/BrandActivities}/ActivitiesList.js +59 -40
  39. package/build/features/brand/screens/BrandActivities/BrandActivities.d.ts +5 -0
  40. package/build/features/brand/screens/BrandActivities/BrandActivities.js +72 -0
  41. package/build/features/brand/screens/BrandActivities/CustomerBase.d.ts +82 -0
  42. package/build/features/{entity/screens/Customers/CustomerLocations.js → brand/screens/BrandActivities/CustomerBase.js} +8 -35
  43. package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/ExpectedCustomers.d.ts +0 -0
  44. package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/ExpectedCustomers.js +6 -6
  45. package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/ExpectedSalesRange.d.ts +0 -0
  46. package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/ExpectedSalesRange.js +6 -6
  47. package/build/features/brand/screens/BrandActivities/OperationStartDate.d.ts +20 -0
  48. package/build/features/brand/screens/BrandActivities/OperationStartDate.js +45 -0
  49. package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/RefundPolicy.d.ts +0 -0
  50. package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/RefundPolicy.js +2 -2
  51. package/build/features/brand/screens/BrandActivities/TAC.d.ts +6 -0
  52. package/build/features/brand/screens/BrandActivities/TAC.js +87 -0
  53. package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/TransactionPolicy.d.ts +0 -0
  54. package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/TransactionPolicy.js +0 -0
  55. package/build/features/brand/screens/BrandActivities/index.d.ts +2 -0
  56. package/build/features/brand/screens/BrandActivities/index.js +2 -0
  57. package/build/features/brand/screens/BrandActivities/validation.d.ts +71 -0
  58. package/build/features/{entity/screens/Customers → brand/screens/BrandActivities}/validation.js +9 -1
  59. package/build/features/brand/screens/BrandInfo/BrandInfo.d.ts +5 -0
  60. package/build/features/brand/screens/BrandInfo/BrandInfo.js +72 -0
  61. package/build/features/brand/screens/BrandInfo/BrandName.d.ts +8 -0
  62. package/build/features/brand/screens/BrandInfo/BrandName.js +142 -0
  63. package/build/features/brand/screens/BrandInfo/SalesChannels.d.ts +5 -0
  64. package/build/features/brand/screens/BrandInfo/SalesChannels.js +30 -0
  65. package/build/features/brand/screens/BrandInfo/Segments.d.ts +8 -0
  66. package/build/features/brand/screens/BrandInfo/Segments.js +83 -0
  67. package/build/features/brand/screens/BrandInfo/TeamSize.d.ts +8 -0
  68. package/build/features/brand/screens/BrandInfo/TeamSize.js +83 -0
  69. package/build/features/brand/screens/BrandInfo/index.d.ts +2 -0
  70. package/build/features/brand/screens/BrandInfo/index.js +2 -0
  71. package/build/features/brand/screens/BrandInfo/validation.d.ts +41 -0
  72. package/build/features/brand/screens/BrandInfo/validation.js +106 -0
  73. package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  74. package/build/features/brand/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
  75. package/build/features/brand/screens/ResetPasswordSuccess/index.d.ts +3 -0
  76. package/build/features/brand/screens/ResetPasswordSuccess/index.js +2 -0
  77. package/build/features/brand/screens/Success/Success.d.ts +5 -0
  78. package/build/features/brand/screens/Success/Success.js +20 -0
  79. package/build/features/brand/screens/Success/index.d.ts +3 -0
  80. package/build/features/brand/screens/Success/index.js +2 -0
  81. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  82. package/build/features/brand/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +117 -0
  83. package/build/features/brand/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  84. package/build/features/brand/screens/SuccessWithFlowButtons/index.js +2 -0
  85. package/build/features/brand/screens/Verify/OTPInput.d.ts +7 -0
  86. package/build/features/brand/screens/Verify/OTPInput.js +47 -0
  87. package/build/features/brand/screens/Verify/Verify.d.ts +5 -0
  88. package/build/features/brand/screens/Verify/Verify.js +91 -0
  89. package/build/features/brand/screens/Verify/index.d.ts +2 -0
  90. package/build/features/brand/screens/Verify/index.js +2 -0
  91. package/build/features/brand/screens/Verify/validation.d.ts +8 -0
  92. package/build/features/brand/screens/Verify/validation.js +4 -0
  93. package/build/features/business/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +4 -2
  94. package/build/features/connect/screens/Merchant/validation.js +2 -2
  95. package/build/features/entity/screens/EntityCapital/ActivityList.d.ts +90 -0
  96. package/build/features/entity/screens/EntityCapital/ActivityList.js +178 -0
  97. package/build/features/entity/screens/EntityCapital/CapitalPaid.d.ts +5 -0
  98. package/build/features/entity/screens/EntityCapital/CapitalPaid.js +47 -0
  99. package/build/features/entity/screens/EntityCapital/CapitalShareCount.d.ts +5 -0
  100. package/build/features/entity/screens/EntityCapital/CapitalShareCount.js +42 -0
  101. package/build/features/entity/screens/EntityCapital/CapitalShareValue.d.ts +5 -0
  102. package/build/features/entity/screens/EntityCapital/CapitalShareValue.js +47 -0
  103. package/build/features/entity/screens/EntityCapital/EntityCapital.d.ts +5 -0
  104. package/build/features/entity/screens/EntityCapital/EntityCapital.js +75 -0
  105. package/build/features/entity/screens/EntityCapital/index.d.ts +2 -0
  106. package/build/features/entity/screens/EntityCapital/index.js +2 -0
  107. package/build/features/entity/screens/EntityCapital/validation.d.ts +62 -0
  108. package/build/features/entity/screens/EntityCapital/validation.js +25 -0
  109. package/build/features/entity/screens/EntityName/EntityName.d.ts +5 -0
  110. package/build/features/entity/screens/EntityName/EntityName.js +87 -0
  111. package/build/features/entity/screens/EntityName/EntityTypeList.d.ts +90 -0
  112. package/build/features/entity/screens/EntityName/EntityTypeList.js +151 -0
  113. package/build/features/entity/screens/EntityName/ExpiryDate.d.ts +19 -0
  114. package/build/features/entity/screens/EntityName/ExpiryDate.js +46 -0
  115. package/build/features/entity/screens/EntityName/IssuingDate.d.ts +19 -0
  116. package/build/features/entity/screens/EntityName/IssuingDate.js +46 -0
  117. package/build/features/entity/screens/EntityName/LegalName.d.ts +5 -0
  118. package/build/features/entity/screens/EntityName/LegalName.js +48 -0
  119. package/build/features/entity/screens/{EntityInfoConfirm → EntityName}/LicenseNumber.d.ts +0 -0
  120. package/build/features/entity/screens/{EntityInfoConfirm → EntityName}/LicenseNumber.js +12 -18
  121. package/build/features/entity/screens/EntityName/UnifiedNumber.d.ts +6 -0
  122. package/build/features/entity/screens/EntityName/UnifiedNumber.js +43 -0
  123. package/build/features/entity/screens/EntityName/index.d.ts +2 -0
  124. package/build/features/entity/screens/EntityName/index.js +2 -0
  125. package/build/features/entity/screens/EntityName/validation.d.ts +48 -0
  126. package/build/features/entity/screens/EntityName/validation.js +112 -0
  127. package/build/features/featuresScreens.d.ts +1 -0
  128. package/build/features/featuresScreens.js +35 -6
  129. package/build/features/individual/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +4 -2
  130. package/build/features/password/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +4 -2
  131. package/build/features/shared/AcceptancePayouts/AcceptancePayouts.js +1 -1
  132. package/build/features/shared/Address/Address.d.ts +11 -0
  133. package/build/features/shared/Address/Address.js +63 -0
  134. package/build/features/shared/Address/CountryList.d.ts +72 -0
  135. package/build/features/shared/Address/CountryList.js +89 -0
  136. package/build/features/{entity/screens/EntityInfoConfirm/ActivitiesList.d.ts → shared/Address/InputSelect.d.ts} +27 -11
  137. package/build/features/shared/Address/InputSelect.js +172 -0
  138. package/build/features/shared/Address/InputText.d.ts +11 -0
  139. package/build/features/shared/Address/InputText.js +12 -0
  140. package/build/features/shared/Address/index.d.ts +2 -0
  141. package/build/features/shared/Address/index.js +2 -0
  142. package/build/features/shared/Input/Input.d.ts +7 -5
  143. package/build/features/shared/Input/Input.js +2 -2
  144. package/build/features/tax/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +4 -2
  145. package/build/hooks/useAppDispatch.d.ts +1 -0
  146. package/build/index.d.ts +3 -2
  147. package/build/index.js +4 -1
  148. package/package.json +1 -1
  149. package/build/api/ip.d.ts +0 -4
  150. package/build/api/ip.js +0 -12
  151. package/build/features/entity/screens/Customers/Customers.d.ts +0 -5
  152. package/build/features/entity/screens/Customers/Customers.js +0 -90
  153. package/build/features/entity/screens/Customers/index.d.ts +0 -3
  154. package/build/features/entity/screens/Customers/index.js +0 -2
  155. package/build/features/entity/screens/Customers/validation.d.ts +0 -20
  156. package/build/features/entity/screens/EntityInfoConfirm/Article.d.ts +0 -3
  157. package/build/features/entity/screens/EntityInfoConfirm/Article.js +0 -76
  158. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +0 -5
  159. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +0 -84
  160. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +0 -5
  161. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +0 -32
  162. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +0 -6
  163. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +0 -33
  164. package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +0 -2
  165. package/build/features/entity/screens/EntityInfoConfirm/index.js +0 -2
  166. package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +0 -141
  167. package/build/features/entity/screens/EntityInfoConfirm/validation.js +0 -83
@@ -124,12 +124,27 @@ export interface Occupation {
124
124
  en: string;
125
125
  };
126
126
  }
127
+ export interface TeamSize {
128
+ id: string;
129
+ name: {
130
+ ar: string;
131
+ en: string;
132
+ };
133
+ }
127
134
  export interface MonthlyIncome extends SourceOfIncome {
128
135
  range: {
129
136
  ar: string;
130
137
  en: string;
131
138
  };
132
139
  }
140
+ export interface Segment {
141
+ id: string;
142
+ code: string;
143
+ name: {
144
+ ar: string;
145
+ en: string;
146
+ };
147
+ }
133
148
  export interface AppInfo {
134
149
  name: string;
135
150
  identifier?: string;
@@ -221,7 +236,8 @@ export declare enum FlowsTypes {
221
236
  TAX = "tax",
222
237
  ENTITY = "entity",
223
238
  OTP = "otp",
224
- AUTH = "auth"
239
+ AUTH = "auth",
240
+ BRAND = "brand"
225
241
  }
226
242
  export declare type FlowInfo = {
227
243
  name: string;
@@ -233,4 +249,35 @@ export declare enum AuthForType {
233
249
  EMAIL = "email",
234
250
  NATIONAL_ID = "national_id"
235
251
  }
252
+ export declare enum AddressFormateType {
253
+ SELECT = "select",
254
+ NUMBER = "number",
255
+ TEXT = "text"
256
+ }
257
+ export declare type AddressFormat = {
258
+ code: string;
259
+ name: {
260
+ ar: string;
261
+ en: string;
262
+ };
263
+ required: boolean;
264
+ retrieve_uri?: string;
265
+ sort: number;
266
+ type: AddressFormateType;
267
+ };
268
+ export declare type AddressType = {
269
+ code: string;
270
+ name: {
271
+ ar: string;
272
+ en: string;
273
+ };
274
+ };
275
+ export declare type AddressProps = {
276
+ format: AddressFormat[];
277
+ type: AddressType;
278
+ };
279
+ export declare enum FieldType {
280
+ EDITABLE = "editable",
281
+ NON_EDITABLE = "noneditable"
282
+ }
236
283
  export {};
@@ -26,6 +26,7 @@ export var FlowsTypes;
26
26
  FlowsTypes["ENTITY"] = "entity";
27
27
  FlowsTypes["OTP"] = "otp";
28
28
  FlowsTypes["AUTH"] = "auth";
29
+ FlowsTypes["BRAND"] = "brand";
29
30
  })(FlowsTypes || (FlowsTypes = {}));
30
31
  export var AuthForType;
31
32
  (function (AuthForType) {
@@ -33,3 +34,14 @@ export var AuthForType;
33
34
  AuthForType["EMAIL"] = "email";
34
35
  AuthForType["NATIONAL_ID"] = "national_id";
35
36
  })(AuthForType || (AuthForType = {}));
37
+ export var AddressFormateType;
38
+ (function (AddressFormateType) {
39
+ AddressFormateType["SELECT"] = "select";
40
+ AddressFormateType["NUMBER"] = "number";
41
+ AddressFormateType["TEXT"] = "text";
42
+ })(AddressFormateType || (AddressFormateType = {}));
43
+ export var FieldType;
44
+ (function (FieldType) {
45
+ FieldType["EDITABLE"] = "editable";
46
+ FieldType["NON_EDITABLE"] = "noneditable";
47
+ })(FieldType || (FieldType = {}));
@@ -1,4 +1,4 @@
1
- import { Activity, BrandInfo, CountryCode, CustomerLocation, ExpectedCustomer, ExpectedSaleRange, License, MonthlyIncome, Occupation, SaleChannel, SourceOfIncome } from './app';
1
+ import { Activity, BrandInfo, CountryCode, CustomerLocation, ExpectedCustomer, ExpectedSaleRange, License, MonthlyIncome, Occupation, SaleChannel, Segment, SourceOfIncome, TeamSize } from './app';
2
2
  export declare type MobileFormValues = {
3
3
  mobile: string | null;
4
4
  countryCode: CountryCode;
@@ -32,10 +32,21 @@ export declare type IndividualFormValues = {
32
32
  };
33
33
  export declare type BrandFormValues = {
34
34
  brandName: string;
35
+ segment?: Segment | undefined;
36
+ teamSize?: TeamSize | undefined;
35
37
  salesChannels: Array<SaleChannel>;
36
- termAndConditionChecked: boolean;
38
+ termAndConditionChecked?: boolean;
37
39
  selectedBrandItem: BrandInfo;
38
40
  };
41
+ export declare type BrandActivitiesFormValues = {
42
+ activities: Array<Activity>;
43
+ customerLocations: Array<CustomerLocation>;
44
+ expectedCustomer: ExpectedCustomer | undefined;
45
+ expectedSale: ExpectedSaleRange | undefined;
46
+ termAndConditionChecked: boolean;
47
+ refundPolicy: boolean;
48
+ transactionPolicy: boolean;
49
+ };
39
50
  export declare type BusinessTypeFormValues = {
40
51
  licenseNumber: string;
41
52
  entityLegalName?: string;
@@ -82,13 +93,18 @@ export declare type PasswordCreateFormValues = {
82
93
  password: string;
83
94
  confirmPassword: string;
84
95
  };
85
- export declare type EntityFormValues = {
96
+ export declare type EntityNameFormValues = {
97
+ legalName: string;
86
98
  licenseNumber: string;
87
- licenseName: string;
88
99
  licenseType: string;
100
+ entityType: string;
101
+ issuingDate: string;
102
+ expiryDate: string;
103
+ unifiedNumber: string;
104
+ };
105
+ export declare type EntityCapitalFormValues = {
89
106
  activities: Array<Activity>;
90
- operationStartDate: string;
91
- uploading?: boolean;
92
- articleId?: string;
93
- articleFile?: File;
107
+ capitalPaid: string;
108
+ capitalShareCount: string;
109
+ capitalShareValue: string;
94
110
  };
@@ -91,8 +91,8 @@ export var httpClient = function (config) { return __awaiter(void 0, void 0, voi
91
91
  case 1:
92
92
  data = (_c.sent()).data;
93
93
  _a = (data.errors || [{}])[0], description = _a.description, error = _a.error;
94
- if (description || error || (data === null || data === void 0 ? void 0 : data.status) === 'fail') {
95
- throw new Error(description || error || (data === null || data === void 0 ? void 0 : data.message));
94
+ if (description || error || (data === null || data === void 0 ? void 0 : data.status) === 'fail' || data.mw_error) {
95
+ throw new Error(description || error || (data === null || data === void 0 ? void 0 : data.message) || data.mw_error || 'Internal server error');
96
96
  }
97
97
  return [2, data];
98
98
  case 2:
@@ -2,6 +2,12 @@ import { AxiosRequestConfig } from 'axios';
2
2
  declare type GetOccupationBody = {
3
3
  page: number;
4
4
  };
5
+ declare type GetSegmentsBody = {
6
+ page: number;
7
+ };
8
+ declare type GetTeamSizeBody = {
9
+ page: number;
10
+ };
5
11
  declare type GetMonthlyIncomeBody = {
6
12
  page: number;
7
13
  country_code: Array<string>;
@@ -36,6 +42,8 @@ declare const dataService: {
36
42
  getSourceOfIncome: (data: GetSourceOfIncomeBody) => Promise<any>;
37
43
  getMonthlyIncome: (data: GetMonthlyIncomeBody) => Promise<any>;
38
44
  getOccupation: (data: GetOccupationBody) => Promise<any>;
45
+ getSegments: (data: GetSegmentsBody) => Promise<any>;
46
+ getTeamSize: (data: GetTeamSizeBody) => Promise<any>;
39
47
  getActivities: (config?: AxiosRequestConfig) => Promise<any>;
40
48
  };
41
49
  export { dataService };
package/build/api/data.js CHANGED
@@ -63,6 +63,20 @@ var getOccupation = function (data) {
63
63
  var getActivities = function (config) {
64
64
  return httpClient(__assign({ method: 'post', url: "".concat(ENDPOINT_PATHS.RETRIEVE_ACTIVITIES_LIST_PATH) }, config));
65
65
  };
66
+ var getSegments = function (data) {
67
+ return httpClient({
68
+ method: 'post',
69
+ url: "".concat(ENDPOINT_PATHS.SEGMENTS_PATH),
70
+ data: data
71
+ });
72
+ };
73
+ var getTeamSize = function (data) {
74
+ return httpClient({
75
+ method: 'post',
76
+ url: "".concat(ENDPOINT_PATHS.TEAM_SIZE_PATH),
77
+ data: data
78
+ });
79
+ };
66
80
  var dataService = {
67
81
  getChannelsOfServices: getChannelsOfServices,
68
82
  getCustomerBases: getCustomerBases,
@@ -71,6 +85,8 @@ var dataService = {
71
85
  getSourceOfIncome: getSourceOfIncome,
72
86
  getMonthlyIncome: getMonthlyIncome,
73
87
  getOccupation: getOccupation,
88
+ getSegments: getSegments,
89
+ getTeamSize: getTeamSize,
74
90
  getActivities: getActivities
75
91
  };
76
92
  export { dataService };
@@ -62,7 +62,7 @@ export declare type UpdateEntityBody = {
62
62
  additional_info?: {
63
63
  unified_number: string;
64
64
  };
65
- issuing_date?: number;
65
+ issuing_date?: string;
66
66
  expiry_date?: string;
67
67
  };
68
68
  activities?: Array<{
@@ -73,9 +73,33 @@ export declare type UpdateEntityBody = {
73
73
  ar: string;
74
74
  en: string;
75
75
  };
76
+ type?: string;
76
77
  AOA_file_id?: string;
78
+ capital?: {
79
+ paid: string;
80
+ shares: {
81
+ count: string;
82
+ value: string;
83
+ };
84
+ };
77
85
  encryption_contract?: Array<string>;
78
86
  };
87
+ export declare type UpdateEntityActivityBody = {
88
+ id: string;
89
+ activities?: Array<{
90
+ id: string;
91
+ }>;
92
+ };
93
+ export declare type UpdateEntityCapitalBody = {
94
+ id: string;
95
+ capital: {
96
+ paid: string;
97
+ shares: {
98
+ count: string;
99
+ value: string;
100
+ };
101
+ };
102
+ };
79
103
  export declare type DocumentInfo = {
80
104
  type?: string;
81
105
  number?: string;
@@ -99,5 +123,8 @@ declare const entityService: {
99
123
  updateDocumentInfo: (data: DocumentUpdateBody) => Promise<any>;
100
124
  retrieveEntity: (entity_id: string) => Promise<any>;
101
125
  updateEntity: ({ id, ...data }: UpdateEntityBody) => Promise<any>;
126
+ updateEntityActivity: ({ id, ...data }: UpdateEntityActivityBody) => Promise<any>;
127
+ retrieveEntityType: () => Promise<any>;
128
+ updateEntityCapital: ({ id, ...data }: UpdateEntityCapitalBody) => Promise<any>;
102
129
  };
103
130
  export { entityService };
@@ -47,6 +47,22 @@ var updateEntity = function (_a) {
47
47
  data: data
48
48
  });
49
49
  };
50
+ var updateEntityActivity = function (_a) {
51
+ var id = _a.id, data = __rest(_a, ["id"]);
52
+ return httpClient({
53
+ method: 'put',
54
+ url: "".concat(ENDPOINT_PATHS.ENTITY, "/").concat(id, "/activities/add"),
55
+ data: data
56
+ });
57
+ };
58
+ var updateEntityCapital = function (_a) {
59
+ var id = _a.id, data = __rest(_a, ["id"]);
60
+ return httpClient({
61
+ method: 'put',
62
+ url: "".concat(ENDPOINT_PATHS.ENTITY, "/").concat(id, "/capital"),
63
+ data: data
64
+ });
65
+ };
50
66
  var createBankAccount = function (data, config) {
51
67
  return instance.put("".concat(ENDPOINT_PATHS.BANK), data, config);
52
68
  };
@@ -74,6 +90,12 @@ var updateDocumentInfo = function (data) {
74
90
  data: data
75
91
  });
76
92
  };
93
+ var retrieveEntityType = function () {
94
+ return httpClient({
95
+ method: 'get',
96
+ url: "".concat(ENDPOINT_PATHS.ENTITY, "/types")
97
+ });
98
+ };
77
99
  var entityService = {
78
100
  createEntityInfo: createEntityInfo,
79
101
  updateEntityInfo: updateEntityInfo,
@@ -84,6 +106,9 @@ var entityService = {
84
106
  uploadFileInfo: uploadFileInfo,
85
107
  updateDocumentInfo: updateDocumentInfo,
86
108
  retrieveEntity: retrieveEntity,
87
- updateEntity: updateEntity
109
+ updateEntity: updateEntity,
110
+ updateEntityActivity: updateEntityActivity,
111
+ retrieveEntityType: retrieveEntityType,
112
+ updateEntityCapital: updateEntityCapital
88
113
  };
89
114
  export { entityService };
@@ -3,14 +3,15 @@ import { ValidateOperatorBody } from './operator';
3
3
  import { CreateAuthBody, VerifyAuthBody, CreatePasswordBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, VerifyAuthKitOTPBody } from './auth';
4
4
  import { UpdateLeadBody, LeadVerifyBody, CreateLeadBody, LeadOTPVerifyBody, LeadIdentityUpdateBody } from './lead';
5
5
  import { CheckEmailBody, CheckBrandBody } from './availabilityServices';
6
- import { EntityInfoBody, EntityBankUpdateBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo } from './entity';
6
+ import { EntityInfoBody, EntityBankUpdateBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, UpdateEntityActivityBody, UpdateEntityCapitalBody } from './entity';
7
7
  import { CreateAccountBody } from './account';
8
8
  import { DataElementBody } from './data';
9
9
  import { BrandListBody, UpdateBrandBody, UpdateIndividualBody } from './individual';
10
10
  import { UpdateBoardBody } from './board';
11
11
  declare const API: {
12
- ipService: {
12
+ locationService: {
13
13
  getIP: () => Promise<any>;
14
+ getAddress: (countryCode: string) => Promise<any>;
14
15
  };
15
16
  operatorService: {
16
17
  validateOperator: (body: ValidateOperatorBody) => Promise<any>;
@@ -49,6 +50,9 @@ declare const API: {
49
50
  updateDocumentInfo: (data: DocumentUpdateBody) => Promise<any>;
50
51
  retrieveEntity: (entity_id: string) => Promise<any>;
51
52
  updateEntity: ({ id, ...data }: UpdateEntityBody) => Promise<any>;
53
+ updateEntityActivity: ({ id, ...data }: UpdateEntityActivityBody) => Promise<any>;
54
+ retrieveEntityType: () => Promise<any>;
55
+ updateEntityCapital: ({ id, ...data }: UpdateEntityCapitalBody) => Promise<any>;
52
56
  };
53
57
  availabilityServices: {
54
58
  checkEmail: (data: CheckEmailBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -84,6 +88,12 @@ declare const API: {
84
88
  getOccupation: (data: {
85
89
  page: number;
86
90
  }) => Promise<any>;
91
+ getSegments: (data: {
92
+ page: number;
93
+ }) => Promise<any>;
94
+ getTeamSize: (data: {
95
+ page: number;
96
+ }) => Promise<any>;
87
97
  getActivities: (config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
88
98
  };
89
99
  individualService: {
@@ -109,6 +119,6 @@ declare const API: {
109
119
  updateBrandSales: ({ id, ...data }: import("./individual").UpdateSalesChannels) => void;
110
120
  };
111
121
  };
112
- export type { ValidateOperatorBody, CreateAuthBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthKitOTPBody, UpdateIndividualBody };
122
+ export type { ValidateOperatorBody, CreateAuthBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthKitOTPBody, UpdateIndividualBody, UpdateEntityActivityBody, UpdateEntityCapitalBody };
113
123
  export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
114
124
  export default API;
@@ -1,5 +1,5 @@
1
1
  import axiosInstance, { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, getAxiosHeaders } from './axios';
2
- import { ipService } from './ip';
2
+ import { locationService } from './location';
3
3
  import { operatorService } from './operator';
4
4
  import { countryService } from './country';
5
5
  import { authService } from './auth';
@@ -14,7 +14,7 @@ import { boardService } from './board';
14
14
  import { userService } from './user';
15
15
  import { brandService } from './brand';
16
16
  var API = {
17
- ipService: ipService,
17
+ locationService: locationService,
18
18
  operatorService: operatorService,
19
19
  countryService: countryService,
20
20
  authService: authService,
@@ -51,6 +51,10 @@ export declare type UpdateBrandBody = {
51
51
  }>;
52
52
  };
53
53
  };
54
+ segment?: {
55
+ type: string;
56
+ team: string;
57
+ };
54
58
  term?: Array<string>;
55
59
  step_name?: string;
56
60
  encryption_contract?: Array<string>;
@@ -0,0 +1,5 @@
1
+ declare const locationService: {
2
+ getIP: () => Promise<any>;
3
+ getAddress: (countryCode: string) => Promise<any>;
4
+ };
5
+ export { locationService };
@@ -0,0 +1,19 @@
1
+ import { ENDPOINT_PATHS } from '../constants';
2
+ import { httpClient } from './axios';
3
+ var getIP = function () {
4
+ return httpClient({
5
+ method: 'get',
6
+ url: ENDPOINT_PATHS.IP
7
+ });
8
+ };
9
+ var getAddress = function (countryCode) {
10
+ return httpClient({
11
+ method: 'get',
12
+ url: "".concat(ENDPOINT_PATHS.ADDRESS_PATH, "/").concat(countryCode)
13
+ });
14
+ };
15
+ var locationService = {
16
+ getIP: getIP,
17
+ getAddress: getAddress
18
+ };
19
+ export { locationService };
@@ -9,5 +9,6 @@ declare const rootReducer: {
9
9
  signIn: import("redux").Reducer<import("../features/app/signIn/signInStore").SignInState, import("redux").AnyAction>;
10
10
  entity: import("redux").Reducer<import("../features/app/entity/entityStore").EntityState, import("redux").AnyAction>;
11
11
  auth: import("redux").Reducer<import("../features/app/auth/authStore").AuthState, import("redux").AnyAction>;
12
+ brand: import("redux").Reducer<import("../features/app/brand/brandStore").BrandState, import("redux").AnyAction>;
12
13
  };
13
14
  export default rootReducer;
@@ -8,6 +8,7 @@ import password from '../features/app/password/passwordStore';
8
8
  import signIn from '../features/app/signIn/signInStore';
9
9
  import entity from '../features/app/entity/entityStore';
10
10
  import auth from '../features/app/auth/authStore';
11
+ import brand from '../features/app/brand/brandStore';
11
12
  var rootReducer = {
12
13
  settings: settings,
13
14
  connect: connect,
@@ -18,6 +19,7 @@ var rootReducer = {
18
19
  password: password,
19
20
  signIn: signIn,
20
21
  entity: entity,
21
- auth: auth
22
+ auth: auth,
23
+ brand: brand
22
24
  };
23
25
  export default rootReducer;
@@ -63,7 +63,7 @@ export var fetchAppSettingsSync = createAsyncThunk('fetchAppSettingsSync', funct
63
63
  disableCountries = params.disableCountries, disableLocale = params.disableLocale;
64
64
  return [4, Promise.all([
65
65
  getFingerPrint(),
66
- API.ipService.getIP(),
66
+ API.locationService.getIP(),
67
67
  API.firebaseService.getLocale(disableLocale),
68
68
  API.countryService.getCountries(disableCountries)
69
69
  ])];
@@ -10,6 +10,7 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
10
10
  signIn: import("../features/app/signIn/signInStore").SignInState;
11
11
  entity: import("../features/app/entity/entityStore").EntityState;
12
12
  auth: import("../features/app/auth/authStore").AuthState;
13
+ brand: import("../features/app/brand/brandStore").BrandState;
13
14
  }, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<{
14
15
  settings: import("./settings").SettingsState;
15
16
  connect: import("../features/app/connect/connectStore").ConnectState;
@@ -21,6 +22,7 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
21
22
  signIn: import("../features/app/signIn/signInStore").SignInState;
22
23
  entity: import("../features/app/entity/entityStore").EntityState;
23
24
  auth: import("../features/app/auth/authStore").AuthState;
25
+ brand: import("../features/app/brand/brandStore").BrandState;
24
26
  }, import("redux").AnyAction, undefined>]>>;
25
27
  export declare type AppDispatch = typeof store.dispatch;
26
28
  export declare type RootState = ReturnType<typeof store.getState>;
@@ -332,5 +332,25 @@
332
332
  "paci_verification_description_error": "Please try again.",
333
333
  "paci_verification_redirection_message": "You will be redirected now",
334
334
  "commercial_reg_hint": "Commercial Registration",
335
- "homemaker_reg_hint": "Home Business"
335
+ "homemaker_reg_hint": "Home Business",
336
+ "unified_number_label": "Unified Number",
337
+ "unified_number_hint": "00000",
338
+ "business_expiry_date": "Expiry Date",
339
+ "capital_paid_label": "Capital Paid ({{currency}})",
340
+ "capital_paid_hint": "00000",
341
+ "capital_share_count_label": "Capital Share Count",
342
+ "capital_share_count_hint": "00000",
343
+ "capital_share_value_label": "Capital Share Value ({{currency}})",
344
+ "capital_share_value_hint": "00000",
345
+ "license_name_placeholder": "Legal name",
346
+ "choose_any_issuing_date": "اختر تاريخ",
347
+ "choose_any_expiry_date": "اختر تاريخ",
348
+ "entity_type": "Entity Type",
349
+ "choose_entity_type": "- Please select -",
350
+ "entity_type_required": "Please select at least one entity type",
351
+ "enter_legal_name_min_three_chars": "Please Enter at least minimum 2 characters",
352
+ "capital_paid_required": "Please Enter paid amount",
353
+ "capital_share_count_required": "Please Enter share count",
354
+ "capital_share_value_required": "Please Enter share value",
355
+ "unified_number_required": "Unified Number Required"
336
356
  }
@@ -359,5 +359,25 @@
359
359
  "paci_verification_description_error": "Please try again.",
360
360
  "paci_verification_redirection_message": "You will be redirected now",
361
361
  "commercial_reg_hint": "Commercial Registration",
362
- "homemaker_reg_hint": "Home Business"
362
+ "homemaker_reg_hint": "Home Business",
363
+ "unified_number_label": "Unified Number",
364
+ "unified_number_hint": "00000",
365
+ "business_expiry_date": "Expiry Date",
366
+ "capital_paid_label": "Capital Paid ({{currency}})",
367
+ "capital_paid_hint": "00000",
368
+ "capital_share_count_label": "Capital Share Count",
369
+ "capital_share_count_hint": "00000",
370
+ "capital_share_value_label": "Capital Share Value ({{currency}})",
371
+ "capital_share_value_hint": "00000",
372
+ "license_name_placeholder": "Legal name",
373
+ "choose_any_issuing_date": "Please select a date",
374
+ "choose_any_expiry_date": "Please select a date",
375
+ "entity_type": "Entity Type",
376
+ "choose_entity_type": "- Please select -",
377
+ "entity_type_required": "Please select at least one entity type",
378
+ "enter_legal_name_min_three_chars": "Please Enter at least minimum 2 characters",
379
+ "capital_paid_required": "Please Enter paid amount",
380
+ "capital_share_count_required": "Please Enter share count",
381
+ "capital_share_value_required": "Please Enter share value",
382
+ "unified_number_required": "Unified Number Required"
363
383
  }
@@ -7,8 +7,9 @@ export interface SimpleListProps<T> extends ListProps {
7
7
  onSelectItem: (item: T) => void;
8
8
  renderItem: (item: T, idx: number) => React.ReactElement;
9
9
  searchKeyPath?: string;
10
+ searchValuePath?: string;
10
11
  }
11
- declare function SimpleList<T>({ list, listItemProps, onSelectItem, renderItem, children, searchKeyPath, ...rest }: SimpleListProps<T>): JSX.Element;
12
+ declare function SimpleList<T>({ list, listItemProps, onSelectItem, renderItem, children, searchKeyPath, searchValuePath, ...rest }: SimpleListProps<T>): JSX.Element;
12
13
  declare namespace SimpleList {
13
14
  var defaultProps: {
14
15
  searchKeyPath: string;
@@ -20,14 +20,15 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
- import { jsx as _jsx } from "react/jsx-runtime";
24
23
  import { createElement as _createElement } from "react";
24
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
25
25
  import * as React from 'react';
26
26
  import List from '@mui/material/List';
27
27
  import ListItem from '@mui/material/ListItem';
28
28
  import { styled } from '@mui/material/styles';
29
29
  import get from 'lodash-es/get';
30
30
  import { useEventListener } from '../../hooks';
31
+ import Search from '../../features/shared/Search';
31
32
  var ListStyled = styled(List)(function (_a) {
32
33
  var _b;
33
34
  var theme = _a.theme;
@@ -67,12 +68,12 @@ var ListItemStyled = styled(ListItem)(function (_a) {
67
68
  });
68
69
  });
69
70
  function SimpleList(_a) {
70
- var list = _a.list, listItemProps = _a.listItemProps, onSelectItem = _a.onSelectItem, renderItem = _a.renderItem, children = _a.children, searchKeyPath = _a.searchKeyPath, rest = __rest(_a, ["list", "listItemProps", "onSelectItem", "renderItem", "children", "searchKeyPath"]);
71
+ var list = _a.list, listItemProps = _a.listItemProps, onSelectItem = _a.onSelectItem, renderItem = _a.renderItem, children = _a.children, searchKeyPath = _a.searchKeyPath, searchValuePath = _a.searchValuePath, rest = __rest(_a, ["list", "listItemProps", "onSelectItem", "renderItem", "children", "searchKeyPath", "searchValuePath"]);
71
72
  var _b = React.useState(list), items = _b[0], setItems = _b[1];
72
73
  React.useEffect(function () {
73
74
  setItems(list);
74
75
  }, [list]);
75
- var filterItems = function (arr, searchKey) {
76
+ var filterItemsByKey = function (arr, searchKey) {
76
77
  return arr.filter(function (item) {
77
78
  var searchValue = get(item, searchKeyPath || '') || '';
78
79
  return searchValue.charAt(0).toLowerCase() === searchKey.charAt(searchKey.length - 1).toLowerCase();
@@ -81,7 +82,7 @@ function SimpleList(_a) {
81
82
  var onKeySearch = function (_a) {
82
83
  var code = _a.code;
83
84
  if (code) {
84
- var filteredArr = filterItems(items, code);
85
+ var filteredArr = filterItemsByKey(items, code);
85
86
  if (filteredArr.length === 0 || code === 'Backspace')
86
87
  setItems(list);
87
88
  else
@@ -90,12 +91,23 @@ function SimpleList(_a) {
90
91
  };
91
92
  if (searchKeyPath)
92
93
  useEventListener('keydown', onKeySearch);
93
- return (_jsx(ListStyled, __assign({}, rest, { children: children ||
94
- items.map(function (item, idx) {
95
- return (_createElement(ListItemStyled, __assign({}, listItemProps, { onClick: function () {
96
- onSelectItem(item);
97
- }, disableGutters: true, key: idx }), renderItem(item, idx)));
98
- }) })));
94
+ var onSearch = function (value) {
95
+ if (value) {
96
+ var filteredArr = items.filter(function (item) {
97
+ var searchValue = get(item, searchValuePath || '') || '';
98
+ return searchValue.toLowerCase().includes(value.toLowerCase());
99
+ });
100
+ setItems(filteredArr);
101
+ return;
102
+ }
103
+ setItems(list);
104
+ };
105
+ return (_jsxs(_Fragment, { children: [searchValuePath && _jsx(Search, { onSearchValue: onSearch }), _jsx(ListStyled, __assign({}, rest, { children: children ||
106
+ items.map(function (item, idx) {
107
+ return (_createElement(ListItemStyled, __assign({}, listItemProps, { onClick: function () {
108
+ onSelectItem(item);
109
+ }, disableGutters: true, key: idx }), renderItem(item, idx)));
110
+ }) }))] }));
99
111
  }
100
112
  SimpleList.defaultProps = {
101
113
  searchKeyPath: ''
@@ -1,4 +1,5 @@
1
1
  export declare const ENDPOINT_PATHS: {
2
+ ADDRESS_PATH: string;
2
3
  SANDBOX_BASE_URL: string;
3
4
  PRODUCTION_BASE_URL: string;
4
5
  DEV_BASE_URL: string;
@@ -37,4 +38,6 @@ export declare const ENDPOINT_PATHS: {
37
38
  RETRIEVE_ACTIVITIES_LIST_PATH: string;
38
39
  DOCUMENT: string;
39
40
  CREATE_AUTH_NID: string;
41
+ SEGMENTS_PATH: string;
42
+ TEAM_SIZE_PATH: string;
40
43
  };
@@ -37,7 +37,11 @@ var CONNECT_PATH = '/connect';
37
37
  var CREATE_AUTH_NID_PATH = "".concat(CONNECT_PATH, "/auth");
38
38
  var VERIFY_AUTH_OTP_PATH = "".concat(CONNECT_PATH, "/auth");
39
39
  var DOCUMENT_PATH = '/document';
40
+ var SEGMENTS_PATH = '/businessSegment/list';
41
+ var TEAM_SIZE_PATH = '/businessSegment/team/list';
42
+ var ADDRESS_PATH = '/address';
40
43
  export var ENDPOINT_PATHS = {
44
+ ADDRESS_PATH: ADDRESS_PATH,
41
45
  SANDBOX_BASE_URL: SANDBOX_BASE_URL,
42
46
  PRODUCTION_BASE_URL: PRODUCTION_BASE_URL,
43
47
  DEV_BASE_URL: DEV_BASE_URL,
@@ -75,5 +79,7 @@ export var ENDPOINT_PATHS = {
75
79
  VERIFY_AUTH_OTP: VERIFY_AUTH_OTP_PATH,
76
80
  RETRIEVE_ACTIVITIES_LIST_PATH: RETRIEVE_ACTIVITIES_LIST_PATH,
77
81
  DOCUMENT: DOCUMENT_PATH,
78
- CREATE_AUTH_NID: CREATE_AUTH_NID_PATH
82
+ CREATE_AUTH_NID: CREATE_AUTH_NID_PATH,
83
+ SEGMENTS_PATH: SEGMENTS_PATH,
84
+ TEAM_SIZE_PATH: TEAM_SIZE_PATH
79
85
  };