@felloh-org/lambda-wrapper 1.11.47 → 1.11.49

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.
package/.eslintrc.yml CHANGED
@@ -1,15 +1,15 @@
1
1
  root: true
2
2
 
3
+ parserOptions:
4
+ ecmaVersion: 2020
5
+
3
6
  plugins:
4
7
  - 'flowtype'
5
8
  - 'sonarjs'
6
9
  - 'unicorn'
7
10
 
8
11
  extends:
9
- - "@felloh-org/eslint-config/mixins/base"
10
-
11
- parserOptions:
12
- ecmaVersion: 11
12
+ - "eslint-config-airbnb-base"
13
13
 
14
14
  ignorePatterns:
15
15
  - dist
@@ -17,10 +17,62 @@ ignorePatterns:
17
17
  - node_modules
18
18
  - vocerage
19
19
 
20
+ env:
21
+ "es6": true
22
+ "node": true
23
+
20
24
  rules:
21
25
  no-shadow: "off"
22
26
  camelcase: "off"
23
27
  import/no-dynamic-require: "off"
24
28
  global-require: "off"
25
- import/no-named-as-default: "off"
26
- import/no-named-as-default-member: "off"
29
+ "indent": ["error", 2]
30
+ "import/no-cycle": "off"
31
+ "import/extensions": "off"
32
+ "import/no-unresolved": "off"
33
+ "import/prefer-default-export": "off"
34
+ "import/order": [
35
+ "error",
36
+ {
37
+ "alphabetize": {
38
+ "order": "asc",
39
+ },
40
+ "groups": ["builtin", "external", "internal"],
41
+ "pathGroups": [
42
+ {
43
+ "pattern": "@comicrelief/**",
44
+ "group": "external",
45
+ "position": "after",
46
+ },
47
+ {
48
+ "pattern": "@/src/**",
49
+ "group": "internal",
50
+ "position": "before",
51
+ },
52
+ {
53
+ "pattern": "@/**",
54
+ "group": "internal",
55
+ "position": "before",
56
+ },
57
+ ],
58
+ "pathGroupsExcludedImportTypes": ["builtin"],
59
+ "newlines-between": "always"
60
+ },
61
+ ]
62
+ "linebreak-style": "off"
63
+ "max-len": "off"
64
+ "no-await-in-loop": "off"
65
+ "no-restricted-syntax": "off"
66
+ "import/no-named-as-default": "off"
67
+ "import/no-named-as-default-member": "off"
68
+ "no-unused-vars": [
69
+ "error",
70
+ {
71
+ "argsIgnorePattern": "^_",
72
+ "varsIgnorePattern": "^_",
73
+ }
74
+ ]
75
+ "prefer-destructuring": "off"
76
+ "sort-imports": ["error", {
77
+ "ignoreDeclarationSort": true,
78
+ }]
@@ -31,8 +31,10 @@ var _organisationType = _interopRequireDefault(require("./organisation-type"));
31
31
 
32
32
  var _organisationPartner = _interopRequireDefault(require("./organisation-partner"));
33
33
 
34
+ var _webhookLog = _interopRequireDefault(require("./webhook-log"));
35
+
34
36
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
35
37
 
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];
38
+ const ENTITIES = [_feature.default, _loginLink.default, _organisation.default, _organisationFeature.default, _organisationPartner.default, _organisationPayoutConfig.default, _organisationType.default, _organisationWebhook.default, _role.default, _user.default, _userActivity.default, _userRole.default, _webhookLog.default, _webhookTypes.default];
37
39
 
38
40
  var _default = exports.default = ENTITIES;
