skyflow-js 2.5.0-beta.2 → 2.5.0-beta.4
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 -13
- 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 +2 -2
- package/types/core/external/skyflow-container.d.ts +0 -3
- package/types/core/internal/iframe-form/index.d.ts +27 -0
- package/types/core/internal/reveal/reveal-frame.d.ts +0 -2
- package/types/core/internal/skyflow-frame/skyflow-frame-controller.d.ts +6 -11
- package/types/core-utils/collect.d.ts +1 -1
- package/types/core-utils/reveal.d.ts +2 -2
- package/types/utils/logs.d.ts +4 -0
- package/types/utils/bus-events/event-wrapper.d.ts +0 -11
|
Binary file
|
package/package.json
CHANGED
|
@@ -86,19 +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_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
|
+
COLLECT_INVOKE_REQUEST: string;
|
|
90
|
+
COLLECT_DATA_REQUEST: string;
|
|
96
91
|
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;
|
|
102
92
|
REVEAL_CALL_REQUESTS: string;
|
|
103
93
|
FRAME_READY: string;
|
|
104
94
|
READY_FOR_CLIENT: string;
|
|
@@ -116,7 +106,6 @@ export declare const ELEMENT_EVENTS_TO_IFRAME: {
|
|
|
116
106
|
PUREJS_FRAME_READY: string;
|
|
117
107
|
PUREJS_GET_ACCESS_TOKEN: string;
|
|
118
108
|
GET_BEARER_TOKEN: string;
|
|
119
|
-
GET_ACCESS_TOKEN_BACK: string;
|
|
120
109
|
GET_COLLECT_ELEMENT: string;
|
|
121
110
|
GET_REVEAL_ELEMENT: string;
|
|
122
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,12 +1,12 @@
|
|
|
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;
|
|
8
|
+
getShadowRoot: () => ShadowRoot | null;
|
|
9
|
+
emitEventFromShadowRoot: (eventName: string, options?: Record<string, any>) => void;
|
|
10
10
|
mount(domElementSelector: HTMLElement | string): void;
|
|
11
11
|
renderFile(): Promise<RenderFileResponse>;
|
|
12
12
|
iframeName(): string;
|
|
@@ -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,34 @@ 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
|
+
preserveFileName: boolean;
|
|
65
|
+
};
|
|
39
66
|
isMatchEqual(index: number, value: string, validation: IValidationRule): boolean;
|
|
40
67
|
checkMatch(index: number, validation: IValidationRule): void;
|
|
41
68
|
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,19 +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
|
-
renderFile(data: any, iframeName: any,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
private handleFileUploadMessage;
|
|
16
|
-
private handleRevealMessage;
|
|
17
|
-
private sendCollectResponse;
|
|
8
|
+
renderFile(data: any, iframeName: any, shadowRoot?: boolean): Promise<unknown>;
|
|
9
|
+
getProperties(element: any, containerId: string): any;
|
|
10
|
+
tokenize: (options: any) => Promise<unknown>;
|
|
11
|
+
parallelUploadFiles: (options: any) => Promise<unknown>;
|
|
12
|
+
uploadFiles: (fileElement: any) => Promise<unknown>;
|
|
18
13
|
}
|
|
19
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;
|
|
@@ -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
|
|
5
|
-
export declare const fetchRecordsByTokenId: (tokenIdRecords: IRevealRecord[], client: Client
|
|
4
|
+
export declare const getFileURLFromVaultBySkyflowID: (skyflowIdRecord: IRevealRecord, client: Client) => Promise<IRenderResponseType>;
|
|
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,5 +1,8 @@
|
|
|
1
1
|
declare const logs: {
|
|
2
2
|
infoLogs: {
|
|
3
|
+
TOKENIZE_REQUEST: string;
|
|
4
|
+
TOKENIZE_REQUEST_INSERT: string;
|
|
5
|
+
TOKENIZE_REQUEST_CREATED: string;
|
|
3
6
|
INITIALIZE_CLIENT: string;
|
|
4
7
|
CLIENT_INITIALIZED: string;
|
|
5
8
|
CREATE_COLLECT_CONTAINER: string;
|
|
@@ -74,6 +77,7 @@ declare const logs: {
|
|
|
74
77
|
VALIDATE_GET_BY_ID_INPUT: string;
|
|
75
78
|
};
|
|
76
79
|
errorLogs: {
|
|
80
|
+
FRAME_COLLECT_EMIT_TIMEOUT: string;
|
|
77
81
|
NO_ELEMENTS_IN_COLLECT: string;
|
|
78
82
|
NO_ELEMENTS_IN_COMPOSABLE: string;
|
|
79
83
|
NO_ELEMENTS_IN_REVEAL: string;
|
|
@@ -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;
|