@felloh-org/lambda-wrapper 1.1.62 → 1.1.63
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.
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _typeorm = require("typeorm");
|
|
9
|
+
|
|
10
|
+
var _organisation = _interopRequireDefault(require("../organisation"));
|
|
11
|
+
|
|
12
|
+
var _webhookTypes = _interopRequireDefault(require("../webhook-types"));
|
|
13
|
+
|
|
14
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7;
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
19
|
+
|
|
20
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
21
|
+
|
|
22
|
+
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
|
|
23
|
+
|
|
24
|
+
let OrganisationWebhook = (_dec = (0, _typeorm.Entity)({
|
|
25
|
+
name: 'organisation_webhook',
|
|
26
|
+
schema: 'user'
|
|
27
|
+
}), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec4 = (0, _typeorm.JoinColumn)({
|
|
28
|
+
name: 'organisation_id',
|
|
29
|
+
referencedColumnName: 'id'
|
|
30
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
31
|
+
type: "varchar",
|
|
32
|
+
length: "250"
|
|
33
|
+
}), _dec6 = (0, _typeorm.ManyToMany)(() => _webhookTypes.default, webhook_types => webhook_types.organisation_webhooks), _dec7 = (0, _typeorm.JoinTable)({
|
|
34
|
+
name: "organisation_webhook_types",
|
|
35
|
+
schema: "user",
|
|
36
|
+
joinColumn: {
|
|
37
|
+
name: "organisation_webhook_id",
|
|
38
|
+
referencedColumnName: "id"
|
|
39
|
+
},
|
|
40
|
+
inverseJoinColumn: {
|
|
41
|
+
name: "webhook_type_id",
|
|
42
|
+
referencedColumnName: "id"
|
|
43
|
+
}
|
|
44
|
+
}), _dec8 = (0, _typeorm.CreateDateColumn)({
|
|
45
|
+
type: 'timestamp with time zone',
|
|
46
|
+
default: () => 'NOW()'
|
|
47
|
+
}), _dec9 = (0, _typeorm.UpdateDateColumn)({
|
|
48
|
+
type: 'timestamp with time zone',
|
|
49
|
+
default: () => 'NOW()'
|
|
50
|
+
}), _dec10 = (0, _typeorm.DeleteDateColumn)({
|
|
51
|
+
type: 'timestamp with time zone',
|
|
52
|
+
nullable: true
|
|
53
|
+
}), _dec(_class = (_class2 = class OrganisationWebhook {
|
|
54
|
+
constructor() {
|
|
55
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
56
|
+
|
|
57
|
+
_initializerDefineProperty(this, "organisation", _descriptor2, this);
|
|
58
|
+
|
|
59
|
+
_initializerDefineProperty(this, "url", _descriptor3, this);
|
|
60
|
+
|
|
61
|
+
_initializerDefineProperty(this, "webhook_types", _descriptor4, this);
|
|
62
|
+
|
|
63
|
+
_initializerDefineProperty(this, "created_at", _descriptor5, this);
|
|
64
|
+
|
|
65
|
+
_initializerDefineProperty(this, "updated_at", _descriptor6, this);
|
|
66
|
+
|
|
67
|
+
_initializerDefineProperty(this, "deleted_at", _descriptor7, this);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
71
|
+
configurable: true,
|
|
72
|
+
enumerable: true,
|
|
73
|
+
writable: true,
|
|
74
|
+
initializer: null
|
|
75
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec3, _dec4], {
|
|
76
|
+
configurable: true,
|
|
77
|
+
enumerable: true,
|
|
78
|
+
writable: true,
|
|
79
|
+
initializer: function () {
|
|
80
|
+
return _organisation.default;
|
|
81
|
+
}
|
|
82
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "url", [_dec5], {
|
|
83
|
+
configurable: true,
|
|
84
|
+
enumerable: true,
|
|
85
|
+
writable: true,
|
|
86
|
+
initializer: function () {
|
|
87
|
+
return "";
|
|
88
|
+
}
|
|
89
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "webhook_types", [_dec6, _dec7], {
|
|
90
|
+
configurable: true,
|
|
91
|
+
enumerable: true,
|
|
92
|
+
writable: true,
|
|
93
|
+
initializer: null
|
|
94
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec8], {
|
|
95
|
+
configurable: true,
|
|
96
|
+
enumerable: true,
|
|
97
|
+
writable: true,
|
|
98
|
+
initializer: null
|
|
99
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec9], {
|
|
100
|
+
configurable: true,
|
|
101
|
+
enumerable: true,
|
|
102
|
+
writable: true,
|
|
103
|
+
initializer: null
|
|
104
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec10], {
|
|
105
|
+
configurable: true,
|
|
106
|
+
enumerable: true,
|
|
107
|
+
writable: true,
|
|
108
|
+
initializer: null
|
|
109
|
+
})), _class2)) || _class);
|
|
110
|
+
exports.default = OrganisationWebhook;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _typeorm = require("typeorm");
|
|
9
|
+
|
|
10
|
+
var _organisationWebhook = _interopRequireDefault(require("../organisation-webhook"));
|
|
11
|
+
|
|
12
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
|
|
17
|
+
|
|
18
|
+
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
|
|
19
|
+
|
|
20
|
+
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }
|
|
21
|
+
|
|
22
|
+
let WebhookTypes = (_dec = (0, _typeorm.Entity)({
|
|
23
|
+
name: 'webhook_types',
|
|
24
|
+
schema: 'user'
|
|
25
|
+
}), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.Column)({
|
|
26
|
+
type: "varchar",
|
|
27
|
+
length: "50"
|
|
28
|
+
}), _dec4 = (0, _typeorm.Column)({
|
|
29
|
+
type: "varchar",
|
|
30
|
+
length: "150"
|
|
31
|
+
}), _dec5 = (0, _typeorm.Column)({
|
|
32
|
+
type: "varchar",
|
|
33
|
+
length: "250"
|
|
34
|
+
}), _dec6 = (0, _typeorm.ManyToMany)(() => _organisationWebhook.default, organisation_webhooks => organisation_webhooks.webhook_types), _dec7 = (0, _typeorm.JoinTable)({
|
|
35
|
+
name: "organisation_webhook_types",
|
|
36
|
+
schema: "user",
|
|
37
|
+
joinColumn: {
|
|
38
|
+
name: "webhook_type_id",
|
|
39
|
+
referencedColumnName: "id"
|
|
40
|
+
},
|
|
41
|
+
inverseJoinColumn: {
|
|
42
|
+
name: "organisation_webhook_id",
|
|
43
|
+
referencedColumnName: "id"
|
|
44
|
+
}
|
|
45
|
+
}), _dec8 = (0, _typeorm.CreateDateColumn)({
|
|
46
|
+
type: 'timestamp with time zone',
|
|
47
|
+
default: () => 'NOW()'
|
|
48
|
+
}), _dec9 = (0, _typeorm.UpdateDateColumn)({
|
|
49
|
+
type: 'timestamp with time zone',
|
|
50
|
+
default: () => 'NOW()'
|
|
51
|
+
}), _dec10 = (0, _typeorm.DeleteDateColumn)({
|
|
52
|
+
type: 'timestamp with time zone',
|
|
53
|
+
nullable: true
|
|
54
|
+
}), _dec(_class = (_class2 = class WebhookTypes {
|
|
55
|
+
constructor() {
|
|
56
|
+
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
57
|
+
|
|
58
|
+
_initializerDefineProperty(this, "machine_name", _descriptor2, this);
|
|
59
|
+
|
|
60
|
+
_initializerDefineProperty(this, "name", _descriptor3, this);
|
|
61
|
+
|
|
62
|
+
_initializerDefineProperty(this, "description", _descriptor4, this);
|
|
63
|
+
|
|
64
|
+
_initializerDefineProperty(this, "organisation_webhooks", _descriptor5, this);
|
|
65
|
+
|
|
66
|
+
_initializerDefineProperty(this, "created_at", _descriptor6, this);
|
|
67
|
+
|
|
68
|
+
_initializerDefineProperty(this, "updated_at", _descriptor7, this);
|
|
69
|
+
|
|
70
|
+
_initializerDefineProperty(this, "deleted_at", _descriptor8, this);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
74
|
+
configurable: true,
|
|
75
|
+
enumerable: true,
|
|
76
|
+
writable: true,
|
|
77
|
+
initializer: null
|
|
78
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "machine_name", [_dec3], {
|
|
79
|
+
configurable: true,
|
|
80
|
+
enumerable: true,
|
|
81
|
+
writable: true,
|
|
82
|
+
initializer: function () {
|
|
83
|
+
return "";
|
|
84
|
+
}
|
|
85
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "name", [_dec4], {
|
|
86
|
+
configurable: true,
|
|
87
|
+
enumerable: true,
|
|
88
|
+
writable: true,
|
|
89
|
+
initializer: function () {
|
|
90
|
+
return "";
|
|
91
|
+
}
|
|
92
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "description", [_dec5], {
|
|
93
|
+
configurable: true,
|
|
94
|
+
enumerable: true,
|
|
95
|
+
writable: true,
|
|
96
|
+
initializer: function () {
|
|
97
|
+
return "";
|
|
98
|
+
}
|
|
99
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "organisation_webhooks", [_dec6, _dec7], {
|
|
100
|
+
configurable: true,
|
|
101
|
+
enumerable: true,
|
|
102
|
+
writable: true,
|
|
103
|
+
initializer: null
|
|
104
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec8], {
|
|
105
|
+
configurable: true,
|
|
106
|
+
enumerable: true,
|
|
107
|
+
writable: true,
|
|
108
|
+
initializer: null
|
|
109
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec9], {
|
|
110
|
+
configurable: true,
|
|
111
|
+
enumerable: true,
|
|
112
|
+
writable: true,
|
|
113
|
+
initializer: null
|
|
114
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "deleted_at", [_dec10], {
|
|
115
|
+
configurable: true,
|
|
116
|
+
enumerable: true,
|
|
117
|
+
writable: true,
|
|
118
|
+
initializer: null
|
|
119
|
+
})), _class2)) || _class);
|
|
120
|
+
exports.default = WebhookTypes;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class webhooks1660126405407 {
|
|
4
|
+
name = 'webhooks1660126405407'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "user"."webhook_types" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "machine_name" character varying(50) NOT NULL, "name" character varying(150) NOT NULL, "description" character varying(250) NOT NULL, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), "deleted_at" TIMESTAMP WITH TIME ZONE, CONSTRAINT "PK_0062153406a6125e2510c8e4a16" PRIMARY KEY ("id"))`);
|
|
8
|
+
await queryRunner.query(`CREATE TABLE "user"."organisation_webhook" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "url" character varying(250) NOT NULL, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(), "deleted_at" TIMESTAMP WITH TIME ZONE, "organisation_id" character varying(150), CONSTRAINT "PK_deb78b83ae8298b4a383c5f2f56" PRIMARY KEY ("id"))`);
|
|
9
|
+
await queryRunner.query(`CREATE TABLE "user"."organisation_webhook_types" ("webhook_type_id" uuid NOT NULL, "organisation_webhook_id" uuid NOT NULL, CONSTRAINT "PK_e4847cc053914fd4613cb4d9ee2" PRIMARY KEY ("webhook_type_id", "organisation_webhook_id"))`);
|
|
10
|
+
await queryRunner.query(`CREATE INDEX "IDX_5e4373e5d6dc38fc8fa54a0a91" ON "user"."organisation_webhook_types" ("webhook_type_id") `);
|
|
11
|
+
await queryRunner.query(`CREATE INDEX "IDX_4ef74efa24be992cd0a1e4b535" ON "user"."organisation_webhook_types" ("organisation_webhook_id") `);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE "user"."organisation_webhook" ADD CONSTRAINT "FK_a2497f989b9ac9d34eb746aa266" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
13
|
+
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`);
|
|
14
|
+
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`);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async down(queryRunner) {
|
|
18
|
+
await queryRunner.query(`ALTER TABLE "user"."organisation_webhook_types" DROP CONSTRAINT "FK_4ef74efa24be992cd0a1e4b535b"`);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE "user"."organisation_webhook_types" DROP CONSTRAINT "FK_5e4373e5d6dc38fc8fa54a0a919"`);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE "user"."organisation_webhook" DROP CONSTRAINT "FK_a2497f989b9ac9d34eb746aa266"`);
|
|
21
|
+
await queryRunner.query(`ALTER TABLE "user"."user_role" DROP CONSTRAINT "FK_32a6fc2fcb019d8e3a8ace0f55f"`);
|
|
22
|
+
await queryRunner.query(`DROP TABLE "user"."organisation_webhook_types"`);
|
|
23
|
+
await queryRunner.query(`DROP TABLE "user"."organisation_webhook"`);
|
|
24
|
+
await queryRunner.query(`DROP TABLE "user"."webhook_types"`);
|
|
25
|
+
}
|
|
26
|
+
}
|