skyflow-js 1.5.0 → 1.9.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +455 -24
  3. package/dist/sdkNodeBuild/index.js +1 -1
  4. package/dist/sdkNodeBuild/index.js.LICENSE.txt +27 -0
  5. package/dist/sdkNodeBuild/index.js.LICENSE.txt.gz +0 -0
  6. package/dist/sdkNodeBuild/index.js.gz +0 -0
  7. package/package.json +6 -2
  8. package/types/Skyflow.d.ts +8 -6
  9. package/types/{container → core}/constants.d.ts +120 -15
  10. package/types/{container/external/PureJsController.d.ts → core/external/SkyflowContainer.d.ts} +4 -3
  11. package/types/core/external/collect/CollectContainer.d.ts +27 -0
  12. package/types/{container/external/element/index.d.ts → core/external/collect/CollectElement.d.ts} +9 -3
  13. package/types/core/external/common/Container.d.ts +3 -0
  14. package/types/{container/external/element → core/external/common}/IFrame.d.ts +1 -1
  15. package/types/core/external/common/SkyflowElement.d.ts +9 -0
  16. package/types/{container/external → core/external/reveal}/RevealContainer.d.ts +5 -4
  17. package/types/core/external/reveal/RevealElement.d.ts +21 -0
  18. package/types/{container → core}/internal/FrameElements.d.ts +2 -1
  19. package/types/core/internal/SkyflowFrame/SkyflowFrameController.d.ts +10 -0
  20. package/types/{container → core}/internal/iFrameForm/index.d.ts +13 -4
  21. package/types/{container → core}/internal/index.d.ts +5 -2
  22. package/types/{container → core}/internal/reveal/RevealFrame.d.ts +3 -0
  23. package/types/{container → core}/internal/reveal/RevealFrameController.d.ts +0 -0
  24. package/types/{core → core-utils}/collect.d.ts +2 -1
  25. package/types/{core → core-utils}/reveal.d.ts +0 -0
  26. package/types/libs/element-options.d.ts +4 -0
  27. package/types/libs/objectParse.d.ts +3 -0
  28. package/types/utils/common/index.d.ts +15 -0
  29. package/types/utils/constants.d.ts +334 -22
  30. package/types/utils/helpers/index.d.ts +6 -0
  31. package/types/utils/logs.d.ts +132 -37
  32. package/types/utils/logsHelper/index.d.ts +1 -1
  33. package/types/utils/validators/index.d.ts +15 -5
  34. package/types/container/external/CollectContainer.d.ts +0 -25
  35. package/types/container/external/reveal/RevealElement.d.ts +0 -11
  36. package/types/container/internal/pureJs/PureJsFrameController.d.ts +0 -9
@@ -1,3 +1,17 @@
1
+ /*!
2
+ * The buffer module from node.js, for the browser.
3
+ *
4
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
5
+ * @license MIT
6
+ */
7
+
8
+ /*!
9
+ * The buffer module from node.js, for the browser.
10
+ *
11
+ * @author Feross Aboukhadijeh <https://feross.org>
12
+ * @license MIT
13
+ */
14
+
1
15
  /*!
2
16
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
3
17
  *
@@ -25,3 +39,16 @@
25
39
  * Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert).
26
40
  * Released under the MIT License.
27
41
  */
42
+
43
+ /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
44
+
45
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
46
+
47
+ /**
48
+ * @license
49
+ * Lodash <https://lodash.com/>
50
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
51
+ * Released under MIT license <https://lodash.com/license>
52
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
53
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
54
+ */
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.5.0",
5
+ "version": "1.9.0",
6
6
  "author": "Skyflow",
7
7
  "description": "Skyflow JavaScript SDK",
8
8
  "homepage": "https://github.com/skyflowapi/skyflow-js",
@@ -33,6 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "core-js": "^3.6.5",
36
+ "easy-soap-request": "^4.5.0",
36
37
  "framebus": "^4.0.0",
