@felloh-org/lambda-wrapper 1.2.21 → 1.2.23

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.
@@ -7,7 +7,7 @@ exports.default = exports.DEFAULT_CURRENCY = void 0;
7
7
 
8
8
  var _typeorm = require("typeorm");
9
9
 
10
- var _dec, _dec2, _dec3, _class, _class2, _descriptor, _descriptor2;
10
+ var _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
11
11
 
12
12
  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 }); }
13
13
 
@@ -26,11 +26,20 @@ let Currency = (_dec = (0, _typeorm.Entity)({
26
26
  }), _dec3 = (0, _typeorm.Column)({
27
27
  type: "varchar",
28
28
  length: "100"
29
+ }), _dec4 = (0, _typeorm.Column)({
30
+ type: "varchar",
31
+ length: "3"
32
+ }), _dec5 = (0, _typeorm.Column)({
33
+ type: "int"
29
34
  }), _dec(_class = (_class2 = class Currency {
30
35
  constructor() {
31
36
  _initializerDefineProperty(this, "id", _descriptor, this);
32
37
 
33
38
  _initializerDefineProperty(this, "description", _descriptor2, this);
39
+
40
+ _initializerDefineProperty(this, "major_unit", _descriptor3, this);
41
+
42
+ _initializerDefineProperty(this, "division_factor", _descriptor4, this);
34
43
  }
35
44
 
36
45
  }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
@@ -45,5 +54,15 @@ let Currency = (_dec = (0, _typeorm.Entity)({
45
54
  enumerable: true,
46
55
  writable: true,
47
56
  initializer: null
57
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "major_unit", [_dec4], {
58
+ configurable: true,
59
+ enumerable: true,
60
+ writable: true,
61
+ initializer: null
62
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "division_factor", [_dec5], {
63
+ configurable: true,
64
+ enumerable: true,
65
+ writable: true,
66
+ initializer: null
48
67
  })), _class2)) || _class);
49
68
  exports.default = Currency;
@@ -25,8 +25,10 @@ var _webhookTypes = _interopRequireDefault(require("./webhook-types"));
25
25
 
26
26
  var _organisationWebhook = _interopRequireDefault(require("./organisation-webhook"));
27
27
 
28
+ var _organisationPayoutConfig = _interopRequireDefault(require("./organisation-payout-config"));
29
+
28
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
31
 
30
- const ENTITIES = [_organisation.default, _role.default, _userRole.default, _user.default, _userActivity.default, _feature.default, _organisationFeature.default, _loginLink.default, _webhookTypes.default, _organisationWebhook.default];
32
+ const ENTITIES = [_organisation.default, _role.default, _userRole.default, _user.default, _userActivity.default, _feature.default, _organisationFeature.default, _loginLink.default, _webhookTypes.default, _organisationWebhook.default, _organisationPayoutConfig.default];
31
33
  var _default = ENTITIES;
32
34
  exports.default = _default;
@@ -0,0 +1,85 @@
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, _descriptor5;
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 OrganisationPayoutConfig = (_dec = (0, _typeorm.Entity)({
23
+ name: 'organisation_payout_config',
24
+ schema: 'user'
25
+ }), _dec2 = (0, _typeorm.ManyToOne)(() => _organisation.default, {
26
+ primary: true
27
+ }), _dec3 = (0, _typeorm.JoinColumn)({
28
+ name: 'organisation_id',
29
+ referencedColumnName: 'id'
30
+ }), _dec4 = (0, _typeorm.Column)({
31
+ type: "boolean",
32
+ default: false
33
+ }), _dec5 = (0, _typeorm.Column)({
34
+ type: "boolean",
35
+ default: false
36
+ }), _dec6 = (0, _typeorm.CreateDateColumn)({
37
+ type: 'timestamp with time zone'
38
+ }), _dec7 = (0, _typeorm.UpdateDateColumn)({
39
+ type: 'timestamp with time zone'
40
+ }), _dec(_class = (_class2 = class OrganisationPayoutConfig {
41
+ constructor() {
42
+ _initializerDefineProperty(this, "organisation", _descriptor, this);
43
+
44
+ _initializerDefineProperty(this, "enabled", _descriptor2, this);
45
+
46
+ _initializerDefineProperty(this, "ledgering", _descriptor3, this);
47
+
48
+ _initializerDefineProperty(this, "created_at", _descriptor4, this);
49
+
50
+ _initializerDefineProperty(this, "updated_at", _descriptor5, this);
51
+ }
52
+
53
+ }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "organisation", [_dec2, _dec3], {
54
+ configurable: true,
55
+ enumerable: true,
56
+ writable: true,
57
+ initializer: function () {
58
+ return _organisation.default;
59
+ }
60
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "enabled", [_dec4], {
61
+ configurable: true,
62
+ enumerable: true,
63
+ writable: true,
64
+ initializer: function () {
65
+ return false;
66
+ }
67
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "ledgering", [_dec5], {
68
+ configurable: true,
69
+ enumerable: true,
70
+ writable: true,
71
+ initializer: function () {
72
+ return false;
73
+ }
74
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec6], {
75
+ configurable: true,
76
+ enumerable: true,
77
+ writable: true,
78
+ initializer: null
79
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec7], {
80
+ configurable: true,
81
+ enumerable: true,
82
+ writable: true,
83
+ initializer: null
84
+ })), _class2)) || _class);
85
+ exports.default = OrganisationPayoutConfig;
package/dist/index.js CHANGED
@@ -207,6 +207,12 @@ Object.defineProperty(exports, "OrganisationPaymentProviderMethodEntity", {
207
207
  return _organisationPaymentProviderMethod.default;
208
208
  }
209
209
  });
210
+ Object.defineProperty(exports, "OrganisationPayoutConfig", {
211
+ enumerable: true,
212
+ get: function () {
213
+ return _organisationPayoutConfig.default;
214
+ }
215
+ });
210
216
  Object.defineProperty(exports, "OrganisationWebhookEntity", {
211
217
  enumerable: true,
212
218
  get: function () {
@@ -578,6 +584,8 @@ var _webhookTypes = _interopRequireDefault(require("./entity/user/webhook-types"
578
584
 
579
585
  var _organisationWebhook = _interopRequireDefault(require("./entity/user/organisation-webhook"));
580
586
 
587
+ var _organisationPayoutConfig = _interopRequireDefault(require("./entity/user/organisation-payout-config"));
588
+
581
589
  var _transaction5 = _interopRequireDefault(require("./entity/nuvei/transaction"));
582
590
 
583
591
  var _registration = _interopRequireDefault(require("./event/user/registration"));
@@ -0,0 +1,18 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class currencyMetadata1664879624602 {
4
+ name = 'currencyMetadata1664879624602'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`ALTER TABLE "bank"."currency" ADD "major_unit" character varying(3) NOT NULL DEFAULT ''`);
8
+ await queryRunner.query(`ALTER TABLE "bank"."currency" ADD "division_factor" integer NOT NULL DEFAULT 100`);
9
+ await queryRunner.query(`UPDATE "bank"."currency" SET "major_unit" = 'GBP' WHERE id = 'GBX'`);
10
+ await queryRunner.query(`UPDATE "bank"."currency" SET "major_unit" = 'USD' WHERE id = 'USX'`);
11
+ await queryRunner.query(`UPDATE "bank"."currency" SET "major_unit" = 'EUR' WHERE id = 'EUX'`);
12
+ }
13
+
14
+ async down(queryRunner) {
15
+ await queryRunner.query(`ALTER TABLE "bank"."currency" DROP COLUMN "division_factor"`);
16
+ await queryRunner.query(`ALTER TABLE "bank"."currency" DROP COLUMN "major_unit"`);
17
+ }
18
+ }
@@ -0,0 +1,15 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class organisationPayoutConfig1664880667093 {
4
+ name = 'organisationPayoutConfig1664880667093'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`CREATE TABLE "user"."organisation_payout_config" ("enabled" boolean NOT NULL DEFAULT false, "ledgering" boolean NOT NULL DEFAULT false, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "organisation_id" character varying(150) NOT NULL, CONSTRAINT "PK_3774dc6adea560c5b3b1ab20fbe" PRIMARY KEY ("organisation_id"))`);
8
+ await queryRunner.query(`ALTER TABLE "user"."organisation_payout_config" ADD CONSTRAINT "FK_3774dc6adea560c5b3b1ab20fbe" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
9
+ }
10
+
11
+ async down(queryRunner) {
12
+ await queryRunner.query(`ALTER TABLE "user"."organisation_payout_config" DROP CONSTRAINT "FK_3774dc6adea560c5b3b1ab20fbe"`);
13
+ await queryRunner.query(`DROP TABLE "user"."organisation_payout_config"`);
14
+ }
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.2.21",
3
+ "version": "1.2.23",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "engines": {