@felloh-org/lambda-wrapper 1.2.35 → 1.2.36

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.
@@ -13,7 +13,7 @@ var _organisation = _interopRequireDefault(require("../../user/organisation"));
13
13
 
14
14
  var _currency = require("../../bank/currency");
15
15
 
16
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9;
16
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
@@ -28,30 +28,33 @@ let CreditNote = (_dec = (0, _typeorm.Entity)({
28
28
  schema: 'payment'
29
29
  }), _dec2 = (0, _typeorm.PrimaryColumn)("varchar"), _dec3 = (0, _typeorm.Column)({
30
30
  type: "int"
31
- }), _dec4 = (0, _typeorm.ManyToOne)(() => _booking.default, {
31
+ }), _dec4 = (0, _typeorm.Column)({
32
+ type: "varchar",
33
+ length: "150"
34
+ }), _dec5 = (0, _typeorm.ManyToOne)(() => _booking.default, {
32
35
  nullable: true
33
- }), _dec5 = (0, _typeorm.JoinColumn)({
36
+ }), _dec6 = (0, _typeorm.JoinColumn)({
34
37
  name: 'booking_created_from',
35
38
  referencedColumnName: 'id'
36
- }), _dec6 = (0, _typeorm.ManyToOne)(() => _booking.default, {
39
+ }), _dec7 = (0, _typeorm.ManyToOne)(() => _booking.default, {
37
40
  nullable: true
38
- }), _dec7 = (0, _typeorm.JoinColumn)({
41
+ }), _dec8 = (0, _typeorm.JoinColumn)({
39
42
  name: 'booking_applied_to',
40
43
  referencedColumnName: 'id'
41
- }), _dec8 = (0, _typeorm.Column)({
44
+ }), _dec9 = (0, _typeorm.Column)({
42
45
  type: "varchar",
43
46
  length: "2048",
44
47
  nullable: true
45
- }), _dec9 = (0, _typeorm.Column)({
48
+ }), _dec10 = (0, _typeorm.Column)({
46
49
  type: "varchar",
47
50
  length: "3",
48
51
  default: _currency.DEFAULT_CURRENCY
49
- }), _dec10 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec11 = (0, _typeorm.JoinColumn)({
52
+ }), _dec11 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec12 = (0, _typeorm.JoinColumn)({
50
53
  name: 'organisation_id',
51
54
  referencedColumnName: 'id'
52
- }), _dec12 = (0, _typeorm.CreateDateColumn)({
55
+ }), _dec13 = (0, _typeorm.CreateDateColumn)({
53
56
  type: 'timestamp with time zone'
54
- }), _dec13 = (0, _typeorm.UpdateDateColumn)({
57
+ }), _dec14 = (0, _typeorm.UpdateDateColumn)({
55
58
  type: 'timestamp with time zone'
56
59
  }), _dec(_class = (_class2 = class CreditNote {
57
60
  constructor() {
@@ -59,24 +62,27 @@ let CreditNote = (_dec = (0, _typeorm.Entity)({
59
62
 
60
63
  _initializerDefineProperty(this, "amount", _descriptor2, this);
61
64
 
62
- _initializerDefineProperty(this, "booking_created_from", _descriptor3, this);
65
+ _initializerDefineProperty(this, "customer_name", _descriptor3, this);
63
66
 
64
- _initializerDefineProperty(this, "booking_applied_to", _descriptor4, this);
67
+ _initializerDefineProperty(this, "booking_created_from", _descriptor4, this);
65
68
 
66
- _initializerDefineProperty(this, "description", _descriptor5, this);
69
+ _initializerDefineProperty(this, "booking_applied_to", _descriptor5, this);
67
70
 
68
- _initializerDefineProperty(this, "currency", _descriptor6, this);
71
+ _initializerDefineProperty(this, "description", _descriptor6, this);
69
72
 
70
- _initializerDefineProperty(this, "organisation", _descriptor7, this);
73
+ _initializerDefineProperty(this, "currency", _descriptor7, this);
71
74
 
72
- _initializerDefineProperty(this, "created_at", _descriptor8, this);
75
+ _initializerDefineProperty(this, "organisation", _descriptor8, this);
73
76
 
74
- _initializerDefineProperty(this, "updated_at", _descriptor9, this);
77
+ _initializerDefineProperty(this, "created_at", _descriptor9, this);
78
+
79
+ _initializerDefineProperty(this, "updated_at", _descriptor10, this);
75
80
  }
76
81
 
77
82
  getPublicData() {
78
83
  const response = {
79
84
  id: this.id,
85
+ customer_name: this.customer_name,
80
86
  amount: this.amount,
81
87
  description: this.description,
82
88
  currency: this.currency,
@@ -107,47 +113,54 @@ let CreditNote = (_dec = (0, _typeorm.Entity)({
107
113
  enumerable: true,
108
114
  writable: true,
109
115
  initializer: null
110
- }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "booking_created_from", [_dec4, _dec5], {
116
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "customer_name", [_dec4], {
117
+ configurable: true,
118
+ enumerable: true,
119
+ writable: true,
120
+ initializer: function () {
121
+ return "";
122
+ }
123
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "booking_created_from", [_dec5, _dec6], {
111
124
  configurable: true,
112
125
  enumerable: true,
113
126
  writable: true,
114
127
  initializer: function () {
115
128
  return _booking.default;
116
129
  }
117
- }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "booking_applied_to", [_dec6, _dec7], {
130
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "booking_applied_to", [_dec7, _dec8], {
118
131
  configurable: true,
119
132
  enumerable: true,
120
133
  writable: true,
121
134
  initializer: function () {
122
135
  return _booking.default;
123
136
  }
124
- }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "description", [_dec8], {
137
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "description", [_dec9], {
125
138
  configurable: true,
126
139
  enumerable: true,
127
140
  writable: true,
128
141
  initializer: function () {
129
142
  return "";
130
143
  }
131
- }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec9], {
144
+ }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec10], {
132
145
  configurable: true,
133
146
  enumerable: true,
134
147
  writable: true,
135
148
  initializer: function () {
136
149
  return _currency.DEFAULT_CURRENCY;
137
150
  }
138
- }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec10, _dec11], {
151
+ }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec11, _dec12], {
139
152
  configurable: true,
140
153
  enumerable: true,
141
154
  writable: true,
142
155
  initializer: function () {
143
156
  return _organisation.default;
144
157
  }
145
- }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec12], {
158
+ }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec13], {
146
159
  configurable: true,
147
160
  enumerable: true,
148
161
  writable: true,
149
162
  initializer: null
150
- }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec13], {
163
+ }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec14], {
151
164
  configurable: true,
152
165
  enumerable: true,
153
166
  writable: true,
@@ -0,0 +1,13 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class creditNotesCustomerName1666880510631 {
4
+ name = 'creditNotesCustomerName1666880510631'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "payment"."credit_note" ADD "customer_name" character varying(150) NOT NULL`);
8
+ }
9
+
10
+ async down(queryRunner) {
11
+ await queryRunner.query(`ALTER TABLE "payment"."credit_note" DROP COLUMN "customer_name"`);
12
+ }
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.2.35",
3
+ "version": "1.2.36",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "engines": {