@felloh-org/lambda-wrapper 1.2.36 → 1.2.37

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