skyflow-js 1.9.1 → 1.10.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/CHANGELOG.md +4 -0
- package/README.md +36 -13
- package/dist/sdkNodeBuild/index.js +1 -1
- package/dist/sdkNodeBuild/index.js.gz +0 -0
- package/package.json +4 -4
- package/types/core/constants.d.ts +2 -0
- package/types/core/external/reveal/RevealContainer.d.ts +4 -1
- package/types/core/external/reveal/RevealElement.d.ts +3 -2
- package/types/core-utils/reveal.d.ts +5 -8
- package/types/libs/objectParse.d.ts +3 -2
- package/types/utils/busEvents/index.d.ts +1 -1
- package/types/utils/constants.d.ts +8 -0
- package/types/utils/helpers/index.d.ts +1 -0
- package/types/utils/logs.d.ts +2 -0
- package/types/utils/validators/index.d.ts +5 -3
|
Binary file
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "skyflow-js",
|
|
3
3
|
"preferGlobal": true,
|
|
4
4
|
"analyze": false,
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.10.0",
|
|
6
6
|
"author": "Skyflow",
|
|
7
7
|
"description": "Skyflow JavaScript SDK",
|
|
8
8
|
"homepage": "https://github.com/skyflowapi/skyflow-js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"core-js": "^3.6.5",
|
|
36
|
-
"easy-soap-request": "^4.
|
|
36
|
+
"easy-soap-request": "^4.6.0",
|
|
37
37
|
"framebus": "^4.0.0",
|
|
38
38
|
"inject-stylesheet": "^2.0.0",
|
|
39
39
|
"jquery": "^3.5.1",
|
|
@@ -73,13 +73,13 @@
|
|
|
73
73
|
"eslint-config-airbnb-typescript": "^14.0.0",
|
|
74
74
|
"eslint-plugin-import": "^2.24.2",
|
|
75
75
|
"fork-ts-checker-webpack-plugin": "^6.3.2",
|
|
76
|
-
"html-webpack-plugin": "^5.
|
|
76
|
+
"html-webpack-plugin": "^5.5.0",
|
|
77
77
|
"jest": "^27.2.1",
|
|
78
78
|
"typescript": "^3.9.3",
|
|
79
79
|
"webpack": "^5.51.1",
|
|
80
80
|
"webpack-bundle-analyzer": "^4.4.2",
|
|
81
81
|
"webpack-cli": "^4.8.0",
|
|
82
|
-
"webpack-dev-server": "^4.
|
|
82
|
+
"webpack-dev-server": "^4.7.3",
|
|
83
83
|
"webpack-manifest-plugin": "^4.0.2",
|
|
84
84
|
"webpack-merge": "^5.8.0"
|
|
85
85
|
}
|
|
@@ -479,3 +479,5 @@ export declare const soapResXmlErrors: {
|
|
|
479
479
|
description: string;
|
|
480
480
|
}[];
|
|
481
481
|
export declare const PATH_NOT_FOUND_IN_RES_XML = "skyflow: Path not found";
|
|
482
|
+
export declare const FORMAT_REGEX = ":FORMAT_REGEX:";
|
|
483
|
+
export declare const INVALID_FORMAT_REGEX_OPTION = "Invalid formatRegex";
|
|
@@ -10,10 +10,13 @@ export interface IRevealElementInput {
|
|
|
10
10
|
altText?: string;
|
|
11
11
|
errorTextStyles?: object;
|
|
12
12
|
}
|
|
13
|
+
export interface IRevealElementOptions {
|
|
14
|
+
formatRegex?: string | object;
|
|
15
|
+
}
|
|
13
16
|
declare class RevealContainer extends Container {
|
|
14
17
|
#private;
|
|
15
18
|
constructor(metaData: any, skyflowElements: any, context: any);
|
|
16
|
-
create(record: IRevealElementInput): RevealElement;
|
|
19
|
+
create(record: IRevealElementInput, options?: IRevealElementOptions): RevealElement;
|
|
17
20
|
reveal(): Promise<unknown>;
|
|
18
21
|
}
|
|
19
22
|
export default RevealContainer;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Context } from '../../../utils/common';
|
|
2
2
|
import SkyflowElement from '../common/SkyflowElement';
|
|
3
|
-
import { IRevealElementInput } from './RevealContainer';
|
|
3
|
+
import { IRevealElementInput, IRevealElementOptions } from './RevealContainer';
|
|
4
4
|
declare class RevealElement extends SkyflowElement {
|
|
5
5
|
#private;
|
|
6
|
-
constructor(record: IRevealElementInput, metaData: any, containerId: string, elementId: string, context: Context);
|
|
6
|
+
constructor(record: IRevealElementInput, options: IRevealElementOptions | undefined, metaData: any, containerId: string, elementId: string, context: Context);
|
|
7
7
|
getID(): string;
|
|
8
8
|
mount(domElementSelector: any): void;
|
|
9
9
|
iframeName(): string;
|
|
@@ -11,6 +11,7 @@ declare class RevealElement extends SkyflowElement {
|
|
|
11
11
|
hasToken(): boolean;
|
|
12
12
|
isClientSetError(): boolean;
|
|
13
13
|
getRecordData(): any;
|
|
14
|
+
getFormatRegex(): any;
|
|
14
15
|
setError(clientErrorText: string): void;
|
|
15
16
|
resetError(): void;
|
|
16
17
|
setAltText(altText: string): void;
|
|
@@ -2,15 +2,12 @@ import Client from '../client';
|
|
|
2
2
|
import { ISkyflowIdRecord, IRevealRecord, IRevealResponseType } from '../utils/common';
|
|
3
3
|
export declare const fetchRecordsByTokenId: (tokenIdRecords: IRevealRecord[], client: Client) => Promise<IRevealResponseType>;
|
|
4
4
|
export declare const formatRecordsForIframe: (response: IRevealResponseType) => Record<string, string>;
|
|
5
|
-
export declare const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
errors: Record<string, any>[];
|
|
5
|
+
export declare const applyFormatRegex: (formattedResult: object, revealRecords: any) => {};
|
|
6
|
+
export declare const formatRecordsForClient: (response: IRevealResponseType, formattedResults: any) => {
|
|
7
|
+
success: any[];
|
|
8
|
+
errors: any;
|
|
10
9
|
} | {
|
|
11
|
-
success:
|
|
12
|
-
token: string;
|
|
13
|
-
}[];
|
|
10
|
+
success: any[];
|
|
14
11
|
errors?: undefined;
|
|
15
12
|
} | {
|
|
16
13
|
errors: Record<string, any>[] | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import Client from '../client';
|
|
1
2
|
export declare function connectionConfigParser(data: any, configKey: any): void;
|
|
2
|
-
export declare function constructInvokeConnectionRequest(data: any): Promise<any>;
|
|
3
|
-
export declare function constructSoapConnectionRequestXml(requestXml: string): Promise<string>;
|
|
3
|
+
export declare function constructInvokeConnectionRequest(data: any, client: Client): Promise<any>;
|
|
4
|
+
export declare function constructSoapConnectionRequestXml(requestXml: string, client: Client): Promise<string>;
|
|
4
5
|
export declare function extractSkyflowTagsFromResponseBody(responseBody: any, path: string, skyflowTags: any, connectionResponse: any): void;
|
|
5
6
|
export declare function soapResponseBodyParser(mainTags: any, connectionResponse: any): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare function getCollectElementValue(key: any, elementIframename: any): Promise<unknown>;
|
|
2
|
-
export declare function getRevealElementValue(key: any, revealFrameName: any): Promise<unknown>;
|
|
2
|
+
export declare function getRevealElementValue(key: any, revealFrameName: any, client: any): Promise<unknown>;
|
|
3
3
|
export declare function getAccessToken(): Promise<unknown>;
|
|
@@ -487,5 +487,13 @@ declare const SKYFLOW_ERROR_CODE: {
|
|
|
487
487
|
code: number;
|
|
488
488
|
description: string;
|
|
489
489
|
};
|
|
490
|
+
NO_MATCH_FOUND_FOR_FORMAT_REGEX: {
|
|
491
|
+
code: number;
|
|
492
|
+
description: string;
|
|
493
|
+
};
|
|
494
|
+
INVALID_FORMAT_REGEX: {
|
|
495
|
+
code: number;
|
|
496
|
+
description: string;
|
|
497
|
+
};
|
|
490
498
|
};
|
|
491
499
|
export default SKYFLOW_ERROR_CODE;
|
|
@@ -7,5 +7,6 @@ export declare function removeSpaces(inputString: string): string;
|
|
|
7
7
|
export declare function formatVaultURL(vaultURL: any): any;
|
|
8
8
|
export declare function checkIfDuplicateExists(arr: any): boolean;
|
|
9
9
|
export declare function replaceIdInXml(xml: string, elementLookup: any, errors: any): string;
|
|
10
|
+
export declare function replaceIdInResponseXml(xml: string, elementLookup: any, errors: any): string;
|
|
10
11
|
export declare function getIframeNamesInSoapRequest(requestXml: string): string[] | undefined;
|
|
11
12
|
export declare function replaceIframeNameWithValues(requestXml: string, elementValuesLookup: any): string;
|
package/types/utils/logs.d.ts
CHANGED
|
@@ -202,6 +202,8 @@ declare const logs: {
|
|
|
202
202
|
INVALID_SOAP_RESPONSE_XML: string;
|
|
203
203
|
INVALID_PATH_IN_RES_XML: string;
|
|
204
204
|
INVALID_PATH_IN_ARRAY_RES_XML: string;
|
|
205
|
+
NO_MATCH_FOUND_FOR_FORMAT_REGEX: string;
|
|
206
|
+
INVALID_FORMAT_REGEX: string;
|
|
205
207
|
};
|
|
206
208
|
warnLogs: {
|
|
207
209
|
INVALID_EXPIRATION_DATE_FORMAT: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CardType } from '../../core/constants';
|
|
2
2
|
import { CollectElementInput } from '../../core/external/collect/CollectContainer';
|
|
3
|
-
import { IRevealElementInput } from '../../core/external/reveal/RevealContainer';
|
|
3
|
+
import { IRevealElementInput, IRevealElementOptions } from '../../core/external/reveal/RevealContainer';
|
|
4
4
|
import { ISkyflow } from '../../Skyflow';
|
|
5
5
|
import { IInsertRecordInput, IDetokenizeInput, IGetByIdInput, IConnectionConfig, ISoapConnectionConfig } from '../common';
|
|
6
6
|
export declare const validateCreditCardNumber: (cardNumber: string) => boolean;
|
|
@@ -14,9 +14,11 @@ export declare const validateGetByIdInput: (getByIdInput: IGetByIdInput) => void
|
|
|
14
14
|
export declare const validateRevealElementRecords: (records: IRevealElementInput[]) => void;
|
|
15
15
|
export declare const isValidURL: (url: string) => boolean;
|
|
16
16
|
export declare const isValidRegExp: (input: any) => boolean;
|
|
17
|
-
export declare const
|
|
17
|
+
export declare const validateRevealOptions: (options: IRevealElementOptions) => void;
|
|
18
|
+
export declare const validateConnectionConfig: (config: IConnectionConfig, initConfig: ISkyflow) => void;
|
|
18
19
|
export declare const validateCardNumberLengthCheck: (cardNumber: string) => boolean;
|
|
19
20
|
export declare const validateInitConfig: (initConfig: ISkyflow) => void;
|
|
21
|
+
export declare const validateInitConfigInConnections: (initConfig: ISkyflow) => void;
|
|
20
22
|
export declare const validateCollectElementInput: (input: CollectElementInput, logLevel: any) => void;
|
|
21
23
|
export declare const isValidXml: (xml: string) => boolean;
|
|
22
|
-
export declare const validateSoapConnectionConfig: (config: ISoapConnectionConfig) => void;
|
|
24
|
+
export declare const validateSoapConnectionConfig: (config: ISoapConnectionConfig, initConfig: ISkyflow) => void;
|