@felloh-org/lambda-wrapper 1.11.89 → 1.11.91

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.
@@ -15,7 +15,9 @@ var _disbursal = _interopRequireDefault(require("../../bank/disbursal"));
15
15
 
16
16
  var _booking = _interopRequireDefault(require("../../agent-data/booking"));
17
17
 
18
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16;
18
+ var _batch = _interopRequireDefault(require("../../acquirer/batch"));
19
+
20
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16, _descriptor17;
19
21
 
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
23
 
@@ -79,6 +81,9 @@ let Transaction = exports.default = (_dec = (0, _typeorm.Entity)({
79
81
  }), _dec20 = (0, _typeorm.ManyToOne)(() => _booking.default), _dec21 = (0, _typeorm.JoinColumn)({
80
82
  name: 'booking_id',
81
83
  referencedColumnName: 'id'
84
+ }), _dec22 = (0, _typeorm.ManyToOne)(() => _batch.default), _dec23 = (0, _typeorm.JoinColumn)({
85
+ name: 'batch_id',
86
+ referencedColumnName: 'id'
82
87
  }), _dec(_class = (_class2 = class Transaction {
83
88
  constructor() {
84
89
  _initializerDefineProperty(this, "id", _descriptor, this);
@@ -112,6 +117,8 @@ let Transaction = exports.default = (_dec = (0, _typeorm.Entity)({
112
117
  _initializerDefineProperty(this, "disbursal", _descriptor15, this);
113
118
 
114
119
  _initializerDefineProperty(this, "booking", _descriptor16, this);
120
+
121
+ _initializerDefineProperty(this, "batch", _descriptor17, this);
115
122
  }
116
123
 
117
124
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
@@ -214,4 +221,11 @@ let Transaction = exports.default = (_dec = (0, _typeorm.Entity)({
214
221
  initializer: function () {
215
222
  return _booking.default;
216
223
  }
224
+ }), _descriptor17 = _applyDecoratedDescriptor(_class2.prototype, "batch", [_dec22, _dec23], {
225
+ configurable: true,
226
+ enumerable: true,
227
+ writable: true,
228
+ initializer: function () {
229
+ return _batch.default;
230
+ }
217
231
  })), _class2)) || _class);
@@ -260,6 +260,10 @@ let Transaction = exports.default = (_dec = (0, _typeorm.Entity)({
260
260
  response.ecommerce = this.ecommerce.getPublicData();
261
261
  }
262
262
 
263
+ if (this.surcharge !== null && typeof this.surcharge !== 'undefined' && typeof this.surcharge.getPublicData === 'function') {
264
+ response.surcharge = this.surcharge.getPublicData();
265
+ }
266
+
263
267
  if (this.metadata !== null) {
264
268
  response.metadata = this.metadata;
265
269
  }
@@ -50,6 +50,13 @@ let TransactionSurcharge = exports.default = (_dec = (0, _typeorm.Entity)({
50
50
  _initializerDefineProperty(this, "updated_at", _descriptor5, this);
51
51
  }
52
52
 
53
+ getPublicData() {
54
+ return {
55
+ amount: this.amount,
56
+ currency: this.currency
57
+ };
58
+ }
59
+
53
60
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "transaction", [_dec2, _dec3], {
54
61
  configurable: true,
55
62
  enumerable: true,
@@ -0,0 +1,15 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class transactionBatchLink1713354543529 {
4
+ name = 'transactionBatchLink1713354543529'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "aisp"."transaction" ADD "batch_id" character varying`);
8
+ await queryRunner.query(`ALTER TABLE "aisp"."transaction" ADD CONSTRAINT "FK_28b5ba6c2707e3c245748be801d" FOREIGN KEY ("batch_id") REFERENCES "acquirer"."batch"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
9
+ }
10
+
11
+ async down(queryRunner) {
12
+ await queryRunner.query(`ALTER TABLE "aisp"."transaction" DROP CONSTRAINT "FK_28b5ba6c2707e3c245748be801d"`);
13
+ await queryRunner.query(`ALTER TABLE "aisp"."transaction" DROP COLUMN "batch_id"`);
14
+ }
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.11.89",
3
+ "version": "1.11.91",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "engines": {