aeremmiddleware 1.0.37 → 1.0.39
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/Finance/idfy.d.ts +5 -2
- package/dist/Finance/idfy.js +22 -21
- package/dist/Finance/idfy.js.map +1 -1
- package/package.json +1 -1
- package/src/Finance/idfy.ts +645 -622
package/src/Finance/idfy.ts
CHANGED
|
@@ -1,649 +1,672 @@
|
|
|
1
1
|
import axios, { AxiosRequestConfig, AxiosResponse } from "axios";
|
|
2
2
|
interface ObjectTypes {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
IDFY_TASK_ID: string;
|
|
4
|
+
IDFY_GROUP_ID: string;
|
|
5
|
+
IDFY_ACCOUNT_ID: string;
|
|
6
|
+
IDFY_API_KEY: string;
|
|
7
|
+
IDFY_COMPANY_SEARCH_API_KEY: string;
|
|
8
|
+
callbackUrl: string;
|
|
9
9
|
}
|
|
10
10
|
export default class IdfyAPIWrapper {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
private idfyError = {
|
|
62
|
-
INVALID_IMAGE: {
|
|
63
|
-
idfyErrorCode: "IDFY_ERR_100",
|
|
64
|
-
message: "Please scan correct document",
|
|
65
|
-
},
|
|
66
|
-
INSUFFICIENT_CREDITS: {
|
|
67
|
-
idfyErrorCode: "IDFY_ERR_101",
|
|
68
|
-
message: "Please renew credit",
|
|
69
|
-
},
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
constructor({
|
|
73
|
-
IDFY_TASK_ID,
|
|
74
|
-
IDFY_GROUP_ID,
|
|
75
|
-
IDFY_ACCOUNT_ID,
|
|
76
|
-
IDFY_API_KEY,
|
|
77
|
-
IDFY_COMPANY_SEARCH_API_KEY,
|
|
78
|
-
callbackUrl,
|
|
79
|
-
}: ObjectTypes) {
|
|
80
|
-
this.bodyTaskIdGroupId.task_id = IDFY_TASK_ID;
|
|
81
|
-
this.bodyTaskIdGroupId.group_id = IDFY_GROUP_ID;
|
|
82
|
-
this.defaultHeaderIdfyApi["account-id"] = IDFY_ACCOUNT_ID;
|
|
83
|
-
this.defaultHeaderIdfyApi["api-key"] = IDFY_API_KEY;
|
|
84
|
-
this.idfyCompanySearch.defaultHeader["api-key"] =
|
|
85
|
-
IDFY_COMPANY_SEARCH_API_KEY;
|
|
86
|
-
this.callbackUrl = callbackUrl;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
private async makeRequest<T>(
|
|
90
|
-
method: string,
|
|
91
|
-
endpoint: string,
|
|
92
|
-
data?: any
|
|
93
|
-
): Promise<T> {
|
|
94
|
-
const requestConfig: AxiosRequestConfig = {
|
|
95
|
-
method,
|
|
96
|
-
url: this.baseUrl + endpoint,
|
|
97
|
-
headers: this.defaultHeaderIdfyApi,
|
|
98
|
-
data,
|
|
11
|
+
private bodyTaskIdGroupId = {
|
|
12
|
+
task_id: "",
|
|
13
|
+
group_id: "",
|
|
14
|
+
};
|
|
15
|
+
private defaultHeaderIdfyApi = {
|
|
16
|
+
"account-id": "",
|
|
17
|
+
"api-key": "",
|
|
18
|
+
};
|
|
19
|
+
private standardErrorThrowFormat = {
|
|
20
|
+
statusCode: 400,
|
|
21
|
+
message: ["bad request"],
|
|
22
|
+
};
|
|
23
|
+
private baseUrl: string = "https://eve.idfy.com/";
|
|
24
|
+
private gstVerificationEndPoint =
|
|
25
|
+
"v3/tasks/sync/verify_with_source/ind_gst_certificate";
|
|
26
|
+
private panIndividualVerificationEndPoint =
|
|
27
|
+
"v3/tasks/async/verify_with_source/ind_pan_plus";
|
|
28
|
+
private cinCompanyVerificationEndPoint =
|
|
29
|
+
"v3/tasks/async/verify_with_source/ind_mca";
|
|
30
|
+
private taskUrl = "v3/tasks?request_id=";
|
|
31
|
+
private asyncIndividualAadhaarLiteInfoEndPoint =
|
|
32
|
+
"v3/tasks/async/verify_with_source/aadhaar_lite";
|
|
33
|
+
private syncIndividualAadharScanInfoEndpoint =
|
|
34
|
+
"v3/tasks/sync/extract/ind_aadhaar_plus";
|
|
35
|
+
private syncIndividualPANScanInfoEndpoint = "v3/tasks/sync/extract/ind_pan";
|
|
36
|
+
private syncIndividualGSTScanInfoEndpoint =
|
|
37
|
+
"v3/tasks/sync/extract/ind_gst_certificate";
|
|
38
|
+
private syncIndividualLiveFaceLivenessEndpoint =
|
|
39
|
+
"v3/tasks/sync/check_photo_liveness/face";
|
|
40
|
+
private getDigilockerDetailsEndpoint =
|
|
41
|
+
"v3/tasks/async/verify_with_source/ind_digilocker_fetch_documents";
|
|
42
|
+
private key_id = "ed9cedf1-d587-4e38-bce6-b74ac9f3520d";
|
|
43
|
+
private ou_id = "e0d2add9d3c1";
|
|
44
|
+
private secret = "NzY3NmM3NzY1Y2ZjNDZmYWE1Y2QyNDM0YTljNDY2MzY=";
|
|
45
|
+
private doc_type = ["ADHAR", "PANCR"];
|
|
46
|
+
private file_format = "xml";
|
|
47
|
+
private callbackUrl: string;
|
|
48
|
+
|
|
49
|
+
private idfyCompanySearch = {
|
|
50
|
+
defaultHeader: {
|
|
51
|
+
"api-key": "",
|
|
52
|
+
"Content-Type": "application/json",
|
|
53
|
+
},
|
|
54
|
+
version: "v1",
|
|
55
|
+
companySearchUrl:
|
|
56
|
+
"https://riskai.idfystaging.com/api/v1/company/search",
|
|
57
|
+
taskBaseUrl: "https://riskai.idfystaging.com/api/v1/task/",
|
|
58
|
+
cinllpinUrl: "https://riskai.idfystaging.com/api/v1/company/basic",
|
|
99
59
|
};
|
|
100
60
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
private async makeAxiosRequest<T>({
|
|
111
|
-
method,
|
|
112
|
-
url,
|
|
113
|
-
data,
|
|
114
|
-
headers,
|
|
115
|
-
}: {
|
|
116
|
-
method: string;
|
|
117
|
-
url: string;
|
|
118
|
-
data?: any;
|
|
119
|
-
headers: any;
|
|
120
|
-
}): Promise<T> {
|
|
121
|
-
const requestConfig: AxiosRequestConfig = {
|
|
122
|
-
method,
|
|
123
|
-
url,
|
|
124
|
-
headers,
|
|
125
|
-
data,
|
|
61
|
+
private idfyError = {
|
|
62
|
+
INVALID_IMAGE: {
|
|
63
|
+
idfyErrorCode: "IDFY_ERR_100",
|
|
64
|
+
message: "Please scan correct document",
|
|
65
|
+
},
|
|
66
|
+
INSUFFICIENT_CREDITS: {
|
|
67
|
+
idfyErrorCode: "IDFY_ERR_101",
|
|
68
|
+
message: "Please renew credit",
|
|
69
|
+
},
|
|
126
70
|
};
|
|
127
71
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
72
|
+
constructor({
|
|
73
|
+
IDFY_TASK_ID,
|
|
74
|
+
IDFY_GROUP_ID,
|
|
75
|
+
IDFY_ACCOUNT_ID,
|
|
76
|
+
IDFY_API_KEY,
|
|
77
|
+
IDFY_COMPANY_SEARCH_API_KEY,
|
|
78
|
+
callbackUrl,
|
|
79
|
+
}: ObjectTypes) {
|
|
80
|
+
this.bodyTaskIdGroupId.task_id = IDFY_TASK_ID;
|
|
81
|
+
this.bodyTaskIdGroupId.group_id = IDFY_GROUP_ID;
|
|
82
|
+
this.defaultHeaderIdfyApi["account-id"] = IDFY_ACCOUNT_ID;
|
|
83
|
+
this.defaultHeaderIdfyApi["api-key"] = IDFY_API_KEY;
|
|
84
|
+
this.idfyCompanySearch.defaultHeader["api-key"] =
|
|
85
|
+
IDFY_COMPANY_SEARCH_API_KEY;
|
|
86
|
+
this.callbackUrl = callbackUrl;
|
|
137
87
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
88
|
+
|
|
89
|
+
private async makeRequest<T>(
|
|
90
|
+
method: string,
|
|
91
|
+
endpoint: string,
|
|
92
|
+
data?: any
|
|
93
|
+
): Promise<T> {
|
|
94
|
+
const requestConfig: AxiosRequestConfig = {
|
|
95
|
+
method,
|
|
96
|
+
url: this.baseUrl + endpoint,
|
|
97
|
+
headers: this.defaultHeaderIdfyApi,
|
|
98
|
+
data,
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
try {
|
|
102
|
+
const response: AxiosResponse<T> = await axios(requestConfig);
|
|
103
|
+
return response.data;
|
|
104
|
+
} catch (error) {
|
|
105
|
+
console.error("Error while making Idfy Axios API request:", error);
|
|
106
|
+
throw error;
|
|
107
|
+
}
|
|
149
108
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
109
|
+
|
|
110
|
+
private async makeAxiosRequest<T>({
|
|
111
|
+
method,
|
|
112
|
+
url,
|
|
113
|
+
data,
|
|
114
|
+
headers,
|
|
115
|
+
}: {
|
|
116
|
+
method: string;
|
|
117
|
+
url: string;
|
|
118
|
+
data?: any;
|
|
119
|
+
headers: any;
|
|
120
|
+
}): Promise<T> {
|
|
121
|
+
const requestConfig: AxiosRequestConfig = {
|
|
122
|
+
method,
|
|
123
|
+
url,
|
|
124
|
+
headers,
|
|
125
|
+
data,
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
try {
|
|
129
|
+
const response: AxiosResponse<T> = await axios(requestConfig);
|
|
130
|
+
return response.data;
|
|
131
|
+
} catch (error) {
|
|
132
|
+
console.error(
|
|
133
|
+
"Error while making Idfy makeAxiosRequest API request:",
|
|
134
|
+
error
|
|
135
|
+
);
|
|
136
|
+
throw error;
|
|
137
|
+
}
|
|
171
138
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
reject(res);
|
|
184
|
-
}
|
|
185
|
-
resolve(data);
|
|
186
|
-
}, 1000);
|
|
187
|
-
} catch (e) {
|
|
188
|
-
reject(e);
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
};
|
|
192
|
-
do {
|
|
193
|
-
res = await checkTaskAfter1sec(requestId);
|
|
194
|
-
|
|
195
|
-
console.log("### res ", res);
|
|
196
|
-
} while (res?.[0].status !== "completed");
|
|
197
|
-
|
|
198
|
-
return res;
|
|
199
|
-
} catch (error) {
|
|
200
|
-
console.error("Error while fetching Idfy getTask API data:", error);
|
|
201
|
-
throw error;
|
|
139
|
+
|
|
140
|
+
private async getTask(requestId: string): Promise<any> {
|
|
141
|
+
try {
|
|
142
|
+
// const data = {}
|
|
143
|
+
const urlEndPoint = this.taskUrl + requestId;
|
|
144
|
+
const response = await this.makeRequest<any>("get", urlEndPoint);
|
|
145
|
+
return response;
|
|
146
|
+
} catch (error) {
|
|
147
|
+
console.error("Error while fetching Idfy getTask API data:", error);
|
|
148
|
+
throw error;
|
|
149
|
+
}
|
|
202
150
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
};
|
|
227
|
-
do {
|
|
228
|
-
res = await checkTaskAfter1sec(requestId);
|
|
229
|
-
console.log("### res ", res);
|
|
230
|
-
} while (res?.status !== "completed");
|
|
231
|
-
|
|
232
|
-
return res;
|
|
233
|
-
} catch (error) {
|
|
234
|
-
console.error("Error while fetching Idfy getTask API data:", error);
|
|
235
|
-
throw error;
|
|
151
|
+
|
|
152
|
+
private async getCompanySearchTask({
|
|
153
|
+
requestId,
|
|
154
|
+
}: {
|
|
155
|
+
requestId: string;
|
|
156
|
+
}): Promise<any> {
|
|
157
|
+
try {
|
|
158
|
+
const taskBaseUrl = this.idfyCompanySearch.taskBaseUrl + requestId;
|
|
159
|
+
const response = await this.makeAxiosRequest({
|
|
160
|
+
method: "get",
|
|
161
|
+
url: taskBaseUrl,
|
|
162
|
+
headers: this.idfyCompanySearch.defaultHeader,
|
|
163
|
+
});
|
|
164
|
+
return response;
|
|
165
|
+
} catch (error) {
|
|
166
|
+
console.error(
|
|
167
|
+
"Error while fetching Idfy getCompanySearchTask API data:",
|
|
168
|
+
error
|
|
169
|
+
);
|
|
170
|
+
throw error;
|
|
171
|
+
}
|
|
236
172
|
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
173
|
+
|
|
174
|
+
private async pingTaskUntilSuccess(requestId: string): Promise<any> {
|
|
175
|
+
try {
|
|
176
|
+
let res: any = null;
|
|
177
|
+
const checkTaskAfter1sec = (requestId: any) => {
|
|
178
|
+
return new Promise<any>((resolve, reject) => {
|
|
179
|
+
try {
|
|
180
|
+
setTimeout(async () => {
|
|
181
|
+
const data = await this.getTask(requestId);
|
|
182
|
+
if (res?.[0].status == "failed") {
|
|
183
|
+
reject(res);
|
|
184
|
+
}
|
|
185
|
+
resolve(data);
|
|
186
|
+
}, 1000);
|
|
187
|
+
} catch (e) {
|
|
188
|
+
reject(e);
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
do {
|
|
193
|
+
res = await checkTaskAfter1sec(requestId);
|
|
194
|
+
|
|
195
|
+
console.log("### res ", res);
|
|
196
|
+
} while (res?.[0].status !== "completed");
|
|
197
|
+
|
|
198
|
+
return res;
|
|
199
|
+
} catch (error) {
|
|
200
|
+
console.error("Error while fetching Idfy getTask API data:", error);
|
|
201
|
+
throw error;
|
|
202
|
+
}
|
|
264
203
|
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
204
|
+
|
|
205
|
+
private async pingCompanySearchTaskUntilSuccess(
|
|
206
|
+
requestId: string
|
|
207
|
+
): Promise<any> {
|
|
208
|
+
try {
|
|
209
|
+
console.log(" ## requestId ", requestId);
|
|
210
|
+
let res: any = null;
|
|
211
|
+
const checkTaskAfter1sec = (requestId: string) => {
|
|
212
|
+
return new Promise<any>((resolve, reject) => {
|
|
213
|
+
try {
|
|
214
|
+
setTimeout(async () => {
|
|
215
|
+
const data = await this.getCompanySearchTask({
|
|
216
|
+
requestId,
|
|
217
|
+
});
|
|
218
|
+
if (data.status != "failed") {
|
|
219
|
+
resolve(data);
|
|
220
|
+
} else {
|
|
221
|
+
reject(res);
|
|
222
|
+
}
|
|
223
|
+
}, 1000);
|
|
224
|
+
} catch (e) {
|
|
225
|
+
reject(e);
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
};
|
|
229
|
+
do {
|
|
230
|
+
res = await checkTaskAfter1sec(requestId);
|
|
231
|
+
console.log("### res ", res);
|
|
232
|
+
} while (res?.status !== "completed");
|
|
233
|
+
|
|
234
|
+
return res;
|
|
235
|
+
} catch (error) {
|
|
236
|
+
console.error("Error while fetching Idfy getTask API data:", error);
|
|
237
|
+
throw error;
|
|
238
|
+
}
|
|
293
239
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
240
|
+
async getCompanyGstInfo({ gstNo }: { gstNo: string }): Promise<any> {
|
|
241
|
+
try {
|
|
242
|
+
const data = {
|
|
243
|
+
...this.bodyTaskIdGroupId,
|
|
244
|
+
data: {
|
|
245
|
+
gstin: gstNo,
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
const response = await this.makeRequest<any>(
|
|
249
|
+
"post",
|
|
250
|
+
this.gstVerificationEndPoint,
|
|
251
|
+
data
|
|
252
|
+
);
|
|
253
|
+
return response;
|
|
254
|
+
} catch (error: any) {
|
|
255
|
+
if (error?.response?.data?.error) {
|
|
256
|
+
let obj = this.idfyError;
|
|
257
|
+
const errorObj =
|
|
258
|
+
obj[error?.response?.data?.error as keyof typeof obj];
|
|
259
|
+
if (errorObj)
|
|
260
|
+
throw {
|
|
261
|
+
...this.standardErrorThrowFormat,
|
|
262
|
+
message: [errorObj.message],
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
throw error;
|
|
267
|
+
}
|
|
322
268
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
let obj = this.idfyError;
|
|
355
|
-
const errorObj = obj[error?.response?.data?.error as keyof typeof obj];
|
|
356
|
-
if (errorObj)
|
|
357
|
-
throw {
|
|
358
|
-
...this.standardErrorThrowFormat,
|
|
359
|
-
message: [errorObj.message],
|
|
360
|
-
};
|
|
361
|
-
}
|
|
362
|
-
throw error;
|
|
269
|
+
async getCompanyCINInfo({ cinNo }: { cinNo: string }): Promise<any> {
|
|
270
|
+
try {
|
|
271
|
+
const data = {
|
|
272
|
+
...this.bodyTaskIdGroupId,
|
|
273
|
+
data: {
|
|
274
|
+
cin: cinNo,
|
|
275
|
+
},
|
|
276
|
+
};
|
|
277
|
+
const response = await this.makeRequest<any>(
|
|
278
|
+
"post",
|
|
279
|
+
this.cinCompanyVerificationEndPoint,
|
|
280
|
+
data
|
|
281
|
+
);
|
|
282
|
+
const successData = await this.pingTaskUntilSuccess(
|
|
283
|
+
response.request_id
|
|
284
|
+
);
|
|
285
|
+
|
|
286
|
+
return successData?.[0]?.result?.source_output;
|
|
287
|
+
} catch (error: any) {
|
|
288
|
+
if (error?.response?.data?.error) {
|
|
289
|
+
let obj = this.idfyError;
|
|
290
|
+
const errorObj =
|
|
291
|
+
obj[error?.response?.data?.error as keyof typeof obj];
|
|
292
|
+
if (errorObj)
|
|
293
|
+
throw {
|
|
294
|
+
...this.standardErrorThrowFormat,
|
|
295
|
+
message: [errorObj.message],
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
throw error;
|
|
299
|
+
}
|
|
363
300
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
}
|
|
396
|
-
throw error;
|
|
301
|
+
async getIndividualPANInfo({ panNo }: { panNo: string }): Promise<any> {
|
|
302
|
+
try {
|
|
303
|
+
const data = {
|
|
304
|
+
...this.bodyTaskIdGroupId,
|
|
305
|
+
data: {
|
|
306
|
+
id_number: panNo,
|
|
307
|
+
},
|
|
308
|
+
};
|
|
309
|
+
const response = await this.makeRequest<any>(
|
|
310
|
+
"post",
|
|
311
|
+
this.panIndividualVerificationEndPoint,
|
|
312
|
+
data
|
|
313
|
+
);
|
|
314
|
+
const successData = await this.pingTaskUntilSuccess(
|
|
315
|
+
response.request_id
|
|
316
|
+
);
|
|
317
|
+
|
|
318
|
+
return successData;
|
|
319
|
+
} catch (error: any) {
|
|
320
|
+
if (error?.response?.data?.error) {
|
|
321
|
+
let obj = this.idfyError;
|
|
322
|
+
const errorObj =
|
|
323
|
+
obj[error?.response?.data?.error as keyof typeof obj];
|
|
324
|
+
if (errorObj)
|
|
325
|
+
throw {
|
|
326
|
+
...this.standardErrorThrowFormat,
|
|
327
|
+
message: [errorObj.message],
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
throw error;
|
|
331
|
+
}
|
|
397
332
|
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
333
|
+
|
|
334
|
+
async getSyncIndividualAadharScanInfo({
|
|
335
|
+
frontScanBase64,
|
|
336
|
+
backScanBase64,
|
|
337
|
+
}: {
|
|
338
|
+
frontScanBase64: string;
|
|
339
|
+
backScanBase64: string;
|
|
340
|
+
}): Promise<any> {
|
|
341
|
+
try {
|
|
342
|
+
const data = {
|
|
343
|
+
...this.bodyTaskIdGroupId,
|
|
344
|
+
data: {
|
|
345
|
+
document1: frontScanBase64,
|
|
346
|
+
document2: backScanBase64,
|
|
347
|
+
consent: "yes",
|
|
348
|
+
advanced_details: {
|
|
349
|
+
extract_qr_info: true,
|
|
350
|
+
extract_last_4_digit: false,
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
};
|
|
354
|
+
const response = await this.makeRequest<any>(
|
|
355
|
+
"post",
|
|
356
|
+
this.syncIndividualAadharScanInfoEndpoint,
|
|
357
|
+
data
|
|
358
|
+
);
|
|
359
|
+
|
|
360
|
+
return response?.result;
|
|
361
|
+
} catch (error: any) {
|
|
362
|
+
if (error?.response?.data?.error) {
|
|
363
|
+
let obj = this.idfyError;
|
|
364
|
+
const errorObj =
|
|
365
|
+
obj[error?.response?.data?.error as keyof typeof obj];
|
|
366
|
+
if (errorObj)
|
|
367
|
+
throw {
|
|
368
|
+
...this.standardErrorThrowFormat,
|
|
369
|
+
message: [errorObj.message],
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
throw error;
|
|
373
|
+
}
|
|
430
374
|
}
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
375
|
+
|
|
376
|
+
async getSyncIndividualPANScanInfo({
|
|
377
|
+
frontScanBase64,
|
|
378
|
+
}: {
|
|
379
|
+
frontScanBase64: string;
|
|
380
|
+
}): Promise<any> {
|
|
381
|
+
try {
|
|
382
|
+
const data = {
|
|
383
|
+
...this.bodyTaskIdGroupId,
|
|
384
|
+
data: {
|
|
385
|
+
document1: frontScanBase64,
|
|
386
|
+
consent: "yes",
|
|
387
|
+
},
|
|
388
|
+
};
|
|
389
|
+
const response = await this.makeRequest<any>(
|
|
390
|
+
"post",
|
|
391
|
+
this.syncIndividualPANScanInfoEndpoint,
|
|
392
|
+
data
|
|
393
|
+
);
|
|
394
|
+
|
|
395
|
+
return response?.result;
|
|
396
|
+
} catch (error: any) {
|
|
397
|
+
if (error?.response?.data?.error) {
|
|
398
|
+
let obj = this.idfyError;
|
|
399
|
+
const errorObj =
|
|
400
|
+
obj[error?.response?.data?.error as keyof typeof obj];
|
|
401
|
+
if (errorObj)
|
|
402
|
+
throw {
|
|
403
|
+
...this.standardErrorThrowFormat,
|
|
404
|
+
message: [errorObj.message],
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
throw error;
|
|
408
|
+
}
|
|
464
409
|
}
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
410
|
+
|
|
411
|
+
async getSyncCompanyGSTScanInfo({
|
|
412
|
+
frontScanBase64,
|
|
413
|
+
}: {
|
|
414
|
+
frontScanBase64: string;
|
|
415
|
+
}): Promise<any> {
|
|
416
|
+
try {
|
|
417
|
+
const data = {
|
|
418
|
+
...this.bodyTaskIdGroupId,
|
|
419
|
+
data: {
|
|
420
|
+
document1: frontScanBase64,
|
|
421
|
+
},
|
|
422
|
+
};
|
|
423
|
+
const response = await this.makeRequest<any>(
|
|
424
|
+
"post",
|
|
425
|
+
this.syncIndividualGSTScanInfoEndpoint,
|
|
426
|
+
data
|
|
427
|
+
);
|
|
428
|
+
|
|
429
|
+
return response?.result;
|
|
430
|
+
} catch (error: any) {
|
|
431
|
+
if (error?.response?.data?.error) {
|
|
432
|
+
let obj = this.idfyError;
|
|
433
|
+
const errorObj =
|
|
434
|
+
obj[error?.response?.data?.error as keyof typeof obj];
|
|
435
|
+
if (errorObj)
|
|
436
|
+
throw {
|
|
437
|
+
...this.standardErrorThrowFormat,
|
|
438
|
+
message: [errorObj.message],
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
throw error;
|
|
442
|
+
}
|
|
498
443
|
}
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
444
|
+
|
|
445
|
+
async getSyncIndividualLivenessSelfyScanInfo({
|
|
446
|
+
faceScanBase64,
|
|
447
|
+
}: {
|
|
448
|
+
faceScanBase64: string;
|
|
449
|
+
}): Promise<any> {
|
|
450
|
+
try {
|
|
451
|
+
const data = {
|
|
452
|
+
...this.bodyTaskIdGroupId,
|
|
453
|
+
data: {
|
|
454
|
+
document1: faceScanBase64,
|
|
455
|
+
consent: "yes",
|
|
456
|
+
},
|
|
457
|
+
};
|
|
458
|
+
const response = await this.makeRequest<any>(
|
|
459
|
+
"post",
|
|
460
|
+
this.syncIndividualLiveFaceLivenessEndpoint,
|
|
461
|
+
data
|
|
462
|
+
);
|
|
463
|
+
|
|
464
|
+
return response?.result;
|
|
465
|
+
} catch (error: any) {
|
|
466
|
+
if (error?.response?.data?.error) {
|
|
467
|
+
let obj = this.idfyError;
|
|
468
|
+
const errorObj =
|
|
469
|
+
obj[error?.response?.data?.error as keyof typeof obj];
|
|
470
|
+
if (errorObj)
|
|
471
|
+
throw {
|
|
472
|
+
...this.standardErrorThrowFormat,
|
|
473
|
+
message: [errorObj.message],
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
throw error;
|
|
477
|
+
}
|
|
527
478
|
}
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
479
|
+
|
|
480
|
+
async getAsyncAadhaarLiteInfo({
|
|
481
|
+
aadhaarNo,
|
|
482
|
+
}: {
|
|
483
|
+
aadhaarNo: string;
|
|
484
|
+
}): Promise<any> {
|
|
485
|
+
try {
|
|
486
|
+
const data = {
|
|
487
|
+
...this.bodyTaskIdGroupId,
|
|
488
|
+
data: {
|
|
489
|
+
aadhaar_number: aadhaarNo,
|
|
490
|
+
},
|
|
491
|
+
};
|
|
492
|
+
const response = await this.makeRequest<any>(
|
|
493
|
+
"post",
|
|
494
|
+
this.asyncIndividualAadhaarLiteInfoEndPoint,
|
|
495
|
+
data
|
|
496
|
+
);
|
|
497
|
+
const successData = await this.pingTaskUntilSuccess(
|
|
498
|
+
response.request_id
|
|
499
|
+
);
|
|
500
|
+
|
|
501
|
+
return successData;
|
|
502
|
+
} catch (error: any) {
|
|
503
|
+
if (error?.response?.data?.error) {
|
|
504
|
+
let obj = this.idfyError;
|
|
505
|
+
const errorObj =
|
|
506
|
+
obj[error?.response?.data?.error as keyof typeof obj];
|
|
507
|
+
if (errorObj)
|
|
508
|
+
throw {
|
|
509
|
+
...this.standardErrorThrowFormat,
|
|
510
|
+
message: [errorObj.message],
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
throw error;
|
|
514
|
+
}
|
|
552
515
|
}
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
matchScore: response[0].result.match_score,
|
|
582
|
-
};
|
|
583
|
-
} else {
|
|
584
|
-
return response;
|
|
585
|
-
}
|
|
586
|
-
} catch (error: any) {
|
|
587
|
-
if (error?.response?.data?.error) {
|
|
588
|
-
let obj = this.idfyError;
|
|
589
|
-
const errorObj = obj[error?.response?.data?.error as keyof typeof obj];
|
|
590
|
-
if (errorObj)
|
|
591
|
-
throw {
|
|
592
|
-
...this.standardErrorThrowFormat,
|
|
593
|
-
message: [errorObj.message],
|
|
594
|
-
};
|
|
595
|
-
}
|
|
596
|
-
throw error;
|
|
516
|
+
|
|
517
|
+
async getCompanyDetailsByName({
|
|
518
|
+
legalName,
|
|
519
|
+
}: {
|
|
520
|
+
legalName: string;
|
|
521
|
+
}): Promise<any> {
|
|
522
|
+
try {
|
|
523
|
+
const data = {
|
|
524
|
+
version: this.idfyCompanySearch.version,
|
|
525
|
+
...this.bodyTaskIdGroupId,
|
|
526
|
+
data: {
|
|
527
|
+
name: legalName,
|
|
528
|
+
},
|
|
529
|
+
};
|
|
530
|
+
const response = await this.makeAxiosRequest<any>({
|
|
531
|
+
method: "post",
|
|
532
|
+
url: this.idfyCompanySearch.companySearchUrl,
|
|
533
|
+
data,
|
|
534
|
+
headers: this.idfyCompanySearch.defaultHeader,
|
|
535
|
+
});
|
|
536
|
+
const successData = await this.pingCompanySearchTaskUntilSuccess(
|
|
537
|
+
response.request_id
|
|
538
|
+
);
|
|
539
|
+
|
|
540
|
+
return { request_id: response, successData: successData };
|
|
541
|
+
} catch (error) {
|
|
542
|
+
throw error;
|
|
543
|
+
}
|
|
597
544
|
}
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
545
|
+
|
|
546
|
+
async getCompanyDetailsByLlpinOrCin({
|
|
547
|
+
cinOrLlpin,
|
|
548
|
+
}: {
|
|
549
|
+
cinOrLlpin: string;
|
|
550
|
+
}): Promise<any> {
|
|
551
|
+
try {
|
|
552
|
+
const data = {
|
|
553
|
+
version: this.idfyCompanySearch.version,
|
|
554
|
+
...this.bodyTaskIdGroupId,
|
|
555
|
+
data: {
|
|
556
|
+
cin_llpin: cinOrLlpin,
|
|
557
|
+
},
|
|
558
|
+
};
|
|
559
|
+
const response = await this.makeAxiosRequest<any>({
|
|
560
|
+
method: "post",
|
|
561
|
+
url: this.idfyCompanySearch.cinllpinUrl,
|
|
562
|
+
data,
|
|
563
|
+
headers: this.idfyCompanySearch.defaultHeader,
|
|
564
|
+
});
|
|
565
|
+
return { response: response };
|
|
566
|
+
} catch (error) {
|
|
567
|
+
throw error;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
async getAsyncFaceComparisionInfo({
|
|
572
|
+
document1,
|
|
573
|
+
document2,
|
|
574
|
+
}: {
|
|
575
|
+
document1: string;
|
|
576
|
+
document2: string;
|
|
577
|
+
}): Promise<any> {
|
|
578
|
+
try {
|
|
579
|
+
const data = {
|
|
580
|
+
...this.bodyTaskIdGroupId,
|
|
581
|
+
data: {
|
|
582
|
+
document1: document1,
|
|
583
|
+
document2: document2,
|
|
584
|
+
consent: "yes",
|
|
585
|
+
},
|
|
586
|
+
};
|
|
587
|
+
const res = await this.makeRequest<any>(
|
|
588
|
+
"post",
|
|
589
|
+
"v3/tasks/async/compare/face",
|
|
590
|
+
data
|
|
591
|
+
);
|
|
592
|
+
const requestId = res.request_id;
|
|
593
|
+
const response = (await this.pingTaskUntilSuccess(requestId))?.[0];
|
|
594
|
+
if (response.result) {
|
|
595
|
+
return {
|
|
596
|
+
isMatch: response.result.is_a_match,
|
|
597
|
+
matchScore: response.result.match_score,
|
|
598
|
+
};
|
|
599
|
+
} else {
|
|
600
|
+
return response;
|
|
601
|
+
}
|
|
602
|
+
} catch (error: any) {
|
|
603
|
+
if (error?.response?.data?.error) {
|
|
604
|
+
let obj = this.idfyError;
|
|
605
|
+
const errorObj =
|
|
606
|
+
obj[error?.response?.data?.error as keyof typeof obj];
|
|
607
|
+
if (errorObj)
|
|
608
|
+
throw {
|
|
609
|
+
...this.standardErrorThrowFormat,
|
|
610
|
+
message: [errorObj.message],
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
throw error;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
async getAsyncDigilockerFetchDocument({
|
|
618
|
+
referenceId,
|
|
619
|
+
extraFields,
|
|
620
|
+
}: {
|
|
621
|
+
referenceId: string;
|
|
622
|
+
extraFields: {
|
|
623
|
+
panno: string;
|
|
624
|
+
PANFullName: string;
|
|
632
625
|
};
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
626
|
+
}): Promise<any> {
|
|
627
|
+
try {
|
|
628
|
+
const datas = {
|
|
629
|
+
...this.bodyTaskIdGroupId,
|
|
630
|
+
data: {
|
|
631
|
+
reference_id: referenceId,
|
|
632
|
+
key_id: this.key_id,
|
|
633
|
+
ou_id: this.ou_id,
|
|
634
|
+
secret: this.secret,
|
|
635
|
+
callback_url: this.callbackUrl,
|
|
636
|
+
doc_type: this.doc_type,
|
|
637
|
+
file_format: this.file_format,
|
|
638
|
+
extra_fields: extraFields,
|
|
639
|
+
},
|
|
640
|
+
};
|
|
641
|
+
const res = await this.makeRequest<any>(
|
|
642
|
+
"post",
|
|
643
|
+
this.getDigilockerDetailsEndpoint,
|
|
644
|
+
datas
|
|
645
|
+
);
|
|
646
|
+
const requestId = res.request_id;
|
|
647
|
+
const response = (await this.pingTaskUntilSuccess(requestId))?.[0];
|
|
648
|
+
if (response?.result?.source_output) {
|
|
649
|
+
return {
|
|
650
|
+
redirectUrl: response.result.source_output.redirect_url,
|
|
651
|
+
referenceId: response.result.source_output.reference_id,
|
|
652
|
+
sessionExists: response.result.source_output.session_exists,
|
|
653
|
+
status: response.result.source_output.status,
|
|
654
|
+
};
|
|
655
|
+
} else {
|
|
656
|
+
return response;
|
|
657
|
+
}
|
|
658
|
+
} catch (error: any) {
|
|
659
|
+
if (error?.response?.data?.error) {
|
|
660
|
+
let obj = this.idfyError;
|
|
661
|
+
const errorObj =
|
|
662
|
+
obj[error?.response?.data?.error as keyof typeof obj];
|
|
663
|
+
if (errorObj)
|
|
664
|
+
throw {
|
|
665
|
+
...this.standardErrorThrowFormat,
|
|
666
|
+
message: [errorObj.message],
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
throw error;
|
|
670
|
+
}
|
|
647
671
|
}
|
|
648
|
-
}
|
|
649
672
|
}
|