skyflow-js 2.2.3 → 2.3.1

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": "2.2.3",
5
+ "version": "2.3.1",
6
6
  "author": "Skyflow",
7
7
  "description": "Skyflow JavaScript SDK",
8
8
  "homepage": "https://github.com/skyflowapi/skyflow-js",
@@ -62,7 +62,14 @@ export declare const PUREJS_TYPES: {
62
62
  GET_BY_SKYFLOWID: string;
63
63
  GET: string;
64
64
  DELETE: string;
65
- FILE_RENDER: string;
65
+ };
66
+ export declare const COLLECT_TYPES: {
67
+ COLLECT: string;
68
+ FILE_UPLOAD: string;
69
+ };
70
+ export declare const REVEAL_TYPES: {
71
+ REVEAL: string;
72
+ RENDER_FILE: string;
66
73
  };
67
74
  export declare const ELEMENT_EVENTS_TO_CLIENT: {
68
75
  CHANGE: string;
@@ -79,6 +86,8 @@ export declare const ELEMENT_EVENTS_TO_CLIENT: {
79
86
  HEIGHT: string;
80
87
  };
81
88
  export declare const ELEMENT_EVENTS_TO_IFRAME: {
89
+ COLLECT_CALL_REQUESTS: string;
90
+ REVEAL_CALL_REQUESTS: string;
82
91
  FRAME_READY: string;
83
92
  READY_FOR_CLIENT: string;
84
93
  TOKENIZATION_REQUEST: string;
@@ -106,6 +115,8 @@ export declare const ELEMENT_EVENTS_TO_IFRAME: {
106
115
  RENDER_FILE_RESPONSE_READY: string;
107
116
  RENDER_FILE_REQUEST: string;
108
117
  PUSH_EVENT: string;
118
+ SKYFLOW_FRAME_CONTROLLER_READY: string;
119
+ COLLECT_ELEMENT_READY: string;
109
120
  };
110
121
  export declare const REVEAL_ELEMENT_OPTIONS_TYPES: {
111
122
  TOKEN: string;
@@ -26,7 +26,7 @@ declare class CollectContainer extends Container {
26
26
  type: string;
27
27
  constructor(options: any, metaData: any, skyflowElements: any, context: any);
28
28
  create: (input: CollectElementInput, options?: any) => CollectElement;
29
- collect: (options?: ICollectOptions) => Promise<unknown>;
30
- uploadFiles: (options: any) => Promise<unknown>;
29
+ collect: (options?: ICollectOptions) => Promise<any>;
30
+ uploadFiles: (options: any) => Promise<any>;
31
31
  }
32
32
  export default CollectContainer;
@@ -29,6 +29,6 @@ declare class ComposableContainer extends Container {
29
29
  on: (eventName: string, handler: any) => void;
30
30
  mount: (domElement: any) => void;
31
31
  unmount: () => void;
32
- collect: (options?: ICollectOptions) => Promise<unknown>;
32
+ collect: (options?: ICollectOptions) => Promise<any>;
33
33
  }
34
34
  export default ComposableContainer;
@@ -4,7 +4,7 @@ export default class IFrame {
4
4
  iframe: HTMLIFrameElement;
5
5
  container?: Element;
6
6
  constructor(name: any, metadata: any, containerId: any, logLevel: any);
7
- mount: (domElement: any, elementId?: string) => void;
7
+ mount: (domElement: any, elementId?: string, data?: any) => void;
8
8
  setIframeHeight: (height: any) => void;
9
9
  unmount: () => void;
10
10
  }
@@ -1,12 +1,12 @@
1
1
  import { IDetokenizeInput, IGetInput, IGetByIdInput, IInsertOptions, IDeleteOptions, IDeleteRecordInput, IGetOptions } from '../../utils/common';
2
2
  declare class SkyflowContainer {
3
3
  #private;
4
+ isControllerFrameReady: boolean;
4
5
  constructor(client: any, context: any);
5
6
  detokenize(detokenizeInput: IDetokenizeInput): Promise<any>;
6
7
  insert(records: any, options?: IInsertOptions): Promise<any>;
7
8
  getById(getByIdInput: IGetByIdInput): Promise<unknown>;
8
9
  get(getInput: IGetInput, options?: IGetOptions): Promise<unknown>;
9
10
  delete(records: IDeleteRecordInput, options?: IDeleteOptions): Promise<unknown>;
10
- renderFile(recordData: any, metaData: any, containerId: any, iframeName: any): Promise<unknown>;
11
11
  }
12
12
  export default SkyflowContainer;
@@ -10,6 +10,7 @@ export interface ThreeDSBrowserDetails {
10
10
  challenge_window_size?: string;
11
11
  browser_java_enabled?: boolean;
12
12
  browser_javascript_enabled?: boolean;
13
+ accept_language: string[];
13
14
  }
14
15
  declare class ThreeDS {
15
16
  #private;
@@ -0,0 +1,18 @@
1
+ import { Context } from '../../utils/common';
2
+ import IFrameFormElement from './iframe-form';
3
+ import FrameElement from '.';
4
+ export default class FrameElementInit {
5
+ #private;
6
+ iframeFormElement: IFrameFormElement | undefined;
7
+ clientMetaData: any;
8
+ context: Context;
9
+ frameElement: FrameElement;
10
+ private static frameEle?;
11
+ containerId: string;
12
+ group: any;
13
+ constructor();
14
+ updateGroupData: () => void;
15
+ createIframeElement: (frameName: any, label: any, skyflowID: any, isRequired: any) => IFrameFormElement;
16
+ static startFrameElement: () => void;
17
+ createContainerDiv: (newGroup: any) => void;
18
+ }
@@ -1,6 +1,6 @@
1
1
  import EventEmitter from '../../../event-emitter';
2
- import { Context, IValidationRule, LogLevel } from '../../../utils/common';
3
- export declare class IFrameFormElement extends EventEmitter {
2
+ import { Context, IValidationRule } from '../../../utils/common';
3
+ export default class IFrameFormElement extends EventEmitter {
4
4
  state: {
5
5
  value: any;
6
6
  isFocused: boolean;
@@ -67,22 +67,3 @@ export declare class IFrameFormElement extends EventEmitter {
67
67
  resetData(): void;
68
68
  destroy(): void;
69
69
  }
70
- export declare class IFrameForm {
71
- private iFrameFormElements;
72
- private client?;
73
- private clientMetaData?;
74
- private callbacks;
75
- private controllerId;
76
- private clientDomain;
77
- private context;
78
- private logLevel;
79
- constructor(controllerId: string, clientDomain: string, logLevel: LogLevel);
80
- setClient(client: any): void;
81
- setClientMetadata(clientMetaData: any): void;
82
- setContext(context: Context): void;
83
- private getOrCreateIFrameFormElement;
84
- paralleUploadFiles: () => Promise<unknown>;
85
- uploadFiles: (fileElement: any) => Promise<unknown>;
86
- tokenize: (options: any) => Promise<unknown>;
87
- private initializeFrame;
88
- }
@@ -1,15 +1,5 @@
1
- import { IFrameFormElement } from './iframe-form';
2
- import { LogLevel } from '../../utils/common';
3
- export declare class FrameController {
4
- #private;
5
- controller?: FrameController;
6
- controllerId: string;
7
- private clientDomain;
8
- private CLASS_NAME;
9
- constructor(controllerId: string, logLevel: LogLevel);
10
- static init(uuid: string, logLevel: any): FrameController;
11
- }
12
- export declare class FrameElement {
1
+ import IFrameFormElement from './iframe-form';
2
+ export default class FrameElement {
13
3
  options: any;
14
4
  private htmlDivElement;
15
5
  private iFrameFormElement;
@@ -4,7 +4,7 @@ declare class RevealFrame {
4
4
  private domCopy?;
5
5
  private isRevealCalled?;
6
6
  static init(): void;
7
- constructor(record: any, context: any);
7
+ constructor(record: any, context: any, id: any);
8
8
  private getExtension;
9
9
  private addFileRender;
10
10
  private setRevealError;
@@ -1,9 +1,13 @@
1
1
  import { IRevealRecord } from '../../../utils/common';
2
2
  declare class SkyflowFrameController {
3
3
  #private;
4
- constructor(clientId: any);
4
+ constructor(clientId: string);
5
5
  static init(clientId: any): SkyflowFrameController;
6
+ revealData(revealRecords: IRevealRecord[], containerId: any): Promise<unknown>;
6
7
  insertData(records: any, options: any): Promise<unknown>;
7
- renderFile(data: IRevealRecord, containerId: any, iframeName: any): Promise<unknown>;
8
+ renderFile(data: any, iframeName: any): Promise<unknown>;
9
+ tokenize: (options: any) => Promise<unknown>;
10
+ parallelUploadFiles: (options: any) => Promise<unknown>;
11
+ uploadFiles: (fileElement: any) => Promise<unknown>;
8
12
  }
9
13
  export default SkyflowFrameController;
@@ -1,6 +1,6 @@
1
1
  import Client from '../client';
2
2
  import { IInsertRecordInput, IInsertRecord, IValidationRule } from '../utils/common';
3
- import { IFrameFormElement } from '../core/internal/iframe-form';
3
+ import IFrameFormElement from '../core/internal/iframe-form';
4
4
  export interface IUpsertOptions {
5
5
  table: string;
6
6
  column: string;
@@ -719,5 +719,17 @@ declare const SKYFLOW_ERROR_CODE: {
719
719
  code: number;
720
720
  description: string;
721
721
  };
722
+ NO_ELEMENTS_IN_COLLECT: {
723
+ code: number;
724
+ description: string;
725
+ };
726
+ NO_ELEMENTS_IN_COMPOSABLE: {
727
+ code: number;
728
+ description: string;
729
+ };
730
+ NO_ELEMENTS_IN_REVEAL: {
731
+ code: number;
732
+ description: string;
733
+ };
722
734
  };
723
735
  export default SKYFLOW_ERROR_CODE;
@@ -74,6 +74,9 @@ declare const logs: {
74
74
  VALIDATE_GET_BY_ID_INPUT: string;
75
75
  };
76
76
  errorLogs: {
77
+ NO_ELEMENTS_IN_COLLECT: string;
78
+ NO_ELEMENTS_IN_COMPOSABLE: string;
79
+ NO_ELEMENTS_IN_REVEAL: string;
77
80
  INVALID_FILE_NAMES: string;
78
81
  INVALID_FILE_NAME: string;
79
82
  CLIENT_CONNECTION: string;
@@ -1,12 +0,0 @@
1
- import { LogLevel } from '../../utils/common';
2
- export default class FrameElements {
3
- #private;
4
- private static group?;
5
- private static frameElements?;
6
- private getOrCreateIFrameFormElement;
7
- constructor(getOrCreateIFrameFormElement: any, metaData: any, logLevel: LogLevel);
8
- static start: () => void;
9
- static init: (getOrCreateIFrameFormElement: Function, metaData: any) => void;
10
- setup: () => void;
11
- updateOptions: (newGroup: any) => void;
12
- }
@@ -1,8 +0,0 @@
1
- import { IRevealRecord } from '../../../utils/common';
2
- declare class RevealFrameController {
3
- #private;
4
- constructor(containerId: any);
5
- static init(containerId: string): RevealFrameController;
6
- revealData(revealRecords: IRevealRecord[]): Promise<unknown>;
7
- }
8
- export default RevealFrameController;