skyflow-js 2.4.1 → 2.5.0-beta.2
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 +13 -0
- package/types/core/external/collect/collect-container.d.ts +4 -1
- package/types/core/external/reveal/reveal-container.d.ts +4 -1
- package/types/core/external/reveal/reveal-element.d.ts +2 -0
- package/types/core/external/skyflow-container.d.ts +3 -0
- package/types/core/internal/reveal/reveal-frame.d.ts +2 -0
- package/types/core/internal/skyflow-frame/skyflow-frame-controller.d.ts +11 -5
- package/types/core-utils/collect.d.ts +1 -1
- package/types/core-utils/reveal.d.ts +2 -2
- package/types/utils/bus-events/event-wrapper.d.ts +11 -0
|
Binary file
|
package/package.json
CHANGED
|
@@ -86,7 +86,19 @@ export declare const ELEMENT_EVENTS_TO_CLIENT: {
|
|
|
86
86
|
HEIGHT: string;
|
|
87
87
|
};
|
|
88
88
|
export declare const ELEMENT_EVENTS_TO_IFRAME: {
|
|
89
|
+
REVEAL_CALL_WINDOW_CLIENT_RESPONSES: string;
|
|
90
|
+
RENDER_CALL_WINDOW_CLIENT_RESPONSES: string;
|
|
91
|
+
REVEAL_CALL_WINDOW_RESPONSE: string;
|
|
92
|
+
RENDER_CALL_WINDOW_RESPONSE: string;
|
|
93
|
+
RENDER_CALL_WINDOW_REQUEST: string;
|
|
94
|
+
REVEAL_CALL_WINDOW_REQUEST: string;
|
|
95
|
+
SKYFLOW_CONTROLLER_READY: string;
|
|
89
96
|
COLLECT_CALL_REQUESTS: string;
|
|
97
|
+
COLLECT_CALL_REQUEST: string;
|
|
98
|
+
COLLECT: string;
|
|
99
|
+
COLLECT_SUCCESS: string;
|
|
100
|
+
COLLECT_FILE_SUCCESS: string;
|
|
101
|
+
RENDER_CALL_REQUESTS: string;
|
|
90
102
|
REVEAL_CALL_REQUESTS: string;
|
|
91
103
|
FRAME_READY: string;
|
|
92
104
|
READY_FOR_CLIENT: string;
|
|
@@ -104,6 +116,7 @@ export declare const ELEMENT_EVENTS_TO_IFRAME: {
|
|
|
104
116
|
PUREJS_FRAME_READY: string;
|
|
105
117
|
PUREJS_GET_ACCESS_TOKEN: string;
|
|
106
118
|
GET_BEARER_TOKEN: string;
|
|
119
|
+
GET_ACCESS_TOKEN_BACK: string;
|
|
107
120
|
GET_COLLECT_ELEMENT: string;
|
|
108
121
|
GET_REVEAL_ELEMENT: string;
|
|
109
122
|
COLLECT_ELEMENT_SET_ERROR: string;
|
|
@@ -1,10 +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';
|
|
4
5
|
declare class CollectContainer extends Container {
|
|
5
6
|
#private;
|
|
6
7
|
type: string;
|
|
7
|
-
|
|
8
|
+
isShadowDom: boolean;
|
|
9
|
+
eventWrapper: EventWrapper;
|
|
10
|
+
constructor(options: any, metaData: any, skyflowElements: any, context: any, isShadowDom?: boolean);
|
|
8
11
|
create: (input: CollectElementInput, options?: CollectElementOptions) => CollectElement;
|
|
9
12
|
collect: (options?: ICollectOptions) => Promise<CollectResponse>;
|
|
10
13
|
uploadFiles: (options: ICollectOptions) => Promise<UploadFilesResponse>;
|
|
@@ -1,6 +1,7 @@
|
|
|
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';
|
|
4
5
|
export interface IRevealElementInput {
|
|
5
6
|
token?: string;
|
|
6
7
|
skyflowID?: string;
|
|
@@ -21,7 +22,9 @@ export interface IRevealElementOptions {
|
|
|
21
22
|
declare class RevealContainer extends Container {
|
|
22
23
|
#private;
|
|
23
24
|
type: string;
|
|
24
|
-
|
|
25
|
+
isShadowDom: boolean;
|
|
26
|
+
eventWrapper: EventWrapper;
|
|
27
|
+
constructor(metaData: any, skyflowElements: any, context: any, options?: {}, isShadowDom?: boolean);
|
|
25
28
|
create(record: IRevealElementInput, options?: IRevealElementOptions): RevealElement;
|
|
26
29
|
reveal(): Promise<RevealResponse>;
|
|
27
30
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
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';
|
|
4
5
|
declare class RevealElement extends SkyflowElement {
|
|
5
6
|
#private;
|
|
7
|
+
eventWrapper: EventWrapper;
|
|
6
8
|
constructor(record: IRevealElementInput, options: IRevealElementOptions | undefined, metaData: any, container: any, elementId: string, context: Context);
|
|
7
9
|
getID(): string;
|
|
8
10
|
mount(domElementSelector: HTMLElement | string): void;
|
|
@@ -1,7 +1,10 @@
|
|
|
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';
|
|
2
3
|
declare class SkyflowContainer {
|
|
3
4
|
#private;
|
|
4
5
|
isControllerFrameReady: boolean;
|
|
6
|
+
eventWrapper: EventWrapper;
|
|
7
|
+
skyflowFrameControllerName: string;
|
|
5
8
|
constructor(client: any, context: any);
|
|
6
9
|
detokenize(detokenizeInput: IDetokenizeInput): Promise<DetokenizeResponse>;
|
|
7
10
|
insert(records: IInsertRecordInput, options?: IInsertOptions): Promise<InsertResponse>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import EventWrapper from '../../../utils/bus-events/event-wrapper';
|
|
1
2
|
declare class RevealFrame {
|
|
2
3
|
#private;
|
|
3
4
|
static revealFrame: RevealFrame;
|
|
4
5
|
private domCopy?;
|
|
5
6
|
private isRevealCalled?;
|
|
7
|
+
eventWrapper: EventWrapper;
|
|
6
8
|
static init(): void;
|
|
7
9
|
constructor(record: any, context: any, id: any);
|
|
8
10
|
private getExtension;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { IRevealRecord } from '../../../utils/common';
|
|
2
|
+
import EventWrapper from '../../../utils/bus-events/event-wrapper';
|
|
2
3
|
declare class SkyflowFrameController {
|
|
3
4
|
#private;
|
|
5
|
+
eventWrapper: EventWrapper;
|
|
4
6
|
constructor(clientId: string);
|
|
5
7
|
static init(clientId: any): SkyflowFrameController;
|
|
6
|
-
revealData(revealRecords: IRevealRecord[], containerId: any): Promise<unknown>;
|
|
8
|
+
revealData(revealRecords: IRevealRecord[], containerId: any, bearerToken: string, type?: string): Promise<unknown>;
|
|
7
9
|
insertData(records: any, options: 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>;
|
|
10
|
+
renderFile(data: any, iframeName: any, bearerToken?: string): Promise<unknown>;
|
|
11
|
+
tokenize: (options: any, bearerToken: any) => Promise<unknown>;
|
|
12
|
+
parallelUploadFiles: (options: any, bearerToken: any) => Promise<unknown>;
|
|
13
|
+
uploadFiles: (fileElement: any, bearerToken: any) => Promise<unknown>;
|
|
14
|
+
private handleCollectMessage;
|
|
15
|
+
private handleFileUploadMessage;
|
|
16
|
+
private handleRevealMessage;
|
|
17
|
+
private sendCollectResponse;
|
|
12
18
|
}
|
|
13
19
|
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) => Promise<unknown>;
|
|
30
|
+
export declare const updateRecordsBySkyflowID: (skyflowIdRecords: any, client: Client, options: any, bearerToken: any) => Promise<unknown>;
|
|
31
31
|
export declare const checkForElementMatchRule: (validations: IValidationRule[]) => boolean;
|
|
32
32
|
export declare const checkForValueMatch: (validations: IValidationRule[], element: IFrameFormElement) => boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
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
|
-
export declare const getFileURLFromVaultBySkyflowID: (skyflowIdRecord: IRevealRecord, client: Client) => Promise<IRenderResponseType>;
|
|
5
|
-
export declare const fetchRecordsByTokenId: (tokenIdRecords: IRevealRecord[], client: Client) => Promise<IRevealResponseType>;
|
|
4
|
+
export declare const getFileURLFromVaultBySkyflowID: (skyflowIdRecord: IRevealRecord, client: Client, bearerToken?: string) => Promise<IRenderResponseType>;
|
|
5
|
+
export declare const fetchRecordsByTokenId: (tokenIdRecords: IRevealRecord[], client: Client, bearerToken: string, type?: string) => 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;
|
|
@@ -0,0 +1,11 @@
|
|
|
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;
|