@tap-payments/auth-jsconnect 2.11.5-development → 2.11.6-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.
@@ -3,7 +3,7 @@ export declare const EntityNameValidationSchema: () => yup.ObjectSchema<import("
3
3
  legalName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
4
4
  licenseType: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
5
5
  entityType: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
6
- licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
6
+ licenseNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
7
7
  unifiedNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
8
8
  issuingDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
9
9
  expiryDate: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
@@ -13,7 +13,7 @@ export declare const EntityNameValidationSchema: () => yup.ObjectSchema<import("
13
13
  legalName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
14
14
  licenseType: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
15
15
  entityType: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
16
- licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
16
+ licenseNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
17
17
  unifiedNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
18
18
  issuingDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
19
19
  expiryDate: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
@@ -23,7 +23,7 @@ export declare const EntityNameValidationSchema: () => yup.ObjectSchema<import("
23
23
  legalName: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
24
24
  licenseType: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
25
25
  entityType: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
26
- licenseNumber: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
26
+ licenseNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
27
27
  unifiedNumber: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
28
28
  issuingDate: import("yup/lib/string").RequiredStringSchema<string | undefined, import("yup/lib/types").AnyObject>;
29
29
  expiryDate: yup.StringSchema<string | undefined, import("yup/lib/types").AnyObject, string | undefined>;
@@ -1,6 +1,6 @@
1
1
  import * as yup from 'yup';
2
2
  import { BusinessType } from '../../../../@types';
3
- import { KW_MIN_LICENSE_LENGTH, CR_MIN_LICENSE_LENGTH, FL_MIN_LICENSE_LENGTH, UNIFIED_NUMBER_MIN_LENGTH } from '../../../../constants';
3
+ import { KW_MIN_LICENSE_LENGTH, UNIFIED_NUMBER_MIN_LENGTH } from '../../../../constants';
4
4
  export var EntityNameValidationSchema = function () {
5
5
  return yup.object().shape({
6
6
  legalName: yup
@@ -16,22 +16,7 @@ export var EntityNameValidationSchema = function () {
16
16
  }),
17
17
  licenseType: yup.string().optional(),
18
18
  entityType: yup.string().required('entity_type_required'),
19
- licenseNumber: yup
20
- .string()
21
- .test({
22
- test: function (value) {
23
- var type = this.parent.licenseType;
24
- var isCR = type === BusinessType.CR;
25
- var length = (value === null || value === void 0 ? void 0 : value.length) || 0;
26
- if (length === 0)
27
- return true;
28
- if (isCR) {
29
- return length >= CR_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'cr_max_length' });
30
- }
31
- return length >= FL_MIN_LICENSE_LENGTH ? true : this.createError({ message: 'fl_max_length' });
32
- }
33
- })
34
- .required(''),
19
+ licenseNumber: yup.string().optional(),
35
20
  unifiedNumber: yup.string().test({
36
21
  name: 'unifiedNumber',
37
22
  message: '',
@@ -32,7 +32,6 @@ var LinkNewTerminal = function () {
32
32
  var _g = React.useState(false), success = _g[0], setSuccess = _g[1];
33
33
  var _h = React.useState(false), failed = _h[0], setFailed = _h[1];
34
34
  var _j = responseData || {}, terminalData = _j.terminalData, linkNewTerminalData = _j.linkNewTerminalData;
35
- var terminal_devices = (terminalData || {}).terminal_devices;
36
35
  var qrCode = "data:image/png;base64,".concat((_a = linkNewTerminalData === null || linkNewTerminalData === void 0 ? void 0 : linkNewTerminalData.linking) === null || _a === void 0 ? void 0 : _a.qr);
37
36
  var code = (_b = linkNewTerminalData === null || linkNewTerminalData === void 0 ? void 0 : linkNewTerminalData.linking) === null || _b === void 0 ? void 0 : _b.code;
38
37
  var expiry = TERMINAL_PUSH_NOTIFICATION_DURATION;
@@ -60,7 +59,8 @@ var LinkNewTerminal = function () {
60
59
  };
61
60
  }, [isReady]);
62
61
  var handleOnBack = function () {
63
- var previousScreen = (terminal_devices === null || terminal_devices === void 0 ? void 0 : terminal_devices.length) ? CONNECT_FLOWS.terminal.posDeviceList : CONNECT_FLOWS.terminal.noTerminalLinked;
62
+ var _a;
63
+ var previousScreen = ((_a = terminalData === null || terminalData === void 0 ? void 0 : terminalData.list) === null || _a === void 0 ? void 0 : _a.length) ? CONNECT_FLOWS.terminal.posDeviceList : CONNECT_FLOWS.terminal.noTerminalLinked;
64
64
  dispatch(handlePrevScreenStep(previousScreen));
65
65
  };
66
66
  return (_jsxs(ScreenContainer, __assign({ minHeight: 200, justifyContent: 'space-between' }, { children: [_jsx(PushNotification, __assign({ error: t('terminal_request_denied', { device: deviceName }), failed: failed, success: success, expiryInSeconds: expiry }, { children: _jsxs(LinkNewTerminalContainer, { children: [_jsx(LinkTerminalText, { children: t('terminal_link_terminal') }), _jsx(QRCodeDescription, { children: t('terminal_qr_code_description') }), _jsx(QRCodeImage, { src: qrCode }), code && (_jsxs(_Fragment, { children: [_jsx(LinkTerminalText, { children: t('terminal_or_use_code') }), _jsx(CodeDescription, { children: formatCode(code) })] }))] }) })), _jsx(Box, __assign({ sx: { ml: 2.5, mr: 2.5 } }, { children: _jsx(Button, __assign({ sx: { mb: 1.5, mt: 1.5 }, onClick: handleOnBack, variant: 'text' }, { children: t('back') })) }))] })));
@@ -27,6 +27,6 @@ var SuccessWithFlowButtons = function () {
27
27
  var onClose = function () {
28
28
  dispatch(onCloseCompleteTerminal());
29
29
  };
30
- return (_jsx(SuccessFlowButtons, { flowName: data.flowName, loading: loading, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, individuals: individuals, flows: boardFlows || [], onClose: isScopeAuthentication ? onClose : undefined, recipient: recipient, status: board_status, terminalStepName: ((_a = terminalData === null || terminalData === void 0 ? void 0 : terminalData.terminal_devices) === null || _a === void 0 ? void 0 : _a.length) ? CONNECT_FLOWS.terminal.terminalDeviceList : CONNECT_FLOWS.terminal.noTerminalLinked }));
30
+ return (_jsx(SuccessFlowButtons, { flowName: data.flowName, loading: loading, bank: bank, brand: brand, entity: entity, merchant: merchant, user: __assign({ names: { en: name } }, user), business: business, boardId: board_id, boardInfoId: board_info_id, individuals: individuals, flows: boardFlows || [], onClose: isScopeAuthentication ? onClose : undefined, recipient: recipient, status: board_status, terminalStepName: ((_a = terminalData === null || terminalData === void 0 ? void 0 : terminalData.list) === null || _a === void 0 ? void 0 : _a.length) ? CONNECT_FLOWS.terminal.terminalDeviceList : CONNECT_FLOWS.terminal.noTerminalLinked }));
31
31
  };
32
32
  export default memo(SuccessWithFlowButtons);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tap-payments/auth-jsconnect",
3
- "version": "2.11.5-development",
3
+ "version": "2.11.6-development",
4
4
  "description": "connect library, auth",
5
5
  "private": false,
6
6
  "main": "build/index.js",