@konplit-services/common 1.4.1 → 1.6.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.
Files changed (79) hide show
  1. package/build/app.configs.d.ts +1 -1
  2. package/build/app.configs.js +6 -0
  3. package/build/database/prisma-transaction-manager.d.ts +12 -0
  4. package/build/database/prisma-transaction-manager.js +89 -0
  5. package/build/events/Settlements-events/interfaces/settlement-created.interface.d.ts +2 -0
  6. package/build/events/base-events/base-event-response-publisher.js +2 -2
  7. package/build/events/base-events/base-events.listener.js +14 -19
  8. package/build/events/base-events/base-events.publisher.js +6 -6
  9. package/build/events/base-events/event.js +2 -1
  10. package/build/events/easypay-events/interfaces/recipient-webhook.interface.js +1 -1
  11. package/build/events/notification-events/interfaces/mailersend.interface.d.ts +0 -1
  12. package/build/events/subjects.d.ts +4 -4
  13. package/build/events/subjects.js +4 -4
  14. package/build/events/types/order-statu.types.js +1 -1
  15. package/build/helper/Two-fa-type.js +1 -1
  16. package/build/helper/account-balance-types.js +1 -1
  17. package/build/helper/account-status.js +1 -1
  18. package/build/helper/api-config-types.js +2 -2
  19. package/build/helper/bank-account-types.js +1 -1
  20. package/build/helper/business-category.js +2 -2
  21. package/build/helper/business-types.js +2 -2
  22. package/build/helper/bvn-validation-type.js +1 -1
  23. package/build/helper/card-types.js +1 -1
  24. package/build/helper/card_auth_type.js +1 -1
  25. package/build/helper/charges.js +4 -4
  26. package/build/helper/currency-types.js +1 -1
  27. package/build/helper/custom-paginate.js +4 -4
  28. package/build/helper/date-processing.js +3 -3
  29. package/build/helper/disputes.js +2 -2
  30. package/build/helper/encryptions.d.ts +3 -3
  31. package/build/helper/encryptions.js +2 -2
  32. package/build/helper/generate-query-params.js +1 -2
  33. package/build/helper/invoice.js +3 -3
  34. package/build/helper/keys.d.ts +0 -1
  35. package/build/helper/keys.js +17 -7
  36. package/build/helper/lang/email.js +2 -2
  37. package/build/helper/lang/language.js +8 -8
  38. package/build/helper/last-three.js +1 -2
  39. package/build/helper/location.js +1 -2
  40. package/build/helper/media-types.js +1 -1
  41. package/build/helper/nibss-scopes.js +1 -1
  42. package/build/helper/payment-options.js +2 -2
  43. package/build/helper/permistions.js +2 -2
  44. package/build/helper/plan-types.js +1 -1
  45. package/build/helper/refund.d.ts +2 -2
  46. package/build/helper/refund.js +6 -6
  47. package/build/helper/roles.js +3 -3
  48. package/build/helper/settings-types.js +5 -5
  49. package/build/helper/settlement.js +4 -4
  50. package/build/helper/status.js +2 -2
  51. package/build/helper/subaccount.js +1 -1
  52. package/build/helper/subscriptions-types.js +3 -3
  53. package/build/helper/success-response.js +1 -2
  54. package/build/helper/transaction-authentication-type.js +1 -1
  55. package/build/helper/transaction-type.js +4 -4
  56. package/build/helper/transfer.d.ts +4 -4
  57. package/build/helper/transfer.js +1 -1
  58. package/build/helper/user-types.js +1 -1
  59. package/build/helper/util/gender.js +1 -1
  60. package/build/helper/util/remove-transactionId.d.ts +2 -2
  61. package/build/helper/wallet-transaction.types.js +3 -3
  62. package/build/helper/worker-task-types.js +1 -1
  63. package/build/index.d.ts +1 -0
  64. package/build/index.js +1 -0
  65. package/build/interfaces/itransaction-manager.d.ts +6 -0
  66. package/build/interfaces/itransaction-manager.js +3 -0
  67. package/build/log-activities/actions.js +1 -1
  68. package/build/middlewares/request-log.d.ts +1 -2
  69. package/build/notification/email/send.d.ts +0 -1
  70. package/build/notification/email/send.js +2 -2
  71. package/build/notification/email/types.js +1 -1
  72. package/build/notification/interfaces.d.ts +1 -0
  73. package/build/notification/sms/constants.js +1 -1
  74. package/build/notification/types.js +2 -2
  75. package/build/redis/base/index.js +1 -1
  76. package/build/services/Jwt.js +7 -7
  77. package/build/util/constants.d.ts +2 -0
  78. package/build/util/constants.js +5 -0
  79. package/package.json +5 -3
