@tap-payments/auth-jsconnect 2.13.9-beta → 2.14.0-beta

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 (148) hide show
  1. package/build/@types/app.d.ts +2 -1
  2. package/build/@types/app.js +1 -0
  3. package/build/@types/index.d.ts +1 -0
  4. package/build/@types/index.js +1 -0
  5. package/build/@types/terminal.d.ts +104 -0
  6. package/build/@types/terminal.js +1 -0
  7. package/build/api/auth.d.ts +15 -1
  8. package/build/api/index.d.ts +7 -1
  9. package/build/api/index.js +3 -1
  10. package/build/api/terminal.d.ts +25 -0
  11. package/build/api/terminal.js +55 -0
  12. package/build/app/rootReducer.d.ts +1 -0
  13. package/build/app/rootReducer.js +3 -1
  14. package/build/app/store.d.ts +2 -0
  15. package/build/assets/locales/en.json +0 -1
  16. package/build/components/DeviceCard/DeviceCard.d.ts +19 -0
  17. package/build/components/DeviceCard/DeviceCard.js +102 -0
  18. package/build/components/DeviceCard/index.d.ts +3 -0
  19. package/build/components/DeviceCard/index.js +2 -0
  20. package/build/components/OTPTimer/OTPTimer.d.ts +2 -1
  21. package/build/components/OTPTimer/OTPTimer.js +4 -4
  22. package/build/components/TruncatedTooltipText/TruncatedTooltipText.d.ts +7 -0
  23. package/build/components/TruncatedTooltipText/TruncatedTooltipText.js +33 -0
  24. package/build/components/TruncatedTooltipText/index.d.ts +2 -0
  25. package/build/components/TruncatedTooltipText/index.js +2 -0
  26. package/build/constants/app.d.ts +12 -1
  27. package/build/constants/app.js +133 -0
  28. package/build/constants/flows.d.ts +16 -0
  29. package/build/constants/flows.js +16 -0
  30. package/build/constants/validation.d.ts +1 -0
  31. package/build/constants/validation.js +1 -0
  32. package/build/features/app/terminal/terminalStore.d.ts +110 -0
  33. package/build/features/app/terminal/terminalStore.js +703 -0
  34. package/build/features/auth/screens/AuthenticationList/AuthenticationList.js +10 -7
  35. package/build/features/auth/screens/AuthenticationList/EntityLicenseType.d.ts +4 -1
  36. package/build/features/auth/screens/AuthenticationList/EntityLicenseType.js +6 -4
  37. package/build/features/auth/screens/AuthenticationList/EntityList.js +9 -1
  38. package/build/features/business/screens/BusinessType/BusinessType.js +2 -3
  39. package/build/features/business/screens/BusinessType/LicenseList.js +5 -5
  40. package/build/features/connectExpress/screens/AuthenticationList/AuthenticationList.js +10 -10
  41. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.d.ts +4 -1
  42. package/build/features/connectExpress/screens/AuthenticationList/EntityLicenseType.js +6 -4
  43. package/build/features/connectExpress/screens/AuthenticationList/EntityList.js +9 -1
  44. package/build/features/connectExpress/screens/CollectBusinessInfo/LicenseList.js +6 -11
  45. package/build/features/connectExpress/screens/Mobile/Mobile.js +7 -6
  46. package/build/features/featuresScreens.d.ts +1 -0
  47. package/build/features/featuresScreens.js +72 -0
  48. package/build/features/shared/Button/Button.js +1 -1
  49. package/build/features/shared/Button/FlowsButtons.d.ts +1 -0
  50. package/build/features/shared/Button/FlowsButtons.js +2 -2
  51. package/build/features/shared/PushNotification/PushNotification.d.ts +11 -0
  52. package/build/features/shared/PushNotification/PushNotification.js +34 -0
  53. package/build/features/shared/PushNotification/index.d.ts +2 -0
  54. package/build/features/shared/PushNotification/index.js +2 -0
  55. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.d.ts +2 -1
  56. package/build/features/shared/SuccessFlowButtons/SuccessFlowButtons.js +5 -4
  57. package/build/features/shared/SuccessScreen/SuccessScreen.d.ts +3 -1
  58. package/build/features/shared/SuccessScreen/SuccessScreen.js +2 -2
  59. package/build/features/terminal/Terminal.d.ts +14 -0
  60. package/build/features/terminal/Terminal.js +95 -0
  61. package/build/features/terminal/index.d.ts +1 -0
  62. package/build/features/terminal/index.js +1 -0
  63. package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.d.ts +3 -0
  64. package/build/features/terminal/screens/LinkNewTerminal/LinkNewTerminal.js +68 -0
  65. package/build/features/terminal/screens/LinkNewTerminal/index.d.ts +2 -0
  66. package/build/features/terminal/screens/LinkNewTerminal/index.js +2 -0
  67. package/build/features/terminal/screens/LinkNewTerminal/styles.d.ts +10 -0
  68. package/build/features/terminal/screens/LinkNewTerminal/styles.js +28 -0
  69. package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.d.ts +3 -0
  70. package/build/features/terminal/screens/LinkedSuccess/LinkedSuccess.js +50 -0
  71. package/build/features/terminal/screens/LinkedSuccess/index.d.ts +2 -0
  72. package/build/features/terminal/screens/LinkedSuccess/index.js +2 -0
  73. package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.d.ts +3 -0
  74. package/build/features/terminal/screens/LinkedTerminalInfo/LinkedTerminalInfo.js +55 -0
  75. package/build/features/terminal/screens/LinkedTerminalInfo/index.d.ts +2 -0
  76. package/build/features/terminal/screens/LinkedTerminalInfo/index.js +2 -0
  77. package/build/features/terminal/screens/Loading/Loading.d.ts +4 -0
  78. package/build/features/terminal/screens/Loading/Loading.js +10 -0
  79. package/build/features/terminal/screens/Loading/index.d.ts +2 -0
  80. package/build/features/terminal/screens/Loading/index.js +2 -0
  81. package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.d.ts +3 -0
  82. package/build/features/terminal/screens/NoTerminalDeviceLinked/NoTerminalDeviceLinked.js +103 -0
  83. package/build/features/terminal/screens/NoTerminalDeviceLinked/index.d.ts +2 -0
  84. package/build/features/terminal/screens/NoTerminalDeviceLinked/index.js +2 -0
  85. package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.d.ts +36 -0
  86. package/build/features/terminal/screens/NoTerminalDeviceLinked/styles.js +34 -0
  87. package/build/features/terminal/screens/OperatorError/OperatorError.d.ts +5 -0
  88. package/build/features/terminal/screens/OperatorError/OperatorError.js +9 -0
  89. package/build/features/terminal/screens/OperatorError/index.d.ts +2 -0
  90. package/build/features/terminal/screens/OperatorError/index.js +2 -0
  91. package/build/features/terminal/screens/POSDeviceListPage/POSDeviceListPage.d.ts +3 -0
  92. package/build/features/terminal/screens/POSDeviceListPage/POSDeviceListPage.js +50 -0
  93. package/build/features/terminal/screens/POSDeviceListPage/index.d.ts +2 -0
  94. package/build/features/terminal/screens/POSDeviceListPage/index.js +2 -0
  95. package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.d.ts +3 -0
  96. package/build/features/terminal/screens/ResetPasswordSuccess/ResetPasswordSuccess.js +21 -0
  97. package/build/features/terminal/screens/ResetPasswordSuccess/index.d.ts +2 -0
  98. package/build/features/terminal/screens/ResetPasswordSuccess/index.js +2 -0
  99. package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.d.ts +3 -0
  100. package/build/features/terminal/screens/SuccessWithFlowButtons/SuccessWithFlowButtons.js +32 -0
  101. package/build/features/terminal/screens/SuccessWithFlowButtons/index.d.ts +2 -0
  102. package/build/features/terminal/screens/SuccessWithFlowButtons/index.js +2 -0
  103. package/build/features/terminal/screens/TerminalDeviceList/DeviceList.d.ts +9 -0
  104. package/build/features/terminal/screens/TerminalDeviceList/DeviceList.js +20 -0
  105. package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.d.ts +3 -0
  106. package/build/features/terminal/screens/TerminalDeviceList/TerminalDeviceList.js +153 -0
  107. package/build/features/terminal/screens/TerminalDeviceList/index.d.ts +2 -0
  108. package/build/features/terminal/screens/TerminalDeviceList/index.js +2 -0
  109. package/build/features/terminal/screens/TerminalDeviceList/styles.d.ts +9 -0
  110. package/build/features/terminal/screens/TerminalDeviceList/styles.js +13 -0
  111. package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.d.ts +3 -0
  112. package/build/features/terminal/screens/UnlinkedSuccess/UnlinkedSuccess.js +51 -0
  113. package/build/features/terminal/screens/UnlinkedSuccess/index.d.ts +2 -0
  114. package/build/features/terminal/screens/UnlinkedSuccess/index.js +2 -0
  115. package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.d.ts +3 -0
  116. package/build/features/terminal/screens/UnlinkedTerminalInfo/UnlinkedTerminalInfo.js +99 -0
  117. package/build/features/terminal/screens/UnlinkedTerminalInfo/index.d.ts +2 -0
  118. package/build/features/terminal/screens/UnlinkedTerminalInfo/index.js +2 -0
  119. package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.d.ts +26 -0
  120. package/build/features/terminal/screens/UnlinkedTerminalInfo/styles.js +30 -0
  121. package/build/features/terminal/screens/Verify/OTPInput.d.ts +7 -0
  122. package/build/features/terminal/screens/Verify/OTPInput.js +51 -0
  123. package/build/features/terminal/screens/Verify/Verify.d.ts +5 -0
  124. package/build/features/terminal/screens/Verify/Verify.js +89 -0
  125. package/build/features/terminal/screens/Verify/index.d.ts +2 -0
  126. package/build/features/terminal/screens/Verify/index.js +2 -0
  127. package/build/features/terminal/screens/Verify/validation.d.ts +8 -0
  128. package/build/features/terminal/screens/Verify/validation.js +4 -0
  129. package/build/features/terminal/screens/shared/Header.d.ts +10 -0
  130. package/build/features/terminal/screens/shared/Header.js +30 -0
  131. package/build/features/terminal/screens/shared/POSDeviceList.d.ts +11 -0
  132. package/build/features/terminal/screens/shared/POSDeviceList.js +30 -0
  133. package/build/features/terminal/screens/shared/index.d.ts +5 -0
  134. package/build/features/terminal/screens/shared/index.js +5 -0
  135. package/build/features/terminal/screens/shared/styles.d.ts +196 -0
  136. package/build/features/terminal/screens/shared/styles.js +155 -0
  137. package/build/features/terminal/screens/shared/utils.d.ts +7 -0
  138. package/build/features/terminal/screens/shared/utils.js +24 -0
  139. package/build/hooks/useAppDispatch.d.ts +1 -0
  140. package/build/index.d.ts +3 -2
  141. package/build/index.js +4 -2
  142. package/build/theme/palette.js +12 -0
  143. package/build/theme/typography.js +4 -0
  144. package/build/utils/error.d.ts +1 -0
  145. package/build/utils/error.js +3 -0
  146. package/build/utils/string.d.ts +2 -1
  147. package/build/utils/string.js +11 -2
  148. package/package.json +1 -1
