@felloh-org/lambda-wrapper 1.1.64 → 1.1.67

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.
@@ -152,7 +152,8 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
152
152
  type: this.type.id,
153
153
  created_at: this.created_at,
154
154
  completed_at: this.completed_at,
155
- currency: this.currency
155
+ currency: this.currency,
156
+ provider_reference: this.provider_reference
156
157
  };
157
158
 
158
159
  if (this.booking !== null && typeof this.booking.id !== 'undefined') {
@@ -21,8 +21,12 @@ var _organisationFeature = _interopRequireDefault(require("./organisation-featur
21
21
 
22
22
  var _loginLink = _interopRequireDefault(require("./login-link"));
23
23
 
24
+ var _webhookTypes = _interopRequireDefault(require("./webhook-types"));
25
+
26
+ var _organisationWebhook = _interopRequireDefault(require("./organisation-webhook"));
27
+
24
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
29
 
26
- const ENTITIES = [_organisation.default, _role.default, _userRole.default, _user.default, _userActivity.default, _feature.default, _organisationFeature.default, _loginLink.default];
30
+ const ENTITIES = [_organisation.default, _role.default, _userRole.default, _user.default, _userActivity.default, _feature.default, _organisationFeature.default, _loginLink.default, _webhookTypes.default, _organisationWebhook.default];
27
31
  var _default = ENTITIES;
28
32
  exports.default = _default;
@@ -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,
package/dist/index.js CHANGED
@@ -183,6 +183,12 @@ Object.defineProperty(exports, "OrganisationPaymentProviderEntity", {
183
183
  return _organisationPaymentProvider.default;
184
184
  }
185
185
  });
186
+ Object.defineProperty(exports, "OrganisationWebhookEntity", {
187
+ enumerable: true,
188
+ get: function () {
189
+ return _organisationWebhook.default;
190
+ }
191
+ });
186
192
  Object.defineProperty(exports, "PaymentLinkEntity", {
187
193
  enumerable: true,
188
194
  get: function () {
@@ -423,6 +429,12 @@ Object.defineProperty(exports, "WarehouseService", {
423
429
  return _warehouse.default;
424
430
  }
425
431
  });
432
+ Object.defineProperty(exports, "WebhookTypesEntity", {
433
+ enumerable: true,
434
+ get: function () {
435
+ return _webhookTypes.default;
436
+ }
437
+ });
426
438
 
427
439
  var _organisationPaymentProvider = _interopRequireDefault(require("./entity/payment/organisation-payment-provider"));
428
440
 
@@ -532,6 +544,10 @@ var _organisationFeature = _interopRequireDefault(require("./entity/user/organis
532
544
 
533
545
  var _loginLink = _interopRequireDefault(require("./entity/user/login-link"));
534
546
 
547
+ var _webhookTypes = _interopRequireDefault(require("./entity/user/webhook-types"));
548
+
549
+ var _organisationWebhook = _interopRequireDefault(require("./entity/user/organisation-webhook"));
550
+
535
551
  var _transaction5 = _interopRequireDefault(require("./entity/nuvei/transaction"));
536
552
 
537
553
  var _registration = _interopRequireDefault(require("./event/user/registration"));
@@ -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.64",
3
+ "version": "1.1.67",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {