@felloh-org/lambda-wrapper 1.1.65 → 1.1.66

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,7 @@ var _organisation = _interopRequireDefault(require("../organisation"));
11
11
 
12
12
  var _webhookTypes = _interopRequireDefault(require("../webhook-types"));
13
13
 
14
- var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
14
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
@@ -41,13 +41,16 @@ let OrganisationWebhook = (_dec = (0, _typeorm.Entity)({
41
41
  name: "webhook_type_id",
42
42
  referencedColumnName: "id"
43
43
  }
44
- }), _dec8 = (0, _typeorm.CreateDateColumn)({
44
+ }), _dec8 = (0, _typeorm.Column)({
45
+ type: "boolean",
46
+ default: false
47
+ }), _dec9 = (0, _typeorm.CreateDateColumn)({
45
48
  type: 'timestamp with time zone',
46
49
  default: () => 'NOW()'
47
- }), _dec9 = (0, _typeorm.UpdateDateColumn)({
50
+ }), _dec10 = (0, _typeorm.UpdateDateColumn)({
48
51
  type: 'timestamp with time zone',
49
52
  default: () => 'NOW()'
50
- }), _dec10 = (0, _typeorm.DeleteDateColumn)({
53
+ }), _dec11 = (0, _typeorm.DeleteDateColumn)({
51
54
  type: 'timestamp with time zone',
52
55
  nullable: true
53
56
  }), _dec(_class = (_class2 = class OrganisationWebhook {
@@ -60,11 +63,13 @@ let OrganisationWebhook = (_dec = (0, _typeorm.Entity)({
60
63
 
61
64
  _initializerDefineProperty(this, "webhook_types", _descriptor4, this);
62
65
 
63
- _initializerDefineProperty(this, "created_at", _descriptor5, this);
66
+ _initializerDefineProperty(this, "child_organisations", _descriptor5, this);
64
67
 
65
- _initializerDefineProperty(this, "updated_at", _descriptor6, this);
68
+ _initializerDefineProperty(this, "created_at", _descriptor6, this);
66
69
 
67
- _initializerDefineProperty(this, "deleted_at", _descriptor7, this);
70
+ _initializerDefineProperty(this, "updated_at", _descriptor7, this);
71
+
72
+ _initializerDefineProperty(this, "deleted_at", _descriptor8, this);
68
73
  }
69
74
 
70
75
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
@@ -91,17 +96,22 @@ let OrganisationWebhook = (_dec = (0, _typeorm.Entity)({
91
96
  enumerable: true,
92
97
  writable: true,
93
98
  initializer: null
94
- }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec8], {
99
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "child_organisations", [_dec8], {
100
+ configurable: true,
101
+ enumerable: true,
102
+ writable: true,
103
+ initializer: null
104
+ }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec9], {
95
105
  configurable: true,
96
106
  enumerable: true,
97
107
  writable: true,
98
108
  initializer: null
99
- }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec9], {
109
+ }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec10], {
100
110
  configurable: true,
101
111
  enumerable: true,
102
112
  writable: true,
103
113
  initializer: null
104
- }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec10], {
114
+ }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec11], {
105
115
  configurable: true,
106
116
  enumerable: true,
107
117
  writable: true,
@@ -0,0 +1,21 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class webhookChildOrgs1660170110686 {
4
+ name = 'webhookChildOrgs1660170110686'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "user"."organisation_webhook_types" DROP CONSTRAINT "FK_4ef74efa24be992cd0a1e4b535b"`);
8
+ await queryRunner.query(`ALTER TABLE "user"."organisation_webhook_types" DROP CONSTRAINT "FK_5e4373e5d6dc38fc8fa54a0a919"`);
9
+ await queryRunner.query(`ALTER TABLE "user"."organisation_webhook" ADD "child_organisations" boolean NOT NULL DEFAULT false`);
10
+ await queryRunner.query(`ALTER TABLE "user"."organisation_webhook_types" ADD CONSTRAINT "FK_4ef74efa24be992cd0a1e4b535b" FOREIGN KEY ("organisation_webhook_id") REFERENCES "user"."organisation_webhook"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
11
+ await queryRunner.query(`ALTER TABLE "user"."organisation_webhook_types" ADD CONSTRAINT "FK_5e4373e5d6dc38fc8fa54a0a919" FOREIGN KEY ("webhook_type_id") REFERENCES "user"."webhook_types"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
12
+ }
13
+
14
+ async down(queryRunner) {
15
+ await queryRunner.query(`ALTER TABLE "user"."organisation_webhook_types" DROP CONSTRAINT "FK_5e4373e5d6dc38fc8fa54a0a919"`);
16
+ await queryRunner.query(`ALTER TABLE "user"."organisation_webhook_types" DROP CONSTRAINT "FK_4ef74efa24be992cd0a1e4b535b"`);
17
+ await queryRunner.query(`ALTER TABLE "user"."organisation_webhook" DROP COLUMN "child_organisations"`);
18
+ await queryRunner.query(`ALTER TABLE "user"."organisation_webhook_types" ADD CONSTRAINT "FK_5e4373e5d6dc38fc8fa54a0a919" FOREIGN KEY ("webhook_type_id") REFERENCES "user"."webhook_types"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
19
+ await queryRunner.query(`ALTER TABLE "user"."organisation_webhook_types" ADD CONSTRAINT "FK_4ef74efa24be992cd0a1e4b535b" FOREIGN KEY ("organisation_webhook_id") REFERENCES "user"."organisation_webhook"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
20
+ }
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.1.65",
3
+ "version": "1.1.66",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {