aeremmiddleware 1.0.58 → 1.0.59
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/auEncrypt.d.ts +2 -0
- package/dist/Finance/auEncrypt.js +35 -0
- package/dist/Finance/auEncrypt.js.map +1 -0
- package/dist/Finance/auFinance.d.ts +50 -0
- package/dist/Finance/auFinance.js +74 -0
- package/dist/Finance/auFinance.js.map +1 -0
- package/dist/Finance/crimeCheck.js.map +1 -1
- package/dist/Finance/encrypt.js +1 -2
- package/dist/Finance/encrypt.js.map +1 -1
- package/dist/Finance/idfy.js +67 -67
- package/dist/Finance/idfy.js.map +1 -1
- package/dist/Finance/ingenico.js.map +1 -1
- package/dist/Finance/kycKart.d.ts +172 -0
- package/dist/Finance/kycKart.js +281 -0
- package/dist/Finance/kycKart.js.map +1 -0
- package/dist/Finance/novel.d.ts +0 -1
- package/dist/Finance/novel.js.map +1 -1
- package/dist/Finance/novel.types.js +1 -1
- package/dist/Finance/novel.types.js.map +1 -1
- package/dist/Finance/qbrik.d.ts +101 -0
- package/dist/Finance/qbrik.js +507 -0
- package/dist/Finance/qbrik.js.map +1 -0
- package/dist/Finance/qbrik.types.d.ts +126 -0
- package/dist/Finance/qbrik.types.js +3 -0
- package/dist/Finance/qbrik.types.js.map +1 -0
- package/dist/Finance/razorpay.d.ts +28 -0
- package/dist/Finance/razorpay.js +68 -0
- package/dist/Finance/razorpay.js.map +1 -0
- package/dist/Finance/setu.d.ts +107 -0
- package/dist/Finance/setu.js +499 -0
- package/dist/Finance/setu.js.map +1 -0
- package/dist/Finance/setu.types.d.ts +39 -0
- package/dist/Finance/setu.types.js +3 -0
- package/dist/Finance/setu.types.js.map +1 -0
- package/dist/PushNotification/index.d.ts +4 -0
- package/dist/PushNotification/index.js +11 -0
- package/dist/PushNotification/index.js.map +1 -0
- package/dist/PushNotification/pushNotificationFCM.d.ts +3 -0
- package/dist/PushNotification/pushNotificationFCM.js +43 -0
- package/dist/PushNotification/pushNotificationFCM.js.map +1 -0
- package/dist/Socials/Sms.types.js +1 -1
- package/dist/Socials/Sms.types.js.map +1 -1
- package/dist/Socials/SmsSender.js.map +1 -1
- package/dist/Socials/Whatsapp.types.js +1 -1
- package/dist/Socials/Whatsapp.types.js.map +1 -1
- package/dist/Socials/whatsApp.js.map +1 -1
- package/dist/utils/convertToCamelcase.d.ts +1 -0
- package/dist/utils/convertToCamelcase.js +42 -0
- package/dist/utils/convertToCamelcase.js.map +1 -0
- package/package.json +19 -19
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.encrypt = encrypt;
|
|
4
|
+
exports.decrypt = decrypt;
|
|
5
|
+
const crypto_1 = require("crypto");
|
|
6
|
+
function encrypt(keyString, plaintext) {
|
|
7
|
+
const salt = Buffer.from([
|
|
8
|
+
73, 118, 97, 110, 32, 77, 101, 100, 118, 101, 100, 101, 118,
|
|
9
|
+
]);
|
|
10
|
+
const key = (0, crypto_1.pbkdf2Sync)(keyString, salt, 1000, 384, "sha1");
|
|
11
|
+
const iv = Buffer.alloc(16);
|
|
12
|
+
key.copy(iv, 0, 32, 48);
|
|
13
|
+
const cipher = (0, crypto_1.createCipheriv)("aes-256-cbc", key.slice(0, 32), iv);
|
|
14
|
+
const encrypted = Buffer.concat([
|
|
15
|
+
cipher.update(plaintext, "utf16le"),
|
|
16
|
+
cipher.final(),
|
|
17
|
+
]);
|
|
18
|
+
return encrypted.toString("base64");
|
|
19
|
+
}
|
|
20
|
+
function decrypt(keyString, encryptedData) {
|
|
21
|
+
const salt = Buffer.from([
|
|
22
|
+
73, 118, 97, 110, 32, 77, 101, 100, 118, 101, 100, 101, 118,
|
|
23
|
+
]);
|
|
24
|
+
const key = (0, crypto_1.pbkdf2Sync)(keyString, salt, 1000, 384, "sha1");
|
|
25
|
+
const iv = Buffer.alloc(16);
|
|
26
|
+
key.copy(iv, 0, 32, 48);
|
|
27
|
+
const encryptedText = Buffer.from(encryptedData, "base64");
|
|
28
|
+
const decipher = (0, crypto_1.createDecipheriv)("aes-256-cbc", key.slice(0, 32), iv);
|
|
29
|
+
const decrypted = Buffer.concat([
|
|
30
|
+
decipher.update(encryptedText),
|
|
31
|
+
decipher.final(),
|
|
32
|
+
]);
|
|
33
|
+
return decrypted.toString("utf16le");
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=auEncrypt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auEncrypt.js","sourceRoot":"","sources":["../../src/Finance/auEncrypt.ts"],"names":[],"mappings":";;AAEA,0BAaC;AAED,0BAcC;AA/BD,mCAAsE;AAEtE,SAAgB,OAAO,CAAC,SAAiB,EAAE,SAAiB;IAC1D,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACvB,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;KAC5D,CAAC,CAAC;IACH,MAAM,GAAG,GAAG,IAAA,mBAAU,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;IAC3D,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC5B,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACxB,MAAM,MAAM,GAAG,IAAA,uBAAc,EAAC,aAAa,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACnE,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;QAC9B,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC;QACnC,MAAM,CAAC,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7
|
+
mbCustFonCellNum: string;
|
|
8
|
+
mbSvcProviderCode: string;
|
|
9
|
+
mbSponserBankCode: string;
|
|
10
|
+
mbFrequencyType: string;
|
|
11
|
+
requestId: string;
|
|
12
|
+
mbCustName: string;
|
|
13
|
+
mbRefNumber: string;
|
|
14
|
+
mbMandateCategory: string;
|
|
15
|
+
mbDRAccountNumber: string;
|
|
16
|
+
mbMandateType: string;
|
|
17
|
+
mbDateTo: string;
|
|
18
|
+
mbRelRefNumber: string;
|
|
19
|
+
mbCustFonLandNum: string;
|
|
20
|
+
mbDRBankCode: string;
|
|
21
|
+
mbAmount: string;
|
|
22
|
+
mbPaymentType: string;
|
|
23
|
+
responseURL: string;
|
|
24
|
+
mbDRAccountType: string;
|
|
25
|
+
mbFrequencyCode: string;
|
|
26
|
+
mbFixedAmount: string;
|
|
27
|
+
referenceCode: string;
|
|
28
|
+
mbCustPAN: string;
|
|
29
|
+
username: string;
|
|
30
|
+
}
|
|
31
|
+
declare class AuFinanceApiWrapper {
|
|
32
|
+
private isUAT;
|
|
33
|
+
private enachEndpoint;
|
|
34
|
+
private baseUrl;
|
|
35
|
+
private encryptionKey;
|
|
36
|
+
private authEndpoint;
|
|
37
|
+
private emandateWithUserConfirmationEndpoint;
|
|
38
|
+
private emandateWithoutUserConfirmationEndpoint;
|
|
39
|
+
constructor(isUAT: boolean);
|
|
40
|
+
getAccessToken({ clientId, clientSecret, }: {
|
|
41
|
+
clientId: string;
|
|
42
|
+
clientSecret: string;
|
|
43
|
+
}): Promise<AxiosResponse>;
|
|
44
|
+
auEmandate({ requireUserConsent, accessToken, jsonData, }: {
|
|
45
|
+
requireUserConsent: boolean;
|
|
46
|
+
accessToken: string;
|
|
47
|
+
jsonData: PayloadType;
|
|
48
|
+
}): Promise<any>;
|
|
49
|
+
}
|
|
50
|
+
export default AuFinanceApiWrapper;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const axios_1 = __importDefault(require("axios"));
|
|
16
|
+
const auEncrypt_1 = require("./auEncrypt");
|
|
17
|
+
class AuFinanceApiWrapper {
|
|
18
|
+
constructor(isUAT) {
|
|
19
|
+
this.authEndpoint = "/oauth/accesstoken?grant_type=client_credentials";
|
|
20
|
+
this.emandateWithUserConfirmationEndpoint = "/EmandateUserRegistrationRestService/userconfirmation";
|
|
21
|
+
this.emandateWithoutUserConfirmationEndpoint = "/EmandateUserRegistrationRestService/withoutUserConfirmation";
|
|
22
|
+
this.isUAT = isUAT;
|
|
23
|
+
this.baseUrl = this.isUAT
|
|
24
|
+
? "https://api.aubankuat.in"
|
|
25
|
+
: "https://api.aubank.in";
|
|
26
|
+
this.encryptionKey = this.isUAT
|
|
27
|
+
? "545932040048E8B4FAF59DCC6B20B042AE7B3DD9C282C53B6A0E66599CC01693"
|
|
28
|
+
: "4F773AF556F047DE1D379A122321BF363579FCEB04EAF5E1A47C043754DCAA9C";
|
|
29
|
+
}
|
|
30
|
+
getAccessToken(_a) {
|
|
31
|
+
return __awaiter(this, arguments, void 0, function* ({ clientId, clientSecret, }) {
|
|
32
|
+
try {
|
|
33
|
+
const authString = `${clientId}:${clientSecret}`;
|
|
34
|
+
const base64Auth = Buffer.from(authString).toString("base64");
|
|
35
|
+
const response = yield axios_1.default.get(`${this.baseUrl}${this.authEndpoint}`, {
|
|
36
|
+
headers: {
|
|
37
|
+
Authorization: `Basic ${base64Auth}`,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
return response;
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
auEmandate(_a) {
|
|
48
|
+
return __awaiter(this, arguments, void 0, function* ({ requireUserConsent, accessToken, jsonData, }) {
|
|
49
|
+
requireUserConsent
|
|
50
|
+
? (this.enachEndpoint = this.emandateWithUserConfirmationEndpoint)
|
|
51
|
+
: (this.enachEndpoint = this.emandateWithoutUserConfirmationEndpoint);
|
|
52
|
+
let jsonString = JSON.stringify(jsonData);
|
|
53
|
+
const encryptedData = (0, auEncrypt_1.encrypt)(this.encryptionKey, jsonString);
|
|
54
|
+
const headers = {
|
|
55
|
+
Authorization: `Bearer ${accessToken}`,
|
|
56
|
+
"Content-Type": "application/json",
|
|
57
|
+
};
|
|
58
|
+
const body = {
|
|
59
|
+
encvalue: encryptedData,
|
|
60
|
+
};
|
|
61
|
+
try {
|
|
62
|
+
const response = yield axios_1.default.post(`${this.baseUrl}${this.enachEndpoint}`, body, { headers: headers });
|
|
63
|
+
const res = response.data;
|
|
64
|
+
const decryptedData = (0, auEncrypt_1.decrypt)(this.encryptionKey, res);
|
|
65
|
+
return decryptedData;
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
throw error;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.default = AuFinanceApiWrapper;
|
|
74
|
+
//# sourceMappingURL=auFinance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auFinance.js","sourceRoot":"","sources":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C;oBACzC,OAAO,eAAK,CAAC;gBACf,CAAC;YACH,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;gBACvC,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;KAAA;IAEK,aAAa,CAAC,KAAa;;YAC/B,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAkB,MAAM,eAAK,CAAC,GAAG,CAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,qBAAqB,GAAG,GAAG,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,EACrE;oBACE,YAAY,EAAE,aAAa;oBAC3B,OAAO,EAAE;wBACP,cAAc,EAAE,iBAAiB;qBAClC;iBACF,CACF,CAAC;gBAEF,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;oBAClB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;oBAC5C,OAAO,QAAQ,CAAC,IAAI,CAAC;gBACvB,CAAC;qBAAM,CAAC;oBACN,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBACzC,OAAO,eAAK,CAAC;gBACf,CAAC;YACH,CAAC;YAAC,OAAO,KAAU,EAAE,CAAC;gBACpB,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;gBACvC,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;KAAA;CACF;AAED,kBAAe,qBAAqB,CAAC"}
|
package/dist/Finance/encrypt.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createSHA512Hash =
|
|
6
|
+
exports.createSHA512Hash = createSHA512Hash;
|
|
7
7
|
const crypto_1 = __importDefault(require("crypto"));
|
|
8
8
|
function createSHA512Hash(dataObject, salt) {
|
|
9
9
|
const sortedData = Object.keys(dataObject)
|
|
@@ -16,5 +16,4 @@ function createSHA512Hash(dataObject, salt) {
|
|
|
16
16
|
const hashedString = hash.digest("hex");
|
|
17
17
|
return hashedString;
|
|
18
18
|
}
|
|
19
|
-
exports.createSHA512Hash = createSHA512Hash;
|
|
20
19
|
//# sourceMappingURL=encrypt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encrypt.js","sourceRoot":"","sources":["../../src/Finance/encrypt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"encrypt.js","sourceRoot":"","sources":["../../src/Finance/encrypt.ts"],"names":[],"mappings":";;;;;AAEA,4CAeC;AAjBD,oDAA4B;AAE5B,SAAgB,gBAAgB,CAAC,UAAe,EAAE,IAAY;IAC5D,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;SACvC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;SAC7B,IAAI,CAAC,GAAG,CAAC,CAAC;IAEb,MAAM,iBAAiB,GAAG,GAAG,UAAU,IAAI,IAAI,EAAE,CAAC;IAClD,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAE/B,MAAM,IAAI,GAAG,gBAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAEzC,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;IAExC,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAExC,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
package/dist/Finance/idfy.js
CHANGED
|
@@ -88,8 +88,8 @@ class IdfyAPIWrapper {
|
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
makeAxiosRequest(
|
|
92
|
-
return __awaiter(this,
|
|
91
|
+
makeAxiosRequest(_a) {
|
|
92
|
+
return __awaiter(this, arguments, void 0, function* ({ method, url, data, headers, }) {
|
|
93
93
|
const requestConfig = {
|
|
94
94
|
method,
|
|
95
95
|
url,
|
|
@@ -119,8 +119,8 @@ class IdfyAPIWrapper {
|
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
|
-
getCompanySearchTask(
|
|
123
|
-
return __awaiter(this,
|
|
122
|
+
getCompanySearchTask(_a) {
|
|
123
|
+
return __awaiter(this, arguments, void 0, function* ({ requestId, }) {
|
|
124
124
|
try {
|
|
125
125
|
const taskBaseUrl = this.idfyCompanySearch.taskBaseUrl + requestId;
|
|
126
126
|
const response = yield this.makeAxiosRequest({
|
|
@@ -205,9 +205,9 @@ class IdfyAPIWrapper {
|
|
|
205
205
|
}
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
getCompanyGstInfo(
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
getCompanyGstInfo(_a) {
|
|
209
|
+
return __awaiter(this, arguments, void 0, function* ({ gstNo }) {
|
|
210
|
+
var _b, _c, _d, _e;
|
|
211
211
|
try {
|
|
212
212
|
const data = Object.assign(Object.assign({}, this.bodyTaskIdGroupId), { data: {
|
|
213
213
|
gstin: gstNo,
|
|
@@ -216,9 +216,9 @@ class IdfyAPIWrapper {
|
|
|
216
216
|
return response;
|
|
217
217
|
}
|
|
218
218
|
catch (error) {
|
|
219
|
-
if ((
|
|
219
|
+
if ((_c = (_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.error) {
|
|
220
220
|
let obj = this.idfyError;
|
|
221
|
-
const errorObj = obj[(
|
|
221
|
+
const errorObj = obj[(_e = (_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error];
|
|
222
222
|
if (errorObj)
|
|
223
223
|
throw Object.assign(Object.assign({}, this.standardErrorThrowFormat), { message: [errorObj.message] });
|
|
224
224
|
}
|
|
@@ -226,21 +226,21 @@ class IdfyAPIWrapper {
|
|
|
226
226
|
}
|
|
227
227
|
});
|
|
228
228
|
}
|
|
229
|
-
getCompanyCINInfo(
|
|
230
|
-
|
|
231
|
-
|
|
229
|
+
getCompanyCINInfo(_a) {
|
|
230
|
+
return __awaiter(this, arguments, void 0, function* ({ cinNo }) {
|
|
231
|
+
var _b, _c, _d, _e, _f, _g;
|
|
232
232
|
try {
|
|
233
233
|
const data = Object.assign(Object.assign({}, this.bodyTaskIdGroupId), { data: {
|
|
234
234
|
cin: cinNo,
|
|
235
235
|
} });
|
|
236
236
|
const response = yield this.makeRequest("post", this.cinCompanyVerificationEndPoint, data);
|
|
237
237
|
const successData = yield this.pingTaskUntilSuccess(response.request_id);
|
|
238
|
-
return (
|
|
238
|
+
return (_c = (_b = successData === null || successData === void 0 ? void 0 : successData[0]) === null || _b === void 0 ? void 0 : _b.result) === null || _c === void 0 ? void 0 : _c.source_output;
|
|
239
239
|
}
|
|
240
240
|
catch (error) {
|
|
241
|
-
if ((
|
|
241
|
+
if ((_e = (_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error) {
|
|
242
242
|
let obj = this.idfyError;
|
|
243
|
-
const errorObj = obj[(
|
|
243
|
+
const errorObj = obj[(_g = (_f = error === null || error === void 0 ? void 0 : error.response) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.error];
|
|
244
244
|
if (errorObj)
|
|
245
245
|
throw Object.assign(Object.assign({}, this.standardErrorThrowFormat), { message: [errorObj.message] });
|
|
246
246
|
}
|
|
@@ -248,9 +248,9 @@ class IdfyAPIWrapper {
|
|
|
248
248
|
}
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
|
-
getIndividualPANInfo(
|
|
252
|
-
|
|
253
|
-
|
|
251
|
+
getIndividualPANInfo(_a) {
|
|
252
|
+
return __awaiter(this, arguments, void 0, function* ({ panNo }) {
|
|
253
|
+
var _b, _c, _d, _e;
|
|
254
254
|
try {
|
|
255
255
|
const data = Object.assign(Object.assign({}, this.bodyTaskIdGroupId), { data: {
|
|
256
256
|
id_number: panNo,
|
|
@@ -260,9 +260,9 @@ class IdfyAPIWrapper {
|
|
|
260
260
|
return successData;
|
|
261
261
|
}
|
|
262
262
|
catch (error) {
|
|
263
|
-
if ((
|
|
263
|
+
if ((_c = (_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.error) {
|
|
264
264
|
let obj = this.idfyError;
|
|
265
|
-
const errorObj = obj[(
|
|
265
|
+
const errorObj = obj[(_e = (_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error];
|
|
266
266
|
if (errorObj)
|
|
267
267
|
throw Object.assign(Object.assign({}, this.standardErrorThrowFormat), { message: [errorObj.message] });
|
|
268
268
|
}
|
|
@@ -270,9 +270,9 @@ class IdfyAPIWrapper {
|
|
|
270
270
|
}
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
|
-
getSyncIndividualAadharScanInfo(
|
|
274
|
-
|
|
275
|
-
|
|
273
|
+
getSyncIndividualAadharScanInfo(_a) {
|
|
274
|
+
return __awaiter(this, arguments, void 0, function* ({ frontScanBase64, backScanBase64, }) {
|
|
275
|
+
var _b, _c, _d, _e;
|
|
276
276
|
try {
|
|
277
277
|
const data = Object.assign(Object.assign({}, this.bodyTaskIdGroupId), { data: {
|
|
278
278
|
document1: frontScanBase64,
|
|
@@ -287,9 +287,9 @@ class IdfyAPIWrapper {
|
|
|
287
287
|
return response === null || response === void 0 ? void 0 : response.result;
|
|
288
288
|
}
|
|
289
289
|
catch (error) {
|
|
290
|
-
if ((
|
|
290
|
+
if ((_c = (_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.error) {
|
|
291
291
|
let obj = this.idfyError;
|
|
292
|
-
const errorObj = obj[(
|
|
292
|
+
const errorObj = obj[(_e = (_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error];
|
|
293
293
|
if (errorObj)
|
|
294
294
|
throw Object.assign(Object.assign({}, this.standardErrorThrowFormat), { message: [errorObj.message] });
|
|
295
295
|
}
|
|
@@ -297,9 +297,9 @@ class IdfyAPIWrapper {
|
|
|
297
297
|
}
|
|
298
298
|
});
|
|
299
299
|
}
|
|
300
|
-
getSyncIndividualPANScanInfo(
|
|
301
|
-
|
|
302
|
-
|
|
300
|
+
getSyncIndividualPANScanInfo(_a) {
|
|
301
|
+
return __awaiter(this, arguments, void 0, function* ({ frontScanBase64, }) {
|
|
302
|
+
var _b, _c, _d, _e;
|
|
303
303
|
try {
|
|
304
304
|
const data = Object.assign(Object.assign({}, this.bodyTaskIdGroupId), { data: {
|
|
305
305
|
document1: frontScanBase64,
|
|
@@ -309,9 +309,9 @@ class IdfyAPIWrapper {
|
|
|
309
309
|
return response === null || response === void 0 ? void 0 : response.result;
|
|
310
310
|
}
|
|
311
311
|
catch (error) {
|
|
312
|
-
if ((
|
|
312
|
+
if ((_c = (_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.error) {
|
|
313
313
|
let obj = this.idfyError;
|
|
314
|
-
const errorObj = obj[(
|
|
314
|
+
const errorObj = obj[(_e = (_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error];
|
|
315
315
|
if (errorObj)
|
|
316
316
|
throw Object.assign(Object.assign({}, this.standardErrorThrowFormat), { message: [errorObj.message] });
|
|
317
317
|
}
|
|
@@ -319,9 +319,9 @@ class IdfyAPIWrapper {
|
|
|
319
319
|
}
|
|
320
320
|
});
|
|
321
321
|
}
|
|
322
|
-
getSyncCompanyGSTScanInfo(
|
|
323
|
-
|
|
324
|
-
|
|
322
|
+
getSyncCompanyGSTScanInfo(_a) {
|
|
323
|
+
return __awaiter(this, arguments, void 0, function* ({ frontScanBase64, }) {
|
|
324
|
+
var _b, _c, _d, _e;
|
|
325
325
|
try {
|
|
326
326
|
const data = Object.assign(Object.assign({}, this.bodyTaskIdGroupId), { data: {
|
|
327
327
|
document1: frontScanBase64,
|
|
@@ -330,9 +330,9 @@ class IdfyAPIWrapper {
|
|
|
330
330
|
return response === null || response === void 0 ? void 0 : response.result;
|
|
331
331
|
}
|
|
332
332
|
catch (error) {
|
|
333
|
-
if ((
|
|
333
|
+
if ((_c = (_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.error) {
|
|
334
334
|
let obj = this.idfyError;
|
|
335
|
-
const errorObj = obj[(
|
|
335
|
+
const errorObj = obj[(_e = (_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error];
|
|
336
336
|
if (errorObj)
|
|
337
337
|
throw Object.assign(Object.assign({}, this.standardErrorThrowFormat), { message: [errorObj.message] });
|
|
338
338
|
}
|
|
@@ -340,9 +340,9 @@ class IdfyAPIWrapper {
|
|
|
340
340
|
}
|
|
341
341
|
});
|
|
342
342
|
}
|
|
343
|
-
getSyncIndividualLivenessSelfyScanInfo(
|
|
344
|
-
|
|
345
|
-
|
|
343
|
+
getSyncIndividualLivenessSelfyScanInfo(_a) {
|
|
344
|
+
return __awaiter(this, arguments, void 0, function* ({ faceScanBase64, }) {
|
|
345
|
+
var _b, _c, _d, _e;
|
|
346
346
|
try {
|
|
347
347
|
const data = Object.assign(Object.assign({}, this.bodyTaskIdGroupId), { data: {
|
|
348
348
|
document1: faceScanBase64,
|
|
@@ -352,9 +352,9 @@ class IdfyAPIWrapper {
|
|
|
352
352
|
return response === null || response === void 0 ? void 0 : response.result;
|
|
353
353
|
}
|
|
354
354
|
catch (error) {
|
|
355
|
-
if ((
|
|
355
|
+
if ((_c = (_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.error) {
|
|
356
356
|
let obj = this.idfyError;
|
|
357
|
-
const errorObj = obj[(
|
|
357
|
+
const errorObj = obj[(_e = (_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error];
|
|
358
358
|
if (errorObj)
|
|
359
359
|
throw Object.assign(Object.assign({}, this.standardErrorThrowFormat), { message: [errorObj.message] });
|
|
360
360
|
}
|
|
@@ -362,9 +362,9 @@ class IdfyAPIWrapper {
|
|
|
362
362
|
}
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
|
-
getAsyncAadhaarLiteInfo(
|
|
366
|
-
|
|
367
|
-
|
|
365
|
+
getAsyncAadhaarLiteInfo(_a) {
|
|
366
|
+
return __awaiter(this, arguments, void 0, function* ({ aadhaarNo, }) {
|
|
367
|
+
var _b, _c, _d, _e;
|
|
368
368
|
try {
|
|
369
369
|
const data = Object.assign(Object.assign({}, this.bodyTaskIdGroupId), { data: {
|
|
370
370
|
aadhaar_number: aadhaarNo,
|
|
@@ -374,9 +374,9 @@ class IdfyAPIWrapper {
|
|
|
374
374
|
return successData;
|
|
375
375
|
}
|
|
376
376
|
catch (error) {
|
|
377
|
-
if ((
|
|
377
|
+
if ((_c = (_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.error) {
|
|
378
378
|
let obj = this.idfyError;
|
|
379
|
-
const errorObj = obj[(
|
|
379
|
+
const errorObj = obj[(_e = (_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.error];
|
|
380
380
|
if (errorObj)
|
|
381
381
|
throw Object.assign(Object.assign({}, this.standardErrorThrowFormat), { message: [errorObj.message] });
|
|
382
382
|
}
|
|
@@ -384,8 +384,8 @@ class IdfyAPIWrapper {
|
|
|
384
384
|
}
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
getCompanyDetailsByName(
|
|
388
|
-
return __awaiter(this,
|
|
387
|
+
getCompanyDetailsByName(_a) {
|
|
388
|
+
return __awaiter(this, arguments, void 0, function* ({ legalName, }) {
|
|
389
389
|
try {
|
|
390
390
|
const data = Object.assign(Object.assign({ version: this.idfyCompanySearch.version }, this.bodyTaskIdGroupId), { data: {
|
|
391
391
|
name: legalName,
|
|
@@ -404,8 +404,8 @@ class IdfyAPIWrapper {
|
|
|
404
404
|
}
|
|
405
405
|
});
|
|
406
406
|
}
|
|
407
|
-
getCompanyDetailsByLlpinOrCin(
|
|
408
|
-
return __awaiter(this,
|
|
407
|
+
getCompanyDetailsByLlpinOrCin(_a) {
|
|
408
|
+
return __awaiter(this, arguments, void 0, function* ({ cinOrLlpin, }) {
|
|
409
409
|
try {
|
|
410
410
|
const data = Object.assign(Object.assign({ version: this.idfyCompanySearch.version }, this.bodyTaskIdGroupId), { data: {
|
|
411
411
|
cin_llpin: cinOrLlpin,
|
|
@@ -423,9 +423,9 @@ class IdfyAPIWrapper {
|
|
|
423
423
|
}
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
|
-
getAsyncFaceComparisionInfo(
|
|
427
|
-
|
|
428
|
-
|
|
426
|
+
getAsyncFaceComparisionInfo(_a) {
|
|
427
|
+
return __awaiter(this, arguments, void 0, function* ({ document1, document2, }) {
|
|
428
|
+
var _b, _c, _d, _e, _f;
|
|
429
429
|
try {
|
|
430
430
|
const data = {
|
|
431
431
|
task_id: "74f4c926-250c-43hca-9c53-453e87ceacd1",
|
|
@@ -438,7 +438,7 @@ class IdfyAPIWrapper {
|
|
|
438
438
|
};
|
|
439
439
|
const res = yield this.makeRequest("post", "v3/tasks/async/compare/face", data);
|
|
440
440
|
const requestId = res.request_id;
|
|
441
|
-
const response = (
|
|
441
|
+
const response = (_b = (yield this.pingTaskUntilSuccess(requestId))) === null || _b === void 0 ? void 0 : _b[0];
|
|
442
442
|
if (response.result) {
|
|
443
443
|
return {
|
|
444
444
|
isMatch: response.result.is_a_match,
|
|
@@ -450,9 +450,9 @@ class IdfyAPIWrapper {
|
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
452
|
catch (error) {
|
|
453
|
-
if ((
|
|
453
|
+
if ((_d = (_c = error === null || error === void 0 ? void 0 : error.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.error) {
|
|
454
454
|
let obj = this.idfyError;
|
|
455
|
-
const errorObj = obj[(
|
|
455
|
+
const errorObj = obj[(_f = (_e = error === null || error === void 0 ? void 0 : error.response) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.error];
|
|
456
456
|
if (errorObj)
|
|
457
457
|
throw Object.assign(Object.assign({}, this.standardErrorThrowFormat), { message: [errorObj.message] });
|
|
458
458
|
}
|
|
@@ -460,9 +460,9 @@ class IdfyAPIWrapper {
|
|
|
460
460
|
}
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
|
-
getAsyncDigilockerFetchDocument(
|
|
464
|
-
|
|
465
|
-
|
|
463
|
+
getAsyncDigilockerFetchDocument(_a) {
|
|
464
|
+
return __awaiter(this, arguments, void 0, function* ({ referenceId, extraFields, keyId, ouId, secret, }) {
|
|
465
|
+
var _b, _c, _d, _e, _f;
|
|
466
466
|
try {
|
|
467
467
|
console.log("key_id", keyId);
|
|
468
468
|
console.log("ou_id", ouId);
|
|
@@ -483,7 +483,7 @@ class IdfyAPIWrapper {
|
|
|
483
483
|
};
|
|
484
484
|
const res = yield this.makeRequest("post", this.getDigilockerDetailsEndpoint, datas);
|
|
485
485
|
const requestId = res.request_id;
|
|
486
|
-
const response = (
|
|
486
|
+
const response = (_b = (yield this.pingTaskUntilSuccess(requestId))) === null || _b === void 0 ? void 0 : _b[0];
|
|
487
487
|
if (response.result.source_output) {
|
|
488
488
|
return {
|
|
489
489
|
redirectUrl: response.result.source_output.redirect_url,
|
|
@@ -497,9 +497,9 @@ class IdfyAPIWrapper {
|
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
catch (error) {
|
|
500
|
-
if ((
|
|
500
|
+
if ((_d = (_c = error === null || error === void 0 ? void 0 : error.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.error) {
|
|
501
501
|
let obj = this.idfyError;
|
|
502
|
-
const errorObj = obj[(
|
|
502
|
+
const errorObj = obj[(_f = (_e = error === null || error === void 0 ? void 0 : error.response) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.error];
|
|
503
503
|
if (errorObj)
|
|
504
504
|
throw Object.assign(Object.assign({}, this.standardErrorThrowFormat), { message: [errorObj.message] });
|
|
505
505
|
}
|
|
@@ -507,9 +507,9 @@ class IdfyAPIWrapper {
|
|
|
507
507
|
}
|
|
508
508
|
});
|
|
509
509
|
}
|
|
510
|
-
getUdhyamDetails(
|
|
511
|
-
|
|
512
|
-
|
|
510
|
+
getUdhyamDetails(_a) {
|
|
511
|
+
return __awaiter(this, arguments, void 0, function* ({ uamNumber }) {
|
|
512
|
+
var _b, _c, _d, _e, _f;
|
|
513
513
|
try {
|
|
514
514
|
const data = {
|
|
515
515
|
task_id: "74f4c926-250c-43hca-9c53-453e87ceacd1",
|
|
@@ -520,13 +520,13 @@ class IdfyAPIWrapper {
|
|
|
520
520
|
};
|
|
521
521
|
const res = yield this.makeRequest("post", this.getUdhyamEndpoint, data);
|
|
522
522
|
const requestId = res.request_id;
|
|
523
|
-
const response = (
|
|
523
|
+
const response = (_b = (yield this.pingTaskUntilSuccess(requestId))) === null || _b === void 0 ? void 0 : _b[0];
|
|
524
524
|
return (0, convertToCamelcase_1.convertToCamelCase)(response);
|
|
525
525
|
}
|
|
526
526
|
catch (error) {
|
|
527
|
-
if ((
|
|
527
|
+
if ((_d = (_c = error === null || error === void 0 ? void 0 : error.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.error) {
|
|
528
528
|
let obj = this.idfyError;
|
|
529
|
-
const errorObj = obj[(
|
|
529
|
+
const errorObj = obj[(_f = (_e = error === null || error === void 0 ? void 0 : error.response) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.error];
|
|
530
530
|
if (errorObj)
|
|
531
531
|
throw Object.assign(Object.assign({}, this.standardErrorThrowFormat), { message: [errorObj.message] });
|
|
532
532
|
}
|