@felloh-org/lambda-wrapper 1.8.2 → 1.8.3

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,75 @@
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("../../user/organisation"));
11
+
12
+ var _user = _interopRequireDefault(require("../../user/user"));
13
+
14
+ var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4;
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 Lead = (_dec = (0, _typeorm.Entity)({
25
+ name: 'lead',
26
+ schema: 'saltedge'
27
+ }), _dec2 = (0, _typeorm.ManyToOne)(() => _user.default, {
28
+ primary: true
29
+ }), _dec3 = (0, _typeorm.JoinColumn)({
30
+ name: 'user_id',
31
+ referencedColumnName: 'id'
32
+ }), _dec4 = (0, _typeorm.Column)({
33
+ type: "varchar",
34
+ length: "150"
35
+ }), _dec5 = (0, _typeorm.CreateDateColumn)({
36
+ type: 'timestamp with time zone'
37
+ }), _dec6 = (0, _typeorm.UpdateDateColumn)({
38
+ type: 'timestamp with time zone'
39
+ }), _dec(_class = (_class2 = class Lead {
40
+ constructor() {
41
+ _initializerDefineProperty(this, "user", _descriptor, this);
42
+
43
+ _initializerDefineProperty(this, "customer_id", _descriptor2, this);
44
+
45
+ _initializerDefineProperty(this, "created_at", _descriptor3, this);
46
+
47
+ _initializerDefineProperty(this, "updated_at", _descriptor4, this);
48
+ }
49
+
50
+ }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "user", [_dec2, _dec3], {
51
+ configurable: true,
52
+ enumerable: true,
53
+ writable: true,
54
+ initializer: function () {
55
+ return _user.default;
56
+ }
57
+ }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "customer_id", [_dec4], {
58
+ configurable: true,
59
+ enumerable: true,
60
+ writable: true,
61
+ initializer: function () {
62
+ return "";
63
+ }
64
+ }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec5], {
65
+ configurable: true,
66
+ enumerable: true,
67
+ writable: true,
68
+ initializer: null
69
+ }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec6], {
70
+ configurable: true,
71
+ enumerable: true,
72
+ writable: true,
73
+ initializer: null
74
+ })), _class2)) || _class);
75
+ exports.default = Lead;
@@ -0,0 +1,15 @@
1
+ const { MigrationInterface, QueryRunner } = require("typeorm");
2
+
3
+ module.exports = class saltedgeLead1679405632954 {
4
+ name = 'saltedgeLead1679405632954'
5
+
6
+ async up(queryRunner) {
7
+ await queryRunner.query(`CREATE TABLE "saltedge"."lead" ("customer_id" character varying(150) NOT NULL, "created_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "updated_at" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), "user_id" character varying NOT NULL, CONSTRAINT "PK_d95426f22d7a273db0f97ce192a" PRIMARY KEY ("user_id"))`);
8
+ await queryRunner.query(`ALTER TABLE "saltedge"."lead" ADD CONSTRAINT "FK_d95426f22d7a273db0f97ce192a" FOREIGN KEY ("user_id") REFERENCES "user"."user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`);
9
+ }
10
+
11
+ async down(queryRunner) {
12
+ await queryRunner.query(`ALTER TABLE "saltedge"."lead" DROP CONSTRAINT "FK_d95426f22d7a273db0f97ce192a"`);
13
+ await queryRunner.query(`DROP TABLE "saltedge"."lead"`);
14
+ }
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@felloh-org/lambda-wrapper",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "Lambda wrapper for all Felloh Serverless Projects",
5
5
  "main": "dist/index.js",
6
6
  "engines": {