@@ -0,0 +1,79 @@
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, _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 WebhookLog = exports.default = (_dec = (0, _typeorm.Entity)({
23
+ name: 'webhook_log',
24
+ schema: 'user'
25
+ }), _dec2 = (0, _typeorm.PrimaryGeneratedColumn)("uuid"), _dec3 = (0, _typeorm.ManyToOne)(() => _organisationWebhook.default), _dec4 = (0, _typeorm.JoinColumn)({
26
+ name: 'webhook_id',
27
+ referencedColumnName: 'id'
28
+ }), _dec5 = (0, _typeorm.Column)({
29
+ type: "boolean",
30
+ default: false
31
+ }), _dec6 = (0, _typeorm.CreateDateColumn)({
32
+ type: 'timestamp with time zone',
33
+ default: () => 'NOW()'
34
+ }), _dec7 = (0, _typeorm.UpdateDateColumn)({
35
+ type: 'timestamp with time zone',
36
+ default: () => 'NOW()'
37
+ }), _dec(_class = (_class2 = class WebhookLog {
38
+ constructor() {
39
+ _initializerDefineProperty(this, "id", _descriptor, this);
40
+
41
+ _initializerDefineProperty(this, "organisation_webhook", _descriptor2, this);
42
+
43
+ _initializerDefineProperty(this, "is_success", _descriptor3, this);
44
+
45
+ _initializerDefineProperty(this, "created_at", _descriptor4, this);
46
+
47
+ _initializerDefineProperty(this, "updated_at", _descriptor5, this);
48
+ }
49
+
50
+ }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
51
+ configurable: true,
52
+ enumerable: true,
53
+ writable: true,
54
+ initializer: null
55
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "organisation_webhook", [_dec3, _dec4], {
56
+ configurable: true,
57
+ enumerable: true,
58
+ writable: true,
59
+ initializer: function () {
60
+ return _organisationWebhook.default;
61
+ }
62
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "is_success", [_dec5], {
63
+ configurable: true,
64
+ enumerable: true,
65
+ writable: true,
66
+ initializer: function () {
67
+ return false;
68
+ }
69
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec6], {
70
+ configurable: true,
71
+ enumerable: true,
72
+ writable: true,
73
+ initializer: null
74
+ }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec7], {
75
+ configurable: true,
76
+ enumerable: true,
77
+ writable: true,
78
+ initializer: null
79
+ })), _class2)) || _class);
package/dist/index.js CHANGED
@@ -663,6 +663,12 @@ Object.defineProperty(exports, "WarehouseService", {
663
663
  return _warehouse.default;
664
664
  }
665
665
  });
666
+ Object.defineProperty(exports, "WebhookLog", {
667
+ enumerable: true,
668
+ get: function () {
669
+ return _webhookLog.default;
670
+ }
671
+ });
666
672
  Object.defineProperty(exports, "WebhookTypesEntity", {
667
673
  enumerable: true,
668
674
  get: function () {
@@ -822,6 +828,8 @@ var _organisationPayoutConfig = _interopRequireDefault(require("./entity/user/or
822
828
 
823
829
  var _organisationPartner = _interopRequireDefault(require("./entity/user/organisation-partner"));
824
830
 
831
+ var _webhookLog = _interopRequireDefault(require("./entity/user/webhook-log"));
832
+
825
833
  var _batch3 = _interopRequireDefault(require("./entity/nuvei/batch"));
826
834
 
827
835
  var _merchant2 = _interopRequireDefault(require("./entity/nuvei/merchant"));
@@ -0,0 +1,15 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class webhookLog1696844776497 {
4
+ name = 'webhookLog1696844776497'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`CREATE TABLE "user"."webhook_log" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "is_success" 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(), "webhook_id" uuid, CONSTRAINT "PK_5164958b17361a85955a433d958" PRIMARY KEY ("id"))`);
8
+ await queryRunner.query(`ALTER TABLE "user"."webhook_log" ADD CONSTRAINT "FK_56a3f6a8db5033543a35f2ede5b" FOREIGN KEY ("webhook_id") REFERENCES "user"."organisation_webhook"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
9
+ }
10
+
11
+ async down(queryRunner) {
12
+ await queryRunner.query(`ALTER TABLE "user"."webhook_log" DROP CONSTRAINT "FK_56a3f6a8db5033543a35f2ede5b"`);
13
+ await queryRunner.query(`DROP TABLE "user"."webhook_log"`);
14
+ }
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.11.47",
3
+ "version": "1.11.49",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
@@ -33,7 +33,6 @@
33
33
  "@babel/plugin-transform-flow-strip-types": "^7.16.7",
34
34
  "@babel/plugin-transform-modules-commonjs": "^7.23.0",
35
35
  "@babel/preset-env": "^7.16.11",
36
- "@felloh-org/eslint-config": "^1.0.2",
37
36
  "@types/jest": "^27.4.1",
38
37
  "aws-sdk": "^2.1470.0",
39
38
  "babel-eslint": "^10.1.0",
@@ -41,6 +40,7 @@
41
40
  "babel-plugin-module-resolver": "^4.1.0",
42
41
  "babel-plugin-transform-class-properties": "^6.24.1",
43
42
  "eslint": "^8.12.0",
43
+ "eslint-config-airbnb-base": "^15.0.0",
44
44
  "eslint-plugin-flowtype": "^8.0.3",
45
45
  "eslint-plugin-import": "^2.26.0",
46
46
  "eslint-plugin-sonarjs": "^0.13.0",