skyflow-js 1.33.0-beta.2 → 1.33.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.LICENSE.txt +2 -0
- package/dist/sdkNodeBuild/index.js.LICENSE.txt.gz +0 -0
- package/dist/sdkNodeBuild/index.js.gz +0 -0
- package/package.json +1 -1
- package/types/core/constants.d.ts +14 -0
- package/types/core/external/common/iframe.d.ts +1 -0
- package/types/core/external/reveal/reveal-container.d.ts +3 -0
- package/types/core/external/reveal/reveal-element.d.ts +1 -0
- package/types/core/external/skyflow-container.d.ts +2 -2
- package/types/core/internal/index.d.ts +5 -1
- package/types/core/internal/reveal/reveal-frame.d.ts +1 -0
- package/types/core/internal/skyflow-frame/skyflow-frame-controller.d.ts +2 -0
- package/types/core-utils/reveal.d.ts +14 -1
- package/types/skyflow.d.ts +2 -2
- package/types/utils/common/index.d.ts +8 -1
- package/types/utils/constants.d.ts +44 -0
- package/types/utils/helpers/index.d.ts +0 -2
- package/types/utils/logs.d.ts +16 -0
- package/types/utils/validators/index.d.ts +1 -0
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@ export declare const PUREJS_TYPES: {
|
|
|
11
11
|
GET_BY_SKYFLOWID: string;
|
|
12
12
|
GET: string;
|
|
13
13
|
DELETE: string;
|
|
14
|
+
FILE_RENDER: string;
|
|
14
15
|
};
|
|
15
16
|
export declare const ELEMENT_EVENTS_TO_CLIENT: {
|
|
16
17
|
CHANGE: string;
|
|
@@ -50,6 +51,8 @@ export declare const ELEMENT_EVENTS_TO_IFRAME: {
|
|
|
50
51
|
REVEAL_ELEMENT_UPDATE_OPTIONS: string;
|
|
51
52
|
FILE_UPLOAD: string;
|
|
52
53
|
COMPOSABLE_UPDATE_OPTIONS: string;
|
|
54
|
+
RENDER_FILE_RESPONSE_READY: string;
|
|
55
|
+
RENDER_FILE_REQUEST: string;
|
|
53
56
|
};
|
|
54
57
|
export declare const REVEAL_ELEMENT_OPTIONS_TYPES: {
|
|
55
58
|
TOKEN: string;
|
|
@@ -61,6 +64,7 @@ export declare const ELEMENT_EVENTS_TO_CONTAINER: {
|
|
|
61
64
|
COMPOSABLE_CONTAINER_MOUNTED: string;
|
|
62
65
|
COLLECT_CONTAINER_MOUNTED: string;
|
|
63
66
|
REVEAL_CONTAINER_MOUNTED: string;
|
|
67
|
+
RENDER_FILE_REQUEST: string;
|
|
64
68
|
};
|
|
65
69
|
export declare enum ElementType {
|
|
66
70
|
CVV = "CVV",
|
|
@@ -321,6 +325,14 @@ export declare const REVEAL_ELEMENT_LABEL_DEFAULT_STYLES: {
|
|
|
321
325
|
'margin-bottom': string;
|
|
322
326
|
};
|
|
323
327
|
};
|
|
328
|
+
export declare const RENDER_FILE_ELEMENT_ALT_TEXT_DEFAULT_STYLES: {
|
|
329
|
+
[x: string]: {
|
|
330
|
+
'margin-bottom': string;
|
|
331
|
+
display: string;
|
|
332
|
+
flexDirection: string;
|
|
333
|
+
justifyContent: string;
|
|
334
|
+
};
|
|
335
|
+
};
|
|
324
336
|
export declare const REVEAL_ELEMENT_ERROR_TEXT_DEFAULT_STYLES: {
|
|
325
337
|
[x: string]: {
|
|
326
338
|
marginTop: string;
|
|
@@ -473,3 +485,5 @@ export declare const CARD_NUMBER_HYPEN_SEPERATOR = "-";
|
|
|
473
485
|
export declare const DEFAULT_INPUT_FORMAT_TRANSLATION: {
|
|
474
486
|
X: string;
|
|
475
487
|
};
|
|
488
|
+
export declare const DEFAULT_FILE_RENDER_ERROR = "File rendering failed. Please try again later.";
|
|
489
|
+
export declare const FILE_DOWNLOAD_URL_PARAM = "downloadURL=true&contentDisposition=INLINE";
|
|
@@ -4,6 +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
|
+
setAttributess: (responseValue: any) => void;
|
|
7
8
|
mount: (domElement: any) => void;
|
|
8
9
|
setIframeHeight: (height: any) => void;
|
|
9
10
|
unmount: () => void;
|
|
@@ -3,6 +3,9 @@ import Container from '../common/container';
|
|
|
3
3
|
import RevealElement from './reveal-element';
|
|
4
4
|
export interface IRevealElementInput {
|
|
5
5
|
token?: string;
|
|
6
|
+
skyflowID?: string;
|
|
7
|
+
table?: string;
|
|
8
|
+
column?: string;
|
|
6
9
|
redaction?: RedactionType;
|
|
7
10
|
inputStyles?: object;
|
|
8
11
|
label?: string;
|
|
@@ -6,6 +6,7 @@ declare class RevealElement extends SkyflowElement {
|
|
|
6
6
|
constructor(record: IRevealElementInput, options: IRevealElementOptions | undefined, metaData: any, container: any, elementId: string, context: Context);
|
|
7
7
|
getID(): string;
|
|
8
8
|
mount(domElementSelector: any): void;
|
|
9
|
+
renderFile(): Promise<unknown>;
|
|
9
10
|
iframeName(): string;
|
|
10
11
|
isMounted(): boolean;
|
|
11
12
|
hasToken(): boolean;
|
|
@@ -3,9 +3,9 @@ declare class SkyflowContainer {
|
|
|
3
3
|
#private;
|
|
4
4
|
constructor(client: any, context: any);
|
|
5
5
|
detokenize(detokenizeInput: IDetokenizeInput): Promise<any>;
|
|
6
|
-
insert(records: any, options
|
|
6
|
+
insert(records: any, options?: IInsertOptions): Promise<any>;
|
|
7
7
|
getById(getByIdInput: IGetByIdInput): Promise<unknown>;
|
|
8
8
|
get(getInput: IGetInput, options?: IGetOptions): Promise<unknown>;
|
|
9
|
-
delete(records: IDeleteRecordInput, options
|
|
9
|
+
delete(records: IDeleteRecordInput, options?: IDeleteOptions): Promise<unknown>;
|
|
10
10
|
}
|
|
11
11
|
export default SkyflowContainer;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/// <reference types="jquery" />
|
|
2
|
+
/// <reference types="jquery" />
|
|
3
|
+
/// <reference types="jquery-mask-plugin" />
|
|
4
|
+
import 'jquery-mask-plugin/dist/jquery.mask.min';
|
|
1
5
|
import { IFrameFormElement } from './iframe-form';
|
|
2
6
|
import { LogLevel } from '../../utils/common';
|
|
3
7
|
export declare class FrameController {
|
|
@@ -33,7 +37,7 @@ export declare class FrameElement {
|
|
|
33
37
|
findPreviousElement: (currentInput: any) => HTMLInputElement;
|
|
34
38
|
findNextElement: (currentInput: any) => HTMLInputElement;
|
|
35
39
|
onSubmit: () => void;
|
|
36
|
-
onArrowKeys: (
|
|
40
|
+
onArrowKeys: (event: JQuery.TriggeredEvent) => void;
|
|
37
41
|
focusChange: (focus: boolean) => void;
|
|
38
42
|
destroy: () => void;
|
|
39
43
|
injectInputStyles(styles: any, preText?: string): void;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { IRevealRecord } from '../../../utils/common';
|
|
1
2
|
declare class SkyflowFrameController {
|
|
2
3
|
#private;
|
|
3
4
|
constructor(clientId: any);
|
|
4
5
|
static init(clientId: any): SkyflowFrameController;
|
|
5
6
|
insertData(records: any, options: any): Promise<unknown>;
|
|
7
|
+
renderFile(data: IRevealRecord): Promise<unknown>;
|
|
6
8
|
}
|
|
7
9
|
export default SkyflowFrameController;
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import Client from '../client';
|
|
2
|
-
import { IRevealRecord, IRevealResponseType, IGetRecord, ISkyflowIdRecord, IGetOptions } from '../utils/common';
|
|
2
|
+
import { IRevealRecord, IRevealResponseType, IGetRecord, ISkyflowIdRecord, IRenderResponseType, IGetOptions } from '../utils/common';
|
|
3
|
+
export declare const getFileURLForRender: (skyflowIdRecord: IRevealRecord, client: Client, authToken: string) => Promise<any>;
|
|
4
|
+
export declare const getFileURLFromVaultBySkyflowID: (skyflowIdRecord: IRevealRecord, client: Client) => Promise<IRenderResponseType>;
|
|
3
5
|
export declare const fetchRecordsByTokenId: (tokenIdRecords: IRevealRecord[], client: Client) => Promise<IRevealResponseType>;
|
|
4
6
|
export declare const formatRecordsForIframe: (response: IRevealResponseType) => Record<string, string>;
|
|
7
|
+
export declare const formatRecordsForRender: (response: IRenderResponseType, column: any, skyflowID: any) => {
|
|
8
|
+
column: any;
|
|
9
|
+
skyflowID: any;
|
|
10
|
+
url: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const formatForRenderClient: (response: IRenderResponseType, column: string) => IRenderResponseType | {
|
|
13
|
+
success: {
|
|
14
|
+
skyflow_id: any;
|
|
15
|
+
column: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
5
18
|
export declare const formatRecordsForClient: (response: IRevealResponseType) => {
|
|
6
19
|
success: {
|
|
7
20
|
token: string;
|
package/types/skyflow.d.ts
CHANGED
|
@@ -19,11 +19,11 @@ declare class Skyflow {
|
|
|
19
19
|
constructor(config: ISkyflow);
|
|
20
20
|
static init(config: ISkyflow): Skyflow;
|
|
21
21
|
container(type: ContainerType, options?: Record<string, any>): CollectContainer | RevealContainer | ComposableContainer;
|
|
22
|
-
insert(records: IInsertRecordInput, options
|
|
22
|
+
insert(records: IInsertRecordInput, options?: IInsertOptions): Promise<any>;
|
|
23
23
|
detokenize(detokenizeInput: IDetokenizeInput): Promise<IRevealResponseType>;
|
|
24
24
|
getById(getByIdInput: IGetByIdInput): Promise<unknown>;
|
|
25
25
|
get(getInput: IGetInput, options?: IGetOptions): Promise<unknown>;
|
|
26
|
-
delete(records: IDeleteRecordInput, options
|
|
26
|
+
delete(records: IDeleteRecordInput, options?: IDeleteOptions): Promise<unknown>;
|
|
27
27
|
static get ContainerType(): typeof ContainerType;
|
|
28
28
|
static get ElementType(): typeof ElementType;
|
|
29
29
|
static get RedactionType(): typeof RedactionType;
|
|
@@ -47,8 +47,11 @@ export interface IInsertRecord {
|
|
|
47
47
|
skyflowID?: string;
|
|
48
48
|
}
|
|
49
49
|
export interface IRevealRecord {
|
|
50
|
-
token
|
|
50
|
+
token?: string;
|
|
51
51
|
redaction?: RedactionType;
|
|
52
|
+
column?: string;
|
|
53
|
+
skyflowID?: string;
|
|
54
|
+
table?: string;
|
|
52
55
|
}
|
|
53
56
|
export interface IInsertResponse {
|
|
54
57
|
records: IInsertResponseReocrds[];
|
|
@@ -62,6 +65,10 @@ export interface IRevealResponseType {
|
|
|
62
65
|
records?: Record<string, string>[];
|
|
63
66
|
errors?: Record<string, any>[];
|
|
64
67
|
}
|
|
68
|
+
export interface IRenderResponseType {
|
|
69
|
+
fields?: Record<string, any>;
|
|
70
|
+
errors?: Record<string, any>;
|
|
71
|
+
}
|
|
65
72
|
export interface IDetokenizeInput {
|
|
66
73
|
records: IRevealRecord[];
|
|
67
74
|
}
|
|
@@ -47,6 +47,10 @@ declare const SKYFLOW_ERROR_CODE: {
|
|
|
47
47
|
code: number;
|
|
48
48
|
description: string;
|
|
49
49
|
};
|
|
50
|
+
MISSING_SKYFLOWID_KEY_REVEAL: {
|
|
51
|
+
code: number;
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
50
54
|
EMPTY_TABLE_IN_COLLECT: {
|
|
51
55
|
code: number;
|
|
52
56
|
description: string;
|
|
@@ -299,6 +303,10 @@ declare const SKYFLOW_ERROR_CODE: {
|
|
|
299
303
|
code: number;
|
|
300
304
|
description: string;
|
|
301
305
|
};
|
|
306
|
+
INVALID_ALT_TEXT_RENDER: {
|
|
307
|
+
code: number;
|
|
308
|
+
description: string;
|
|
309
|
+
};
|
|
302
310
|
INVALID_FORMAT_REVEAL: {
|
|
303
311
|
code: number;
|
|
304
312
|
description: string;
|
|
@@ -547,6 +555,42 @@ declare const SKYFLOW_ERROR_CODE: {
|
|
|
547
555
|
code: number;
|
|
548
556
|
description: string;
|
|
549
557
|
};
|
|
558
|
+
SKYFLOW_IDS_AND_TOKEN_BOTH_SPECIFIED: {
|
|
559
|
+
code: number;
|
|
560
|
+
description: string;
|
|
561
|
+
};
|
|
562
|
+
MISSING_TABLE_KEY_REVEAL: {
|
|
563
|
+
code: number;
|
|
564
|
+
description: string;
|
|
565
|
+
};
|
|
566
|
+
MISSING_COLUMN_KEY_REVEAL: {
|
|
567
|
+
code: number;
|
|
568
|
+
description: string;
|
|
569
|
+
};
|
|
570
|
+
INVALID_SKYFLOW_ID_REVEAL: {
|
|
571
|
+
code: number;
|
|
572
|
+
description: string;
|
|
573
|
+
};
|
|
574
|
+
INVALID_TABLE_REVEAL: {
|
|
575
|
+
code: number;
|
|
576
|
+
description: string;
|
|
577
|
+
};
|
|
578
|
+
INVALID_COLUMN_NAME_REVEAL: {
|
|
579
|
+
code: number;
|
|
580
|
+
description: string;
|
|
581
|
+
};
|
|
582
|
+
EMPTY_SKYFLOW_ID_REVEAL: {
|
|
583
|
+
code: number;
|
|
584
|
+
description: string;
|
|
585
|
+
};
|
|
586
|
+
EMPTY_TABLE_REVEAL: {
|
|
587
|
+
code: number;
|
|
588
|
+
description: string;
|
|
589
|
+
};
|
|
590
|
+
EMPTY_COLUMN_NAME_REVEAL: {
|
|
591
|
+
code: number;
|
|
592
|
+
description: string;
|
|
593
|
+
};
|
|
550
594
|
RECORDS_KEY_NOT_FOUND_GETBYID: {
|
|
551
595
|
code: number;
|
|
552
596
|
description: string;
|
|
@@ -19,8 +19,6 @@ export declare const appendMonthTwoDigitYears: (value: any) => {
|
|
|
19
19
|
value: any;
|
|
20
20
|
};
|
|
21
21
|
export declare const getReturnValue: (value: string | Blob, element: string, doesReturnValue: boolean) => string | Blob | undefined;
|
|
22
|
-
export declare function domReady(fn: any): void;
|
|
23
|
-
export declare const getMaskedOutput: (input: string, format: string, translation: any) => string;
|
|
24
22
|
export declare const copyToClipboard: (text: string) => void;
|
|
25
23
|
export declare const handleCopyIconClick: (textToCopy: string, domCopy: any) => void;
|
|
26
24
|
export declare const fileValidation: (value: any, required?: Boolean) => boolean;
|
package/types/utils/logs.d.ts
CHANGED
|
@@ -12,11 +12,14 @@ declare const logs: {
|
|
|
12
12
|
VALIDATE_DELETE_INPUT: string;
|
|
13
13
|
VALIDATE_COLLECT_RECORDS: string;
|
|
14
14
|
VALIDATE_REVEAL_RECORDS: string;
|
|
15
|
+
VALIDATE_RENDER_RECORDS: string;
|
|
15
16
|
CREATED_ELEMENT: string;
|
|
16
17
|
ELEMENT_MOUNTED: string;
|
|
17
18
|
ELEMENT_REVEALED: string;
|
|
19
|
+
FILE_RENDERED: string;
|
|
18
20
|
COLLECT_SUBMIT_SUCCESS: string;
|
|
19
21
|
REVEAL_SUBMIT_SUCCESS: string;
|
|
22
|
+
RENDER_SUBMIT_SUCCESS: string;
|
|
20
23
|
INSERT_DATA_SUCCESS: string;
|
|
21
24
|
DETOKENIZE_SUCCESS: string;
|
|
22
25
|
GET_SUCCESS: string;
|
|
@@ -135,14 +138,25 @@ declare const logs: {
|
|
|
135
138
|
INVALID_REDACTION_TYPE_IN_DETOKENIZE: string;
|
|
136
139
|
EMPTY_RECORDS_REVEAL: string;
|
|
137
140
|
MISSING_TOKEN_KEY_REVEAL: string;
|
|
141
|
+
MISSING_SKYFLOWID_KEY_REVEAL: string;
|
|
142
|
+
MISSING_TABLE_KEY_REVEAL: string;
|
|
143
|
+
MISSING_COLUMN_KEY_REVEAL: string;
|
|
144
|
+
INVALID_SKYFLOW_ID_REVEAL: string;
|
|
145
|
+
INVALID_TABLE_REVEAL: string;
|
|
146
|
+
INVALID_COLUMN_NAME_REVEAL: string;
|
|
147
|
+
EMPTY_SKYFLOW_ID_REVEAL: string;
|
|
148
|
+
EMPTY_TABLE_REVEAL: string;
|
|
149
|
+
EMPTY_COLUMN_NAME_REVEAL: string;
|
|
138
150
|
INVALID_TOKEN_ID_REVEAL: string;
|
|
139
151
|
INVALID_LABEL_REVEAL: string;
|
|
140
152
|
INVALID_ALT_TEXT_REVEAL: string;
|
|
153
|
+
INVALID_ALT_TEXT_RENDER: string;
|
|
141
154
|
INVALID_FORMAT_REVEAL: string;
|
|
142
155
|
EMPTY_FORMAT_REVEAL: string;
|
|
143
156
|
INVALID_FORMAT_VALUE_REVEAL: string;
|
|
144
157
|
INVALID_REDACTION_TYPE_REVEAL: string;
|
|
145
158
|
ELEMENTS_NOT_MOUNTED_REVEAL: string;
|
|
159
|
+
ELEMENT_NOT_MOUNTED_RENDER: string;
|
|
146
160
|
EMPTY_TABLE_IN_ADDITIONAL_FIELDS: string;
|
|
147
161
|
EMPTY_FIELDS_IN_ADDITIONAL_FIELDS: string;
|
|
148
162
|
EMPTY_TOKEN_IN_DETOKENIZE: string;
|
|
@@ -154,6 +168,8 @@ declare const logs: {
|
|
|
154
168
|
INSERT_RECORDS_REJECTED: string;
|
|
155
169
|
GET_REJECTED: string;
|
|
156
170
|
FAILED_REVEAL: string;
|
|
171
|
+
FAILED_RENDER: string;
|
|
172
|
+
SKYFLOW_IDS_AND_TOKEN_BOTH_SPECIFIED: string;
|
|
157
173
|
MISSING_TABLE_IN_COLLECT: string;
|
|
158
174
|
EMPTY_TABLE_IN_COLLECT: string;
|
|
159
175
|
EMPTY_SKYFLOW_ID_IN_ADDITIONAL_FIELDS: string;
|
|
@@ -17,6 +17,7 @@ export declare const validateGetInput: (getInput: IGetInput, options?: IGetOptio
|
|
|
17
17
|
export declare const validateGetByIdInput: (getByIdInput: IGetByIdInput) => void;
|
|
18
18
|
export declare const validateDeleteRecords: (recordObj: IDeleteRecordInput, options: any) => void;
|
|
19
19
|
export declare const validateRevealElementRecords: (records: IRevealElementInput[]) => void;
|
|
20
|
+
export declare const validateRenderElementRecord: (record: IRevealElementInput) => void;
|
|
20
21
|
export declare const isValidURL: (url: string) => boolean;
|
|
21
22
|
export declare const isValidRegExp: (input: any) => boolean;
|
|
22
23
|
export declare const validateCardNumberLengthCheck: (cardNumber?: string) => boolean;
|