37
38
  "inject-stylesheet": "^2.0.0",
38
39
  "jquery": "^3.5.1",
@@ -41,7 +42,10 @@
41
42
  "jss-preset-default": "^10.7.1",
42
43
  "jwt-decode": "^3.1.2",
43
44
  "lodash": "^4.17.21",
44
- "set-value": "^4.0.1"
45
+ "node-polyfill-webpack-plugin": "^1.1.4",
46
+ "regex-parser": "^2.2.11",
47
+ "set-value": "^4.0.1",
48
+ "xml-js": "^1.6.11"
45
49
  },
46
50
  "engines": {
47
51
  "node": ">=12.0",
@@ -1,14 +1,14 @@
1
- import { ElementType } from './container/constants';
2
- import CollectContainer from './container/external/CollectContainer';
3
- import RevealContainer from './container/external/RevealContainer';
4
- import { IRevealResponseType, IConnectionConfig, RequestMethod, IInsertRecordInput, IDetokenizeInput, IGetByIdInput, RedactionType, EventName, Env, LogLevel } from './utils/common';
1
+ import { ElementType } from './core/constants';
2
+ import RevealContainer from './core/external/reveal/RevealContainer';
3
+ import CollectContainer from './core/external/collect/CollectContainer';
4
+ import { IRevealResponseType, IConnectionConfig, RequestMethod, IInsertRecordInput, IDetokenizeInput, IGetByIdInput, RedactionType, EventName, Env, LogLevel, ValidationRuleType, ISoapConnectionConfig } from './utils/common';
5
5
  export declare enum ContainerType {
6
6
  COLLECT = "COLLECT",
7
7
  REVEAL = "REVEAL"
8
8
  }
9
9
  export interface ISkyflow {
10
- vaultID: string;
11
- vaultURL: string;
10
+ vaultID?: string;
11
+ vaultURL?: string;
12
12
  getBearerToken: () => Promise<string>;
13
13
  options?: Record<string, any>;
14
14
  }
@@ -21,6 +21,7 @@ declare class Skyflow {
21
21
  detokenize(detokenizeInput: IDetokenizeInput): Promise<IRevealResponseType>;
22
22
  getById(getByIdInput: IGetByIdInput): Promise<unknown>;
23
23
  invokeConnection(config: IConnectionConfig): Promise<unknown>;
24
+ invokeSoapConnection(config: ISoapConnectionConfig): Promise<unknown>;
24
25
  static get ContainerType(): typeof ContainerType;
25
26
  static get ElementType(): typeof ElementType;
26
27
  static get RedactionType(): typeof RedactionType;
@@ -28,5 +29,6 @@ declare class Skyflow {
28
29
  static get LogLevel(): typeof LogLevel;
29
30
  static get EventName(): typeof EventName;
30
31
  static get Env(): typeof Env;
32
+ static get ValidationRuleType(): typeof ValidationRuleType;
31
33
  }
32
34
  export default Skyflow;
@@ -1,6 +1,6 @@
1
1
  export declare const COLLECT_FRAME_CONTROLLER = "collect_controller";
2
2
  export declare const REVEAL_FRAME_CONTROLLER = "reveal_controller";
3
- export declare const PUREJS_FRAME_CONTROLLER = "purejs_controller";
3
+ export declare const SKYFLOW_FRAME_CONTROLLER = "skyflow_controller";
4
4
  export declare const FRAME_REVEAL = "reveal";
5
5
  export declare const FRAME_ELEMENT = "element";
6
6
  export declare const PUREJS_TYPES: {
@@ -8,6 +8,7 @@ export declare const PUREJS_TYPES: {
8
8
  DETOKENIZE: string;
9
9
  GET_BY_SKYFLOWID: string;
10
10
  INVOKE_CONNECTION: string;
11
+ INVOKE_SOAP_CONNECTION: string;
11
12
  };
12
13
  export declare const ELEMENT_EVENTS_TO_CLIENT: {
13
14
  CHANGE: string;
@@ -38,6 +39,13 @@ export declare const ELEMENT_EVENTS_TO_IFRAME: {
38
39
  GET_BEARER_TOKEN: string;
39
40
  GET_COLLECT_ELEMENT: string;
40
41
  GET_REVEAL_ELEMENT: string;
42
+ COLLECT_ELEMENT_SET_ERROR: string;
43
+ REVEAL_ELEMENT_SET_ERROR: string;
44
+ REVEAL_ELEMENT_UPDATE_OPTIONS: string;
45
+ };
46
+ export declare const REVEAL_ELEMENT_OPTIONS_TYPES: {
47
+ TOKEN: string;
48
+ ALT_TEXT: string;
41
49
  };
42
50
  export declare const ELEMENT_EVENTS_TO_CONTAINER: {
43
51
  ELEMENT_MOUNTED: string;
@@ -47,8 +55,54 @@ export declare enum ElementType {
47
55
  CVV = "CVV",
48
56
  EXPIRATION_DATE = "EXPIRATION_DATE",
49
57
  CARD_NUMBER = "CARD_NUMBER",
50
- CARDHOLDER_NAME = "CARDHOLDER_NAME"
58
+ CARDHOLDER_NAME = "CARDHOLDER_NAME",
59
+ INPUT_FIELD = "INPUT_FIELD",
60
+ PIN = "PIN"
51
61
  }
62
+ export declare enum CardType {
63
+ VISA = "VISA",
64
+ MASTERCARD = "MASTERCARD",
65
+ AMEX = "AMEX",
66
+ DINERS_CLUB = "DINERS_CLUB",
67
+ DISCOVER = "DISCOVER",
68
+ JCB = "JCB",
69
+ MAESTRO = "MAESTRO",
70
+ UNIONPAY = "UNIONPAY",
71
+ HIPERCARD = "HIPERCARD",
72
+ DEFAULT = "DEFAULT"
73
+ }
74
+ export declare const CARD_NUMBER_MASK: {
75
+ AMEX: (string | {
76
+ X: string;
77
+ })[];
78
+ VISA: (string | {
79
+ X: string;
80
+ })[];
81
+ MASTERCARD: (string | {
82
+ X: string;
83
+ })[];
84
+ DISCOVER: (string | {
85
+ X: string;
86
+ })[];
87
+ DINERS_CLUB: (string | {
88
+ X: string;
89
+ })[];
90
+ JCB: (string | {
91
+ X: string;
92
+ })[];
93
+ MAESTRO: (string | {
94
+ X: string;
95
+ })[];
96
+ UNIONPAY: (string | {
97
+ X: string;
98
+ })[];
99
+ HIPERCARD: (string | {
100
+ X: string;
101
+ })[];
102
+ DEFAULT: (string | {
103
+ X: string;
104
+ })[];
105
+ };
52
106
  export declare const ELEMENTS: {
53
107
  text: {
54
108
  name: string;
@@ -214,6 +268,9 @@ export declare const ELEMENTS: {
214
268
  type: string;
215
269
  };
216
270
  sensitive: boolean;
271
+ mask: (string | {
272
+ X: string;
273
+ })[];
217
274
  regex: RegExp;
218
275
  };
219
276
  EXPIRATION_DATE: {
@@ -222,7 +279,6 @@ export declare const ELEMENTS: {
222
279
  type: string;
223
280
  };
224
281
  sensitive: boolean;
225
- regex: RegExp;
226
282
  };
227
283
  CVV: {
228
284
  name: string;
@@ -233,6 +289,23 @@ export declare const ELEMENTS: {
233
289
  sensitive: boolean;
234
290
  regex: RegExp;
235
291
  };
292
+ INPUT_FIELD: {
293
+ name: string;
294
+ sensitive: boolean;
295
+ attributes: {
296
+ type: string;
297
+ };
298
+ };
299
+ PIN: {
300
+ name: string;
301
+ attributes: {
302
+ type: string;
303
+ maxLength: number;
304
+ minLength: number;
305
+ };
306
+ sensitive: boolean;
307
+ regex: RegExp;
308
+ };
236
309
  };
237
310
  export declare const IFRAME_DEFAULT_STYLES: {
238
311
  height: string;
@@ -267,6 +340,11 @@ export declare const INPUT_WITH_ICON_STYLES: {
267
340
  'background-repeat': string;
268
341
  'text-indent': string;
269
342
  };
343
+ export declare const INPUT_WITH_ICON_DEFAULT_STYLES: {
344
+ 'background-repeat': string;
345
+ 'text-indent': string;
346
+ padding: string;
347
+ };
270
348
  export declare const ERROR_TEXT_STYLES: {
271
349
  color: string;
272
350
  padding: string;
@@ -312,56 +390,54 @@ export declare const COLLECT_ELEMENT_LABEL_DEFAULT_STYLES: {
312
390
  };
313
391
  };
314
392
  export declare const connectionConfigParseKeys: string[];
315
- export declare enum CardType {
316
- VISA = "VISA",
317
- MASTERCARD = "MASTERCARD",
318
- AMEX = "AMEX",
319
- DINERS_CLUB = "DINERS_CLUB",
320
- DISCOVER = "DISCOVER",
321
- JCB = "JCB",
322
- MAESTRO = "MAESTRO",
323
- UNIONPAY = "UNIONPAY",
324
- HIPERCARD = "HIPERCARD",
325
- DEFAULT = "DEFAULT"
326
- }
327
393
  export declare const CARD_TYPE_REGEX: {
328
394
  VISA: {
329
395
  regex: RegExp;
330
396
  maxCardLength: number;
397
+ cardLengthRange: number[];
331
398
  };
332
399
  MASTERCARD: {
333
400
  regex: RegExp;
334
401
  maxCardLength: number;
402
+ cardLengthRange: number[];
335
403
  };
336
404
  AMEX: {
337
405
  regex: RegExp;
338
406
  maxCardLength: number;
407
+ cardLengthRange: number[];
339
408
  };
340
409
  DINERS_CLUB: {
341
410
  regex: RegExp;
342
411
  maxCardLength: number;
412
+ cardLengthRange: number[];
343
413
  };
344
414
  DISCOVER: {
345
415
  regex: RegExp;
346
416
  maxCardLength: number;
417
+ cardLengthRange: number[];
347
418
  };
348
419
  JCB: {
349
420
  regex: RegExp;
350
421
  maxCardLength: number;
422
+ cardLengthRange: number[];
351
423
  };
352
424
  HIPERCARD: {
353
425
  regex: RegExp;
354
426
  maxCardLength: number;
427
+ cardLengthRange: number[];
355
428
  };
356
429
  UNIONPAY: {
357
430
  regex: RegExp;
358
431
  maxCardLength: number;
432
+ cardLengthRange: number[];
359
433
  };
360
434
  MAESTRO: {
361
435
  regex: RegExp;
362
436
  maxCardLength: number;
437
+ cardLengthRange: number[];
363
438
  };
364
439
  };
440
+ export declare const DEFAULT_CARD_LENGTH_RANGE: number[];
365
441
  export declare const CARD_ENCODED_ICONS: {
366
442
  DEFAULT: string;
367
443
  AMEX: string;
@@ -374,3 +450,32 @@ export declare const CARD_ENCODED_ICONS: {
374
450
  UNIONPAY: string;
375
451
  VISA: string;
376
452
  };
453
+ export declare const EXPIRY_DATE_MASK: {
454
+ 'MM/YYYY': (string | {
455
+ X: string;
456
+ Y: string;
457
+ })[];
458
+ 'MM/YY': (string | {
459
+ X: string;
460
+ Y: string;
461
+ })[];
462
+ 'YYYY/MM': (string | {
463
+ X: string;
464
+ Y: string;
465
+ })[];
466
+ 'YY/MM': (string | {
467
+ X: string;
468
+ Y: string;
469
+ })[];
470
+ };
471
+ export declare const DEFAULT_EXPIRATION_DATE_FORMAT = "MM/YY";
472
+ export declare const ALLOWED_EXPIRY_DATE_FORMATS: string[];
473
+ export declare const soapReqXmlErrors: {
474
+ code: number;
475
+ description: string;
476
+ }[];
477
+ export declare const soapResXmlErrors: {
478
+ code: number;
479
+ description: string;
480
+ }[];
481
+ export declare const PATH_NOT_FOUND_IN_RES_XML = "skyflow: Path not found";
@@ -1,10 +1,11 @@
1
- import { IDetokenizeInput, IGetByIdInput, IConnectionConfig } from '../../utils/common';
2
- declare class PureJsController {
1
+ import { IDetokenizeInput, IGetByIdInput, IConnectionConfig, ISoapConnectionConfig } from '../../utils/common';
2
+ declare class SkyflowContainer {
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
+ invokeSoapConnection(config: ISoapConnectionConfig, skyflowElements: any): Promise<unknown>;
8
9
  invokeConnection(config: IConnectionConfig): Promise<unknown>;
9
10
  }
10
- export default PureJsController;
11
+ export default SkyflowContainer;
@@ -0,0 +1,27 @@
1
+ import { IValidationRule, IInsertRecordInput } from '../../../utils/common';
2
+ import { ElementType } from '../../constants';
3
+ import Container from '../common/Container';
4
+ import CollectElement from './CollectElement';
5
+ export interface CollectElementInput {
6
+ table?: string;
7
+ column?: string;
8
+ inputStyles?: object;
9
+ label?: string;
10
+ labelStyles?: object;
11
+ errorTextStyles?: object;
12
+ placeholder?: string;
13
+ type: ElementType;
14
+ altText?: string;
15
+ validations?: IValidationRule[];
16
+ }
17
+ interface ICollectOptions {
18
+ tokens?: boolean;
19
+ additionalFields?: IInsertRecordInput;
20
+ }
21
+ declare class CollectContainer extends Container {
22
+ #private;
23
+ constructor(options: any, metaData: any, skyflowElements: any, context: any);
24
+ create: (input: CollectElementInput, options?: any) => CollectElement;
25
+ collect: (options?: ICollectOptions) => Promise<unknown>;
26
+ }
27
+ export default CollectContainer;
@@ -1,9 +1,11 @@
1
1
  import { Context } from '../../../utils/common';
2
- declare class Element {
2
+ import SkyflowElement from '../common/SkyflowElement';
3
+ declare class CollectElement extends SkyflowElement {
3
4
  #private;
4
5
  elementType: string;
5
6
  containerId: string;
6
- constructor(elementGroup: any, metaData: any, containerId: string, isSingleElementAPI: boolean | undefined, destroyCallback: Function, updateCallback: Function, context: Context);
7
+ constructor(elementId: string, elementGroup: any, metaData: any, containerId: string, isSingleElementAPI: boolean | undefined, destroyCallback: Function, updateCallback: Function, context: Context);
8
+ getID: () => string;
7
9
  mount: (domElement: any) => void;
8
10
  unmount: () => void;
9
11
  update: (group: any) => void;
@@ -19,5 +21,9 @@ declare class Element {
19
21
  iframeName(): string;
20
22
  isMounted(): boolean;
21
23
  isValidElement(): boolean;
24
+ setError(clientErrorText: string): void;
25
+ resetError(): void;
26
+ setValue(elementValue: string): void;
27
+ clearValue(): void;
22
28
  }
23
- export default Element;
29
+ export default CollectElement;
@@ -0,0 +1,3 @@
1
+ declare abstract class Container {
2
+ }
3
+ export default Container;
@@ -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
  }
@@ -0,0 +1,9 @@
1
+ declare abstract class SkyflowElement {
2
+ abstract mount(domElementSelector: any): any;
3
+ abstract unmount(): any;
4
+ abstract setError(clientErrorText: string): any;
5
+ abstract resetError(): any;
6
+ abstract iframeName(): any;
7
+ abstract getID(): any;
8
+ }
9
+ export default SkyflowElement;
@@ -1,5 +1,6 @@
1
- import RevealElement from './reveal/RevealElement';
2
- import { RedactionType } from '../../utils/common';
1
+ import { RedactionType } from '../../../utils/common';
2
+ import Container from '../common/Container';
3
+ import RevealElement from './RevealElement';
3
4
  export interface IRevealElementInput {
4
5
  token?: string;
5
6
  redaction?: RedactionType;
@@ -9,9 +10,9 @@ export interface IRevealElementInput {
9
10
  altText?: string;
10
11
  errorTextStyles?: object;
11
12
  }
12
- declare class RevealContainer {
13
+ declare class RevealContainer extends Container {
13
14
  #private;
14
- constructor(metaData: any, context: any);
15
+ constructor(metaData: any, skyflowElements: any, context: any);
15
16
  create(record: IRevealElementInput): RevealElement;
16
17
  reveal(): Promise<unknown>;
17
18
  }
@@ -0,0 +1,21 @@
1
+ import { Context } from '../../../utils/common';
2
+ import SkyflowElement from '../common/SkyflowElement';
3
+ import { IRevealElementInput } from './RevealContainer';
4
+ declare class RevealElement extends SkyflowElement {
5
+ #private;
6
+ constructor(record: IRevealElementInput, metaData: any, containerId: string, elementId: string, context: Context);
7
+ getID(): string;
8
+ mount(domElementSelector: any): void;
9
+ iframeName(): string;
10
+ isMounted(): boolean;
11
+ hasToken(): boolean;
12
+ isClientSetError(): boolean;
13
+ getRecordData(): any;
14
+ setError(clientErrorText: string): void;
15
+ resetError(): void;
16
+ setAltText(altText: string): void;
17
+ clearAltText(): void;
18
+ setToken(token: string): void;
19
+ unmount(): void;
20
+ }
21
+ export default RevealElement;
@@ -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;
@@ -0,0 +1,10 @@
1
+ import { IConnectionConfig, ISoapConnectionConfig } from '../../../utils/common';
2
+ declare class SkyflowFrameController {
3
+ #private;
4
+ constructor();
5
+ static init(): SkyflowFrameController;
6
+ insertData(records: any, options: any): Promise<unknown>;
7
+ sendInvokeConnectionRequest(config: IConnectionConfig): Promise<unknown>;
8
+ invokeSoapConnectionRequest(config: ISoapConnectionConfig): Promise<unknown>;
9
+ }
10
+ export default SkyflowFrameController;
@@ -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,22 @@ 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
+ doesClientHasError: boolean;
26
+ clientErrorText: string | undefined;
27
+ expirationDateFormat: string;
28
+ constructor(name: string, label: string, metaData: any, context: Context);
23
29
  onFocusChange: (focus: boolean) => void;
24
30
  changeFocus: (focus: boolean) => void;
25
31
  setReplacePattern(pattern: string[]): void;
26
32
  setMask(mask: string[]): void;
27
- setValidation(): void;
33
+ setValidation(validations: IValidationRule[] | undefined): void;
34
+ setExpirationDateFormat(format: string): void;
28
35
  setSensitive(sensitive?: boolean): void;
29
36
  setValue: (value?: string, valid?: boolean) => void;
30
37
  getValue: () => string | undefined;
@@ -37,6 +44,7 @@ export declare class IFrameFormElement extends EventEmitter {
37
44
  value: string | undefined;
38
45
  };
39
46
  validator(value: string): boolean;
47
+ validateCustomValidations(value: string): boolean;
40
48
  collectBusEvents: () => void;
41
49
  sendChangeStatus: (inputEvent?: boolean) => void;
42
50
  resetData(): void;
@@ -50,7 +58,8 @@ export declare class IFrameForm {
50
58
  private controllerId;
51
59
  private clientDomain;
52
60
  private context;
53
- constructor(controllerId: string, clientDomain: string);
61
+ private logLevel;
62
+ constructor(controllerId: string, clientDomain: string, logLevel: LogLevel);
54
63
  setClient(client: any): void;
55
64
  setClientMetadata(clientMetaData: any): void;
56
65
  setContext(context: Context): void;
@@ -1,12 +1,14 @@
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
+ private CLASS_NAME;
10
+ constructor(controllerId: string, logLevel: LogLevel);
11
+ static init(uuid: string, logLevel: any): FrameController;
10
12
  }
11
13
  export declare class FrameElement {
12
14
  options: any;
@@ -33,4 +35,5 @@ export declare class FrameElement {
33
35
  }): void;
34
36
  setClass(types: string[], dom?: HTMLElement, preText?: string): void;
35
37
  updateOptions(options: any): void;
38
+ private applyMask;
36
39
  }
@@ -3,5 +3,8 @@ declare class RevealFrame {
3
3
  static revealFrame: RevealFrame;
4
4
  static init(): void;
5
5
  constructor(record: any, context: any);
6
+ private setRevealError;
7
+ private updateRevealElementOptions;
8
+ private updateDataView;
6
9
  }
7
10
  export default RevealFrame;
@@ -1,4 +1,4 @@
1
- import { IInsertRecordInput, IInsertRecord } from '../utils/common';
1
+ import { IInsertRecordInput, IInsertRecord, IValidationRule } from '../utils/common';
2
2
  export declare const constructInsertRecordRequest: (records: IInsertRecordInput, options?: Record<string, any>) => any;
3
3
  export declare const constructInsertRecordResponse: (responseBody: any, tokens: boolean, records: IInsertRecord[]) => {
4
4
  records: any;
@@ -6,3 +6,4 @@ export declare const constructInsertRecordResponse: (responseBody: any, tokens:
6
6
  export declare const constructElementsInsertReq: (req: any, options: any) => {
7
7
  records: IInsertRecord[];
8
8
  };
9
+ export declare const checkForElementMatchRule: (validations: IValidationRule[]) => boolean;
File without changes
@@ -1,4 +1,8 @@
1
+ import { CollectElementInput } from '../core/external/collect/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;
8
+ export declare const formatOptions: (elementType: any, options: any, logLevel: any) => any;
@@ -1,2 +1,5 @@
1
1
  export declare function connectionConfigParser(data: any, configKey: any): void;
2
2
  export declare function constructInvokeConnectionRequest(data: any): Promise<any>;
3
+ export declare function constructSoapConnectionRequestXml(requestXml: string): Promise<string>;
4
+ export declare function extractSkyflowTagsFromResponseBody(responseBody: any, path: string, skyflowTags: any, connectionResponse: any): void;
5
+ export declare function soapResponseBodyParser(mainTags: any, connectionResponse: any): void;
@@ -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
  }
@@ -71,3 +76,13 @@ export interface IConnectionConfig {
71
76
  requestHeader?: any;
72
77
  responseBody?: any;
73
78
  }
79
+ export interface IValidationRule {
80
+ type: ValidationRuleType;
81
+ params: any;
82
+ }
83
+ export interface ISoapConnectionConfig {
84
+ connectionURL: string;
85
+ httpHeaders?: any;
86
+ requestXML: any;
87
+ responseXML?: any;
88
+ }