@felloh-org/lambda-wrapper 1.11.79 → 1.11.80

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 _organisation = _interopRequireDefault(require("../../user/organisation"));
11
11
 
12
12
  var _user = _interopRequireDefault(require("../../user/user"));
13
13
 
14
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5;
14
+ var _gocardlessAgreement = _interopRequireDefault(require("../gocardless-agreement"));
15
+
16
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6;
15
17
 
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
19
 
@@ -33,10 +35,13 @@ let Requisition = exports.default = (_dec = (0, _typeorm.Entity)({
33
35
  }), _dec5 = (0, _typeorm.ManyToOne)(() => _user.default), _dec6 = (0, _typeorm.JoinColumn)({
34
36
  name: 'user_id',
35
37
  referencedColumnName: 'id'
36
- }), _dec7 = Column({
38
+ }), _dec7 = (0, _typeorm.ManyToOne)(() => _gocardlessAgreement.default), _dec8 = (0, _typeorm.JoinColumn)({
39
+ name: 'agreement_id',
40
+ referencedColumnName: 'id'
41
+ }), _dec9 = (0, _typeorm.Column)({
37
42
  type: "boolean",
38
43
  default: false
39
- }), _dec8 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Requisition {
44
+ }), _dec10 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class Requisition {
40
45
  constructor() {
41
46
  _initializerDefineProperty(this, "id", _descriptor, this);
42
47
 
@@ -44,9 +49,11 @@ let Requisition = exports.default = (_dec = (0, _typeorm.Entity)({
44
49
 
45
50
  _initializerDefineProperty(this, "user", _descriptor3, this);
46
51
 
47
- _initializerDefineProperty(this, "is_complete", _descriptor4, this);
52
+ _initializerDefineProperty(this, "Agreement", _descriptor4, this);
48
53
 
49
- _initializerDefineProperty(this, "created_at", _descriptor5, this);
54
+ _initializerDefineProperty(this, "is_complete", _descriptor5, this);
55
+
56
+ _initializerDefineProperty(this, "created_at", _descriptor6, this);
50
57
  }
51
58
 
52
59
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
@@ -70,14 +77,21 @@ let Requisition = exports.default = (_dec = (0, _typeorm.Entity)({
70
77
  initializer: function () {
71
78
  return _user.default;
72
79
  }
73
- }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "is_complete", [_dec7], {
80
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "Agreement", [_dec7, _dec8], {
81
+ configurable: true,
82
+ enumerable: true,
83
+ writable: true,
84
+ initializer: function () {
85
+ return _gocardlessAgreement.default;
86
+ }
87
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "is_complete", [_dec9], {
74
88
  configurable: true,
75
89
  enumerable: true,
76
90
  writable: true,
77
91
  initializer: function () {
78
92
  return false;
79
93
  }
80
- }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec8], {
94
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec10], {
81
95
  configurable: true,
82
96
  enumerable: true,
83
97
  writable: true,
@@ -0,0 +1,19 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class aispRequisition1710340812651 {
4
+ name = 'aispRequisition1710340812651'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`CREATE TABLE "aisp"."gocardless_requisition" ("id" character varying(50) NOT NULL, "is_complete" boolean NOT NULL DEFAULT false, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "organisation_id" character varying(150), "user_id" character varying, "agreement_id" character varying(50), CONSTRAINT "PK_909a47c291ce5606347240a2591" PRIMARY KEY ("id"))`);
8
+ await queryRunner.query(`ALTER TABLE "aisp"."gocardless_requisition" ADD CONSTRAINT "FK_45399de88453e7eadd731d9a95a" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
9
+ await queryRunner.query(`ALTER TABLE "aisp"."gocardless_requisition" ADD CONSTRAINT "FK_b4b949c66fa8d309115864647cb" FOREIGN KEY ("user_id") REFERENCES "user"."user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
10
+ await queryRunner.query(`ALTER TABLE "aisp"."gocardless_requisition" ADD CONSTRAINT "FK_79fa1c1c7eab84dea60b18599ab" FOREIGN KEY ("agreement_id") REFERENCES "aisp"."gocardless_agreement"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
11
+ }
12
+
13
+ async down(queryRunner) {
14
+ await queryRunner.query(`ALTER TABLE "aisp"."gocardless_requisition" DROP CONSTRAINT "FK_79fa1c1c7eab84dea60b18599ab"`);
15
+ await queryRunner.query(`ALTER TABLE "aisp"."gocardless_requisition" DROP CONSTRAINT "FK_b4b949c66fa8d309115864647cb"`);
16
+ await queryRunner.query(`ALTER TABLE "aisp"."gocardless_requisition" DROP CONSTRAINT "FK_45399de88453e7eadd731d9a95a"`);
17
+ await queryRunner.query(`DROP TABLE "aisp"."gocardless_requisition"`);
18
+ }
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.11.79",
3
+ "version": "1.11.80",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "engines": {