@sphereon/ssi-sdk.data-store 0.15.2-unstable.99 → 0.16.0
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/entities/contact/BaseContactEntity.d.ts.map +1 -1
- package/dist/entities/contact/BaseContactEntity.js.map +1 -1
- package/dist/entities/contact/PartyEntity.d.ts +0 -1
- package/dist/entities/contact/PartyEntity.d.ts.map +1 -1
- package/dist/entities/contact/PartyEntity.js +2 -25
- package/dist/entities/contact/PartyEntity.js.map +1 -1
- package/dist/migrations/generic/1-CreateContacts.d.ts.map +1 -1
- package/dist/migrations/generic/1-CreateContacts.js +4 -2
- package/dist/migrations/generic/1-CreateContacts.js.map +1 -1
- package/dist/migrations/generic/2-CreateContacts.d.ts.map +1 -1
- package/dist/migrations/generic/2-CreateContacts.js +4 -2
- package/dist/migrations/generic/2-CreateContacts.js.map +1 -1
- package/dist/migrations/generic/2-CreateIssuanceBranding.d.ts.map +1 -1
- package/dist/migrations/generic/2-CreateIssuanceBranding.js +4 -2
- package/dist/migrations/generic/2-CreateIssuanceBranding.js.map +1 -1
- package/dist/migrations/generic/3-CreateStatusList.js +4 -4
- package/dist/migrations/generic/3-CreateStatusList.js.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/contact.entities.test.ts +3 -1
- package/src/__tests__/contact.store.test.ts +1 -1
- package/src/__tests__/issuanceBranding.entities.test.ts +1 -1
- package/src/__tests__/issuanceBranding.store.test.ts +1 -1
- package/src/entities/contact/BaseContactEntity.ts +11 -2
- package/src/entities/contact/PartyEntity.ts +0 -18
- package/src/migrations/generic/1-CreateContacts.ts +4 -2
- package/src/migrations/generic/2-CreateContacts.ts +4 -2
- package/src/migrations/generic/2-CreateIssuanceBranding.ts +4 -2
- package/src/migrations/generic/3-CreateStatusList.ts +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseContactEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/contact/BaseContactEntity.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"BaseContactEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/contact/BaseContactEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAUX,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,8BAEsB,iBAAkB,SAAQ,UAAU;IAExD,EAAE,EAAG,MAAM,CAAA;IAGX,SAAS,EAAG,IAAI,CAAA;IAGhB,aAAa,EAAG,IAAI,CAAA;IAMpB,KAAK,EAAG,WAAW,CAAA;IAKnB,iBAAiB,IAAI,IAAI;CAG1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseContactEntity.js","sourceRoot":"","sources":["../../../src/entities/contact/BaseContactEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"BaseContactEntity.js","sourceRoot":"","sources":["../../../src/entities/contact/BaseContactEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAWgB;AAChB,+CAA2C;AAIpC,IAAe,iBAAiB,GAAhC,MAAe,iBAAkB,SAAQ,oBAAU;IAgBxD,qHAAqH;IAGrH,iBAAiB;QACf,IAAI,CAAC,aAAa,GAAG,IAAI,IAAI,EAAE,CAAA;IACjC,CAAC;CACF,CAAA;AArBC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;6CACpB;AAEX;IAAC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;8BAC9C,IAAI;oDAAA;AAEhB;IAAC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;8BAC/C,IAAI;wDAAA;AAEpB;IAAC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,yBAAW,EAAE,CAAC,KAAkB,E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GhB,aAAa,EAAG,IAAI,CAAA;IAKpB,iBAAiB,IAAI,IAAI;IAMnB,
|
|
1
|
+
{"version":3,"file":"PartyEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/contact/PartyEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAYX,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAEnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAEnE,qBACa,WAAY,SAAQ,UAAU;IAEzC,EAAE,EAAG,MAAM,CAAA;IAGX,GAAG,CAAC,EAAE,MAAM,CAAA;IASZ,UAAU,EAAG,KAAK,CAAC,cAAc,CAAC,CAAA;IASlC,mBAAmB,EAAG,KAAK,CAAC,uBAAuB,CAAC,CAAA;IAQpD,SAAS,EAAG,eAAe,CAAA;IAQ3B,OAAO,EAAG,iBAAiB,CAAA;IAS3B,aAAa,EAAG,KAAK,CAAC,uBAAuB,CAAC,CAAA;IAG9C,SAAS,EAAG,IAAI,CAAA;IAGhB,aAAa,EAAG,IAAI,CAAA;IAKpB,iBAAiB,IAAI,IAAI;IAMnB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAUhC"}
|
|
@@ -17,7 +17,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
17
17
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
|
-
var PartyEntity_1;
|
|
21
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
21
|
exports.PartyEntity = void 0;
|
|
23
22
|
const typeorm_1 = require("typeorm");
|
|
@@ -28,26 +27,11 @@ const BaseContactEntity_1 = require("./BaseContactEntity");
|
|
|
28
27
|
const PartyRelationshipEntity_1 = require("./PartyRelationshipEntity");
|
|
29
28
|
const ValidatorUtils_1 = require("../../utils/ValidatorUtils");
|
|
30
29
|
const ElectronicAddressEntity_1 = require("./ElectronicAddressEntity");
|
|
31
|
-
let PartyEntity =
|
|
30
|
+
let PartyEntity = class PartyEntity extends typeorm_1.BaseEntity {
|
|
32
31
|
// By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
|
|
33
32
|
updateUpdatedDate() {
|
|
34
33
|
this.lastUpdatedAt = new Date();
|
|
35
34
|
}
|
|
36
|
-
checkUniqueTenantId() {
|
|
37
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
const result = yield PartyEntity_1.find({
|
|
39
|
-
where: {
|
|
40
|
-
partyType: {
|
|
41
|
-
tenantId: this.partyType.tenantId,
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
if ((result === null || result === void 0 ? void 0 : result.length) > 0) {
|
|
46
|
-
return Promise.reject(Error('Tenant id already in use'));
|
|
47
|
-
}
|
|
48
|
-
return;
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
35
|
validate() {
|
|
52
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
37
|
const validation = yield (0, class_validator_1.validate)(this);
|
|
@@ -134,13 +118,6 @@ __decorate([
|
|
|
134
118
|
__metadata("design:paramtypes", []),
|
|
135
119
|
__metadata("design:returntype", void 0)
|
|
136
120
|
], PartyEntity.prototype, "updateUpdatedDate", null);
|
|
137
|
-
__decorate([
|
|
138
|
-
(0, typeorm_1.BeforeInsert)(),
|
|
139
|
-
(0, typeorm_1.BeforeUpdate)(),
|
|
140
|
-
__metadata("design:type", Function),
|
|
141
|
-
__metadata("design:paramtypes", []),
|
|
142
|
-
__metadata("design:returntype", Promise)
|
|
143
|
-
], PartyEntity.prototype, "checkUniqueTenantId", null);
|
|
144
121
|
__decorate([
|
|
145
122
|
(0, typeorm_1.BeforeInsert)(),
|
|
146
123
|
(0, typeorm_1.BeforeUpdate)(),
|
|
@@ -148,7 +125,7 @@ __decorate([
|
|
|
148
125
|
__metadata("design:paramtypes", []),
|
|
149
126
|
__metadata("design:returntype", Promise)
|
|
150
127
|
], PartyEntity.prototype, "validate", null);
|
|
151
|
-
PartyEntity =
|
|
128
|
+
PartyEntity = __decorate([
|
|
152
129
|
(0, typeorm_1.Entity)('Party')
|
|
153
130
|
], PartyEntity);
|
|
154
131
|
exports.PartyEntity = PartyEntity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PartyEntity.js","sourceRoot":"","sources":["../../../src/entities/contact/PartyEntity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PartyEntity.js","sourceRoot":"","sources":["../../../src/entities/contact/PartyEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,qCAagB;AAEhB,qDAAiD;AACjD,qDAA2D;AAC3D,uDAAmD;AACnD,2DAAuD;AACvD,uEAAmE;AACnE,+DAA0D;AAC1D,uEAAmE;AAG5D,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,oBAAU;IAwDzC,qHAAqH;IAGrH,iBAAiB;QACf,IAAI,CAAC,aAAa,GAAG,IAAI,IAAI,EAAE,CAAA;IACjC,CAAC;IAIK,QAAQ;;YACZ,MAAM,UAAU,GAA2B,MAAM,IAAA,0BAAQ,EAAC,IAAI,CAAC,CAAA;YAC/D,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,MAAM,UAAU,GAAqC,IAAA,8BAAa,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;gBACjF,IAAI,UAAU,EAAE;oBACd,MAAM,OAAO,GAAW,MAAM,CAAC,MAAM,CAAC,UAAW,CAAC,CAAC,CAAC,CAAC,CAAA;oBACrD,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,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|
1
|
+
{"version":3,"file":"1-CreateContacts.d.ts","sourceRoot":"","sources":["../../../src/migrations/generic/1-CreateContacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAOvE,qBAAa,2BAA4B,YAAW,kBAAkB;IACpE,IAAI,SAAgC;IAEvB,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA4B3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CA2B3D"}
|
|
@@ -34,6 +34,7 @@ class CreateContacts1659463079429 {
|
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
case 'sqlite':
|
|
37
|
+
case 'expo':
|
|
37
38
|
case 'react-native': {
|
|
38
39
|
debug('using sqlite/react-native migration file');
|
|
39
40
|
const mig = new _1659463069549_CreateContacts_1.CreateContacts1659463069549();
|
|
@@ -42,7 +43,7 @@ class CreateContacts1659463079429 {
|
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
44
45
|
default:
|
|
45
|
-
return Promise.reject(
|
|
46
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
46
47
|
}
|
|
47
48
|
});
|
|
48
49
|
}
|
|
@@ -59,6 +60,7 @@ class CreateContacts1659463079429 {
|
|
|
59
60
|
return;
|
|
60
61
|
}
|
|
61
62
|
case 'sqlite':
|
|
63
|
+
case 'expo':
|
|
62
64
|
case 'react-native': {
|
|
63
65
|
debug('using sqlite/react-native migration file');
|
|
64
66
|
const mig = new _1659463069549_CreateContacts_1.CreateContacts1659463069549();
|
|
@@ -67,7 +69,7 @@ class CreateContacts1659463079429 {
|
|
|
67
69
|
return;
|
|
68
70
|
}
|
|
69
71
|
default:
|
|
70
|
-
return Promise.reject(
|
|
72
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
71
73
|
}
|
|
72
74
|
});
|
|
73
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/generic/1-CreateContacts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAAyB;AACzB,4FAAsF;AACtF,0FAAoF;AAEpF,MAAM,KAAK,GAAmB,IAAA,eAAK,EAAC,6BAA6B,CAAC,CAAA;AAElE,MAAa,2BAA2B;IAAxC;QACE,SAAI,GAAG,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"1-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/generic/1-CreateContacts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAAyB;AACzB,4FAAsF;AACtF,0FAAoF;AAEpF,MAAM,KAAK,GAAmB,IAAA,eAAK,EAAC,6BAA6B,CAAC,CAAA;AAElE,MAAa,2BAA2B;IAAxC;QACE,SAAI,GAAG,6BAA6B,CAAA;IAyDtC,CAAC;IAvDc,EAAE,CAAC,WAAwB;;YACtC,KAAK,CAAC,qCAAqC,CAAC,CAAA;YAC5C,MAAM,MAAM,GAAiB,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAA;YAEvE,QAAQ,MAAM,EAAE;gBACd,KAAK,UAAU,CAAC,CAAC;oBACf,KAAK,CAAC,+BAA+B,CAAC,CAAA;oBACtC,MAAM,GAAG,GAAgC,IAAI,2DAA2B,EAAE,CAAA;oBAC1E,MAAM,GAAG,CAAC,EAAE,CAAC,WAAW,CAAC,CAAA;oBACzB,KAAK,CAAC,+BAA+B,CAAC,CAAA;oBACtC,OAAM;iBACP;gBACD,KAAK,QAAQ,CAAC;gBACd,KAAK,MAAM,CAAC;gBACZ,KAAK,cAAc,CAAC,CAAC;oBACnB,KAAK,CAAC,0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mappings":"AAAA,OAAO,EAAgB,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAOvE,qBAAa,2BAA4B,YAAW,kBAAkB;IACpE,IAAI,SAAgC;IAEvB,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"2-CreateContacts.d.ts","sourceRoot":"","sources":["../../../src/migrations/generic/2-CreateContacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAOvE,qBAAa,2BAA4B,YAAW,kBAAkB;IACpE,IAAI,SAAgC;IAEvB,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA4B3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CA2B3D"}
|
|
@@ -34,6 +34,7 @@ class CreateContacts1690925872318 {
|
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
case 'sqlite':
|
|
37
|
+
case 'expo':
|
|
37
38
|
case 'react-native': {
|
|
38
39
|
debug('using sqlite/react-native migration file');
|
|
39
40
|
const mig = new _1690925872693_CreateContacts_1.CreateContacts1690925872693();
|
|
@@ -42,7 +43,7 @@ class CreateContacts1690925872318 {
|
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
44
45
|
default:
|
|
45
|
-
return Promise.reject(
|
|
46
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
46
47
|
}
|
|
47
48
|
});
|
|
48
49
|
}
|
|
@@ -59,6 +60,7 @@ class CreateContacts1690925872318 {
|
|
|
59
60
|
return;
|
|
60
61
|
}
|
|
61
62
|
case 'sqlite':
|
|
63
|
+
case 'expo':
|
|
62
64
|
case 'react-native': {
|
|
63
65
|
debug('using sqlite/react-native migration file');
|
|
64
66
|
const mig = new _1690925872693_CreateContacts_1.CreateContacts1690925872693();
|
|
@@ -67,7 +69,7 @@ class CreateContacts1690925872318 {
|
|
|
67
69
|
return;
|
|
68
70
|
}
|
|
69
71
|
default:
|
|
70
|
-
return Promise.reject(
|
|
72
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
71
73
|
}
|
|
72
74
|
});
|
|
73
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/generic/2-CreateContacts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAAyB;AACzB,0FAAoF;AACpF,4FAAsF;AAEtF,MAAM,KAAK,GAAmB,IAAA,eAAK,EAAC,6BAA6B,CAAC,CAAA;AAElE,MAAa,2BAA2B;IAAxC;QACE,SAAI,GAAG,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"2-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/generic/2-CreateContacts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAAyB;AACzB,0FAAoF;AACpF,4FAAsF;AAEtF,MAAM,KAAK,GAAmB,IAAA,eAAK,EAAC,6BAA6B,CAAC,CAAA;AAElE,MAAa,2BAA2B;IAAxC;QACE,SAAI,GAAG,6BAA6B,CAAA;IAyDtC,CAAC;IAvDc,EAAE,CAAC,WAAwB;;YACtC,KAAK,CAAC,qCAAqC,CAAC,CAAA;YAC5C,MAAM,MAAM,GAAiB,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAA;YAEvE,QAAQ,MAAM,EAAE;gBACd,KAAK,UAAU,CAAC,CAAC;oBACf,KAAK,CAAC,+BAA+B,CAAC,CAAA;oBACtC,MAAM,GAAG,GAAgC,IAAI,2DAA2B,EAAE,CAAA;oBAC1E,MAAM,GAAG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,6FAA6F,MAAM,+GAA+G,CACnN,CAAA;aACJ;QACH,CAAC;KAAA;CACF;AA1DD,kEA0DC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2-CreateIssuanceBranding.d.ts","sourceRoot":"","sources":["../../../src/migrations/generic/2-CreateIssuanceBranding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAOvE,qBAAa,mCAAoC,YAAW,kBAAkB;IAC5E,IAAI,SAAwC;IAE/B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"2-CreateIssuanceBranding.d.ts","sourceRoot":"","sources":["../../../src/migrations/generic/2-CreateIssuanceBranding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAOvE,qBAAa,mCAAoC,YAAW,kBAAkB;IAC5E,IAAI,SAAwC;IAE/B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA2B3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CA0B3D"}
|
|
@@ -34,6 +34,7 @@ class CreateIssuanceBranding1659463079429 {
|
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
case 'sqlite':
|
|
37
|
+
case 'expo':
|
|
37
38
|
case 'react-native': {
|
|
38
39
|
debug('using sqlite/react-native migration file');
|
|
39
40
|
const mig = new _1685628973231_CreateIssuanceBranding_1.CreateIssuanceBranding1685628973231();
|
|
@@ -42,7 +43,7 @@ class CreateIssuanceBranding1659463079429 {
|
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
44
45
|
default:
|
|
45
|
-
return Promise.reject(
|
|
46
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
46
47
|
}
|
|
47
48
|
});
|
|
48
49
|
}
|
|
@@ -59,6 +60,7 @@ class CreateIssuanceBranding1659463079429 {
|
|
|
59
60
|
return;
|
|
60
61
|
}
|
|
61
62
|
case 'sqlite':
|
|
63
|
+
case 'expo':
|
|
62
64
|
case 'react-native': {
|
|
63
65
|
debug('using sqlite/react-native migration file');
|
|
64
66
|
const mig = new _1685628973231_CreateIssuanceBranding_1.CreateIssuanceBranding1685628973231();
|
|
@@ -67,7 +69,7 @@ class CreateIssuanceBranding1659463079429 {
|
|
|
67
69
|
return;
|
|
68
70
|
}
|
|
69
71
|
default:
|
|
70
|
-
return Promise.reject(
|
|
72
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
71
73
|
}
|
|
72
74
|
});
|
|
73
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"2-CreateIssuanceBranding.js","sourceRoot":"","sources":["../../../src/migrations/generic/2-CreateIssuanceBranding.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAAyB;AACzB,4GAAsG;AACtG,0GAAoG;AAEpG,MAAM,KAAK,GAAmB,IAAA,eAAK,EAAC,6BAA6B,CAAC,CAAA;AAElE,MAAa,mCAAmC;IAAhD;QACE,SAAI,GAAG,qCAAqC,CAAA;
|
|
1
|
+
{"version":3,"file":"2-CreateIssuanceBranding.js","sourceRoot":"","sources":["../../../src/migrations/generic/2-CreateIssuanceBranding.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAAyB;AACzB,4GAAsG;AACtG,0GAAoG;AAEpG,MAAM,KAAK,GAAmB,IAAA,eAAK,EAAC,6BAA6B,CAAC,CAAA;AAElE,MAAa,mCAAmC;IAAhD;QACE,SAAI,GAAG,qCAAqC,CAAA;IAuD9C,CAAC;IArDc,EAAE,CAAC,WAAwB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M,CAAC;gBACZ,KAAK,cAAc,CAAC,CAAC;oBACnB,KAAK,CAAC,0CAA0C,CAAC,CAAA;oBACjD,MAAM,GAAG,GAAwC,IAAI,2EAAmC,EAAE,CAAA;oBAC1F,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;oBAC3B,KAAK,CAAC,+BAA+B,CAAC,CAAA;oBACtC,OAAM;iBACP;gBACD;oBACE,OAAO,OAAO,CAAC,MAAM,CACnB,6FAA6F,MAAM,+GAA+G,CACnN,CAAA;aACJ;QACH,CAAC;KAAA;CACF;AAxDD,kFAwDC"}
|
|
@@ -32,7 +32,7 @@ class CreateStatusList1693866470000 {
|
|
|
32
32
|
debug('Migration statements executed');
|
|
33
33
|
return up;
|
|
34
34
|
}
|
|
35
|
-
else if (dbType === 'sqlite' || 'react-native') {
|
|
35
|
+
else if (dbType === 'sqlite' || dbType === 'react-native' || dbType === 'expo') {
|
|
36
36
|
debug('using sqlite/react-native migration file');
|
|
37
37
|
const mig = new _1693866470000_CreateStatusList_1.CreateStatusList1693866470002();
|
|
38
38
|
const up = yield mig.up(queryRunner);
|
|
@@ -40,7 +40,7 @@ class CreateStatusList1693866470000 {
|
|
|
40
40
|
return up;
|
|
41
41
|
}
|
|
42
42
|
else {
|
|
43
|
-
return Promise.reject(
|
|
43
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
}
|
|
@@ -55,7 +55,7 @@ class CreateStatusList1693866470000 {
|
|
|
55
55
|
debug('Migration statements executed');
|
|
56
56
|
return down;
|
|
57
57
|
}
|
|
58
|
-
else if (dbType === 'sqlite' || 'react-native') {
|
|
58
|
+
else if (dbType === 'sqlite' || dbType === 'react-native' || dbType === 'expo') {
|
|
59
59
|
debug('using sqlite/react-native migration file');
|
|
60
60
|
const mig = new _1693866470000_CreateStatusList_1.CreateStatusList1693866470002();
|
|
61
61
|
const down = yield mig.down(queryRunner);
|
|
@@ -63,7 +63,7 @@ class CreateStatusList1693866470000 {
|
|
|
63
63
|
return down;
|
|
64
64
|
}
|
|
65
65
|
else {
|
|
66
|
-
return Promise.reject(
|
|
66
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3-CreateStatusList.js","sourceRoot":"","sources":["../../../src/migrations/generic/3-CreateStatusList.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAAyB;AAEzB,+HAA0G;AAC1G,8FAAwF;AAExF,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,6BAA6B,CAAC,CAAA;AAElD,MAAa,6BAA6B;IAA1C;QACE,SAAI,GAAG,+BAA+B,CAAA;IA6CxC,CAAC;IA3Cc,EAAE,CAAC,WAAwB;;YACtC,KAAK,CAAC,8CAA8C,CAAC,CAAA;YACrD,MAAM,MAAM,GAAG,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAA;YACzD,IAAI,MAAM,KAAK,UAAU,EAAE;gBACzB,KAAK,CAAC,+BAA+B,CAAC,CAAA;gBACtC,MAAM,GAAG,GAAG,IAAI,8EAA6B,EAAE,CAAA;gBAC/C,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,WAAW,CAAC,CAAA;gBACpC,KAAK,CAAC,+BAA+B,CAAC,CAAA;gBACtC,OAAO,EAAE,CAAA;aACV;iBAAM,IAAI,MAAM,KAAK,QAAQ,IAAI,cAAc,EAAE;
|
|
1
|
+
{"version":3,"file":"3-CreateStatusList.js","sourceRoot":"","sources":["../../../src/migrations/generic/3-CreateStatusList.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAA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A+B,CAAC,CAAA;gBACtC,MAAM,GAAG,GAAG,IAAI,+DAA6B,EAAE,CAAA;gBAC/C,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;gBACxC,KAAK,CAAC,+BAA+B,CAAC,CAAA;gBACtC,OAAO,IAAI,CAAA;aACZ;iBAAM,IAAI,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,cAAc,IAAI,MAAM,KAAK,MAAM,EAAE;gBAChF,KAAK,CAAC,0CAA0C,CAAC,CAAA;gBACjD,MAAM,GAAG,GAAG,IAAI,+DAA6B,EAAE,CAAA;gBAC/C,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;gBACxC,KAAK,CAAC,+BAA+B,CAAC,CAAA;gBACtC,OAAO,IAAI,CAAA;aACZ;iBAAM;gBACL,OAAO,OAAO,CAAC,MAAM,CACnB,6FAA6F,MAAM,+GAA+G,CACnN,CAAA;aACF;QACH,CAAC;KAAA;CACF;AA9CD,sEA8CC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.data-store",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"typeorm-postgres:migration:run": "pnpm run typeorm -- migration:run -c migration-postgres"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@sphereon/ssi-types": "0.
|
|
16
|
+
"@sphereon/ssi-types": "0.16.0",
|
|
17
17
|
"@veramo/core": "4.2.0",
|
|
18
18
|
"class-validator": "^0.14.0",
|
|
19
19
|
"debug": "^4.3.4",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"PostgreSQL",
|
|
43
43
|
"Contact Store"
|
|
44
44
|
],
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "94504fcadc8f9879d2d8bce2fabdd4b545b0d179"
|
|
46
46
|
}
|
|
@@ -41,6 +41,8 @@ import {
|
|
|
41
41
|
partyTypeEntityFrom,
|
|
42
42
|
} from '../utils/contact/MappingUtils'
|
|
43
43
|
|
|
44
|
+
// TODO write test adding two contacts reusing the same contactType
|
|
45
|
+
|
|
44
46
|
describe('Database entities tests', (): void => {
|
|
45
47
|
let dbConnection: DataSource
|
|
46
48
|
|
|
@@ -48,7 +50,7 @@ describe('Database entities tests', (): void => {
|
|
|
48
50
|
dbConnection = await new DataSource({
|
|
49
51
|
type: 'sqlite',
|
|
50
52
|
database: ':memory:',
|
|
51
|
-
logging: '
|
|
53
|
+
logging: ['info'],
|
|
52
54
|
migrationsRun: false,
|
|
53
55
|
migrations: DataStoreMigrations,
|
|
54
56
|
synchronize: false,
|
|
@@ -23,7 +23,7 @@ describe('Database entities tests', (): void => {
|
|
|
23
23
|
dbConnection = await new DataSource({
|
|
24
24
|
type: 'sqlite',
|
|
25
25
|
database: ':memory:',
|
|
26
|
-
//logging: '
|
|
26
|
+
//logging: ['info'],
|
|
27
27
|
migrationsRun: false,
|
|
28
28
|
migrations: DataStoreMigrations,
|
|
29
29
|
synchronize: false,
|
|
@@ -34,7 +34,7 @@ describe('Issuance branding store tests', (): void => {
|
|
|
34
34
|
dbConnection = await new DataSource({
|
|
35
35
|
type: 'sqlite',
|
|
36
36
|
database: ':memory:',
|
|
37
|
-
//logging: '
|
|
37
|
+
//logging: ['info'],
|
|
38
38
|
migrationsRun: false,
|
|
39
39
|
migrations: DataStoreMigrations,
|
|
40
40
|
synchronize: false,
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
BaseEntity,
|
|
2
3
|
BeforeInsert,
|
|
3
|
-
BeforeUpdate,
|
|
4
|
+
BeforeUpdate,
|
|
5
|
+
CreateDateColumn,
|
|
6
|
+
Entity,
|
|
7
|
+
JoinColumn,
|
|
8
|
+
OneToOne,
|
|
9
|
+
PrimaryGeneratedColumn,
|
|
10
|
+
TableInheritance,
|
|
11
|
+
UpdateDateColumn,
|
|
12
|
+
} from 'typeorm'
|
|
4
13
|
import { PartyEntity } from './PartyEntity'
|
|
5
14
|
|
|
6
15
|
@Entity('BaseContact')
|
|
@@ -85,24 +85,6 @@ export class PartyEntity extends BaseEntity {
|
|
|
85
85
|
this.lastUpdatedAt = new Date()
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
@BeforeInsert()
|
|
89
|
-
@BeforeUpdate()
|
|
90
|
-
async checkUniqueTenantId(): Promise<undefined> {
|
|
91
|
-
const result: Array<PartyEntity> = await PartyEntity.find({
|
|
92
|
-
where: {
|
|
93
|
-
partyType: {
|
|
94
|
-
tenantId: this.partyType.tenantId,
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
})
|
|
98
|
-
|
|
99
|
-
if (result?.length > 0) {
|
|
100
|
-
return Promise.reject(Error('Tenant id already in use'))
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
return
|
|
104
|
-
}
|
|
105
|
-
|
|
106
88
|
@BeforeInsert()
|
|
107
89
|
@BeforeUpdate()
|
|
108
90
|
async validate(): Promise<void> {
|
|
@@ -21,6 +21,7 @@ export class CreateContacts1659463079429 implements MigrationInterface {
|
|
|
21
21
|
return
|
|
22
22
|
}
|
|
23
23
|
case 'sqlite':
|
|
24
|
+
case 'expo':
|
|
24
25
|
case 'react-native': {
|
|
25
26
|
debug('using sqlite/react-native migration file')
|
|
26
27
|
const mig: CreateContacts1659463069549 = new CreateContacts1659463069549()
|
|
@@ -30,7 +31,7 @@ export class CreateContacts1659463079429 implements MigrationInterface {
|
|
|
30
31
|
}
|
|
31
32
|
default:
|
|
32
33
|
return Promise.reject(
|
|
33
|
-
|
|
34
|
+
`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`
|
|
34
35
|
)
|
|
35
36
|
}
|
|
36
37
|
}
|
|
@@ -48,6 +49,7 @@ export class CreateContacts1659463079429 implements MigrationInterface {
|
|
|
48
49
|
return
|
|
49
50
|
}
|
|
50
51
|
case 'sqlite':
|
|
52
|
+
case 'expo':
|
|
51
53
|
case 'react-native': {
|
|
52
54
|
debug('using sqlite/react-native migration file')
|
|
53
55
|
const mig: CreateContacts1659463069549 = new CreateContacts1659463069549()
|
|
@@ -57,7 +59,7 @@ export class CreateContacts1659463079429 implements MigrationInterface {
|
|
|
57
59
|
}
|
|
58
60
|
default:
|
|
59
61
|
return Promise.reject(
|
|
60
|
-
|
|
62
|
+
`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`
|
|
61
63
|
)
|
|
62
64
|
}
|
|
63
65
|
}
|
|
@@ -21,6 +21,7 @@ export class CreateContacts1690925872318 implements MigrationInterface {
|
|
|
21
21
|
return
|
|
22
22
|
}
|
|
23
23
|
case 'sqlite':
|
|
24
|
+
case 'expo':
|
|
24
25
|
case 'react-native': {
|
|
25
26
|
debug('using sqlite/react-native migration file')
|
|
26
27
|
const mig: CreateContacts1690925872693 = new CreateContacts1690925872693()
|
|
@@ -30,7 +31,7 @@ export class CreateContacts1690925872318 implements MigrationInterface {
|
|
|
30
31
|
}
|
|
31
32
|
default:
|
|
32
33
|
return Promise.reject(
|
|
33
|
-
|
|
34
|
+
`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`
|
|
34
35
|
)
|
|
35
36
|
}
|
|
36
37
|
}
|
|
@@ -48,6 +49,7 @@ export class CreateContacts1690925872318 implements MigrationInterface {
|
|
|
48
49
|
return
|
|
49
50
|
}
|
|
50
51
|
case 'sqlite':
|
|
52
|
+
case 'expo':
|
|
51
53
|
case 'react-native': {
|
|
52
54
|
debug('using sqlite/react-native migration file')
|
|
53
55
|
const mig: CreateContacts1690925872693 = new CreateContacts1690925872693()
|
|
@@ -57,7 +59,7 @@ export class CreateContacts1690925872318 implements MigrationInterface {
|
|
|
57
59
|
}
|
|
58
60
|
default:
|
|
59
61
|
return Promise.reject(
|
|
60
|
-
|
|
62
|
+
`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`
|
|
61
63
|
)
|
|
62
64
|
}
|
|
63
65
|
}
|
|
@@ -20,6 +20,7 @@ export class CreateIssuanceBranding1659463079429 implements MigrationInterface {
|
|
|
20
20
|
return
|
|
21
21
|
}
|
|
22
22
|
case 'sqlite':
|
|
23
|
+
case 'expo':
|
|
23
24
|
case 'react-native': {
|
|
24
25
|
debug('using sqlite/react-native migration file')
|
|
25
26
|
const mig: CreateIssuanceBranding1685628973231 = new CreateIssuanceBranding1685628973231()
|
|
@@ -29,7 +30,7 @@ export class CreateIssuanceBranding1659463079429 implements MigrationInterface {
|
|
|
29
30
|
}
|
|
30
31
|
default:
|
|
31
32
|
return Promise.reject(
|
|
32
|
-
|
|
33
|
+
`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`
|
|
33
34
|
)
|
|
34
35
|
}
|
|
35
36
|
}
|
|
@@ -46,6 +47,7 @@ export class CreateIssuanceBranding1659463079429 implements MigrationInterface {
|
|
|
46
47
|
return
|
|
47
48
|
}
|
|
48
49
|
case 'sqlite':
|
|
50
|
+
case 'expo':
|
|
49
51
|
case 'react-native': {
|
|
50
52
|
debug('using sqlite/react-native migration file')
|
|
51
53
|
const mig: CreateIssuanceBranding1685628973231 = new CreateIssuanceBranding1685628973231()
|
|
@@ -55,7 +57,7 @@ export class CreateIssuanceBranding1659463079429 implements MigrationInterface {
|
|
|
55
57
|
}
|
|
56
58
|
default:
|
|
57
59
|
return Promise.reject(
|
|
58
|
-
|
|
60
|
+
`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`
|
|
59
61
|
)
|
|
60
62
|
}
|
|
61
63
|
}
|
|
@@ -17,7 +17,7 @@ export class CreateStatusList1693866470000 implements MigrationInterface {
|
|
|
17
17
|
const up = await mig.up(queryRunner)
|
|
18
18
|
debug('Migration statements executed')
|
|
19
19
|
return up
|
|
20
|
-
} else if (dbType === 'sqlite' || 'react-native') {
|
|
20
|
+
} else if (dbType === 'sqlite' || dbType === 'react-native' || dbType === 'expo') {
|
|
21
21
|
debug('using sqlite/react-native migration file')
|
|
22
22
|
const mig = new CreateStatusList1693866470002()
|
|
23
23
|
const up = await mig.up(queryRunner)
|
|
@@ -25,7 +25,7 @@ export class CreateStatusList1693866470000 implements MigrationInterface {
|
|
|
25
25
|
return up
|
|
26
26
|
} else {
|
|
27
27
|
return Promise.reject(
|
|
28
|
-
|
|
28
|
+
`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`
|
|
29
29
|
)
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -39,7 +39,7 @@ export class CreateStatusList1693866470000 implements MigrationInterface {
|
|
|
39
39
|
const down = await mig.down(queryRunner)
|
|
40
40
|
debug('Migration statements executed')
|
|
41
41
|
return down
|
|
42
|
-
} else if (dbType === 'sqlite' || 'react-native') {
|
|
42
|
+
} else if (dbType === 'sqlite' || dbType === 'react-native' || dbType === 'expo') {
|
|
43
43
|
debug('using sqlite/react-native migration file')
|
|
44
44
|
const mig = new CreateStatusList1693866470002()
|
|
45
45
|
const down = await mig.down(queryRunner)
|
|
@@ -47,7 +47,7 @@ export class CreateStatusList1693866470000 implements MigrationInterface {
|
|
|
47
47
|
return down
|
|
48
48
|
} else {
|
|
49
49
|
return Promise.reject(
|
|
50
|
-
|
|
50
|
+
`Migrations are currently only supported for sqlite, react-native, expor and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`
|
|
51
51
|
)
|
|
52
52
|
}
|
|
53
53
|
}
|