@felloh-org/lambda-wrapper 1.10.9 → 1.10.10
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.
|
@@ -15,7 +15,7 @@ var _account = _interopRequireDefault(require("../../bank/account"));
|
|
|
15
15
|
|
|
16
16
|
var _lead = _interopRequireDefault(require("../lead"));
|
|
17
17
|
|
|
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;
|
|
18
|
+
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;
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
@@ -40,22 +40,35 @@ let Account = (_dec = (0, _typeorm.Entity)({
|
|
|
40
40
|
}), _dec7 = (0, _typeorm.ManyToOne)(() => _organisation.default), _dec8 = (0, _typeorm.JoinColumn)({
|
|
41
41
|
name: 'organisation_id',
|
|
42
42
|
referencedColumnName: 'id'
|
|
43
|
-
}), _dec9 = (0, _typeorm.
|
|
43
|
+
}), _dec9 = (0, _typeorm.ManyToMany)(() => _organisation.default, () => {}, {
|
|
44
|
+
cascade: true
|
|
45
|
+
}), _dec10 = (0, _typeorm.JoinTable)({
|
|
46
|
+
name: "account_organisation",
|
|
47
|
+
schema: "saltedge",
|
|
48
|
+
joinColumn: {
|
|
49
|
+
name: "account_id",
|
|
50
|
+
referencedColumnName: "id"
|
|
51
|
+
},
|
|
52
|
+
inverseJoinColumn: {
|
|
53
|
+
name: "organisation_id",
|
|
54
|
+
referencedColumnName: "id"
|
|
55
|
+
}
|
|
56
|
+
}), _dec11 = (0, _typeorm.ManyToOne)(() => _account.default), _dec12 = (0, _typeorm.JoinColumn)({
|
|
44
57
|
name: 'iban',
|
|
45
58
|
referencedColumnName: 'iban',
|
|
46
59
|
nullable: true
|
|
47
|
-
}),
|
|
60
|
+
}), _dec13 = (0, _typeorm.Column)({
|
|
48
61
|
type: "varchar",
|
|
49
62
|
length: "150",
|
|
50
63
|
nullable: true
|
|
51
|
-
}),
|
|
64
|
+
}), _dec14 = (0, _typeorm.CreateDateColumn)({
|
|
52
65
|
type: 'timestamp with time zone'
|
|
53
|
-
}),
|
|
66
|
+
}), _dec15 = (0, _typeorm.UpdateDateColumn)({
|
|
54
67
|
type: 'timestamp with time zone'
|
|
55
|
-
}),
|
|
68
|
+
}), _dec16 = (0, _typeorm.Column)({
|
|
56
69
|
type: "int",
|
|
57
70
|
nullable: true
|
|
58
|
-
}),
|
|
71
|
+
}), _dec17 = (0, _typeorm.Column)({
|
|
59
72
|
type: "varchar",
|
|
60
73
|
length: "5",
|
|
61
74
|
nullable: true
|
|
@@ -69,17 +82,19 @@ let Account = (_dec = (0, _typeorm.Entity)({
|
|
|
69
82
|
|
|
70
83
|
_initializerDefineProperty(this, "organisation", _descriptor4, this);
|
|
71
84
|
|
|
72
|
-
_initializerDefineProperty(this, "
|
|
85
|
+
_initializerDefineProperty(this, "organisations", _descriptor5, this);
|
|
86
|
+
|
|
87
|
+
_initializerDefineProperty(this, "iban", _descriptor6, this);
|
|
73
88
|
|
|
74
|
-
_initializerDefineProperty(this, "name",
|
|
89
|
+
_initializerDefineProperty(this, "name", _descriptor7, this);
|
|
75
90
|
|
|
76
|
-
_initializerDefineProperty(this, "created_at",
|
|
91
|
+
_initializerDefineProperty(this, "created_at", _descriptor8, this);
|
|
77
92
|
|
|
78
|
-
_initializerDefineProperty(this, "updated_at",
|
|
93
|
+
_initializerDefineProperty(this, "updated_at", _descriptor9, this);
|
|
79
94
|
|
|
80
|
-
_initializerDefineProperty(this, "balance",
|
|
95
|
+
_initializerDefineProperty(this, "balance", _descriptor10, this);
|
|
81
96
|
|
|
82
|
-
_initializerDefineProperty(this, "currency",
|
|
97
|
+
_initializerDefineProperty(this, "currency", _descriptor11, this);
|
|
83
98
|
}
|
|
84
99
|
|
|
85
100
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
@@ -110,36 +125,41 @@ let Account = (_dec = (0, _typeorm.Entity)({
|
|
|
110
125
|
initializer: function () {
|
|
111
126
|
return _organisation.default;
|
|
112
127
|
}
|
|
113
|
-
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
128
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "organisations", [_dec9, _dec10], {
|
|
129
|
+
configurable: true,
|
|
130
|
+
enumerable: true,
|
|
131
|
+
writable: true,
|
|
132
|
+
initializer: null
|
|
133
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "iban", [_dec11, _dec12], {
|
|
114
134
|
configurable: true,
|
|
115
135
|
enumerable: true,
|
|
116
136
|
writable: true,
|
|
117
137
|
initializer: function () {
|
|
118
138
|
return _account.default;
|
|
119
139
|
}
|
|
120
|
-
}),
|
|
140
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "name", [_dec13], {
|
|
121
141
|
configurable: true,
|
|
122
142
|
enumerable: true,
|
|
123
143
|
writable: true,
|
|
124
144
|
initializer: function () {
|
|
125
145
|
return "";
|
|
126
146
|
}
|
|
127
|
-
}),
|
|
147
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec14], {
|
|
128
148
|
configurable: true,
|
|
129
149
|
enumerable: true,
|
|
130
150
|
writable: true,
|
|
131
151
|
initializer: null
|
|
132
|
-
}),
|
|
152
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec15], {
|
|
133
153
|
configurable: true,
|
|
134
154
|
enumerable: true,
|
|
135
155
|
writable: true,
|
|
136
156
|
initializer: null
|
|
137
|
-
}),
|
|
157
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "balance", [_dec16], {
|
|
138
158
|
configurable: true,
|
|
139
159
|
enumerable: true,
|
|
140
160
|
writable: true,
|
|
141
161
|
initializer: null
|
|
142
|
-
}),
|
|
162
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec17], {
|
|
143
163
|
configurable: true,
|
|
144
164
|
enumerable: true,
|
|
145
165
|
writable: true,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class saltedgeMultiAccount1686156816151 {
|
|
4
|
+
name = 'saltedgeMultiAccount1686156816151'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE "saltedge"."account_organisation" ("organisation_id" character varying(150) NOT NULL, "account_id" character varying(150) NOT NULL, CONSTRAINT "PK_1a2b2a8074c5ea92b737c43968e" PRIMARY KEY ("organisation_id", "account_id"))`);
|
|
8
|
+
await queryRunner.query(`CREATE INDEX "IDX_397eb56a86a22ebf84f02fdd36" ON "saltedge"."account_organisation" ("organisation_id") `);
|
|
9
|
+
await queryRunner.query(`CREATE INDEX "IDX_500714c83d3da008280f975581" ON "saltedge"."account_organisation" ("account_id") `);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account_organisation" ADD CONSTRAINT "FK_397eb56a86a22ebf84f02fdd361" FOREIGN KEY ("organisation_id") REFERENCES "saltedge"."account"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account_organisation" ADD CONSTRAINT "FK_500714c83d3da008280f9755811" FOREIGN KEY ("account_id") REFERENCES "user"."organisation"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async down(queryRunner) {
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account_organisation" DROP CONSTRAINT "FK_500714c83d3da008280f9755811"`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account_organisation" DROP CONSTRAINT "FK_397eb56a86a22ebf84f02fdd361"`);
|
|
17
|
+
await queryRunner.query(`DROP INDEX "saltedge"."IDX_500714c83d3da008280f975581"`);
|
|
18
|
+
await queryRunner.query(`DROP INDEX "saltedge"."IDX_397eb56a86a22ebf84f02fdd36"`);
|
|
19
|
+
await queryRunner.query(`DROP TABLE "saltedge"."account_organisation"`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class saltedgeMultiAccountFix1686157077928 {
|
|
4
|
+
name = 'saltedgeMultiAccountFix1686157077928'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account_organisation" DROP CONSTRAINT "FK_397eb56a86a22ebf84f02fdd361"`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account_organisation" DROP CONSTRAINT "FK_500714c83d3da008280f9755811"`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account_organisation" ADD CONSTRAINT "FK_500714c83d3da008280f9755811" FOREIGN KEY ("account_id") REFERENCES "saltedge"."account"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account_organisation" ADD CONSTRAINT "FK_397eb56a86a22ebf84f02fdd361" FOREIGN KEY ("organisation_id") REFERENCES "user"."organisation"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async down(queryRunner) {
|
|
14
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account_organisation" DROP CONSTRAINT "FK_397eb56a86a22ebf84f02fdd361"`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account_organisation" DROP CONSTRAINT "FK_500714c83d3da008280f9755811"`);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account_organisation" ADD CONSTRAINT "FK_500714c83d3da008280f9755811" FOREIGN KEY ("account_id") REFERENCES "user"."organisation"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account_organisation" ADD CONSTRAINT "FK_397eb56a86a22ebf84f02fdd361" FOREIGN KEY ("organisation_id") REFERENCES "saltedge"."account"("id") ON DELETE CASCADE ON UPDATE CASCADE`);
|
|
18
|
+
}
|
|
19
|
+
}
|