@felloh-org/lambda-wrapper 1.1.68 → 1.1.71

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.
@@ -17,7 +17,9 @@ var _uuid = require("uuid");
17
17
 
18
18
  var _bookingComponent = _interopRequireDefault(require("../booking-component"));
19
19
 
20
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14;
20
+ var _paymentLink = _interopRequireDefault(require("../../payment/payment-link"));
21
+
22
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15;
21
23
 
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
25
 
@@ -64,7 +66,7 @@ let Booking = (_dec = (0, _typeorm.Entity)({
64
66
  }), _dec18 = (0, _typeorm.DeleteDateColumn)({
65
67
  type: 'timestamp with time zone',
66
68
  nullable: true
67
- }), _dec(_class = (_class2 = class Booking {
69
+ }), _dec19 = (0, _typeorm.OneToMany)(() => _paymentLink.default, paymentLink => paymentLink.booking), _dec(_class = (_class2 = class Booking {
68
70
  constructor() {
69
71
  _initializerDefineProperty(this, "id", _descriptor, this);
70
72
 
@@ -93,6 +95,8 @@ let Booking = (_dec = (0, _typeorm.Entity)({
93
95
  _initializerDefineProperty(this, "updated_at", _descriptor13, this);
94
96
 
95
97
  _initializerDefineProperty(this, "deleted_at", _descriptor14, this);
98
+
99
+ _initializerDefineProperty(this, "payment_links", _descriptor15, this);
96
100
  }
97
101
 
98
102
  /**
@@ -108,7 +112,12 @@ let Booking = (_dec = (0, _typeorm.Entity)({
108
112
  departure_date: this.departure_date,
109
113
  return_date: this.return_date,
110
114
  email: this.email,
111
- gross_amount: this.gross_amount
115
+ gross_amount: this.gross_amount,
116
+ transactions: [],
117
+ components: [],
118
+ payment_links: [],
119
+ user: null,
120
+ organisation: null
112
121
  };
113
122
 
114
123
  if (typeof this.transactions !== 'undefined') {
@@ -119,6 +128,10 @@ let Booking = (_dec = (0, _typeorm.Entity)({
119
128
  response.components = this.components.map(component => component.getPublicCompactData());
120
129
  }
121
130
 
131
+ if (typeof this.payment_links !== 'undefined') {
132
+ response.payment_links = this.payment_links.map(paymentLink => paymentLink.getPublicCompactData());
133
+ }
134
+
122
135
  if (this.user !== null && typeof this.user.id !== 'undefined') {
123
136
  response.user = this.user.getPublicCompactData();
124
137
  }
@@ -212,5 +225,10 @@ let Booking = (_dec = (0, _typeorm.Entity)({
212
225
  enumerable: true,
213
226
  writable: true,
214
227
  initializer: null
228
+ }), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, "payment_links", [_dec19], {
229
+ configurable: true,
230
+ enumerable: true,
231
+ writable: true,
232
+ initializer: null
215
233
  })), _class2)) || _class);
216
234
  exports.default = Booking;
@@ -108,7 +108,11 @@ let Ledger = (_dec = (0, _typeorm.Entity)({
108
108
  amount: this.amount,
109
109
  source: this.getSource(),
110
110
  created_at: this.created_at,
111
- currency: this.currency
111
+ currency: this.currency,
112
+ disbursal: null,
113
+ amendment: null,
114
+ adjustment: null,
115
+ transaction: null
112
116
  };
113
117
 
114
118
  if (typeof this.disbursal !== 'undefined' && this.disbursal !== null) {
@@ -150,7 +150,11 @@ let PaymentLink = (_dec = (0, _typeorm.Entity)({
150
150
  methods: {
151
151
  open_banking: this.open_banking_enabled,
152
152
  card: this.card_enabled
153
- }
153
+ },
154
+ booking: null,
155
+ transactions: [],
156
+ user: null,
157
+ organisation: null
154
158
  };
155
159
 
156
160
  if (this.booking !== null && typeof this.booking.id !== 'undefined') {
@@ -153,7 +153,11 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
153
153
  created_at: this.created_at,
154
154
  completed_at: this.completed_at,
155
155
  currency: this.currency,
156
- provider_reference: this.provider_reference
156
+ provider_reference: this.provider_reference,
157
+ booking: null,
158
+ payment_link: null,
159
+ metadata: null,
160
+ organisation: null
157
161
  };
158
162
 
159
163
  if (this.booking !== null && typeof this.booking.id !== 'undefined') {
@@ -184,7 +188,8 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
184
188
  type: this.type.id,
185
189
  created_at: this.created_at,
186
190
  completed_at: this.completed_at,
187
- currency: this.currency
191
+ currency: this.currency,
192
+ organisation: null
188
193
  };
189
194
 
190
195
  if (this.organisation !== null && typeof this.organisation.id !== 'undefined') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.1.68",
3
+ "version": "1.1.71",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {