@felloh-org/lambda-wrapper 1.10.6 → 1.10.8

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.
@@ -136,7 +136,7 @@ let Booking = (_dec = (0, _typeorm.Entity)({
136
136
  /**
137
137
  * Get Public Data
138
138
  * @param showTemporaryFlag
139
- * @returns {{components: [], departure_date: string, created_at: Date, organisation: null, booking_reference: string, gross_amount: number, transactions: [], payment_links: [], id: *|string, customer_name: string, user: null, email: string, return_date: string}}
139
+ * @return {{components: [], departure_date: string, created_at: Date, organisation: null, booking_reference: string, gross_amount: number, transactions: [], payment_links: [], atol_receipt_number: string, currency: string, id: *|string, customer_name: string, user: null, email: string, return_date: string}}
140
140
  */
141
141
  getPublicData(showTemporaryFlag = false) {
142
142
  const response = {
@@ -29,8 +29,10 @@ var _organisationPayoutConfig = _interopRequireDefault(require("./organisation-p
29
29
 
30
30
  var _organisationType = _interopRequireDefault(require("./organisation-type"));
31
31
 
32
+ var _organisationPartner = _interopRequireDefault(require("./organisation-partner"));
33
+
32
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
35
 
34
- const ENTITIES = [_organisation.default, _role.default, _userRole.default, _user.default, _userActivity.default, _feature.default, _organisationFeature.default, _loginLink.default, _webhookTypes.default, _organisationWebhook.default, _organisationPayoutConfig.default, _organisationType.default];
36
+ const ENTITIES = [_organisation.default, _role.default, _userRole.default, _user.default, _userActivity.default, _feature.default, _organisationFeature.default, _loginLink.default, _webhookTypes.default, _organisationWebhook.default, _organisationPayoutConfig.default, _organisationType.default, _organisationPartner.default];
35
37
  var _default = ENTITIES;
36
38
  exports.default = _default;
@@ -13,7 +13,7 @@ var _organisationFeature = _interopRequireDefault(require("../organisation-featu
13
13
 
14
14
  var _organisationType = _interopRequireDefault(require("../organisation-type"));
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, _descriptor12;
16
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13;
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
@@ -54,6 +54,9 @@ let Organisation = (_dec = (0, _typeorm.Entity)({
54
54
  }), _dec12 = (0, _typeorm.TreeParent)(), _dec13 = (0, _typeorm.TreeChildren)(), _dec14 = (0, _typeorm.OneToMany)(() => _organisationFeature.default, organisationFeature => organisationFeature.organisation), _dec15 = (0, _typeorm.ManyToOne)(() => _organisationType.default), _dec16 = (0, _typeorm.JoinColumn)({
55
55
  name: 'type_id',
56
56
  referencedColumnName: 'id'
57
+ }), _dec17 = (0, _typeorm.Column)({
58
+ type: "boolean",
59
+ default: false
57
60
  }), _dec(_class = _dec2(_class = (_class2 = class Organisation {
58
61
  constructor() {
59
62
  _initializerDefineProperty(this, "id", _descriptor, this);
@@ -79,6 +82,8 @@ let Organisation = (_dec = (0, _typeorm.Entity)({
79
82
  _initializerDefineProperty(this, "organisation_feature", _descriptor11, this);
80
83
 
81
84
  _initializerDefineProperty(this, "organisation_type", _descriptor12, this);
85
+
86
+ _initializerDefineProperty(this, "unpaid_invoice", _descriptor13, this);
82
87
  }
83
88
 
84
89
  propgate(id, name) {
@@ -97,7 +102,8 @@ let Organisation = (_dec = (0, _typeorm.Entity)({
97
102
  features: [],
98
103
  currencies: this.currencies ? this.currencies : [],
99
104
  payment_methods: this.payment_methods ? this.payment_methods : [],
100
- parent: null
105
+ parent: null,
106
+ unpaid_invoice: this.unpaid_invoice
101
107
  };
102
108
 
103
109
  if (this.parent !== null && typeof this.parent.getPublicCompactData === 'function') {
@@ -191,5 +197,12 @@ let Organisation = (_dec = (0, _typeorm.Entity)({
191
197
  initializer: function () {
192
198
  return _organisationType.default;
193
199
  }
200
+ }), _descriptor13 = _applyDecoratedDescriptor(_class2.prototype, "unpaid_invoice", [_dec17], {
201
+ configurable: true,
202
+ enumerable: true,
203
+ writable: true,
204
+ initializer: function () {
205
+ return false;
206
+ }
194
207
  })), _class2)) || _class) || _class);
195
208
  exports.default = Organisation;
@@ -0,0 +1,67 @@
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 _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
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 OrganisationPartner = (_dec = (0, _typeorm.Entity)({
23
+ name: 'organisation_partner',
24
+ schema: 'user'
25
+ }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec4 = (0, _typeorm.JoinColumn)({
26
+ name: 'partner_organisation_id',
27
+ referencedColumnName: 'id'
28
+ }), _dec5 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec6 = (0, _typeorm.JoinColumn)({
29
+ name: 'organisation_id',
30
+ referencedColumnName: 'id'
31
+ }), _dec7 = (0, _typeorm.CreateDateColumn)(), _dec(_class = (_class2 = class OrganisationPartner {
32
+ constructor() {
33
+ _initializerDefineProperty(this, "id", _descriptor, this);
34
+
35
+ _initializerDefineProperty(this, "partner_organisation", _descriptor2, this);
36
+
37
+ _initializerDefineProperty(this, "organisation", _descriptor3, this);
38
+
39
+ _initializerDefineProperty(this, "created_at", _descriptor4, this);
40
+ }
41
+
42
+ }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
43
+ configurable: true,
44
+ enumerable: true,
45
+ writable: true,
46
+ initializer: null
47
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "partner_organisation", [_dec3, _dec4], {
48
+ configurable: true,
49
+ enumerable: true,
50
+ writable: true,
51
+ initializer: function () {
52
+ return _organisation.default;
53
+ }
54
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec5, _dec6], {
55
+ configurable: true,
56
+ enumerable: true,
57
+ writable: true,
58
+ initializer: function () {
59
+ return _organisation.default;
60
+ }
61
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec7], {
62
+ configurable: true,
63
+ enumerable: true,
64
+ writable: true,
65
+ initializer: null
66
+ })), _class2)) || _class);
67
+ exports.default = OrganisationPartner;
package/dist/index.js CHANGED
@@ -249,6 +249,12 @@ Object.defineProperty(exports, "OrganisationFeatureEntity", {
249
249
  return _organisationFeature.default;
250
250
  }
251
251
  });
252
+ Object.defineProperty(exports, "OrganisationPartnerEntity", {
253
+ enumerable: true,
254
+ get: function () {
255
+ return _organisationPartner.default;
256
+ }
257
+ });
252
258
  Object.defineProperty(exports, "OrganisationPaymentProviderEntity", {
253
259
  enumerable: true,
254
260
  get: function () {
@@ -736,6 +742,8 @@ var _organisationWebhook = _interopRequireDefault(require("./entity/user/organis
736
742
 
737
743
  var _organisationPayoutConfig = _interopRequireDefault(require("./entity/user/organisation-payout-config"));
738
744
 
745
+ var _organisationPartner = _interopRequireDefault(require("./entity/user/organisation-partner"));
746
+
739
747
  var _batch2 = _interopRequireDefault(require("./entity/nuvei/batch"));
740
748
 
741
749
  var _merchant2 = _interopRequireDefault(require("./entity/nuvei/merchant"));
@@ -0,0 +1,13 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class orgUnpaidInvoice1684418112293 {
4
+ name = 'orgUnpaidInvoice1684418112293'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "user"."organisation" ADD "unpaid_invoice" boolean NOT NULL DEFAULT false`);
8
+ }
9
+
10
+ async down(queryRunner) {
11
+ await queryRunner.query(`ALTER TABLE "user"."organisation" DROP COLUMN "unpaid_invoice"`);
12
+ }
13
+ }
@@ -0,0 +1,17 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class orgPartnerTable1684765687786 {
4
+ name = 'orgPartnerTable1684765687786'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`CREATE TABLE "user"."organisation_partner" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "partner_organisation_id" character varying(150), "organisation_id" character varying(150), CONSTRAINT "PK_0a648f4b349e30778c0cf423396" PRIMARY KEY ("id"))`);
8
+ await queryRunner.query(`ALTER TABLE "user"."organisation_partner" ADD CONSTRAINT "FK_5e3d4cbb29e29ecb143e6a6b355" FOREIGN KEY ("partner_organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
9
+ await queryRunner.query(`ALTER TABLE "user"."organisation_partner" ADD CONSTRAINT "FK_061ace0a686facc89cdbe4500b1" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
10
+ }
11
+
12
+ async down(queryRunner) {
13
+ await queryRunner.query(`ALTER TABLE "user"."organisation_partner" DROP CONSTRAINT "FK_061ace0a686facc89cdbe4500b1"`);
14
+ await queryRunner.query(`ALTER TABLE "user"."organisation_partner" DROP CONSTRAINT "FK_5e3d4cbb29e29ecb143e6a6b355"`);
15
+ await queryRunner.query(`DROP TABLE "user"."organisation_partner"`);
16
+ }
17
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.10.6",
3
+ "version": "1.10.8",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "engines": {