@tap-payments/connect 2.10.6-beta → 2.10.8-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.
- package/README.md +171 -171
- package/build/@types/config.d.ts +64 -63
- package/build/@types/config.js +1 -1
- package/build/@types/index.d.ts +74 -74
- package/build/@types/index.js +1 -1
- package/build/api/index.d.ts +12 -12
- package/build/api/index.js +95 -95
- package/build/constants/index.d.ts +17 -17
- package/build/constants/index.js +17 -17
- package/build/features/Connect/Connect.d.ts +5 -5
- package/build/features/Connect/Connect.js +156 -150
- package/build/features/Connect/ConnectAuth.d.ts +7 -7
- package/build/features/Connect/ConnectAuth.js +115 -115
- package/build/features/Connect/ConnectBank.d.ts +12 -12
- package/build/features/Connect/ConnectBank.js +118 -118
- package/build/features/Connect/ConnectBoard.d.ts +10 -10
- package/build/features/Connect/ConnectBoard.js +117 -117
- package/build/features/Connect/ConnectBrand.d.ts +12 -12
- package/build/features/Connect/ConnectBrand.js +118 -118
- package/build/features/Connect/ConnectEntity.d.ts +12 -12
- package/build/features/Connect/ConnectEntity.js +118 -118
- package/build/features/Connect/ConnectExpress.d.ts +4 -4
- package/build/features/Connect/ConnectExpress.js +82 -78
- package/build/features/Connect/ConnectFull.d.ts +4 -4
- package/build/features/Connect/ConnectFull.js +13 -13
- package/build/features/Connect/ConnectIndividual.d.ts +12 -12
- package/build/features/Connect/ConnectIndividual.js +118 -118
- package/build/features/Connect/ConnectPassword.d.ts +12 -12
- package/build/features/Connect/ConnectPassword.js +118 -118
- package/build/features/Connect/ConnectTax.d.ts +12 -12
- package/build/features/Connect/ConnectTax.js +118 -118
- package/build/features/Connect/index.d.ts +11 -11
- package/build/features/Connect/index.js +10 -10
- package/build/hooks/index.d.ts +2 -2
- package/build/hooks/index.js +2 -2
- package/build/hooks/useScript.d.ts +1 -1
- package/build/hooks/useScript.js +39 -39
- package/build/hooks/useStyle.d.ts +1 -1
- package/build/hooks/useStyle.js +13 -13
- package/build/index.d.ts +4 -4
- package/build/index.js +14 -14
- package/build/utils/common.d.ts +2 -2
- package/build/utils/common.js +16 -16
- package/build/utils/config.d.ts +7 -7
- package/build/utils/config.js +47 -47
- package/build/utils/html.d.ts +1 -1
- package/build/utils/html.js +9 -9
- package/build/utils/index.d.ts +4 -4
- package/build/utils/index.js +4 -4
- package/build/utils/validation.d.ts +8 -8
- package/build/utils/validation.js +190 -190
- package/package.json +106 -108
package/README.md
CHANGED
|
@@ -1,171 +1,171 @@
|
|
|
1
|
-
# Connect Package
|
|
2
|
-
|
|
3
|
-
Handling user onboarding and authentication for Tap Payments.
|
|
4
|
-
|
|
5
|
-
## Installs
|
|
6
|
-
|
|
7
|
-
This is a [React](https://reactjs.org/) module available through the
|
|
8
|
-
[npm registry](https://www.npmjs.com/). Installation is done using the
|
|
9
|
-
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
|
|
10
|
-
|
|
11
|
-
```console
|
|
12
|
-
npm install @tap-payments/connect
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
---------------------------- OR -------------------------
|
|
16
|
-
|
|
17
|
-
```console
|
|
18
|
-
yarn add @tap-payments/connect
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Examples
|
|
22
|
-
|
|
23
|
-
### Connect Library
|
|
24
|
-
|
|
25
|
-
### ES6
|
|
26
|
-
|
|
27
|
-
```js
|
|
28
|
-
import { TapConnect, Language } from '@tap-payments/connect'
|
|
29
|
-
|
|
30
|
-
const ConnectComponent = () => {
|
|
31
|
-
return (
|
|
32
|
-
<TapConnect
|
|
33
|
-
// required (the public key of the merchant account provided by Tap Payments)
|
|
34
|
-
publicKey={'pk_test_XXXXXXXXXXXXXXXXXXXXXXX'}
|
|
35
|
-
// required (the domain of the merchant)
|
|
36
|
-
domain={'https://example.com'}
|
|
37
|
-
// required (Language flag to control the language of the connect element and only we support [en,ar])
|
|
38
|
-
language={Language.EN}
|
|
39
|
-
// required (the country ISO2 of the merchant)
|
|
40
|
-
country={'SA'}
|
|
41
|
-
// required (the scope of the merchant)
|
|
42
|
-
scope={'merchant'}
|
|
43
|
-
// merchant data array `ex: [operator]`
|
|
44
|
-
data={[]}
|
|
45
|
-
// optional (Lead Id can be passed in case of you already created a lead using our API )
|
|
46
|
-
lead={'led_xxxxxxxxxxxxxxxxxxxxxx'}
|
|
47
|
-
// required (Decide the mode of connect `normal` or `express`)
|
|
48
|
-
mature={false}
|
|
49
|
-
// optional (show/hide board screen after creating an account)
|
|
50
|
-
board={true}
|
|
51
|
-
// optional ( Decide the board maturity )
|
|
52
|
-
boardMaturity={false}
|
|
53
|
-
// optional ( Decide to show connect as a `popup` or `page` to our connect domain. Default value is `popup` )
|
|
54
|
-
mode={'popup'}
|
|
55
|
-
// required (boolean to open/close the connect element)
|
|
56
|
-
open={true}
|
|
57
|
-
// optional (The POST Method URL used to push te data from our server to the merchant server)
|
|
58
|
-
postURL={'https://api.example.com/post'}
|
|
59
|
-
// This redirect url after verify authentication go to merchant website
|
|
60
|
-
redirectUrl={''}
|
|
61
|
-
//optional (Callback function to handle the ready state of the TapConnect )
|
|
62
|
-
onReady={() => console.log('onReady')}
|
|
63
|
-
// optional (Callback function runs after creating an account)
|
|
64
|
-
onCreated={(data) => console.log('onCreated', data)}
|
|
65
|
-
// optional (Callback function runs when the user close TaConnect)
|
|
66
|
-
onClose={() => console.log('onClose')}
|
|
67
|
-
// optional (Callback function to handle the error)
|
|
68
|
-
onError={(err) => console.log('onError', err)}
|
|
69
|
-
// optional (Callback function runs after finishing all the flows)
|
|
70
|
-
onBoardCompleted={() => console.log('onBoardCompleted')}
|
|
71
|
-
/>
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Vanilla JS
|
|
77
|
-
|
|
78
|
-
```js
|
|
79
|
-
<!DOCTYPE html>
|
|
80
|
-
<html lang="en">
|
|
81
|
-
<head>
|
|
82
|
-
<meta charset="utf-8" />
|
|
83
|
-
<meta
|
|
84
|
-
name="viewport"
|
|
85
|
-
content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no"
|
|
86
|
-
/>
|
|
87
|
-
<title>Auth-JsConnect</title>
|
|
88
|
-
<script src="https://tap-sdks.b-cdn.net/connect/build-2.10.
|
|
89
|
-
</head>
|
|
90
|
-
<body>
|
|
91
|
-
<div id="root"></div>
|
|
92
|
-
<script>
|
|
93
|
-
// once our cdn script is loaded we can use the window.TapPayments object
|
|
94
|
-
const { renderTapConnect, Language } = window.TapPayments
|
|
95
|
-
let unmountConnect = null
|
|
96
|
-
const startConnectAuth = () => {
|
|
97
|
-
const { unmount } = renderTapConnect(
|
|
98
|
-
{
|
|
99
|
-
publicKey: 'pk_test_xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
100
|
-
language: Language.EN,
|
|
101
|
-
domain: 'https://example.com',
|
|
102
|
-
country: 'SA',
|
|
103
|
-
scope: 'merchant',
|
|
104
|
-
data: [],
|
|
105
|
-
lead: 'led_xxxxxxxxxxxxxxxxxxxxxx',
|
|
106
|
-
mature: false,
|
|
107
|
-
board: true,
|
|
108
|
-
boardMaturity: false,
|
|
109
|
-
mode: "popup",
|
|
110
|
-
open: true,
|
|
111
|
-
postURL: 'https://api.example.com/post',
|
|
112
|
-
redirectUrl: '',
|
|
113
|
-
onReady: () => console.log('onReady'),
|
|
114
|
-
onCreated: (data) => console.log('onCreated', data),
|
|
115
|
-
onError: (err) => console.log('onError', err),
|
|
116
|
-
onClose: () => console.log('onClose'),
|
|
117
|
-
onBoardCompleted: () => console.log('onBoardCompleted'),
|
|
118
|
-
|
|
119
|
-
},
|
|
120
|
-
'root'
|
|
121
|
-
)
|
|
122
|
-
// save the unmount function to be able to unmount the component
|
|
123
|
-
unmountConnect = unmount
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const stopConnectAuth = () => {
|
|
127
|
-
unmountConnect && unmountConnect()
|
|
128
|
-
}
|
|
129
|
-
</script>
|
|
130
|
-
<button onclick="startConnectAuth()">Start</button>
|
|
131
|
-
<button onclick="stopConnectAuth()">Stop</button>
|
|
132
|
-
</body>
|
|
133
|
-
</html>
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
## Properties
|
|
139
|
-
|
|
140
|
-
| name | type | description |
|
|
141
|
-
| ----------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
142
|
-
| publicKey `required` | `string` | Public key of the merchant account provided by Tap Payments |
|
|
143
|
-
| domain `required` | `string` | Domain of the merchant |
|
|
144
|
-
| language `required` | `Languages` | language flag to control the language of the connect element and only accept [ar,en] |
|
|
145
|
-
| country `required` | `string` | Country ISO2 of the merchant |
|
|
146
|
-
| scope `required` | `string` | the scope of the merchant available values [merchant, auth] |
|
|
147
|
-
| data `optional` | `Array<string>` | Merchant data array `ex: [operator]` |
|
|
148
|
-
| lead `optional` | `string` | Lead Id can be passed in case of you already created a lead using our API |
|
|
149
|
-
| mode `required` | `string` | Decide to show connect as a `popup` or `page` or `content` to our connect domain. Default value is `popup`. `content` mode only used for board kit |
|
|
150
|
-
| mature `required` | `boolean` | Decide the mode of connect `normal` or `express` |
|
|
151
|
-
| board `optional` | `string` | Show/Hide board screens |
|
|
152
|
-
| open `required` | `boolean` | Open/Close the connect library |
|
|
153
|
-
| features.dialogStartTransition `optional` | `left or right or up or down` | Used to handle **auth** slide animation direction when open popup for auth kit |
|
|
154
|
-
| features.dialogEndTransition `optional` | `left or right or up or down` | Used to handle **auth** slide animation direction when close popup for auth kit |
|
|
155
|
-
| features `object` | `all values true` | Used to show or hide some fields (poweredBy, merchantLogo - Used to hide the merchant logo and it can be used only for auth kit, switchLanguage, overlay - Used to disable the background color and it can be used only for auth kit, loaderOverlay - Used to disable the loader background color and it can be used only for auth kit, tapTextLogo, closeButton - Used enable to close dialog, disableNafath - Used to hide nafath login button in **auth** kit, disablePaci - Used to hide paci login button in **auth** kit) |
|
|
156
|
-
| loaderColor `optional` | `string` | Used to change loader color and it can be used only for board kit |
|
|
157
|
-
| notification `optional` | `object: {email: boolean, mobile?: boolean}` | Express flow decide to send notification to email or mobile after finish create account |
|
|
158
|
-
| boardMaturity `optional` | `boolean` | Decide the board maturity |
|
|
159
|
-
| settingData `optional` | `boolean` | This is to get settings information. It is used board kit and other kits open from board |
|
|
160
|
-
| postURL `optional` | `string` | The POST Method URL used to push te data from our server to the merchant server and |
|
|
161
|
-
| | | it's required only if `mature` is `false` |
|
|
162
|
-
| redirectUrl `optional` | `string` | This redirect url after verify authentication go to merchant website |
|
|
163
|
-
| | | It is `required` if scope is `auth` and mode is `page` |
|
|
164
|
-
| onReady `optional` | `function` | Callback function to handle the ready state of the `TapConnect` |
|
|
165
|
-
| onCreated `optional` | `function` | Callback function to called the the account created successfully |
|
|
166
|
-
| | | it calls only if `mature` is `false` |
|
|
167
|
-
| onSuccess `optional` | `function` | Callback function to handle the success response, it will run after the user finish the flow |
|
|
168
|
-
| onError `optional` | `function` | Callback function to handle the error response, it will run if the user face any error |
|
|
169
|
-
| onClose `optional` | `function` | Callback function to called when `TapConnect` get close |
|
|
170
|
-
| onBoardCompleted `optional` | `function` | Callback function to called when you complete all flows |
|
|
171
|
-
| onSettingFetched `optional` | `function` | Callback function to called after fetch settings information. It is used board kit and other kits open from board |
|
|
1
|
+
# Connect Package
|
|
2
|
+
|
|
3
|
+
Handling user onboarding and authentication for Tap Payments.
|
|
4
|
+
|
|
5
|
+
## Installs
|
|
6
|
+
|
|
7
|
+
This is a [React](https://reactjs.org/) module available through the
|
|
8
|
+
[npm registry](https://www.npmjs.com/). Installation is done using the
|
|
9
|
+
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
|
|
10
|
+
|
|
11
|
+
```console
|
|
12
|
+
npm install @tap-payments/connect
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---------------------------- OR -------------------------
|
|
16
|
+
|
|
17
|
+
```console
|
|
18
|
+
yarn add @tap-payments/connect
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Examples
|
|
22
|
+
|
|
23
|
+
### Connect Library
|
|
24
|
+
|
|
25
|
+
### ES6
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import { TapConnect, Language } from '@tap-payments/connect'
|
|
29
|
+
|
|
30
|
+
const ConnectComponent = () => {
|
|
31
|
+
return (
|
|
32
|
+
<TapConnect
|
|
33
|
+
// required (the public key of the merchant account provided by Tap Payments)
|
|
34
|
+
publicKey={'pk_test_XXXXXXXXXXXXXXXXXXXXXXX'}
|
|
35
|
+
// required (the domain of the merchant)
|
|
36
|
+
domain={'https://example.com'}
|
|
37
|
+
// required (Language flag to control the language of the connect element and only we support [en,ar])
|
|
38
|
+
language={Language.EN}
|
|
39
|
+
// required (the country ISO2 of the merchant)
|
|
40
|
+
country={'SA'}
|
|
41
|
+
// required (the scope of the merchant)
|
|
42
|
+
scope={'merchant'}
|
|
43
|
+
// merchant data array `ex: [operator]`
|
|
44
|
+
data={[]}
|
|
45
|
+
// optional (Lead Id can be passed in case of you already created a lead using our API )
|
|
46
|
+
lead={'led_xxxxxxxxxxxxxxxxxxxxxx'}
|
|
47
|
+
// required (Decide the mode of connect `normal` or `express`)
|
|
48
|
+
mature={false}
|
|
49
|
+
// optional (show/hide board screen after creating an account)
|
|
50
|
+
board={true}
|
|
51
|
+
// optional ( Decide the board maturity )
|
|
52
|
+
boardMaturity={false}
|
|
53
|
+
// optional ( Decide to show connect as a `popup` or `page` to our connect domain. Default value is `popup` )
|
|
54
|
+
mode={'popup'}
|
|
55
|
+
// required (boolean to open/close the connect element)
|
|
56
|
+
open={true}
|
|
57
|
+
// optional (The POST Method URL used to push te data from our server to the merchant server)
|
|
58
|
+
postURL={'https://api.example.com/post'}
|
|
59
|
+
// This redirect url after verify authentication go to merchant website
|
|
60
|
+
redirectUrl={''}
|
|
61
|
+
//optional (Callback function to handle the ready state of the TapConnect )
|
|
62
|
+
onReady={() => console.log('onReady')}
|
|
63
|
+
// optional (Callback function runs after creating an account)
|
|
64
|
+
onCreated={(data) => console.log('onCreated', data)}
|
|
65
|
+
// optional (Callback function runs when the user close TaConnect)
|
|
66
|
+
onClose={() => console.log('onClose')}
|
|
67
|
+
// optional (Callback function to handle the error)
|
|
68
|
+
onError={(err) => console.log('onError', err)}
|
|
69
|
+
// optional (Callback function runs after finishing all the flows)
|
|
70
|
+
onBoardCompleted={() => console.log('onBoardCompleted')}
|
|
71
|
+
/>
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Vanilla JS
|
|
77
|
+
|
|
78
|
+
```js
|
|
79
|
+
<!DOCTYPE html>
|
|
80
|
+
<html lang="en">
|
|
81
|
+
<head>
|
|
82
|
+
<meta charset="utf-8" />
|
|
83
|
+
<meta
|
|
84
|
+
name="viewport"
|
|
85
|
+
content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no"
|
|
86
|
+
/>
|
|
87
|
+
<title>Auth-JsConnect</title>
|
|
88
|
+
<script src="https://tap-sdks.b-cdn.net/connect/build-2.10.8-beta/main.js"></script>
|
|
89
|
+
</head>
|
|
90
|
+
<body>
|
|
91
|
+
<div id="root"></div>
|
|
92
|
+
<script>
|
|
93
|
+
// once our cdn script is loaded we can use the window.TapPayments object
|
|
94
|
+
const { renderTapConnect, Language } = window.TapPayments
|
|
95
|
+
let unmountConnect = null
|
|
96
|
+
const startConnectAuth = () => {
|
|
97
|
+
const { unmount } = renderTapConnect(
|
|
98
|
+
{
|
|
99
|
+
publicKey: 'pk_test_xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
100
|
+
language: Language.EN,
|
|
101
|
+
domain: 'https://example.com',
|
|
102
|
+
country: 'SA',
|
|
103
|
+
scope: 'merchant',
|
|
104
|
+
data: [],
|
|
105
|
+
lead: 'led_xxxxxxxxxxxxxxxxxxxxxx',
|
|
106
|
+
mature: false,
|
|
107
|
+
board: true,
|
|
108
|
+
boardMaturity: false,
|
|
109
|
+
mode: "popup",
|
|
110
|
+
open: true,
|
|
111
|
+
postURL: 'https://api.example.com/post',
|
|
112
|
+
redirectUrl: '',
|
|
113
|
+
onReady: () => console.log('onReady'),
|
|
114
|
+
onCreated: (data) => console.log('onCreated', data),
|
|
115
|
+
onError: (err) => console.log('onError', err),
|
|
116
|
+
onClose: () => console.log('onClose'),
|
|
117
|
+
onBoardCompleted: () => console.log('onBoardCompleted'),
|
|
118
|
+
|
|
119
|
+
},
|
|
120
|
+
'root'
|
|
121
|
+
)
|
|
122
|
+
// save the unmount function to be able to unmount the component
|
|
123
|
+
unmountConnect = unmount
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const stopConnectAuth = () => {
|
|
127
|
+
unmountConnect && unmountConnect()
|
|
128
|
+
}
|
|
129
|
+
</script>
|
|
130
|
+
<button onclick="startConnectAuth()">Start</button>
|
|
131
|
+
<button onclick="stopConnectAuth()">Stop</button>
|
|
132
|
+
</body>
|
|
133
|
+
</html>
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Properties
|
|
139
|
+
|
|
140
|
+
| name | type | description |
|
|
141
|
+
| ----------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
142
|
+
| publicKey `required` | `string` | Public key of the merchant account provided by Tap Payments |
|
|
143
|
+
| domain `required` | `string` | Domain of the merchant |
|
|
144
|
+
| language `required` | `Languages` | language flag to control the language of the connect element and only accept [ar,en] |
|
|
145
|
+
| country `required` | `string` | Country ISO2 of the merchant |
|
|
146
|
+
| scope `required` | `string` | the scope of the merchant available values [merchant, auth] |
|
|
147
|
+
| data `optional` | `Array<string>` | Merchant data array `ex: [operator]` |
|
|
148
|
+
| lead `optional` | `string` | Lead Id can be passed in case of you already created a lead using our API |
|
|
149
|
+
| mode `required` | `string` | Decide to show connect as a `popup` or `page` or `content` to our connect domain. Default value is `popup`. `content` mode only used for board kit |
|
|
150
|
+
| mature `required` | `boolean` | Decide the mode of connect `normal` or `express` |
|
|
151
|
+
| board `optional` | `string` | Show/Hide board screens |
|
|
152
|
+
| open `required` | `boolean` | Open/Close the connect library |
|
|
153
|
+
| features.dialogStartTransition `optional` | `left or right or up or down` | Used to handle **auth** slide animation direction when open popup for auth kit |
|
|
154
|
+
| features.dialogEndTransition `optional` | `left or right or up or down` | Used to handle **auth** slide animation direction when close popup for auth kit |
|
|
155
|
+
| features `object` | `all values true` | Used to show or hide some fields (poweredBy, merchantLogo - Used to hide the merchant logo and it can be used only for auth kit, switchLanguage, overlay - Used to disable the background color and it can be used only for auth kit, loaderOverlay - Used to disable the loader background color and it can be used only for auth kit, tapTextLogo, closeButton - Used enable to close dialog, disableNafath - Used to hide nafath login button in **auth** kit, disablePaci - Used to hide paci login button in **auth** kit) |
|
|
156
|
+
| loaderColor `optional` | `string` | Used to change loader color and it can be used only for board kit |
|
|
157
|
+
| notification `optional` | `object: {email: boolean, mobile?: boolean}` | Express flow decide to send notification to email or mobile after finish create account |
|
|
158
|
+
| boardMaturity `optional` | `boolean` | Decide the board maturity |
|
|
159
|
+
| settingData `optional` | `boolean` | This is to get settings information. It is used board kit and other kits open from board |
|
|
160
|
+
| postURL `optional` | `string` | The POST Method URL used to push te data from our server to the merchant server and |
|
|
161
|
+
| | | it's required only if `mature` is `false` |
|
|
162
|
+
| redirectUrl `optional` | `string` | This redirect url after verify authentication go to merchant website |
|
|
163
|
+
| | | It is `required` if scope is `auth` and mode is `page` |
|
|
164
|
+
| onReady `optional` | `function` | Callback function to handle the ready state of the `TapConnect` |
|
|
165
|
+
| onCreated `optional` | `function` | Callback function to called the the account created successfully |
|
|
166
|
+
| | | it calls only if `mature` is `false` |
|
|
167
|
+
| onSuccess `optional` | `function` | Callback function to handle the success response, it will run after the user finish the flow |
|
|
168
|
+
| onError `optional` | `function` | Callback function to handle the error response, it will run if the user face any error |
|
|
169
|
+
| onClose `optional` | `function` | Callback function to called when `TapConnect` get close |
|
|
170
|
+
| onBoardCompleted `optional` | `function` | Callback function to called when you complete all flows |
|
|
171
|
+
| onSettingFetched `optional` | `function` | Callback function to called after fetch settings information. It is used board kit and other kits open from board |
|
package/build/@types/config.d.ts
CHANGED
|
@@ -1,63 +1,64 @@
|
|
|
1
|
-
export interface ConfigInfo {
|
|
2
|
-
operator: Operator;
|
|
3
|
-
scope: string;
|
|
4
|
-
data?: string[];
|
|
5
|
-
lead?: Lead;
|
|
6
|
-
board?: Board;
|
|
7
|
-
interface?: Interface;
|
|
8
|
-
redirect?: Redirect;
|
|
9
|
-
post?: Redirect;
|
|
10
|
-
connect?: Redirect;
|
|
11
|
-
platforms?: string[];
|
|
12
|
-
payment_provider?: PaymentProvider;
|
|
13
|
-
notification?: Notification;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
1
|
+
export interface ConfigInfo {
|
|
2
|
+
operator: Operator;
|
|
3
|
+
scope: string;
|
|
4
|
+
data?: string[];
|
|
5
|
+
lead?: Lead;
|
|
6
|
+
board?: Board;
|
|
7
|
+
interface?: Interface;
|
|
8
|
+
redirect?: Redirect;
|
|
9
|
+
post?: Redirect;
|
|
10
|
+
connect?: Redirect;
|
|
11
|
+
platforms?: string[];
|
|
12
|
+
payment_provider?: PaymentProvider;
|
|
13
|
+
notification?: Notification;
|
|
14
|
+
country?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ConnectFeatures {
|
|
17
|
+
poweredBy?: boolean;
|
|
18
|
+
merchantLogo?: boolean;
|
|
19
|
+
switchLanguage?: boolean;
|
|
20
|
+
overlay?: boolean;
|
|
21
|
+
loaderOverlay?: boolean;
|
|
22
|
+
tapTextLogo?: boolean;
|
|
23
|
+
closeButton?: boolean;
|
|
24
|
+
dialogStartTransition?: 'left' | 'right' | 'up' | 'down';
|
|
25
|
+
dialogEndTransition?: 'left' | 'right' | 'up' | 'down';
|
|
26
|
+
disableNafath?: boolean;
|
|
27
|
+
disablePaci?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface Notification {
|
|
30
|
+
email: boolean;
|
|
31
|
+
mobile?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface PaymentProvider {
|
|
34
|
+
technology_id: string;
|
|
35
|
+
settlement_by: string;
|
|
36
|
+
}
|
|
37
|
+
interface Redirect {
|
|
38
|
+
url: string;
|
|
39
|
+
}
|
|
40
|
+
interface Interface {
|
|
41
|
+
locale?: 'dynamic' | 'ar' | 'en';
|
|
42
|
+
edges?: 'straight' | 'curved';
|
|
43
|
+
}
|
|
44
|
+
interface Board {
|
|
45
|
+
display?: boolean;
|
|
46
|
+
editable?: boolean;
|
|
47
|
+
}
|
|
48
|
+
interface Lead {
|
|
49
|
+
id: string;
|
|
50
|
+
}
|
|
51
|
+
interface Operator {
|
|
52
|
+
public_key: string;
|
|
53
|
+
}
|
|
54
|
+
type RecordType = Record<string, any>;
|
|
55
|
+
export interface SettingAsyncData {
|
|
56
|
+
fingerPrint: RecordType;
|
|
57
|
+
locale: RecordType;
|
|
58
|
+
country_list: RecordType;
|
|
59
|
+
ip_info: RecordType;
|
|
60
|
+
merchant: RecordType;
|
|
61
|
+
operator: RecordType;
|
|
62
|
+
config: RecordType;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
package/build/@types/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|