@felloh-org/lambda-wrapper 1.10.9 → 1.10.11
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/saltedge/account/index.js +52 -19
- package/dist/migration/saltedge/1686156816151-saltedge_multi_account.js +21 -0
- package/dist/migration/saltedge/1686157077928-saltedge_multi_account_fix.js +19 -0
- package/dist/migration/saltedge/1686218317938-saltedge_account_nickname.js +13 -0
- package/package.json +1 -1
|
@@ -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, _dec18, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12;
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
@@ -40,22 +40,39 @@ 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.Column)({
|
|
65
|
+
type: "varchar",
|
|
66
|
+
length: "250",
|
|
67
|
+
nullable: true
|
|
68
|
+
}), _dec15 = (0, _typeorm.CreateDateColumn)({
|
|
52
69
|
type: 'timestamp with time zone'
|
|
53
|
-
}),
|
|
70
|
+
}), _dec16 = (0, _typeorm.UpdateDateColumn)({
|
|
54
71
|
type: 'timestamp with time zone'
|
|
55
|
-
}),
|
|
72
|
+
}), _dec17 = (0, _typeorm.Column)({
|
|
56
73
|
type: "int",
|
|
57
74
|
nullable: true
|
|
58
|
-
}),
|
|
75
|
+
}), _dec18 = (0, _typeorm.Column)({
|
|
59
76
|
type: "varchar",
|
|
60
77
|
length: "5",
|
|
61
78
|
nullable: true
|
|
@@ -69,17 +86,21 @@ let Account = (_dec = (0, _typeorm.Entity)({
|
|
|
69
86
|
|
|
70
87
|
_initializerDefineProperty(this, "organisation", _descriptor4, this);
|
|
71
88
|
|
|
72
|
-
_initializerDefineProperty(this, "
|
|
89
|
+
_initializerDefineProperty(this, "organisations", _descriptor5, this);
|
|
73
90
|
|
|
74
|
-
_initializerDefineProperty(this, "
|
|
91
|
+
_initializerDefineProperty(this, "iban", _descriptor6, this);
|
|
75
92
|
|
|
76
|
-
_initializerDefineProperty(this, "
|
|
93
|
+
_initializerDefineProperty(this, "name", _descriptor7, this);
|
|
77
94
|
|
|
78
|
-
_initializerDefineProperty(this, "
|
|
95
|
+
_initializerDefineProperty(this, "nickname", _descriptor8, this);
|
|
79
96
|
|
|
80
|
-
_initializerDefineProperty(this, "
|
|
97
|
+
_initializerDefineProperty(this, "created_at", _descriptor9, this);
|
|
81
98
|
|
|
82
|
-
_initializerDefineProperty(this, "
|
|
99
|
+
_initializerDefineProperty(this, "updated_at", _descriptor10, this);
|
|
100
|
+
|
|
101
|
+
_initializerDefineProperty(this, "balance", _descriptor11, this);
|
|
102
|
+
|
|
103
|
+
_initializerDefineProperty(this, "currency", _descriptor12, this);
|
|
83
104
|
}
|
|
84
105
|
|
|
85
106
|
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "id", [_dec2], {
|
|
@@ -110,36 +131,48 @@ let Account = (_dec = (0, _typeorm.Entity)({
|
|
|
110
131
|
initializer: function () {
|
|
111
132
|
return _organisation.default;
|
|
112
133
|
}
|
|
113
|
-
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "
|
|
134
|
+
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "organisations", [_dec9, _dec10], {
|
|
135
|
+
configurable: true,
|
|
136
|
+
enumerable: true,
|
|
137
|
+
writable: true,
|
|
138
|
+
initializer: null
|
|
139
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "iban", [_dec11, _dec12], {
|
|
114
140
|
configurable: true,
|
|
115
141
|
enumerable: true,
|
|
116
142
|
writable: true,
|
|
117
143
|
initializer: function () {
|
|
118
144
|
return _account.default;
|
|
119
145
|
}
|
|
120
|
-
}),
|
|
146
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "name", [_dec13], {
|
|
147
|
+
configurable: true,
|
|
148
|
+
enumerable: true,
|
|
149
|
+
writable: true,
|
|
150
|
+
initializer: function () {
|
|
151
|
+
return "";
|
|
152
|
+
}
|
|
153
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "nickname", [_dec14], {
|
|
121
154
|
configurable: true,
|
|
122
155
|
enumerable: true,
|
|
123
156
|
writable: true,
|
|
124
157
|
initializer: function () {
|
|
125
158
|
return "";
|
|
126
159
|
}
|
|
127
|
-
}),
|
|
160
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, "created_at", [_dec15], {
|
|
128
161
|
configurable: true,
|
|
129
162
|
enumerable: true,
|
|
130
163
|
writable: true,
|
|
131
164
|
initializer: null
|
|
132
|
-
}),
|
|
165
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class2.prototype, "updated_at", [_dec16], {
|
|
133
166
|
configurable: true,
|
|
134
167
|
enumerable: true,
|
|
135
168
|
writable: true,
|
|
136
169
|
initializer: null
|
|
137
|
-
}),
|
|
170
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "balance", [_dec17], {
|
|
138
171
|
configurable: true,
|
|
139
172
|
enumerable: true,
|
|
140
173
|
writable: true,
|
|
141
174
|
initializer: null
|
|
142
|
-
}),
|
|
175
|
+
}), _descriptor12 = _applyDecoratedDescriptor(_class2.prototype, "currency", [_dec18], {
|
|
143
176
|
configurable: true,
|
|
144
177
|
enumerable: true,
|
|
145
178
|
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
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class saltedgeAccountNickname1686218317938 {
|
|
4
|
+
name = 'saltedgeAccountNickname1686218317938'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account" ADD "nickname" character varying(250)`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async down(queryRunner) {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE "saltedge"."account" DROP COLUMN "nickname"`);
|
|
12
|
+
}
|
|
13
|
+
}
|