skyflow-js 1.31.0 → 1.32.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 +100 -0
- package/dist/sdkNodeBuild/index.js +1 -1
- package/dist/sdkNodeBuild/index.js.gz +0 -0
- package/dist/sdkNodeBuild/manifest.json +13 -13
- package/dist/sdkNodeBuild/manifest.json.gz +0 -0
- package/package.json +2 -2
- package/types/core/constants.d.ts +0 -1
- package/types/core/external/skyflow-container.d.ts +2 -2
- package/types/core-utils/reveal.d.ts +2 -2
- package/types/skyflow.d.ts +2 -2
- package/types/utils/common/index.d.ts +4 -1
- package/types/utils/constants.d.ts +12 -0
- package/types/utils/logs.d.ts +3 -0
- package/types/utils/validators/index.d.ts +2 -2
|
Binary file
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"index.js": "
|
|
3
|
-
"amex.svg": "
|
|
4
|
-
"unionpay.svg": "
|
|
5
|
-
"maestro.svg": "
|
|
6
|
-
"hipercard.svg": "
|
|
7
|
-
"discover.svg": "
|
|
8
|
-
"jcb.svg": "
|
|
9
|
-
"mastercard.svg": "
|
|
10
|
-
"diners-club.svg": "
|
|
11
|
-
"visa.svg": "
|
|
12
|
-
"copyIcon.svg": "
|
|
13
|
-
"path.svg": "
|
|
14
|
-
"default.svg": "
|
|
2
|
+
"index.js": "index.js",
|
|
3
|
+
"amex.svg": "5408d9cd30b616684aa0.svg",
|
|
4
|
+
"unionpay.svg": "d418de915d45f039ac22.svg",
|
|
5
|
+
"maestro.svg": "407dfd9c3fd800945b74.svg",
|
|
6
|
+
"hipercard.svg": "404966085770d8ec21ca.svg",
|
|
7
|
+
"discover.svg": "9b996d698afd3d404564.svg",
|
|
8
|
+
"jcb.svg": "8062a86943450f142966.svg",
|
|
9
|
+
"mastercard.svg": "08ad88dee7d4519954ec.svg",
|
|
10
|
+
"diners-club.svg": "a9431336dd9f3e17b880.svg",
|
|
11
|
+
"visa.svg": "cbee67fb3d652dad9e25.svg",
|
|
12
|
+
"copyIcon.svg": "362f9fcc6011fc54c62f.svg",
|
|
13
|
+
"path.svg": "54c18b6916f26474cce8.svg",
|
|
14
|
+
"default.svg": "2afb5d11fb02e9292eaf.svg"
|
|
15
15
|
}
|
|
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.32.0",
|
|
6
6
|
"author": "Skyflow",
|
|
7
7
|
"description": "Skyflow JavaScript SDK",
|
|
8
8
|
"homepage": "https://github.com/skyflowapi/skyflow-js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"npm": ">=6.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@babel/core": "^7.
|
|
53
|
+
"@babel/core": "^7.23.2",
|
|
54
54
|
"@babel/plugin-proposal-class-properties": "^7.10.1",
|
|
55
55
|
"@babel/plugin-proposal-decorators": "^7.10.1",
|
|
56
56
|
"@babel/plugin-proposal-object-rest-spread": "^7.10.1",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { IDetokenizeInput, IGetInput, IGetByIdInput, IInsertOptions, IDeleteOptions, IDeleteRecordInput } from '../../utils/common';
|
|
1
|
+
import { IDetokenizeInput, IGetInput, IGetByIdInput, IInsertOptions, IDeleteOptions, IDeleteRecordInput, IGetOptions } from '../../utils/common';
|
|
2
2
|
declare class SkyflowContainer {
|
|
3
3
|
#private;
|
|
4
4
|
constructor(client: any, context: any);
|
|
5
5
|
detokenize(detokenizeInput: IDetokenizeInput): Promise<any>;
|
|
6
6
|
insert(records: any, options: IInsertOptions): Promise<any>;
|
|
7
7
|
getById(getByIdInput: IGetByIdInput): Promise<unknown>;
|
|
8
|
-
get(getInput: IGetInput): Promise<unknown>;
|
|
8
|
+
get(getInput: IGetInput, options?: IGetOptions): Promise<unknown>;
|
|
9
9
|
delete(records: IDeleteRecordInput, options: IDeleteOptions): Promise<unknown>;
|
|
10
10
|
}
|
|
11
11
|
export default SkyflowContainer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Client from '../client';
|
|
2
|
-
import { IRevealRecord, IRevealResponseType, IGetRecord, ISkyflowIdRecord } from '../utils/common';
|
|
2
|
+
import { IRevealRecord, IRevealResponseType, IGetRecord, ISkyflowIdRecord, IGetOptions } 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
5
|
export declare const formatRecordsForClient: (response: IRevealResponseType) => {
|
|
@@ -18,5 +18,5 @@ export declare const formatRecordsForClient: (response: IRevealResponseType) =>
|
|
|
18
18
|
errors: Record<string, any>[] | undefined;
|
|
19
19
|
success?: undefined;
|
|
20
20
|
};
|
|
21
|
-
export declare const fetchRecordsGET: (skyflowIdRecords: IGetRecord[], client: Client) => Promise<unknown>;
|
|
21
|
+
export declare const fetchRecordsGET: (skyflowIdRecords: IGetRecord[], client: Client, options?: IGetOptions) => Promise<unknown>;
|
|
22
22
|
export declare const fetchRecordsBySkyflowID: (skyflowIdRecords: ISkyflowIdRecord[], client: Client) => Promise<unknown>;
|
package/types/skyflow.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ElementType } from './core/constants';
|
|
2
2
|
import RevealContainer from './core/external/reveal/reveal-container';
|
|
3
3
|
import CollectContainer from './core/external/collect/collect-container';
|
|
4
|
-
import { IRevealResponseType, RequestMethod, IInsertRecordInput, IDetokenizeInput, IGetInput, RedactionType, EventName, Env, LogLevel, ValidationRuleType, IGetByIdInput, IInsertOptions, IDeleteRecordInput, IDeleteOptions } from './utils/common';
|
|
4
|
+
import { IRevealResponseType, RequestMethod, IInsertRecordInput, IDetokenizeInput, IGetInput, RedactionType, EventName, Env, LogLevel, ValidationRuleType, IGetByIdInput, IInsertOptions, IDeleteRecordInput, IDeleteOptions, IGetOptions } from './utils/common';
|
|
5
5
|
import ComposableContainer from './core/external/collect/compose-collect-container';
|
|
6
6
|
export declare enum ContainerType {
|
|
7
7
|
COLLECT = "COLLECT",
|
|
@@ -22,7 +22,7 @@ declare class Skyflow {
|
|
|
22
22
|
insert(records: IInsertRecordInput, options: IInsertOptions): Promise<any>;
|
|
23
23
|
detokenize(detokenizeInput: IDetokenizeInput): Promise<IRevealResponseType>;
|
|
24
24
|
getById(getByIdInput: IGetByIdInput): Promise<unknown>;
|
|
25
|
-
get(getInput: IGetInput): Promise<unknown>;
|
|
25
|
+
get(getInput: IGetInput, options?: IGetOptions): Promise<unknown>;
|
|
26
26
|
delete(records: IDeleteRecordInput, options: IDeleteOptions): Promise<unknown>;
|
|
27
27
|
static get ContainerType(): typeof ContainerType;
|
|
28
28
|
static get ElementType(): typeof ElementType;
|
|
@@ -67,7 +67,7 @@ export interface IDetokenizeInput {
|
|
|
67
67
|
}
|
|
68
68
|
export interface IGetRecord {
|
|
69
69
|
ids?: string[];
|
|
70
|
-
redaction
|
|
70
|
+
redaction?: RedactionType;
|
|
71
71
|
table: string;
|
|
72
72
|
columnName?: string;
|
|
73
73
|
columnValues?: string[];
|
|
@@ -75,6 +75,9 @@ export interface IGetRecord {
|
|
|
75
75
|
export interface IGetInput {
|
|
76
76
|
records: IGetRecord[];
|
|
77
77
|
}
|
|
78
|
+
export interface IGetOptions {
|
|
79
|
+
tokens?: boolean;
|
|
80
|
+
}
|
|
78
81
|
export interface ISkyflowIdRecord {
|
|
79
82
|
ids: string[];
|
|
80
83
|
redaction: RedactionType;
|
|
@@ -191,6 +191,18 @@ declare const SKYFLOW_ERROR_CODE: {
|
|
|
191
191
|
code: number;
|
|
192
192
|
description: string;
|
|
193
193
|
};
|
|
194
|
+
INVALID_TOKENS_IN_GET: {
|
|
195
|
+
code: number;
|
|
196
|
+
description: string;
|
|
197
|
+
};
|
|
198
|
+
TOKENS_GET_COLUMN_NOT_SUPPORTED: {
|
|
199
|
+
code: number;
|
|
200
|
+
description: string;
|
|
201
|
+
};
|
|
202
|
+
REDACTION_WITH_TOKENS_NOT_SUPPORTED: {
|
|
203
|
+
code: number;
|
|
204
|
+
description: string;
|
|
205
|
+
};
|
|
194
206
|
INVALID_REDACTION_TYPE_IN_DETOKENIZE: {
|
|
195
207
|
code: number;
|
|
196
208
|
description: string;
|
package/types/utils/logs.d.ts
CHANGED
|
@@ -129,6 +129,9 @@ declare const logs: {
|
|
|
129
129
|
INVALID_TABLE_IN_GET: string;
|
|
130
130
|
MISSING_REDACTION_IN_GET: string;
|
|
131
131
|
INVALID_REDACTION_TYPE_IN_GET: string;
|
|
132
|
+
INVALID_TOKENS_IN_GET: string;
|
|
133
|
+
TOKENS_GET_COLUMN_NOT_SUPPORTED: string;
|
|
134
|
+
REDACTION_WITH_TOKENS_NOT_SUPPORTED: string;
|
|
132
135
|
INVALID_REDACTION_TYPE_IN_DETOKENIZE: string;
|
|
133
136
|
EMPTY_RECORDS_REVEAL: string;
|
|
134
137
|
MISSING_TOKEN_KEY_REVEAL: string;
|
|
@@ -2,7 +2,7 @@ import { CardType } from '../../core/constants';
|
|
|
2
2
|
import { CollectElementInput } from '../../core/external/collect/collect-container';
|
|
3
3
|
import { IRevealElementInput } from '../../core/external/reveal/reveal-container';
|
|
4
4
|
import { ISkyflow } from '../../skyflow';
|
|
5
|
-
import { IInsertRecordInput, IDetokenizeInput, IGetInput, IGetByIdInput, IDeleteRecordInput } from '../common';
|
|
5
|
+
import { IInsertRecordInput, IDetokenizeInput, IGetInput, IGetByIdInput, IDeleteRecordInput, IGetOptions } from '../common';
|
|
6
6
|
export declare const validateCreditCardNumber: (cardNumber: string) => boolean;
|
|
7
7
|
export declare const detectCardType: (cardNumber?: string) => CardType.DEFAULT;
|
|
8
8
|
export declare const validateExpiryDate: (date: string, format: string) => boolean;
|
|
@@ -13,7 +13,7 @@ export declare const isValidExpiryYearFormat: (format: string) => boolean;
|
|
|
13
13
|
export declare const validateInsertRecords: (recordObj: IInsertRecordInput, options: any) => void;
|
|
14
14
|
export declare const validateAdditionalFieldsInCollect: (recordObj: IInsertRecordInput) => void;
|
|
15
15
|
export declare const validateDetokenizeInput: (detokenizeInput: IDetokenizeInput) => void;
|
|
16
|
-
export declare const validateGetInput: (getInput: IGetInput) => void;
|
|
16
|
+
export declare const validateGetInput: (getInput: IGetInput, options?: IGetOptions) => void;
|
|
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;
|