@tap-payments/auth-jsconnect 2.0.54-test → 2.0.56-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 (203) hide show
  1. package/build/@types/app.d.ts +39 -14
  2. package/build/@types/app.js +9 -0
  3. package/build/@types/form.d.ts +11 -0
  4. package/build/api/auth.d.ts +14 -1
  5. package/build/api/auth.js +24 -1
  6. package/build/api/axios.js +2 -2
  7. package/build/api/data.d.ts +33 -7
  8. package/build/api/data.js +41 -16
  9. package/build/api/entity.d.ts +2 -0
  10. package/build/api/index.d.ts +11 -8
  11. package/build/api/individual.d.ts +1 -1
  12. package/build/app/rootReducer.d.ts +3 -0
  13. package/build/app/rootReducer.js +7 -1
  14. package/build/app/settings.js +8 -2
  15. package/build/app/store.d.ts +7 -1
  16. package/build/assets/locales/ar.json +14 -4
  17. package/build/assets/locales/en.json +14 -4
  18. package/build/components/AnimationFlow/AnimationFlow.d.ts +4 -1
  19. package/build/components/AnimationFlow/AnimationFlow.js +5 -7
  20. package/build/components/AnimationFlow/BottomSheet.js +2 -1
  21. package/build/components/AnimationFlow/Dialog.d.ts +4 -1
  22. package/build/components/AnimationFlow/Dialog.js +9 -4
  23. package/build/components/FileInput/DragAndDrop.d.ts +9 -1
  24. package/build/components/FileInput/DragAndDrop.js +113 -8
  25. package/build/components/Lottie/Lottie.d.ts +878 -0
  26. package/build/components/Lottie/Lottie.js +58 -0
  27. package/build/components/Lottie/files/pulsating_circle_waves.json +236 -0
  28. package/build/components/Lottie/files/success.json +425 -0
  29. package/build/components/Lottie/index.d.ts +3 -0
  30. package/build/components/Lottie/index.js +3 -0
  31. package/build/components/ProgressBar/CircularProgressBar.d.ts +14 -0
  32. package/build/components/ProgressBar/CircularProgressBar.js +48 -0
  33. package/build/components/ProgressBar/index.d.ts +2 -0
  34. package/build/components/ProgressBar/index.js +2 -0
  35. package/build/components/SocialMediaGroup/SocialMediaGroup.d.ts +2 -1
  36. package/build/components/SocialMediaGroup/SocialMediaGroup.js +27 -34
  37. package/build/constants/api.d.ts +1 -0
  38. package/build/constants/api.js +10 -7
  39. package/build/constants/app.d.ts +15 -0
  40. package/build/constants/app.js +75 -3
  41. package/build/constants/assets.d.ts +17 -1
  42. package/build/constants/assets.js +22 -6
  43. package/build/constants/validation.d.ts +1 -0
  44. package/build/constants/validation.js +1 -0
  45. package/build/features/app/auth/authStore.d.ts +35 -0
  46. package/build/features/app/auth/authStore.js +148 -0
  47. package/build/features/app/bank/bankStore.d.ts +4 -0
  48. package/build/features/app/bank/bankStore.js +42 -22
  49. package/build/features/app/business/businessStore.js +53 -43
  50. package/build/features/app/connect/connectStore.d.ts +13 -1
  51. package/build/features/app/connect/connectStore.js +164 -4
  52. package/build/features/app/entity/entityStore.d.ts +53 -0
  53. package/build/features/app/entity/entityStore.js +461 -0
  54. package/build/features/app/individual/individualStore.js +19 -11
  55. package/build/features/app/otp/otpStore.d.ts +28 -0
  56. package/build/features/app/otp/otpStore.js +153 -0
  57. package/build/features/app/signIn/signInStore.js +2 -2
  58. package/build/features/auth/Auth.d.ts +10 -0
  59. package/build/features/auth/Auth.js +87 -0
  60. package/build/features/auth/index.d.ts +1 -0
  61. package/build/features/auth/index.js +1 -0
  62. package/build/features/auth/screens/OTP/OTP.d.ts +5 -0
  63. package/build/features/auth/screens/OTP/OTP.js +72 -0
  64. package/build/features/auth/screens/OTP/OTPInput.d.ts +5 -0
  65. package/build/features/auth/screens/OTP/OTPInput.js +44 -0
  66. package/build/features/auth/screens/OTP/index.d.ts +3 -0
  67. package/build/features/auth/screens/OTP/index.js +2 -0
  68. package/build/features/auth/screens/OTP/validation.d.ts +8 -0
  69. package/build/features/auth/screens/OTP/validation.js +4 -0
  70. package/build/features/bank/Bank.js +10 -4
  71. package/build/features/bank/screens/BankDetails/BankDetails.js +2 -2
  72. package/build/features/bank/screens/BankDetails/BankStatement.js +33 -8
  73. package/build/features/business/Business.d.ts +1 -1
  74. package/build/features/business/Business.js +12 -5
  75. package/build/features/business/screens/Activities/ActivitiesList.d.ts +1 -1
  76. package/build/features/business/screens/Activities/SalesChannels.js +1 -1
  77. package/build/features/business/screens/Customers/CustomerLocations.d.ts +2 -2
  78. package/build/features/business/screens/Customers/CustomerLocations.js +25 -7
  79. package/build/features/business/screens/Customers/ExpectedCustomers.js +16 -4
  80. package/build/features/business/screens/Customers/ExpectedSalesRange.js +32 -14
  81. package/build/features/connect/Connect.d.ts +2 -1
  82. package/build/features/connect/Connect.js +40 -10
  83. package/build/features/connect/screens/CivilID/CivilID.d.ts +5 -0
  84. package/build/features/connect/screens/CivilID/CivilID.js +85 -0
  85. package/build/features/connect/screens/CivilID/IDNumber.d.ts +7 -0
  86. package/build/features/connect/screens/CivilID/IDNumber.js +59 -0
  87. package/build/features/connect/screens/CivilID/index.d.ts +3 -0
  88. package/build/features/connect/screens/CivilID/index.js +2 -0
  89. package/build/features/connect/screens/CivilID/validation.d.ts +8 -0
  90. package/build/features/connect/screens/CivilID/validation.js +4 -0
  91. package/build/features/connect/screens/Individual/Individual.js +6 -2
  92. package/build/features/connect/screens/Merchant/Merchant.js +35 -11
  93. package/build/features/connect/screens/Merchant/SalesChannels.d.ts +5 -0
  94. package/build/features/connect/screens/Merchant/SalesChannels.js +114 -0
  95. package/build/features/connect/screens/Merchant/SocialMedia.js +56 -11
  96. package/build/features/connect/screens/Merchant/validation.d.ts +87 -0
  97. package/build/features/connect/screens/Merchant/validation.js +68 -2
  98. package/build/features/connect/screens/Mobile/Mobile.js +7 -4
  99. package/build/features/connect/screens/VerifyPACI/VerifyPACI.d.ts +5 -0
  100. package/build/features/connect/screens/VerifyPACI/VerifyPACI.js +169 -0
  101. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.d.ts +5 -0
  102. package/build/features/connect/screens/VerifyPACI/VerifyPACILoading.js +22 -0
  103. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.d.ts +5 -0
  104. package/build/features/connect/screens/VerifyPACI/VerifyPACISuccess.js +8 -0
  105. package/build/features/connect/screens/VerifyPACI/index.d.ts +3 -0
  106. package/build/features/connect/screens/VerifyPACI/index.js +2 -0
  107. package/build/features/entity/Entity.d.ts +7 -0
  108. package/build/features/entity/Entity.js +70 -0
  109. package/build/features/entity/index.d.ts +1 -0
  110. package/build/features/entity/index.js +1 -0
  111. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.d.ts +54 -0
  112. package/build/features/entity/screens/EntityInfoConfirm/ActivitiesList.js +139 -0
  113. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.d.ts +5 -0
  114. package/build/features/entity/screens/EntityInfoConfirm/EntityInfo.js +56 -0
  115. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.d.ts +5 -0
  116. package/build/features/entity/screens/EntityInfoConfirm/LicenseName.js +17 -0
  117. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.d.ts +5 -0
  118. package/build/features/entity/screens/EntityInfoConfirm/LicenseNumber.js +28 -0
  119. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.d.ts +6 -0
  120. package/build/features/entity/screens/EntityInfoConfirm/OperationStartDate.js +38 -0
  121. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.d.ts +5 -0
  122. package/build/features/entity/screens/EntityInfoConfirm/SalesChannels.js +112 -0
  123. package/build/features/entity/screens/EntityInfoConfirm/index.d.ts +2 -0
  124. package/build/features/entity/screens/EntityInfoConfirm/index.js +2 -0
  125. package/build/features/entity/screens/EntityInfoConfirm/validation.d.ts +107 -0
  126. package/build/features/entity/screens/EntityInfoConfirm/validation.js +17 -0
  127. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +5 -0
  128. package/build/features/entity/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +9 -0
  129. package/build/features/entity/screens/ResetPasswordSuccess/index.d.ts +3 -0
  130. package/build/features/entity/screens/ResetPasswordSuccess/index.js +2 -0
  131. package/build/features/entity/screens/Success/Success.d.ts +5 -0
  132. package/build/features/entity/screens/Success/Success.js +16 -0
  133. package/build/features/entity/screens/Success/index.d.ts +3 -0
  134. package/build/features/entity/screens/Success/index.js +2 -0
  135. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  136. package/build/features/entity/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +109 -0
  137. package/build/features/entity/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  138. package/build/features/entity/screens/SuccessWithFlowButtons/index.js +2 -0
  139. package/build/features/entity/screens/Verify/OTPInput.d.ts +7 -0
  140. package/build/features/entity/screens/Verify/OTPInput.js +47 -0
  141. package/build/features/entity/screens/Verify/Verify.d.ts +5 -0
  142. package/build/features/entity/screens/Verify/Verify.js +78 -0
  143. package/build/features/entity/screens/Verify/index.d.ts +2 -0
  144. package/build/features/entity/screens/Verify/index.js +2 -0
  145. package/build/features/entity/screens/Verify/validation.d.ts +8 -0
  146. package/build/features/entity/screens/Verify/validation.js +4 -0
  147. package/build/features/featuresScreens.d.ts +3 -0
  148. package/build/features/featuresScreens.js +48 -0
  149. package/build/features/individual/Individual.d.ts +1 -1
  150. package/build/features/individual/Individual.js +12 -5
  151. package/build/features/individual/screens/AdditionalIndividualInfo/AdditionalIndividualInfo.js +1 -1
  152. package/build/features/individual/screens/AdditionalIndividualInfo/MonthlyIncome.js +14 -3
  153. package/build/features/individual/screens/AdditionalIndividualInfo/Occupation.js +11 -3
  154. package/build/features/individual/screens/AdditionalIndividualInfo/SourceOfIncome.js +2 -2
  155. package/build/features/otp/OTP.d.ts +7 -0
  156. package/build/features/otp/OTP.js +58 -0
  157. package/build/features/otp/index.d.ts +0 -0
  158. package/build/features/otp/index.js +1 -0
  159. package/build/features/otp/screens/OTPVerify/OTPInput.d.ts +6 -0
  160. package/build/features/otp/screens/OTPVerify/OTPInput.js +47 -0
  161. package/build/features/otp/screens/OTPVerify/Verify.d.ts +5 -0
  162. package/build/features/otp/screens/OTPVerify/Verify.js +49 -0
  163. package/build/features/otp/screens/OTPVerify/index.d.ts +2 -0
  164. package/build/features/otp/screens/OTPVerify/index.js +2 -0
  165. package/build/features/otp/screens/OTPVerify/validation.d.ts +8 -0
  166. package/build/features/otp/screens/OTPVerify/validation.js +4 -0
  167. package/build/features/password/Password.d.ts +1 -1
  168. package/build/features/password/Password.js +12 -5
  169. package/build/features/shared/Background/Background.d.ts +7 -5
  170. package/build/features/shared/Background/Background.js +16 -5
  171. package/build/features/shared/Dialog/CloseDialog.d.ts +11 -0
  172. package/build/features/shared/Dialog/CloseDialog.js +62 -0
  173. package/build/features/shared/Dialog/DialogContainer.d.ts +8 -0
  174. package/build/features/shared/Dialog/DialogContainer.js +56 -0
  175. package/build/features/shared/Dialog/index.d.ts +4 -0
  176. package/build/features/shared/Dialog/index.js +4 -0
  177. package/build/features/shared/Input/Input.d.ts +1 -1
  178. package/build/features/shared/Input/Input.js +2 -2
  179. package/build/features/shared/UploadFile/UploadFile.d.ts +8 -3
  180. package/build/features/shared/UploadFile/UploadFile.js +23 -8
  181. package/build/features/signIn/SignIn.d.ts +1 -1
  182. package/build/features/signIn/SignIn.js +12 -4
  183. package/build/features/tax/Tax.d.ts +1 -1
  184. package/build/features/tax/Tax.js +12 -4
  185. package/build/hooks/index.d.ts +1 -0
  186. package/build/hooks/index.js +1 -0
  187. package/build/hooks/useAppConfig.js +2 -0
  188. package/build/hooks/useAppDispatch.d.ts +3 -0
  189. package/build/hooks/useErrorListener.js +3 -2
  190. package/build/hooks/useScreen.d.ts +3 -0
  191. package/build/hooks/useScreen.js +14 -0
  192. package/build/index.d.ts +5 -2
  193. package/build/index.js +11 -2
  194. package/build/utils/device.d.ts +1 -0
  195. package/build/utils/device.js +13 -0
  196. package/build/utils/html.d.ts +1 -0
  197. package/build/utils/html.js +6 -0
  198. package/build/utils/locale.js +1 -1
  199. package/build/utils/rsa.d.ts +2 -2
  200. package/build/utils/rsa.js +1 -1
  201. package/build/utils/string.d.ts +22 -20
  202. package/build/utils/string.js +9 -0
  203. package/package.json +1 -1
