@felloh-org/lambda-wrapper 1.11.26 → 1.11.27

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,9 @@ var _refundStatus = _interopRequireDefault(require("../refund-status"));
13
13
 
14
14
  var _user = _interopRequireDefault(require("../../user/user"));
15
15
 
16
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11;
16
+ var _organisation = _interopRequireDefault(require("../../user/organisation"));
17
+
18
+ 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;
17
19
 
18
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
21
 
@@ -51,14 +53,19 @@ let Refund = (_dec = (0, _typeorm.Entity)({
51
53
  }), _dec12 = (0, _typeorm.Column)({
52
54
  type: "timestamp with time zone",
53
55
  nullable: true
54
- }), _dec13 = (0, _typeorm.Column)({
56
+ }), _dec13 = (0, _typeorm.ManyToOne)(() => _organisation.default, {
57
+ nullable: true
58
+ }), _dec14 = (0, _typeorm.JoinColumn)({
59
+ name: 'organisation_id',
60
+ referencedColumnName: 'id'
61
+ }), _dec15 = (0, _typeorm.Column)({
55
62
  type: "timestamp with time zone",
56
63
  nullable: true
57
- }), _dec14 = (0, _typeorm.CreateDateColumn)({
64
+ }), _dec16 = (0, _typeorm.CreateDateColumn)({
58
65
  type: 'timestamp with time zone'
59
- }), _dec15 = (0, _typeorm.UpdateDateColumn)({
66
+ }), _dec17 = (0, _typeorm.UpdateDateColumn)({
60
67
  type: 'timestamp with time zone'
61
- }), _dec16 = (0, _typeorm.DeleteDateColumn)({
68
+ }), _dec18 = (0, _typeorm.DeleteDateColumn)({
62
69
  type: 'timestamp with time zone',
63
70
  nullable: true
64
71
  }), _dec(_class = (_class2 = class Refund {
@@ -77,13 +84,15 @@ let Refund = (_dec = (0, _typeorm.Entity)({
77
84
 
78
85
  _initializerDefineProperty(this, "authorised_at", _descriptor7, this);
79
86
 
80
- _initializerDefineProperty(this, "completed_at", _descriptor8, this);
87
+ _initializerDefineProperty(this, "organisation", _descriptor8, this);
81
88
 
82
- _initializerDefineProperty(this, "created_at", _descriptor9, this);
89
+ _initializerDefineProperty(this, "completed_at", _descriptor9, this);
83
90
 
84
- _initializerDefineProperty(this, "updated_at", _descriptor10, this);
91
+ _initializerDefineProperty(this, "created_at", _descriptor10, this);
85
92
 
86
- _initializerDefineProperty(this, "deleted_at", _descriptor11, this);
93
+ _initializerDefineProperty(this, "updated_at", _descriptor11, this);
94
+
95
+ _initializerDefineProperty(this, "deleted_at", _descriptor12, this);
87
96
  }
88
97
 
89
98
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "transaction", [_dec2, _dec3], {
@@ -131,22 +140,29 @@ let Refund = (_dec = (0, _typeorm.Entity)({
131
140
  enumerable: true,
132
141
  writable: true,
133
142
  initializer: null
134
- }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "completed_at", [_dec13], {
143
+ }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec13, _dec14], {
144
+ configurable: true,
145
+ enumerable: true,
146
+ writable: true,
147
+ initializer: function () {
148
+ return _organisation.default;
149
+ }
150
+ }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "completed_at", [_dec15], {
135
151
  configurable: true,
136
152
  enumerable: true,
137
153
  writable: true,
138
154
  initializer: null
139
- }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec14], {
155
+ }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec16], {
140
156
  configurable: true,
141
157
  enumerable: true,
142
158
  writable: true,
143
159
  initializer: null
144
- }), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec15], {
160
+ }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec17], {
145
161
  configurable: true,
146
162
  enumerable: true,
147
163
  writable: true,
148
164
  initializer: null
149
- }), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec16], {
165
+ }), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec18], {
150
166
  configurable: true,
151
167
  enumerable: true,
152
168
  writable: true,
@@ -0,0 +1,15 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class refundOrg1695368446155 {
4
+ name = 'refundOrg1695368446155'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "payment"."refund" ADD "organisation_id" character varying(150)`);
8
+ await queryRunner.query(`ALTER TABLE "payment"."refund" ADD CONSTRAINT "FK_b25e4ce9ccd51110c4ec782552c" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
9
+ }
10
+
11
+ async down(queryRunner) {
12
+ await queryRunner.query(`ALTER TABLE "payment"."refund" DROP CONSTRAINT "FK_b25e4ce9ccd51110c4ec782552c"`);
13
+ await queryRunner.query(`ALTER TABLE "payment"."refund" DROP COLUMN "organisation_id"`);
14
+ }
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.11.26",
3
+ "version": "1.11.27",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "engines": {