@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.
- package/build/app.configs.d.ts +1 -1
- package/build/app.configs.js +6 -0
- package/build/database/prisma-transaction-manager.d.ts +12 -0
- package/build/database/prisma-transaction-manager.js +89 -0
- package/build/events/Settlements-events/interfaces/settlement-created.interface.d.ts +2 -0
- package/build/events/base-events/base-event-response-publisher.js +2 -2
- package/build/events/base-events/base-events.listener.js +14 -19
- package/build/events/base-events/base-events.publisher.js +6 -6
- package/build/events/base-events/event.js +2 -1
- package/build/events/easypay-events/interfaces/recipient-webhook.interface.js +1 -1
- package/build/events/notification-events/interfaces/mailersend.interface.d.ts +0 -1
- package/build/events/subjects.d.ts +4 -4
- package/build/events/subjects.js +4 -4
- package/build/events/types/order-statu.types.js +1 -1
- package/build/helper/Two-fa-type.js +1 -1
- package/build/helper/account-balance-types.js +1 -1
- package/build/helper/account-status.js +1 -1
- package/build/helper/api-config-types.js +2 -2
- package/build/helper/bank-account-types.js +1 -1
- package/build/helper/business-category.js +2 -2
- package/build/helper/business-types.js +2 -2
- package/build/helper/bvn-validation-type.js +1 -1
- package/build/helper/card-types.js +1 -1
- package/build/helper/card_auth_type.js +1 -1
- package/build/helper/charges.js +4 -4
- package/build/helper/currency-types.js +1 -1
- package/build/helper/custom-paginate.js +4 -4
- package/build/helper/date-processing.js +3 -3
- package/build/helper/disputes.js +2 -2
- package/build/helper/encryptions.d.ts +3 -3
- package/build/helper/encryptions.js +2 -2
- package/build/helper/generate-query-params.js +1 -2
- package/build/helper/invoice.js +3 -3
- package/build/helper/keys.d.ts +0 -1
- package/build/helper/keys.js +17 -7
- package/build/helper/lang/email.js +2 -2
- package/build/helper/lang/language.js +8 -8
- package/build/helper/last-three.js +1 -2
- package/build/helper/location.js +1 -2
- package/build/helper/media-types.js +1 -1
- package/build/helper/nibss-scopes.js +1 -1
- package/build/helper/payment-options.js +2 -2
- package/build/helper/permistions.js +2 -2
- package/build/helper/plan-types.js +1 -1
- package/build/helper/refund.d.ts +2 -2
- package/build/helper/refund.js +6 -6
- package/build/helper/roles.js +3 -3
- package/build/helper/settings-types.js +5 -5
- package/build/helper/settlement.js +4 -4
- package/build/helper/status.js +2 -2
- package/build/helper/subaccount.js +1 -1
- package/build/helper/subscriptions-types.js +3 -3
- package/build/helper/success-response.js +1 -2
- package/build/helper/transaction-authentication-type.js +1 -1
- package/build/helper/transaction-type.js +4 -4
- package/build/helper/transfer.d.ts +4 -4
- package/build/helper/transfer.js +1 -1
- package/build/helper/user-types.js +1 -1
- package/build/helper/util/gender.js +1 -1
- package/build/helper/util/remove-transactionId.d.ts +2 -2
- package/build/helper/wallet-transaction.types.js +3 -3
- package/build/helper/worker-task-types.js +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/interfaces/itransaction-manager.d.ts +6 -0
- package/build/interfaces/itransaction-manager.js +3 -0
- package/build/log-activities/actions.js +1 -1
- package/build/middlewares/request-log.d.ts +1 -2
- package/build/notification/email/send.d.ts +0 -1
- package/build/notification/email/send.js +2 -2
- package/build/notification/email/types.js +1 -1
- package/build/notification/interfaces.d.ts +1 -0
- package/build/notification/sms/constants.js +1 -1
- package/build/notification/types.js +2 -2
- package/build/redis/base/index.js +1 -1
- package/build/services/Jwt.js +7 -7
- package/build/util/constants.d.ts +2 -0
- package/build/util/constants.js +5 -0
- package/package.json +5 -3
package/build/services/Jwt.js
CHANGED
|
@@ -20,13 +20,13 @@ var JWTType;
|
|
|
20
20
|
(function (JWTType) {
|
|
21
21
|
JWTType["REFRESH"] = "REFRESH";
|
|
22
22
|
JWTType["ACCESS"] = "ACCESS";
|
|
23
|
-
})(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(
|
|
29
|
-
return __awaiter(this,
|
|
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(
|
|
45
|
-
return __awaiter(this,
|
|
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(
|
|
61
|
-
return __awaiter(this,
|
|
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
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@konplit-services/common",
|
|
3
|
-
"version": "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": "^
|
|
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
|
-
"
|
|
59
|
+
"tsyringe": "^4.10.0"
|
|
58
60
|
},
|
|
59
61
|
"engines": {
|
|
60
62
|
"node": ">=22.15.1",
|