@felloh-org/lambda-wrapper 1.8.1 → 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.
- package/dist/entity/bank/account/index.js +1 -1
- package/dist/entity/saltedge/account/index.js +24 -1
- package/dist/entity/saltedge/lead/index.js +75 -0
- package/dist/entity/saltedge/transaction/index.js +28 -15
- package/dist/migration/1679405632954-saltedge_lead.js +15 -0
- package/dist/migration/saltedge/1678721742595-saltedge_currencies.js +17 -0
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ var _connection = _interopRequireDefault(require("../connection"));
|
|
|
15
15
|
|
|
16
16
|
var _account = _interopRequireDefault(require("../../bank/account"));
|
|
17
17
|
|
|
18
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8;
|
|
18
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10;
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
@@ -51,6 +51,13 @@ let Account = (_dec = (0, _typeorm.Entity)({
|
|
|
51
51
|
type: 'timestamp with time zone'
|
|
52
52
|
}), _dec13 = (0, _typeorm.UpdateDateColumn)({
|
|
53
53
|
type: 'timestamp with time zone'
|
|
54
|
+
}), _dec14 = (0, _typeorm.Column)({
|
|
55
|
+
type: "int",
|
|
56
|
+
nullable: true
|
|
57
|
+
}), _dec15 = (0, _typeorm.Column)({
|
|
58
|
+
type: "varchar",
|
|
59
|
+
length: "5",
|
|
60
|
+
nullable: true
|
|
54
61
|
}), _dec(_class = (_class2 = class Account {
|
|
55
62
|
constructor() {
|
|
56
63
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
@@ -68,6 +75,10 @@ let Account = (_dec = (0, _typeorm.Entity)({
|
|
|
68
75
|
_initializerDefineProperty(this, "created_at", _descriptor7, this);
|
|
69
76
|
|
|
70
77
|
_initializerDefineProperty(this, "updated_at", _descriptor8, this);
|
|
78
|
+
|
|
79
|
+
_initializerDefineProperty(this, "balance", _descriptor9, this);
|
|
80
|
+
|
|
81
|
+
_initializerDefineProperty(this, "currency", _descriptor10, this);
|
|
71
82
|
}
|
|
72
83
|
|
|
73
84
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
@@ -122,5 +133,17 @@ let Account = (_dec = (0, _typeorm.Entity)({
|
|
|
122
133
|
enumerable: true,
|
|
123
134
|
writable: true,
|
|
124
135
|
initializer: null
|
|
136
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "balance", [_dec14], {
|
|
137
|
+
configurable: true,
|
|
138
|
+
enumerable: true,
|
|
139
|
+
writable: true,
|
|
140
|
+
initializer: null
|
|
141
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec15], {
|
|
142
|
+
configurable: true,
|
|
143
|
+
enumerable: true,
|
|
144
|
+
writable: true,
|
|
145
|
+
initializer: function () {
|
|
146
|
+
return "";
|
|
147
|
+
}
|
|
125
148
|
})), _class2)) || _class);
|
|
126
149
|
exports.default = Account;
|
|
@@ -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;
|
|
@@ -13,7 +13,7 @@ var _account = _interopRequireDefault(require("../account"));
|
|
|
13
13
|
|
|
14
14
|
var _account2 = _interopRequireDefault(require("../../bank/account"));
|
|
15
15
|
|
|
16
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11;
|
|
16
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12;
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
@@ -47,18 +47,22 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
47
47
|
type: "int"
|
|
48
48
|
}), _dec10 = (0, _typeorm.Column)({
|
|
49
49
|
type: "varchar",
|
|
50
|
-
length: "
|
|
50
|
+
length: "5",
|
|
51
51
|
nullable: true
|
|
52
52
|
}), _dec11 = (0, _typeorm.Column)({
|
|
53
53
|
type: "varchar",
|
|
54
|
-
length: "
|
|
54
|
+
length: "250",
|
|
55
|
+
nullable: true
|
|
55
56
|
}), _dec12 = (0, _typeorm.Column)({
|
|
57
|
+
type: "varchar",
|
|
58
|
+
length: "100"
|
|
59
|
+
}), _dec13 = (0, _typeorm.Column)({
|
|
56
60
|
type: "varchar",
|
|
57
61
|
length: "100",
|
|
58
62
|
nullable: true
|
|
59
|
-
}),
|
|
63
|
+
}), _dec14 = (0, _typeorm.CreateDateColumn)({
|
|
60
64
|
type: 'timestamp with time zone'
|
|
61
|
-
}),
|
|
65
|
+
}), _dec15 = (0, _typeorm.UpdateDateColumn)({
|
|
62
66
|
type: 'timestamp with time zone'
|
|
63
67
|
}), _dec(_class = (_class2 = class Transaction {
|
|
64
68
|
constructor() {
|
|
@@ -74,15 +78,17 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
74
78
|
|
|
75
79
|
_initializerDefineProperty(this, "amount", _descriptor6, this);
|
|
76
80
|
|
|
77
|
-
_initializerDefineProperty(this, "
|
|
81
|
+
_initializerDefineProperty(this, "currency", _descriptor7, this);
|
|
82
|
+
|
|
83
|
+
_initializerDefineProperty(this, "description", _descriptor8, this);
|
|
78
84
|
|
|
79
|
-
_initializerDefineProperty(this, "status",
|
|
85
|
+
_initializerDefineProperty(this, "status", _descriptor9, this);
|
|
80
86
|
|
|
81
|
-
_initializerDefineProperty(this, "category",
|
|
87
|
+
_initializerDefineProperty(this, "category", _descriptor10, this);
|
|
82
88
|
|
|
83
|
-
_initializerDefineProperty(this, "created_at",
|
|
89
|
+
_initializerDefineProperty(this, "created_at", _descriptor11, this);
|
|
84
90
|
|
|
85
|
-
_initializerDefineProperty(this, "updated_at",
|
|
91
|
+
_initializerDefineProperty(this, "updated_at", _descriptor12, this);
|
|
86
92
|
}
|
|
87
93
|
|
|
88
94
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
@@ -125,33 +131,40 @@ let Transaction = (_dec = (0, _typeorm.Entity)({
|
|
|
125
131
|
enumerable: true,
|
|
126
132
|
writable: true,
|
|
127
133
|
initializer: null
|
|
128
|
-
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
134
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec10], {
|
|
135
|
+
configurable: true,
|
|
136
|
+
enumerable: true,
|
|
137
|
+
writable: true,
|
|
138
|
+
initializer: function () {
|
|
139
|
+
return "";
|
|
140
|
+
}
|
|
141
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "description", [_dec11], {
|
|
129
142
|
configurable: true,
|
|
130
143
|
enumerable: true,
|
|
131
144
|
writable: true,
|
|
132
145
|
initializer: function () {
|
|
133
146
|
return "";
|
|
134
147
|
}
|
|
135
|
-
}),
|
|
148
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "status", [_dec12], {
|
|
136
149
|
configurable: true,
|
|
137
150
|
enumerable: true,
|
|
138
151
|
writable: true,
|
|
139
152
|
initializer: function () {
|
|
140
153
|
return "";
|
|
141
154
|
}
|
|
142
|
-
}),
|
|
155
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "category", [_dec13], {
|
|
143
156
|
configurable: true,
|
|
144
157
|
enumerable: true,
|
|
145
158
|
writable: true,
|
|
146
159
|
initializer: function () {
|
|
147
160
|
return "";
|
|
148
161
|
}
|
|
149
|
-
}),
|
|
162
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec14], {
|
|
150
163
|
configurable: true,
|
|
151
164
|
enumerable: true,
|
|
152
165
|
writable: true,
|
|
153
166
|
initializer: null
|
|
154
|
-
}),
|
|
167
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec15], {
|
|
155
168
|
configurable: true,
|
|
156
169
|
enumerable: true,
|
|
157
170
|
writable: true,
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class saltedgeCurrencies1678721742595 {
|
|
4
|
+
name = 'saltedgeCurrencies1678721742595'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account" ADD "balance" integer`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account" ADD "currency" character varying(5)`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."transaction" ADD "currency" character varying(5)`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async down(queryRunner) {
|
|
13
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."transaction" DROP COLUMN "currency"`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account" DROP COLUMN "currency"`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account" DROP COLUMN "balance"`);
|
|
16
|
+
}
|
|
17
|
+
}
|