@sphereon/ssi-sdk.data-store 0.15.2-next.5 → 0.15.2-next.77
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/contact/AbstractContactStore.d.ts +21 -11
- package/dist/contact/AbstractContactStore.d.ts.map +1 -1
- package/dist/contact/AbstractContactStore.js.map +1 -1
- package/dist/contact/ContactStore.d.ts +25 -21
- package/dist/contact/ContactStore.d.ts.map +1 -1
- package/dist/contact/ContactStore.js +216 -136
- package/dist/contact/ContactStore.js.map +1 -1
- package/dist/entities/contact/BaseConfigEntity.d.ts +2 -0
- package/dist/entities/contact/BaseConfigEntity.d.ts.map +1 -1
- package/dist/entities/contact/BaseConfigEntity.js +10 -2
- package/dist/entities/contact/BaseConfigEntity.js.map +1 -1
- package/dist/entities/contact/BaseContactEntity.d.ts +10 -0
- package/dist/entities/contact/BaseContactEntity.d.ts.map +1 -0
- package/dist/entities/contact/BaseContactEntity.js +54 -0
- package/dist/entities/contact/BaseContactEntity.js.map +1 -0
- package/dist/entities/contact/ConnectionEntity.d.ts +1 -2
- package/dist/entities/contact/ConnectionEntity.d.ts.map +1 -1
- package/dist/entities/contact/ConnectionEntity.js +2 -21
- package/dist/entities/contact/ConnectionEntity.js.map +1 -1
- package/dist/entities/contact/CorrelationIdentifierEntity.d.ts +2 -3
- package/dist/entities/contact/CorrelationIdentifierEntity.d.ts.map +1 -1
- package/dist/entities/contact/CorrelationIdentifierEntity.js +8 -11
- package/dist/entities/contact/CorrelationIdentifierEntity.js.map +1 -1
- package/dist/entities/contact/DidAuthConfigEntity.d.ts +0 -4
- package/dist/entities/contact/DidAuthConfigEntity.d.ts.map +1 -1
- package/dist/entities/contact/DidAuthConfigEntity.js +1 -17
- package/dist/entities/contact/DidAuthConfigEntity.js.map +1 -1
- package/dist/entities/contact/ElectronicAddressEntity.d.ts +14 -0
- package/dist/entities/contact/ElectronicAddressEntity.d.ts.map +1 -0
- package/dist/entities/contact/ElectronicAddressEntity.js +92 -0
- package/dist/entities/contact/ElectronicAddressEntity.js.map +1 -0
- package/dist/entities/contact/IdentityEntity.d.ts +5 -6
- package/dist/entities/contact/IdentityEntity.d.ts.map +1 -1
- package/dist/entities/contact/IdentityEntity.js +15 -20
- package/dist/entities/contact/IdentityEntity.js.map +1 -1
- package/dist/entities/contact/IdentityMetadataItemEntity.d.ts +1 -3
- package/dist/entities/contact/IdentityMetadataItemEntity.d.ts.map +1 -1
- package/dist/entities/contact/IdentityMetadataItemEntity.js +7 -10
- package/dist/entities/contact/IdentityMetadataItemEntity.js.map +1 -1
- package/dist/entities/contact/NaturalPersonEntity.d.ts +9 -0
- package/dist/entities/contact/NaturalPersonEntity.d.ts.map +1 -0
- package/dist/entities/contact/NaturalPersonEntity.js +72 -0
- package/dist/entities/contact/NaturalPersonEntity.js.map +1 -0
- package/dist/entities/contact/OpenIdConfigEntity.d.ts +0 -4
- package/dist/entities/contact/OpenIdConfigEntity.d.ts.map +1 -1
- package/dist/entities/contact/OpenIdConfigEntity.js +1 -22
- package/dist/entities/contact/OpenIdConfigEntity.js.map +1 -1
- package/dist/entities/contact/OrganizationEntity.d.ts +9 -0
- package/dist/entities/contact/OrganizationEntity.d.ts.map +1 -0
- package/dist/entities/contact/OrganizationEntity.js +67 -0
- package/dist/entities/contact/OrganizationEntity.js.map +1 -0
- package/dist/entities/contact/PartyEntity.d.ts +21 -0
- package/dist/entities/contact/PartyEntity.d.ts.map +1 -0
- package/dist/entities/contact/PartyEntity.js +155 -0
- package/dist/entities/contact/PartyEntity.js.map +1 -0
- package/dist/entities/contact/PartyRelationshipEntity.d.ts +13 -0
- package/dist/entities/contact/PartyRelationshipEntity.d.ts.map +1 -0
- package/dist/entities/contact/PartyRelationshipEntity.js +95 -0
- package/dist/entities/contact/PartyRelationshipEntity.js.map +1 -0
- package/dist/entities/contact/PartyTypeEntity.d.ts +15 -0
- package/dist/entities/contact/PartyTypeEntity.d.ts.map +1 -0
- package/dist/entities/contact/{ContactEntity.js → PartyTypeEntity.js} +35 -36
- package/dist/entities/contact/PartyTypeEntity.js.map +1 -0
- package/dist/entities/statusList2021/StatusList2021Entity.d.ts +19 -0
- package/dist/entities/statusList2021/StatusList2021Entity.d.ts.map +1 -0
- package/dist/entities/statusList2021/StatusList2021Entity.js +115 -0
- package/dist/entities/statusList2021/StatusList2021Entity.js.map +1 -0
- package/dist/entities/statusList2021/StatusList2021EntryEntity.d.ts +11 -0
- package/dist/entities/statusList2021/StatusList2021EntryEntity.d.ts.map +1 -0
- package/dist/entities/statusList2021/StatusList2021EntryEntity.js +51 -0
- package/dist/entities/statusList2021/StatusList2021EntryEntity.js.map +1 -0
- package/dist/index.d.ts +20 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -11
- package/dist/index.js.map +1 -1
- package/dist/migrations/generic/1-CreateContacts.d.ts.map +1 -1
- package/dist/migrations/generic/1-CreateContacts.js +36 -32
- package/dist/migrations/generic/1-CreateContacts.js.map +1 -1
- package/dist/migrations/generic/2-CreateContacts.d.ts +7 -0
- package/dist/migrations/generic/2-CreateContacts.d.ts.map +1 -0
- package/dist/migrations/generic/2-CreateContacts.js +76 -0
- package/dist/migrations/generic/2-CreateContacts.js.map +1 -0
- package/dist/migrations/generic/{1-CreateIssuanceBranding.d.ts → 2-CreateIssuanceBranding.d.ts} +1 -1
- package/dist/migrations/generic/2-CreateIssuanceBranding.d.ts.map +1 -0
- package/dist/migrations/generic/2-CreateIssuanceBranding.js +76 -0
- package/dist/migrations/generic/2-CreateIssuanceBranding.js.map +1 -0
- package/dist/migrations/generic/3-CreateStatusList.d.ts +7 -0
- package/dist/migrations/generic/3-CreateStatusList.d.ts.map +1 -0
- package/dist/migrations/generic/{1-CreateIssuanceBranding.js → 3-CreateStatusList.js} +11 -11
- package/dist/migrations/generic/3-CreateStatusList.js.map +1 -0
- package/dist/migrations/generic/index.d.ts +5 -0
- package/dist/migrations/generic/index.d.ts.map +1 -1
- package/dist/migrations/generic/index.js +10 -3
- package/dist/migrations/generic/index.js.map +1 -1
- package/dist/migrations/internal-migrations-ormconfig.d.ts +2 -1
- package/dist/migrations/internal-migrations-ormconfig.d.ts.map +1 -1
- package/dist/migrations/internal-migrations-ormconfig.js +0 -2
- package/dist/migrations/internal-migrations-ormconfig.js.map +1 -1
- package/dist/migrations/postgres/1659463079428-CreateContacts.d.ts.map +1 -1
- package/dist/migrations/postgres/1659463079428-CreateContacts.js +4 -2
- package/dist/migrations/postgres/1659463079428-CreateContacts.js.map +1 -1
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.d.ts.map +1 -1
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js +2 -0
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js.map +1 -1
- package/dist/migrations/postgres/1690925872592-CreateContacts.d.ts +7 -0
- package/dist/migrations/postgres/1690925872592-CreateContacts.d.ts.map +1 -0
- package/dist/migrations/postgres/1690925872592-CreateContacts.js +69 -0
- package/dist/migrations/postgres/1690925872592-CreateContacts.js.map +1 -0
- package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.d.ts +7 -0
- package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.d.ts.map +1 -0
- package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.js +32 -0
- package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.js.map +1 -0
- package/dist/migrations/postgres/uuid.d.ts +3 -0
- package/dist/migrations/postgres/uuid.d.ts.map +1 -0
- package/dist/migrations/postgres/uuid.js +25 -0
- package/dist/migrations/postgres/uuid.js.map +1 -0
- package/dist/migrations/sqlite/1690925872693-CreateContacts.d.ts +7 -0
- package/dist/migrations/sqlite/1690925872693-CreateContacts.d.ts.map +1 -0
- package/dist/migrations/sqlite/1690925872693-CreateContacts.js +108 -0
- package/dist/migrations/sqlite/1690925872693-CreateContacts.js.map +1 -0
- package/dist/migrations/sqlite/1693866470000-CreateStatusList.d.ts +7 -0
- package/dist/migrations/sqlite/1693866470000-CreateStatusList.d.ts.map +1 -0
- package/dist/migrations/sqlite/1693866470000-CreateStatusList.js +32 -0
- package/dist/migrations/sqlite/1693866470000-CreateStatusList.js.map +1 -0
- package/dist/statusList/IStatusListStore.d.ts +20 -0
- package/dist/statusList/IStatusListStore.d.ts.map +1 -0
- package/dist/statusList/IStatusListStore.js +3 -0
- package/dist/statusList/IStatusListStore.js.map +1 -0
- package/dist/statusList/StatusListStore.d.ts +36 -0
- package/dist/statusList/StatusListStore.d.ts.map +1 -0
- package/dist/statusList/StatusListStore.js +213 -0
- package/dist/statusList/StatusListStore.js.map +1 -0
- package/dist/types/contact/IAbstractContactStore.d.ts +70 -36
- package/dist/types/contact/IAbstractContactStore.d.ts.map +1 -1
- package/dist/types/contact/contact.d.ts +139 -56
- package/dist/types/contact/contact.d.ts.map +1 -1
- package/dist/types/contact/contact.js +6 -1
- package/dist/types/contact/contact.js.map +1 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/statusList/IAbstractStatusListStore.d.ts +38 -0
- package/dist/types/statusList/IAbstractStatusListStore.d.ts.map +1 -0
- package/dist/types/statusList/IAbstractStatusListStore.js +3 -0
- package/dist/types/statusList/IAbstractStatusListStore.js.map +1 -0
- package/dist/types/statusList/statusList.d.ts +25 -0
- package/dist/types/statusList/statusList.d.ts.map +1 -0
- package/dist/types/statusList/statusList.js +3 -0
- package/dist/types/statusList/statusList.js.map +1 -0
- package/dist/types/validation/validation.d.ts +4 -0
- package/dist/types/validation/validation.d.ts.map +1 -0
- package/dist/types/validation/validation.js +3 -0
- package/dist/types/validation/validation.js.map +1 -0
- package/dist/utils/ValidatorUtils.d.ts +4 -0
- package/dist/utils/ValidatorUtils.d.ts.map +1 -0
- package/dist/utils/ValidatorUtils.js +13 -0
- package/dist/utils/ValidatorUtils.js.map +1 -0
- package/dist/utils/contact/MappingUtils.d.ts +47 -0
- package/dist/utils/contact/MappingUtils.d.ts.map +1 -0
- package/dist/utils/contact/MappingUtils.js +291 -0
- package/dist/utils/contact/MappingUtils.js.map +1 -0
- package/package.json +5 -4
- package/src/__tests__/contact.entities.test.ts +1457 -195
- package/src/__tests__/contact.store.test.ts +1302 -266
- package/src/contact/AbstractContactStore.ts +44 -22
- package/src/contact/ContactStore.ts +328 -204
- package/src/entities/contact/BaseConfigEntity.ts +10 -2
- package/src/entities/contact/BaseContactEntity.ts +30 -0
- package/src/entities/contact/ConnectionEntity.ts +4 -23
- package/src/entities/contact/CorrelationIdentifierEntity.ts +9 -13
- package/src/entities/contact/DidAuthConfigEntity.ts +1 -18
- package/src/entities/contact/ElectronicAddressEntity.ts +60 -0
- package/src/entities/contact/IdentityEntity.ts +18 -25
- package/src/entities/contact/IdentityMetadataItemEntity.ts +8 -12
- package/src/entities/contact/NaturalPersonEntity.ts +38 -0
- package/src/entities/contact/OpenIdConfigEntity.ts +1 -23
- package/src/entities/contact/OrganizationEntity.ts +34 -0
- package/src/entities/contact/PartyEntity.ts +118 -0
- package/src/entities/contact/PartyRelationshipEntity.ts +61 -0
- package/src/entities/contact/PartyTypeEntity.ts +59 -0
- package/src/entities/statusList2021/StatusList2021Entity.ts +95 -0
- package/src/entities/statusList2021/StatusList2021EntryEntity.ts +29 -0
- package/src/index.ts +36 -17
- package/src/migrations/generic/1-CreateContacts.ts +46 -36
- package/src/migrations/generic/2-CreateContacts.ts +64 -0
- package/src/migrations/generic/2-CreateIssuanceBranding.ts +62 -0
- package/src/migrations/generic/{1-CreateIssuanceBranding.ts → 3-CreateStatusList.ts} +9 -9
- package/src/migrations/generic/index.ts +11 -2
- package/src/migrations/internal-migrations-ormconfig.ts +2 -4
- package/src/migrations/postgres/1659463079428-CreateContacts.ts +4 -2
- package/src/migrations/postgres/1685628974232-CreateIssuanceBranding.ts +2 -0
- package/src/migrations/postgres/1690925872592-CreateContacts.ts +94 -0
- package/src/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.ts +24 -0
- package/src/migrations/postgres/uuid.ts +12 -0
- package/src/migrations/sqlite/1690925872693-CreateContacts.ts +163 -0
- package/src/migrations/sqlite/1693866470000-CreateStatusList.ts +24 -0
- package/src/statusList/IStatusListStore.ts +44 -0
- package/src/statusList/StatusListStore.ts +237 -0
- package/src/types/contact/IAbstractContactStore.ts +84 -27
- package/src/types/contact/contact.ts +144 -50
- package/src/types/index.ts +4 -0
- package/src/types/statusList/IAbstractStatusListStore.ts +47 -0
- package/src/types/statusList/statusList.ts +39 -0
- package/src/types/validation/validation.ts +3 -0
- package/src/utils/ValidatorUtils.ts +10 -0
- package/src/utils/contact/MappingUtils.ts +344 -0
- package/dist/entities/contact/ContactEntity.d.ts +0 -16
- package/dist/entities/contact/ContactEntity.d.ts.map +0 -1
- package/dist/entities/contact/ContactEntity.js.map +0 -1
- package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts.map +0 -1
- package/dist/migrations/generic/1-CreateIssuanceBranding.js.map +0 -1
- package/src/entities/contact/ContactEntity.ts +0 -74
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.StatusListStore = void 0;
|
|
16
|
+
const debug_1 = __importDefault(require("debug"));
|
|
17
|
+
const typeorm_1 = require("typeorm");
|
|
18
|
+
const StatusList2021Entity_1 = require("../entities/statusList2021/StatusList2021Entity");
|
|
19
|
+
const StatusList2021EntryEntity_1 = require("../entities/statusList2021/StatusList2021EntryEntity");
|
|
20
|
+
const debug = (0, debug_1.default)('sphereon:ssi-sdk:data-store:status-list');
|
|
21
|
+
class StatusListStore {
|
|
22
|
+
constructor(dbConnection) {
|
|
23
|
+
this._dbConnection = dbConnection;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get's the available status list indices from the provided indices. Meaning it will filter out any index that is already known.
|
|
27
|
+
*
|
|
28
|
+
* The idea is that the caller provides a set of random status list indices. We can relatively easy check against the DB in an optimized way.
|
|
29
|
+
* If the status list is large it is probably best ot also provide at least a good number of indices. So something like 10 or 20 values.
|
|
30
|
+
* Callers are also expected to call this function multiple times if it does not yield results
|
|
31
|
+
*
|
|
32
|
+
* @param args
|
|
33
|
+
*/
|
|
34
|
+
availableStatusListEntries(args) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
const statusListIndex = Array.isArray(args.statusListIndex) ? args.statusListIndex : [args.statusListIndex];
|
|
37
|
+
const statusList = yield this.getStatusList(Object.assign(Object.assign({}, args), { id: args.statusListId }));
|
|
38
|
+
const repo = yield this.getStatusListEntryRepo();
|
|
39
|
+
const results = (yield repo.find({
|
|
40
|
+
where: {
|
|
41
|
+
statusList,
|
|
42
|
+
statusListIndex: (0, typeorm_1.In)(statusListIndex),
|
|
43
|
+
},
|
|
44
|
+
})).map((index) => index.statusListIndex);
|
|
45
|
+
return statusListIndex.filter((index) => !results.includes(index));
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
addStatusListEntry(args) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
return (yield this.getStatusListEntryRepo()).save(args);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
updateStatusListEntry(args) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
const statusListId = typeof args.statusList === 'string' ? args.statusList : args.statusList.id;
|
|
56
|
+
const result = yield this.getStatusListEntryByIndex(Object.assign(Object.assign({}, args), { statusListId, errorOnNotFound: false }));
|
|
57
|
+
const updatedEntry = {
|
|
58
|
+
value: args.value,
|
|
59
|
+
correlationId: args.correlationId,
|
|
60
|
+
credentialHash: args.credentialHash,
|
|
61
|
+
credentialId: args.credentialId,
|
|
62
|
+
};
|
|
63
|
+
const updateResult = yield (yield this.getStatusListEntryRepo()).upsert(Object.assign(Object.assign({}, (result !== null && result !== void 0 ? result : { statusList: args.statusList, statusListIndex: args.statusListIndex })), updatedEntry), { conflictPaths: ['statusList', 'statusListIndex'] });
|
|
64
|
+
console.log(updateResult);
|
|
65
|
+
return (yield this.getStatusListEntryByIndex(Object.assign(Object.assign({}, args), { statusListId, errorOnNotFound: true })));
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
getStatusListEntryByIndex(args) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
if (!args.statusListId && !args.correlationId) {
|
|
71
|
+
throw Error(`Cannot get statusList entry if not either a statusList id or correlationId is provided`);
|
|
72
|
+
}
|
|
73
|
+
const result = yield (yield this.getStatusListEntryRepo()).findOne({
|
|
74
|
+
where: Object.assign(Object.assign(Object.assign({}, (args.statusListId && { statusList: args.statusListId })), (args.correlationId && { correlationId: args.correlationId })), { statusListIndex: args.statusListIndex }),
|
|
75
|
+
});
|
|
76
|
+
if (!result && args.errorOnNotFound) {
|
|
77
|
+
throw Error(`Could not find status list index ${args.statusListIndex} for status list id ${args.statusListId}`);
|
|
78
|
+
}
|
|
79
|
+
return result !== null && result !== void 0 ? result : undefined;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
removeStatusListEntryByIndex(args) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
let error = false;
|
|
85
|
+
try {
|
|
86
|
+
yield this.getStatusListEntryByIndex(args); // only used to check it exists
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
error = true;
|
|
90
|
+
}
|
|
91
|
+
if (error) {
|
|
92
|
+
console.log(`Could not delete statusList ${args.statusListId} entry by index ${args.statusListIndex}`);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
const result = yield (yield this.getStatusListEntryRepo()).delete(Object.assign(Object.assign(Object.assign({}, (args.statusListId && { statusList: args.statusListId })), (args.correlationId && { correlationId: args.correlationId })), { statusListIndex: args.statusListIndex }));
|
|
96
|
+
error = !result.affected || result.affected !== 1;
|
|
97
|
+
}
|
|
98
|
+
return !error;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
getStatusListEntryByCredentialId(args) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
const credentialId = args.credentialId;
|
|
104
|
+
if (!credentialId) {
|
|
105
|
+
throw Error('Can only get a credential by credentialId when a credentialId is supplied');
|
|
106
|
+
}
|
|
107
|
+
const statusList = yield this.getStatusList({ id: args.statusListId, correlationId: args.statusListCorrelationId });
|
|
108
|
+
const where = Object.assign(Object.assign({ statusList: statusList.id }, (args.entryCorrelationId && { correlationId: args.entryCorrelationId })), { credentialId });
|
|
109
|
+
console.log(`Entries: ${JSON.stringify(yield (yield this.getStatusListEntryRepo()).find(), null, 2)}`);
|
|
110
|
+
const result = yield (yield this.getStatusListEntryRepo()).findOne({ where });
|
|
111
|
+
if (!result && args.errorOnNotFound) {
|
|
112
|
+
throw Error(`Could not find status list credential id ${credentialId} for status list id ${statusList.id}`);
|
|
113
|
+
}
|
|
114
|
+
return result !== null && result !== void 0 ? result : undefined;
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
removeStatusListEntryByCredentialId(args) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
let error = false;
|
|
120
|
+
try {
|
|
121
|
+
yield this.getStatusListEntryByCredentialId(args); // only used to check it exists
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
error = true;
|
|
125
|
+
}
|
|
126
|
+
if (!error) {
|
|
127
|
+
const result = yield (yield this.getStatusListEntryRepo()).delete(Object.assign(Object.assign(Object.assign({}, (args.statusListId && { statusList: args.statusListId })), (args.entryCorrelationId && { correlationId: args.entryCorrelationId })), { credentialId: args.credentialId }));
|
|
128
|
+
error = !result.affected || result.affected !== 1;
|
|
129
|
+
}
|
|
130
|
+
return !error;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
getStatusListEntries(args) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
return (yield this.getStatusListEntryRepo()).find({ where: Object.assign(Object.assign({}, args === null || args === void 0 ? void 0 : args.filter), { statusList: args.statusListId }) });
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
getStatusList(args) {
|
|
139
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
140
|
+
if (!args.id && !args.correlationId) {
|
|
141
|
+
throw Error(`At least and 'id' or 'correlationId' needs to be provided to lookup a status list`);
|
|
142
|
+
}
|
|
143
|
+
const where = [];
|
|
144
|
+
if (args.id) {
|
|
145
|
+
where.push({ id: args.id });
|
|
146
|
+
}
|
|
147
|
+
if (args.correlationId) {
|
|
148
|
+
where.push({ correlationId: args.correlationId });
|
|
149
|
+
}
|
|
150
|
+
const result = yield (yield this.getStatusListRepo()).findOne({ where });
|
|
151
|
+
if (!result) {
|
|
152
|
+
throw Error(`No status list found for id ${args.id}`);
|
|
153
|
+
}
|
|
154
|
+
return result;
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
getStatusLists(args) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
const result = yield (yield this.getStatusListRepo()).find({
|
|
160
|
+
where: args.filter,
|
|
161
|
+
});
|
|
162
|
+
if (!result) {
|
|
163
|
+
return [];
|
|
164
|
+
}
|
|
165
|
+
return result;
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
addStatusList(args) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
+
const { id, correlationId } = args;
|
|
171
|
+
const result = yield (yield this.getStatusListRepo()).findOne({
|
|
172
|
+
where: [{ id }, { correlationId }],
|
|
173
|
+
});
|
|
174
|
+
if (result) {
|
|
175
|
+
throw Error(`Status list for id ${id}, correlationId ${correlationId} already exists`);
|
|
176
|
+
}
|
|
177
|
+
debug('Adding status list ', id);
|
|
178
|
+
const createdResult = yield (yield this.getStatusListRepo()).save(args);
|
|
179
|
+
return createdResult;
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
updateStatusList(args) {
|
|
183
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
184
|
+
const result = yield this.getStatusList(args);
|
|
185
|
+
debug('Updating status list', result);
|
|
186
|
+
const updatedResult = yield (yield this.getStatusListRepo()).save(args, { transaction: true });
|
|
187
|
+
return updatedResult;
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
removeStatusList(args) {
|
|
191
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
192
|
+
const result = yield this.getStatusList(args);
|
|
193
|
+
yield (yield this.getStatusListRepo()).delete(result);
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
getDS() {
|
|
197
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
198
|
+
return yield this._dbConnection;
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
getStatusListRepo() {
|
|
202
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
203
|
+
return (yield this.getDS()).getRepository(StatusList2021Entity_1.StatusListEntity);
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
getStatusListEntryRepo() {
|
|
207
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
+
return (yield this.getDS()).getRepository(StatusList2021EntryEntity_1.StatusListEntryEntity);
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
exports.StatusListStore = StatusListStore;
|
|
213
|
+
//# sourceMappingURL=StatusListStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusListStore.js","sourceRoot":"","sources":["../../src/statusList/StatusListStore.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAAyB;AACzB,qCAAoD;AACpD,0FAAkF;AAClF,oGAA4F;AAiB5F,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,yCAAyC,CAAC,CAAA;AAE9D,MAAa,eAAe;IAG1B,YAAY,YAAmC;QAC7C,IAAI,CAAC,aAAa,GAAG,YAAY,CAAA;IACnC,CAAC;IAED;;;;;;;;OAQG;IACG,0BAA0B,CAAC,IAAmC;;YAClE,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;YAC3G,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,aAAa,iCAAM,IAAI,KAAE,EAAE,EAAE,IAAI,CAAC,YAAY,IAAG,CAAA;YAC/E,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,sBAAsB,EAAE,CAAA;YAChD,MAAM,OAAO,GAAG,CACd,MAAM,IAAI,CAAC,IAAI,CAAC;gBACd,KAAK,EAAE;oBACL,UAAU;oBACV,eAAe,EAAE,IAAA,YAAE,EAAC,eAAe,CAAC;iBACrC;aACF,CAAC,CACH,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,CAAA;YACvC,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CA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;;YACrD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;YAC7C,KAAK,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAA;YACrC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAA;YAC9F,OAAO,aAAa,CAAA;QACtB,CAAC;KAAA;IAEK,gBAAgB,CAAC,IAA2B;;YAChD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;YAC7C,MAAM,CAAC,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QACvD,CAAC;KAAA;IAEa,KAAK;;YACjB,OAAO,MAAM,IAAI,CAAC,aAAa,CAAA;QACjC,CAAC;KAAA;IAEK,iBAAiB;;YACrB,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,aAAa,CAAC,uCAAgB,CAAC,CAAA;QAC7D,CAAC;KAAA;IAEK,sBAAsB;;YAC1B,OAAO,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,aAAa,CAAC,iDAAqB,CAAC,CAAA;QAClE,CAAC;KAAA;CACF;AArND,0CAqNC"}
|
|
@@ -1,41 +1,75 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export type
|
|
6
|
-
export type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export interface IAddContactArgs {
|
|
14
|
-
name: string;
|
|
15
|
-
alias: string;
|
|
1
|
+
import { NonPersistedPartyType, NonPersistedContact, NonPersistedIdentity, Party, Identity, PartialParty, PartialIdentity, PartyTypeEnum, PartyType, PartyRelationship, PartialPartyRelationship, PartialPartyType, NonPersistedElectronicAddress } from './contact';
|
|
2
|
+
export type FindPartyArgs = Array<PartialParty>;
|
|
3
|
+
export type FindIdentityArgs = Array<PartialIdentity>;
|
|
4
|
+
export type FindPartyTypeArgs = Array<PartialPartyType>;
|
|
5
|
+
export type FindRelationshipArgs = Array<PartialPartyRelationship>;
|
|
6
|
+
export type GetPartyArgs = {
|
|
7
|
+
partyId: string;
|
|
8
|
+
};
|
|
9
|
+
export type GetPartiesArgs = {
|
|
10
|
+
filter?: FindPartyArgs;
|
|
11
|
+
};
|
|
12
|
+
export type AddPartyArgs = {
|
|
16
13
|
uri?: string;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
export
|
|
14
|
+
partyType: NonPersistedPartyType;
|
|
15
|
+
contact: NonPersistedContact;
|
|
16
|
+
identities?: Array<NonPersistedIdentity>;
|
|
17
|
+
electronicAddresses?: Array<NonPersistedElectronicAddress>;
|
|
18
|
+
};
|
|
19
|
+
export type UpdatePartyArgs = {
|
|
20
|
+
party: Omit<Party, 'identities' | 'electronicAddresses' | 'partyType' | 'createdAt' | 'lastUpdatedAt'>;
|
|
21
|
+
};
|
|
22
|
+
export type RemovePartyArgs = {
|
|
23
|
+
partyId: string;
|
|
24
|
+
};
|
|
25
|
+
export type GetIdentityArgs = {
|
|
26
26
|
identityId: string;
|
|
27
|
-
}
|
|
28
|
-
export
|
|
27
|
+
};
|
|
28
|
+
export type GetIdentitiesArgs = {
|
|
29
29
|
filter?: FindIdentityArgs;
|
|
30
|
-
}
|
|
31
|
-
export
|
|
32
|
-
|
|
33
|
-
identity:
|
|
34
|
-
}
|
|
35
|
-
export
|
|
36
|
-
identity:
|
|
37
|
-
}
|
|
38
|
-
export
|
|
30
|
+
};
|
|
31
|
+
export type AddIdentityArgs = {
|
|
32
|
+
partyId: string;
|
|
33
|
+
identity: NonPersistedIdentity;
|
|
34
|
+
};
|
|
35
|
+
export type UpdateIdentityArgs = {
|
|
36
|
+
identity: Identity;
|
|
37
|
+
};
|
|
38
|
+
export type RemoveIdentityArgs = {
|
|
39
39
|
identityId: string;
|
|
40
|
-
}
|
|
40
|
+
};
|
|
41
|
+
export type RemoveRelationshipArgs = {
|
|
42
|
+
relationshipId: string;
|
|
43
|
+
};
|
|
44
|
+
export type AddRelationshipArgs = {
|
|
45
|
+
leftId: string;
|
|
46
|
+
rightId: string;
|
|
47
|
+
};
|
|
48
|
+
export type GetRelationshipArgs = {
|
|
49
|
+
relationshipId: string;
|
|
50
|
+
};
|
|
51
|
+
export type GetRelationshipsArgs = {
|
|
52
|
+
filter: FindRelationshipArgs;
|
|
53
|
+
};
|
|
54
|
+
export type UpdateRelationshipArgs = {
|
|
55
|
+
relationship: Omit<PartyRelationship, 'createdAt' | 'lastUpdatedAt'>;
|
|
56
|
+
};
|
|
57
|
+
export type AddPartyTypeArgs = {
|
|
58
|
+
type: PartyTypeEnum;
|
|
59
|
+
name: string;
|
|
60
|
+
tenantId: string;
|
|
61
|
+
description?: string;
|
|
62
|
+
};
|
|
63
|
+
export type GetPartyTypeArgs = {
|
|
64
|
+
partyTypeId: string;
|
|
65
|
+
};
|
|
66
|
+
export type GetPartyTypesArgs = {
|
|
67
|
+
filter?: FindPartyTypeArgs;
|
|
68
|
+
};
|
|
69
|
+
export type UpdatePartyTypeArgs = {
|
|
70
|
+
partyType: Omit<PartyType, 'createdAt' | 'lastUpdatedAt'>;
|
|
71
|
+
};
|
|
72
|
+
export type RemovePartyTypeArgs = {
|
|
73
|
+
partyTypeId: string;
|
|
74
|
+
};
|
|
41
75
|
//# sourceMappingURL=IAbstractContactStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAbstractContactStore.d.ts","sourceRoot":"","sources":["../../../src/types/contact/IAbstractContactStore.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file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CAC1D,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA"}
|
|
@@ -1,73 +1,78 @@
|
|
|
1
1
|
import { IIdentifier } from '@veramo/core';
|
|
2
|
-
export
|
|
3
|
-
ISSUER = "issuer",
|
|
4
|
-
VERIFIER = "verifier",
|
|
5
|
-
HOLDER = "holder"
|
|
6
|
-
}
|
|
7
|
-
export declare enum ConnectionTypeEnum {
|
|
8
|
-
OPENID_CONNECT = "OIDC",
|
|
9
|
-
SIOPv2 = "SIOPv2",
|
|
10
|
-
SIOPv2_OpenID4VP = "SIOPv2+OpenID4VP"
|
|
11
|
-
}
|
|
12
|
-
export declare enum CorrelationIdentifierEnum {
|
|
13
|
-
DID = "did",
|
|
14
|
-
URL = "url"
|
|
15
|
-
}
|
|
16
|
-
export interface IContact {
|
|
2
|
+
export type Party = {
|
|
17
3
|
id: string;
|
|
18
|
-
name: string;
|
|
19
|
-
alias: string;
|
|
20
4
|
uri?: string;
|
|
21
5
|
roles: Array<IdentityRoleEnum>;
|
|
22
|
-
identities: Array<
|
|
6
|
+
identities: Array<Identity>;
|
|
7
|
+
electronicAddresses: Array<ElectronicAddress>;
|
|
8
|
+
contact: Contact;
|
|
9
|
+
partyType: PartyType;
|
|
10
|
+
relationships: Array<PartyRelationship>;
|
|
23
11
|
createdAt: Date;
|
|
24
12
|
lastUpdatedAt: Date;
|
|
25
|
-
}
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
13
|
+
};
|
|
14
|
+
export type NonPersistedParty = Omit<Party, 'id' | 'identities' | 'electronicAddresses' | 'contact' | 'roles' | 'partyType' | 'relationships' | 'createdAt' | 'lastUpdatedAt'> & {
|
|
15
|
+
identities?: Array<NonPersistedIdentity>;
|
|
16
|
+
electronicAddresses?: Array<NonPersistedElectronicAddress>;
|
|
17
|
+
contact: NonPersistedContact;
|
|
18
|
+
partyType: NonPersistedPartyType;
|
|
19
|
+
relationships?: Array<NonPersistedPartyRelationship>;
|
|
20
|
+
};
|
|
21
|
+
export type PartialParty = Partial<Omit<Party, 'identities' | 'electronicAddresses' | 'contact' | 'partyType' | 'relationships'>> & {
|
|
22
|
+
identities?: PartialIdentity;
|
|
23
|
+
electronicAddresses?: PartialElectronicAddress;
|
|
24
|
+
contact?: PartialContact;
|
|
25
|
+
partyType?: PartialPartyType;
|
|
26
|
+
relationships?: PartialPartyRelationship;
|
|
27
|
+
};
|
|
28
|
+
export type Identity = {
|
|
33
29
|
id: string;
|
|
34
30
|
alias: string;
|
|
35
31
|
roles: Array<IdentityRoleEnum>;
|
|
36
|
-
identifier:
|
|
37
|
-
connection?:
|
|
38
|
-
metadata?: Array<
|
|
32
|
+
identifier: CorrelationIdentifier;
|
|
33
|
+
connection?: Connection;
|
|
34
|
+
metadata?: Array<MetadataItem>;
|
|
39
35
|
createdAt: Date;
|
|
40
36
|
lastUpdatedAt: Date;
|
|
41
|
-
}
|
|
42
|
-
export
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
37
|
+
};
|
|
38
|
+
export type NonPersistedIdentity = Omit<Identity, 'id' | 'identifier' | 'connection' | 'metadata' | 'createdAt' | 'lastUpdatedAt'> & {
|
|
39
|
+
identifier: NonPersistedCorrelationIdentifier;
|
|
40
|
+
connection?: NonPersistedConnection;
|
|
41
|
+
metadata?: Array<NonPersistedMetadataItem>;
|
|
42
|
+
};
|
|
43
|
+
export type PartialIdentity = Partial<Omit<Identity, 'identifier' | 'connection' | 'metadata' | 'roles'>> & {
|
|
44
|
+
identifier?: PartialCorrelationIdentifier;
|
|
45
|
+
connection?: PartialConnection;
|
|
46
|
+
metadata?: PartialMetadataItem;
|
|
47
|
+
roles?: IdentityRoleEnum;
|
|
48
|
+
partyId?: string;
|
|
49
|
+
};
|
|
50
|
+
export type MetadataItem = {
|
|
50
51
|
id: string;
|
|
51
52
|
label: string;
|
|
52
53
|
value: string;
|
|
53
|
-
}
|
|
54
|
-
export
|
|
55
|
-
export
|
|
54
|
+
};
|
|
55
|
+
export type NonPersistedMetadataItem = Omit<MetadataItem, 'id'>;
|
|
56
|
+
export type PartialMetadataItem = Partial<MetadataItem>;
|
|
57
|
+
export type CorrelationIdentifier = {
|
|
56
58
|
id: string;
|
|
57
59
|
type: CorrelationIdentifierEnum;
|
|
58
60
|
correlationId: string;
|
|
59
|
-
}
|
|
60
|
-
export
|
|
61
|
-
export
|
|
61
|
+
};
|
|
62
|
+
export type NonPersistedCorrelationIdentifier = Omit<CorrelationIdentifier, 'id'>;
|
|
63
|
+
export type PartialCorrelationIdentifier = Partial<CorrelationIdentifier>;
|
|
64
|
+
export type Connection = {
|
|
62
65
|
id: string;
|
|
63
66
|
type: ConnectionTypeEnum;
|
|
64
67
|
config: ConnectionConfig;
|
|
65
|
-
}
|
|
66
|
-
export
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
};
|
|
69
|
+
export type NonPersistedConnection = Omit<Connection, 'id' | 'config'> & {
|
|
70
|
+
config: NonPersistedConnectionConfig;
|
|
71
|
+
};
|
|
72
|
+
export type PartialConnection = Partial<Omit<Connection, 'config'>> & {
|
|
73
|
+
config: PartialConnectionConfig;
|
|
74
|
+
};
|
|
75
|
+
export type OpenIdConfig = {
|
|
71
76
|
id: string;
|
|
72
77
|
clientId: string;
|
|
73
78
|
clientSecret: string;
|
|
@@ -76,16 +81,94 @@ export interface IOpenIdConfig {
|
|
|
76
81
|
redirectUrl: string;
|
|
77
82
|
dangerouslyAllowInsecureHttpRequests: boolean;
|
|
78
83
|
clientAuthMethod: 'basic' | 'post' | undefined;
|
|
79
|
-
}
|
|
80
|
-
export
|
|
81
|
-
export
|
|
84
|
+
};
|
|
85
|
+
export type NonPersistedOpenIdConfig = Omit<OpenIdConfig, 'id'>;
|
|
86
|
+
export type PartialOpenIdConfig = Partial<OpenIdConfig>;
|
|
87
|
+
export type DidAuthConfig = {
|
|
82
88
|
id: string;
|
|
83
89
|
identifier: IIdentifier;
|
|
84
90
|
stateId: string;
|
|
85
91
|
redirectUrl: string;
|
|
86
92
|
sessionId: string;
|
|
93
|
+
};
|
|
94
|
+
export type NonPersistedDidAuthConfig = Omit<DidAuthConfig, 'id'>;
|
|
95
|
+
export type PartialDidAuthConfig = Partial<Omit<DidAuthConfig, 'identifier'>> & {
|
|
96
|
+
identifier: Partial<IIdentifier>;
|
|
97
|
+
};
|
|
98
|
+
export type ConnectionConfig = OpenIdConfig | DidAuthConfig;
|
|
99
|
+
export type NonPersistedConnectionConfig = NonPersistedDidAuthConfig | NonPersistedOpenIdConfig;
|
|
100
|
+
export type PartialConnectionConfig = PartialOpenIdConfig | PartialDidAuthConfig;
|
|
101
|
+
export type NaturalPerson = {
|
|
102
|
+
id: string;
|
|
103
|
+
firstName: string;
|
|
104
|
+
lastName: string;
|
|
105
|
+
middleName?: string;
|
|
106
|
+
displayName: string;
|
|
107
|
+
createdAt: Date;
|
|
108
|
+
lastUpdatedAt: Date;
|
|
109
|
+
};
|
|
110
|
+
export type NonPersistedNaturalPerson = Omit<NaturalPerson, 'id' | 'createdAt' | 'lastUpdatedAt'>;
|
|
111
|
+
export type PartialNaturalPerson = Partial<NaturalPerson>;
|
|
112
|
+
export type Organization = {
|
|
113
|
+
id: string;
|
|
114
|
+
legalName: string;
|
|
115
|
+
displayName: string;
|
|
116
|
+
createdAt: Date;
|
|
117
|
+
lastUpdatedAt: Date;
|
|
118
|
+
};
|
|
119
|
+
export type NonPersistedOrganization = Omit<Organization, 'id' | 'createdAt' | 'lastUpdatedAt'>;
|
|
120
|
+
export type PartialOrganization = Partial<Organization>;
|
|
121
|
+
export type Contact = NaturalPerson | Organization;
|
|
122
|
+
export type NonPersistedContact = NonPersistedNaturalPerson | NonPersistedOrganization;
|
|
123
|
+
export type PartialContact = PartialNaturalPerson | PartialOrganization;
|
|
124
|
+
export type PartyType = {
|
|
125
|
+
id: string;
|
|
126
|
+
type: PartyTypeEnum;
|
|
127
|
+
name: string;
|
|
128
|
+
tenantId: string;
|
|
129
|
+
description?: string;
|
|
130
|
+
createdAt: Date;
|
|
131
|
+
lastUpdatedAt: Date;
|
|
132
|
+
};
|
|
133
|
+
export type NonPersistedPartyType = Omit<PartyType, 'id' | 'createdAt' | 'lastUpdatedAt'> & {
|
|
134
|
+
id?: string;
|
|
135
|
+
};
|
|
136
|
+
export type PartialPartyType = Partial<PartyType>;
|
|
137
|
+
export type PartyRelationship = {
|
|
138
|
+
id: string;
|
|
139
|
+
leftId: string;
|
|
140
|
+
rightId: string;
|
|
141
|
+
createdAt: Date;
|
|
142
|
+
lastUpdatedAt: Date;
|
|
143
|
+
};
|
|
144
|
+
export type NonPersistedPartyRelationship = Omit<PartyRelationship, 'id' | 'createdAt' | 'lastUpdatedAt'>;
|
|
145
|
+
export type PartialPartyRelationship = Partial<PartyRelationship>;
|
|
146
|
+
export type ElectronicAddress = {
|
|
147
|
+
id: string;
|
|
148
|
+
type: ElectronicAddressType;
|
|
149
|
+
electronicAddress: string;
|
|
150
|
+
createdAt: Date;
|
|
151
|
+
lastUpdatedAt: Date;
|
|
152
|
+
};
|
|
153
|
+
export type NonPersistedElectronicAddress = Omit<ElectronicAddress, 'id' | 'createdAt' | 'lastUpdatedAt'>;
|
|
154
|
+
export type PartialElectronicAddress = Partial<ElectronicAddress>;
|
|
155
|
+
export type ElectronicAddressType = 'email';
|
|
156
|
+
export declare enum IdentityRoleEnum {
|
|
157
|
+
ISSUER = "issuer",
|
|
158
|
+
VERIFIER = "verifier",
|
|
159
|
+
HOLDER = "holder"
|
|
160
|
+
}
|
|
161
|
+
export declare enum ConnectionTypeEnum {
|
|
162
|
+
OPENID_CONNECT = "OIDC",
|
|
163
|
+
SIOPv2 = "SIOPv2",
|
|
164
|
+
SIOPv2_OpenID4VP = "SIOPv2+OpenID4VP"
|
|
165
|
+
}
|
|
166
|
+
export declare enum CorrelationIdentifierEnum {
|
|
167
|
+
DID = "did",
|
|
168
|
+
URL = "url"
|
|
169
|
+
}
|
|
170
|
+
export declare enum PartyTypeEnum {
|
|
171
|
+
NATURAL_PERSON = "naturalPerson",
|
|
172
|
+
ORGANIZATION = "organization"
|
|
87
173
|
}
|
|
88
|
-
export declare type BasicDidAuthConfig = Omit<IDidAuthConfig, 'id'>;
|
|
89
|
-
export declare type ConnectionConfig = IOpenIdConfig | IDidAuthConfig;
|
|
90
|
-
export declare type BasicConnectionConfig = BasicDidAuthConfig | BasicOpenIdConfig;
|
|
91
174
|
//# sourceMappingURL=contact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.d.ts","sourceRoot":"","sources":["../../../src/types/contact/contact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE1C,
|
|
1
|
+
{"version":3,"file":"contact.d.ts","sourceRoot":"","sources":["../../../src/types/contact/contact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE1C,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAA;IAC9B,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC3B,mBAAmB,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAA;IAC7C,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,SAAS,CAAA;IACpB,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAA;IACvC,SAAS,EAAE,IAAI,CAAA;IACf,aAAa,EAAE,IAAI,CAAA;CACpB,CAAA;AACD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,KAAK,EACL,IAAI,GAAG,YAAY,GAAG,qBAAqB,GAAG,SAAS,GAAG,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
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CorrelationIdentifierEnum = exports.ConnectionTypeEnum = exports.IdentityRoleEnum = void 0;
|
|
3
|
+
exports.PartyTypeEnum = exports.CorrelationIdentifierEnum = exports.ConnectionTypeEnum = exports.IdentityRoleEnum = void 0;
|
|
4
4
|
var IdentityRoleEnum;
|
|
5
5
|
(function (IdentityRoleEnum) {
|
|
6
6
|
IdentityRoleEnum["ISSUER"] = "issuer";
|
|
@@ -18,4 +18,9 @@ var CorrelationIdentifierEnum;
|
|
|
18
18
|
CorrelationIdentifierEnum["DID"] = "did";
|
|
19
19
|
CorrelationIdentifierEnum["URL"] = "url";
|
|
20
20
|
})(CorrelationIdentifierEnum = exports.CorrelationIdentifierEnum || (exports.CorrelationIdentifierEnum = {}));
|
|
21
|
+
var PartyTypeEnum;
|
|
22
|
+
(function (PartyTypeEnum) {
|
|
23
|
+
PartyTypeEnum["NATURAL_PERSON"] = "naturalPerson";
|
|
24
|
+
PartyTypeEnum["ORGANIZATION"] = "organization";
|
|
25
|
+
})(PartyTypeEnum = exports.PartyTypeEnum || (exports.PartyTypeEnum = {}));
|
|
21
26
|
//# sourceMappingURL=contact.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.js","sourceRoot":"","sources":["../../../src/types/contact/contact.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"contact.js","sourceRoot":"","sources":["../../../src/types/contact/contact.ts"],"names":[],"mappings":";;;AA8KA,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,yCAAqB,CAAA;IACrB,qCAAiB,CAAA;AACnB,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,6CAAuB,CAAA;IACvB,uCAAiB,CAAA;IACjB,2DAAqC,CAAA;AACvC,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B;AAED,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACnC,wCAAW,CAAA;IACX,wCAAW,CAAA;AACb,CAAC,EAHW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAGpC;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,iDAAgC,CAAA;IAChC,8CAA6B,CAAA;AAC/B,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,4 +2,7 @@ export * from './issuanceBranding/issuanceBranding';
|
|
|
2
2
|
export * from './issuanceBranding/IAbstractIssuanceBrandingStore';
|
|
3
3
|
export * from './contact/contact';
|
|
4
4
|
export * from './contact/IAbstractContactStore';
|
|
5
|
+
export * from './validation/validation';
|
|
6
|
+
export * from './statusList/statusList';
|
|
7
|
+
export * from './statusList/IAbstractStatusListStore';
|
|
5
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAA;AACnD,cAAc,mDAAmD,CAAA;AACjE,cAAc,mBAAmB,CAAA;AACjC,cAAc,iCAAiC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAA;AACnD,cAAc,mDAAmD,CAAA;AACjE,cAAc,mBAAmB,CAAA;AACjC,cAAc,iCAAiC,CAAA;AAE/C,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AACvC,cAAc,uCAAuC,CAAA"}
|