skyflow-js 1.27.3 → 1.28.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/README.md +149 -2
- package/dist/sdkNodeBuild/index.js +1 -1
- package/dist/sdkNodeBuild/index.js.gz +0 -0
- package/package.json +1 -1
- package/types/core-utils/collect.d.ts +17 -2
- package/types/utils/common/index.d.ts +9 -0
- package/types/utils/constants.d.ts +16 -0
- package/types/utils/logs.d.ts +4 -0
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Client from '../client';
|
|
1
2
|
import { IInsertRecordInput, IInsertRecord, IValidationRule } from '../utils/common';
|
|
2
3
|
export interface IUpsertOptions {
|
|
3
4
|
table: string;
|
|
@@ -8,8 +9,22 @@ export declare const constructInsertRecordRequest: (records: IInsertRecordInput,
|
|
|
8
9
|
export declare const constructInsertRecordResponse: (responseBody: any, tokens: boolean, records: IInsertRecord[]) => {
|
|
9
10
|
records: any;
|
|
10
11
|
};
|
|
12
|
+
export declare const constructFinalUpdateRecordResponse: (responseBody: any, tokens: boolean, records: any) => {
|
|
13
|
+
table: any;
|
|
14
|
+
fields: any;
|
|
15
|
+
skyflow_id?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
table: any;
|
|
18
|
+
skyflow_id: any;
|
|
19
|
+
fields?: undefined;
|
|
20
|
+
};
|
|
11
21
|
export declare const constructUploadResponse: (response: any) => any;
|
|
12
|
-
export declare const constructElementsInsertReq: (req: any, options: any) => {
|
|
22
|
+
export declare const constructElementsInsertReq: (req: any, update: any, options: any) => ({
|
|
13
23
|
records: IInsertRecord[];
|
|
14
|
-
|
|
24
|
+
updateRecords?: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
updateRecords: IInsertRecord[];
|
|
27
|
+
records?: undefined;
|
|
28
|
+
})[];
|
|
29
|
+
export declare const updateRecordsBySkyflowID: (skyflowIdRecords: any, client: Client, options: any) => Promise<unknown>;
|
|
15
30
|
export declare const checkForElementMatchRule: (validations: IValidationRule[]) => boolean;
|
|
@@ -44,11 +44,20 @@ export interface IInsertRecordInput {
|
|
|
44
44
|
export interface IInsertRecord {
|
|
45
45
|
table: string;
|
|
46
46
|
fields: Record<string, any>;
|
|
47
|
+
skyflowID?: string;
|
|
47
48
|
}
|
|
48
49
|
export interface IRevealRecord {
|
|
49
50
|
token: string;
|
|
50
51
|
redaction?: RedactionType;
|
|
51
52
|
}
|
|
53
|
+
export interface IInsertResponse {
|
|
54
|
+
records: IInsertResponseReocrds[];
|
|
55
|
+
}
|
|
56
|
+
export interface IInsertResponseReocrds {
|
|
57
|
+
table: string;
|
|
58
|
+
fields?: Record<string, any>;
|
|
59
|
+
skyflowID?: string;
|
|
60
|
+
}
|
|
52
61
|
export interface IRevealResponseType {
|
|
53
62
|
records?: Record<string, string>[];
|
|
54
63
|
errors?: Record<string, any>[];
|
|
@@ -51,14 +51,26 @@ declare const SKYFLOW_ERROR_CODE: {
|
|
|
51
51
|
code: number;
|
|
52
52
|
description: string;
|
|
53
53
|
};
|
|
54
|
+
EMPTY_SKYFLOW_ID_IN_ADDITIONAL_FIELDS: {
|
|
55
|
+
code: number;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
54
58
|
INVALID_TABLE_IN_COLLECT: {
|
|
55
59
|
code: number;
|
|
56
60
|
description: string;
|
|
57
61
|
};
|
|
62
|
+
INVALID_SKYFLOWID_IN_COLLECT: {
|
|
63
|
+
code: number;
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
58
66
|
MISSING_COLUMN_IN_COLLECT: {
|
|
59
67
|
code: number;
|
|
60
68
|
description: string;
|
|
61
69
|
};
|
|
70
|
+
MISSING_SKYFLOWID_IN_COLLECT: {
|
|
71
|
+
code: number;
|
|
72
|
+
description: string;
|
|
73
|
+
};
|
|
62
74
|
EMPTY_COLUMN_IN_COLLECT: {
|
|
63
75
|
code: number;
|
|
64
76
|
description: string;
|
|
@@ -207,6 +219,10 @@ declare const SKYFLOW_ERROR_CODE: {
|
|
|
207
219
|
code: number;
|
|
208
220
|
description: string;
|
|
209
221
|
};
|
|
222
|
+
INVALID_SKYFLOW_ID_IN_ADDITIONAL_FIELDS: {
|
|
223
|
+
code: number;
|
|
224
|
+
description: string;
|
|
225
|
+
};
|
|
210
226
|
MISSING_FIELDS_IN_ADDITIONAL_FIELDS: {
|
|
211
227
|
code: number;
|
|
212
228
|
description: string;
|
package/types/utils/logs.d.ts
CHANGED
|
@@ -94,6 +94,7 @@ declare const logs: {
|
|
|
94
94
|
EMPTY_RECORDS_IN_ADDITIONAL_FIELDS: string;
|
|
95
95
|
MISSING_TABLE_IN_ADDITIONAL_FIELDS: string;
|
|
96
96
|
INVALID_TABLE_IN_ADDITIONAL_FIELDS: string;
|
|
97
|
+
INVALID_SKYFLOW_ID_IN_ADDITIONAL_FIELDS: string;
|
|
97
98
|
MISSING_FIELDS_IN_ADDITIONAL_FIELDS: string;
|
|
98
99
|
INVALID_FIELDS_IN_ADDITIONAL_FIELDS: string;
|
|
99
100
|
RECORDS_KEY_NOT_FOUND_DETOKENIZE: string;
|
|
@@ -137,8 +138,11 @@ declare const logs: {
|
|
|
137
138
|
FAILED_REVEAL: string;
|
|
138
139
|
MISSING_TABLE_IN_COLLECT: string;
|
|
139
140
|
EMPTY_TABLE_IN_COLLECT: string;
|
|
141
|
+
EMPTY_SKYFLOW_ID_IN_ADDITIONAL_FIELDS: string;
|
|
140
142
|
INVALID_TABLE_IN_COLLECT: string;
|
|
143
|
+
INVALID_SKYFLOWID_IN_COLLECT: string;
|
|
141
144
|
MISSING_COLUMN_IN_COLLECT: string;
|
|
145
|
+
MISSING_SKYFLOWID_IN_COLLECT: string;
|
|
142
146
|
EMPTY_COLUMN_IN_COLLECT: string;
|
|
143
147
|
INVALID_COLUMN_IN_COLLECT: string;
|
|
144
148
|
UNIQUE_ELEMENT_NAME: string;
|