@sphereon/ssi-sdk.data-store 0.19.1-next.2 → 0.19.1-next.24
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/digitalCredential/AbstractDigitalCredentialStore.d.ts +10 -0
- package/dist/digitalCredential/AbstractDigitalCredentialStore.d.ts.map +1 -0
- package/dist/digitalCredential/AbstractDigitalCredentialStore.js +7 -0
- package/dist/digitalCredential/AbstractDigitalCredentialStore.js.map +1 -0
- package/dist/digitalCredential/DigitalCredentialStore.d.ts +15 -0
- package/dist/digitalCredential/DigitalCredentialStore.d.ts.map +1 -0
- package/dist/digitalCredential/DigitalCredentialStore.js +118 -0
- package/dist/digitalCredential/DigitalCredentialStore.js.map +1 -0
- package/dist/entities/digitalCredential/DigitalCredentialEntity.d.ts +23 -0
- package/dist/entities/digitalCredential/DigitalCredentialEntity.d.ts.map +1 -0
- package/dist/entities/digitalCredential/DigitalCredentialEntity.js +93 -0
- package/dist/entities/digitalCredential/DigitalCredentialEntity.js.map +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/migrations/generic/6-CreateDigitalCredential.d.ts +7 -0
- package/dist/migrations/generic/6-CreateDigitalCredential.d.ts.map +1 -0
- package/dist/migrations/generic/6-CreateDigitalCredential.js +78 -0
- package/dist/migrations/generic/6-CreateDigitalCredential.js.map +1 -0
- package/dist/migrations/generic/index.d.ts +2 -0
- package/dist/migrations/generic/index.d.ts.map +1 -1
- package/dist/migrations/generic/index.js +4 -1
- package/dist/migrations/generic/index.js.map +1 -1
- package/dist/migrations/index.d.ts +1 -1
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +2 -1
- package/dist/migrations/index.js.map +1 -1
- package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.d.ts +7 -0
- package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.d.ts.map +1 -0
- package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.js +59 -0
- package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.js.map +1 -0
- package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.d.ts +7 -0
- package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.d.ts.map +1 -0
- package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.js +50 -0
- package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.js.map +1 -0
- package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.d.ts +42 -0
- package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.d.ts.map +1 -0
- package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.js +3 -0
- package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.js.map +1 -0
- package/dist/types/digitalCredential/digitalCredential.d.ts +42 -0
- package/dist/types/digitalCredential/digitalCredential.d.ts.map +1 -0
- package/dist/types/digitalCredential/digitalCredential.js +28 -0
- package/dist/types/digitalCredential/digitalCredential.js.map +1 -0
- package/dist/utils/SortingUtils.d.ts +3 -0
- package/dist/utils/SortingUtils.d.ts.map +1 -0
- package/dist/utils/SortingUtils.js +18 -0
- package/dist/utils/SortingUtils.js.map +1 -0
- package/dist/utils/digitalCredential/MappingUtils.d.ts +7 -0
- package/dist/utils/digitalCredential/MappingUtils.d.ts.map +1 -0
- package/dist/utils/digitalCredential/MappingUtils.js +99 -0
- package/dist/utils/digitalCredential/MappingUtils.js.map +1 -0
- package/package.json +5 -4
- package/src/__tests__/digitalCredential.entities.test.ts +254 -0
- package/src/__tests__/digitalCredential.store.test.ts +294 -0
- package/src/digitalCredential/AbstractDigitalCredentialStore.ts +17 -0
- package/src/digitalCredential/DigitalCredentialStore.ts +127 -0
- package/src/entities/digitalCredential/DigitalCredentialEntity.ts +64 -0
- package/src/index.ts +9 -0
- package/src/migrations/generic/6-CreateDigitalCredential.ts +66 -0
- package/src/migrations/generic/index.ts +3 -0
- package/src/migrations/index.ts +1 -0
- package/src/migrations/postgres/1708525189001-CreateDigitalCredential.ts +44 -0
- package/src/migrations/sqlite/1708525189002-CreateDigitalCredential.ts +34 -0
- package/src/types/digitalCredential/IAbstractDigitalCredentialStore.ts +37 -0
- package/src/types/digitalCredential/digitalCredential.ts +46 -0
- package/src/utils/SortingUtils.ts +16 -0
- package/src/utils/digitalCredential/MappingUtils.ts +122 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AddCredentialArgs, GetCredentialArgs, GetCredentialsArgs, GetCredentialsResponse, RemoveCredentialArgs, UpdateCredentialStateArgs } from '../types/digitalCredential/IAbstractDigitalCredentialStore';
|
|
2
|
+
import { DigitalCredentialEntity } from '../entities/digitalCredential/DigitalCredentialEntity';
|
|
3
|
+
export declare abstract class AbstractDigitalCredentialStore {
|
|
4
|
+
abstract getCredential(args: GetCredentialArgs): Promise<DigitalCredentialEntity>;
|
|
5
|
+
abstract getCredentials(args?: GetCredentialsArgs): Promise<GetCredentialsResponse>;
|
|
6
|
+
abstract addCredential(args: AddCredentialArgs): Promise<DigitalCredentialEntity>;
|
|
7
|
+
abstract updateCredentialState(args: UpdateCredentialStateArgs): Promise<DigitalCredentialEntity>;
|
|
8
|
+
abstract removeCredential(args: RemoveCredentialArgs): Promise<boolean>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=AbstractDigitalCredentialStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AbstractDigitalCredentialStore.d.ts","sourceRoot":"","sources":["../../src/digitalCredential/AbstractDigitalCredentialStore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,4DAA4D,CAAA;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAA;AAE/F,8BAAsB,8BAA8B;IAClD,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IACjF,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IACnF,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IACjF,QAAQ,CAAC,qBAAqB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IACjG,QAAQ,CAAC,gBAAgB,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;CACxE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AbstractDigitalCredentialStore = void 0;
|
|
4
|
+
class AbstractDigitalCredentialStore {
|
|
5
|
+
}
|
|
6
|
+
exports.AbstractDigitalCredentialStore = AbstractDigitalCredentialStore;
|
|
7
|
+
//# sourceMappingURL=AbstractDigitalCredentialStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AbstractDigitalCredentialStore.js","sourceRoot":"","sources":["../../src/digitalCredential/AbstractDigitalCredentialStore.ts"],"names":[],"mappings":";;;AAUA,MAAsB,8BAA8B;CAMnD;AAND,wEAMC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AbstractDigitalCredentialStore } from './AbstractDigitalCredentialStore';
|
|
2
|
+
import { AddCredentialArgs, GetCredentialArgs, GetCredentialsArgs, GetCredentialsResponse, RemoveCredentialArgs, UpdateCredentialStateArgs } from '../types/digitalCredential/IAbstractDigitalCredentialStore';
|
|
3
|
+
import { OrPromise } from '@sphereon/ssi-types';
|
|
4
|
+
import { DataSource } from 'typeorm';
|
|
5
|
+
import { DigitalCredentialEntity } from '../entities/digitalCredential/DigitalCredentialEntity';
|
|
6
|
+
export declare class DigitalCredentialStore extends AbstractDigitalCredentialStore {
|
|
7
|
+
private readonly dbConnection;
|
|
8
|
+
constructor(dbConnection: OrPromise<DataSource>);
|
|
9
|
+
addCredential: (args: AddCredentialArgs) => Promise<DigitalCredentialEntity>;
|
|
10
|
+
getCredential: (args: GetCredentialArgs) => Promise<DigitalCredentialEntity>;
|
|
11
|
+
getCredentials: (args?: GetCredentialsArgs) => Promise<GetCredentialsResponse>;
|
|
12
|
+
removeCredential: (args: RemoveCredentialArgs) => Promise<boolean>;
|
|
13
|
+
updateCredentialState: (args: UpdateCredentialStateArgs) => Promise<DigitalCredentialEntity>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=DigitalCredentialStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DigitalCredentialStore.d.ts","sourceRoot":"","sources":["../../src/digitalCredential/DigitalCredentialStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,4DAA4D,CAAA;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAgC,MAAM,SAAS,CAAA;AAElE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAA;AAQ/F,qBAAa,sBAAuB,SAAQ,8BAA8B;IACxE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAuB;gBAExC,YAAY,EAAE,SAAS,CAAC,UAAU,CAAC;IAK/C,aAAa,SAAgB,iBAAiB,KAAG,QAAQ,uBAAuB,CAAC,CAMhF;IAED,aAAa,SAAgB,iBAAiB,KAAG,QAAQ,uBAAuB,CAAC,CAShF;IAED,cAAc,UAAiB,kBAAkB,KAAG,QAAQ,sBAAsB,CAAC,CAgBlF;IAED,gBAAgB,SAAgB,oBAAoB,KAAG,QAAQ,OAAO,CAAC,CAsBtE;IAED,qBAAqB,SAAgB,yBAAyB,KAAG,QAAQ,uBAAuB,CAAC,CAoChG;CACF"}
|
|
@@ -0,0 +1,118 @@
|
|
|
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.DigitalCredentialStore = void 0;
|
|
16
|
+
const AbstractDigitalCredentialStore_1 = require("./AbstractDigitalCredentialStore");
|
|
17
|
+
const debug_1 = __importDefault(require("debug"));
|
|
18
|
+
const DigitalCredentialEntity_1 = require("../entities/digitalCredential/DigitalCredentialEntity");
|
|
19
|
+
const MappingUtils_1 = require("../utils/digitalCredential/MappingUtils");
|
|
20
|
+
const digitalCredential_1 = require("../types/digitalCredential/digitalCredential");
|
|
21
|
+
const SortingUtils_1 = require("../utils/SortingUtils");
|
|
22
|
+
const debug = (0, debug_1.default)('sphereon:ssi-sdk:credential-store');
|
|
23
|
+
class DigitalCredentialStore extends AbstractDigitalCredentialStore_1.AbstractDigitalCredentialStore {
|
|
24
|
+
constructor(dbConnection) {
|
|
25
|
+
super();
|
|
26
|
+
this.addCredential = (args) => __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
debug('Adding credential', args);
|
|
28
|
+
const digitalCredentialEntityRepository = (yield this.dbConnection).getRepository(DigitalCredentialEntity_1.DigitalCredentialEntity);
|
|
29
|
+
const credentialEntity = (0, MappingUtils_1.nonPersistedDigitalCredentialEntityFromAddArgs)(args);
|
|
30
|
+
const createdResult = yield digitalCredentialEntityRepository.save(credentialEntity);
|
|
31
|
+
return Promise.resolve(createdResult);
|
|
32
|
+
});
|
|
33
|
+
this.getCredential = (args) => __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const result = yield (yield this.dbConnection).getRepository(DigitalCredentialEntity_1.DigitalCredentialEntity).findOne({
|
|
35
|
+
where: args,
|
|
36
|
+
});
|
|
37
|
+
if (!result) {
|
|
38
|
+
return Promise.reject(Error(`No credential found for arg: ${args.toString()}`));
|
|
39
|
+
}
|
|
40
|
+
return result;
|
|
41
|
+
});
|
|
42
|
+
this.getCredentials = (args) => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
const { filter = {}, offset, limit, order = 'id.asc' } = args !== null && args !== void 0 ? args : {};
|
|
44
|
+
const sortOptions = order && typeof order === 'string'
|
|
45
|
+
? (0, SortingUtils_1.parseAndValidateOrderOptions)(order)
|
|
46
|
+
: order;
|
|
47
|
+
const [result, total] = yield (yield this.dbConnection).getRepository(DigitalCredentialEntity_1.DigitalCredentialEntity).findAndCount({
|
|
48
|
+
where: filter,
|
|
49
|
+
skip: offset,
|
|
50
|
+
take: limit,
|
|
51
|
+
order: sortOptions,
|
|
52
|
+
});
|
|
53
|
+
return {
|
|
54
|
+
data: result,
|
|
55
|
+
total,
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
this.removeCredential = (args) => __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
if (!args) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
let query = {};
|
|
63
|
+
if ('id' in args) {
|
|
64
|
+
query.id = args.id;
|
|
65
|
+
}
|
|
66
|
+
else if ('hash' in args) {
|
|
67
|
+
query.hash = args.hash;
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
const connection = yield this.dbConnection;
|
|
74
|
+
const result = yield connection.getRepository(DigitalCredentialEntity_1.DigitalCredentialEntity).delete(query);
|
|
75
|
+
return result.affected === 1;
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
console.error('Error removing digital credential:', error);
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
this.updateCredentialState = (args) => __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
const credentialRepository = (yield this.dbConnection).getRepository(DigitalCredentialEntity_1.DigitalCredentialEntity);
|
|
84
|
+
const whereClause = {};
|
|
85
|
+
if ('id' in args) {
|
|
86
|
+
whereClause.id = args.id;
|
|
87
|
+
}
|
|
88
|
+
else if ('hash' in args) {
|
|
89
|
+
whereClause.hash = args.hash;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
throw new Error('No id or hash param is provided.');
|
|
93
|
+
}
|
|
94
|
+
if (!args.verifiedState) {
|
|
95
|
+
throw new Error('No verifiedState param is provided.');
|
|
96
|
+
}
|
|
97
|
+
if (args.verifiedState === digitalCredential_1.CredentialStateType.REVOKED && !args.revokedAt) {
|
|
98
|
+
throw new Error('No revokedAt param is provided.');
|
|
99
|
+
}
|
|
100
|
+
if (args.verifiedState !== digitalCredential_1.CredentialStateType.REVOKED && !args.verifiedAt) {
|
|
101
|
+
throw new Error('No verifiedAt param is provided.');
|
|
102
|
+
}
|
|
103
|
+
const credential = yield credentialRepository.findOne({
|
|
104
|
+
where: whereClause,
|
|
105
|
+
});
|
|
106
|
+
if (!credential) {
|
|
107
|
+
return Promise.reject(Error(`No credential found for args: ${whereClause}`));
|
|
108
|
+
}
|
|
109
|
+
const updatedCredential = Object.assign(Object.assign(Object.assign(Object.assign({}, credential), (args.verifiedState !== digitalCredential_1.CredentialStateType.REVOKED && { verifiedAt: args.verifiedAt })), (args.verifiedState === digitalCredential_1.CredentialStateType.REVOKED && { revokedAt: args.revokedAt })), { lastUpdatedAt: new Date(), verifiedState: args.verifiedState });
|
|
110
|
+
debug('Updating credential', credential);
|
|
111
|
+
const updatedResult = yield credentialRepository.save(updatedCredential, { transaction: true });
|
|
112
|
+
return updatedResult;
|
|
113
|
+
});
|
|
114
|
+
this.dbConnection = dbConnection;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
exports.DigitalCredentialStore = DigitalCredentialStore;
|
|
118
|
+
//# sourceMappingURL=DigitalCredentialStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DigitalCredentialStore.js","sourceRoot":"","sources":["../../src/digitalCredential/DigitalCredentialStore.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qFAAiF;AAWjF,kDAAyB;AACzB,mGAA+F;AAC/F,0EAAwG;AAExG,oFAAoI;AACpI,wDAAoE;AAEpE,MAAM,KAAK,GAAmB,IAAA,eAAK,EAAC,mCAAmC,CAAC,CAAA;AAExE,MAAa,sBAAuB,SAAQ,+DAA8B;IAGxE,YAAY,YAAmC;QAC7C,KAAK,EAAE,CAAA;QAIT,kBAAa,GAAG,CAAO,IAAuB,EAAoC,EAAE;YAClF,KAAK,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAA;YAChC,MAAM,iCAAiC,GAAwC,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,CAAC,aAAa,CAAC,iDAAuB,CAAC,CAAA;YAC/I,MAAM,gBAAgB,GAAkC,IAAA,6DAA8C,EAAC,IAAI,CAAC,CAAA;YAC5G,MAAM,aAAa,GAA4B,MAAM,iCAAiC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;YAC7G,OAAO,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,CAAA;QACvC,CAAC,CAAA,CAAA;QAED,kBAAa,GAAG,CAAO,IAAuB,E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CAAC,CAAA;aACnD;YACD,IAAI,IAAI,CAAC,aAAa,KAAK,uCAAmB,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBAC1E,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAA;aACpD;YACD,MAAM,UAAU,GAAmC,MAAM,oBAAoB,CAAC,OAAO,CAAC;gBACpF,KAAK,EAAE,WAAW;aACnB,CAAC,CAAA;YAEF,IAAI,CAAC,UAAU,EAAE;gBACf,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,WAAW,EAAE,CAAC,CAAC,CAAA;aAC7E;YACD,MAAM,iBAAiB,+DAClB,UAAU,GACV,CAAC,IAAI,CAAC,aAAa,KAAK,uCAAmB,CAAC,OAAO,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,GACvF,CAAC,IAAI,CAAC,aAAa,KAAK,uCAAmB,CAAC,OAAO,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,KACxF,aAAa,EAAE,IAAI,IAAI,EAAE,EACzB,aAAa,EAAE,IAAI,CAAC,aAAa,GAClC,CAAA;YACD,KAAK,CAAC,qBAAqB,EAAE,UAAU,CAAC,CAAA;YACxC,MAAM,aAAa,GAA4B,MAAM,oBAAoB,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAA;YACxH,OAAO,aAAa,CAAA;QACtB,CAAC,CAAA,CAAA;QApGC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;IAClC,CAAC;CAoGF;AA1GD,wDA0GC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { CredentialCorrelationType, CredentialDocumentFormat, CredentialStateType, DocumentType } from '../../types/digitalCredential/digitalCredential';
|
|
3
|
+
export declare class DigitalCredentialEntity extends BaseEntity {
|
|
4
|
+
id: string;
|
|
5
|
+
documentType: DocumentType;
|
|
6
|
+
documentFormat: CredentialDocumentFormat;
|
|
7
|
+
rawDocument: string;
|
|
8
|
+
uniformDocument: string;
|
|
9
|
+
hash: string;
|
|
10
|
+
issuerCorrelationType: CredentialCorrelationType;
|
|
11
|
+
subjectCorrelationType?: CredentialCorrelationType;
|
|
12
|
+
issuerCorrelationId: string;
|
|
13
|
+
subjectCorrelationId?: string;
|
|
14
|
+
verifiedState?: CredentialStateType;
|
|
15
|
+
tenantId?: string;
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
lastUpdatedAt: Date;
|
|
18
|
+
validUntil?: Date;
|
|
19
|
+
validFrom?: Date;
|
|
20
|
+
verifiedAt?: Date;
|
|
21
|
+
revokedAt?: Date;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=DigitalCredentialEntity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DigitalCredentialEntity.d.ts","sourceRoot":"","sources":["../../../src/entities/digitalCredential/DigitalCredentialEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA8E,MAAM,SAAS,CAAA;AAChH,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACnB,YAAY,EACb,MAAM,iDAAiD,CAAA;AAExD,qBACa,uBAAwB,SAAQ,UAAU;IAErD,EAAE,EAAG,MAAM,CAAA;IAGX,YAAY,EAAG,YAAY,CAAA;IAG3B,cAAc,EAAG,wBAAwB,CAAA;IAGzC,WAAW,EAAG,MAAM,CAAA;IAGpB,eAAe,EAAG,MAAM,CAAA;IAGxB,IAAI,EAAG,MAAM,CAAA;IAGb,qBAAqB,EAAG,yBAAyB,CAAA;IAGjD,sBAAsB,CAAC,EAAE,yBAAyB,CAAA;IAGlD,mBAAmB,EAAG,MAAM,CAAA;IAG5B,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAG7B,aAAa,CAAC,EAAE,mBAAmB,CAAA;IAGnC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAGjB,SAAS,EAAG,IAAI,CAAA;IAGhB,aAAa,EAAG,IAAI,CAAA;IAGpB,UAAU,CAAC,EAAE,IAAI,CAAA;IAGjB,SAAS,CAAC,EAAE,IAAI,CAAA;IAGhB,UAAU,CAAC,EAAE,IAAI,CAAA;IAGjB,SAAS,CAAC,EAAE,IAAI,CAAA;CACjB"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DigitalCredentialEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const digitalCredential_1 = require("../../types/digitalCredential/digitalCredential");
|
|
15
|
+
let DigitalCredentialEntity = class DigitalCredentialEntity extends typeorm_1.BaseEntity {
|
|
16
|
+
};
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], DigitalCredentialEntity.prototype, "id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'document_type', enum: digitalCredential_1.DocumentType, nullable: false }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], DigitalCredentialEntity.prototype, "documentType", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'document_format', enum: digitalCredential_1.CredentialDocumentFormat, nullable: false }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], DigitalCredentialEntity.prototype, "documentFormat", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)('text', { name: 'raw_document', nullable: false }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], DigitalCredentialEntity.prototype, "rawDocument", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)('text', { name: 'uniform_document', nullable: false }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], DigitalCredentialEntity.prototype, "uniformDocument", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)('text', { name: 'hash', nullable: false, unique: true }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], DigitalCredentialEntity.prototype, "hash", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'issuer_correlation_type', enum: digitalCredential_1.CredentialCorrelationType, nullable: false }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], DigitalCredentialEntity.prototype, "issuerCorrelationType", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'subject_correlation_type', enum: digitalCredential_1.CredentialCorrelationType, nullable: true }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], DigitalCredentialEntity.prototype, "subjectCorrelationType", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)('text', { name: 'issuer_correlation_id', nullable: false }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], DigitalCredentialEntity.prototype, "issuerCorrelationId", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)('text', { name: 'subject_correlation_id', nullable: true }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], DigitalCredentialEntity.prototype, "subjectCorrelationId", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'verified_state', enum: digitalCredential_1.CredentialStateType, nullable: true }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], DigitalCredentialEntity.prototype, "verifiedState", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)('text', { name: 'tenant_id', nullable: true }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], DigitalCredentialEntity.prototype, "tenantId", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false }),
|
|
67
|
+
__metadata("design:type", Date)
|
|
68
|
+
], DigitalCredentialEntity.prototype, "createdAt", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'last_updated_at', nullable: false }),
|
|
71
|
+
__metadata("design:type", Date)
|
|
72
|
+
], DigitalCredentialEntity.prototype, "lastUpdatedAt", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)('date', { name: 'valid_until', nullable: true }),
|
|
75
|
+
__metadata("design:type", Date)
|
|
76
|
+
], DigitalCredentialEntity.prototype, "validUntil", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.Column)('date', { name: 'valid_from', nullable: true }),
|
|
79
|
+
__metadata("design:type", Date)
|
|
80
|
+
], DigitalCredentialEntity.prototype, "validFrom", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.Column)('date', { name: 'verified_at', nullable: true }),
|
|
83
|
+
__metadata("design:type", Date)
|
|
84
|
+
], DigitalCredentialEntity.prototype, "verifiedAt", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.Column)('date', { name: 'revoked_at', nullable: true }),
|
|
87
|
+
__metadata("design:type", Date)
|
|
88
|
+
], DigitalCredentialEntity.prototype, "revokedAt", void 0);
|
|
89
|
+
DigitalCredentialEntity = __decorate([
|
|
90
|
+
(0, typeorm_1.Entity)('DigitalCredential')
|
|
91
|
+
], DigitalCredentialEntity);
|
|
92
|
+
exports.DigitalCredentialEntity = DigitalCredentialEntity;
|
|
93
|
+
//# sourceMappingURL=DigitalCredentialEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DigitalCredentialEntity.js","sourceRoot":"","sources":["../../../src/entities/digitalCredential/DigitalCredentialEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgH;AAChH,uFAKwD;AAGjD,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,oBAAU;CAsDtD,CAAA;AArDC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;mDACpB;AAEX;IAAC,IAAA,gBAAM,EAAC,aAAa,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,gCAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;6DAC3D;AAE3B;IAAC,IAAA,gBAAM,EAAC,aAAa,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,4CAAwB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;+DAC3D;AAEzC;IAAC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;4DACtC;AAEpB;IAAC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;gEACtC;AAExB;IAAC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAA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,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC3C,IAAI;0DAAA;AAEhB;IAAC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC3C,IAAI;2DAAA;AAEjB;IAAC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC3C,IAAI;0DAAA;AArDL,uBAAuB;IADnC,IAAA,gBAAM,EAAC,mBAAmB,CAAC;GACf,uBAAuB,CAsDnC;AAtDY,0DAAuB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -29,6 +29,8 @@ export { AbstractIssuanceBrandingStore } from './issuanceBranding/AbstractIssuan
|
|
|
29
29
|
export { IssuanceBrandingStore } from './issuanceBranding/IssuanceBrandingStore';
|
|
30
30
|
export { StatusListStore } from './statusList/StatusListStore';
|
|
31
31
|
import { AuditEventEntity, auditEventEntityFrom } from './entities/eventLogger/AuditEventEntity';
|
|
32
|
+
import { DigitalCredentialEntity } from './entities/digitalCredential/DigitalCredentialEntity';
|
|
33
|
+
import { digitalCredentialFrom, digitalCredentialsFrom, nonPersistedDigitalCredentialEntityFromAddArgs } from './utils/digitalCredential/MappingUtils';
|
|
32
34
|
export { AbstractEventLoggerStore } from './eventLogger/AbstractEventLoggerStore';
|
|
33
35
|
export { EventLoggerStore } from './eventLogger/EventLoggerStore';
|
|
34
36
|
export { DataStoreMigrations, DataStoreEventLoggerMigrations, DataStoreContactMigrations, DataStoreIssuanceBrandingMigrations, DataStoreStatusListMigrations, } from './migrations';
|
|
@@ -38,6 +40,7 @@ export declare const DataStoreContactEntities: (typeof CorrelationIdentifierEnti
|
|
|
38
40
|
export declare const DataStoreIssuanceBrandingEntities: (typeof ImageDimensionsEntity | typeof ImageAttributesEntity | typeof TextAttributesEntity | typeof BaseLocaleBrandingEntity | typeof CredentialBrandingEntity | typeof IssuerBrandingEntity)[];
|
|
39
41
|
export declare const DataStoreStatusListEntities: (typeof StatusListEntryEntity | typeof StatusListEntity)[];
|
|
40
42
|
export declare const DataStoreEventLoggerEntities: (typeof AuditEventEntity)[];
|
|
41
|
-
export declare const
|
|
42
|
-
export
|
|
43
|
+
export declare const DataStoreDigitalCredentialEntities: (typeof DigitalCredentialEntity)[];
|
|
44
|
+
export declare const DataStoreEntities: (typeof StatusListEntryEntity | typeof StatusListEntity | typeof CorrelationIdentifierEntity | typeof IdentityMetadataItemEntity | typeof PartyTypeEntity | typeof PartyEntity | typeof BaseContactEntity | typeof PartyRelationshipEntity | typeof ConnectionEntity | typeof BaseConfigEntity | typeof ImageDimensionsEntity | typeof ImageAttributesEntity | typeof TextAttributesEntity | typeof BaseLocaleBrandingEntity | typeof CredentialBrandingEntity | typeof IssuerBrandingEntity | typeof AuditEventEntity | typeof DigitalCredentialEntity)[];
|
|
45
|
+
export { BaseConfigEntity, ConnectionEntity, PartyEntity, CorrelationIdentifierEntity, DidAuthConfigEntity, IdentityEntity, IdentityMetadataItemEntity, OpenIdConfigEntity, BackgroundAttributesEntity, CredentialBrandingEntity, ImageAttributesEntity, ImageDimensionsEntity, BaseLocaleBrandingEntity, IssuerBrandingEntity, TextAttributesEntity, CredentialLocaleBrandingEntity, IssuerLocaleBrandingEntity, ElectronicAddressEntity, PhysicalAddressEntity, backgroundAttributesEntityFrom, credentialBrandingEntityFrom, imageAttributesEntityFrom, imageDimensionsEntityFrom, issuerBrandingEntityFrom, textAttributesEntityFrom, issuerLocaleBrandingEntityFrom, credentialLocaleBrandingEntityFrom, IStatusListEntity, IStatusListEntryEntity, StatusListEntity, StatusListEntryEntity, AuditEventEntity, auditEventEntityFrom, DigitalCredentialEntity, digitalCredentialFrom, digitalCredentialsFrom, nonPersistedDigitalCredentialEntityFromAddArgs, };
|
|
43
46
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED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C1B,kBAAkB,EAClB,0BAA0B,EAC1B,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,8BAA8B,EAC9B,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,8BAA8B,EAC9B,4BAA4B,EAC5B,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,8BAA8B,EAC9B,kCAAkC,EAClC,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,8CAA8C,GAC/C,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.auditEventEntityFrom = exports.AuditEventEntity = exports.StatusListEntryEntity = exports.StatusListEntity = exports.credentialLocaleBrandingEntityFrom = exports.issuerLocaleBrandingEntityFrom = exports.textAttributesEntityFrom = exports.issuerBrandingEntityFrom = exports.imageDimensionsEntityFrom = exports.imageAttributesEntityFrom = exports.credentialBrandingEntityFrom = exports.backgroundAttributesEntityFrom = exports.PhysicalAddressEntity = exports.ElectronicAddressEntity = exports.IssuerLocaleBrandingEntity = exports.CredentialLocaleBrandingEntity = exports.TextAttributesEntity = exports.IssuerBrandingEntity = exports.BaseLocaleBrandingEntity = exports.ImageDimensionsEntity = exports.ImageAttributesEntity = exports.CredentialBrandingEntity = exports.BackgroundAttributesEntity = exports.OpenIdConfigEntity = exports.IdentityMetadataItemEntity = exports.IdentityEntity = exports.DidAuthConfigEntity = exports.CorrelationIdentifierEntity = exports.PartyEntity = exports.ConnectionEntity = exports.BaseConfigEntity = exports.DataStoreEntities = exports.DataStoreEventLoggerEntities = exports.DataStoreStatusListEntities = exports.DataStoreIssuanceBrandingEntities = exports.DataStoreContactEntities = exports.DataStoreStatusListMigrations = exports.DataStoreIssuanceBrandingMigrations = exports.DataStoreContactMigrations = exports.DataStoreEventLoggerMigrations = exports.DataStoreMigrations = exports.EventLoggerStore = exports.AbstractEventLoggerStore = exports.StatusListStore = exports.IssuanceBrandingStore = exports.AbstractIssuanceBrandingStore = exports.AbstractContactStore = exports.ContactStore = void 0;
|
|
17
|
+
exports.DigitalCredentialEntity = exports.auditEventEntityFrom = exports.AuditEventEntity = exports.StatusListEntryEntity = exports.StatusListEntity = exports.credentialLocaleBrandingEntityFrom = exports.issuerLocaleBrandingEntityFrom = exports.textAttributesEntityFrom = exports.issuerBrandingEntityFrom = exports.imageDimensionsEntityFrom = exports.imageAttributesEntityFrom = exports.credentialBrandingEntityFrom = exports.backgroundAttributesEntityFrom = exports.PhysicalAddressEntity = exports.ElectronicAddressEntity = exports.IssuerLocaleBrandingEntity = exports.CredentialLocaleBrandingEntity = exports.TextAttributesEntity = exports.IssuerBrandingEntity = exports.BaseLocaleBrandingEntity = exports.ImageDimensionsEntity = exports.ImageAttributesEntity = exports.CredentialBrandingEntity = exports.BackgroundAttributesEntity = exports.OpenIdConfigEntity = exports.IdentityMetadataItemEntity = exports.IdentityEntity = exports.DidAuthConfigEntity = exports.CorrelationIdentifierEntity = exports.PartyEntity = exports.ConnectionEntity = exports.BaseConfigEntity = exports.DataStoreEntities = exports.DataStoreDigitalCredentialEntities = exports.DataStoreEventLoggerEntities = exports.DataStoreStatusListEntities = exports.DataStoreIssuanceBrandingEntities = exports.DataStoreContactEntities = exports.DataStoreStatusListMigrations = exports.DataStoreIssuanceBrandingMigrations = exports.DataStoreContactMigrations = exports.DataStoreEventLoggerMigrations = exports.DataStoreMigrations = exports.EventLoggerStore = exports.AbstractEventLoggerStore = exports.StatusListStore = exports.IssuanceBrandingStore = exports.AbstractIssuanceBrandingStore = exports.AbstractContactStore = exports.ContactStore = void 0;
|
|
18
|
+
exports.nonPersistedDigitalCredentialEntityFromAddArgs = exports.digitalCredentialsFrom = exports.digitalCredentialFrom = void 0;
|
|
18
19
|
const BaseConfigEntity_1 = require("./entities/contact/BaseConfigEntity");
|
|
19
20
|
Object.defineProperty(exports, "BaseConfigEntity", { enumerable: true, get: function () { return BaseConfigEntity_1.BaseConfigEntity; } });
|
|
20
21
|
const BaseLocaleBrandingEntity_1 = require("./entities/issuanceBranding/BaseLocaleBrandingEntity");
|
|
@@ -83,6 +84,12 @@ Object.defineProperty(exports, "StatusListStore", { enumerable: true, get: funct
|
|
|
83
84
|
const AuditEventEntity_1 = require("./entities/eventLogger/AuditEventEntity");
|
|
84
85
|
Object.defineProperty(exports, "AuditEventEntity", { enumerable: true, get: function () { return AuditEventEntity_1.AuditEventEntity; } });
|
|
85
86
|
Object.defineProperty(exports, "auditEventEntityFrom", { enumerable: true, get: function () { return AuditEventEntity_1.auditEventEntityFrom; } });
|
|
87
|
+
const DigitalCredentialEntity_1 = require("./entities/digitalCredential/DigitalCredentialEntity");
|
|
88
|
+
Object.defineProperty(exports, "DigitalCredentialEntity", { enumerable: true, get: function () { return DigitalCredentialEntity_1.DigitalCredentialEntity; } });
|
|
89
|
+
const MappingUtils_1 = require("./utils/digitalCredential/MappingUtils");
|
|
90
|
+
Object.defineProperty(exports, "digitalCredentialFrom", { enumerable: true, get: function () { return MappingUtils_1.digitalCredentialFrom; } });
|
|
91
|
+
Object.defineProperty(exports, "digitalCredentialsFrom", { enumerable: true, get: function () { return MappingUtils_1.digitalCredentialsFrom; } });
|
|
92
|
+
Object.defineProperty(exports, "nonPersistedDigitalCredentialEntityFromAddArgs", { enumerable: true, get: function () { return MappingUtils_1.nonPersistedDigitalCredentialEntityFromAddArgs; } });
|
|
86
93
|
var AbstractEventLoggerStore_1 = require("./eventLogger/AbstractEventLoggerStore");
|
|
87
94
|
Object.defineProperty(exports, "AbstractEventLoggerStore", { enumerable: true, get: function () { return AbstractEventLoggerStore_1.AbstractEventLoggerStore; } });
|
|
88
95
|
var EventLoggerStore_1 = require("./eventLogger/EventLoggerStore");
|
|
@@ -125,11 +132,13 @@ exports.DataStoreIssuanceBrandingEntities = [
|
|
|
125
132
|
];
|
|
126
133
|
exports.DataStoreStatusListEntities = [StatusList2021Entity_1.StatusListEntity, StatusList2021EntryEntity_1.StatusListEntryEntity];
|
|
127
134
|
exports.DataStoreEventLoggerEntities = [AuditEventEntity_1.AuditEventEntity];
|
|
135
|
+
exports.DataStoreDigitalCredentialEntities = [DigitalCredentialEntity_1.DigitalCredentialEntity];
|
|
128
136
|
// All entities combined if a party wants to enable them all at once
|
|
129
137
|
exports.DataStoreEntities = [
|
|
130
138
|
...exports.DataStoreContactEntities,
|
|
131
139
|
...exports.DataStoreIssuanceBrandingEntities,
|
|
132
140
|
...exports.DataStoreStatusListEntities,
|
|
133
141
|
...exports.DataStoreEventLoggerEntities,
|
|
142
|
+
...exports.DataStoreDigitalCredentialEntities,
|
|
134
143
|
];
|
|
135
144
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,0EAAsE;AA6FpE,iGA7FO,mCAAgB,OA6FP;AA5FlB,mGAA+F;AAwG7F,yGAxGO,mDAAwB,OAwGP;AAvG1B,4EAAwE;AACxE,0EAAsE;AA2FpE,iGA3FO,mCAAgB,OA2FP;AA1FlB,gEAA4D;AA2F1D,4FA3FO,yBAAW,OA2FP;AA1Fb,gGAA4F;AA2F1F,4GA3FO,yDAA2B,OA2FP;AA1F7B,gFAA4E;AA2F1E,oGA3FO,yCAAmB,OA2FP;AA1FrB,sEAAkE;AA2FhE,+FA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B;IAC9B,GAAG,oCAA4B;IAC/B,GAAG,0CAAkC;CACtC,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
export declare class CreateDigitalCredential1708525189000 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=6-CreateDigitalCredential.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"6-CreateDigitalCredential.d.ts","sourceRoot":"","sources":["../../../src/migrations/generic/6-CreateDigitalCredential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAOvE,qBAAa,oCAAqC,YAAW,kBAAkB;IAC7E,IAAI,EAAE,MAAM,CAAyC;IAExC,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA4B3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CA2B3D"}
|
|
@@ -0,0 +1,78 @@
|
|
|
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.CreateDigitalCredential1708525189000 = void 0;
|
|
16
|
+
const debug_1 = __importDefault(require("debug"));
|
|
17
|
+
const _1708525189001_CreateDigitalCredential_1 = require("../postgres/1708525189001-CreateDigitalCredential");
|
|
18
|
+
const _1708525189002_CreateDigitalCredential_1 = require("../sqlite/1708525189002-CreateDigitalCredential");
|
|
19
|
+
const debug = (0, debug_1.default)('sphereon:ssi-sdk:migrations');
|
|
20
|
+
class CreateDigitalCredential1708525189000 {
|
|
21
|
+
constructor() {
|
|
22
|
+
this.name = 'CreateDigitalCredential1708525189000';
|
|
23
|
+
}
|
|
24
|
+
up(queryRunner) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
debug('migration: creating DigitalCredential tables');
|
|
27
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
28
|
+
switch (dbType) {
|
|
29
|
+
case 'postgres': {
|
|
30
|
+
debug('using postgres migration file for DigitalCredential');
|
|
31
|
+
const mig = new _1708525189001_CreateDigitalCredential_1.CreateDigitalCredential1708525189001();
|
|
32
|
+
yield mig.up(queryRunner);
|
|
33
|
+
debug('Postgres Migration statements for DigitalCredential executed');
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
case 'sqlite':
|
|
37
|
+
case 'expo':
|
|
38
|
+
case 'react-native': {
|
|
39
|
+
debug('using sqlite/react-native migration file for DigitalCredential');
|
|
40
|
+
const mig = new _1708525189002_CreateDigitalCredential_1.CreateDigitalCredential1708525189002();
|
|
41
|
+
yield mig.up(queryRunner);
|
|
42
|
+
debug('SQLite Migration statements for DigitalCredential executed');
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
default:
|
|
46
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo, and postgres for UniformCredential. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
down(queryRunner) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
debug('migration: reverting DigitalCredential tables');
|
|
53
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
54
|
+
switch (dbType) {
|
|
55
|
+
case 'postgres': {
|
|
56
|
+
debug('using postgres migration file for DigitalCredential');
|
|
57
|
+
const mig = new _1708525189001_CreateDigitalCredential_1.CreateDigitalCredential1708525189001();
|
|
58
|
+
yield mig.down(queryRunner);
|
|
59
|
+
debug('Postgres Migration statements for DigitalCredential reverted');
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
case 'sqlite':
|
|
63
|
+
case 'expo':
|
|
64
|
+
case 'react-native': {
|
|
65
|
+
debug('using sqlite/react-native migration file for DigitalCredential');
|
|
66
|
+
const mig = new _1708525189002_CreateDigitalCredential_1.CreateDigitalCredential1708525189002();
|
|
67
|
+
yield mig.down(queryRunner);
|
|
68
|
+
debug('SQLite Migration statements for DigitalCredential reverted');
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
default:
|
|
72
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo, and postgres for DigitalCredential. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.CreateDigitalCredential1708525189000 = CreateDigitalCredential1708525189000;
|
|
78
|
+
//# sourceMappingURL=6-CreateDigitalCredential.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"6-CreateDigitalCredential.js","sourceRoot":"","sources":["../../../src/migrations/generic/6-CreateDigitalCredential.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAAuC;AACvC,8GAAwG;AACxG,4GAAsG;A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AE,CAAA;oBAC5F,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;oBAC3B,KAAK,CAAC,8DAA8D,CAAC,CAAA;oBACrE,OAAM;iBACP;gBACD,KAAK,QAAQ,CAAC;gBACd,KAAK,MAAM,CAAC;gBACZ,KAAK,cAAc,CAAC,CAAC;oBACnB,KAAK,CAAC,gEAAgE,CAAC,CAAA;oBACvE,MAAM,GAAG,GAAyC,IAAI,6EAAoC,EAAE,CAAA;oBAC5F,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;oBAC3B,KAAK,CAAC,4DAA4D,CAAC,CAAA;oBACnE,OAAM;iBACP;gBACD;oBACE,OAAO,OAAO,CAAC,MAAM,CACnB,mHAAmH,MAAM,+GAA+G,CACzO,CAAA;aACJ;QACH,CAAC;KAAA;CACF;AA1DD,oFA0DC"}
|
|
@@ -2,6 +2,7 @@ import { CreateContacts1659463079429 } from './1-CreateContacts';
|
|
|
2
2
|
import { CreateIssuanceBranding1659463079429 } from './2-CreateIssuanceBranding';
|
|
3
3
|
import { CreateStatusList1693866470000 } from './4-CreateStatusList';
|
|
4
4
|
import { CreateAuditEvents1701635835330 } from './5-CreateAuditEvents';
|
|
5
|
+
import { CreateDigitalCredential1708525189000 } from './6-CreateDigitalCredential';
|
|
5
6
|
/**
|
|
6
7
|
* The migrations array that SHOULD be used when initializing a TypeORM database connection.
|
|
7
8
|
*
|
|
@@ -13,5 +14,6 @@ export declare const DataStoreContactMigrations: (typeof CreateContacts165946307
|
|
|
13
14
|
export declare const DataStoreIssuanceBrandingMigrations: (typeof CreateIssuanceBranding1659463079429)[];
|
|
14
15
|
export declare const DataStoreStatusListMigrations: (typeof CreateStatusList1693866470000)[];
|
|
15
16
|
export declare const DataStoreEventLoggerMigrations: (typeof CreateAuditEvents1701635835330)[];
|
|
17
|
+
export declare const DataStoreDigitalCredentialMigrations: (typeof CreateDigitalCredential1708525189000)[];
|
|
16
18
|
export declare const DataStoreMigrations: (typeof CreateContacts1659463079429)[];
|
|
17
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/migrations/generic/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAA;AAChE,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAA;AAEhF,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/migrations/generic/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAA;AAChE,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAA;AAEhF,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,oCAAoC,EAAE,MAAM,6BAA6B,CAAA;AAElF;;;;;;GAMG;AAGH,eAAO,MAAM,0BAA0B,wCAA6D,CAAA;AACpG,eAAO,MAAM,mCAAmC,gDAAwC,CAAA;AACxF,eAAO,MAAM,6BAA6B,0CAAkC,CAAA;AAC5E,eAAO,MAAM,8BAA8B,2CAAmC,CAAA;AAC9E,eAAO,MAAM,oCAAoC,iDAAyC,CAAA;AAG1F,eAAO,MAAM,mBAAmB,wCAM/B,CAAA"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DataStoreMigrations = exports.DataStoreEventLoggerMigrations = exports.DataStoreStatusListMigrations = exports.DataStoreIssuanceBrandingMigrations = exports.DataStoreContactMigrations = void 0;
|
|
3
|
+
exports.DataStoreMigrations = exports.DataStoreDigitalCredentialMigrations = exports.DataStoreEventLoggerMigrations = exports.DataStoreStatusListMigrations = exports.DataStoreIssuanceBrandingMigrations = exports.DataStoreContactMigrations = void 0;
|
|
4
4
|
const _1_CreateContacts_1 = require("./1-CreateContacts");
|
|
5
5
|
const _2_CreateIssuanceBranding_1 = require("./2-CreateIssuanceBranding");
|
|
6
6
|
const _3_CreateContacts_1 = require("./3-CreateContacts");
|
|
7
7
|
const _4_CreateStatusList_1 = require("./4-CreateStatusList");
|
|
8
8
|
const _5_CreateAuditEvents_1 = require("./5-CreateAuditEvents");
|
|
9
|
+
const _6_CreateDigitalCredential_1 = require("./6-CreateDigitalCredential");
|
|
9
10
|
/**
|
|
10
11
|
* The migrations array that SHOULD be used when initializing a TypeORM database connection.
|
|
11
12
|
*
|
|
@@ -18,11 +19,13 @@ exports.DataStoreContactMigrations = [_1_CreateContacts_1.CreateContacts16594630
|
|
|
18
19
|
exports.DataStoreIssuanceBrandingMigrations = [_2_CreateIssuanceBranding_1.CreateIssuanceBranding1659463079429];
|
|
19
20
|
exports.DataStoreStatusListMigrations = [_4_CreateStatusList_1.CreateStatusList1693866470000];
|
|
20
21
|
exports.DataStoreEventLoggerMigrations = [_5_CreateAuditEvents_1.CreateAuditEvents1701635835330];
|
|
22
|
+
exports.DataStoreDigitalCredentialMigrations = [_6_CreateDigitalCredential_1.CreateDigitalCredential1708525189000];
|
|
21
23
|
// All migrations together
|
|
22
24
|
exports.DataStoreMigrations = [
|
|
23
25
|
...exports.DataStoreContactMigrations,
|
|
24
26
|
...exports.DataStoreIssuanceBrandingMigrations,
|
|
25
27
|
...exports.DataStoreStatusListMigrations,
|
|
26
28
|
...exports.DataStoreEventLoggerMigrations,
|
|
29
|
+
...exports.DataStoreDigitalCredentialMigrations,
|
|
27
30
|
];
|
|
28
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/migrations/generic/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgE;AAChE,0EAAgF;AAChF,0DAAgE;AAChE,8DAAoE;AACpE,gEAAsE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/migrations/generic/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgE;AAChE,0EAAgF;AAChF,0DAAgE;AAChE,8DAAoE;AACpE,gEAAsE;AACtE,4EAAkF;AAElF;;;;;;GAMG;AAEH,yJAAyJ;AAC5I,QAAA,0BAA0B,GAAG,CAAC,+CAA2B,EAAE,+CAA2B,CAAC,CAAA;AACvF,QAAA,mCAAmC,GAAG,CAAC,+DAAmC,CAAC,CAAA;AAC3E,QAAA,6BAA6B,GAAG,CAAC,mDAA6B,CAAC,CAAA;AAC/D,QAAA,8BAA8B,GAAG,CAAC,qDAA8B,CAAC,CAAA;AACjE,QAAA,oCAAoC,GAAG,CAAC,iEAAoC,CAAC,CAAA;AAE1F,0BAA0B;AACb,QAAA,mBAAmB,GAAG;IACjC,GAAG,kCAA0B;IAC7B,GAAG,2CAAmC;IACtC,GAAG,qCAA6B;IAChC,GAAG,sCAA8B;IACjC,GAAG,4CAAoC;CACxC,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { DataStoreMigrations, DataStoreEventLoggerMigrations, DataStoreContactMigrations, DataStoreIssuanceBrandingMigrations, DataStoreStatusListMigrations, } from './generic';
|
|
1
|
+
export { DataStoreMigrations, DataStoreEventLoggerMigrations, DataStoreContactMigrations, DataStoreIssuanceBrandingMigrations, DataStoreStatusListMigrations, DataStoreDigitalCredentialMigrations, } from './generic';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,8BAA8B,EAC9B,0BAA0B,EAC1B,mCAAmC,EACnC,6BAA6B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,8BAA8B,EAC9B,0BAA0B,EAC1B,mCAAmC,EACnC,6BAA6B,EAC7B,oCAAoC,GACrC,MAAM,WAAW,CAAA"}
|
package/dist/migrations/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DataStoreStatusListMigrations = exports.DataStoreIssuanceBrandingMigrations = exports.DataStoreContactMigrations = exports.DataStoreEventLoggerMigrations = exports.DataStoreMigrations = void 0;
|
|
3
|
+
exports.DataStoreDigitalCredentialMigrations = exports.DataStoreStatusListMigrations = exports.DataStoreIssuanceBrandingMigrations = exports.DataStoreContactMigrations = exports.DataStoreEventLoggerMigrations = exports.DataStoreMigrations = void 0;
|
|
4
4
|
var generic_1 = require("./generic");
|
|
5
5
|
Object.defineProperty(exports, "DataStoreMigrations", { enumerable: true, get: function () { return generic_1.DataStoreMigrations; } });
|
|
6
6
|
Object.defineProperty(exports, "DataStoreEventLoggerMigrations", { enumerable: true, get: function () { return generic_1.DataStoreEventLoggerMigrations; } });
|
|
7
7
|
Object.defineProperty(exports, "DataStoreContactMigrations", { enumerable: true, get: function () { return generic_1.DataStoreContactMigrations; } });
|
|
8
8
|
Object.defineProperty(exports, "DataStoreIssuanceBrandingMigrations", { enumerable: true, get: function () { return generic_1.DataStoreIssuanceBrandingMigrations; } });
|
|
9
9
|
Object.defineProperty(exports, "DataStoreStatusListMigrations", { enumerable: true, get: function () { return generic_1.DataStoreStatusListMigrations; } });
|
|
10
|
+
Object.defineProperty(exports, "DataStoreDigitalCredentialMigrations", { enumerable: true, get: function () { return generic_1.DataStoreDigitalCredentialMigrations; } });
|
|
10
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":";;;AAAA,qCAOkB;AANhB,8GAAA,mBAAmB,OAAA;AACnB,yHAAA,8BAA8B,OAAA;AAC9B,qHAAA,0BAA0B,OAAA;AAC1B,8HAAA,mCAAmC,OAAA;AACnC,wHAAA,6BAA6B,OAAA;AAC7B,+HAAA,oCAAoC,OAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
export declare class CreateDigitalCredential1708525189001 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1708525189001-CreateDigitalCredential.d.ts.map
|