@@ -339,7 +339,8 @@ export declare enum FlowsTypes {
339
339
  OTP = "otp",
340
340
  BRAND = "brand",
341
341
  BOARD = "board",
342
- kyc = "kyc"
342
+ kyc = "kyc",
343
+ TERMINAL = "terminal"
343
344
  }
344
345
  export declare type FlowInfo = {
345
346
  name: string;
@@ -35,6 +35,7 @@ export var FlowsTypes;
35
35
  FlowsTypes["BRAND"] = "brand";
36
36
  FlowsTypes["BOARD"] = "board";
37
37
  FlowsTypes["kyc"] = "kyc";
38
+ FlowsTypes["TERMINAL"] = "terminal";
38
39
  })(FlowsTypes || (FlowsTypes = {}));
39
40
  export var AuthForType;
40
41
  (function (AuthForType) {
@@ -4,3 +4,4 @@ export * from './app';
4
4
  export * from './form';
5
5
  export * from './user';
6
6
  export * from './config';
7
+ export * from './terminal';
@@ -4,3 +4,4 @@ export * from './app';
4
4
  export * from './form';
5
5
  export * from './user';
6
6
  export * from './config';
7
+ export * from './terminal';
@@ -0,0 +1,104 @@
1
+ declare type Name = {
2
+ en: string;
3
+ };
4
+ export interface TerminalDeviceInfo {
5
+ id: string;
6
+ display_name: string;
7
+ model: {
8
+ id: string;
9
+ status: string;
10
+ object?: string;
11
+ live_mode: boolean;
12
+ api_version?: string;
13
+ feature_version?: string;
14
+ model: string;
15
+ type: string;
16
+ name: {
17
+ text: string;
18
+ lang: string;
19
+ }[];
20
+ image: string;
21
+ image_url: string;
22
+ };
23
+ serial_number: string;
24
+ }
25
+ export interface TerminalInfo {
26
+ acceptance_status?: string;
27
+ acceptance_status_control?: string;
28
+ api_version?: string;
29
+ authorizes?: {
30
+ status: string;
31
+ status_message: string;
32
+ };
33
+ brand?: {
34
+ id: string;
35
+ logo?: string;
36
+ };
37
+ billingplatform?: {
38
+ id: string;
39
+ };
40
+ charges?: {
41
+ status: string;
42
+ status_message: string;
43
+ };
44
+ device?: {
45
+ id: string;
46
+ created: string;
47
+ display_name: string;
48
+ reference: string;
49
+ logo?: string;
50
+ };
51
+ feature_version?: string;
52
+ id: string;
53
+ legacy_id: string;
54
+ live_mode?: boolean;
55
+ merchant: {
56
+ base_currency?: string;
57
+ country?: string;
58
+ id: string;
59
+ };
60
+ name: Name;
61
+ platform?: {
62
+ brand: {
63
+ id: string;
64
+ logo?: string;
65
+ name: {
66
+ text: string;
67
+ lang: string;
68
+ }[];
69
+ };
70
+ id: string;
71
+ segment: string;
72
+ };
73
+ object?: string;
74
+ refunds?: {
75
+ status: string;
76
+ status_message: string;
77
+ };
78
+ virtual?: boolean;
79
+ wallet?: {
80
+ id: string;
81
+ };
82
+ linked: boolean;
83
+ terminal_device: TerminalDeviceInfo;
84
+ }
85
+ export interface POSInfo {
86
+ id: string;
87
+ object: string;
88
+ live_mode: boolean;
89
+ reference: string;
90
+ display_name: string;
91
+ merchant: {
92
+ id: string;
93
+ legacy_id: string;
94
+ brand: {
95
+ id: string;
96
+ name: {
97
+ lang: string;
98
+ text: string;
99
+ }[];
100
+ logo: string;
101
+ };
102
+ };
103
+ }
104
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -17,10 +17,24 @@ export declare type CivilID = {
17
17
  identification_id: string;
18
18
  country_code: string;
19
19
  };
20
+ export declare type TerminalCredential = {
21
+ terminal?: {
22
+ id: string;
23
+ terminal_device?: {
24
+ id: string;
25
+ };
26
+ };
27
+ merchant?: {
28
+ id: string;
29
+ };
30
+ device: {
31
+ id: string;
32
+ };
33
+ };
20
34
  export declare type CreateAuthBody = {
21
35
  country: string;
22
36
  scope: string;
23
- user_credentail: MobileCredential | EmailCredential | IDCredential | CivilID;
37
+ user_credentail: MobileCredential | EmailCredential | IDCredential | CivilID | TerminalCredential;
24
38
  auth_type?: number;
25
39
  email_url?: string;
26
40
  sign_in?: boolean;
@@ -13,6 +13,7 @@ import { RemoveBrandActivity } from './brand';
13
13
  import { UploadFileBody } from './file';
14
14
  import { DocumentUpdateBody, DocumentInfo, DocumentBody } from './document';
15
15
  import { InitBody } from './init';
16
+ import { GenerateAuthLinkNewTerminalProps, UnlinkTerminalDeviceProps, LinkTerminalDeviceProps } from './terminal';
16
17
  declare const API: {
17
18
  locationService: {
18
19
  getIP: () => Promise<any>;
@@ -164,7 +165,12 @@ declare const API: {
164
165
  initService: {
165
166
  getInitialData: (body: InitBody) => Promise<any>;
166
167
  };
168
+ terminalService: {
169
+ unlinkTerminalDevice: ({ deviceId, ...payload }: UnlinkTerminalDeviceProps) => Promise<any>;
170
+ retrieveTerminalList: (merchants: string[], getTerminalDevice?: boolean) => Promise<any>;
171
+ retrievePOSDevices: (merchants: string[]) => Promise<any>;
172
+ };
167
173
  };
168
- export type { ValidateOperatorBody, CreateAuthBody, ExpressCreateAccountBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthExpressOTPBody, UpdateIndividualBody, UpdateEntityActivityBody, UpdateEntityCapitalBody, BankDocumentInfo, GetUserListBody, GetIndividualListBody, RequestEmailBody, DocumentBody, UpdateEntityAOAFileBody, InitBody, RemoveBrandActivity, RemoveEntityActivity, UpdateIndividualWithTypeBody, UpdateMultipleIndividualBody, ExpressLeadVerifyBody, ConfirmBody, ConfigBody, MerchantListBody, CreateEntityBody, CreateNafathAuthBody, GetUserListSegmentBody, CreateKYCAuthBody };
174
+ export type { ValidateOperatorBody, CreateAuthBody, ExpressCreateAccountBody, VerifyAuthBody, CreateLeadBody, UpdateLeadBody, LeadVerifyBody, LeadOTPVerifyBody, CheckEmailBody, CheckBrandBody, LeadIdentityUpdateBody, EntityInfoBody, CreateAccountBody, EntityBankUpdateBody, CreatePasswordBody, BrandListBody, VerifyOperationAuthBody, ResetPasswordVerifyAuthBody, UpdateBoardBody, UpdateBrandBody, DataElementBody, UploadFileBody, UpdateEntityBody, DocumentUpdateBody, DocumentInfo, VerifyAuthExpressOTPBody, UpdateIndividualBody, UpdateEntityActivityBody, UpdateEntityCapitalBody, BankDocumentInfo, GetUserListBody, GetIndividualListBody, RequestEmailBody, DocumentBody, UpdateEntityAOAFileBody, InitBody, RemoveBrandActivity, RemoveEntityActivity, UpdateIndividualWithTypeBody, UpdateMultipleIndividualBody, ExpressLeadVerifyBody, ConfirmBody, ConfigBody, MerchantListBody, CreateEntityBody, CreateNafathAuthBody, GetUserListSegmentBody, CreateKYCAuthBody, GenerateAuthLinkNewTerminalProps, UnlinkTerminalDeviceProps, LinkTerminalDeviceProps };
169
175
  export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
170
176
  export default API;
@@ -16,6 +16,7 @@ import { brandService } from './brand';
16
16
  import { fileService } from './file';
17
17
  import { documentService } from './document';
18
18
  import { initService } from './init';
19
+ import { terminalService } from './terminal';
19
20
  var API = {
20
21
  locationService: locationService,
21
22
  operatorService: operatorService,
@@ -33,7 +34,8 @@ var API = {
33
34
  brandService: brandService,
34
35
  fileService: fileService,
35
36
  documentService: documentService,
36
- initService: initService
37
+ initService: initService,
38
+ terminalService: terminalService
37
39
  };
38
40
  export { setAxiosGlobalHeaders, removeAxiosGlobalHeaders, axiosInstance, getAxiosHeaders };
39
41
  export default API;
@@ -0,0 +1,25 @@
1
+ export interface GenerateAuthLinkNewTerminalProps {
2
+ merchant: {
3
+ id: string;
4
+ terminal: {
5
+ id: string;
6
+ };
7
+ };
8
+ }
9
+ export interface UnlinkTerminalDeviceProps {
10
+ deviceId: string;
11
+ initiator: string;
12
+ device: {
13
+ id: string;
14
+ };
15
+ }
16
+ export interface LinkTerminalDeviceProps {
17
+ id: string;
18
+ action: string;
19
+ }
20
+ declare const terminalService: {
21
+ unlinkTerminalDevice: ({ deviceId, ...payload }: UnlinkTerminalDeviceProps) => Promise<any>;
22
+ retrieveTerminalList: (merchants: string[], getTerminalDevice?: boolean) => Promise<any>;
23
+ retrievePOSDevices: (merchants: string[]) => Promise<any>;
24
+ };
25
+ export { terminalService };
@@ -0,0 +1,55 @@
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
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { ENDPOINT_PATHS } from '../constants';
24
+ import { httpClient } from './axios';
25
+ var retrieveTerminalList = function (merchants, getTerminalDevice) {
26
+ if (getTerminalDevice === void 0) { getTerminalDevice = true; }
27
+ return httpClient({
28
+ method: 'post',
29
+ url: "".concat(ENDPOINT_PATHS.TERMINAL, "/list"),
30
+ data: __assign({ merchants: merchants }, (getTerminalDevice && { terminal_device: true }))
31
+ });
32
+ };
33
+ var retrievePOSDevices = function (merchants) {
34
+ return httpClient({
35
+ method: 'post',
36
+ url: "".concat(ENDPOINT_PATHS.MERCHANT, "/pos/device/list"),
37
+ data: {
38
+ merchants: merchants
39
+ }
40
+ });
41
+ };
42
+ var unlinkTerminalDevice = function (_a) {
43
+ var deviceId = _a.deviceId, payload = __rest(_a, ["deviceId"]);
44
+ return httpClient({
45
+ method: 'put',
46
+ url: "".concat(ENDPOINT_PATHS.TERMINAL, "/").concat(deviceId, "/unlink"),
47
+ data: payload
48
+ });
49
+ };
50
+ var terminalService = {
51
+ unlinkTerminalDevice: unlinkTerminalDevice,
52
+ retrieveTerminalList: retrieveTerminalList,
53
+ retrievePOSDevices: retrievePOSDevices
54
+ };
55
+ export { terminalService };
@@ -13,5 +13,6 @@ declare const rootReducer: {
13
13
  auth: import("redux").Reducer<import("../features/app/auth/authStore").AuthState, import("redux").AnyAction>;
14
14
  board: import("redux").Reducer<import("../features/app/board/boardStore").BoardState, import("redux").AnyAction>;
15
15
  kyc: import("redux").Reducer<import("../features/app/kyc/kycStore").KYCDataState, import("redux").AnyAction>;
16
+ terminal: import("redux").Reducer<import("../features/app/terminal/terminalStore").TerminalDataState, import("redux").AnyAction>;
16
17
  };
17
18
  export default rootReducer;
@@ -12,6 +12,7 @@ import connectExpress from '../features/app/connectExpress/connectExpressStore';
12
12
  import board from '../features/app/board/boardStore';
13
13
  import auth from '../features/app/auth/authStore';
14
14
  import kyc from '../features/app/kyc/kycStore';
15
+ import terminal from '../features/app/terminal/terminalStore';
15
16
  var rootReducer = {
16
17
  settings: settings,
17
18
  connect: connect,
@@ -26,6 +27,7 @@ var rootReducer = {
26
27
  connectExpress: connectExpress,
27
28
  auth: auth,
28
29
  board: board,
29
- kyc: kyc
30
+ kyc: kyc,
31
+ terminal: terminal
30
32
  };
31
33
  export default rootReducer;
@@ -14,6 +14,7 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
14
14
  auth: import("../features/app/auth/authStore").AuthState;
15
15
  board: import("../features/app/board/boardStore").BoardState;
16
16
  kyc: import("../features/app/kyc/kycStore").KYCDataState;
17
+ terminal: import("../features/app/terminal/terminalStore").TerminalDataState;
17
18
  }, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<{
18
19
  settings: import("./settings").SettingsState;
19
20
  connect: import("../features/app/connect/connectStore").ConnectState;
@@ -29,6 +30,7 @@ export declare const store: import("@reduxjs/toolkit").EnhancedStore<{
29
30
  auth: import("../features/app/auth/authStore").AuthState;
30
31
  board: import("../features/app/board/boardStore").BoardState;
31
32
  kyc: import("../features/app/kyc/kycStore").KYCDataState;
33
+ terminal: import("../features/app/terminal/terminalStore").TerminalDataState;
32
34
  }, import("redux").AnyAction, undefined>]>>;
33
35
  export declare type AppDispatch = typeof store.dispatch;
34
36
  export declare type RootState = ReturnType<typeof store.getState>;
@@ -396,7 +396,6 @@
396
396
  "kyc_token_invalid": "May you please verify link of which you are trying to open.",
397
397
  "kyc_users_description": "Please select an authorized registered ID to approve with {{provider}}",
398
398
  "kyc_verification": "Know Your Customer (KYC)",
399
- "kyc_privacy_policy": "Privacy Policy",
400
399
  "language": "العربية",
401
400
  "license_info": "License information",
402
401
  "license_name_hint": "Enter legal name",
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { CardProps } from '@mui/material/Card';
3
+ export interface DeviceCardProps extends CardProps {
4
+ image?: string;
5
+ name: string;
6
+ deviceId: string;
7
+ deviceIdLabel?: string;
8
+ isLinked?: boolean;
9
+ pairedWith?: string;
10
+ badge?: boolean;
11
+ border?: boolean;
12
+ loading?: boolean;
13
+ arrow?: boolean;
14
+ endAdornment?: React.ReactNode;
15
+ titleSx?: React.CSSProperties;
16
+ }
17
+ export declare const DeviceCard: ({ image, name, deviceId, deviceIdLabel, isLinked, pairedWith, onClick, badge, border, arrow, loading, endAdornment, titleSx, ...rest }: DeviceCardProps) => JSX.Element;
18
+ declare const _default: React.MemoExoticComponent<({ image, name, deviceId, deviceIdLabel, isLinked, pairedWith, onClick, badge, border, arrow, loading, endAdornment, titleSx, ...rest }: DeviceCardProps) => JSX.Element>;
19
+ export default _default;
@@ -0,0 +1,102 @@
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
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
+ import { memo } from 'react';
25
+ import { useTranslation } from 'react-i18next';
26
+ import { alpha, styled, useTheme } from '@mui/material/styles';
27
+ import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos';
28
+ import Card from '@mui/material/Card';
29
+ import Box from '@mui/material/Box';
30
+ import Icon from '../Icon';
31
+ import Loader from '../Loader';
32
+ import TruncatedTooltipText from '../TruncatedTooltipText';
33
+ var DeviceCardContainer = styled(Card, { shouldForwardProp: function (prop) { return !['showBorder'].includes(prop.toString()); } })(function (_a) {
34
+ var _b = _a.theme, spacing = _b.spacing, _c = _b.palette, background = _c.background, components = _c.components, showBorder = _a.showBorder;
35
+ return (__assign({ display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: spacing(2), borderRadius: spacing(0.5), boxShadow: 'none', width: '100%', backgroundColor: background.default, minHeight: spacing(14.125), position: 'relative' }, (showBorder && {
36
+ border: "1px solid ".concat(components.deviceCard.border)
37
+ })));
38
+ });
39
+ var DeviceDetails = styled(Box)(function (_a) {
40
+ var spacing = _a.theme.spacing;
41
+ return ({
42
+ display: 'flex',
43
+ alignItems: 'center',
44
+ gap: spacing(3.125),
45
+ width: '90%'
46
+ });
47
+ });
48
+ var DeviceImage = styled(Icon)(function (_a) {
49
+ var spacing = _a.theme.spacing;
50
+ return ({
51
+ width: spacing(4.5),
52
+ height: 'auto',
53
+ objectFit: 'contain'
54
+ });
55
+ });
56
+ var DeviceInfo = styled(Box)(function (_a) {
57
+ var spacing = _a.theme.spacing;
58
+ return ({
59
+ display: 'flex',
60
+ flexDirection: 'column',
61
+ gap: spacing(1),
62
+ width: '80%'
63
+ });
64
+ });
65
+ var DeviceIdInfo = styled(Box)(function (_a) {
66
+ var _b = _a.theme, typography = _b.typography, palette = _b.palette, spacing = _b.spacing;
67
+ return (__assign(__assign({}, typography.caption_small), { color: alpha(palette.text.primary, 0.6), display: 'flex', flexDirection: 'column', gap: spacing(0.5) }));
68
+ });
69
+ var DeviceIdBold = styled('strong')(function (_a) {
70
+ var palette = _a.theme.palette;
71
+ return ({
72
+ color: palette.components.deviceCard.title
73
+ });
74
+ });
75
+ var Badge = styled(Box, { shouldForwardProp: function (prop) { return !['active'].includes(prop.toString()); } })(function (_a) {
76
+ var _b = _a.theme, direction = _b.direction, spacing = _b.spacing, palette = _b.palette, typography = _b.typography, active = _a.active;
77
+ return (__assign(__assign(__assign({ backgroundColor: palette.components.deviceCard.statusBackground, color: palette.components.deviceCard.statusText }, typography.caption), { fontWeight: typography.fontWeightSemiBold, padding: spacing(0.5, 1, 0.5, 1), position: 'absolute', top: 0, left: direction === 'rtl' ? 0 : 'unset', right: direction === 'rtl' ? 'unset' : '0', borderBottomLeftRadius: spacing(0.5) }), (active && {
78
+ backgroundColor: alpha(palette.primary.main, 0.1),
79
+ color: palette.primary.main
80
+ })));
81
+ });
82
+ var ArrowIcon = styled(ArrowForwardIosIcon)(function (_a) {
83
+ var _b = _a.theme, palette = _b.palette, direction = _b.direction;
84
+ return (__assign({ color: palette.components.deviceCard.title, fontSize: '16px' }, (direction === 'rtl' && {
85
+ transform: 'rotate(180deg)'
86
+ })));
87
+ });
88
+ export var DeviceCard = function (_a) {
89
+ var image = _a.image, name = _a.name, deviceId = _a.deviceId, deviceIdLabel = _a.deviceIdLabel, isLinked = _a.isLinked, pairedWith = _a.pairedWith, onClick = _a.onClick, badge = _a.badge, border = _a.border, arrow = _a.arrow, loading = _a.loading, endAdornment = _a.endAdornment, titleSx = _a.titleSx, rest = __rest(_a, ["image", "name", "deviceId", "deviceIdLabel", "isLinked", "pairedWith", "onClick", "badge", "border", "arrow", "loading", "endAdornment", "titleSx"]);
90
+ var t = useTranslation().t;
91
+ var _b = useTheme(), typography = _b.typography, palette = _b.palette;
92
+ var getEndComponent = function () {
93
+ if (endAdornment)
94
+ return endAdornment;
95
+ if (loading)
96
+ return _jsx(Loader, { innerColor: 'black', outerColor: 'black', size: 10, style: { height: 24, width: 24 }, toggleAnimation: !!loading });
97
+ if (arrow)
98
+ return _jsx(ArrowIcon, {});
99
+ };
100
+ return (_jsxs(DeviceCardContainer, __assign({ onClick: onClick, sx: { cursor: onClick ? 'pointer' : 'default' }, showBorder: border }, rest, { children: [_jsxs(DeviceDetails, { children: [image && _jsx(DeviceImage, { src: image, alt: 'Device' }), _jsxs(DeviceInfo, { children: [_jsx(TruncatedTooltipText, { text: name, style: __assign(__assign(__assign({}, typography.subtitle1), { color: palette.components.deviceCard.title, fontWeight: typography.fontWeightBold }), titleSx) }), _jsxs(DeviceIdInfo, { children: [pairedWith && (_jsxs("span", { children: [t('terminal_paired_with'), ": ", _jsx(DeviceIdBold, { children: pairedWith })] })), _jsxs("span", { children: [t(deviceIdLabel !== null && deviceIdLabel !== void 0 ? deviceIdLabel : 'terminal_device_id'), ": ", _jsx(DeviceIdBold, { children: deviceId })] })] })] })] }), badge && _jsx(Badge, __assign({ active: isLinked }, { children: isLinked ? t('terminal_linked') : t('terminal_unlinked') })), _jsx(Box, __assign({ display: 'flex', alignItems: 'center' }, { children: getEndComponent() }))] })));
101
+ };
102
+ export default memo(DeviceCard);
@@ -0,0 +1,3 @@
1
+ import DeviceCard, { DeviceCardProps } from './DeviceCard';
2
+ export type { DeviceCardProps };
3
+ export default DeviceCard;
@@ -0,0 +1,2 @@
1
+ import DeviceCard from './DeviceCard';
2
+ export default DeviceCard;
@@ -4,9 +4,10 @@ export interface OTPTimerProps extends BoxProps {
4
4
  timeInSeconds?: number;
5
5
  timeEndLabel: string;
6
6
  onResetClick?: () => void;
7
+ failed?: boolean;
7
8
  }
8
9
  declare const _default: React.MemoExoticComponent<{
9
- ({ timeInSeconds, timeEndLabel, onResetClick, ...rest }: OTPTimerProps): JSX.Element;
10
+ ({ timeInSeconds, timeEndLabel, onResetClick, failed, ...rest }: OTPTimerProps): JSX.Element;
10
11
  defaultProps: {
11
12
  time: number;
12
13
  };
@@ -44,7 +44,7 @@ var OTPTimerTextStyled = styled(Text)(function (_a) {
44
44
  });
45
45
  });
46
46
  var OTPTimerComponent = function (_a) {
47
- var timeInSeconds = _a.timeInSeconds, timeEndLabel = _a.timeEndLabel, onResetClick = _a.onResetClick, rest = __rest(_a, ["timeInSeconds", "timeEndLabel", "onResetClick"]);
47
+ var timeInSeconds = _a.timeInSeconds, timeEndLabel = _a.timeEndLabel, onResetClick = _a.onResetClick, failed = _a.failed, rest = __rest(_a, ["timeInSeconds", "timeEndLabel", "onResetClick", "failed"]);
48
48
  var _b = React.useState(timeInSeconds || 60), timeValue = _b[0], seTimeValue = _b[1];
49
49
  React.useEffect(function () {
50
50
  if (timeValue <= 0)
@@ -55,14 +55,14 @@ var OTPTimerComponent = function (_a) {
55
55
  return function () { return clearInterval(interval); };
56
56
  }, [timeValue]);
57
57
  var resetTimer = function () {
58
- if (onResetClick && timeValue == 0) {
58
+ if (onResetClick && (timeValue == 0 || failed)) {
59
59
  onResetClick();
60
60
  seTimeValue(timeInSeconds || 60);
61
61
  }
62
62
  };
63
63
  return (_jsx(OTPTimerStyled, __assign({ onClick: resetTimer }, rest, { children: _jsx(OTPTimerTextStyled, __assign({ variant: 'h4', color: 'primary', sx: {
64
- cursor: timeValue <= 0 && onResetClick ? 'pointer' : 'default'
65
- } }, { children: timeValue > 0 ? (timeValue > 9 ? "00:".concat(timeValue) : "00:0".concat(timeValue)) : timeEndLabel })) })));
64
+ cursor: (timeValue <= 0 || failed) && onResetClick ? 'pointer' : 'default'
65
+ } }, { children: timeValue > 0 && !failed ? (timeValue > 9 ? "00:".concat(timeValue) : "00:0".concat(timeValue)) : timeEndLabel })) })));
66
66
  };
