skyflow-js 2.5.0-beta.1 → 2.5.0-beta.3
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/dist/sdkNodeBuild/index.js +1 -1
- package/dist/sdkNodeBuild/index.js.gz +0 -0
- package/package.json +1 -1
- package/types/core/constants.d.ts +2 -8
- package/types/core/external/collect/collect-container.d.ts +2 -4
- package/types/core/external/collect/collect-element.d.ts +2 -0
- package/types/core/external/reveal/reveal-container.d.ts +1 -4
- package/types/core/external/reveal/reveal-element.d.ts +0 -2
- package/types/core/external/skyflow-container.d.ts +0 -3
- package/types/core/internal/iframe-form/index.d.ts +26 -0
- package/types/core/internal/reveal/reveal-frame.d.ts +0 -2
- package/types/core/internal/skyflow-frame/skyflow-frame-controller.d.ts +3 -7
- package/types/core-utils/collect.d.ts +1 -1
- package/types/core-utils/reveal.d.ts +1 -1
- package/types/utils/logs.d.ts +1 -0
- package/types/utils/bus-events/event-wrapper.d.ts +0 -11
|
Binary file
|
package/package.json
CHANGED
|
@@ -86,14 +86,9 @@ export declare const ELEMENT_EVENTS_TO_CLIENT: {
|
|
|
86
86
|
HEIGHT: string;
|
|
87
87
|
};
|
|
88
88
|
export declare const ELEMENT_EVENTS_TO_IFRAME: {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
REVEAL_CALL_WINDOW_REQUEST: string;
|
|
92
|
-
SKYFLOW_CONTROLLER_READY: string;
|
|
89
|
+
COLLECT_INVOKE_REQUEST: string;
|
|
90
|
+
COLLECT_DATA_REQUEST: string;
|
|
93
91
|
COLLECT_CALL_REQUESTS: string;
|
|
94
|
-
COLLECT_CALL_REQUEST: string;
|
|
95
|
-
COLLECT: string;
|
|
96
|
-
COLLECT_SUCCESS: string;
|
|
97
92
|
REVEAL_CALL_REQUESTS: string;
|
|
98
93
|
FRAME_READY: string;
|
|
99
94
|
READY_FOR_CLIENT: string;
|
|
@@ -111,7 +106,6 @@ export declare const ELEMENT_EVENTS_TO_IFRAME: {
|
|
|
111
106
|
PUREJS_FRAME_READY: string;
|
|
112
107
|
PUREJS_GET_ACCESS_TOKEN: string;
|
|
113
108
|
GET_BEARER_TOKEN: string;
|
|
114
|
-
GET_ACCESS_TOKEN_BACK: string;
|
|
115
109
|
GET_COLLECT_ELEMENT: string;
|
|
116
110
|
GET_REVEAL_ELEMENT: string;
|
|
117
111
|
COLLECT_ELEMENT_SET_ERROR: string;
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { CollectElementInput, CollectElementOptions, CollectResponse, ICollectOptions, UploadFilesResponse } from '../../../utils/common';
|
|
2
2
|
import Container from '../common/container';
|
|
3
3
|
import CollectElement from './collect-element';
|
|
4
|
-
import EventWrapper from '../../../utils/bus-events/event-wrapper';
|
|
5
4
|
declare class CollectContainer extends Container {
|
|
6
5
|
#private;
|
|
7
6
|
type: string;
|
|
8
|
-
|
|
9
|
-
eventWrapper: EventWrapper;
|
|
10
|
-
constructor(options: any, metaData: any, skyflowElements: any, context: any, isShadowDom?: boolean);
|
|
7
|
+
constructor(options: any, metaData: any, skyflowElements: any, context: any);
|
|
11
8
|
create: (input: CollectElementInput, options?: CollectElementOptions) => CollectElement;
|
|
12
9
|
collect: (options?: ICollectOptions) => Promise<CollectResponse>;
|
|
13
10
|
uploadFiles: (options: ICollectOptions) => Promise<UploadFilesResponse>;
|
|
11
|
+
checkIfFrameExistsInShadowRoot: (shadowRoot: ShadowRoot | null, frameName: string) => boolean;
|
|
14
12
|
}
|
|
15
13
|
export default CollectContainer;
|
|
@@ -10,6 +10,8 @@ declare class CollectElement extends SkyflowElement {
|
|
|
10
10
|
constructor(elementId: string, elementGroup: any, metaData: any, container: any, isSingleElementAPI: boolean | undefined, destroyCallback: Function, updateCallback: Function, context: Context, groupEventEmitter?: EventEmitter);
|
|
11
11
|
getID: () => string;
|
|
12
12
|
mount: (domElement: HTMLElement | string) => void;
|
|
13
|
+
getShadowRoot: () => ShadowRoot | null;
|
|
14
|
+
emitEventFromShadowRoot: (eventName: string, options?: Record<string, any>, callback?: any) => void;
|
|
13
15
|
unmount: () => void;
|
|
14
16
|
updateElementGroup: (group: any) => void;
|
|
15
17
|
updateElement: (elementOptions: any) => void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { RedactionType, RevealResponse } from '../../../utils/common';
|
|
2
2
|
import Container from '../common/container';
|
|
3
3
|
import RevealElement from './reveal-element';
|
|
4
|
-
import EventWrapper from '../../../utils/bus-events/event-wrapper';
|
|
5
4
|
export interface IRevealElementInput {
|
|
6
5
|
token?: string;
|
|
7
6
|
skyflowID?: string;
|
|
@@ -22,9 +21,7 @@ export interface IRevealElementOptions {
|
|
|
22
21
|
declare class RevealContainer extends Container {
|
|
23
22
|
#private;
|
|
24
23
|
type: string;
|
|
25
|
-
|
|
26
|
-
eventWrapper: EventWrapper;
|
|
27
|
-
constructor(metaData: any, skyflowElements: any, context: any, options?: {}, isShadowDom?: boolean);
|
|
24
|
+
constructor(metaData: any, skyflowElements: any, context: any, options?: {});
|
|
28
25
|
create(record: IRevealElementInput, options?: IRevealElementOptions): RevealElement;
|
|
29
26
|
reveal(): Promise<RevealResponse>;
|
|
30
27
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { Context, RenderFileResponse } from '../../../utils/common';
|
|
2
2
|
import SkyflowElement from '../common/skyflow-element';
|
|
3
3
|
import { IRevealElementInput, IRevealElementOptions } from './reveal-container';
|
|
4
|
-
import EventWrapper from '../../../utils/bus-events/event-wrapper';
|
|
5
4
|
declare class RevealElement extends SkyflowElement {
|
|
6
5
|
#private;
|
|
7
|
-
eventWrapper: EventWrapper;
|
|
8
6
|
constructor(record: IRevealElementInput, options: IRevealElementOptions | undefined, metaData: any, container: any, elementId: string, context: Context);
|
|
9
7
|
getID(): string;
|
|
10
8
|
mount(domElementSelector: HTMLElement | string): void;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { IDetokenizeInput, IGetInput, IGetByIdInput, IInsertOptions, IDeleteOptions, IDeleteRecordInput, IGetOptions, InsertResponse, GetByIdResponse, GetResponse, DeleteResponse, IInsertRecordInput, DetokenizeResponse } from '../../utils/common';
|
|
2
|
-
import EventWrapper from '../../utils/bus-events/event-wrapper';
|
|
3
2
|
declare class SkyflowContainer {
|
|
4
3
|
#private;
|
|
5
4
|
isControllerFrameReady: boolean;
|
|
6
|
-
eventWrapper: EventWrapper;
|
|
7
|
-
skyflowFrameControllerName: string;
|
|
8
5
|
constructor(client: any, context: any);
|
|
9
6
|
detokenize(detokenizeInput: IDetokenizeInput): Promise<DetokenizeResponse>;
|
|
10
7
|
insert(records: IInsertRecordInput, options?: IInsertOptions): Promise<InsertResponse>;
|
|
@@ -35,7 +35,33 @@ export default class IFrameFormElement extends EventEmitter {
|
|
|
35
35
|
preserveFileName: boolean;
|
|
36
36
|
allowedFileType: any;
|
|
37
37
|
blockEmptyFiles: boolean;
|
|
38
|
+
containerId: string;
|
|
39
|
+
clientId: string;
|
|
38
40
|
constructor(name: string, label: string, metaData: any, context: Context, skyflowID?: string);
|
|
41
|
+
getProperties: () => {
|
|
42
|
+
state: {
|
|
43
|
+
value: any;
|
|
44
|
+
isFocused: boolean;
|
|
45
|
+
isValid: boolean;
|
|
46
|
+
isEmpty: boolean;
|
|
47
|
+
isComplete: boolean;
|
|
48
|
+
name: string;
|
|
49
|
+
isRequired: boolean;
|
|
50
|
+
isTouched: boolean;
|
|
51
|
+
selectedCardScheme: string;
|
|
52
|
+
};
|
|
53
|
+
value: any;
|
|
54
|
+
fieldType: string;
|
|
55
|
+
doesClientHasError: boolean;
|
|
56
|
+
clientErrorText: string | undefined;
|
|
57
|
+
errorText: string | undefined;
|
|
58
|
+
onFocusChange: (focus: boolean) => void;
|
|
59
|
+
setValue: (value?: any, valid?: boolean, isReset?: boolean) => void;
|
|
60
|
+
validations: IValidationRule[] | undefined;
|
|
61
|
+
isMatchEqual: (index: number, value: string, validation: IValidationRule) => boolean;
|
|
62
|
+
tableName: string | undefined;
|
|
63
|
+
skyflowID: string | undefined;
|
|
64
|
+
};
|
|
39
65
|
isMatchEqual(index: number, value: string, validation: IValidationRule): boolean;
|
|
40
66
|
checkMatch(index: number, validation: IValidationRule): void;
|
|
41
67
|
listenForMatchRule(): void;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import EventWrapper from '../../../utils/bus-events/event-wrapper';
|
|
2
1
|
declare class RevealFrame {
|
|
3
2
|
#private;
|
|
4
3
|
static revealFrame: RevealFrame;
|
|
5
4
|
private domCopy?;
|
|
6
5
|
private isRevealCalled?;
|
|
7
|
-
eventWrapper: EventWrapper;
|
|
8
6
|
static init(): void;
|
|
9
7
|
constructor(record: any, context: any, id: any);
|
|
10
8
|
private getExtension;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import { IRevealRecord } from '../../../utils/common';
|
|
2
|
-
import EventWrapper from '../../../utils/bus-events/event-wrapper';
|
|
3
2
|
declare class SkyflowFrameController {
|
|
4
3
|
#private;
|
|
5
|
-
eventWrapper: EventWrapper;
|
|
6
4
|
constructor(clientId: string);
|
|
7
5
|
static init(clientId: any): SkyflowFrameController;
|
|
8
|
-
revealData(revealRecords: IRevealRecord[], containerId: any
|
|
6
|
+
revealData(revealRecords: IRevealRecord[], containerId: any): Promise<unknown>;
|
|
9
7
|
insertData(records: any, options: any): Promise<unknown>;
|
|
10
8
|
renderFile(data: any, iframeName: any): Promise<unknown>;
|
|
11
|
-
|
|
9
|
+
getProperties(element: any, containerId: string): any;
|
|
10
|
+
tokenize: (options: any) => Promise<unknown>;
|
|
12
11
|
parallelUploadFiles: (options: any) => Promise<unknown>;
|
|
13
12
|
uploadFiles: (fileElement: any) => Promise<unknown>;
|
|
14
|
-
private handleCollectMessage;
|
|
15
|
-
handleRevealMessage: (event: MessageEvent) => void;
|
|
16
|
-
private sendCollectResponse;
|
|
17
13
|
}
|
|
18
14
|
export default SkyflowFrameController;
|
|
@@ -27,6 +27,6 @@ export declare const constructElementsInsertReq: (req: any, update: any, options
|
|
|
27
27
|
updateRecords: IInsertRecord[];
|
|
28
28
|
records?: undefined;
|
|
29
29
|
})[];
|
|
30
|
-
export declare const updateRecordsBySkyflowID: (skyflowIdRecords: any, client: Client, options: any
|
|
30
|
+
export declare const updateRecordsBySkyflowID: (skyflowIdRecords: any, client: Client, options: any) => Promise<unknown>;
|
|
31
31
|
export declare const checkForElementMatchRule: (validations: IValidationRule[]) => boolean;
|
|
32
32
|
export declare const checkForValueMatch: (validations: IValidationRule[], element: IFrameFormElement) => boolean;
|
|
@@ -2,7 +2,7 @@ import Client from '../client';
|
|
|
2
2
|
import { IRevealRecord, IRevealResponseType, IGetRecord, ISkyflowIdRecord, IRenderResponseType, IGetOptions, RenderFileResponse } from '../utils/common';
|
|
3
3
|
export declare const getFileURLForRender: (skyflowIdRecord: IRevealRecord, client: Client, authToken: string) => Promise<any>;
|
|
4
4
|
export declare const getFileURLFromVaultBySkyflowID: (skyflowIdRecord: IRevealRecord, client: Client) => Promise<IRenderResponseType>;
|
|
5
|
-
export declare const fetchRecordsByTokenId: (tokenIdRecords: IRevealRecord[], client: Client
|
|
5
|
+
export declare const fetchRecordsByTokenId: (tokenIdRecords: IRevealRecord[], client: Client) => Promise<IRevealResponseType>;
|
|
6
6
|
export declare const formatRecordsForIframe: (response: IRevealResponseType) => Record<string, string>;
|
|
7
7
|
export declare const formatRecordsForRender: (response: IRenderResponseType, column: any, skyflowID: any) => {
|
|
8
8
|
column: any;
|
package/types/utils/logs.d.ts
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FramebusOnHandler, FramebusReplyHandler } from 'framebus/dist/lib/types';
|
|
2
|
-
declare class EventWrapper {
|
|
3
|
-
private listeners;
|
|
4
|
-
private isDestroyed;
|
|
5
|
-
private isShadowMode;
|
|
6
|
-
constructor(isShadowMode?: boolean);
|
|
7
|
-
on(eventName: string, callback: FramebusOnHandler, isShadowMode: boolean, skyflowFrameName: any, messageHandler: (event: MessageEvent) => void): void;
|
|
8
|
-
off(eventName: string, callback: FramebusOnHandler, isShadowMode: boolean): void;
|
|
9
|
-
emit(eventName: string, data: any, callback?: FramebusReplyHandler, isShadowMode?: boolean, skyflowFrameName?: string, window?: Window, parent?: boolean): void;
|
|
10
|
-
}
|
|
11
|
-
export default EventWrapper;
|