skyflow-js 2.5.0 → 2.6.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.
- 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 +26 -1
- package/types/core/external/collect/compose-collect-container.d.ts +2 -1
- package/types/core/external/collect/compose-collect-element.d.ts +3 -3
- package/types/core/external/common/iframe.d.ts +1 -1
- package/types/core/external/reveal/composable-reveal-container.d.ts +16 -0
- package/types/core/external/reveal/composable-reveal-element.d.ts +13 -0
- package/types/core/external/reveal/composable-reveal-internal.d.ts +29 -0
- package/types/core/internal/composable-frame-element-init.d.ts +21 -0
- package/types/core/internal/frame-element-init.d.ts +11 -0
- package/types/core/internal/iframe-form/index.d.ts +5 -0
- package/types/core/internal/index.d.ts +3 -1
- package/types/core/internal/internal-types/index.d.ts +3 -0
- package/types/core/internal/reveal/reveal-frame.d.ts +7 -1
- package/types/core-utils/collect.d.ts +3 -0
- package/types/core-utils/reveal.d.ts +13 -1
- package/types/index-node.d.ts +2 -0
- package/types/skyflow.d.ts +4 -1
- package/types/utils/common/index.d.ts +17 -0
- package/types/utils/constants.d.ts +28 -0
- package/types/utils/logs.d.ts +10 -0
|
Binary file
|
package/package.json
CHANGED
|
@@ -9,10 +9,12 @@ export declare const SDK_IFRAME_EVENT = "SDK IFRAME EVENT";
|
|
|
9
9
|
export declare const DOMAIN = "US2";
|
|
10
10
|
export declare const CORALOGIX_DOMAIN = "https://cdn.rum-ingress-coralogix.com/coralogix/browser/latest/coralogix-browser-sdk.js";
|
|
11
11
|
export declare const FRAME_ELEMENT = "element";
|
|
12
|
+
export declare const COMPOSABLE_REVEAL = "reveal-composable";
|
|
12
13
|
export declare const ELEMENT_TYPES: {
|
|
13
14
|
COLLECT: string;
|
|
14
15
|
REVEAL: string;
|
|
15
16
|
COMPOSE: string;
|
|
17
|
+
REVEAL_COMPOSE: string;
|
|
16
18
|
};
|
|
17
19
|
export declare const EVENT_TYPES: {
|
|
18
20
|
MOUNTED: string;
|
|
@@ -30,6 +32,7 @@ export declare const METRIC_TYPES: {
|
|
|
30
32
|
COLLECT: string;
|
|
31
33
|
REVEAL: string;
|
|
32
34
|
COMPOSE: string;
|
|
35
|
+
REVEAL_COMPOSE: string;
|
|
33
36
|
};
|
|
34
37
|
ELEMENT_TYPE_KEY: string;
|
|
35
38
|
DIV_ID: string;
|
|
@@ -87,8 +90,19 @@ export declare const ELEMENT_EVENTS_TO_CLIENT: {
|
|
|
87
90
|
HEIGHT: string;
|
|
88
91
|
};
|
|
89
92
|
export declare const ELEMENT_EVENTS_TO_IFRAME: {
|
|
93
|
+
MULTIPLE_UPLOAD_FILES_RESPONSE: string;
|
|
94
|
+
RENDER_MOUNTED: string;
|
|
95
|
+
HEIGHT_CALLBACK: string;
|
|
96
|
+
HEIGHT_CALLBACK_COMPOSABLE: string;
|
|
97
|
+
COMPOSABLE_REVEAL: string;
|
|
98
|
+
MULTIPLE_UPLOAD_FILES: string;
|
|
90
99
|
COLLECT_CALL_REQUESTS: string;
|
|
100
|
+
COMPOSABLE_CALL_REQUESTS: string;
|
|
101
|
+
COMPOSABLE_CALL_RESPONSE: string;
|
|
102
|
+
COMPOSABLE_FILE_CALL_RESPONSE: string;
|
|
103
|
+
COMPOSABLE_CONTAINER: string;
|
|
91
104
|
REVEAL_CALL_REQUESTS: string;
|
|
105
|
+
REVEAL_CALL_RESPONSE: string;
|
|
92
106
|
FRAME_READY: string;
|
|
93
107
|
READY_FOR_CLIENT: string;
|
|
94
108
|
TOKENIZATION_REQUEST: string;
|
|
@@ -141,7 +155,8 @@ export declare enum ElementType {
|
|
|
141
155
|
PIN = "PIN",
|
|
142
156
|
EXPIRATION_MONTH = "EXPIRATION_MONTH",
|
|
143
157
|
EXPIRATION_YEAR = "EXPIRATION_YEAR",
|
|
144
|
-
FILE_INPUT = "FILE_INPUT"
|
|
158
|
+
FILE_INPUT = "FILE_INPUT",
|
|
159
|
+
MULTI_FILE_INPUT = "MULTI_FILE_INPUT"
|
|
145
160
|
}
|
|
146
161
|
export declare enum CardType {
|
|
147
162
|
VISA = "VISA",
|
|
@@ -323,6 +338,14 @@ export declare const ELEMENTS: {
|
|
|
323
338
|
type: string;
|
|
324
339
|
};
|
|
325
340
|
};
|
|
341
|
+
MULTI_FILE_INPUT: {
|
|
342
|
+
name: string;
|
|
343
|
+
sensitive: boolean;
|
|
344
|
+
attributes: {
|
|
345
|
+
type: string;
|
|
346
|
+
multiple: string;
|
|
347
|
+
};
|
|
348
|
+
};
|
|
326
349
|
};
|
|
327
350
|
export declare const CARDNUMBER_INPUT_FORMAT: {
|
|
328
351
|
SPACE_FORMAT: string;
|
|
@@ -551,6 +574,7 @@ export declare const DEFAULT_ERROR_TEXT_ELEMENT_TYPES: {
|
|
|
551
574
|
EXPIRATION_MONTH: string;
|
|
552
575
|
EXPIRATION_YEAR: string;
|
|
553
576
|
FILE_INPUT: string;
|
|
577
|
+
MULTI_FILE_INPUT: string;
|
|
554
578
|
};
|
|
555
579
|
export declare const DEFAULT_REQUIRED_TEXT_ELEMENT_TYPES: {
|
|
556
580
|
CVV: string;
|
|
@@ -562,6 +586,7 @@ export declare const DEFAULT_REQUIRED_TEXT_ELEMENT_TYPES: {
|
|
|
562
586
|
EXPIRATION_MONTH: string;
|
|
563
587
|
EXPIRATION_YEAR: string;
|
|
564
588
|
FILE_INPUT: string;
|
|
589
|
+
MULTI_FILE_INPUT: string;
|
|
565
590
|
};
|
|
566
591
|
export declare const INPUT_KEYBOARD_EVENTS: {
|
|
567
592
|
ENTER: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Context, CollectElementInput, CollectElementOptions, ICollectOptions, CollectResponse, InputStyles, ErrorTextStyles, ContainerOptions } from '../../../utils/common';
|
|
1
|
+
import { Context, CollectElementInput, CollectElementOptions, ICollectOptions, CollectResponse, InputStyles, ErrorTextStyles, ContainerOptions, UploadFilesResponse } from '../../../utils/common';
|
|
2
2
|
import Container from '../common/container';
|
|
3
3
|
import ComposableElement from './compose-collect-element';
|
|
4
4
|
import { ElementGroup } from './collect-container';
|
|
@@ -16,5 +16,6 @@ declare class ComposableContainer extends Container {
|
|
|
16
16
|
mount: (domElement: HTMLElement | string) => void;
|
|
17
17
|
unmount: () => void;
|
|
18
18
|
collect: (options?: ICollectOptions) => Promise<CollectResponse>;
|
|
19
|
+
uploadFiles: (options: ICollectOptions) => Promise<UploadFilesResponse>;
|
|
19
20
|
}
|
|
20
21
|
export default ComposableContainer;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { CollectElementUpdateOptions } from '../../../utils/common';
|
|
1
|
+
import { CollectElementUpdateOptions, MetaData } from '../../../utils/common';
|
|
3
2
|
declare class ComposableElement {
|
|
4
3
|
#private;
|
|
5
4
|
type: string;
|
|
6
|
-
constructor(name:
|
|
5
|
+
constructor(name: any, eventEmitter: any, iframeName: any, metaData: any);
|
|
7
6
|
on(eventName: string, handler: Function): void;
|
|
8
7
|
iframeName(): string;
|
|
9
8
|
getID(): string;
|
|
10
9
|
update: (options: CollectElementUpdateOptions) => void;
|
|
10
|
+
uploadMultipleFiles: (metaData?: MetaData) => Promise<unknown>;
|
|
11
11
|
}
|
|
12
12
|
export default ComposableElement;
|
|
@@ -6,7 +6,7 @@ export default class IFrame {
|
|
|
6
6
|
iframe: HTMLIFrameElement;
|
|
7
7
|
container?: Element;
|
|
8
8
|
constructor(name: string, metadata: Metadata, containerId: string, logLevel: LogLevel);
|
|
9
|
-
mount: (domElement:
|
|
9
|
+
mount: (domElement: any, elementId?: string, data?: any) => void;
|
|
10
10
|
setIframeHeight: (height: any) => void;
|
|
11
11
|
unmount: () => void;
|
|
12
12
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Context } from '../../../utils/common';
|
|
2
|
+
import Container from '../common/container';
|
|
3
|
+
import ComposableRevealElement from './composable-reveal-element';
|
|
4
|
+
import { ContainerOptions, RevealElementInput, RevealResponse } from '../../../index-node';
|
|
5
|
+
import { IRevealElementOptions } from './reveal-container';
|
|
6
|
+
import { Metadata, SkyflowElementProps } from '../../internal/internal-types';
|
|
7
|
+
declare class ComposableRevealContainer extends Container {
|
|
8
|
+
#private;
|
|
9
|
+
type: string;
|
|
10
|
+
constructor(metaData: Metadata, skyflowElements: Array<SkyflowElementProps>, context: Context, options?: ContainerOptions);
|
|
11
|
+
create: (input: RevealElementInput, options?: IRevealElementOptions) => ComposableRevealElement;
|
|
12
|
+
mount: (domElement: HTMLElement | string) => void;
|
|
13
|
+
unmount: () => void;
|
|
14
|
+
reveal(): Promise<RevealResponse>;
|
|
15
|
+
}
|
|
16
|
+
export default ComposableRevealContainer;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import EventEmitter from '../../../event-emitter';
|
|
2
|
+
import { RenderFileResponse } from '../../../utils/common';
|
|
3
|
+
import { IRevealElementInput, IRevealElementOptions } from './reveal-container';
|
|
4
|
+
declare class ComposableRevealElement {
|
|
5
|
+
#private;
|
|
6
|
+
type: string;
|
|
7
|
+
constructor(name: string, eventEmitter: EventEmitter, iframeName: string);
|
|
8
|
+
iframeName(): string;
|
|
9
|
+
getID(): string;
|
|
10
|
+
renderFile(): Promise<RenderFileResponse>;
|
|
11
|
+
update: (options: IRevealElementInput | IRevealElementOptions) => void;
|
|
12
|
+
}
|
|
13
|
+
export default ComposableRevealElement;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Context, RenderFileResponse } from '../../../utils/common';
|
|
2
|
+
import SkyflowElement from '../common/skyflow-element';
|
|
3
|
+
import { IRevealElementInput, IRevealElementOptions } from './reveal-container';
|
|
4
|
+
import { Metadata, RevealContainerProps } from '../../internal/internal-types';
|
|
5
|
+
export interface RevealComposableGroup {
|
|
6
|
+
record: IRevealElementInput;
|
|
7
|
+
options: IRevealElementOptions;
|
|
8
|
+
}
|
|
9
|
+
declare class ComposableRevealInternalElement extends SkyflowElement {
|
|
10
|
+
#private;
|
|
11
|
+
resizeObserver: ResizeObserver | null;
|
|
12
|
+
constructor(elementId: string, recordGroup: any, metaData: Metadata, container: RevealContainerProps, context: Context);
|
|
13
|
+
private setupRenderFileEventListener;
|
|
14
|
+
getID(): string;
|
|
15
|
+
mount(domElementSelector: HTMLElement | string): void;
|
|
16
|
+
renderFile(recordData: any): Promise<RenderFileResponse>;
|
|
17
|
+
iframeName(): string;
|
|
18
|
+
isMounted(): boolean;
|
|
19
|
+
isClientSetError(): boolean;
|
|
20
|
+
getRecordData(): any;
|
|
21
|
+
setErrorOverride(clientErrorText: string): void;
|
|
22
|
+
setError(clientErrorText: string): void;
|
|
23
|
+
resetError(): void;
|
|
24
|
+
setAltText(altText: string, record: any): void;
|
|
25
|
+
clearAltText(): void;
|
|
26
|
+
unmount(): void;
|
|
27
|
+
update(options: IRevealElementInput | IRevealElementOptions, record: any): void;
|
|
28
|
+
}
|
|
29
|
+
export default ComposableRevealInternalElement;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IRevealRecordComposable } from '../../utils/common';
|
|
2
|
+
import IFrameFormElement from './iframe-form';
|
|
3
|
+
import FrameElement from '.';
|
|
4
|
+
export default class RevealComposableFrameElementInit {
|
|
5
|
+
#private;
|
|
6
|
+
iframeFormElement: IFrameFormElement | undefined;
|
|
7
|
+
clientMetaData: any;
|
|
8
|
+
frameElement: FrameElement;
|
|
9
|
+
private static frameEle?;
|
|
10
|
+
containerId: string;
|
|
11
|
+
group: any;
|
|
12
|
+
frameList: FrameElement[];
|
|
13
|
+
iframeFormList: IFrameFormElement[];
|
|
14
|
+
revealFrameList: any[];
|
|
15
|
+
rootDiv: HTMLDivElement;
|
|
16
|
+
constructor();
|
|
17
|
+
updateGroupData: () => void;
|
|
18
|
+
static startFrameElement: () => void;
|
|
19
|
+
revealData(revealRecords: IRevealRecordComposable[], containerId: string, authToken: string): Promise<unknown>;
|
|
20
|
+
createContainerDiv: (newGroup: any) => void;
|
|
21
|
+
}
|
|
@@ -10,7 +10,18 @@ export default class FrameElementInit {
|
|
|
10
10
|
private static frameEle?;
|
|
11
11
|
containerId: string;
|
|
12
12
|
group: any;
|
|
13
|
+
frameList: FrameElement[];
|
|
14
|
+
iframeFormList: IFrameFormElement[];
|
|
13
15
|
constructor();
|
|
16
|
+
private handleCollectCall;
|
|
17
|
+
private parallelUploadFiles;
|
|
18
|
+
uploadFiles: (fileElement: any, clientConfig: any) => Promise<unknown>;
|
|
19
|
+
private tokenize;
|
|
20
|
+
private multipleUploadFiles;
|
|
21
|
+
private validateFiles;
|
|
22
|
+
private createInsertRequest;
|
|
23
|
+
private extractSkyflowIDs;
|
|
24
|
+
private insertDataCallInMultiFiles;
|
|
14
25
|
updateGroupData: () => void;
|
|
15
26
|
createIframeElement: (frameName: any, label: any, skyflowID: any, isRequired: any) => IFrameFormElement;
|
|
16
27
|
static startFrameElement: () => void;
|
|
@@ -44,6 +44,11 @@ export default class IFrameFormElement extends EventEmitter {
|
|
|
44
44
|
changeFocus: (focus: boolean) => void;
|
|
45
45
|
setReplacePattern(pattern: string[]): void;
|
|
46
46
|
setMask(mask: string[]): void;
|
|
47
|
+
getFileDetails: (value: FileList | File | null) => Array<{
|
|
48
|
+
fileName: string;
|
|
49
|
+
fileSizeKB: number;
|
|
50
|
+
fileType: string;
|
|
51
|
+
}>;
|
|
47
52
|
setValidation(validations: IValidationRule[] | undefined): void;
|
|
48
53
|
setFormat(format: string): void;
|
|
49
54
|
setSensitive(sensitive?: boolean): void;
|
|
@@ -20,7 +20,8 @@ export default class FrameElement {
|
|
|
20
20
|
private selectionStart?;
|
|
21
21
|
private selectionEnd?;
|
|
22
22
|
private selectedData?;
|
|
23
|
-
|
|
23
|
+
private clientDomain;
|
|
24
|
+
constructor(iFrameFormElement: IFrameFormElement, options: any, htmlDivElement: HTMLDivElement, clientDomain?: string);
|
|
24
25
|
mount: () => void;
|
|
25
26
|
setupInputField(newValue?: boolean): void;
|
|
26
27
|
updateParentDiv: (newDiv: HTMLDivElement) => void;
|
|
@@ -51,4 +52,5 @@ export default class FrameElement {
|
|
|
51
52
|
updateOptions(options: any): void;
|
|
52
53
|
private applyMask;
|
|
53
54
|
private appendDropdown;
|
|
55
|
+
private setDropdownIconStyle;
|
|
54
56
|
}
|
|
@@ -38,8 +38,10 @@ export interface RevealContainerProps {
|
|
|
38
38
|
containerId: string;
|
|
39
39
|
isMounted: boolean;
|
|
40
40
|
eventEmitter: EventEmitter;
|
|
41
|
+
type: string;
|
|
41
42
|
}
|
|
42
43
|
export interface InternalState {
|
|
44
|
+
metaData: any;
|
|
43
45
|
isEmpty: boolean;
|
|
44
46
|
isValid: boolean;
|
|
45
47
|
isFocused: boolean;
|
|
@@ -69,4 +71,5 @@ export interface Metadata extends ClientMetadata {
|
|
|
69
71
|
clientJSON: ClientToJSON;
|
|
70
72
|
containerType: ContainerType;
|
|
71
73
|
skyflowContainer: SkyflowContainer;
|
|
74
|
+
getSkyflowBearerToken: () => Promise<string>;
|
|
72
75
|
}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
import { Context } from '../../../utils/common';
|
|
1
2
|
declare class RevealFrame {
|
|
2
3
|
#private;
|
|
3
4
|
static revealFrame: RevealFrame;
|
|
4
5
|
private domCopy?;
|
|
5
6
|
private isRevealCalled?;
|
|
6
7
|
static init(): void;
|
|
7
|
-
constructor(record: any, context:
|
|
8
|
+
constructor(record: any, context: Context, id: string, rootDiv?: HTMLDivElement);
|
|
9
|
+
responseUpdate: (data: any) => void;
|
|
10
|
+
getConfig: () => void;
|
|
11
|
+
getData: () => any;
|
|
12
|
+
private sub2;
|
|
13
|
+
private renderFile;
|
|
8
14
|
private getExtension;
|
|
9
15
|
private addFileRender;
|
|
10
16
|
private setRevealError;
|
|
@@ -34,5 +34,8 @@ export declare const constructElementsInsertReq: (req: any, update: any, options
|
|
|
34
34
|
records?: undefined;
|
|
35
35
|
})[];
|
|
36
36
|
export declare const updateRecordsBySkyflowID: (skyflowIdRecords: any, client: Client, options: any) => Promise<unknown>;
|
|
37
|
+
export declare const updateRecordsBySkyflowIDComposable: (skyflowIdRecords: any, client: Client, options: any, authToken: string) => Promise<unknown>;
|
|
38
|
+
export declare const insertDataInCollect: (records: any, client: Client, options: any, finalInsertRecords: any, authToken: string) => Promise<unknown>;
|
|
39
|
+
export declare const insertDataInMultipleFiles: (records: any, client: Client, options: any, finalInsertRecords: any, authToken: string) => Promise<unknown>;
|
|
37
40
|
export declare const checkForElementMatchRule: (validations: IValidationRule[]) => boolean;
|
|
38
41
|
export declare const checkForValueMatch: (validations: IValidationRule[], element: IFrameFormElement) => boolean;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import Client from '../client';
|
|
2
|
-
import { IRevealRecord, IRevealResponseType, IGetRecord, ISkyflowIdRecord, IRenderResponseType, IGetOptions, RenderFileResponse, RevealResponse, GetResponse, GetByIdResponse } from '../utils/common';
|
|
2
|
+
import { IRevealRecord, IRevealResponseType, IGetRecord, ISkyflowIdRecord, IRenderResponseType, IGetOptions, RenderFileResponse, RevealResponse, GetResponse, GetByIdResponse, IRevealRecordComposable } 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 getFileURLFromVaultBySkyflowIDComposable: (skyflowIdRecord: IRevealRecord, client: Client, authToken: string) => Promise<IRenderResponseType>;
|
|
5
6
|
export declare const fetchRecordsByTokenId: (tokenIdRecords: IRevealRecord[], client: Client) => Promise<IRevealResponseType>;
|
|
7
|
+
export declare const fetchRecordsByTokenIdComposable: (tokenIdRecords: IRevealRecordComposable[], client: Client, authToken: string) => Promise<IRevealResponseType>;
|
|
6
8
|
export declare const formatRecordsForIframe: (response: IRevealResponseType) => Record<string, string>;
|
|
7
9
|
export declare const formatRecordsForRender: (response: IRenderResponseType, column: any, skyflowID: any) => {
|
|
8
10
|
column: any;
|
|
@@ -11,5 +13,15 @@ export declare const formatRecordsForRender: (response: IRenderResponseType, col
|
|
|
11
13
|
};
|
|
12
14
|
export declare const formatForRenderClient: (response: IRenderResponseType, column: string) => RenderFileResponse;
|
|
13
15
|
export declare const formatRecordsForClient: (response: IRevealResponseType) => RevealResponse;
|
|
16
|
+
export declare const formatRecordsForClientComposable: (response: any) => {
|
|
17
|
+
success: never[];
|
|
18
|
+
errors: never[];
|
|
19
|
+
} | {
|
|
20
|
+
success: never[];
|
|
21
|
+
errors?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
errors: never[];
|
|
24
|
+
success?: undefined;
|
|
25
|
+
};
|
|
14
26
|
export declare const fetchRecordsGET: (skyflowIdRecords: IGetRecord[], client: Client, options?: IGetOptions) => Promise<GetResponse>;
|
|
15
27
|
export declare const fetchRecordsBySkyflowID: (skyflowIdRecords: ISkyflowIdRecord[], client: Client) => Promise<GetByIdResponse>;
|
package/types/index-node.d.ts
CHANGED
|
@@ -11,4 +11,6 @@ export { default as ComposableElement } from './core/external/collect/compose-co
|
|
|
11
11
|
export { default as RevealContainer } from './core/external/reveal/reveal-container';
|
|
12
12
|
export { default as RevealElement } from './core/external/reveal/reveal-element';
|
|
13
13
|
export { default as ThreeDS } from './core/external/threeds/threeds';
|
|
14
|
+
export { default as ComposableRevealContainer } from './core/external/reveal/composable-reveal-container';
|
|
15
|
+
export { default as ComposableRevealElement } from './core/external/reveal/composable-reveal-element';
|
|
14
16
|
export default Skyflow;
|
package/types/skyflow.d.ts
CHANGED
|
@@ -5,10 +5,12 @@ import SkyflowError from './libs/skyflow-error';
|
|
|
5
5
|
import { RequestMethod, IInsertRecordInput, IDetokenizeInput, IGetInput, RedactionType, EventName, Env, LogLevel, ValidationRuleType, IGetByIdInput, IInsertOptions, IDeleteRecordInput, IDeleteOptions, IGetOptions, InsertResponse, GetResponse, GetByIdResponse, DeleteResponse, ContainerOptions, DetokenizeResponse, IUpdateRequest, UpdateResponse, IUpdateOptions } from './utils/common';
|
|
6
6
|
import ComposableContainer from './core/external/collect/compose-collect-container';
|
|
7
7
|
import ThreeDS from './core/external/threeds/threeds';
|
|
8
|
+
import ComposableRevealContainer from './core/external/reveal/composable-reveal-container';
|
|
8
9
|
export declare enum ContainerType {
|
|
9
10
|
COLLECT = "COLLECT",
|
|
10
11
|
REVEAL = "REVEAL",
|
|
11
|
-
COMPOSABLE = "COMPOSABLE"
|
|
12
|
+
COMPOSABLE = "COMPOSABLE",
|
|
13
|
+
COMPOSE_REVEAL = "COMPOSABLE_REVEAL"
|
|
12
14
|
}
|
|
13
15
|
export interface SkyflowConfigOptions {
|
|
14
16
|
logLevel?: LogLevel;
|
|
@@ -30,6 +32,7 @@ declare class Skyflow {
|
|
|
30
32
|
container(type: ContainerType.COLLECT, options?: ContainerOptions): CollectContainer;
|
|
31
33
|
container(type: ContainerType.COMPOSABLE, options?: ContainerOptions): ComposableContainer;
|
|
32
34
|
container(type: ContainerType.REVEAL, options?: ContainerOptions): RevealContainer;
|
|
35
|
+
container(type: ContainerType.COMPOSE_REVEAL, options?: ContainerOptions): ComposableRevealContainer;
|
|
33
36
|
insert(records: IInsertRecordInput, options?: IInsertOptions): Promise<InsertResponse>;
|
|
34
37
|
detokenize(detokenizeInput: IDetokenizeInput): Promise<DetokenizeResponse>;
|
|
35
38
|
getById(getByIdInput: IGetByIdInput): Promise<GetByIdResponse>;
|
|
@@ -68,6 +68,14 @@ export interface IRevealRecord {
|
|
|
68
68
|
skyflowID?: string;
|
|
69
69
|
table?: string;
|
|
70
70
|
}
|
|
71
|
+
export interface IRevealRecordComposable {
|
|
72
|
+
token?: string;
|
|
73
|
+
redaction?: RedactionType;
|
|
74
|
+
column?: string;
|
|
75
|
+
skyflowID?: string;
|
|
76
|
+
table?: string;
|
|
77
|
+
iframeName?: string;
|
|
78
|
+
}
|
|
71
79
|
export interface IInsertResponse {
|
|
72
80
|
records: IInsertResponseReocrds[];
|
|
73
81
|
}
|
|
@@ -83,6 +91,7 @@ export interface IRevealResponseType {
|
|
|
83
91
|
export interface IRenderResponseType {
|
|
84
92
|
fields?: Record<string, any>;
|
|
85
93
|
errors?: Record<string, any>;
|
|
94
|
+
fileMetadata?: Record<string, any>;
|
|
86
95
|
}
|
|
87
96
|
export interface IDetokenizeInput {
|
|
88
97
|
records: IRevealRecord[];
|
|
@@ -276,6 +285,14 @@ export interface ICollectOptions {
|
|
|
276
285
|
additionalFields?: IInsertRecordInput;
|
|
277
286
|
upsert?: Array<IUpsertOptions>;
|
|
278
287
|
}
|
|
288
|
+
export interface MetaData {
|
|
289
|
+
[key: string]: any;
|
|
290
|
+
}
|
|
291
|
+
export interface EventConfig {
|
|
292
|
+
authToken: string;
|
|
293
|
+
vaultURL: string;
|
|
294
|
+
vaultID: string;
|
|
295
|
+
}
|
|
279
296
|
export interface UploadFilesResponse {
|
|
280
297
|
fileUploadResponse?: Record<string, any>;
|
|
281
298
|
errorResponse?: Record<string, any>;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
declare const SKYFLOW_ERROR_CODE: {
|
|
2
|
+
MULTI_FILE_NOT_SUPPORTED: {
|
|
3
|
+
code: number;
|
|
4
|
+
description: string;
|
|
5
|
+
};
|
|
6
|
+
INVALID_REVEAL_COMPOSABLE_INPUT: {
|
|
7
|
+
code: number;
|
|
8
|
+
description: string;
|
|
9
|
+
};
|
|
2
10
|
INVALID_FILE_NAME: {
|
|
3
11
|
code: number;
|
|
4
12
|
description: string;
|
|
@@ -487,6 +495,22 @@ declare const SKYFLOW_ERROR_CODE: {
|
|
|
487
495
|
code: number;
|
|
488
496
|
description: string;
|
|
489
497
|
};
|
|
498
|
+
OFFLINE_ERROR: {
|
|
499
|
+
code: number;
|
|
500
|
+
description: string;
|
|
501
|
+
};
|
|
502
|
+
TIMEOUT_ERROR: {
|
|
503
|
+
code: number;
|
|
504
|
+
description: string;
|
|
505
|
+
};
|
|
506
|
+
ABORT_ERROR: {
|
|
507
|
+
code: number;
|
|
508
|
+
description: string;
|
|
509
|
+
};
|
|
510
|
+
GENERIC_ERROR: {
|
|
511
|
+
code: number;
|
|
512
|
+
description: string;
|
|
513
|
+
};
|
|
490
514
|
COMPLETE_AND_VALID_INPUTS: {
|
|
491
515
|
code: number;
|
|
492
516
|
description: string;
|
|
@@ -775,5 +799,9 @@ declare const SKYFLOW_ERROR_CODE: {
|
|
|
775
799
|
code: number;
|
|
776
800
|
description: string;
|
|
777
801
|
};
|
|
802
|
+
NO_FILE_ELEMENT_FOUND: {
|
|
803
|
+
code: number;
|
|
804
|
+
description: string;
|
|
805
|
+
};
|
|
778
806
|
};
|
|
779
807
|
export default SKYFLOW_ERROR_CODE;
|
package/types/utils/logs.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ declare const logs: {
|
|
|
4
4
|
CLIENT_INITIALIZED: string;
|
|
5
5
|
CREATE_COLLECT_CONTAINER: string;
|
|
6
6
|
COLLECT_CONTAINER_CREATED: string;
|
|
7
|
+
INITIALIZE_COMPOSABLE_CLIENT: string;
|
|
7
8
|
CREATE_REVEAL_CONTAINER: string;
|
|
8
9
|
REVEAL_CONTAINER_CREATED: string;
|
|
9
10
|
VALIDATE_RECORDS: string;
|
|
@@ -18,6 +19,8 @@ declare const logs: {
|
|
|
18
19
|
ELEMENT_REVEALED: string;
|
|
19
20
|
FILE_RENDERED: string;
|
|
20
21
|
COLLECT_SUBMIT_SUCCESS: string;
|
|
22
|
+
UPLOAD_FILES_SUCCESS: string;
|
|
23
|
+
MULTI_UPLOAD_FILES_SUCCESS: string;
|
|
21
24
|
REVEAL_SUBMIT_SUCCESS: string;
|
|
22
25
|
RENDER_SUBMIT_SUCCESS: string;
|
|
23
26
|
INSERT_DATA_SUCCESS: string;
|
|
@@ -76,6 +79,8 @@ declare const logs: {
|
|
|
76
79
|
VALIDATE_GET_BY_ID_INPUT: string;
|
|
77
80
|
};
|
|
78
81
|
errorLogs: {
|
|
82
|
+
MULTI_FILE_NOT_SUPPORTED: string;
|
|
83
|
+
INVALID_REVEAL_COMPOSABLE_INPUT: string;
|
|
79
84
|
NO_ELEMENTS_IN_COLLECT: string;
|
|
80
85
|
NO_ELEMENTS_IN_COMPOSABLE: string;
|
|
81
86
|
NO_ELEMENTS_IN_REVEAL: string;
|
|
@@ -221,6 +226,10 @@ declare const logs: {
|
|
|
221
226
|
INVALID_HANDLER_IN_EVENT_LISTENER: string;
|
|
222
227
|
UNKNOWN_ERROR: string;
|
|
223
228
|
NETWORK_ERROR: string;
|
|
229
|
+
TIMEOUT_ERROR: string;
|
|
230
|
+
ABORT_ERROR: string;
|
|
231
|
+
GENERIC_ERROR: string;
|
|
232
|
+
OFFLINE_ERROR: string;
|
|
224
233
|
CONNECTION_ERROR: string;
|
|
225
234
|
ERROR_OCCURED: string;
|
|
226
235
|
INVALID_VALIDATIONS_TYPE: string;
|
|
@@ -291,6 +300,7 @@ declare const logs: {
|
|
|
291
300
|
INVALID_OPTION_CARD_METADATA: string;
|
|
292
301
|
INVALID_OPTION_CARD_SCHEME: string;
|
|
293
302
|
INVALID_FIELD_SHOW_3DS_CHALLEGNGE: string;
|
|
303
|
+
NO_FILE_ELEMENT_FOUND: string;
|
|
294
304
|
};
|
|
295
305
|
warnLogs: {
|
|
296
306
|
INVALID_EXPIRATION_DATE_FORMAT: string;
|