67
67
  OTPTimerComponent.defaultProps = {
68
68
  time: 59
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface TruncatedTooltipTextProps {
3
+ text: string;
4
+ style?: React.CSSProperties;
5
+ }
6
+ declare const TruncatedTooltipText: ({ text, style }: TruncatedTooltipTextProps) => JSX.Element;
7
+ export default TruncatedTooltipText;
@@ -0,0 +1,33 @@
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
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { useRef, useState, useEffect } from 'react';
14
+ import Tooltip from '../Tooltip';
15
+ var TruncatedTooltipText = function (_a) {
16
+ var text = _a.text, style = _a.style;
17
+ var textRef = useRef(null);
18
+ var _b = useState(false), isTruncated = _b[0], setIsTruncated = _b[1];
19
+ var _c = useState(false), hasSpace = _c[0], setHasSpace = _c[1];
20
+ useEffect(function () {
21
+ if (text.includes(' ')) {
22
+ setHasSpace(true);
23
+ return;
24
+ }
25
+ var el = textRef === null || textRef === void 0 ? void 0 : textRef.current;
26
+ if (el) {
27
+ setIsTruncated(el.scrollWidth > el.clientWidth);
28
+ }
29
+ }, [text]);
30
+ var content = (_jsx("span", __assign({ ref: textRef, style: __assign({ whiteSpace: hasSpace ? 'break-spaces' : 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis', display: 'block' }, style) }, { children: text })));
31
+ return isTruncated ? (_jsx(Tooltip, __assign({ title: text, placement: 'top' }, { children: content }))) : (content);
32
+ };
33
+ export default TruncatedTooltipText;
@@ -0,0 +1,2 @@
1
+ import TruncatedTooltipText from './TruncatedTooltipText';
2
+ export default TruncatedTooltipText;
@@ -0,0 +1,2 @@
1
+ import TruncatedTooltipText from './TruncatedTooltipText';
2
+ export default TruncatedTooltipText;
@@ -1,4 +1,4 @@
1
- import { ScreenStepNavigation, BusinessType } from '../@types';
1
+ import { ScreenStepNavigation, BusinessType, POSInfo, TerminalInfo } from '../@types';
2
2
  export declare const CONNECT_DEV_URL = "https://connect.dev.tap.company";
3
3
  export declare const CONNECT_SANDBOX_URL = "https://connect.sandbox.tap.company";
4
4
  export declare const CONNECT_BETA_URL = "https://connect.beta.tap.company";
@@ -15,6 +15,7 @@ export declare const SCOPE_MERCHANT = "merchant";
15
15
  export declare const DEFAULT_COUNTRY_ISO2 = "KW";
16
16
  export declare const NAFATH_VERIFICATION_FAILED = "nafath_verification_failed";
17
17
  export declare const COLLECT_DOB_INFO_NAFATH = "collect_date_of_birth";
18
+ export declare const TERMINAL_PUSH_NOTIFICATION_FAILED = "terminal_push_notification_link_new_terminal_failed";
18
19
  export declare const LANGUAGE_ABBREVIATIONS: {
19
20
  ENGLISH: string;
20
21
  ARABIC: string;
@@ -44,6 +45,7 @@ export declare const TAX_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
44
45
  export declare const SigIn_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
45
46
  export declare const ENTITY_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
46
47
  export declare const BRAND_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
48
+ export declare const TERMINAL_SCREENS_NAVIGATION: Array<ScreenStepNavigation>;
47
49
  export declare const DefaultDeviceInfo: {
48
50
  source: string;
49
51
  device: {
@@ -215,6 +217,13 @@ export declare const KYC_STEP_NAMES: {
215
217
  KYC_VERIFY_NAFATH: string;
216
218
  KYC_COMPLETED: string;
217
219
  };
220
+ export declare const TERMINAL_STEP_NAMES: {
221
+ PHONE_AUTH: string;
222
+ INFO: string;
223
+ SUCCESS: string;
224
+ CREATE_AUTH: string;
225
+ CREATE_TERMINAL_AUTH: string;
226
+ };
218
227
  export declare const RSA_FRONTEND_MW_PUBLIC_KEY = "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCgC9kH1SQvjbXAUXd0PbrDUG8P\nLhRig9pJNBmdQBZjihuaxfkzYu6ToMbIMAfmYgVgQw338/y7aQ8X3m03CXNIlkxo\nOwxKCA8ymKsZQptXJn9IxlPO7yjoFgTFBrpmTgvcC4XO1uoUYTAPq3szK8kj4zgT\nucWG1hSKsOdRU7sl/wIDAQAB\n-----END PUBLIC KEY-----";
219
228
  export declare const ENCRYPTION_FLAG = "encryption_contract";
220
229
  export declare const BACKEND_ENCRYPTION_FLAG = "backend_encryption_contract";
@@ -318,4 +327,6 @@ interface CountryToCurrencyMapping {
318
327
  [countryCode: string]: string;
319
328
  }
320
329
  export declare const COUNTRY_TO_CURRENCY: CountryToCurrencyMapping;
330
+ export declare const SELECTED_TERMINAL_DEFAULT_INFO: TerminalInfo;
331
+ export declare const SELECTED_POS_DEFAULT_INFO: POSInfo;
321
332
  export {};