@tap-payments/connect 2.9.5-development → 2.9.8-development

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 CHANGED
@@ -85,7 +85,7 @@ const ConnectComponent = () => {
85
85
  content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no"
86
86
  />
87
87
  <title>Auth-JsConnect</title>
88
- <script src="https://tap-sdks.b-cdn.net/connect/build-2.9.5-development/main.js"></script>
88
+ <script src="https://tap-sdks.b-cdn.net/connect/build-2.9.8-development/main.js"></script>
89
89
  </head>
90
90
  <body>
91
91
  <div id="root"></div>
@@ -137,34 +137,35 @@ const ConnectComponent = () => {
137
137
 
138
138
  ## Properties
139
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
- | boardMaturity `optional` | `boolean` | Decide the board maturity |
158
- | settingData `optional` | `boolean` | This is to get settings information. It is used board kit and other kits open from board |
159
- | postURL `optional` | `string` | The POST Method URL used to push te data from our server to the merchant server and |
160
- | | | it's required only if `mature` is `false` |
161
- | redirectUrl `optional` | `string` | This redirect url after verify authentication go to merchant website |
162
- | | | It is `required` if scope is `auth` and mode is `page` |
163
- | onReady `optional` | `function` | Callback function to handle the ready state of the `TapConnect` |
164
- | onCreated `optional` | `function` | Callback function to called the the account created successfully |
165
- | | | it calls only if `mature` is `false` |
166
- | onSuccess `optional` | `function` | Callback function to handle the success response, it will run after the user finish the flow |
167
- | onError `optional` | `function` | Callback function to handle the error response, it will run if the user face any error |
168
- | onClose `optional` | `function` | Callback function to called when `TapConnect` get close |
169
- | onBoardCompleted `optional` | `function` | Callback function to called when you complete all flows |
170
- | onSettingFetched `optional` | `function` | Callback function to called after fetch settings information. It is used board kit and other kits open from board |
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 |
@@ -10,6 +10,7 @@ export interface ConfigInfo {
10
10
  connect?: Redirect;
11
11
  platforms?: string[];
12
12
  payment_provider?: PaymentProvider;
13
+ notification?: SDKNotification;
13
14
  }
14
15
  export interface ConnectFeatures {
15
16
  poweredBy?: boolean;
@@ -24,6 +25,10 @@ export interface ConnectFeatures {
24
25
  disableNafath?: boolean;
25
26
  disablePaci?: boolean;
26
27
  }
28
+ export interface SDKNotification {
29
+ email: boolean;
30
+ mobile?: boolean;
31
+ }
27
32
  export interface PaymentProvider {
28
33
  technology_id: string;
29
34
  settlement_by: string;
@@ -1,5 +1,5 @@
1
1
  import { Language } from '../constants';
2
- import { ConfigInfo, ConnectFeatures, SettingAsyncData } from './config';
2
+ import { ConfigInfo, ConnectFeatures, SDKNotification, SettingAsyncData } from './config';
3
3
  export interface ConnectProps {
4
4
  elementId: string;
5
5
  publicKey: string;
@@ -20,6 +20,7 @@ export interface ConnectProps {
20
20
  data?: Array<string>;
21
21
  settingData?: SettingAsyncData;
22
22
  features?: ConnectFeatures;
23
+ notification?: SDKNotification;
23
24
  onError?: (err: Error) => void;
24
25
  onReady?: () => void;
25
26
  onClose?: () => void;
@@ -44,6 +45,7 @@ export interface OriginalConnectProps {
44
45
  showBoard?: boolean;
45
46
  boardMaturity?: boolean;
46
47
  features?: ConnectFeatures;
48
+ notification?: SDKNotification;
47
49
  verifyToken?: string;
48
50
  onFlowCompleted: (res: object, headers?: Record<string, string>) => void;
49
51
  onError: (err: any) => void;
@@ -1,4 +1,4 @@
1
- export declare const CDN_LIBRARY_BASE_URL = "https://auth-jsconnect.b-cdn.net/build-2.9.5-development";
1
+ export declare const CDN_LIBRARY_BASE_URL = "https://auth-jsconnect.b-cdn.net/build-2.9.8-development";
2
2
  export declare const Maturity: {
3
3
  readonly FULL: "full";
4
4
  readonly EXPRESS: "express";
@@ -1,4 +1,4 @@
1
- export var CDN_LIBRARY_BASE_URL = 'https://auth-jsconnect.b-cdn.net/build-2.9.5-development';
1
+ export var CDN_LIBRARY_BASE_URL = 'https://auth-jsconnect.b-cdn.net/build-2.9.8-development';
2
2
  export var Maturity = {
3
3
  FULL: 'full',
4
4
  EXPRESS: 'express'
@@ -3,5 +3,5 @@ type ExtraProps = {
3
3
  verifyToken?: string;
4
4
  onBoardButtonClick?: (data: Record<string, string>) => void;
5
5
  };
6
- export declare const wrapLibConfig: ({ publicKey, open, mode, language, country, scope, lead, postURL, onError, onReady, onSuccess, board, verifyToken, domain, onBoardButtonClick, onClose, onCreated, onBoardCompleted, boardMaturity, data, redirectUrl, features }: ConnectProps & ExtraProps) => OriginalConnectProps;
6
+ export declare const wrapLibConfig: ({ publicKey, open, mode, language, country, scope, lead, postURL, onError, onReady, onSuccess, board, verifyToken, domain, onBoardButtonClick, onClose, onCreated, onBoardCompleted, boardMaturity, data, redirectUrl, features, notification }: ConnectProps & ExtraProps) => OriginalConnectProps;
7
7
  export {};
@@ -1,5 +1,5 @@
1
1
  export var wrapLibConfig = function (_a) {
2
- var publicKey = _a.publicKey, open = _a.open, mode = _a.mode, language = _a.language, country = _a.country, scope = _a.scope, lead = _a.lead, postURL = _a.postURL, onError = _a.onError, onReady = _a.onReady, onSuccess = _a.onSuccess, board = _a.board, verifyToken = _a.verifyToken, domain = _a.domain, onBoardButtonClick = _a.onBoardButtonClick, onClose = _a.onClose, onCreated = _a.onCreated, onBoardCompleted = _a.onBoardCompleted, boardMaturity = _a.boardMaturity, data = _a.data, redirectUrl = _a.redirectUrl, features = _a.features;
2
+ var publicKey = _a.publicKey, open = _a.open, mode = _a.mode, language = _a.language, country = _a.country, scope = _a.scope, lead = _a.lead, postURL = _a.postURL, onError = _a.onError, onReady = _a.onReady, onSuccess = _a.onSuccess, board = _a.board, verifyToken = _a.verifyToken, domain = _a.domain, onBoardButtonClick = _a.onBoardButtonClick, onClose = _a.onClose, onCreated = _a.onCreated, onBoardCompleted = _a.onBoardCompleted, boardMaturity = _a.boardMaturity, data = _a.data, redirectUrl = _a.redirectUrl, features = _a.features, notification = _a.notification;
3
3
  return {
4
4
  appInfo: {
5
5
  name: window.location.hostname || window.location.origin
@@ -19,6 +19,7 @@ export var wrapLibConfig = function (_a) {
19
19
  boardMaturity: boardMaturity,
20
20
  verifyToken: verifyToken,
21
21
  features: features,
22
+ notification: notification,
22
23
  onFlowCompleted: function (res) {
23
24
  onSuccess && onSuccess(res);
24
25
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/connect",
3
- "version": "2.9.5-development",
3
+ "version": "2.9.8-development",
4
4
  "description": "Tap Connect",
5
5
  "main": "build/index.js",
6
6
  "module": "build/index.js",