aeremmiddleware 1.0.5 → 1.0.6
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.js +17 -9
- package/dist/Finance/idfy.js.map +1 -1
- package/dist/Finance/index.d.ts +6 -0
- package/dist/Finance/index.js +6 -0
- package/dist/Finance/index.js.map +1 -1
- package/dist/Finance/qbrik.d.ts +89 -0
- package/dist/Finance/qbrik.js +463 -0
- package/dist/Finance/qbrik.js.map +1 -0
- package/dist/Finance/qbrik.types.d.ts +76 -0
- package/dist/Finance/qbrik.types.js +3 -0
- package/dist/Finance/qbrik.types.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/package.json +1 -1
- package/src/Finance/idfy.ts +24 -16
- package/src/Finance/index.ts +6 -0
- package/src/Finance/qbrik.ts +760 -0
- package/src/Finance/qbrik.types.ts +81 -0
- package/dist/Socials/message.d.ts +0 -26
- package/dist/Socials/message.js +0 -212
- package/dist/Socials/message.js.map +0 -1
package/src/Finance/idfy.ts
CHANGED
|
@@ -239,11 +239,12 @@ export default class IdfyAPIWrapper {
|
|
|
239
239
|
return response;
|
|
240
240
|
} catch (error: any) {
|
|
241
241
|
if (error?.response?.data?.error) {
|
|
242
|
-
|
|
242
|
+
let obj = this.idfyError;
|
|
243
|
+
const errorObj = obj[error?.response?.data?.error as keyof typeof obj];
|
|
243
244
|
if (errorObj)
|
|
244
245
|
throw {
|
|
245
246
|
...this.standardErrorThrowFormat,
|
|
246
|
-
message:
|
|
247
|
+
message: [errorObj.message],
|
|
247
248
|
};
|
|
248
249
|
}
|
|
249
250
|
|
|
@@ -266,9 +267,10 @@ export default class IdfyAPIWrapper {
|
|
|
266
267
|
const successData = await this.pingTaskUntilSuccess(response.request_id);
|
|
267
268
|
|
|
268
269
|
return successData?.[0]?.result?.source_output;
|
|
269
|
-
} catch (error) {
|
|
270
|
+
} catch (error: any) {
|
|
270
271
|
if (error?.response?.data?.error) {
|
|
271
|
-
|
|
272
|
+
let obj = this.idfyError;
|
|
273
|
+
const errorObj = obj[error?.response?.data?.error as keyof typeof obj];
|
|
272
274
|
if (errorObj)
|
|
273
275
|
throw {
|
|
274
276
|
...this.standardErrorThrowFormat,
|
|
@@ -294,9 +296,10 @@ export default class IdfyAPIWrapper {
|
|
|
294
296
|
const successData = await this.pingTaskUntilSuccess(response.request_id);
|
|
295
297
|
|
|
296
298
|
return successData;
|
|
297
|
-
} catch (error) {
|
|
299
|
+
} catch (error: any) {
|
|
298
300
|
if (error?.response?.data?.error) {
|
|
299
|
-
|
|
301
|
+
let obj = this.idfyError;
|
|
302
|
+
const errorObj = obj[error?.response?.data?.error as keyof typeof obj];
|
|
300
303
|
if (errorObj)
|
|
301
304
|
throw {
|
|
302
305
|
...this.standardErrorThrowFormat,
|
|
@@ -334,9 +337,10 @@ export default class IdfyAPIWrapper {
|
|
|
334
337
|
);
|
|
335
338
|
|
|
336
339
|
return response?.result;
|
|
337
|
-
} catch (error) {
|
|
340
|
+
} catch (error: any) {
|
|
338
341
|
if (error?.response?.data?.error) {
|
|
339
|
-
|
|
342
|
+
let obj = this.idfyError;
|
|
343
|
+
const errorObj = obj[error?.response?.data?.error as keyof typeof obj];
|
|
340
344
|
if (errorObj)
|
|
341
345
|
throw {
|
|
342
346
|
...this.standardErrorThrowFormat,
|
|
@@ -367,9 +371,10 @@ export default class IdfyAPIWrapper {
|
|
|
367
371
|
);
|
|
368
372
|
|
|
369
373
|
return response?.result;
|
|
370
|
-
} catch (error) {
|
|
374
|
+
} catch (error: any) {
|
|
371
375
|
if (error?.response?.data?.error) {
|
|
372
|
-
|
|
376
|
+
let obj = this.idfyError;
|
|
377
|
+
const errorObj = obj[error?.response?.data?.error as keyof typeof obj];
|
|
373
378
|
if (errorObj)
|
|
374
379
|
throw {
|
|
375
380
|
...this.standardErrorThrowFormat,
|
|
@@ -399,9 +404,10 @@ export default class IdfyAPIWrapper {
|
|
|
399
404
|
);
|
|
400
405
|
|
|
401
406
|
return response?.result;
|
|
402
|
-
} catch (error) {
|
|
407
|
+
} catch (error: any) {
|
|
403
408
|
if (error?.response?.data?.error) {
|
|
404
|
-
|
|
409
|
+
let obj = this.idfyError;
|
|
410
|
+
const errorObj = obj[error?.response?.data?.error as keyof typeof obj];
|
|
405
411
|
if (errorObj)
|
|
406
412
|
throw {
|
|
407
413
|
...this.standardErrorThrowFormat,
|
|
@@ -432,9 +438,10 @@ export default class IdfyAPIWrapper {
|
|
|
432
438
|
);
|
|
433
439
|
|
|
434
440
|
return response?.result;
|
|
435
|
-
} catch (error) {
|
|
441
|
+
} catch (error: any) {
|
|
436
442
|
if (error?.response?.data?.error) {
|
|
437
|
-
|
|
443
|
+
let obj = this.idfyError;
|
|
444
|
+
const errorObj = obj[error?.response?.data?.error as keyof typeof obj];
|
|
438
445
|
if (errorObj)
|
|
439
446
|
throw {
|
|
440
447
|
...this.standardErrorThrowFormat,
|
|
@@ -465,9 +472,10 @@ export default class IdfyAPIWrapper {
|
|
|
465
472
|
const successData = await this.pingTaskUntilSuccess(response.request_id);
|
|
466
473
|
|
|
467
474
|
return successData;
|
|
468
|
-
} catch (error) {
|
|
475
|
+
} catch (error: any) {
|
|
469
476
|
if (error?.response?.data?.error) {
|
|
470
|
-
|
|
477
|
+
let obj = this.idfyError;
|
|
478
|
+
const errorObj = obj[error?.response?.data?.error as keyof typeof obj];
|
|
471
479
|
if (errorObj)
|
|
472
480
|
throw {
|
|
473
481
|
...this.standardErrorThrowFormat,
|
package/src/Finance/index.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import IdfyAPIWrapper from "./idfy";
|
|
2
2
|
import NovelApiWrapper from "./novel";
|
|
3
|
+
import IngenicoApiWrapper from "./ingenico";
|
|
4
|
+
import CrimeSearchAPIWrapper from "./crimeCheck";
|
|
5
|
+
import QbrikApiWrapper from "./qbrik";
|
|
3
6
|
|
|
4
7
|
export const finance = {
|
|
5
8
|
idFy: IdfyAPIWrapper,
|
|
6
9
|
novel: NovelApiWrapper,
|
|
10
|
+
ingenico: IngenicoApiWrapper,
|
|
11
|
+
crimecheck: CrimeSearchAPIWrapper,
|
|
12
|
+
qbrik: QbrikApiWrapper,
|
|
7
13
|
};
|