@@ -44,23 +44,35 @@ export interface FeatureScreenStep {
44
44
  export declare enum SocialMediaTypes {
45
45
  WEB = "website",
46
46
  INSTAGRAM = "instagram",
47
- TWITTER = "twitter"
47
+ TWITTER = "twitter",
48
+ SOCIAL = "social media",
49
+ PHYSICAL_STORE = "physical store",
50
+ CALL_CENTER = "call center",
51
+ APP = "mobile app",
52
+ APPLE_STORE = "apple store",
53
+ PLAY_STORE = "play store"
48
54
  }
49
55
  export interface CustomerLocation {
50
56
  id: string;
51
- name_ar: string;
52
- name_en: string;
57
+ name: {
58
+ ar: string;
59
+ en: string;
60
+ };
53
61
  }
54
62
  export interface ExpectedCustomer extends CustomerLocation {
55
63
  }
56
64
  export interface ExpectedSaleRange {
57
65
  id: string;
58
- name_ar: string;
59
- name_en: string;
66
+ name: {
67
+ ar: string;
68
+ en: string;
69
+ };
60
70
  sub?: Array<{
61
71
  id: string;
62
- name_ar: string;
63
- name_en: string;
72
+ name: {
73
+ ar: string;
74
+ en: string;
75
+ };
64
76
  }>;
65
77
  }
66
78
  export declare enum BusinessType {
@@ -83,20 +95,30 @@ export interface Activity {
83
95
  }
84
96
  export interface SalesChannel {
85
97
  id: string;
86
- name_ar: string;
87
- name_en: string;
98
+ name: {
99
+ ar: string;
100
+ en: string;
101
+ };
88
102
  }
89
103
  export interface SourceOfIncome {
90
104
  id: string;
91
- name_ar: string;
92
- name_en: string;
105
+ name: {
106
+ ar: string;
107
+ en: string;
108
+ };
93
109
  }
94
110
  export interface Occupation {
95
111
  id: string;
96
- name_ar: string;
97
- name_en: string;
112
+ name: {
113
+ ar: string;
114
+ en: string;
115
+ };
98
116
  }
99
117
  export interface MonthlyIncome extends SourceOfIncome {
118
+ range: {
119
+ ar: string;
120
+ en: string;
121
+ };
100
122
  }
101
123
  export interface AppInfo {
102
124
  name: string;
@@ -187,7 +209,10 @@ export declare enum FlowsTypes {
187
209
  BUSINESS = "business",
188
210
  INDIVIDUAL = "individual",
189
211
  PASSWORD = "password",
190
- TAX = "tax"
212
+ TAX = "tax",
213
+ ENTITY = "entity",
214
+ OTP = "otp",
215
+ AUTH = "auth"
191
216
  }
192
217
  export declare type FlowInfo = {
193
218
  name: string;
@@ -3,6 +3,12 @@ export var SocialMediaTypes;
3
3
  SocialMediaTypes["WEB"] = "website";
4
4
  SocialMediaTypes["INSTAGRAM"] = "instagram";
5
5
  SocialMediaTypes["TWITTER"] = "twitter";
6
+ SocialMediaTypes["SOCIAL"] = "social media";
7
+ SocialMediaTypes["PHYSICAL_STORE"] = "physical store";
8
+ SocialMediaTypes["CALL_CENTER"] = "call center";
9
+ SocialMediaTypes["APP"] = "mobile app";
10
+ SocialMediaTypes["APPLE_STORE"] = "apple store";
11
+ SocialMediaTypes["PLAY_STORE"] = "play store";
6
12
  })(SocialMediaTypes || (SocialMediaTypes = {}));
7
13
  export var BusinessType;
8
14
  (function (BusinessType) {
@@ -17,4 +23,7 @@ export var FlowsTypes;
17
23
  FlowsTypes["INDIVIDUAL"] = "individual";
18
24
  FlowsTypes["PASSWORD"] = "password";
19
25
  FlowsTypes["TAX"] = "tax";
26
+ FlowsTypes["ENTITY"] = "entity";
27
+ FlowsTypes["OTP"] = "otp";
28
+ FlowsTypes["AUTH"] = "auth";
20
29
  })(FlowsTypes || (FlowsTypes = {}));
@@ -16,6 +16,9 @@ export declare type NIDFormValues = {
16
16
  nid: string;
17
17
  dob: string;
18
18
  };
19
+ export declare type CivilFormValues = {
20
+ civilId: string;
21
+ };
19
22
  export declare type IndividualFormValues = {
20
23
  name: string;
21
24
  email: string;
@@ -24,6 +27,7 @@ export declare type IndividualFormValues = {
24
27
  };
25
28
  export declare type BrandFormValues = {
26
29
  brandName: string;
30
+ salesChannels: Array<SalesChannel>;
27
31
  links: {
28
32
  website: string;
29
33
  twitter: string;
@@ -74,3 +78,10 @@ export declare type PasswordCreateFormValues = {
74
78
  password: string;
75
79
  confirmPassword: string;
76
80
  };
81
+ export declare type EntityFormValues = {
82
+ licenseNumber?: string;
83
+ licenseName?: string;
84
+ activities?: Array<Activity>;
85
+ salesChannels?: Array<SalesChannel>;
86
+ operationStartDate: string;
87
+ };
@@ -13,8 +13,12 @@ export declare type IDCredential = {
13
13
  identification_id_type: string;
14
14
  date_of_birth: string;
15
15
  };
16
+ export declare type CivilID = {
17
+ identification_id: string;
18
+ country_code: string;
19
+ };
16
20
  export declare type CreateAuthBody = {
17
- user_credentail: MobileCredential | EmailCredential | IDCredential;
21
+ user_credentail: MobileCredential | EmailCredential | IDCredential | CivilID;
18
22
  auth_type?: number;
19
23
  email_url?: string;
20
24
  sign_in?: boolean;
@@ -56,9 +60,18 @@ export declare type CreatePasswordBody = {
56
60
  step_name: string;
57
61
  encryption_contract: Array<string>;
58
62
  };
63
+ export declare type VerifyAuthKitOTPBody = {
64
+ lead_id: string;
65
+ data: string;
66
+ post_url: string;
67
+ scopes: Array<string>;
68
+ encryption_contract: Array<string>;
69
+ };
59
70
  declare const authService: {
60
71
  createAuth: (data: CreateAuthBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
61
72
  verifyAuth: (data: VerifyAuthBody | VerifyOperationAuthBody, config?: AxiosRequestConfig) => Promise<import("axios").AxiosResponse<any, any>>;
62
73
  createPassword: (data: CreatePasswordBody) => Promise<any>;
74
+ verifyAuthKitOTP: (data: VerifyAuthKitOTPBody) => Promise<any>;
75
+ getVerifyAuth: (token: string, config?: AxiosRequestConfig) => Promise<any>;
63
76
  };
64
77
  export { authService };
package/build/api/auth.js CHANGED
@@ -1,3 +1,14 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  import instance, { httpClient } from './axios';
2
13
  import { ENDPOINT_PATHS } from '../constants';
3
14
  var createAuth = function (data, config) {
@@ -13,9 +24,21 @@ var createPassword = function (data) {
13
24
  data: data
14
25
  });
15
26
  };
27
+ var getVerifyAuth = function (token, config) {
28
+ return httpClient(__assign({ method: 'get', url: "".concat(ENDPOINT_PATHS.AUTH, "/").concat(token) }, config));
29
+ };
30
+ var verifyAuthKitOTP = function (data) {
31
+ return httpClient({
32
+ method: 'post',
33
+ url: "".concat(ENDPOINT_PATHS.VERIFY_AUTH_OTP),
34
+ data: data
35
+ });
36
+ };
16
37
  var authService = {
17
38
  createAuth: createAuth,
18
39
  verifyAuth: verifyAuth,
19
- createPassword: createPassword
40
+ createPassword: createPassword,
41
+ verifyAuthKitOTP: verifyAuthKitOTP,
42
+ getVerifyAuth: getVerifyAuth
20
43
  };
21
44
  export { authService };
@@ -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) {
95
- throw new Error(description, 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));
96
96
  }
97
97
  return [2, data];
98
98
  case 2:
@@ -1,10 +1,36 @@
1
+ export interface GetOccupationBody {
2
+ page: number;
3
+ }
4
+ export interface GetMonthlyIncomeBody {
5
+ page: number;
6
+ country_code: Array<string>;
7
+ }
8
+ export interface DataElementBody {
9
+ en: string;
10
+ ar: string;
11
+ }
12
+ export interface GetCustomerBasesBody {
13
+ page: number;
14
+ }
15
+ export interface GetExpectedSalesBody {
16
+ page: number;
17
+ }
18
+ export interface GetExpectedCustomerSalesBody {
19
+ page: number;
20
+ }
21
+ export interface GetSourceOfIncomeBody {
22
+ page: number;
23
+ }
24
+ export interface GetChannelsOfServicesBody {
25
+ page: number;
26
+ }
1
27
  declare const dataService: {
2
- getChannelsOfServices: () => Promise<import("axios").AxiosResponse<any, any>>;
3
- getCustomerBases: () => Promise<import("axios").AxiosResponse<any, any>>;
4
- getExpectedSales: () => Promise<import("axios").AxiosResponse<any, any>>;
5
- getExpectedCustomerSales: () => Promise<import("axios").AxiosResponse<any, any>>;
6
- getSourceOfIncome: () => Promise<import("axios").AxiosResponse<any, any>>;
7
- getMonthlyIncome: (countryCode: string) => Promise<import("axios").AxiosResponse<any, any>>;
8
- getOccupation: () => Promise<any>;
28
+ getChannelsOfServices: (data: GetChannelsOfServicesBody) => Promise<any>;
29
+ getCustomerBases: (data: GetCustomerBasesBody) => Promise<any>;
30
+ getExpectedSales: (data: GetExpectedSalesBody) => Promise<any>;
31
+ getExpectedCustomerSales: (data: GetExpectedCustomerSalesBody) => Promise<any>;
32
+ getSourceOfIncome: (data: GetSourceOfIncomeBody) => Promise<any>;
33
+ getMonthlyIncome: (data: GetMonthlyIncomeBody) => Promise<any>;
34
+ getOccupation: (data: GetOccupationBody) => Promise<any>;
9
35
  };
10
36
  export { dataService };
package/build/api/data.js CHANGED
@@ -1,27 +1,52 @@
1
- import instance, { httpClient } from './axios';
1
+ import { httpClient } from './axios';
2
2
  import { ENDPOINT_PATHS } from '../constants';
3
- var getChannelsOfServices = function () {
4
- return instance.get("".concat(ENDPOINT_PATHS.CHANNEL));
3
+ var getChannelsOfServices = function (data) {
4
+ return httpClient({
5
+ method: 'post',
6
+ url: "".concat(ENDPOINT_PATHS.CHANNEL),
7
+ data: data
8
+ });
5
9
  };
6
- var getCustomerBases = function () {
7
- return instance.get("".concat(ENDPOINT_PATHS.CUSTOMER_BASES));
10
+ var getCustomerBases = function (data) {
11
+ return httpClient({
12
+ method: 'post',
13
+ url: "".concat(ENDPOINT_PATHS.CUSTOMER_BASES),
14
+ data: data
15
+ });
8
16
  };
9
- var getExpectedSales = function () {
10
- return instance.get("".concat(ENDPOINT_PATHS.SALES));
17
+ var getExpectedSales = function (data) {
18
+ return httpClient({
19
+ method: 'post',
20
+ url: "".concat(ENDPOINT_PATHS.SALES),
21
+ data: data
22
+ });
11
23
  };
12
- var getExpectedCustomerSales = function () {
13
- return instance.get("".concat(ENDPOINT_PATHS.EXPECTED_CUSTOMERS));
24
+ var getExpectedCustomerSales = function (data) {
25
+ return httpClient({
26
+ method: 'post',
27
+ url: "".concat(ENDPOINT_PATHS.EXPECTED_CUSTOMERS),
28
+ data: data
29
+ });
14
30
  };
15
- var getSourceOfIncome = function () {
16
- return instance.get("".concat(ENDPOINT_PATHS.SOURCE_INCOME));
31
+ var getSourceOfIncome = function (data) {
32
+ return httpClient({
33
+ method: 'post',
34
+ url: "".concat(ENDPOINT_PATHS.SOURCE_INCOME),
35
+ data: data
36
+ });
17
37
  };
18
- var getMonthlyIncome = function (countryCode) {
19
- return instance.get("".concat(ENDPOINT_PATHS.MONTHLY_INCOME, "/").concat(countryCode));
38
+ var getMonthlyIncome = function (data) {
39
+ return httpClient({
40
+ method: 'post',
41
+ url: "".concat(ENDPOINT_PATHS.MONTHLY_INCOME),
42
+ data: data
43
+ });
20
44
  };
21
- var getOccupation = function () {
45
+ var getOccupation = function (data) {
22
46
  return httpClient({
23
- method: 'get',
24
- url: "".concat(ENDPOINT_PATHS.OCCUPATION)
47
+ method: 'post',
48
+ url: "".concat(ENDPOINT_PATHS.OCCUPATION),
49
+ data: data
25
50
  });
26
51
  };
27
52
  var dataService = {
@@ -3,6 +3,8 @@ export declare type EntityInfoBody = {
3
3
  id: string;
4
4
  lead_id?: string;
5
5
  activities?: Array<string>;
6
+ license_name?: string;
7
+ license_number?: string;
6
8
  business_operation_start_at?: string;
7
9
  channel_services?: Array<string>;
8
10
  physical_store_available?: boolean;
@@ -5,6 +5,7 @@ import { UpdateLeadBody, LeadVerifyBody, CreateLeadBody, LeadOTPVerifyBody, Lead
5
5
  import { CheckEmailBody, CheckBrandBody } from './availabilityServices';
6
6
  import { EntityInfoBody, EntityBankUpdateBody } from './entity';
7
7
  import { CreateAccountBody } from './account';
8
+ import { DataElementBody } from './data';
8
9
  import { BrandListBody, UpdateBrandBody } from './individual';
9
10
  import { UpdateBoardBody } from './board';
10
11
  declare const API: {
@@ -21,6 +22,8 @@ declare const API: {
21
22
  createAuth: (data: CreateAuthBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
22
23
  verifyAuth: (data: VerifyAuthBody | VerifyOperationAuthBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
23
24
  createPassword: (data: CreatePasswordBody) => Promise<any>;
25
+ verifyAuthKitOTP: (data: import("./auth").VerifyAuthKitOTPBody) => Promise<any>;
26
+ getVerifyAuth: (token: string, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<any>;
24
27
  };
25
28
  leadService: {
26
29
  createLead: (data: CreateLeadBody, config?: import("axios").AxiosRequestConfig<any> | undefined) => Promise<import("axios").AxiosResponse<any, any>>;
@@ -51,13 +54,13 @@ declare const API: {
51
54
  createAccount: (data: CreateAccountBody) => Promise<any>;
52
55
  };
53
56
  dataService: {
54
- getChannelsOfServices: () => Promise<import("axios").AxiosResponse<any, any>>;
55
- getCustomerBases: () => Promise<import("axios").AxiosResponse<any, any>>;
56
- getExpectedSales: () => Promise<import("axios").AxiosResponse<any, any>>;
57
- getExpectedCustomerSales: () => Promise<import("axios").AxiosResponse<any, any>>;
58
- getSourceOfIncome: () => Promise<import("axios").AxiosResponse<any, any>>;
59
- getMonthlyIncome: (countryCode: string) => Promise<import("axios").AxiosResponse<any, any>>;
60
- getOccupation: () => Promise<any>;
57
+ getChannelsOfServices: (data: import("./data").GetChannelsOfServicesBody) => Promise<any>;
58
+ getCustomerBases: (data: import("./data").GetCustomerBasesBody) => Promise<any>;
59
+ getExpectedSales: (data: import("./data").GetExpectedSalesBody) => Promise<any>;
60
+ getExpectedCustomerSales: (data: import("./data").GetExpectedCustomerSalesBody) => Promise<any>;
61
+ getSourceOfIncome: (data: import("./data").GetSourceOfIncomeBody) => Promise<any>;
62
+ getMonthlyIncome: (data: import("./data").GetMonthlyIncomeBody) => Promise<any>;
63
+ getOccupation: (data: import("./data").GetOccupationBody) => Promise<any>;
61
64
  };
62
65
  individualService: {
63
66
  retrieveIndividualInfo: (id: string) => Promise<any>;
@@ -78,6 +81,6 @@ declare const API: {
78
81
  updateBrandInfo: ({ id, ...data }: UpdateBrandBody) => Promise<any>;
79
82
  };
80
83
  };
81
- export type { ValidateOperatorBody, CreateAuthBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody };
84
+ export type { ValidateOperatorBody, CreateAuthBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody };
82
85
  export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
83
86
  export default API;
@@ -9,7 +9,7 @@ export declare type UpdateBrandBody = {
9
9
  channel_services?: Array<string>;
10
10
  physical_store_available?: boolean;
11
11
  monthly_sales_range?: string;
12
- customers_served_monthly?: number;
12
+ customers_served_monthly?: string;
13
13
  customers_base?: Array<string>;
14
14
  vat_id?: string;
15
15
  agree_chargeback?: boolean;
@@ -7,5 +7,8 @@ declare const rootReducer: {
7
7
  individual: import("redux").Reducer<import("../features/app/individual/individualStore").IndividualState, import("redux").AnyAction>;
8
8
  password: import("redux").Reducer<import("../features/app/password/passwordStore").PasswordState, import("redux").AnyAction>;
9
9
  signIn: import("redux").Reducer<import("../features/app/signIn/signInStore").SignInState, import("redux").AnyAction>;
10
+ entity: import("redux").Reducer<import("../features/app/entity/entityStore").EntityState, import("redux").AnyAction>;
11
+ otp: import("redux").Reducer<import("../features/app/otp/otpStore").OtpState, import("redux").AnyAction>;
12
+ auth: import("redux").Reducer<import("../features/app/auth/authStore").AuthState, import("redux").AnyAction>;
10
13
  };
11
14
  export default rootReducer;
@@ -6,6 +6,9 @@ import tax from '../features/app/tax/taxStore';
6
6
  import individual from '../features/app/individual/individualStore';
7
7
  import password from '../features/app/password/passwordStore';
8
8
  import signIn from '../features/app/signIn/signInStore';
9
+ import entity from '../features/app/entity/entityStore';
10
+ import otp from '../features/app/otp/otpStore';
11
+ import auth from '../features/app/auth/authStore';
9
12
  var rootReducer = {
10
13
  settings: settings,
11
14
  connect: connect,
@@ -14,6 +17,9 @@ var rootReducer = {
14
17
  tax: tax,
15
18
  individual: individual,
16
19
  password: password,
17
- signIn: signIn
20
+ signIn: signIn,
21
+ entity: entity,
22
+ otp: otp,
23
+ auth: auth
18
24
  };
19
25
  export default rootReducer;
@@ -47,8 +47,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
47
47
  };
48
48
  var _a;
49
49
  import { createAsyncThunk, createSlice } from '@reduxjs/toolkit';
50
- import { getStoredData, storeData, isArray, findItem, getBrowserInfo, getFingerPrint, sortCountries, findCountryByIso2, getRequestHeaders, encryptString } from '../utils';
51
- import { defaultCountry, DefaultDeviceInfo, LOCAL_STORAGE_KEYS } from '../constants';
50
+ import { getStoredData, storeData, isArray, findItem, getBrowserInfo, getFingerPrint, sortCountries, findCountryByIso2, getRequestHeaders, encryptString, removeElement } from '../utils';
51
+ import { defaultCountry, DefaultDeviceInfo, LOCAL_STORAGE_KEYS, DIALOG_ID, BACKGROUND_ID } from '../constants';
52
52
  import i18n from '../i18n';
53
53
  import { updateLocale } from '../utils/locale';
54
54
  import API, { setAxiosGlobalHeaders } from '../api';
@@ -141,6 +141,12 @@ export var settingsSlice = createSlice({
141
141
  },
142
142
  handleOpen: function (state, action) {
143
143
  state.data.open = action.payload;
144
+ if (action.payload === false) {
145
+ setTimeout(function () {
146
+ removeElement(DIALOG_ID);
147
+ removeElement(BACKGROUND_ID);
148
+ }, 1000);
149
+ }
144
150
  },
145
151
  handleSkin: function (state, action) {
146
152
  state.data.skin = action.payload;
@@ -8,7 +8,10 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
8
8
  individual: import("../features/app/individual/individualStore").IndividualState;
9
9
  password: import("../features/app/password/passwordStore").PasswordState;
10
10
  signIn: import("../features/app/signIn/signInStore").SignInState;
11
- }, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("redux-thunk").ThunkMiddleware<{
11
+ entity: import("../features/app/entity/entityStore").EntityState;
12
+ otp: import("../features/app/otp/otpStore").OtpState;
13
+ auth: import("../features/app/auth/authStore").AuthState;
14
+ }, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<{
12
15
  settings: import("./settings").SettingsState;
13
16
  connect: import("../features/app/connect/connectStore").ConnectState;
14
17
  business: import("../features/app/business/businessStore").BusinessState;
@@ -17,6 +20,9 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
17
20
  individual: import("../features/app/individual/individualStore").IndividualState;
18
21
  password: import("../features/app/password/passwordStore").PasswordState;
19
22
  signIn: import("../features/app/signIn/signInStore").SignInState;
23
+ entity: import("../features/app/entity/entityStore").EntityState;
24
+ otp: import("../features/app/otp/otpStore").OtpState;
25
+ auth: import("../features/app/auth/authStore").AuthState;
20
26
  }, import("redux").AnyAction, undefined>]>>;
21
27
  export declare type AppDispatch = typeof store.dispatch;
22
28
  export declare type RootState = ReturnType<typeof store.getState>;
@@ -141,7 +141,7 @@
141
141
  "signup_email_placeholder": "مثل g@example.com",
142
142
  "signup_enter_mobile": "رقم الجوال",
143
143
  "signup_generic_error": "حدث خطأ ما يرجى إعادة المحاولة لاحقاً",
144
- "signup_instagram_placeholder": "حساب انستجرام",
144
+ "signup_instagram_placeholder": "Enter your Instagram handle",
145
145
  "signup_invalid_iqama_id_format": "يجب أن تبدأ الإقامة بالرقم {{number}}",
146
146
  "signup_invalid_national_id": "الرجاء ادخال رقم هوية صحيح",
147
147
  "signup_invalid_national_id_format": "يجب أن تبدأ الهوية الوطنية بالرقم {{number}}",
@@ -149,9 +149,9 @@
149
149
  "signup_merchant_name_label": "الاسم بالكامل",
150
150
  "signup_merchant_name_placeholder": "الاسم بالكامل",
151
151
  "signup_select_country": "دولتك",
152
- "signup_twitter_placeholder": "حساب تويتر",
152
+ "signup_twitter_placeholder": "Enter your Twitter handle",
153
153
  "signup_user_not_exists_error": "المستخدم غير مسجل مع تاب",
154
- "signup_website_placeholder": "رابط الموقع",
154
+ "signup_website_placeholder": "Enter your website URL",
155
155
  "signup_welcoming": "مرحبا {{username}},",
156
156
  "signup_welcoming_hi": "مرحبا,",
157
157
  "start_with_number": "رقم الجوال يجب ان يبدا ب {{number}}",
@@ -244,5 +244,15 @@
244
244
  "reset_password_success_title": "لقد ارسلنا رسالة بريدية إليك",
245
245
  "reset_password_success_description": "تحقق من بريدك الإلكتروني لإعادة تعيين كلمة المرور الخاصة بك.",
246
246
  "license_name_label": "اسم الرخصة",
247
- "email_button_label": "تواصل مع البريد الإلكتروني"
247
+ "email_button_label": "تواصل مع البريد الإلكتروني",
248
+ "apple_store_placeholder": "Enter your app name (iOS)",
249
+ "play_store_placeholder": "Enter your app name (Google Play Store)",
250
+ "physical_store_placeholder": "Enter your store address or Google Map URL",
251
+ "call_center_placeholder": "Enter your Call Center number",
252
+ "back": "Back",
253
+ "civil_id_placeholder": "28xxxxxxxx53",
254
+ "enter_civil_id": "Please enter your civil ID",
255
+ "invalid_civil_id": "Please enter valid civil ID",
256
+ "authenticate_kuwait_mobile_title": "Authenticate with Kuwait Mobile ID app",
257
+ "authenticate_kuwait_mobile_description": "Please go to your Kuwait Mobile ID app and accept the authentication request from Tap."
248
258
  }
@@ -150,7 +150,7 @@
150
150
  "signup_email_placeholder": "Your Email address",
151
151
  "signup_enter_mobile": "Your mobile number",
152
152
  "signup_generic_error": "Something went wrong! Please try again later.",
153
- "signup_instagram_placeholder": "mybusiness",
153
+ "signup_instagram_placeholder": "Enter your Instagram handle",
154
154
  "signup_invalid_iqama_id_format": "May you please verify the entered identification number. (Note - Saudi Iqama's start with {{number}})",
155
155
  "signup_invalid_national_id": "May you please verify the entered identification number",
156
156
  "signup_invalid_national_id_format": "May you please verify the entered identification number. (Note - Saudi national IDs start with {{number}})",
@@ -158,9 +158,9 @@
158
158
  "signup_merchant_name_label": "Full name",
159
159
  "signup_merchant_name_placeholder": "Full name",
160
160
  "signup_select_country": "Your country of business",
161
- "signup_twitter_placeholder": "mybusiness",
161
+ "signup_twitter_placeholder": "Enter your Twitter handle",
162
162
  "signup_user_not_exists_error": "May you please verify the entered user.",
163
- "signup_website_placeholder": "www.mybusiness.com",
163
+ "signup_website_placeholder": "Enter your website URL",
164
164
  "signup_welcoming": "Hello {{username}},",
165
165
  "signup_welcoming_hi": "Hello,",
166
166
  "start_with_number": "May you please verify the entered mobile. (Note - mobile numbers start with {{number}})",
@@ -264,5 +264,15 @@
264
264
  "reset_password_success_title": "We sent you an email",
265
265
  "reset_password_success_description": "Check your email to reset your password.",
266
266
  "license_name_label": "License Name",
267
- "email_button_label": "Continue with Email"
267
+ "email_button_label": "Continue with Email",
268
+ "apple_store_placeholder": "Enter your app name (iOS)",
269
+ "play_store_placeholder": "Enter your app name (Google Play Store)",
270
+ "physical_store_placeholder": "Enter your store address or Google Map URL",
271
+ "call_center_placeholder": "Enter your Call Center number",
272
+ "back": "Back",
273
+ "civil_id_placeholder": "28xxxxxxxx53",
274
+ "enter_civil_id": "Please enter your civil ID",
275
+ "invalid_civil_id": "Please enter valid civil ID",
276
+ "authenticate_kuwait_mobile_title": "Authenticate with Kuwait Mobile ID app",
277
+ "authenticate_kuwait_mobile_description": "Please go to your Kuwait Mobile ID app and accept the authentication request from Tap."
268
278
  }
@@ -9,5 +9,8 @@ export interface AnimationFlowProps {
9
9
  loading?: boolean;
10
10
  error?: string | null;
11
11
  screenId?: string;
12
+ animationType?: 'slide' | 'fade' | 'collapse';
13
+ onClose?: () => void;
14
+ onConfirm?: () => void;
12
15
  }
13
- export default function AnimationFlow({ open, children, breakpoint, type, footer, loading, error, isTapOrigin, screenId }: AnimationFlowProps): JSX.Element;
16
+ export default function AnimationFlow({ open, children, breakpoint, type, footer, loading, error, isTapOrigin, screenId, animationType, onClose, onConfirm }: AnimationFlowProps): JSX.Element;
@@ -10,16 +10,14 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
- import { useTheme } from '@mui/material/styles';
14
- import useMediaQuery from '@mui/material/useMediaQuery';
13
+ import { useScreen } from '../../hooks';
15
14
  import Dialog from './Dialog';
16
15
  import BottomSheet from './BottomSheet';
17
16
  import Loader from './Loader';
18
17
  import Error from './Error';
19
18
  export default function AnimationFlow(_a) {
20
- var open = _a.open, children = _a.children, breakpoint = _a.breakpoint, type = _a.type, footer = _a.footer, loading = _a.loading, error = _a.error, isTapOrigin = _a.isTapOrigin, screenId = _a.screenId;
21
- var theme = useTheme();
22
- var matches = useMediaQuery(theme.breakpoints.down(breakpoint || 'sm'));
19
+ var open = _a.open, children = _a.children, breakpoint = _a.breakpoint, type = _a.type, footer = _a.footer, loading = _a.loading, error = _a.error, isTapOrigin = _a.isTapOrigin, screenId = _a.screenId, animationType = _a.animationType, onClose = _a.onClose, onConfirm = _a.onConfirm;
20
+ var small = useScreen(breakpoint).small;
23
21
  if (loading) {
24
22
  return _jsx(Loader, {});
25
23
  }
@@ -27,10 +25,10 @@ export default function AnimationFlow(_a) {
27
25
  return _jsx(Error, { error: error });
28
26
  }
29
27
  if (type === 'PUPOP') {
30
- return (_jsx(Dialog, __assign({ footer: footer, open: open, isTapOrigin: isTapOrigin }, { children: children })));
28
+ return (_jsx(Dialog, __assign({ onClose: onClose, onConfirm: onConfirm, footer: footer, open: open, isTapOrigin: isTapOrigin, animationType: animationType }, { children: children })));
31
29
  }
32
30
  if (type === 'BOTTOMSHEET') {
33
31
  return _jsx(BottomSheet, __assign({ open: open }, { children: children }));
34
32
  }
35
- return matches ? (_jsx(BottomSheet, __assign({ open: open, screenId: screenId }, { children: children }))) : (_jsx(Dialog, __assign({ open: open, footer: footer, isTapOrigin: isTapOrigin }, { children: children })));
33
+ return small ? (_jsx(BottomSheet, __assign({ open: open, screenId: screenId }, { children: children }))) : (_jsx(Dialog, __assign({ onClose: onClose, onConfirm: onConfirm, open: open, footer: footer, isTapOrigin: isTapOrigin, animationType: animationType }, { children: children })));
36
34
  }
@@ -41,7 +41,8 @@ var BottomSheetStyled = styled(BottomSheet)(function (_a) {
41
41
  width: '100vw'
42
42
  },
43
43
  '[data-rsbs-overlay]': {
44
- backgroundColor: theme.palette.background.paper
44
+ backgroundColor: theme.palette.background.paper,
45
+ zIndex: 9999
45
46
  },
46
47
  '[data-rsbs-scroll]': {
47
48
  '&::-webkit-scrollbar': {
@@ -6,6 +6,9 @@ export interface DialogProps extends MUIDialogProps {
6
6
  children: React.ReactNode;
7
7
  footer?: React.ReactNode;
8
8
  transitionDuration?: number;
9
+ animationType?: 'slide' | 'fade' | 'collapse';
10
+ onClose?: () => void;
11
+ onConfirm?: () => void;
9
12
  }
10
- declare const _default: React.MemoExoticComponent<({ open, children, footer, transitionDuration, isTapOrigin, ...rest }: DialogProps) => JSX.Element>;
13
+ declare const _default: React.MemoExoticComponent<({ open, children, footer, transitionDuration, isTapOrigin, animationType, onClose, onConfirm, ...rest }: DialogProps) => JSX.Element>;
11
14
  export default _default;