@@ -20,13 +20,13 @@ var JWTType;
20
20
  (function (JWTType) {
21
21
  JWTType["REFRESH"] = "REFRESH";
22
22
  JWTType["ACCESS"] = "ACCESS";
23
- })(JWTType = exports.JWTType || (exports.JWTType = {}));
23
+ })(JWTType || (exports.JWTType = JWTType = {}));
24
24
  const secret = process.env.JWT_KEY;
25
25
  const transactionSecret = process.env.TRANSACTION_JWT_KEY;
26
26
  const subscriptionSecret = process.env.SUBSCRIPTION_JWT_KEY;
27
27
  class JWT {
28
- static getToken(data, options = {}) {
29
- return __awaiter(this, void 0, void 0, function* () {
28
+ static getToken(data_1) {
29
+ return __awaiter(this, arguments, void 0, function* (data, options = {}) {
30
30
  return signAsync(data, secret, options);
31
31
  });
32
32
  }
@@ -41,8 +41,8 @@ class JWT {
41
41
  });
42
42
  });
43
43
  }
44
- static getTransactionToken(data, options = {}) {
45
- return __awaiter(this, void 0, void 0, function* () {
44
+ static getTransactionToken(data_1) {
45
+ return __awaiter(this, arguments, void 0, function* (data, options = {}) {
46
46
  return signAsync(data, transactionSecret, options);
47
47
  });
48
48
  }
@@ -57,8 +57,8 @@ class JWT {
57
57
  });
58
58
  });
59
59
  }
60
- static getSubscriptionToken(data, options = {}) {
61
- return __awaiter(this, void 0, void 0, function* () {
60
+ static getSubscriptionToken(data_1) {
61
+ return __awaiter(this, arguments, void 0, function* (data, options = {}) {
62
62
  return signAsync(data, subscriptionSecret, options);
63
63
  });
64
64
  }
@@ -0,0 +1,2 @@
1
+ export declare const PRISMA_CLIENT = "PrismaClient";
2
+ export declare const TRANSACTION_MANAGER = "TransactionManager";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TRANSACTION_MANAGER = exports.PRISMA_CLIENT = void 0;
4
+ exports.PRISMA_CLIENT = 'PrismaClient';
5
+ exports.TRANSACTION_MANAGER = 'TransactionManager';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konplit-services/common",
3
- "version": "1.4.1",
3
+ "version": "1.6.0",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -25,10 +25,11 @@
25
25
  "@semantic-release/npm": "^12.0.2",
26
26
  "@semantic-release/release-notes-generator": "^14.0.3",
27
27
  "semantic-release": "^24.2.6",
28
- "typescript": "^4.7.4"
28
+ "typescript": "^5.9.2"
29
29
  },
30
30
  "dependencies": {
31
31
  "@dinero.js/currencies": "^2.0.0-alpha.14",
32
+ "@prisma/client": "^6.13.0",
32
33
  "@types/express": "^4.17.13",
33
34
  "@types/jsonwebtoken": "^8.5.8",
34
35
  "@types/morgan": "^1.9.9",
@@ -51,10 +52,11 @@
51
52
  "node-forge": "^1.3.1",
52
53
  "node-ipinfo": "^3.5.0",
53
54
  "prom-client": "^15.1.3",
55
+ "reflect-metadata": "^0.2.2",
54
56
  "swagger-jsdoc": "^6.2.8",
55
57
  "swagger-ui-express": "^5.0.0",
56
58
  "ts-node-dev": "^2.0.0",
57
- "typescript": "^4.8.4"
59
+ "tsyringe": "^4.10.0"
58
60
  },
59
61
  "engines": {
60
62
  "node": ">=22.15.1",