skyflow-js 1.7.0 → 1.8.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 +19 -0
- package/README.md +155 -13
- package/dist/sdkNodeBuild/index.js +1 -1
- package/dist/sdkNodeBuild/index.js.gz +0 -0
- package/package.json +1 -1
- package/types/Skyflow.d.ts +2 -2
- package/types/container/constants.d.ts +74 -13
- package/types/container/external/element/index.d.ts +4 -0
- package/types/container/external/reveal/RevealElement.d.ts +8 -0
- package/types/container/internal/iFrameForm/index.d.ts +4 -0
- package/types/container/internal/index.d.ts +2 -0
- package/types/container/internal/reveal/RevealFrame.d.ts +3 -0
- package/types/core/collect.d.ts +2 -1
- package/types/libs/element-options.d.ts +1 -0
- package/types/utils/constants.d.ts +214 -22
- package/types/utils/helpers/index.d.ts +2 -0
- package/types/utils/logs.d.ts +79 -37
- package/types/utils/validators/index.d.ts +8 -2
package/types/utils/logs.d.ts
CHANGED
|
@@ -59,66 +59,98 @@ declare const logs: {
|
|
|
59
59
|
EXECUTE_COLLECT_CONTROLLER_READY_CB: string;
|
|
60
60
|
IFRAMEFORM_CONSTRUCTOR_FRAME_READY_LISTNER: string;
|
|
61
61
|
IFRAMEFORM_CONSTRUCTOR_TOKENIZATION_LISTNER: string;
|
|
62
|
+
CURRENT_ENV: string;
|
|
63
|
+
CURRENT_LOG_LEVEL: string;
|
|
62
64
|
};
|
|
63
65
|
errorLogs: {
|
|
64
66
|
CLIENT_CONNECTION: string;
|
|
65
67
|
BEARER_TOKEN_REJECTED: string;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
VAULTID_IS_REQUIRED: string;
|
|
69
|
+
EMPTY_VAULTID_IN_INIT: string;
|
|
70
|
+
VAULTURL_IS_REQUIRED: string;
|
|
71
|
+
EMPTY_VAULTURL_IN_INIT: string;
|
|
72
|
+
INVALID_VAULTURL_IN_INIT: string;
|
|
73
|
+
GET_BEARER_TOKEN_IS_REQUIRED: string;
|
|
74
|
+
EMPTY_CONTAINER_TYPE: string;
|
|
70
75
|
INVALID_CONTAINER_TYPE: string;
|
|
71
76
|
INVALID_COLLECT_VALUE: string;
|
|
72
77
|
INVALID_COLLECT_VALUE_WITH_LABEL: string;
|
|
73
78
|
RECORDS_KEY_NOT_FOUND: string;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
INVALID_RECORDS_IN_INSERT: string;
|
|
80
|
+
EMPTY_RECORDS_IN_INSERT: string;
|
|
81
|
+
MISSING_TABLE_IN_INSERT: string;
|
|
82
|
+
EMPTY_TABLE_IN_INSERT: string;
|
|
83
|
+
INVALID_TABLE_IN_INSERT: string;
|
|
84
|
+
EMPTY_FIELDS_IN_INSERT: string;
|
|
85
|
+
MISSING_FIELDS_IN_INSERT: string;
|
|
86
|
+
INVALID_FIELDS_IN_INSERT: string;
|
|
87
|
+
INVALID_TOKENS_IN_INSERT: string;
|
|
88
|
+
INVALID_TOKENS_IN_COLLECT: string;
|
|
89
|
+
RECORDS_KEY_NOT_FOUND_IN_ADDITIONAL_FIELDS: string;
|
|
90
|
+
INVALID_RECORDS_IN_ADDITIONAL_FIELDS: string;
|
|
91
|
+
EMPTY_RECORDS_IN_ADDITIONAL_FIELDS: string;
|
|
92
|
+
MISSING_TABLE_IN_ADDITIONAL_FIELDS: string;
|
|
93
|
+
INVALID_TABLE_IN_ADDITIONAL_FIELDS: string;
|
|
94
|
+
MISSING_FIELDS_IN_ADDITIONAL_FIELDS: string;
|
|
95
|
+
INVALID_FIELDS_IN_ADDITIONAL_FIELDS: string;
|
|
96
|
+
RECORDS_KEY_NOT_FOUND_DETOKENIZE: string;
|
|
97
|
+
EMPTY_RECORDS_DETOKENIZE: string;
|
|
98
|
+
INVALID_RECORDS_IN_DETOKENIZE: string;
|
|
99
|
+
MISSING_TOKEN_IN_DETOKENIZE: string;
|
|
100
|
+
INVALID_TOKEN_IN_DETOKENIZE: string;
|
|
101
|
+
RECORDS_KEY_NOT_FOUND_GETBYID: string;
|
|
102
|
+
INVALID_RECORDS_IN_GETBYID: string;
|
|
103
|
+
EMPTY_RECORDS_GETBYID: string;
|
|
104
|
+
MISSING_IDS_IN_GETBYID: string;
|
|
105
|
+
INVALID_IDS_IN_GETBYID: string;
|
|
106
|
+
EMPTY_IDS_IN_GETBYID: string;
|
|
107
|
+
INVALID_SKYFLOWID_TYPE_IN_GETBYID: string;
|
|
108
|
+
MISSING_TABLE_IN_GETBYID: string;
|
|
109
|
+
INVALID_TABLE_IN_GETBYID: string;
|
|
110
|
+
MISSING_REDACTION_IN_GETBYID: string;
|
|
111
|
+
INVALID_REDACTION_TYPE_IN_GETBYID: string;
|
|
112
|
+
EMPTY_RECORDS_REVEAL: string;
|
|
113
|
+
MISSING_TOKEN_KEY_REVEAL: string;
|
|
114
|
+
INVALID_TOKEN_ID_REVEAL: string;
|
|
115
|
+
INVALID_LABEL_REVEAL: string;
|
|
116
|
+
INVALID_ALT_TEXT_REVEAL: string;
|
|
117
|
+
ELEMENTS_NOT_MOUNTED_REVEAL: string;
|
|
118
|
+
EMPTY_TABLE_IN_ADDITIONAL_FIELDS: string;
|
|
119
|
+
EMPTY_FIELDS_IN_ADDITIONAL_FIELDS: string;
|
|
120
|
+
EMPTY_TOKEN_IN_DETOKENIZE: string;
|
|
121
|
+
EMPTY_SKYFLOWID_IN_GETBYID: string;
|
|
122
|
+
EMPTY_TABLE_IN_GETBYID: string;
|
|
123
|
+
EMPTY_REDACTION_TYPE_IN_GETBYID: string;
|
|
124
|
+
EMPTY_TOKEN_ID_REVEAL: string;
|
|
82
125
|
FETCH_RECORDS_REJECTED: string;
|
|
83
126
|
INSERT_RECORDS_REJECTED: string;
|
|
84
127
|
GET_BY_SKYFLOWID_REJECTED: string;
|
|
85
128
|
SEND_INVOKE_CONNECTION_REJECTED: string;
|
|
86
129
|
FAILED_REVEAL: string;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
INVALID_TABLE_OR_COLUMN: string;
|
|
94
|
-
INVALID_COLUMN_NAME: string;
|
|
95
|
-
EMPTY_COLUMN_NAME: string;
|
|
96
|
-
MISSING_TABLE: string;
|
|
97
|
-
INVALID_RECORD_TABLE_VALUE: string;
|
|
98
|
-
INVALID_TOKEN_ID: string;
|
|
99
|
-
INVALID_TOKEN_ID_WITH_ID: string;
|
|
100
|
-
EMPTY_TOKEN_ID: string;
|
|
101
|
-
ID_KEY_ERROR: string;
|
|
102
|
-
MISSING_TOKEN: string;
|
|
103
|
-
MISSING_TOKEN_KEY: string;
|
|
104
|
-
ELEMENT_MUST_HAVE_TOKEN: string;
|
|
105
|
-
REDACTION_KEY_ERROR: string;
|
|
106
|
-
INVALID_REDACTION_TYPE: string;
|
|
107
|
-
MISSING_REDACTION: string;
|
|
108
|
-
MISSING_REDACTION_VALUE: string;
|
|
130
|
+
MISSING_TABLE_IN_COLLECT: string;
|
|
131
|
+
EMPTY_TABLE_IN_COLLECT: string;
|
|
132
|
+
INVALID_TABLE_IN_COLLECT: string;
|
|
133
|
+
MISSING_COLUMN_IN_COLLECT: string;
|
|
134
|
+
EMPTY_COLUMN_IN_COLLECT: string;
|
|
135
|
+
INVALID_COLUMN_IN_COLLECT: string;
|
|
109
136
|
UNIQUE_ELEMENT_NAME: string;
|
|
110
|
-
ELEMENT_NOT_MOUNTED: string;
|
|
111
137
|
ELEMENTS_NOT_MOUNTED: string;
|
|
112
|
-
MISSING_IDS: string;
|
|
113
138
|
DUPLICATE_ELEMENT: string;
|
|
139
|
+
DUPLICATE_ELEMENT_ADDITIONAL_FIELDS: string;
|
|
140
|
+
MISSING_ELEMENT_TYPE: string;
|
|
141
|
+
EMPTY_ELEMENT_TYPE: string;
|
|
114
142
|
INVALID_ELEMENT_TYPE: string;
|
|
115
143
|
INVALID_ELEMENT_SELECTOR: string;
|
|
116
144
|
CANNOT_CHANGE_ELEMENT: string;
|
|
145
|
+
MISSING_CONNECTION_CONFIG: string;
|
|
117
146
|
MISSING_CONNECTION_URL: string;
|
|
147
|
+
EMPTY_CONNECTION_URL: string;
|
|
118
148
|
INVALID_CONNECTION_URL_TYPE: string;
|
|
119
149
|
INVALID_CONNECTION_URL: string;
|
|
120
150
|
MISSING_METHODNAME_KEY: string;
|
|
121
151
|
INVALID_METHODNAME_VALUE: string;
|
|
152
|
+
ELEMENTS_NOT_MOUNTED_INVOKE_CONNECTION: string;
|
|
153
|
+
ELEMENT_MUST_HAVE_TOKEN: string;
|
|
122
154
|
INVALID_IFRAME: string;
|
|
123
155
|
INVALID_FIELD: string;
|
|
124
156
|
FRAME_NOT_FOUND: string;
|
|
@@ -126,8 +158,10 @@ declare const logs: {
|
|
|
126
158
|
REQUIRED_PARAMS_NOT_PROVIDED: string;
|
|
127
159
|
INVALID_EVENT_TYPE: string;
|
|
128
160
|
INVALID_EVENT_LISTENER: string;
|
|
161
|
+
MISSING_HANDLER_IN_EVENT_LISTENER: string;
|
|
162
|
+
INVALID_HANDLER_IN_EVENT_LISTENER: string;
|
|
129
163
|
UNKNOWN_ERROR: string;
|
|
130
|
-
|
|
164
|
+
NETWORK_ERROR: string;
|
|
131
165
|
CONNECTION_ERROR: string;
|
|
132
166
|
ERROR_OCCURED: string;
|
|
133
167
|
RESPONSE_BODY_KEY_MISSING: string;
|
|
@@ -142,7 +176,15 @@ declare const logs: {
|
|
|
142
176
|
MISSING_ELEMENT_IN_ELEMENT_MATCH_RULE: string;
|
|
143
177
|
INVALID_ELEMENT_IN_ELEMENT_MATCH_RULE: string;
|
|
144
178
|
ELEMENT_NOT_MOUNTED_IN_ELEMENT_MATCH_RULE: string;
|
|
179
|
+
EMPTY_ELEMENT_IN_MOUNT: string;
|
|
145
180
|
VALIDATION_FAILED: string;
|
|
181
|
+
REVEAL_ELEMENT_ERROR_STATE: string;
|
|
182
|
+
};
|
|
183
|
+
warnLogs: {
|
|
184
|
+
INVALID_EXPIRATION_DATE_FORMAT: string;
|
|
185
|
+
UNABLE_TO_SET_VALUE_IN_PROD_ENV: string;
|
|
186
|
+
UNABLE_TO_CLEAR_VALUE_IN_PROD_ENV: string;
|
|
187
|
+
COLLECT_ALT_TEXT_DEPERECATED: string;
|
|
146
188
|
};
|
|
147
189
|
};
|
|
148
190
|
export default logs;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { CardType } from '../../container/constants';
|
|
2
|
+
import { CollectElementInput } from '../../container/external/CollectContainer';
|
|
2
3
|
import { IRevealElementInput } from '../../container/external/RevealContainer';
|
|
4
|
+
import { ISkyflow } from '../../Skyflow';
|
|
3
5
|
import { IInsertRecordInput, IDetokenizeInput, IGetByIdInput, IConnectionConfig } from '../common';
|
|
4
6
|
export declare const validateCreditCardNumber: (cardNumber: string) => boolean;
|
|
5
7
|
export declare const detectCardType: (cardNumber: string) => CardType.DEFAULT;
|
|
6
|
-
export declare const validateExpiryDate: (date: string) => boolean;
|
|
7
|
-
export declare const
|
|
8
|
+
export declare const validateExpiryDate: (date: string, format: string) => boolean;
|
|
9
|
+
export declare const isValidExpiryDateFormat: (format: string) => boolean;
|
|
10
|
+
export declare const validateInsertRecords: (recordObj: IInsertRecordInput, options: any) => void;
|
|
11
|
+
export declare const validateAdditionalFieldsInCollect: (recordObj: IInsertRecordInput) => void;
|
|
8
12
|
export declare const validateDetokenizeInput: (detokenizeInput: IDetokenizeInput) => void;
|
|
9
13
|
export declare const validateGetByIdInput: (getByIdInput: IGetByIdInput) => void;
|
|
10
14
|
export declare const validateRevealElementRecords: (records: IRevealElementInput[]) => void;
|
|
@@ -12,3 +16,5 @@ export declare const isValidURL: (url: string) => boolean;
|
|
|
12
16
|
export declare const isValidRegExp: (input: any) => boolean;
|
|
13
17
|
export declare const validateConnectionConfig: (config: IConnectionConfig) => void;
|
|
14
18
|
export declare const validateCardNumberLengthCheck: (cardNumber: string) => boolean;
|
|
19
|
+
export declare const validateInitConfig: (initConfig: ISkyflow) => void;
|
|
20
|
+
export declare const validateCollectElementInput: (input: CollectElementInput, logLevel: any) => void;
|