skyflow-js 1.3.0 → 1.7.0

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.
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "skyflow-js",
3
3
  "preferGlobal": true,
4
4
  "analyze": false,
5
- "version": "1.3.0",
5
+ "version": "1.7.0",
6
6
  "author": "Skyflow",
7
7
  "description": "Skyflow JavaScript SDK",
8
8
  "homepage": "https://github.com/skyflowapi/skyflow-js",
@@ -41,6 +41,7 @@
41
41
  "jss-preset-default": "^10.7.1",
42
42
  "jwt-decode": "^3.1.2",
43
43
  "lodash": "^4.17.21",
44
+ "regex-parser": "^2.2.11",
44
45
  "set-value": "^4.0.1"
45
46
  },
46
47
  "engines": {
@@ -1,7 +1,7 @@
1
1
  import { ElementType } from './container/constants';
2
2
  import CollectContainer from './container/external/CollectContainer';
3
3
  import RevealContainer from './container/external/RevealContainer';
4
- import { IRevealResponseType, IGatewayConfig, RequestMethod, IInsertRecordInput, IDetokenizeInput, IGetByIdInput, RedactionType, EventName, Env, LogLevel } from './utils/common';
4
+ import { IRevealResponseType, IConnectionConfig, RequestMethod, IInsertRecordInput, IDetokenizeInput, IGetByIdInput, RedactionType, EventName, Env, LogLevel, ValidationRuleType } from './utils/common';
5
5
  export declare enum ContainerType {
6
6
  COLLECT = "COLLECT",
7
7
  REVEAL = "REVEAL"
@@ -16,11 +16,11 @@ declare class Skyflow {
16
16
  #private;
17
17
  constructor(config: ISkyflow);
18
18
  static init(config: ISkyflow): Skyflow;
19
- container(type: ContainerType, options?: Record<string, any>): CollectContainer | RevealContainer;
19
+ container(type: ContainerType, options?: Record<string, any>): RevealContainer | CollectContainer;
20
20
  insert(records: IInsertRecordInput, options?: Record<string, any>): Promise<any>;
21
21
  detokenize(detokenizeInput: IDetokenizeInput): Promise<IRevealResponseType>;
22
22
  getById(getByIdInput: IGetByIdInput): Promise<unknown>;
23
- invokeGateway(config: IGatewayConfig): Promise<unknown>;
23
+ invokeConnection(config: IConnectionConfig): Promise<unknown>;
24
24
  static get ContainerType(): typeof ContainerType;
25
25
  static get ElementType(): typeof ElementType;
26
26
  static get RedactionType(): typeof RedactionType;
@@ -28,5 +28,6 @@ declare class Skyflow {
28
28
  static get LogLevel(): typeof LogLevel;
29
29
  static get EventName(): typeof EventName;
30
30
  static get Env(): typeof Env;
31
+ static get ValidationRuleType(): typeof ValidationRuleType;
31
32
  }
32
33
  export default Skyflow;
@@ -7,7 +7,7 @@ export declare const PUREJS_TYPES: {
7
7
  INSERT: string;
8
8
  DETOKENIZE: string;
9
9
  GET_BY_SKYFLOWID: string;
10
- INVOKE_GATEWAY: string;
10
+ INVOKE_CONNECTION: string;
11
11
  };
12
12
  export declare const ELEMENT_EVENTS_TO_CLIENT: {
13
13
  CHANGE: string;
@@ -47,7 +47,9 @@ export declare enum ElementType {
47
47
  CVV = "CVV",
48
48
  EXPIRATION_DATE = "EXPIRATION_DATE",
49
49
  CARD_NUMBER = "CARD_NUMBER",
50
- CARDHOLDER_NAME = "CARDHOLDER_NAME"
50
+ CARDHOLDER_NAME = "CARDHOLDER_NAME",
51
+ INPUT_FIELD = "INPUT_FIELD",
52
+ PIN = "PIN"
51
53
  }
52
54
  export declare const ELEMENTS: {
53
55
  text: {
@@ -233,6 +235,23 @@ export declare const ELEMENTS: {
233
235
  sensitive: boolean;
234
236
  regex: RegExp;
235
237
  };
238
+ INPUT_FIELD: {
239
+ name: string;
240
+ sensitive: boolean;
241
+ attributes: {
242
+ type: string;
243
+ };
244
+ };
245
+ PIN: {
246
+ name: string;
247
+ attributes: {
248
+ type: string;
249
+ maxLength: number;
250
+ minLength: number;
251
+ };
252
+ sensitive: boolean;
253
+ regex: RegExp;
254
+ };
236
255
  };
237
256
  export declare const IFRAME_DEFAULT_STYLES: {
238
257
  height: string;
@@ -262,6 +281,16 @@ export declare const INPUT_STYLES: {
262
281
  margin: string;
263
282
  outline: string;
264
283
  };
284
+ export declare const INPUT_WITH_ICON_STYLES: {
285
+ 'background-position': string;
286
+ 'background-repeat': string;
287
+ 'text-indent': string;
288
+ };
289
+ export declare const INPUT_WITH_ICON_DEFAULT_STYLES: {
290
+ 'background-repeat': string;
291
+ 'text-indent': string;
292
+ padding: string;
293
+ };
265
294
  export declare const ERROR_TEXT_STYLES: {
266
295
  color: string;
267
296
  padding: string;
@@ -306,4 +335,76 @@ export declare const COLLECT_ELEMENT_LABEL_DEFAULT_STYLES: {
306
335
  marginBottom: string;
307
336
  };
308
337
  };
309
- export declare const gatewayConfigParseKeys: string[];
338
+ export declare const connectionConfigParseKeys: string[];
339
+ export declare enum CardType {
340
+ VISA = "VISA",
341
+ MASTERCARD = "MASTERCARD",
342
+ AMEX = "AMEX",
343
+ DINERS_CLUB = "DINERS_CLUB",
344
+ DISCOVER = "DISCOVER",
345
+ JCB = "JCB",
346
+ MAESTRO = "MAESTRO",
347
+ UNIONPAY = "UNIONPAY",
348
+ HIPERCARD = "HIPERCARD",
349
+ DEFAULT = "DEFAULT"
350
+ }
351
+ export declare const CARD_TYPE_REGEX: {
352
+ VISA: {
353
+ regex: RegExp;
354
+ maxCardLength: number;
355
+ cardLengthRange: number[];
356
+ };
357
+ MASTERCARD: {
358
+ regex: RegExp;
359
+ maxCardLength: number;
360
+ cardLengthRange: number[];
361
+ };
362
+ AMEX: {
363
+ regex: RegExp;
364
+ maxCardLength: number;
365
+ cardLengthRange: number[];
366
+ };
367
+ DINERS_CLUB: {
368
+ regex: RegExp;
369
+ maxCardLength: number;
370
+ cardLengthRange: number[];
371
+ };
372
+ DISCOVER: {
373
+ regex: RegExp;
374
+ maxCardLength: number;
375
+ cardLengthRange: number[];
376
+ };
377
+ JCB: {
378
+ regex: RegExp;
379
+ maxCardLength: number;
380
+ cardLengthRange: number[];
381
+ };
382
+ HIPERCARD: {
383
+ regex: RegExp;
384
+ maxCardLength: number;
385
+ cardLengthRange: number[];
386
+ };
387
+ UNIONPAY: {
388
+ regex: RegExp;
389
+ maxCardLength: number;
390
+ cardLengthRange: number[];
391
+ };
392
+ MAESTRO: {
393
+ regex: RegExp;
394
+ maxCardLength: number;
395
+ cardLengthRange: number[];
396
+ };
397
+ };
398
+ export declare const DEFAULT_CARD_LENGTH_RANGE: number[];
399
+ export declare const CARD_ENCODED_ICONS: {
400
+ DEFAULT: string;
401
+ AMEX: string;
402
+ DINERS_CLUB: string;
403
+ DISCOVER: string;
404
+ HIPERCARD: string;
405
+ JCB: string;
406
+ MAESTRO: string;
407
+ MASTERCARD: string;
408
+ UNIONPAY: string;
409
+ VISA: string;
410
+ };
@@ -1,7 +1,7 @@
1
1
  import { ElementType } from '../constants';
2
2
  import Element from './element';
3
- import { IInsertRecordInput } from '../../utils/common';
4
- interface CollectElementInput {
3
+ import { IInsertRecordInput, IValidationRule } from '../../utils/common';
4
+ export interface CollectElementInput {
5
5
  table?: string;
6
6
  column?: string;
7
7
  inputStyles?: object;
@@ -11,6 +11,7 @@ interface CollectElementInput {
11
11
  placeholder?: string;
12
12
  type: ElementType;
13
13
  altText?: string;
14
+ validations?: IValidationRule[];
14
15
  }
15
16
  interface ICollectOptions {
16
17
  tokens?: boolean;
@@ -1,10 +1,10 @@
1
- import { IDetokenizeInput, IGetByIdInput, IGatewayConfig } from '../../utils/common';
1
+ import { IDetokenizeInput, IGetByIdInput, IConnectionConfig } from '../../utils/common';
2
2
  declare class PureJsController {
3
3
  #private;
4
4
  constructor(client: any, context: any);
5
5
  detokenize(detokenizeInput: IDetokenizeInput): Promise<any>;
6
6
  insert(records: any, options: any): Promise<any>;
7
7
  getById(getByIdInput: IGetByIdInput): Promise<unknown>;
8
- invokeGateway(config: IGatewayConfig): Promise<unknown>;
8
+ invokeConnection(config: IConnectionConfig): Promise<unknown>;
9
9
  }
10
10
  export default PureJsController;
@@ -3,7 +3,7 @@ export default class IFrame {
3
3
  metadata: any;
4
4
  iframe: HTMLIFrameElement;
5
5
  container?: Element;
6
- constructor(name: any, metadata: any, containerId: any);
6
+ constructor(name: any, metadata: any, containerId: any, logLevel: any);
7
7
  mount: (domElement: any) => void;
8
8
  unmount: () => void;
9
9
  }
@@ -1,9 +1,10 @@
1
+ import { LogLevel } from '../../utils/common';
1
2
  export default class FrameElements {
2
3
  #private;
3
4
  private static group?;
4
5
  private static frameElements?;
5
6
  private getOrCreateIFrameFormElement;
6
- constructor(getOrCreateIFrameFormElement: any, metaData: any);
7
+ constructor(getOrCreateIFrameFormElement: any, metaData: any, logLevel: LogLevel);
7
8
  static start: () => void;
8
9
  static init: (getOrCreateIFrameFormElement: Function, metaData: any) => void;
9
10
  setup: () => void;
@@ -1,5 +1,5 @@
1
1
  import EventEmitter from '../../../event-emitter';
2
- import { Context } from '../../../utils/common';
2
+ import { Context, IValidationRule, LogLevel } from '../../../utils/common';
3
3
  export declare class IFrameFormElement extends EventEmitter {
4
4
  state: {
5
5
  value: string | undefined;
@@ -16,15 +16,18 @@ export declare class IFrameFormElement extends EventEmitter {
16
16
  iFrameName: string;
17
17
  metaData: any;
18
18
  private regex?;
19
+ validations?: IValidationRule[];
20
+ errorText?: string;
19
21
  replacePattern?: [RegExp, string];
20
22
  mask?: any;
21
23
  context: Context;
22
- constructor(name: string, metaData: any, context: Context);
24
+ label?: string;
25
+ constructor(name: string, label: string, metaData: any, context: Context);
23
26
  onFocusChange: (focus: boolean) => void;
24
27
  changeFocus: (focus: boolean) => void;
25
28
  setReplacePattern(pattern: string[]): void;
26
29
  setMask(mask: string[]): void;
27
- setValidation(): void;
30
+ setValidation(validations: IValidationRule[] | undefined): void;
28
31
  setSensitive(sensitive?: boolean): void;
29
32
  setValue: (value?: string, valid?: boolean) => void;
30
33
  getValue: () => string | undefined;
@@ -37,6 +40,7 @@ export declare class IFrameFormElement extends EventEmitter {
37
40
  value: string | undefined;
38
41
  };
39
42
  validator(value: string): boolean;
43
+ validateCustomValidations(value: string): boolean;
40
44
  collectBusEvents: () => void;
41
45
  sendChangeStatus: (inputEvent?: boolean) => void;
42
46
  resetData(): void;
@@ -50,7 +54,8 @@ export declare class IFrameForm {
50
54
  private controllerId;
51
55
  private clientDomain;
52
56
  private context;
53
- constructor(controllerId: string, clientDomain: string);
57
+ private logLevel;
58
+ constructor(controllerId: string, clientDomain: string, logLevel: LogLevel);
54
59
  setClient(client: any): void;
55
60
  setClientMetadata(clientMetaData: any): void;
56
61
  setContext(context: Context): void;
@@ -1,12 +1,13 @@
1
1
  import 'jquery-mask-plugin/dist/jquery.mask.min';
2
2
  import { IFrameFormElement } from './iFrameForm';
3
+ import { LogLevel } from '../../utils/common';
3
4
  export declare class FrameController {
4
5
  #private;
5
6
  controller?: FrameController;
6
7
  controllerId: string;
7
8
  private clientDomain;
8
- constructor(controllerId: string);
9
- static init(uuid: string): FrameController;
9
+ constructor(controllerId: string, logLevel: LogLevel);
10
+ static init(uuid: string, logLevel: any): FrameController;
10
11
  }
11
12
  export declare class FrameElement {
12
13
  options: any;
@@ -1,9 +1,9 @@
1
- import { IGatewayConfig } from '../../../utils/common';
1
+ import { IConnectionConfig } from '../../../utils/common';
2
2
  declare class PureJsFrameController {
3
3
  #private;
4
4
  constructor();
5
5
  static init(): PureJsFrameController;
6
6
  insertData(records: any, options: any): Promise<unknown>;
7
- sendInvokeGateWayRequest(config: IGatewayConfig): Promise<unknown>;
7
+ sendInvokeConnectionRequest(config: IConnectionConfig): Promise<unknown>;
8
8
  }
9
9
  export default PureJsFrameController;
@@ -3,4 +3,6 @@ export declare const constructInsertRecordRequest: (records: IInsertRecordInput,
3
3
  export declare const constructInsertRecordResponse: (responseBody: any, tokens: boolean, records: IInsertRecord[]) => {
4
4
  records: any;
5
5
  };
6
- export declare const constructElementsInsertReq: (req: any, options: any) => any;
6
+ export declare const constructElementsInsertReq: (req: any, options: any) => {
7
+ records: IInsertRecord[];
8
+ };
@@ -1,4 +1,7 @@
1
+ import { CollectElementInput } from '../container/external/CollectContainer';
2
+ import { IValidationRule } from '../utils/common';
1
3
  export declare function validateElementOptions(elementType: string, oldOptions: any, newOptions?: any): void;
2
4
  export declare function validateAndSetupGroupOptions(oldGroup: any, newGroup?: any, setup?: boolean): any;
3
5
  export declare const getElements: (group: any) => string[];
4
6
  export declare const getValueAndItsUnit: (string?: string, defaultValue?: string, defaultUnit?: string) => string[];
7
+ export declare const formatValidations: (input: CollectElementInput) => IValidationRule[] | undefined;
@@ -1,2 +1,2 @@
1
- export declare function gatewayConfigParser(data: any, configKey: any): void;
2
- export declare function constructInvokeGatewayRequest(data: any): Promise<any>;
1
+ export declare function connectionConfigParser(data: any, configKey: any): void;
2
+ export declare function constructInvokeConnectionRequest(data: any): Promise<any>;
@@ -1,4 +1,3 @@
1
- export declare function splitStyles(styles: any): {}[];
2
1
  export declare function buildStylesFromClassesAndStyles(classes: any, styles: any): void;
3
2
  export declare const getFlexGridStyles: (obj: any) => {
4
3
  'align-items': any;
@@ -32,6 +32,11 @@ export declare enum MessageType {
32
32
  WARN = "WARN",
33
33
  ERROR = "ERROR"
34
34
  }
35
+ export declare enum ValidationRuleType {
36
+ REGEX_MATCH_RULE = "REGEX_MATCH_RULE",
37
+ LENGTH_MATCH_RULE = "LENGTH_MATCH_RULE",
38
+ ELEMENT_VALUE_MATCH_RULE = "ELEMENT_VALUE_MATCH_RULE"
39
+ }
35
40
  export interface IInsertRecordInput {
36
41
  records: IInsertRecord[];
37
42
  }
@@ -62,8 +67,8 @@ export interface Context {
62
67
  logLevel: LogLevel;
63
68
  env: Env;
64
69
  }
65
- export interface IGatewayConfig {
66
- gatewayURL: string;
70
+ export interface IConnectionConfig {
71
+ connectionURL: string;
67
72
  methodName: RequestMethod;
68
73
  pathParams?: any;
69
74
  queryParams?: any;
@@ -71,3 +76,7 @@ export interface IGatewayConfig {
71
76
  requestHeader?: any;
72
77
  responseBody?: any;
73
78
  }
79
+ export interface IValidationRule {
80
+ type: ValidationRuleType;
81
+ params: any;
82
+ }
@@ -119,15 +119,15 @@ declare const SKYFLOW_ERROR_CODE: {
119
119
  code: number;
120
120
  description: string;
121
121
  };
122
- MISSING_GATEWAY_URL: {
122
+ MISSING_CONNECTION_URL: {
123
123
  code: number;
124
124
  description: string;
125
125
  };
126
- INVALID_GATEWAY_URL_TYPE: {
126
+ INVALID_CONNECTION_URL_TYPE: {
127
127
  code: number;
128
128
  description: string;
129
129
  };
130
- INVALID_GATEWAY_URL: {
130
+ INVALID_CONNECTION_URL: {
131
131
  code: number;
132
132
  description: string;
133
133
  };
@@ -175,5 +175,49 @@ declare const SKYFLOW_ERROR_CODE: {
175
175
  code: number;
176
176
  description: string;
177
177
  };
178
+ INVALID_VALIDATIONS_TYPE: {
179
+ code: number;
180
+ description: string;
181
+ };
182
+ MISSING_VALIDATION_RULE_TYPE: {
183
+ code: number;
184
+ description: string;
185
+ };
186
+ INVALID_VALIDATION_RULE_TYPE: {
187
+ code: number;
188
+ description: string;
189
+ };
190
+ MISSING_VALIDATION_RULE_PARAMS: {
191
+ code: number;
192
+ description: string;
193
+ };
194
+ INVALID_VALIDATION_RULE_PARAMS: {
195
+ code: number;
196
+ description: string;
197
+ };
198
+ MISSING_REGEX_IN_REGEX_MATCH_RULE: {
199
+ code: number;
200
+ description: string;
201
+ };
202
+ INVALID_REGEX_IN_REGEX_MATCH_RULE: {
203
+ code: number;
204
+ description: string;
205
+ };
206
+ MISSING_MIN_AND_MAX_IN_LENGTH_MATCH_RULE: {
207
+ code: number;
208
+ description: string;
209
+ };
210
+ MISSING_ELEMENT_IN_ELEMENT_MATCH_RULE: {
211
+ code: number;
212
+ description: string;
213
+ };
214
+ INVALID_ELEMENT_IN_ELEMENT_MATCH_RULE: {
215
+ code: number;
216
+ description: string;
217
+ };
218
+ ELEMENT_NOT_MOUNTED_IN_ELEMENT_MATCH_RULE: {
219
+ code: number;
220
+ description: string;
221
+ };
178
222
  };
179
223
  export default SKYFLOW_ERROR_CODE;
@@ -9,7 +9,7 @@ declare const logs: {
9
9
  VALIDATE_RECORDS: string;
10
10
  VALIDATE_DETOKENIZE_INPUT: string;
11
11
  VALIDATE_GET_BY_ID_INPUT: string;
12
- VALIDATE_GATEWAY_CONFIG: string;
12
+ VALIDATE_CONNECTION_CONFIG: string;
13
13
  VALIDATE_COLLECT_RECORDS: string;
14
14
  VALIDATE_REVEAL_RECORDS: string;
15
15
  CREATED_ELEMENT: string;
@@ -30,7 +30,7 @@ declare const logs: {
30
30
  INSERT_TRIGGERED: string;
31
31
  DETOKENIZE_TRIGGERED: string;
32
32
  GET_BY_ID_TRIGGERED: string;
33
- INVOKE_GATEWAY_TRIGGERED: string;
33
+ INVOKE_CONNECTION_TRIGGERED: string;
34
34
  EMIT_PURE_JS_REQUEST: string;
35
35
  CAPTURE_PURE_JS_REQUEST: string;
36
36
  LISTEN_PURE_JS_REQUEST: string;
@@ -38,9 +38,27 @@ declare const logs: {
38
38
  FETCH_RECORDS_RESOLVED: string;
39
39
  INSERT_RECORDS_RESOLVED: string;
40
40
  GET_BY_SKYFLOWID_RESOLVED: string;
41
- SEND_INVOKE_GATEWAY_RESOLVED: string;
41
+ SEND_INVOKE_CONNECTION_RESOLVED: string;
42
42
  EMIT_EVENT: string;
43
43
  CAPTURE_EVENT: string;
44
+ LISTEN_COLLECT_FRAME_READY: string;
45
+ EMIT_COLLECT_ELEMENT_FRAME_READY: string;
46
+ ENTERED_COLLECT_FRAME_READY_CB: string;
47
+ EXECUTE_COLLECT_ELEMENT_FRAME_READY_CB: string;
48
+ CLIENT_METADATA_NOT_SET: string;
49
+ EXECUTE_COLLECT_ELEMENT_INIT: string;
50
+ INSIDE__COLLECT_ELEMENT_INIT: string;
51
+ CREATING_COLLECT_ELEMENT_FORM: string;
52
+ COLLECT_FRAME_READY_CB: string;
53
+ INSIDE_FRAME_ELEMENTS_CONSTRUCOTR: string;
54
+ SETUP_IN_START: string;
55
+ SETUP_IN_CONSTRUCTOR: string;
56
+ COLLECT_ELEMET_START: string;
57
+ REVEAL_ELEMENT_START: string;
58
+ EMIT_COLLECT_FRAME_CONTROLLER_EVENT: string;
59
+ EXECUTE_COLLECT_CONTROLLER_READY_CB: string;
60
+ IFRAMEFORM_CONSTRUCTOR_FRAME_READY_LISTNER: string;
61
+ IFRAMEFORM_CONSTRUCTOR_TOKENIZATION_LISTNER: string;
44
62
  };
45
63
  errorLogs: {
46
64
  CLIENT_CONNECTION: string;
@@ -64,7 +82,7 @@ declare const logs: {
64
82
  FETCH_RECORDS_REJECTED: string;
65
83
  INSERT_RECORDS_REJECTED: string;
66
84
  GET_BY_SKYFLOWID_REJECTED: string;
67
- SEND_INVOKE_GATEWAY_REJECTED: string;
85
+ SEND_INVOKE_CONNECTION_REJECTED: string;
68
86
  FAILED_REVEAL: string;
69
87
  INVALID_TABLE_NAME: string;
70
88
  EMPTY_TABLE_NAME: string;
@@ -96,9 +114,9 @@ declare const logs: {
96
114
  INVALID_ELEMENT_TYPE: string;
97
115
  INVALID_ELEMENT_SELECTOR: string;
98
116
  CANNOT_CHANGE_ELEMENT: string;
99
- MISSING_GATEWAY_URL: string;
100
- INVALID_GATEWAY_URL_TYPE: string;
101
- INVALID_GATEWAY_URL: string;
117
+ MISSING_CONNECTION_URL: string;
118
+ INVALID_CONNECTION_URL_TYPE: string;
119
+ INVALID_CONNECTION_URL: string;
102
120
  MISSING_METHODNAME_KEY: string;
103
121
  INVALID_METHODNAME_VALUE: string;
104
122
  INVALID_IFRAME: string;
@@ -113,6 +131,18 @@ declare const logs: {
113
131
  CONNECTION_ERROR: string;
114
132
  ERROR_OCCURED: string;
115
133
  RESPONSE_BODY_KEY_MISSING: string;
134
+ INVALID_VALIDATIONS_TYPE: string;
135
+ MISSING_VALIDATION_RULE_TYPE: string;
136
+ INVALID_VALIDATION_RULE_TYPE: string;
137
+ MISSING_VALIDATION_RULE_PARAMS: string;
138
+ INVALID_VALIDATION_RULE_PARAMS: string;
139
+ MISSING_REGEX_IN_REGEX_MATCH_RULE: string;
140
+ INVALID_REGEX_IN_REGEX_MATCH_RULE: string;
141
+ MISSING_MIN_AND_MAX_IN_LENGTH_MATCH_RULE: string;
142
+ MISSING_ELEMENT_IN_ELEMENT_MATCH_RULE: string;
143
+ INVALID_ELEMENT_IN_ELEMENT_MATCH_RULE: string;
144
+ ELEMENT_NOT_MOUNTED_IN_ELEMENT_MATCH_RULE: string;
145
+ VALIDATION_FAILED: string;
116
146
  };
117
147
  };
118
148
  export default logs;
@@ -35,4 +35,4 @@ export declare const EnvOptions: {
35
35
  };
36
36
  export declare const printLog: (message: string, messageType: MessageType, logLevel: LogLevel) => void;
37
37
  export declare const parameterizedString: (...args: any[]) => any;
38
- export declare const getElementName: (name: string) => string;
38
+ export declare const getElementName: (name?: string) => string;
@@ -1,10 +1,14 @@
1
+ import { CardType } from '../../container/constants';
1
2
  import { IRevealElementInput } from '../../container/external/RevealContainer';
2
- import { IInsertRecordInput, IDetokenizeInput, IGetByIdInput, IGatewayConfig } from '../common';
3
+ import { IInsertRecordInput, IDetokenizeInput, IGetByIdInput, IConnectionConfig } from '../common';
3
4
  export declare const validateCreditCardNumber: (cardNumber: string) => boolean;
5
+ export declare const detectCardType: (cardNumber: string) => CardType.DEFAULT;
4
6
  export declare const validateExpiryDate: (date: string) => boolean;
5
7
  export declare const validateInsertRecords: (recordObj: IInsertRecordInput) => void;
6
8
  export declare const validateDetokenizeInput: (detokenizeInput: IDetokenizeInput) => void;
7
9
  export declare const validateGetByIdInput: (getByIdInput: IGetByIdInput) => void;
8
10
  export declare const validateRevealElementRecords: (records: IRevealElementInput[]) => void;
9
11
  export declare const isValidURL: (url: string) => boolean;
10
- export declare const validateGatewayConfig: (config: IGatewayConfig) => void;
12
+ export declare const isValidRegExp: (input: any) => boolean;
13
+ export declare const validateConnectionConfig: (config: IConnectionConfig) => void;
14
+ export declare const validateCardNumberLengthCheck: (cardNumber: string) => boolean;
@@ -1,4 +0,0 @@
1
- export declare const unMask: (value: string | undefined, maskObject: any) => string;
2
- export declare const splice: (string: string, index: number, removeCount: number, adder: string) => string;
3
- export declare const replaceAt: (str: string, index: number, replacer?: string) => string;
4
- export declare const mask: (value: string | undefined, prevValue: string | undefined, maskObject: any, focus: any) => string;