@felloh-org/lambda-wrapper 1.11.12 → 1.11.14

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.
@@ -11,7 +11,9 @@ var _paymentProvider = _interopRequireDefault(require("../../payment/payment-pro
11
11
 
12
12
  var _organisation = _interopRequireDefault(require("../../user/organisation"));
13
13
 
14
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9;
14
+ var _transactionSettlement = _interopRequireDefault(require("../transaction-settlement"));
15
+
16
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;
15
17
 
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
19
 
@@ -39,12 +41,12 @@ let Batch = (_dec = (0, _typeorm.Entity)({
39
41
  }), _dec7 = (0, _typeorm.ManyToOne)(() => _paymentProvider.default), _dec8 = (0, _typeorm.JoinColumn)({
40
42
  name: 'payment_provider_id',
41
43
  referencedColumnName: 'id'
42
- }), _dec9 = (0, _typeorm.Column)({
44
+ }), _dec9 = (0, _typeorm.OneToMany)(() => _transactionSettlement.default, transactionSettlement => transactionSettlement.batch), _dec10 = (0, _typeorm.Column)({
43
45
  type: "boolean",
44
46
  default: false
45
- }), _dec10 = (0, _typeorm.CreateDateColumn)({
47
+ }), _dec11 = (0, _typeorm.CreateDateColumn)({
46
48
  type: 'timestamp with time zone'
47
- }), _dec11 = (0, _typeorm.UpdateDateColumn)({
49
+ }), _dec12 = (0, _typeorm.UpdateDateColumn)({
48
50
  type: 'timestamp with time zone'
49
51
  }), _dec(_class = (_class2 = class Batch {
50
52
  constructor() {
@@ -60,11 +62,29 @@ let Batch = (_dec = (0, _typeorm.Entity)({
60
62
 
61
63
  _initializerDefineProperty(this, "payment_provider", _descriptor6, this);
62
64
 
63
- _initializerDefineProperty(this, "found_in_felloh_managed_trust", _descriptor7, this);
65
+ _initializerDefineProperty(this, "transaction_settlements", _descriptor7, this);
66
+
67
+ _initializerDefineProperty(this, "found_in_felloh_managed_trust", _descriptor8, this);
64
68
 
65
- _initializerDefineProperty(this, "created_at", _descriptor8, this);
69
+ _initializerDefineProperty(this, "created_at", _descriptor9, this);
70
+
71
+ _initializerDefineProperty(this, "updated_at", _descriptor10, this);
72
+ }
66
73
 
67
- _initializerDefineProperty(this, "updated_at", _descriptor9, this);
74
+ getPublicData() {
75
+ var _this$payment_provide, _this$payment_provide2;
76
+
77
+ return {
78
+ id: this.id,
79
+ bank_reference: this.bank_reference,
80
+ amount: this.amount,
81
+ posting_date: this.posting_date,
82
+ currency: this.currency,
83
+ payment_provider: {
84
+ id: (_this$payment_provide = this.payment_provider) === null || _this$payment_provide === void 0 ? void 0 : _this$payment_provide.id,
85
+ name: (_this$payment_provide2 = this.payment_provider) === null || _this$payment_provide2 === void 0 ? void 0 : _this$payment_provide2.name
86
+ }
87
+ };
68
88
  }
69
89
 
70
90
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
@@ -101,19 +121,24 @@ let Batch = (_dec = (0, _typeorm.Entity)({
101
121
  initializer: function () {
102
122
  return _paymentProvider.default;
103
123
  }
104
- }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "found_in_felloh_managed_trust", [_dec9], {
124
+ }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "transaction_settlements", [_dec9], {
125
+ configurable: true,
126
+ enumerable: true,
127
+ writable: true,
128
+ initializer: null
129
+ }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "found_in_felloh_managed_trust", [_dec10], {
105
130
  configurable: true,
106
131
  enumerable: true,
107
132
  writable: true,
108
133
  initializer: function () {
109
134
  return false;
110
135
  }
111
- }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec10], {
136
+ }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec11], {
112
137
  configurable: true,
113
138
  enumerable: true,
114
139
  writable: true,
115
140
  initializer: null
116
- }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec11], {
141
+ }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec12], {
117
142
  configurable: true,
118
143
  enumerable: true,
119
144
  writable: true,
@@ -58,7 +58,7 @@ let Ecommerce = (_dec = (0, _typeorm.Entity)({
58
58
  type: "varchar",
59
59
  length: "250",
60
60
  nullable: true
61
- }), _dec14 = (0, _typeorm.OneToMany)(() => _transaction.default, transaction => transaction.payment_link), _dec15 = (0, _typeorm.Column)({
61
+ }), _dec14 = (0, _typeorm.OneToMany)(() => _transaction.default, transaction => transaction.ecommerce), _dec15 = (0, _typeorm.Column)({
62
62
  type: "boolean",
63
63
  default: true
64
64
  }), _dec16 = (0, _typeorm.Column)({
@@ -47,6 +47,13 @@ let PaymentProvider = (_dec = (0, _typeorm.Entity)({
47
47
  _initializerDefineProperty(this, "created_at", _descriptor5, this);
48
48
  }
49
49
 
50
+ getPublicData() {
51
+ return {
52
+ id: this.id,
53
+ name: this.name
54
+ };
55
+ }
56
+
50
57
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
51
58
  configurable: true,
52
59
  enumerable: true,
@@ -11,7 +11,7 @@ class TransactionWebhook {
11
11
  }
12
12
 
13
13
  get() {
14
- var _this$transaction, _this$transaction2, _this$transaction3, _this$transaction3$bo, _this$transaction4, _this$transaction4$bo, _this$transaction5, _this$transaction5$pa, _this$transaction6, _this$transaction6$or, _this$transaction7, _this$transaction8, _this$transaction8$st, _this$transaction9, _this$transaction10;
14
+ var _this$transaction, _this$transaction2, _this$transaction3, _this$transaction3$bo, _this$transaction4, _this$transaction4$bo, _this$transaction5, _this$transaction5$ec, _this$transaction6, _this$transaction6$pa, _this$transaction7, _this$transaction7$or, _this$transaction8, _this$transaction9, _this$transaction9$st, _this$transaction10, _this$transaction11;
15
15
 
16
16
  return {
17
17
  transaction: {
@@ -22,16 +22,19 @@ class TransactionWebhook {
22
22
  id: (_this$transaction3 = this.transaction) === null || _this$transaction3 === void 0 ? void 0 : (_this$transaction3$bo = _this$transaction3.booking) === null || _this$transaction3$bo === void 0 ? void 0 : _this$transaction3$bo.id,
23
23
  booking_reference: (_this$transaction4 = this.transaction) === null || _this$transaction4 === void 0 ? void 0 : (_this$transaction4$bo = _this$transaction4.booking) === null || _this$transaction4$bo === void 0 ? void 0 : _this$transaction4$bo.booking_reference
24
24
  },
25
+ ecommerce: {
26
+ id: (_this$transaction5 = this.transaction) === null || _this$transaction5 === void 0 ? void 0 : (_this$transaction5$ec = _this$transaction5.ecommerce) === null || _this$transaction5$ec === void 0 ? void 0 : _this$transaction5$ec.id
27
+ },
25
28
  payment_link: {
26
- id: (_this$transaction5 = this.transaction) === null || _this$transaction5 === void 0 ? void 0 : (_this$transaction5$pa = _this$transaction5.payment_link) === null || _this$transaction5$pa === void 0 ? void 0 : _this$transaction5$pa.id
29
+ id: (_this$transaction6 = this.transaction) === null || _this$transaction6 === void 0 ? void 0 : (_this$transaction6$pa = _this$transaction6.payment_link) === null || _this$transaction6$pa === void 0 ? void 0 : _this$transaction6$pa.id
27
30
  },
28
31
  provider: {
29
- name: (_this$transaction6 = this.transaction) === null || _this$transaction6 === void 0 ? void 0 : (_this$transaction6$or = _this$transaction6.organisation_payment_provider) === null || _this$transaction6$or === void 0 ? void 0 : _this$transaction6$or.name,
30
- reference: (_this$transaction7 = this.transaction) === null || _this$transaction7 === void 0 ? void 0 : _this$transaction7.provider_reference
32
+ name: (_this$transaction7 = this.transaction) === null || _this$transaction7 === void 0 ? void 0 : (_this$transaction7$or = _this$transaction7.organisation_payment_provider) === null || _this$transaction7$or === void 0 ? void 0 : _this$transaction7$or.name,
33
+ reference: (_this$transaction8 = this.transaction) === null || _this$transaction8 === void 0 ? void 0 : _this$transaction8.provider_reference
31
34
  },
32
- status: (_this$transaction8 = this.transaction) === null || _this$transaction8 === void 0 ? void 0 : (_this$transaction8$st = _this$transaction8.status) === null || _this$transaction8$st === void 0 ? void 0 : _this$transaction8$st.id,
33
- completed_at: (_this$transaction9 = this.transaction) === null || _this$transaction9 === void 0 ? void 0 : _this$transaction9.completed_at,
34
- currency: (_this$transaction10 = this.transaction) === null || _this$transaction10 === void 0 ? void 0 : _this$transaction10.currency
35
+ status: (_this$transaction9 = this.transaction) === null || _this$transaction9 === void 0 ? void 0 : (_this$transaction9$st = _this$transaction9.status) === null || _this$transaction9$st === void 0 ? void 0 : _this$transaction9$st.id,
36
+ completed_at: (_this$transaction10 = this.transaction) === null || _this$transaction10 === void 0 ? void 0 : _this$transaction10.completed_at,
37
+ currency: (_this$transaction11 = this.transaction) === null || _this$transaction11 === void 0 ? void 0 : _this$transaction11.currency
35
38
  };
36
39
  }
37
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.11.12",
3
+ "version": "1.11.14",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "engines": {