aeremmiddleware 1.0.25 → 1.0.27
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 +28 -28
- package/dist/Finance/Ingenico.types.d.ts +1 -0
- package/dist/Finance/auFinance.d.ts +33 -2
- package/dist/Finance/auFinance.js +8 -3
- package/dist/Finance/auFinance.js.map +1 -1
- package/dist/Finance/index.d.ts +2 -0
- package/dist/Finance/index.js +2 -0
- package/dist/Finance/index.js.map +1 -1
- package/dist/Finance/ingenico.js +3 -6
- package/dist/Finance/ingenico.js.map +1 -1
- package/dist/Finance/ingenicoHtml.js +114 -114
- package/dist/Finance/ingenicoHtml.js.map +1 -1
- package/dist/Finance/novel.d.ts +2 -1
- package/dist/Finance/novel.js +8 -8
- 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/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/Socials/Sms.types.js +1 -1
- package/dist/Socials/Sms.types.js.map +1 -1
- package/dist/Socials/Whatsapp.types.js +1 -1
- package/dist/Socials/Whatsapp.types.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +21 -21
- package/src/Finance/Ingenico.types.ts +22 -21
- package/src/Finance/auEncrypt.ts +32 -32
- package/src/Finance/auFinance.ts +115 -75
- package/src/Finance/crimeCheck.ts +212 -212
- package/src/Finance/crimecheck.types.ts +31 -31
- package/src/Finance/encrypt.ts +18 -18
- package/src/Finance/idfy.ts +542 -542
- package/src/Finance/index.ts +16 -15
- package/src/Finance/ingenico.ts +104 -110
- package/src/Finance/ingenicoHtml.ts +119 -119
- package/src/Finance/novel.ts +233 -231
- package/src/Finance/novel.types.ts +30 -30
- package/src/Finance/qbrik.ts +828 -828
- package/src/Finance/qbrik.types.ts +131 -131
- package/src/Finance/setu.ts +560 -0
- package/src/Finance/setu.types.ts +44 -0
- package/src/PushNotification/index.ts +5 -5
- package/src/PushNotification/pushNotificationFCM.ts +37 -37
- package/src/Socials/Sms.types.ts +9 -9
- package/src/Socials/SmsSender.ts +78 -78
- package/src/Socials/Whatsapp.types.ts +95 -95
- package/src/Socials/index.ts +6 -6
- package/src/Socials/whatsApp.ts +188 -188
- package/src/index.ts +9 -9
- package/tsconfig.json +111 -111
|
@@ -1,212 +1,212 @@
|
|
|
1
|
-
import axios, { AxiosResponse } from "axios";
|
|
2
|
-
import { companyDetails, individualDetails } from "./crimecheck.types";
|
|
3
|
-
import { error } from "console";
|
|
4
|
-
|
|
5
|
-
class CrimeSearchAPIWrapper {
|
|
6
|
-
private apiKey: string;
|
|
7
|
-
private baseUrl: string = "https://crime.getupforchange.com/api/";
|
|
8
|
-
private statusCheckEndpoint = "v3/status";
|
|
9
|
-
private addReportEndpoint = "v3/addReport";
|
|
10
|
-
private downloadAsJsonEndpoint = "v3/downloadJsonReport/";
|
|
11
|
-
private downloadAsPdfEndpoint = "v3/downloadReport/";
|
|
12
|
-
|
|
13
|
-
constructor(apiKey: string) {
|
|
14
|
-
this.apiKey = apiKey;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
async checkApiStatus(): Promise<void> {
|
|
18
|
-
try {
|
|
19
|
-
const response: AxiosResponse = await axios.get(
|
|
20
|
-
this.baseUrl + this.statusCheckEndpoint,
|
|
21
|
-
{
|
|
22
|
-
headers: {
|
|
23
|
-
Authorization: this.apiKey,
|
|
24
|
-
},
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
return response.data;
|
|
29
|
-
} catch (error: any) {
|
|
30
|
-
console.error(error);
|
|
31
|
-
return error.message;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
async addCompanyReport(companyDetails: companyDetails): Promise<void> {
|
|
35
|
-
const bodyFormData = new FormData();
|
|
36
|
-
if (companyDetails) {
|
|
37
|
-
bodyFormData.append("companyName", companyDetails.companyName);
|
|
38
|
-
companyDetails.companyType
|
|
39
|
-
? bodyFormData.append("companyType", companyDetails.companyType)
|
|
40
|
-
: null;
|
|
41
|
-
companyDetails.companyAddress
|
|
42
|
-
? bodyFormData.append("companyAddress", companyDetails.companyAddress)
|
|
43
|
-
: null;
|
|
44
|
-
companyDetails.directors
|
|
45
|
-
? bodyFormData.append("directors", companyDetails.directors)
|
|
46
|
-
: null;
|
|
47
|
-
companyDetails.clientRefNo
|
|
48
|
-
? bodyFormData.append("clientRefNo", companyDetails.clientRefNo)
|
|
49
|
-
: null;
|
|
50
|
-
companyDetails.reportMode
|
|
51
|
-
? bodyFormData.append("reportMode", companyDetails.reportMode)
|
|
52
|
-
: null;
|
|
53
|
-
companyDetails.priority
|
|
54
|
-
? bodyFormData.append("priority", companyDetails.priority)
|
|
55
|
-
: null;
|
|
56
|
-
companyDetails.callbackUrl
|
|
57
|
-
? bodyFormData.append("callbackUrl", companyDetails.callbackUrl)
|
|
58
|
-
: null;
|
|
59
|
-
companyDetails.cinNumber
|
|
60
|
-
? bodyFormData.append("cinNumber", companyDetails.cinNumber)
|
|
61
|
-
: null;
|
|
62
|
-
companyDetails.gstNumber
|
|
63
|
-
? bodyFormData.append("gstNumber", companyDetails.gstNumber)
|
|
64
|
-
: null;
|
|
65
|
-
companyDetails.reqTag
|
|
66
|
-
? bodyFormData.append("reqTag", companyDetails.reqTag)
|
|
67
|
-
: null;
|
|
68
|
-
companyDetails.ticketSize
|
|
69
|
-
? bodyFormData.append("ticketSize", companyDetails.ticketSize)
|
|
70
|
-
: null;
|
|
71
|
-
companyDetails.crimewatch
|
|
72
|
-
? bodyFormData.append("crimewatch", companyDetails.crimewatch)
|
|
73
|
-
: null;
|
|
74
|
-
|
|
75
|
-
try {
|
|
76
|
-
const response: AxiosResponse = await axios.post(
|
|
77
|
-
this.baseUrl + this.addReportEndpoint,
|
|
78
|
-
bodyFormData,
|
|
79
|
-
{
|
|
80
|
-
auth: {
|
|
81
|
-
username: this.apiKey,
|
|
82
|
-
password: "",
|
|
83
|
-
},
|
|
84
|
-
headers: {
|
|
85
|
-
"Content-Type": "application/x-www-form-urlencoded",
|
|
86
|
-
},
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
|
|
90
|
-
return response.data;
|
|
91
|
-
} catch (error: any) {
|
|
92
|
-
console.error(error);
|
|
93
|
-
return error.message;
|
|
94
|
-
}
|
|
95
|
-
} else {
|
|
96
|
-
console.log("invalid details entered");
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
async addIndividualReport(
|
|
101
|
-
individualDetails: individualDetails
|
|
102
|
-
): Promise<void> {
|
|
103
|
-
const bodyFormData = new FormData();
|
|
104
|
-
if (individualDetails.name) {
|
|
105
|
-
bodyFormData.append("name", individualDetails.name);
|
|
106
|
-
individualDetails.fatherName
|
|
107
|
-
? bodyFormData.append("fatherName", individualDetails.fatherName)
|
|
108
|
-
: null;
|
|
109
|
-
individualDetails.address
|
|
110
|
-
? bodyFormData.append("address", individualDetails.address)
|
|
111
|
-
: null;
|
|
112
|
-
individualDetails.address2
|
|
113
|
-
? bodyFormData.append("address2", individualDetails.address2)
|
|
114
|
-
: null;
|
|
115
|
-
individualDetails.dob
|
|
116
|
-
? bodyFormData.append("dob", individualDetails.dob)
|
|
117
|
-
: null;
|
|
118
|
-
individualDetails.panNumber
|
|
119
|
-
? bodyFormData.append("panNumber", individualDetails.panNumber)
|
|
120
|
-
: null;
|
|
121
|
-
individualDetails.clientRefNo
|
|
122
|
-
? bodyFormData.append("clientRefNo", individualDetails.clientRefNo)
|
|
123
|
-
: null;
|
|
124
|
-
individualDetails.reportMode
|
|
125
|
-
? bodyFormData.append("reportMode", individualDetails.reportMode)
|
|
126
|
-
: null;
|
|
127
|
-
individualDetails.priority
|
|
128
|
-
? bodyFormData.append("priority", individualDetails.priority)
|
|
129
|
-
: null;
|
|
130
|
-
individualDetails.callbackUrl
|
|
131
|
-
? bodyFormData.append("callbackUrl", individualDetails.callbackUrl)
|
|
132
|
-
: null;
|
|
133
|
-
individualDetails.reqTag
|
|
134
|
-
? bodyFormData.append("reqTag", individualDetails.reqTag)
|
|
135
|
-
: null;
|
|
136
|
-
individualDetails.ticketSize
|
|
137
|
-
? bodyFormData.append("ticketSize", individualDetails.ticketSize)
|
|
138
|
-
: null;
|
|
139
|
-
individualDetails.crimewatch
|
|
140
|
-
? bodyFormData.append("crimewatch", individualDetails.crimewatch)
|
|
141
|
-
: null;
|
|
142
|
-
try {
|
|
143
|
-
const response: AxiosResponse = await axios.post(
|
|
144
|
-
this.baseUrl + this.addReportEndpoint,
|
|
145
|
-
bodyFormData,
|
|
146
|
-
{
|
|
147
|
-
auth: {
|
|
148
|
-
username: this.apiKey,
|
|
149
|
-
password: "",
|
|
150
|
-
},
|
|
151
|
-
headers: {
|
|
152
|
-
"Content-Type": "application/x-www-form-urlencoded",
|
|
153
|
-
},
|
|
154
|
-
}
|
|
155
|
-
);
|
|
156
|
-
|
|
157
|
-
return response.data;
|
|
158
|
-
} catch (error: any) {
|
|
159
|
-
console.error(error);
|
|
160
|
-
return error.message;
|
|
161
|
-
}
|
|
162
|
-
} else {
|
|
163
|
-
console.log("invalid input");
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
async downloadAsJSON(reqId: string): Promise<any> {
|
|
168
|
-
try {
|
|
169
|
-
const response: AxiosResponse = await axios.get(
|
|
170
|
-
this.baseUrl + this.downloadAsJsonEndpoint + `${reqId}/${this.apiKey}`
|
|
171
|
-
);
|
|
172
|
-
|
|
173
|
-
if (response.data) {
|
|
174
|
-
console.log("File downloaded successfully");
|
|
175
|
-
return response.data;
|
|
176
|
-
} else {
|
|
177
|
-
console.error("Failed to download file");
|
|
178
|
-
return error;
|
|
179
|
-
}
|
|
180
|
-
} catch (error: any) {
|
|
181
|
-
console.error("Error:", error.message);
|
|
182
|
-
return error;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
async downloadAsPDF(reqId: string): Promise<any> {
|
|
187
|
-
try {
|
|
188
|
-
const response: AxiosResponse = await axios.get(
|
|
189
|
-
this.baseUrl + this.downloadAsPdfEndpoint + `${reqId}/${this.apiKey}`,
|
|
190
|
-
{
|
|
191
|
-
responseType: "arraybuffer",
|
|
192
|
-
headers: {
|
|
193
|
-
"Content-Type": "application/pdf",
|
|
194
|
-
},
|
|
195
|
-
}
|
|
196
|
-
);
|
|
197
|
-
|
|
198
|
-
if (response.data) {
|
|
199
|
-
console.log("File downloaded successfully");
|
|
200
|
-
return response.data;
|
|
201
|
-
} else {
|
|
202
|
-
console.error("Failed to download file");
|
|
203
|
-
return error;
|
|
204
|
-
}
|
|
205
|
-
} catch (error: any) {
|
|
206
|
-
console.error("Error:", error.message);
|
|
207
|
-
return error;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export default CrimeSearchAPIWrapper;
|
|
1
|
+
import axios, { AxiosResponse } from "axios";
|
|
2
|
+
import { companyDetails, individualDetails } from "./crimecheck.types";
|
|
3
|
+
import { error } from "console";
|
|
4
|
+
|
|
5
|
+
class CrimeSearchAPIWrapper {
|
|
6
|
+
private apiKey: string;
|
|
7
|
+
private baseUrl: string = "https://crime.getupforchange.com/api/";
|
|
8
|
+
private statusCheckEndpoint = "v3/status";
|
|
9
|
+
private addReportEndpoint = "v3/addReport";
|
|
10
|
+
private downloadAsJsonEndpoint = "v3/downloadJsonReport/";
|
|
11
|
+
private downloadAsPdfEndpoint = "v3/downloadReport/";
|
|
12
|
+
|
|
13
|
+
constructor(apiKey: string) {
|
|
14
|
+
this.apiKey = apiKey;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async checkApiStatus(): Promise<void> {
|
|
18
|
+
try {
|
|
19
|
+
const response: AxiosResponse = await axios.get(
|
|
20
|
+
this.baseUrl + this.statusCheckEndpoint,
|
|
21
|
+
{
|
|
22
|
+
headers: {
|
|
23
|
+
Authorization: this.apiKey,
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
return response.data;
|
|
29
|
+
} catch (error: any) {
|
|
30
|
+
console.error(error);
|
|
31
|
+
return error.message;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
async addCompanyReport(companyDetails: companyDetails): Promise<void> {
|
|
35
|
+
const bodyFormData = new FormData();
|
|
36
|
+
if (companyDetails) {
|
|
37
|
+
bodyFormData.append("companyName", companyDetails.companyName);
|
|
38
|
+
companyDetails.companyType
|
|
39
|
+
? bodyFormData.append("companyType", companyDetails.companyType)
|
|
40
|
+
: null;
|
|
41
|
+
companyDetails.companyAddress
|
|
42
|
+
? bodyFormData.append("companyAddress", companyDetails.companyAddress)
|
|
43
|
+
: null;
|
|
44
|
+
companyDetails.directors
|
|
45
|
+
? bodyFormData.append("directors", companyDetails.directors)
|
|
46
|
+
: null;
|
|
47
|
+
companyDetails.clientRefNo
|
|
48
|
+
? bodyFormData.append("clientRefNo", companyDetails.clientRefNo)
|
|
49
|
+
: null;
|
|
50
|
+
companyDetails.reportMode
|
|
51
|
+
? bodyFormData.append("reportMode", companyDetails.reportMode)
|
|
52
|
+
: null;
|
|
53
|
+
companyDetails.priority
|
|
54
|
+
? bodyFormData.append("priority", companyDetails.priority)
|
|
55
|
+
: null;
|
|
56
|
+
companyDetails.callbackUrl
|
|
57
|
+
? bodyFormData.append("callbackUrl", companyDetails.callbackUrl)
|
|
58
|
+
: null;
|
|
59
|
+
companyDetails.cinNumber
|
|
60
|
+
? bodyFormData.append("cinNumber", companyDetails.cinNumber)
|
|
61
|
+
: null;
|
|
62
|
+
companyDetails.gstNumber
|
|
63
|
+
? bodyFormData.append("gstNumber", companyDetails.gstNumber)
|
|
64
|
+
: null;
|
|
65
|
+
companyDetails.reqTag
|
|
66
|
+
? bodyFormData.append("reqTag", companyDetails.reqTag)
|
|
67
|
+
: null;
|
|
68
|
+
companyDetails.ticketSize
|
|
69
|
+
? bodyFormData.append("ticketSize", companyDetails.ticketSize)
|
|
70
|
+
: null;
|
|
71
|
+
companyDetails.crimewatch
|
|
72
|
+
? bodyFormData.append("crimewatch", companyDetails.crimewatch)
|
|
73
|
+
: null;
|
|
74
|
+
|
|
75
|
+
try {
|
|
76
|
+
const response: AxiosResponse = await axios.post(
|
|
77
|
+
this.baseUrl + this.addReportEndpoint,
|
|
78
|
+
bodyFormData,
|
|
79
|
+
{
|
|
80
|
+
auth: {
|
|
81
|
+
username: this.apiKey,
|
|
82
|
+
password: "",
|
|
83
|
+
},
|
|
84
|
+
headers: {
|
|
85
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
86
|
+
},
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
return response.data;
|
|
91
|
+
} catch (error: any) {
|
|
92
|
+
console.error(error);
|
|
93
|
+
return error.message;
|
|
94
|
+
}
|
|
95
|
+
} else {
|
|
96
|
+
console.log("invalid details entered");
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
async addIndividualReport(
|
|
101
|
+
individualDetails: individualDetails
|
|
102
|
+
): Promise<void> {
|
|
103
|
+
const bodyFormData = new FormData();
|
|
104
|
+
if (individualDetails.name) {
|
|
105
|
+
bodyFormData.append("name", individualDetails.name);
|
|
106
|
+
individualDetails.fatherName
|
|
107
|
+
? bodyFormData.append("fatherName", individualDetails.fatherName)
|
|
108
|
+
: null;
|
|
109
|
+
individualDetails.address
|
|
110
|
+
? bodyFormData.append("address", individualDetails.address)
|
|
111
|
+
: null;
|
|
112
|
+
individualDetails.address2
|
|
113
|
+
? bodyFormData.append("address2", individualDetails.address2)
|
|
114
|
+
: null;
|
|
115
|
+
individualDetails.dob
|
|
116
|
+
? bodyFormData.append("dob", individualDetails.dob)
|
|
117
|
+
: null;
|
|
118
|
+
individualDetails.panNumber
|
|
119
|
+
? bodyFormData.append("panNumber", individualDetails.panNumber)
|
|
120
|
+
: null;
|
|
121
|
+
individualDetails.clientRefNo
|
|
122
|
+
? bodyFormData.append("clientRefNo", individualDetails.clientRefNo)
|
|
123
|
+
: null;
|
|
124
|
+
individualDetails.reportMode
|
|
125
|
+
? bodyFormData.append("reportMode", individualDetails.reportMode)
|
|
126
|
+
: null;
|
|
127
|
+
individualDetails.priority
|
|
128
|
+
? bodyFormData.append("priority", individualDetails.priority)
|
|
129
|
+
: null;
|
|
130
|
+
individualDetails.callbackUrl
|
|
131
|
+
? bodyFormData.append("callbackUrl", individualDetails.callbackUrl)
|
|
132
|
+
: null;
|
|
133
|
+
individualDetails.reqTag
|
|
134
|
+
? bodyFormData.append("reqTag", individualDetails.reqTag)
|
|
135
|
+
: null;
|
|
136
|
+
individualDetails.ticketSize
|
|
137
|
+
? bodyFormData.append("ticketSize", individualDetails.ticketSize)
|
|
138
|
+
: null;
|
|
139
|
+
individualDetails.crimewatch
|
|
140
|
+
? bodyFormData.append("crimewatch", individualDetails.crimewatch)
|
|
141
|
+
: null;
|
|
142
|
+
try {
|
|
143
|
+
const response: AxiosResponse = await axios.post(
|
|
144
|
+
this.baseUrl + this.addReportEndpoint,
|
|
145
|
+
bodyFormData,
|
|
146
|
+
{
|
|
147
|
+
auth: {
|
|
148
|
+
username: this.apiKey,
|
|
149
|
+
password: "",
|
|
150
|
+
},
|
|
151
|
+
headers: {
|
|
152
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
153
|
+
},
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
return response.data;
|
|
158
|
+
} catch (error: any) {
|
|
159
|
+
console.error(error);
|
|
160
|
+
return error.message;
|
|
161
|
+
}
|
|
162
|
+
} else {
|
|
163
|
+
console.log("invalid input");
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
async downloadAsJSON(reqId: string): Promise<any> {
|
|
168
|
+
try {
|
|
169
|
+
const response: AxiosResponse = await axios.get(
|
|
170
|
+
this.baseUrl + this.downloadAsJsonEndpoint + `${reqId}/${this.apiKey}`
|
|
171
|
+
);
|
|
172
|
+
|
|
173
|
+
if (response.data) {
|
|
174
|
+
console.log("File downloaded successfully");
|
|
175
|
+
return response.data;
|
|
176
|
+
} else {
|
|
177
|
+
console.error("Failed to download file");
|
|
178
|
+
return error;
|
|
179
|
+
}
|
|
180
|
+
} catch (error: any) {
|
|
181
|
+
console.error("Error:", error.message);
|
|
182
|
+
return error;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
async downloadAsPDF(reqId: string): Promise<any> {
|
|
187
|
+
try {
|
|
188
|
+
const response: AxiosResponse = await axios.get(
|
|
189
|
+
this.baseUrl + this.downloadAsPdfEndpoint + `${reqId}/${this.apiKey}`,
|
|
190
|
+
{
|
|
191
|
+
responseType: "arraybuffer",
|
|
192
|
+
headers: {
|
|
193
|
+
"Content-Type": "application/pdf",
|
|
194
|
+
},
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
|
|
198
|
+
if (response.data) {
|
|
199
|
+
console.log("File downloaded successfully");
|
|
200
|
+
return response.data;
|
|
201
|
+
} else {
|
|
202
|
+
console.error("Failed to download file");
|
|
203
|
+
return error;
|
|
204
|
+
}
|
|
205
|
+
} catch (error: any) {
|
|
206
|
+
console.error("Error:", error.message);
|
|
207
|
+
return error;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export default CrimeSearchAPIWrapper;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
export interface companyDetails {
|
|
2
|
-
companyName: string;
|
|
3
|
-
companyType?: string;
|
|
4
|
-
companyAddress?: string;
|
|
5
|
-
directors?: string;
|
|
6
|
-
clientRefNo?: string;
|
|
7
|
-
reportMode?: string;
|
|
8
|
-
priority?: string;
|
|
9
|
-
callbackUrl?: string;
|
|
10
|
-
cinNumber?: string;
|
|
11
|
-
gstNumber?: string;
|
|
12
|
-
reqTag?: string;
|
|
13
|
-
ticketSize?: string;
|
|
14
|
-
crimewatch?: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface individualDetails {
|
|
18
|
-
name: string;
|
|
19
|
-
fatherName?: string;
|
|
20
|
-
address?: string;
|
|
21
|
-
address2?: string;
|
|
22
|
-
dob?: string;
|
|
23
|
-
panNumber?: string;
|
|
24
|
-
clientRefNo?: string;
|
|
25
|
-
reportMode?: string;
|
|
26
|
-
priority?: string;
|
|
27
|
-
callbackUrl?: string;
|
|
28
|
-
reqTag?: string;
|
|
29
|
-
ticketSize?: string;
|
|
30
|
-
crimewatch?: string;
|
|
31
|
-
}
|
|
1
|
+
export interface companyDetails {
|
|
2
|
+
companyName: string;
|
|
3
|
+
companyType?: string;
|
|
4
|
+
companyAddress?: string;
|
|
5
|
+
directors?: string;
|
|
6
|
+
clientRefNo?: string;
|
|
7
|
+
reportMode?: string;
|
|
8
|
+
priority?: string;
|
|
9
|
+
callbackUrl?: string;
|
|
10
|
+
cinNumber?: string;
|
|
11
|
+
gstNumber?: string;
|
|
12
|
+
reqTag?: string;
|
|
13
|
+
ticketSize?: string;
|
|
14
|
+
crimewatch?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface individualDetails {
|
|
18
|
+
name: string;
|
|
19
|
+
fatherName?: string;
|
|
20
|
+
address?: string;
|
|
21
|
+
address2?: string;
|
|
22
|
+
dob?: string;
|
|
23
|
+
panNumber?: string;
|
|
24
|
+
clientRefNo?: string;
|
|
25
|
+
reportMode?: string;
|
|
26
|
+
priority?: string;
|
|
27
|
+
callbackUrl?: string;
|
|
28
|
+
reqTag?: string;
|
|
29
|
+
ticketSize?: string;
|
|
30
|
+
crimewatch?: string;
|
|
31
|
+
}
|
package/src/Finance/encrypt.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import crypto from "crypto";
|
|
2
|
-
|
|
3
|
-
export function createSHA512Hash(dataObject: any, salt: string) {
|
|
4
|
-
const sortedData = Object.keys(dataObject)
|
|
5
|
-
.map((key) => dataObject[key])
|
|
6
|
-
.join("|");
|
|
7
|
-
|
|
8
|
-
const pipeSeparatedData = `${sortedData}|${salt}`;
|
|
9
|
-
console.log(pipeSeparatedData);
|
|
10
|
-
|
|
11
|
-
const hash = crypto.createHash("sha512");
|
|
12
|
-
|
|
13
|
-
hash.update(pipeSeparatedData, "utf-8");
|
|
14
|
-
|
|
15
|
-
const hashedString = hash.digest("hex");
|
|
16
|
-
|
|
17
|
-
return hashedString;
|
|
18
|
-
}
|
|
1
|
+
import crypto from "crypto";
|
|
2
|
+
|
|
3
|
+
export function createSHA512Hash(dataObject: any, salt: string) {
|
|
4
|
+
const sortedData = Object.keys(dataObject)
|
|
5
|
+
.map((key) => dataObject[key])
|
|
6
|
+
.join("|");
|
|
7
|
+
|
|
8
|
+
const pipeSeparatedData = `${sortedData}|${salt}`;
|
|
9
|
+
console.log(pipeSeparatedData);
|
|
10
|
+
|
|
11
|
+
const hash = crypto.createHash("sha512");
|
|
12
|
+
|
|
13
|
+
hash.update(pipeSeparatedData, "utf-8");
|
|
14
|
+
|
|
15
|
+
const hashedString = hash.digest("hex");
|
|
16
|
+
|
|
17
|
+
return hashedString;
|
|
18
|
+
}
|