@sphereon/ssi-sdk.data-store 0.36.1-feature.vdx24.einvoice.endpoints.122 → 0.36.1-feature.vdx24.einvoice.inbox.138

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/index.js CHANGED
@@ -1,3423 +1,8 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
8
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
- }) : x)(function(x) {
11
- if (typeof require !== "undefined") return require.apply(this, arguments);
12
- throw Error('Dynamic require of "' + x + '" is not supported');
13
- });
14
- var __commonJS = (cb, mod) => function __require2() {
15
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16
- };
17
- var __copyProps = (to, from, except, desc) => {
18
- if (from && typeof from === "object" || typeof from === "function") {
19
- for (let key of __getOwnPropNames(from))
20
- if (!__hasOwnProp.call(to, key) && key !== except)
21
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
22
- }
23
- return to;
24
- };
25
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26
- // If the importer is in node compatibility mode or this is not an ESM
27
- // file that has been converted to a CommonJS file using a Babel-
28
- // compatible transform (i.e. "__esModule" has not been set), then set
29
- // "default" to the CommonJS "module.exports" for node compatibility.
30
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
31
- mod
32
- ));
33
-
34
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/key.js
35
- var require_key = __commonJS({
36
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/key.js"(exports) {
37
- "use strict";
38
- var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) {
39
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
40
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
41
- 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;
42
- return c > 3 && r && Object.defineProperty(target, key, r), r;
43
- };
44
- var __metadata = exports && exports.__metadata || function(k, v) {
45
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
46
- };
47
- Object.defineProperty(exports, "__esModule", {
48
- value: true
49
- });
50
- exports.Key = void 0;
51
- var typeorm_1 = __require("typeorm");
52
- var identifier_1 = require_identifier();
53
- var Key = class Key extends typeorm_1.BaseEntity {
54
- static {
55
- __name(this, "Key");
56
- }
57
- };
58
- __decorate([
59
- (0, typeorm_1.PrimaryColumn)(),
60
- __metadata("design:type", String)
61
- ], Key.prototype, "kid", void 0);
62
- __decorate([
63
- (0, typeorm_1.Column)(),
64
- __metadata("design:type", String)
65
- ], Key.prototype, "kms", void 0);
66
- __decorate([
67
- (0, typeorm_1.Column)(),
68
- __metadata("design:type", String)
69
- ], Key.prototype, "type", void 0);
70
- __decorate([
71
- (0, typeorm_1.Column)(),
72
- __metadata("design:type", String)
73
- ], Key.prototype, "publicKeyHex", void 0);
74
- __decorate([
75
- (0, typeorm_1.Column)({
76
- type: "simple-json",
77
- nullable: true,
78
- transformer: {
79
- to: /* @__PURE__ */ __name((value) => {
80
- return value;
81
- }, "to"),
82
- from: /* @__PURE__ */ __name((value) => {
83
- return value;
84
- }, "from")
85
- }
86
- }),
87
- __metadata("design:type", Object)
88
- ], Key.prototype, "meta", void 0);
89
- __decorate([
90
- (0, typeorm_1.ManyToOne)((type) => identifier_1.Identifier, (identifier) => identifier === null || identifier === void 0 ? void 0 : identifier.keys, {
91
- onDelete: "CASCADE"
92
- }),
93
- __metadata("design:type", identifier_1.Identifier)
94
- ], Key.prototype, "identifier", void 0);
95
- Key = __decorate([
96
- (0, typeorm_1.Entity)("key")
97
- ], Key);
98
- exports.Key = Key;
99
- }
100
- });
101
-
102
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/service.js
103
- var require_service = __commonJS({
104
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/service.js"(exports) {
105
- "use strict";
106
- var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) {
107
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
108
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
109
- 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;
110
- return c > 3 && r && Object.defineProperty(target, key, r), r;
111
- };
112
- var __metadata = exports && exports.__metadata || function(k, v) {
113
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
114
- };
115
- Object.defineProperty(exports, "__esModule", {
116
- value: true
117
- });
118
- exports.Service = void 0;
119
- var typeorm_1 = __require("typeorm");
120
- var identifier_1 = require_identifier();
121
- var Service = class Service extends typeorm_1.BaseEntity {
122
- static {
123
- __name(this, "Service");
124
- }
125
- };
126
- __decorate([
127
- (0, typeorm_1.PrimaryColumn)(),
128
- __metadata("design:type", String)
129
- ], Service.prototype, "id", void 0);
130
- __decorate([
131
- (0, typeorm_1.Column)(),
132
- __metadata("design:type", String)
133
- ], Service.prototype, "type", void 0);
134
- __decorate([
135
- (0, typeorm_1.Column)(),
136
- __metadata("design:type", String)
137
- ], Service.prototype, "serviceEndpoint", void 0);
138
- __decorate([
139
- (0, typeorm_1.Column)({
140
- nullable: true
141
- }),
142
- __metadata("design:type", String)
143
- ], Service.prototype, "description", void 0);
144
- __decorate([
145
- (0, typeorm_1.ManyToOne)((type) => identifier_1.Identifier, (identifier) => identifier === null || identifier === void 0 ? void 0 : identifier.services, {
146
- onDelete: "CASCADE"
147
- }),
148
- __metadata("design:type", identifier_1.Identifier)
149
- ], Service.prototype, "identifier", void 0);
150
- Service = __decorate([
151
- (0, typeorm_1.Entity)("service")
152
- ], Service);
153
- exports.Service = Service;
154
- }
155
- });
156
-
157
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/claim.js
158
- var require_claim = __commonJS({
159
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/claim.js"(exports) {
160
- "use strict";
161
- var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) {
162
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
163
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
164
- 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;
165
- return c > 3 && r && Object.defineProperty(target, key, r), r;
166
- };
167
- var __metadata = exports && exports.__metadata || function(k, v) {
168
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
169
- };
170
- Object.defineProperty(exports, "__esModule", {
171
- value: true
172
- });
173
- exports.Claim = void 0;
174
- var typeorm_1 = __require("typeorm");
175
- var identifier_1 = require_identifier();
176
- var credential_1 = require_credential();
177
- var Claim = class Claim extends typeorm_1.BaseEntity {
178
- static {
179
- __name(this, "Claim");
180
- }
181
- };
182
- __decorate([
183
- (0, typeorm_1.PrimaryColumn)(),
184
- __metadata("design:type", String)
185
- ], Claim.prototype, "hash", void 0);
186
- __decorate([
187
- (0, typeorm_1.ManyToOne)((type) => identifier_1.Identifier, (identifier) => identifier.issuedClaims, {
188
- eager: true,
189
- onDelete: "CASCADE"
190
- }),
191
- __metadata("design:type", identifier_1.Identifier)
192
- ], Claim.prototype, "issuer", void 0);
193
- __decorate([
194
- (0, typeorm_1.ManyToOne)((type) => identifier_1.Identifier, (identifier) => identifier.receivedClaims, {
195
- eager: true,
196
- nullable: true
197
- }),
198
- __metadata("design:type", identifier_1.Identifier)
199
- ], Claim.prototype, "subject", void 0);
200
- __decorate([
201
- (0, typeorm_1.ManyToOne)((type) => credential_1.Credential, (credential) => credential.claims, {
202
- onDelete: "CASCADE"
203
- }),
204
- __metadata("design:type", credential_1.Credential)
205
- ], Claim.prototype, "credential", void 0);
206
- __decorate([
207
- (0, typeorm_1.Column)(),
208
- __metadata("design:type", Date)
209
- ], Claim.prototype, "issuanceDate", void 0);
210
- __decorate([
211
- (0, typeorm_1.Column)({
212
- nullable: true
213
- }),
214
- __metadata("design:type", Date)
215
- ], Claim.prototype, "expirationDate", void 0);
216
- __decorate([
217
- (0, typeorm_1.Column)("simple-array"),
218
- __metadata("design:type", Array)
219
- ], Claim.prototype, "context", void 0);
220
- __decorate([
221
- (0, typeorm_1.Column)("simple-array"),
222
- __metadata("design:type", Array)
223
- ], Claim.prototype, "credentialType", void 0);
224
- __decorate([
225
- (0, typeorm_1.Column)(),
226
- __metadata("design:type", String)
227
- ], Claim.prototype, "type", void 0);
228
- __decorate([
229
- (0, typeorm_1.Column)("text", {
230
- nullable: true
231
- }),
232
- __metadata("design:type", Object)
233
- ], Claim.prototype, "value", void 0);
234
- __decorate([
235
- (0, typeorm_1.Column)(),
236
- __metadata("design:type", Boolean)
237
- ], Claim.prototype, "isObj", void 0);
238
- Claim = __decorate([
239
- (0, typeorm_1.Entity)("claim")
240
- ], Claim);
241
- exports.Claim = Claim;
242
- }
243
- });
244
-
245
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/credential.js
246
- var require_credential = __commonJS({
247
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/credential.js"(exports) {
248
- "use strict";
249
- var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) {
250
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
251
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
252
- 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;
253
- return c > 3 && r && Object.defineProperty(target, key, r), r;
254
- };
255
- var __metadata = exports && exports.__metadata || function(k, v) {
256
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
257
- };
258
- Object.defineProperty(exports, "__esModule", {
259
- value: true
260
- });
261
- exports.createCredentialEntity = exports.Credential = void 0;
262
- var typeorm_1 = __require("typeorm");
263
- var identifier_1 = require_identifier();
264
- var message_1 = require_message();
265
- var presentation_1 = require_presentation();
266
- var claim_1 = require_claim();
267
- var utils_1 = __require("@veramo/utils");
268
- var Credential = class Credential extends typeorm_1.BaseEntity {
269
- static {
270
- __name(this, "Credential");
271
- }
272
- set raw(raw) {
273
- this._raw = raw;
274
- this.hash = (0, utils_1.computeEntryHash)(raw);
275
- }
276
- get raw() {
277
- return this._raw;
278
- }
279
- };
280
- __decorate([
281
- (0, typeorm_1.PrimaryColumn)(),
282
- __metadata("design:type", String)
283
- ], Credential.prototype, "hash", void 0);
284
- __decorate([
285
- (0, typeorm_1.Column)("simple-json"),
286
- __metadata("design:type", Object),
287
- __metadata("design:paramtypes", [
288
- Object
289
- ])
290
- ], Credential.prototype, "raw", null);
291
- __decorate([
292
- (0, typeorm_1.ManyToOne)((type) => identifier_1.Identifier, (identifier) => identifier.issuedCredentials, {
293
- cascade: [
294
- "insert"
295
- ],
296
- eager: true,
297
- onDelete: "CASCADE"
298
- }),
299
- __metadata("design:type", identifier_1.Identifier)
300
- ], Credential.prototype, "issuer", void 0);
301
- __decorate([
302
- (0, typeorm_1.ManyToOne)((type) => identifier_1.Identifier, (identifier) => identifier === null || identifier === void 0 ? void 0 : identifier.receivedCredentials, {
303
- cascade: [
304
- "insert"
305
- ],
306
- eager: true,
307
- nullable: true
308
- }),
309
- __metadata("design:type", identifier_1.Identifier)
310
- ], Credential.prototype, "subject", void 0);
311
- __decorate([
312
- (0, typeorm_1.Column)({
313
- nullable: true
314
- }),
315
- __metadata("design:type", String)
316
- ], Credential.prototype, "id", void 0);
317
- __decorate([
318
- (0, typeorm_1.Column)(),
319
- __metadata("design:type", Date)
320
- ], Credential.prototype, "issuanceDate", void 0);
321
- __decorate([
322
- (0, typeorm_1.Column)({
323
- nullable: true
324
- }),
325
- __metadata("design:type", Date)
326
- ], Credential.prototype, "expirationDate", void 0);
327
- __decorate([
328
- (0, typeorm_1.Column)("simple-array"),
329
- __metadata("design:type", Array)
330
- ], Credential.prototype, "context", void 0);
331
- __decorate([
332
- (0, typeorm_1.Column)("simple-array"),
333
- __metadata("design:type", Array)
334
- ], Credential.prototype, "type", void 0);
335
- __decorate([
336
- (0, typeorm_1.OneToMany)((type) => claim_1.Claim, (claim) => claim.credential, {
337
- cascade: [
338
- "insert"
339
- ]
340
- }),
341
- __metadata("design:type", Array)
342
- ], Credential.prototype, "claims", void 0);
343
- __decorate([
344
- (0, typeorm_1.ManyToMany)((type) => presentation_1.Presentation, (presentation) => presentation.credentials),
345
- __metadata("design:type", Array)
346
- ], Credential.prototype, "presentations", void 0);
347
- __decorate([
348
- (0, typeorm_1.ManyToMany)((type) => message_1.Message, (message) => message.credentials),
349
- __metadata("design:type", Array)
350
- ], Credential.prototype, "messages", void 0);
351
- Credential = __decorate([
352
- (0, typeorm_1.Entity)("credential")
353
- ], Credential);
354
- exports.Credential = Credential;
355
- var createCredentialEntity = /* @__PURE__ */ __name((vci) => {
356
- const vc = vci;
357
- const credential = new Credential();
358
- credential.context = (0, utils_1.asArray)(vc["@context"]);
359
- credential.type = (0, utils_1.asArray)(vc.type || []);
360
- credential.id = vc.id;
361
- if (vc.issuanceDate) {
362
- credential.issuanceDate = new Date(vc.issuanceDate);
363
- }
364
- if (vc.expirationDate) {
365
- credential.expirationDate = new Date(vc.expirationDate);
366
- }
367
- const issuer = new identifier_1.Identifier();
368
- issuer.did = (0, utils_1.extractIssuer)(vc);
369
- credential.issuer = issuer;
370
- if (vc.credentialSubject.id) {
371
- const subject = new identifier_1.Identifier();
372
- subject.did = vc.credentialSubject.id;
373
- credential.subject = subject;
374
- }
375
- credential.claims = [];
376
- for (const type in vc.credentialSubject) {
377
- if (vc.credentialSubject.hasOwnProperty(type)) {
378
- const value = vc.credentialSubject[type];
379
- if (type !== "id") {
380
- const isObj = typeof value === "function" || typeof value === "object" && !!value;
381
- const claim = new claim_1.Claim();
382
- claim.hash = (0, utils_1.computeEntryHash)(JSON.stringify(vc) + type);
383
- claim.type = type;
384
- claim.value = isObj ? JSON.stringify(value) : value;
385
- claim.isObj = isObj;
386
- claim.issuer = credential.issuer;
387
- claim.subject = credential.subject;
388
- claim.expirationDate = credential.expirationDate;
389
- claim.issuanceDate = credential.issuanceDate;
390
- claim.credentialType = credential.type;
391
- claim.context = credential.context;
392
- credential.claims.push(claim);
393
- }
394
- }
395
- }
396
- credential.raw = vci;
397
- return credential;
398
- }, "createCredentialEntity");
399
- exports.createCredentialEntity = createCredentialEntity;
400
- }
401
- });
402
-
403
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/presentation.js
404
- var require_presentation = __commonJS({
405
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/presentation.js"(exports) {
406
- "use strict";
407
- var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) {
408
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
409
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
410
- 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;
411
- return c > 3 && r && Object.defineProperty(target, key, r), r;
412
- };
413
- var __metadata = exports && exports.__metadata || function(k, v) {
414
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
415
- };
416
- Object.defineProperty(exports, "__esModule", {
417
- value: true
418
- });
419
- exports.createPresentationEntity = exports.Presentation = void 0;
420
- var typeorm_1 = __require("typeorm");
421
- var identifier_1 = require_identifier();
422
- var message_1 = require_message();
423
- var credential_1 = require_credential();
424
- var utils_1 = __require("@veramo/utils");
425
- var did_jwt_vc_1 = __require("did-jwt-vc");
426
- var Presentation = class Presentation extends typeorm_1.BaseEntity {
427
- static {
428
- __name(this, "Presentation");
429
- }
430
- set raw(raw) {
431
- this._raw = raw;
432
- this.hash = (0, utils_1.computeEntryHash)(raw);
433
- }
434
- get raw() {
435
- return this._raw;
436
- }
437
- };
438
- __decorate([
439
- (0, typeorm_1.PrimaryColumn)(),
440
- __metadata("design:type", String)
441
- ], Presentation.prototype, "hash", void 0);
442
- __decorate([
443
- (0, typeorm_1.Column)({
444
- type: "simple-json"
445
- }),
446
- __metadata("design:type", Object),
447
- __metadata("design:paramtypes", [
448
- Object
449
- ])
450
- ], Presentation.prototype, "raw", null);
451
- __decorate([
452
- (0, typeorm_1.ManyToOne)((type) => identifier_1.Identifier, (identifier) => identifier.issuedPresentations, {
453
- cascade: [
454
- "insert"
455
- ],
456
- eager: true,
457
- onDelete: "CASCADE"
458
- }),
459
- __metadata("design:type", identifier_1.Identifier)
460
- ], Presentation.prototype, "holder", void 0);
461
- __decorate([
462
- (0, typeorm_1.ManyToMany)((type) => identifier_1.Identifier, (identifier) => identifier === null || identifier === void 0 ? void 0 : identifier.receivedPresentations, {
463
- cascade: [
464
- "insert"
465
- ],
466
- eager: true,
467
- nullable: true
468
- }),
469
- (0, typeorm_1.JoinTable)(),
470
- __metadata("design:type", Array)
471
- ], Presentation.prototype, "verifier", void 0);
472
- __decorate([
473
- (0, typeorm_1.Column)({
474
- nullable: true
475
- }),
476
- __metadata("design:type", String)
477
- ], Presentation.prototype, "id", void 0);
478
- __decorate([
479
- (0, typeorm_1.Column)(),
480
- __metadata("design:type", Date)
481
- ], Presentation.prototype, "issuanceDate", void 0);
482
- __decorate([
483
- (0, typeorm_1.Column)({
484
- nullable: true
485
- }),
486
- __metadata("design:type", Date)
487
- ], Presentation.prototype, "expirationDate", void 0);
488
- __decorate([
489
- (0, typeorm_1.Column)("simple-array"),
490
- __metadata("design:type", Array)
491
- ], Presentation.prototype, "context", void 0);
492
- __decorate([
493
- (0, typeorm_1.Column)("simple-array"),
494
- __metadata("design:type", Array)
495
- ], Presentation.prototype, "type", void 0);
496
- __decorate([
497
- (0, typeorm_1.ManyToMany)((type) => credential_1.Credential, (credential) => credential.presentations, {
498
- cascade: true
499
- }),
500
- (0, typeorm_1.JoinTable)(),
501
- __metadata("design:type", Array)
502
- ], Presentation.prototype, "credentials", void 0);
503
- __decorate([
504
- (0, typeorm_1.ManyToMany)((type) => message_1.Message, (message) => message.presentations),
505
- __metadata("design:type", Array)
506
- ], Presentation.prototype, "messages", void 0);
507
- Presentation = __decorate([
508
- (0, typeorm_1.Entity)("presentation")
509
- ], Presentation);
510
- exports.Presentation = Presentation;
511
- var createPresentationEntity = /* @__PURE__ */ __name((vpi) => {
512
- const vp = vpi;
513
- const presentation = new Presentation();
514
- presentation.context = (0, utils_1.asArray)(vp["@context"]);
515
- presentation.type = (0, utils_1.asArray)(vp.type || []);
516
- presentation.id = vp.id;
517
- if (vp.issuanceDate) {
518
- presentation.issuanceDate = new Date(vp.issuanceDate);
519
- }
520
- if (vp.expirationDate) {
521
- presentation.expirationDate = new Date(vp.expirationDate);
522
- }
523
- const holder = new identifier_1.Identifier();
524
- holder.did = vp.holder;
525
- presentation.holder = holder;
526
- presentation.verifier = (0, utils_1.asArray)(vp.verifier || []).map((verifierDid) => {
527
- const id = new identifier_1.Identifier();
528
- id.did = verifierDid;
529
- return id;
530
- });
531
- presentation.raw = vpi;
532
- presentation.credentials = (vp.verifiableCredential || []).map((cred) => {
533
- if (typeof cred === "string") {
534
- return (0, did_jwt_vc_1.normalizeCredential)(cred);
535
- } else {
536
- return cred;
537
- }
538
- }).map(credential_1.createCredentialEntity);
539
- return presentation;
540
- }, "createPresentationEntity");
541
- exports.createPresentationEntity = createPresentationEntity;
542
- }
543
- });
544
-
545
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/message.js
546
- var require_message = __commonJS({
547
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/message.js"(exports) {
548
- "use strict";
549
- var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) {
550
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
551
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
552
- 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;
553
- return c > 3 && r && Object.defineProperty(target, key, r), r;
554
- };
555
- var __metadata = exports && exports.__metadata || function(k, v) {
556
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
557
- };
558
- Object.defineProperty(exports, "__esModule", {
559
- value: true
560
- });
561
- exports.createMessage = exports.createMessageEntity = exports.Message = void 0;
562
- var typeorm_1 = __require("typeorm");
563
- var identifier_1 = require_identifier();
564
- var presentation_1 = require_presentation();
565
- var credential_1 = require_credential();
566
- var utils_1 = __require("@veramo/utils");
567
- var uuid_1 = __require("uuid");
568
- var Message = class Message extends typeorm_1.BaseEntity {
569
- static {
570
- __name(this, "Message");
571
- }
572
- setId() {
573
- if (!this.id) {
574
- this.id = (0, utils_1.computeEntryHash)(this.raw || (0, uuid_1.v4)());
575
- }
576
- }
577
- setSaveDate() {
578
- this.saveDate = /* @__PURE__ */ new Date();
579
- this.updateDate = /* @__PURE__ */ new Date();
580
- }
581
- setUpdateDate() {
582
- this.updateDate = /* @__PURE__ */ new Date();
583
- }
584
- };
585
- __decorate([
586
- (0, typeorm_1.BeforeInsert)(),
587
- __metadata("design:type", Function),
588
- __metadata("design:paramtypes", []),
589
- __metadata("design:returntype", void 0)
590
- ], Message.prototype, "setId", null);
591
- __decorate([
592
- (0, typeorm_1.PrimaryColumn)(),
593
- __metadata("design:type", String)
594
- ], Message.prototype, "id", void 0);
595
- __decorate([
596
- (0, typeorm_1.BeforeInsert)(),
597
- __metadata("design:type", Function),
598
- __metadata("design:paramtypes", []),
599
- __metadata("design:returntype", void 0)
600
- ], Message.prototype, "setSaveDate", null);
601
- __decorate([
602
- (0, typeorm_1.BeforeUpdate)(),
603
- __metadata("design:type", Function),
604
- __metadata("design:paramtypes", []),
605
- __metadata("design:returntype", void 0)
606
- ], Message.prototype, "setUpdateDate", null);
607
- __decorate([
608
- (0, typeorm_1.Column)({
609
- select: false
610
- }),
611
- __metadata("design:type", Date)
612
- ], Message.prototype, "saveDate", void 0);
613
- __decorate([
614
- (0, typeorm_1.Column)({
615
- select: false
616
- }),
617
- __metadata("design:type", Date)
618
- ], Message.prototype, "updateDate", void 0);
619
- __decorate([
620
- (0, typeorm_1.Column)({
621
- nullable: true
622
- }),
623
- __metadata("design:type", Date)
624
- ], Message.prototype, "createdAt", void 0);
625
- __decorate([
626
- (0, typeorm_1.Column)({
627
- nullable: true
628
- }),
629
- __metadata("design:type", Date)
630
- ], Message.prototype, "expiresAt", void 0);
631
- __decorate([
632
- (0, typeorm_1.Column)({
633
- nullable: true
634
- }),
635
- __metadata("design:type", String)
636
- ], Message.prototype, "threadId", void 0);
637
- __decorate([
638
- (0, typeorm_1.Column)(),
639
- __metadata("design:type", String)
640
- ], Message.prototype, "type", void 0);
641
- __decorate([
642
- (0, typeorm_1.Column)({
643
- nullable: true
644
- }),
645
- __metadata("design:type", String)
646
- ], Message.prototype, "raw", void 0);
647
- __decorate([
648
- (0, typeorm_1.Column)("simple-json", {
649
- nullable: true
650
- }),
651
- __metadata("design:type", Object)
652
- ], Message.prototype, "data", void 0);
653
- __decorate([
654
- (0, typeorm_1.Column)("simple-array", {
655
- nullable: true
656
- }),
657
- __metadata("design:type", Array)
658
- ], Message.prototype, "replyTo", void 0);
659
- __decorate([
660
- (0, typeorm_1.Column)({
661
- nullable: true
662
- }),
663
- __metadata("design:type", String)
664
- ], Message.prototype, "replyUrl", void 0);
665
- __decorate([
666
- (0, typeorm_1.ManyToOne)((type) => identifier_1.Identifier, (identifier) => identifier.sentMessages, {
667
- nullable: true,
668
- cascade: [
669
- "insert"
670
- ],
671
- eager: true,
672
- onDelete: "CASCADE"
673
- }),
674
- __metadata("design:type", identifier_1.Identifier)
675
- ], Message.prototype, "from", void 0);
676
- __decorate([
677
- (0, typeorm_1.ManyToOne)((type) => identifier_1.Identifier, (identifier) => identifier.receivedMessages, {
678
- nullable: true,
679
- cascade: [
680
- "insert"
681
- ],
682
- eager: true,
683
- onDelete: "CASCADE"
684
- }),
685
- __metadata("design:type", identifier_1.Identifier)
686
- ], Message.prototype, "to", void 0);
687
- __decorate([
688
- (0, typeorm_1.Column)("simple-json", {
689
- nullable: true
690
- }),
691
- __metadata("design:type", Object)
692
- ], Message.prototype, "metaData", void 0);
693
- __decorate([
694
- (0, typeorm_1.ManyToMany)((type) => presentation_1.Presentation, (presentation) => presentation.messages, {
695
- cascade: true
696
- }),
697
- (0, typeorm_1.JoinTable)(),
698
- __metadata("design:type", Array)
699
- ], Message.prototype, "presentations", void 0);
700
- __decorate([
701
- (0, typeorm_1.ManyToMany)((type) => credential_1.Credential, (credential) => credential.messages, {
702
- cascade: true
703
- }),
704
- (0, typeorm_1.JoinTable)(),
705
- __metadata("design:type", Array)
706
- ], Message.prototype, "credentials", void 0);
707
- Message = __decorate([
708
- (0, typeorm_1.Entity)("message")
709
- ], Message);
710
- exports.Message = Message;
711
- var createMessageEntity = /* @__PURE__ */ __name((args) => {
712
- const message = new Message();
713
- message.id = args.id;
714
- message.threadId = args.threadId;
715
- message.type = args.type;
716
- message.raw = args.raw;
717
- message.data = args.data;
718
- message.metaData = args.metaData;
719
- if (args.replyTo) {
720
- message.replyTo = args.replyTo;
721
- }
722
- if (args.replyUrl) {
723
- message.replyUrl = args.replyUrl;
724
- }
725
- if (args.createdAt) {
726
- message.createdAt = new Date(args.createdAt);
727
- }
728
- if (args.expiresAt) {
729
- message.createdAt = new Date(args.expiresAt);
730
- }
731
- if (args.from) {
732
- const from = new identifier_1.Identifier();
733
- from.did = args.from;
734
- message.from = from;
735
- }
736
- if (args.to) {
737
- const to = new identifier_1.Identifier();
738
- to.did = args.to;
739
- message.to = to;
740
- }
741
- if (args.presentations) {
742
- message.presentations = args.presentations.map(presentation_1.createPresentationEntity);
743
- }
744
- if (args.credentials) {
745
- message.credentials = args.credentials.map(credential_1.createCredentialEntity);
746
- }
747
- return message;
748
- }, "createMessageEntity");
749
- exports.createMessageEntity = createMessageEntity;
750
- var createMessage = /* @__PURE__ */ __name((args) => {
751
- const message = {
752
- id: args.id,
753
- type: args.type,
754
- raw: args.raw,
755
- data: args.data,
756
- metaData: args.metaData
757
- };
758
- if (args.threadId) {
759
- message.threadId = args.threadId;
760
- }
761
- if (args.replyTo) {
762
- message.replyTo = args.replyTo;
763
- }
764
- if (args.replyTo) {
765
- message.replyUrl = args.replyUrl;
766
- }
767
- if (args.createdAt) {
768
- message.createdAt = args.createdAt.toISOString();
769
- }
770
- if (args.expiresAt) {
771
- message.expiresAt = args.expiresAt.toISOString();
772
- }
773
- if (args.from) {
774
- message.from = args.from.did;
775
- }
776
- if (args.to) {
777
- message.to = args.to.did;
778
- }
779
- if (args.presentations) {
780
- message.presentations = args.presentations.map((vp) => vp.raw);
781
- }
782
- if (args.credentials) {
783
- message.credentials = args.credentials.map((vc) => vc.raw);
784
- }
785
- return message;
786
- }, "createMessage");
787
- exports.createMessage = createMessage;
788
- }
789
- });
790
-
791
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/identifier.js
792
- var require_identifier = __commonJS({
793
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/identifier.js"(exports) {
794
- "use strict";
795
- var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) {
796
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
797
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
798
- 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;
799
- return c > 3 && r && Object.defineProperty(target, key, r), r;
800
- };
801
- var __metadata = exports && exports.__metadata || function(k, v) {
802
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
803
- };
804
- var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
805
- function adopt(value) {
806
- return value instanceof P ? value : new P(function(resolve) {
807
- resolve(value);
808
- });
809
- }
810
- __name(adopt, "adopt");
811
- return new (P || (P = Promise))(function(resolve, reject) {
812
- function fulfilled(value) {
813
- try {
814
- step(generator.next(value));
815
- } catch (e) {
816
- reject(e);
817
- }
818
- }
819
- __name(fulfilled, "fulfilled");
820
- function rejected(value) {
821
- try {
822
- step(generator["throw"](value));
823
- } catch (e) {
824
- reject(e);
825
- }
826
- }
827
- __name(rejected, "rejected");
828
- function step(result) {
829
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
830
- }
831
- __name(step, "step");
832
- step((generator = generator.apply(thisArg, _arguments || [])).next());
833
- });
834
- };
835
- Object.defineProperty(exports, "__esModule", {
836
- value: true
837
- });
838
- exports.Identifier = void 0;
839
- var typeorm_1 = __require("typeorm");
840
- var key_1 = require_key();
841
- var service_1 = require_service();
842
- var message_1 = require_message();
843
- var presentation_1 = require_presentation();
844
- var credential_1 = require_credential();
845
- var claim_1 = require_claim();
846
- var Identifier = class Identifier extends typeorm_1.BaseEntity {
847
- static {
848
- __name(this, "Identifier");
849
- }
850
- setSaveDate() {
851
- this.saveDate = /* @__PURE__ */ new Date();
852
- this.updateDate = /* @__PURE__ */ new Date();
853
- }
854
- setUpdateDate() {
855
- this.updateDate = /* @__PURE__ */ new Date();
856
- }
857
- /**
858
- * Convenience method to get the most recent information about a subject DID as described by Verifiable Credential
859
- * claims.
860
- *
861
- * Example:
862
- * ```typescript
863
- * // get the latest claim value for credentials containing `credentialSubject.name` and this Identifier as subject.
864
- * const name = await identifier.getLatestClaimValue({type: 'name'})
865
- * ```
866
- *
867
- * @param where - The TypeORM `where` filter to use.
868
- */
869
- getLatestClaimValue(dbConnection, where) {
870
- return __awaiter(this, void 0, void 0, function* () {
871
- const claim = yield (yield dbConnection).getRepository(claim_1.Claim).findOne({
872
- where: Object.assign(Object.assign({}, where), {
873
- subject: this.did
874
- }),
875
- order: {
876
- issuanceDate: "DESC"
877
- }
878
- });
879
- return claim === null || claim === void 0 ? void 0 : claim.value;
880
- });
881
- }
882
- shortDid() {
883
- return `${this.did.slice(0, 15)}...${this.did.slice(-4)}`;
884
- }
885
- };
886
- __decorate([
887
- (0, typeorm_1.PrimaryColumn)(),
888
- __metadata("design:type", String)
889
- ], Identifier.prototype, "did", void 0);
890
- __decorate([
891
- (0, typeorm_1.Column)({
892
- nullable: true
893
- }),
894
- __metadata("design:type", String)
895
- ], Identifier.prototype, "provider", void 0);
896
- __decorate([
897
- (0, typeorm_1.Column)({
898
- nullable: true
899
- }),
900
- __metadata("design:type", String)
901
- ], Identifier.prototype, "alias", void 0);
902
- __decorate([
903
- (0, typeorm_1.BeforeInsert)(),
904
- __metadata("design:type", Function),
905
- __metadata("design:paramtypes", []),
906
- __metadata("design:returntype", void 0)
907
- ], Identifier.prototype, "setSaveDate", null);
908
- __decorate([
909
- (0, typeorm_1.BeforeUpdate)(),
910
- __metadata("design:type", Function),
911
- __metadata("design:paramtypes", []),
912
- __metadata("design:returntype", void 0)
913
- ], Identifier.prototype, "setUpdateDate", null);
914
- __decorate([
915
- (0, typeorm_1.Column)({
916
- select: false
917
- }),
918
- __metadata("design:type", Date)
919
- ], Identifier.prototype, "saveDate", void 0);
920
- __decorate([
921
- (0, typeorm_1.Column)({
922
- select: false
923
- }),
924
- __metadata("design:type", Date)
925
- ], Identifier.prototype, "updateDate", void 0);
926
- __decorate([
927
- (0, typeorm_1.Column)({
928
- nullable: true
929
- }),
930
- __metadata("design:type", String)
931
- ], Identifier.prototype, "controllerKeyId", void 0);
932
- __decorate([
933
- (0, typeorm_1.OneToMany)((type) => key_1.Key, (key) => key.identifier),
934
- __metadata("design:type", Array)
935
- ], Identifier.prototype, "keys", void 0);
936
- __decorate([
937
- (0, typeorm_1.OneToMany)((type) => service_1.Service, (service) => service.identifier, {
938
- cascade: true
939
- }),
940
- __metadata("design:type", Array)
941
- ], Identifier.prototype, "services", void 0);
942
- __decorate([
943
- (0, typeorm_1.OneToMany)((type) => message_1.Message, (message) => message.from),
944
- __metadata("design:type", Array)
945
- ], Identifier.prototype, "sentMessages", void 0);
946
- __decorate([
947
- (0, typeorm_1.OneToMany)((type) => message_1.Message, (message) => message.to),
948
- __metadata("design:type", Array)
949
- ], Identifier.prototype, "receivedMessages", void 0);
950
- __decorate([
951
- (0, typeorm_1.OneToMany)((type) => presentation_1.Presentation, (presentation) => presentation.holder),
952
- __metadata("design:type", Array)
953
- ], Identifier.prototype, "issuedPresentations", void 0);
954
- __decorate([
955
- (0, typeorm_1.ManyToMany)((type) => presentation_1.Presentation, (presentation) => presentation.verifier),
956
- __metadata("design:type", Array)
957
- ], Identifier.prototype, "receivedPresentations", void 0);
958
- __decorate([
959
- (0, typeorm_1.OneToMany)((type) => credential_1.Credential, (credential) => credential.issuer),
960
- __metadata("design:type", Array)
961
- ], Identifier.prototype, "issuedCredentials", void 0);
962
- __decorate([
963
- (0, typeorm_1.OneToMany)((type) => credential_1.Credential, (credential) => credential.subject),
964
- __metadata("design:type", Array)
965
- ], Identifier.prototype, "receivedCredentials", void 0);
966
- __decorate([
967
- (0, typeorm_1.OneToMany)((type) => claim_1.Claim, (claim) => claim.issuer),
968
- __metadata("design:type", Array)
969
- ], Identifier.prototype, "issuedClaims", void 0);
970
- __decorate([
971
- (0, typeorm_1.OneToMany)((type) => claim_1.Claim, (claim) => claim.subject),
972
- __metadata("design:type", Array)
973
- ], Identifier.prototype, "receivedClaims", void 0);
974
- Identifier = __decorate([
975
- (0, typeorm_1.Entity)("identifier"),
976
- (0, typeorm_1.Index)([
977
- "alias",
978
- "provider"
979
- ], {
980
- unique: true
981
- })
982
- ], Identifier);
983
- exports.Identifier = Identifier;
984
- }
985
- });
986
-
987
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/utils.js
988
- var require_utils = __commonJS({
989
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/utils.js"(exports) {
990
- "use strict";
991
- var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
992
- function adopt(value) {
993
- return value instanceof P ? value : new P(function(resolve) {
994
- resolve(value);
995
- });
996
- }
997
- __name(adopt, "adopt");
998
- return new (P || (P = Promise))(function(resolve, reject) {
999
- function fulfilled(value) {
1000
- try {
1001
- step(generator.next(value));
1002
- } catch (e) {
1003
- reject(e);
1004
- }
1005
- }
1006
- __name(fulfilled, "fulfilled");
1007
- function rejected(value) {
1008
- try {
1009
- step(generator["throw"](value));
1010
- } catch (e) {
1011
- reject(e);
1012
- }
1013
- }
1014
- __name(rejected, "rejected");
1015
- function step(result) {
1016
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
1017
- }
1018
- __name(step, "step");
1019
- step((generator = generator.apply(thisArg, _arguments || [])).next());
1020
- });
1021
- };
1022
- Object.defineProperty(exports, "__esModule", {
1023
- value: true
1024
- });
1025
- exports.getConnectedDb = void 0;
1026
- function getConnectedDb(dbConnection) {
1027
- return __awaiter(this, void 0, void 0, function* () {
1028
- if (dbConnection instanceof Promise) {
1029
- return yield dbConnection;
1030
- } else if (!dbConnection.isInitialized) {
1031
- return yield dbConnection.initialize();
1032
- } else {
1033
- return dbConnection;
1034
- }
1035
- });
1036
- }
1037
- __name(getConnectedDb, "getConnectedDb");
1038
- exports.getConnectedDb = getConnectedDb;
1039
- }
1040
- });
1041
-
1042
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/identifier/did-store.js
1043
- var require_did_store = __commonJS({
1044
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/identifier/did-store.js"(exports) {
1045
- "use strict";
1046
- var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
1047
- function adopt(value) {
1048
- return value instanceof P ? value : new P(function(resolve) {
1049
- resolve(value);
1050
- });
1051
- }
1052
- __name(adopt, "adopt");
1053
- return new (P || (P = Promise))(function(resolve, reject) {
1054
- function fulfilled(value) {
1055
- try {
1056
- step(generator.next(value));
1057
- } catch (e) {
1058
- reject(e);
1059
- }
1060
- }
1061
- __name(fulfilled, "fulfilled");
1062
- function rejected(value) {
1063
- try {
1064
- step(generator["throw"](value));
1065
- } catch (e) {
1066
- reject(e);
1067
- }
1068
- }
1069
- __name(rejected, "rejected");
1070
- function step(result) {
1071
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
1072
- }
1073
- __name(step, "step");
1074
- step((generator = generator.apply(thisArg, _arguments || [])).next());
1075
- });
1076
- };
1077
- var __importDefault = exports && exports.__importDefault || function(mod) {
1078
- return mod && mod.__esModule ? mod : {
1079
- "default": mod
1080
- };
1081
- };
1082
- Object.defineProperty(exports, "__esModule", {
1083
- value: true
1084
- });
1085
- exports.DIDStore = void 0;
1086
- var did_manager_1 = __require("@veramo/did-manager");
1087
- var identifier_1 = require_identifier();
1088
- var credential_1 = require_credential();
1089
- var key_1 = require_key();
1090
- var service_1 = require_service();
1091
- var typeorm_1 = __require("typeorm");
1092
- var debug_1 = __importDefault(__require("debug"));
1093
- var presentation_1 = require_presentation();
1094
- var utils_1 = require_utils();
1095
- var debug25 = (0, debug_1.default)("veramo:typeorm:identifier-store");
1096
- var DIDStore = class DIDStore extends did_manager_1.AbstractDIDStore {
1097
- static {
1098
- __name(this, "DIDStore");
1099
- }
1100
- constructor(dbConnection) {
1101
- super();
1102
- this.dbConnection = dbConnection;
1103
- }
1104
- get({ did, alias, provider }) {
1105
- return __awaiter(this, void 0, void 0, function* () {
1106
- let where = {};
1107
- if (did !== void 0 && alias === void 0) {
1108
- where = {
1109
- did
1110
- };
1111
- } else if (did === void 0 && alias !== void 0 && provider !== void 0) {
1112
- where = {
1113
- alias,
1114
- provider
1115
- };
1116
- } else {
1117
- throw Error("[veramo:data-store:identifier-store] Get requires did or (alias and provider)");
1118
- }
1119
- const identifier = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(identifier_1.Identifier).findOne({
1120
- where,
1121
- relations: [
1122
- "keys",
1123
- "services"
1124
- ]
1125
- });
1126
- if (!identifier) throw Error("Identifier not found");
1127
- const result = {
1128
- did: identifier.did,
1129
- controllerKeyId: identifier.controllerKeyId,
1130
- provider: identifier.provider,
1131
- services: identifier.services.map((service) => {
1132
- let endpoint = service.serviceEndpoint.toString();
1133
- try {
1134
- endpoint = JSON.parse(service.serviceEndpoint);
1135
- } catch (_a) {
1136
- }
1137
- return {
1138
- id: service.id,
1139
- type: service.type,
1140
- serviceEndpoint: endpoint,
1141
- description: service.description
1142
- };
1143
- }),
1144
- keys: identifier.keys.map((k) => ({
1145
- kid: k.kid,
1146
- type: k.type,
1147
- kms: k.kms,
1148
- publicKeyHex: k.publicKeyHex,
1149
- meta: k.meta
1150
- }))
1151
- };
1152
- if (identifier.alias) {
1153
- result.alias = identifier.alias;
1154
- }
1155
- return result;
1156
- });
1157
- }
1158
- delete({ did }) {
1159
- return __awaiter(this, void 0, void 0, function* () {
1160
- const identifier = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(identifier_1.Identifier).findOne({
1161
- where: {
1162
- did
1163
- },
1164
- relations: [
1165
- "keys",
1166
- "services",
1167
- "issuedCredentials",
1168
- "issuedPresentations"
1169
- ]
1170
- });
1171
- if (!identifier || typeof identifier === "undefined") {
1172
- return true;
1173
- }
1174
- let existingKeys = identifier.keys.map((key) => {
1175
- delete key.identifier;
1176
- return key;
1177
- });
1178
- yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(key_1.Key).save(existingKeys);
1179
- if (identifier.issuedCredentials || typeof identifier.issuedCredentials !== "undefined") {
1180
- yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(credential_1.Credential).remove(identifier.issuedCredentials);
1181
- }
1182
- if (identifier.issuedPresentations || typeof identifier.issuedPresentations !== "undefined") {
1183
- yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(presentation_1.Presentation).remove(identifier.issuedPresentations);
1184
- }
1185
- let oldServices = identifier.services;
1186
- const srvRepo = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(service_1.Service).remove(oldServices);
1187
- if (!identifier) throw Error("Identifier not found");
1188
- debug25("Deleting", did);
1189
- yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(identifier_1.Identifier).remove(identifier);
1190
- return true;
1191
- });
1192
- }
1193
- import(args) {
1194
- return __awaiter(this, void 0, void 0, function* () {
1195
- const identifier = new identifier_1.Identifier();
1196
- identifier.did = args.did;
1197
- if (args.controllerKeyId) {
1198
- identifier.controllerKeyId = args.controllerKeyId;
1199
- }
1200
- identifier.provider = args.provider;
1201
- if (args.alias) {
1202
- identifier.alias = args.alias;
1203
- }
1204
- identifier.keys = [];
1205
- for (const argsKey of args.keys) {
1206
- const key = new key_1.Key();
1207
- key.kid = argsKey.kid;
1208
- key.publicKeyHex = argsKey.publicKeyHex;
1209
- key.kms = argsKey.kms;
1210
- key.meta = argsKey.meta;
1211
- identifier.keys.push(key);
1212
- }
1213
- identifier.services = [];
1214
- for (const argsService of args.services) {
1215
- const service = new service_1.Service();
1216
- service.id = argsService.id;
1217
- service.type = argsService.type;
1218
- service.serviceEndpoint = typeof argsService.serviceEndpoint === "string" ? argsService.serviceEndpoint : JSON.stringify(argsService.serviceEndpoint);
1219
- service.description = argsService.description;
1220
- identifier.services.push(service);
1221
- }
1222
- yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(identifier_1.Identifier).save(identifier);
1223
- debug25("Saving", args.did);
1224
- return true;
1225
- });
1226
- }
1227
- list(args) {
1228
- return __awaiter(this, void 0, void 0, function* () {
1229
- const where = {
1230
- provider: (args === null || args === void 0 ? void 0 : args.provider) || (0, typeorm_1.Not)((0, typeorm_1.IsNull)())
1231
- };
1232
- if (args === null || args === void 0 ? void 0 : args.alias) {
1233
- where["alias"] = args.alias;
1234
- }
1235
- const identifiers = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(identifier_1.Identifier).find({
1236
- where,
1237
- relations: [
1238
- "keys",
1239
- "services"
1240
- ]
1241
- });
1242
- return identifiers.map((identifier) => {
1243
- const i = identifier;
1244
- if (i.alias === null) {
1245
- delete i.alias;
1246
- }
1247
- return i;
1248
- });
1249
- });
1250
- }
1251
- };
1252
- exports.DIDStore = DIDStore;
1253
- }
1254
- });
1255
-
1256
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/identifier/key-store.js
1257
- var require_key_store = __commonJS({
1258
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/identifier/key-store.js"(exports) {
1259
- "use strict";
1260
- var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
1261
- function adopt(value) {
1262
- return value instanceof P ? value : new P(function(resolve) {
1263
- resolve(value);
1264
- });
1265
- }
1266
- __name(adopt, "adopt");
1267
- return new (P || (P = Promise))(function(resolve, reject) {
1268
- function fulfilled(value) {
1269
- try {
1270
- step(generator.next(value));
1271
- } catch (e) {
1272
- reject(e);
1273
- }
1274
- }
1275
- __name(fulfilled, "fulfilled");
1276
- function rejected(value) {
1277
- try {
1278
- step(generator["throw"](value));
1279
- } catch (e) {
1280
- reject(e);
1281
- }
1282
- }
1283
- __name(rejected, "rejected");
1284
- function step(result) {
1285
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
1286
- }
1287
- __name(step, "step");
1288
- step((generator = generator.apply(thisArg, _arguments || [])).next());
1289
- });
1290
- };
1291
- var __importDefault = exports && exports.__importDefault || function(mod) {
1292
- return mod && mod.__esModule ? mod : {
1293
- "default": mod
1294
- };
1295
- };
1296
- Object.defineProperty(exports, "__esModule", {
1297
- value: true
1298
- });
1299
- exports.KeyStore = void 0;
1300
- var key_manager_1 = __require("@veramo/key-manager");
1301
- var key_1 = require_key();
1302
- var debug_1 = __importDefault(__require("debug"));
1303
- var utils_1 = require_utils();
1304
- var debug25 = (0, debug_1.default)("veramo:typeorm:key-store");
1305
- var KeyStore = class KeyStore extends key_manager_1.AbstractKeyStore {
1306
- static {
1307
- __name(this, "KeyStore");
1308
- }
1309
- constructor(dbConnection) {
1310
- super();
1311
- this.dbConnection = dbConnection;
1312
- }
1313
- get({ kid }) {
1314
- return __awaiter(this, void 0, void 0, function* () {
1315
- const key = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(key_1.Key).findOneBy({
1316
- kid
1317
- });
1318
- if (!key) throw Error("Key not found");
1319
- return key;
1320
- });
1321
- }
1322
- delete({ kid }) {
1323
- return __awaiter(this, void 0, void 0, function* () {
1324
- const key = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(key_1.Key).findOneBy({
1325
- kid
1326
- });
1327
- if (!key) throw Error("Key not found");
1328
- debug25("Deleting key", kid);
1329
- yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(key_1.Key).remove(key);
1330
- return true;
1331
- });
1332
- }
1333
- import(args) {
1334
- return __awaiter(this, void 0, void 0, function* () {
1335
- const key = new key_1.Key();
1336
- key.kid = args.kid;
1337
- key.publicKeyHex = args.publicKeyHex;
1338
- key.type = args.type;
1339
- key.kms = args.kms;
1340
- key.meta = args.meta;
1341
- debug25("Saving key", args.kid);
1342
- yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(key_1.Key).save(key);
1343
- return true;
1344
- });
1345
- }
1346
- list(args = {}) {
1347
- return __awaiter(this, void 0, void 0, function* () {
1348
- const keys = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(key_1.Key).find();
1349
- const managedKeys = keys.map((key) => {
1350
- const { kid, publicKeyHex, type, meta, kms } = key;
1351
- return {
1352
- kid,
1353
- publicKeyHex,
1354
- type,
1355
- meta,
1356
- kms
1357
- };
1358
- });
1359
- return managedKeys;
1360
- });
1361
- }
1362
- };
1363
- exports.KeyStore = KeyStore;
1364
- }
1365
- });
1366
-
1367
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/private-key.js
1368
- var require_private_key = __commonJS({
1369
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/private-key.js"(exports) {
1370
- "use strict";
1371
- var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) {
1372
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1373
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
1374
- 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;
1375
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1376
- };
1377
- var __metadata = exports && exports.__metadata || function(k, v) {
1378
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
1379
- };
1380
- Object.defineProperty(exports, "__esModule", {
1381
- value: true
1382
- });
1383
- exports.PrivateKey = void 0;
1384
- var typeorm_1 = __require("typeorm");
1385
- var PrivateKey = class PrivateKey extends typeorm_1.BaseEntity {
1386
- static {
1387
- __name(this, "PrivateKey");
1388
- }
1389
- };
1390
- __decorate([
1391
- (0, typeorm_1.PrimaryColumn)(),
1392
- __metadata("design:type", String)
1393
- ], PrivateKey.prototype, "alias", void 0);
1394
- __decorate([
1395
- (0, typeorm_1.Column)(),
1396
- __metadata("design:type", String)
1397
- ], PrivateKey.prototype, "type", void 0);
1398
- __decorate([
1399
- (0, typeorm_1.Column)(),
1400
- __metadata("design:type", String)
1401
- ], PrivateKey.prototype, "privateKeyHex", void 0);
1402
- PrivateKey = __decorate([
1403
- (0, typeorm_1.Entity)("private-key")
1404
- ], PrivateKey);
1405
- exports.PrivateKey = PrivateKey;
1406
- }
1407
- });
1408
-
1409
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/identifier/private-key-store.js
1410
- var require_private_key_store = __commonJS({
1411
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/identifier/private-key-store.js"(exports) {
1412
- "use strict";
1413
- var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
1414
- function adopt(value) {
1415
- return value instanceof P ? value : new P(function(resolve) {
1416
- resolve(value);
1417
- });
1418
- }
1419
- __name(adopt, "adopt");
1420
- return new (P || (P = Promise))(function(resolve, reject) {
1421
- function fulfilled(value) {
1422
- try {
1423
- step(generator.next(value));
1424
- } catch (e) {
1425
- reject(e);
1426
- }
1427
- }
1428
- __name(fulfilled, "fulfilled");
1429
- function rejected(value) {
1430
- try {
1431
- step(generator["throw"](value));
1432
- } catch (e) {
1433
- reject(e);
1434
- }
1435
- }
1436
- __name(rejected, "rejected");
1437
- function step(result) {
1438
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
1439
- }
1440
- __name(step, "step");
1441
- step((generator = generator.apply(thisArg, _arguments || [])).next());
1442
- });
1443
- };
1444
- var __importDefault = exports && exports.__importDefault || function(mod) {
1445
- return mod && mod.__esModule ? mod : {
1446
- "default": mod
1447
- };
1448
- };
1449
- Object.defineProperty(exports, "__esModule", {
1450
- value: true
1451
- });
1452
- exports.PrivateKeyStore = void 0;
1453
- var key_manager_1 = __require("@veramo/key-manager");
1454
- var private_key_1 = require_private_key();
1455
- var uuid_1 = __require("uuid");
1456
- var debug_1 = __importDefault(__require("debug"));
1457
- var utils_1 = require_utils();
1458
- var debug25 = (0, debug_1.default)("veramo:typeorm:key-store");
1459
- var PrivateKeyStore = class PrivateKeyStore extends key_manager_1.AbstractPrivateKeyStore {
1460
- static {
1461
- __name(this, "PrivateKeyStore");
1462
- }
1463
- constructor(dbConnection, secretBox) {
1464
- super();
1465
- this.dbConnection = dbConnection;
1466
- this.secretBox = secretBox;
1467
- if (!secretBox) {
1468
- console.warn("Please provide SecretBox to the KeyStore");
1469
- }
1470
- }
1471
- get({ alias }) {
1472
- return __awaiter(this, void 0, void 0, function* () {
1473
- const key = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(private_key_1.PrivateKey).findOneBy({
1474
- alias
1475
- });
1476
- if (!key) throw Error("Key not found");
1477
- if (this.secretBox && key.privateKeyHex) {
1478
- key.privateKeyHex = yield this.secretBox.decrypt(key.privateKeyHex);
1479
- }
1480
- return key;
1481
- });
1482
- }
1483
- delete({ alias }) {
1484
- return __awaiter(this, void 0, void 0, function* () {
1485
- const key = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(private_key_1.PrivateKey).findOneBy({
1486
- alias
1487
- });
1488
- if (!key) throw Error(`not_found: Private Key data not found for alias=${alias}`);
1489
- debug25("Deleting private key data", alias);
1490
- yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(private_key_1.PrivateKey).remove(key);
1491
- return true;
1492
- });
1493
- }
1494
- import(args) {
1495
- return __awaiter(this, void 0, void 0, function* () {
1496
- const key = new private_key_1.PrivateKey();
1497
- key.alias = args.alias || (0, uuid_1.v4)();
1498
- key.privateKeyHex = args.privateKeyHex;
1499
- if (this.secretBox && key.privateKeyHex) {
1500
- key.privateKeyHex = yield this.secretBox.encrypt(key.privateKeyHex);
1501
- }
1502
- key.type = args.type;
1503
- debug25("Saving private key data", args.alias);
1504
- const keyRepo = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(private_key_1.PrivateKey);
1505
- const existingKey = yield keyRepo.findOneBy({
1506
- alias: key.alias
1507
- });
1508
- if (existingKey && existingKey.privateKeyHex !== key.privateKeyHex) {
1509
- throw new Error(`key_already_exists: A key with this alias exists but with different data. Please use a different alias.`);
1510
- }
1511
- yield keyRepo.save(key);
1512
- return key;
1513
- });
1514
- }
1515
- list() {
1516
- return __awaiter(this, void 0, void 0, function* () {
1517
- const keys = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(private_key_1.PrivateKey).find();
1518
- return keys;
1519
- });
1520
- }
1521
- };
1522
- exports.PrivateKeyStore = PrivateKeyStore;
1523
- }
1524
- });
1525
-
1526
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/data-store.js
1527
- var require_data_store = __commonJS({
1528
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/data-store.js"(exports) {
1529
- "use strict";
1530
- var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
1531
- function adopt(value) {
1532
- return value instanceof P ? value : new P(function(resolve) {
1533
- resolve(value);
1534
- });
1535
- }
1536
- __name(adopt, "adopt");
1537
- return new (P || (P = Promise))(function(resolve, reject) {
1538
- function fulfilled(value) {
1539
- try {
1540
- step(generator.next(value));
1541
- } catch (e) {
1542
- reject(e);
1543
- }
1544
- }
1545
- __name(fulfilled, "fulfilled");
1546
- function rejected(value) {
1547
- try {
1548
- step(generator["throw"](value));
1549
- } catch (e) {
1550
- reject(e);
1551
- }
1552
- }
1553
- __name(rejected, "rejected");
1554
- function step(result) {
1555
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
1556
- }
1557
- __name(step, "step");
1558
- step((generator = generator.apply(thisArg, _arguments || [])).next());
1559
- });
1560
- };
1561
- Object.defineProperty(exports, "__esModule", {
1562
- value: true
1563
- });
1564
- exports.DataStore = void 0;
1565
- var core_1 = __require("@veramo/core");
1566
- var message_1 = require_message();
1567
- var credential_1 = require_credential();
1568
- var claim_1 = require_claim();
1569
- var presentation_1 = require_presentation();
1570
- var utils_1 = require_utils();
1571
- var DataStore = class DataStore {
1572
- static {
1573
- __name(this, "DataStore");
1574
- }
1575
- constructor(dbConnection) {
1576
- this.schema = core_1.schema.IDataStore;
1577
- this.dbConnection = dbConnection;
1578
- this.methods = {
1579
- dataStoreSaveMessage: this.dataStoreSaveMessage.bind(this),
1580
- dataStoreGetMessage: this.dataStoreGetMessage.bind(this),
1581
- dataStoreDeleteVerifiableCredential: this.dataStoreDeleteVerifiableCredential.bind(this),
1582
- dataStoreSaveVerifiableCredential: this.dataStoreSaveVerifiableCredential.bind(this),
1583
- dataStoreGetVerifiableCredential: this.dataStoreGetVerifiableCredential.bind(this),
1584
- dataStoreSaveVerifiablePresentation: this.dataStoreSaveVerifiablePresentation.bind(this),
1585
- dataStoreGetVerifiablePresentation: this.dataStoreGetVerifiablePresentation.bind(this)
1586
- };
1587
- }
1588
- dataStoreSaveMessage(args) {
1589
- return __awaiter(this, void 0, void 0, function* () {
1590
- const message = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(message_1.Message).save((0, message_1.createMessageEntity)(args.message));
1591
- return message.id;
1592
- });
1593
- }
1594
- dataStoreGetMessage(args) {
1595
- return __awaiter(this, void 0, void 0, function* () {
1596
- const messageEntity = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(message_1.Message).findOne({
1597
- where: {
1598
- id: args.id
1599
- },
1600
- relations: [
1601
- "credentials",
1602
- "presentations"
1603
- ]
1604
- });
1605
- if (!messageEntity) throw new Error("not_found: Message not found");
1606
- return (0, message_1.createMessage)(messageEntity);
1607
- });
1608
- }
1609
- dataStoreDeleteVerifiableCredential(args) {
1610
- return __awaiter(this, void 0, void 0, function* () {
1611
- const credentialEntity = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(credential_1.Credential).findOneBy({
1612
- hash: args.hash
1613
- });
1614
- if (!credentialEntity) {
1615
- return false;
1616
- }
1617
- const claims = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(claim_1.Claim).find({
1618
- where: {
1619
- credential: {
1620
- id: credentialEntity.id
1621
- }
1622
- }
1623
- });
1624
- yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(claim_1.Claim).remove(claims);
1625
- yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(credential_1.Credential).remove(credentialEntity);
1626
- return true;
1627
- });
1628
- }
1629
- dataStoreSaveVerifiableCredential(args) {
1630
- return __awaiter(this, void 0, void 0, function* () {
1631
- const verifiableCredential = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(credential_1.Credential).save((0, credential_1.createCredentialEntity)(args.verifiableCredential));
1632
- return verifiableCredential.hash;
1633
- });
1634
- }
1635
- dataStoreGetVerifiableCredential(args) {
1636
- return __awaiter(this, void 0, void 0, function* () {
1637
- const credentialEntity = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(credential_1.Credential).findOneBy({
1638
- hash: args.hash
1639
- });
1640
- if (!credentialEntity) throw new Error("not_found: Verifiable credential not found");
1641
- return credentialEntity.raw;
1642
- });
1643
- }
1644
- dataStoreSaveVerifiablePresentation(args) {
1645
- return __awaiter(this, void 0, void 0, function* () {
1646
- const verifiablePresentation = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(presentation_1.Presentation).save((0, presentation_1.createPresentationEntity)(args.verifiablePresentation));
1647
- return verifiablePresentation.hash;
1648
- });
1649
- }
1650
- dataStoreGetVerifiablePresentation(args) {
1651
- return __awaiter(this, void 0, void 0, function* () {
1652
- const presentationEntity = yield (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(presentation_1.Presentation).findOneBy({
1653
- hash: args.hash
1654
- });
1655
- if (!presentationEntity) throw new Error("not_found: Verifiable presentation not found");
1656
- return presentationEntity.raw;
1657
- });
1658
- }
1659
- };
1660
- exports.DataStore = DataStore;
1661
- }
1662
- });
1663
-
1664
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/data-store-orm.js
1665
- var require_data_store_orm = __commonJS({
1666
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/data-store-orm.js"(exports) {
1667
- "use strict";
1668
- var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
1669
- function adopt(value) {
1670
- return value instanceof P ? value : new P(function(resolve) {
1671
- resolve(value);
1672
- });
1673
- }
1674
- __name(adopt, "adopt");
1675
- return new (P || (P = Promise))(function(resolve, reject) {
1676
- function fulfilled(value) {
1677
- try {
1678
- step(generator.next(value));
1679
- } catch (e) {
1680
- reject(e);
1681
- }
1682
- }
1683
- __name(fulfilled, "fulfilled");
1684
- function rejected(value) {
1685
- try {
1686
- step(generator["throw"](value));
1687
- } catch (e) {
1688
- reject(e);
1689
- }
1690
- }
1691
- __name(rejected, "rejected");
1692
- function step(result) {
1693
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
1694
- }
1695
- __name(step, "step");
1696
- step((generator = generator.apply(thisArg, _arguments || [])).next());
1697
- });
1698
- };
1699
- Object.defineProperty(exports, "__esModule", {
1700
- value: true
1701
- });
1702
- exports.DataStoreORM = void 0;
1703
- var core_1 = __require("@veramo/core");
1704
- var message_1 = require_message();
1705
- var claim_1 = require_claim();
1706
- var credential_1 = require_credential();
1707
- var presentation_1 = require_presentation();
1708
- var identifier_1 = require_identifier();
1709
- var typeorm_1 = __require("typeorm");
1710
- var utils_1 = require_utils();
1711
- var DataStoreORM = class DataStoreORM {
1712
- static {
1713
- __name(this, "DataStoreORM");
1714
- }
1715
- constructor(dbConnection) {
1716
- this.schema = core_1.schema.IDataStoreORM;
1717
- this.dbConnection = dbConnection;
1718
- this.methods = {
1719
- dataStoreORMGetIdentifiers: this.dataStoreORMGetIdentifiers.bind(this),
1720
- dataStoreORMGetIdentifiersCount: this.dataStoreORMGetIdentifiersCount.bind(this),
1721
- dataStoreORMGetMessages: this.dataStoreORMGetMessages.bind(this),
1722
- dataStoreORMGetMessagesCount: this.dataStoreORMGetMessagesCount.bind(this),
1723
- dataStoreORMGetVerifiableCredentialsByClaims: this.dataStoreORMGetVerifiableCredentialsByClaims.bind(this),
1724
- dataStoreORMGetVerifiableCredentialsByClaimsCount: this.dataStoreORMGetVerifiableCredentialsByClaimsCount.bind(this),
1725
- dataStoreORMGetVerifiableCredentials: this.dataStoreORMGetVerifiableCredentials.bind(this),
1726
- dataStoreORMGetVerifiableCredentialsCount: this.dataStoreORMGetVerifiableCredentialsCount.bind(this),
1727
- dataStoreORMGetVerifiablePresentations: this.dataStoreORMGetVerifiablePresentations.bind(this),
1728
- dataStoreORMGetVerifiablePresentationsCount: this.dataStoreORMGetVerifiablePresentationsCount.bind(this)
1729
- };
1730
- }
1731
- // Identifiers
1732
- identifiersQuery(args, context) {
1733
- return __awaiter(this, void 0, void 0, function* () {
1734
- const where = createWhereObject(args);
1735
- let qb = (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(identifier_1.Identifier).createQueryBuilder("identifier").leftJoinAndSelect("identifier.keys", "keys").leftJoinAndSelect("identifier.services", "services").where(where);
1736
- qb = decorateQB(qb, "message", args);
1737
- return qb;
1738
- });
1739
- }
1740
- dataStoreORMGetIdentifiers(args, context) {
1741
- return __awaiter(this, void 0, void 0, function* () {
1742
- const identifiers = yield (yield this.identifiersQuery(args, context)).getMany();
1743
- return identifiers.map((i) => {
1744
- const identifier = i;
1745
- if (identifier.controllerKeyId === null) {
1746
- delete identifier.controllerKeyId;
1747
- }
1748
- if (identifier.alias === null) {
1749
- delete identifier.alias;
1750
- }
1751
- if (identifier.provider === null) {
1752
- delete identifier.provider;
1753
- }
1754
- return identifier;
1755
- });
1756
- });
1757
- }
1758
- dataStoreORMGetIdentifiersCount(args, context) {
1759
- return __awaiter(this, void 0, void 0, function* () {
1760
- return yield (yield this.identifiersQuery(args, context)).getCount();
1761
- });
1762
- }
1763
- // Messages
1764
- messagesQuery(args, context) {
1765
- return __awaiter(this, void 0, void 0, function* () {
1766
- const where = createWhereObject(args);
1767
- let qb = (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(message_1.Message).createQueryBuilder("message").leftJoinAndSelect("message.from", "from").leftJoinAndSelect("message.to", "to").leftJoinAndSelect("message.credentials", "credentials").leftJoinAndSelect("message.presentations", "presentations").where(where);
1768
- qb = decorateQB(qb, "message", args);
1769
- if (context.authorizedDID) {
1770
- qb = qb.andWhere(new typeorm_1.Brackets((qb2) => {
1771
- qb2.where("message.to = :ident", {
1772
- ident: context.authorizedDID
1773
- }).orWhere("message.from = :ident", {
1774
- ident: context.authorizedDID
1775
- });
1776
- }));
1777
- }
1778
- return qb;
1779
- });
1780
- }
1781
- dataStoreORMGetMessages(args, context) {
1782
- return __awaiter(this, void 0, void 0, function* () {
1783
- const messages = yield (yield this.messagesQuery(args, context)).getMany();
1784
- return messages.map(message_1.createMessage);
1785
- });
1786
- }
1787
- dataStoreORMGetMessagesCount(args, context) {
1788
- return __awaiter(this, void 0, void 0, function* () {
1789
- return (yield this.messagesQuery(args, context)).getCount();
1790
- });
1791
- }
1792
- // Claims
1793
- claimsQuery(args, context) {
1794
- return __awaiter(this, void 0, void 0, function* () {
1795
- const where = createWhereObject(args);
1796
- let qb = (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(claim_1.Claim).createQueryBuilder("claim").leftJoinAndSelect("claim.issuer", "issuer").leftJoinAndSelect("claim.subject", "subject").where(where);
1797
- qb = decorateQB(qb, "claim", args);
1798
- qb = qb.leftJoinAndSelect("claim.credential", "credential");
1799
- if (context.authorizedDID) {
1800
- qb = qb.andWhere(new typeorm_1.Brackets((qb2) => {
1801
- qb2.where("claim.subject = :ident", {
1802
- ident: context.authorizedDID
1803
- }).orWhere("claim.issuer = :ident", {
1804
- ident: context.authorizedDID
1805
- });
1806
- }));
1807
- }
1808
- return qb;
1809
- });
1810
- }
1811
- dataStoreORMGetVerifiableCredentialsByClaims(args, context) {
1812
- return __awaiter(this, void 0, void 0, function* () {
1813
- const claims = yield (yield this.claimsQuery(args, context)).getMany();
1814
- return claims.map((claim) => ({
1815
- hash: claim.credential.hash,
1816
- verifiableCredential: claim.credential.raw
1817
- }));
1818
- });
1819
- }
1820
- dataStoreORMGetVerifiableCredentialsByClaimsCount(args, context) {
1821
- return __awaiter(this, void 0, void 0, function* () {
1822
- return (yield this.claimsQuery(args, context)).getCount();
1823
- });
1824
- }
1825
- // Credentials
1826
- credentialsQuery(args, context) {
1827
- return __awaiter(this, void 0, void 0, function* () {
1828
- const where = createWhereObject(args);
1829
- let qb = (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(credential_1.Credential).createQueryBuilder("credential").leftJoinAndSelect("credential.issuer", "issuer").leftJoinAndSelect("credential.subject", "subject").where(where);
1830
- qb = decorateQB(qb, "credential", args);
1831
- if (context.authorizedDID) {
1832
- qb = qb.andWhere(new typeorm_1.Brackets((qb2) => {
1833
- qb2.where("credential.subject = :ident", {
1834
- ident: context.authorizedDID
1835
- }).orWhere("credential.issuer = :ident", {
1836
- ident: context.authorizedDID
1837
- });
1838
- }));
1839
- }
1840
- return qb;
1841
- });
1842
- }
1843
- dataStoreORMGetVerifiableCredentials(args, context) {
1844
- return __awaiter(this, void 0, void 0, function* () {
1845
- const credentials = yield (yield this.credentialsQuery(args, context)).getMany();
1846
- return credentials.map((vc) => ({
1847
- hash: vc.hash,
1848
- verifiableCredential: vc.raw
1849
- }));
1850
- });
1851
- }
1852
- dataStoreORMGetVerifiableCredentialsCount(args, context) {
1853
- return __awaiter(this, void 0, void 0, function* () {
1854
- return (yield this.credentialsQuery(args, context)).getCount();
1855
- });
1856
- }
1857
- // Presentations
1858
- presentationsQuery(args, context) {
1859
- return __awaiter(this, void 0, void 0, function* () {
1860
- const where = createWhereObject(args);
1861
- let qb = (yield (0, utils_1.getConnectedDb)(this.dbConnection)).getRepository(presentation_1.Presentation).createQueryBuilder("presentation").leftJoinAndSelect("presentation.holder", "holder").leftJoinAndSelect("presentation.verifier", "verifier").where(where);
1862
- qb = decorateQB(qb, "presentation", args);
1863
- qb = addVerifierQuery(args, qb);
1864
- if (context.authorizedDID) {
1865
- qb = qb.andWhere(new typeorm_1.Brackets((qb2) => {
1866
- qb2.where("verifier.did = :ident", {
1867
- ident: context.authorizedDID
1868
- }).orWhere("presentation.holder = :ident", {
1869
- ident: context.authorizedDID
1870
- });
1871
- }));
1872
- }
1873
- return qb;
1874
- });
1875
- }
1876
- dataStoreORMGetVerifiablePresentations(args, context) {
1877
- return __awaiter(this, void 0, void 0, function* () {
1878
- const presentations = yield (yield this.presentationsQuery(args, context)).getMany();
1879
- return presentations.map((vp) => ({
1880
- hash: vp.hash,
1881
- verifiablePresentation: vp.raw
1882
- }));
1883
- });
1884
- }
1885
- dataStoreORMGetVerifiablePresentationsCount(args, context) {
1886
- return __awaiter(this, void 0, void 0, function* () {
1887
- return (yield this.presentationsQuery(args, context)).getCount();
1888
- });
1889
- }
1890
- };
1891
- exports.DataStoreORM = DataStoreORM;
1892
- function opToSQL(item) {
1893
- var _a, _b;
1894
- switch (item.op) {
1895
- case "IsNull":
1896
- return [
1897
- "IS NULL",
1898
- ""
1899
- ];
1900
- case "Like":
1901
- if (((_a = item.value) === null || _a === void 0 ? void 0 : _a.length) != 1) throw Error("Operation Equal requires one value");
1902
- return [
1903
- "LIKE :value",
1904
- item.value[0]
1905
- ];
1906
- case "Equal":
1907
- if (((_b = item.value) === null || _b === void 0 ? void 0 : _b.length) != 1) throw Error("Operation Equal requires one value");
1908
- return [
1909
- "= :value",
1910
- item.value[0]
1911
- ];
1912
- case "Any":
1913
- case "Between":
1914
- case "LessThan":
1915
- case "LessThanOrEqual":
1916
- case "MoreThan":
1917
- case "MoreThanOrEqual":
1918
- throw new Error(`${item.op} not compatible with DID argument`);
1919
- case "In":
1920
- default:
1921
- return [
1922
- "IN (:...value)",
1923
- item.value
1924
- ];
1925
- }
1926
- }
1927
- __name(opToSQL, "opToSQL");
1928
- function addVerifierQuery(input, qb) {
1929
- if (!input) {
1930
- return qb;
1931
- }
1932
- if (!Array.isArray(input.where)) {
1933
- return qb;
1934
- }
1935
- const verifierWhere = input.where.find((item) => item.column === "verifier");
1936
- if (!verifierWhere) {
1937
- return qb;
1938
- }
1939
- const [op, value] = opToSQL(verifierWhere);
1940
- return qb.andWhere(`verifier.did ${op}`, {
1941
- value
1942
- });
1943
- }
1944
- __name(addVerifierQuery, "addVerifierQuery");
1945
- function createWhereObject(input) {
1946
- var _a, _b, _c, _d, _e, _f, _g;
1947
- const where = {};
1948
- if (input === null || input === void 0 ? void 0 : input.where) {
1949
- for (const item of input.where) {
1950
- if (item.column === "verifier") {
1951
- continue;
1952
- }
1953
- switch (item.op) {
1954
- case "Any":
1955
- if (!Array.isArray(item.value)) throw Error("Operator Any requires value to be an array");
1956
- where[item.column] = (0, typeorm_1.Any)(item.value);
1957
- break;
1958
- case "Between":
1959
- if (((_a = item.value) === null || _a === void 0 ? void 0 : _a.length) != 2) throw Error("Operation Between requires two values");
1960
- where[item.column] = (0, typeorm_1.Between)(item.value[0], item.value[1]);
1961
- break;
1962
- case "Equal":
1963
- if (((_b = item.value) === null || _b === void 0 ? void 0 : _b.length) != 1) throw Error("Operation Equal requires one value");
1964
- where[item.column] = (0, typeorm_1.Equal)(item.value[0]);
1965
- break;
1966
- case "IsNull":
1967
- where[item.column] = (0, typeorm_1.IsNull)();
1968
- break;
1969
- case "LessThan":
1970
- if (((_c = item.value) === null || _c === void 0 ? void 0 : _c.length) != 1) throw Error("Operation LessThan requires one value");
1971
- where[item.column] = (0, typeorm_1.LessThan)(item.value[0]);
1972
- break;
1973
- case "LessThanOrEqual":
1974
- if (((_d = item.value) === null || _d === void 0 ? void 0 : _d.length) != 1) throw Error("Operation LessThanOrEqual requires one value");
1975
- where[item.column] = (0, typeorm_1.LessThanOrEqual)(item.value[0]);
1976
- break;
1977
- case "Like":
1978
- if (((_e = item.value) === null || _e === void 0 ? void 0 : _e.length) != 1) throw Error("Operation Like requires one value");
1979
- where[item.column] = (0, typeorm_1.Like)(item.value[0]);
1980
- break;
1981
- case "MoreThan":
1982
- if (((_f = item.value) === null || _f === void 0 ? void 0 : _f.length) != 1) throw Error("Operation MoreThan requires one value");
1983
- where[item.column] = (0, typeorm_1.MoreThan)(item.value[0]);
1984
- break;
1985
- case "MoreThanOrEqual":
1986
- if (((_g = item.value) === null || _g === void 0 ? void 0 : _g.length) != 1) throw Error("Operation MoreThanOrEqual requires one value");
1987
- where[item.column] = (0, typeorm_1.MoreThanOrEqual)(item.value[0]);
1988
- break;
1989
- case "In":
1990
- default:
1991
- if (!Array.isArray(item.value)) throw Error("Operator IN requires value to be an array");
1992
- where[item.column] = (0, typeorm_1.In)(item.value);
1993
- }
1994
- if (item.not === true) {
1995
- where[item.column] = (0, typeorm_1.Not)(where[item.column]);
1996
- }
1997
- }
1998
- }
1999
- return where;
2000
- }
2001
- __name(createWhereObject, "createWhereObject");
2002
- function decorateQB(qb, tableName, input) {
2003
- if (input === null || input === void 0 ? void 0 : input.skip) qb = qb.skip(input.skip);
2004
- if (input === null || input === void 0 ? void 0 : input.take) qb = qb.take(input.take);
2005
- if (input === null || input === void 0 ? void 0 : input.order) {
2006
- for (const item of input.order) {
2007
- qb = qb.orderBy(qb.connection.driver.escape(tableName) + "." + qb.connection.driver.escape(item.column), item.direction);
2008
- }
2009
- }
2010
- return qb;
2011
- }
2012
- __name(decorateQB, "decorateQB");
2013
- }
2014
- });
2015
-
2016
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/did-discovery-provider.js
2017
- var require_did_discovery_provider = __commonJS({
2018
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/did-discovery-provider.js"(exports) {
2019
- "use strict";
2020
- var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
2021
- function adopt(value) {
2022
- return value instanceof P ? value : new P(function(resolve) {
2023
- resolve(value);
2024
- });
2025
- }
2026
- __name(adopt, "adopt");
2027
- return new (P || (P = Promise))(function(resolve, reject) {
2028
- function fulfilled(value) {
2029
- try {
2030
- step(generator.next(value));
2031
- } catch (e) {
2032
- reject(e);
2033
- }
2034
- }
2035
- __name(fulfilled, "fulfilled");
2036
- function rejected(value) {
2037
- try {
2038
- step(generator["throw"](value));
2039
- } catch (e) {
2040
- reject(e);
2041
- }
2042
- }
2043
- __name(rejected, "rejected");
2044
- function step(result) {
2045
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
2046
- }
2047
- __name(step, "step");
2048
- step((generator = generator.apply(thisArg, _arguments || [])).next());
2049
- });
2050
- };
2051
- Object.defineProperty(exports, "__esModule", {
2052
- value: true
2053
- });
2054
- exports.DataStoreDiscoveryProvider = void 0;
2055
- var DataStoreDiscoveryProvider = class DataStoreDiscoveryProvider {
2056
- static {
2057
- __name(this, "DataStoreDiscoveryProvider");
2058
- }
2059
- constructor() {
2060
- this.name = "data-store-discovery";
2061
- }
2062
- discoverDid(args, context) {
2063
- return __awaiter(this, void 0, void 0, function* () {
2064
- const matches = [];
2065
- const credentialsByName = yield context.agent.dataStoreORMGetVerifiableCredentialsByClaims({
2066
- where: [
2067
- {
2068
- column: "type",
2069
- value: [
2070
- "name"
2071
- ]
2072
- },
2073
- {
2074
- column: "value",
2075
- value: [
2076
- `%${args.query}%`
2077
- ],
2078
- op: "Like"
2079
- },
2080
- {
2081
- column: "credentialType",
2082
- value: [
2083
- "VerifiableCredential,Profile"
2084
- ]
2085
- }
2086
- ]
2087
- });
2088
- credentialsByName.forEach((vc) => {
2089
- matches.push({
2090
- did: vc.verifiableCredential.credentialSubject.id,
2091
- metaData: {
2092
- verifiableCredential: vc.verifiableCredential
2093
- }
2094
- });
2095
- });
2096
- const credentialsByDID = yield context.agent.dataStoreORMGetVerifiableCredentialsByClaims({
2097
- where: [
2098
- {
2099
- column: "type",
2100
- value: [
2101
- "name"
2102
- ]
2103
- },
2104
- {
2105
- column: "subject",
2106
- value: [
2107
- `%${args.query}%`
2108
- ],
2109
- op: "Like"
2110
- },
2111
- {
2112
- column: "credentialType",
2113
- value: [
2114
- "VerifiableCredential,Profile"
2115
- ]
2116
- }
2117
- ]
2118
- });
2119
- credentialsByDID.forEach((vc) => {
2120
- matches.push({
2121
- did: vc.verifiableCredential.credentialSubject.id,
2122
- metaData: {
2123
- verifiableCredential: vc.verifiableCredential
2124
- }
2125
- });
2126
- });
2127
- const identifiersByDID = yield context.agent.dataStoreORMGetIdentifiers({
2128
- where: [
2129
- {
2130
- column: "did",
2131
- value: [
2132
- `%${args.query}%`
2133
- ],
2134
- op: "Like"
2135
- }
2136
- ]
2137
- });
2138
- identifiersByDID.forEach((identifier) => {
2139
- matches.push({
2140
- did: identifier.did,
2141
- metaData: {
2142
- alias: identifier.alias
2143
- }
2144
- });
2145
- });
2146
- const identifiersByAlias = yield context.agent.dataStoreORMGetIdentifiers({
2147
- where: [
2148
- {
2149
- column: "alias",
2150
- value: [
2151
- `%${args.query}%`
2152
- ],
2153
- op: "Like"
2154
- }
2155
- ]
2156
- });
2157
- identifiersByAlias.forEach((identifier) => {
2158
- matches.push({
2159
- did: identifier.did,
2160
- metaData: {
2161
- alias: identifier.alias
2162
- }
2163
- });
2164
- });
2165
- return {
2166
- provider: this.name,
2167
- matches
2168
- };
2169
- });
2170
- }
2171
- };
2172
- exports.DataStoreDiscoveryProvider = DataStoreDiscoveryProvider;
2173
- }
2174
- });
2175
-
2176
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/PreMigrationEntities.js
2177
- var require_PreMigrationEntities = __commonJS({
2178
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/entities/PreMigrationEntities.js"(exports) {
2179
- "use strict";
2180
- var __decorate = exports && exports.__decorate || function(decorators, target, key, desc) {
2181
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2182
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2183
- 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;
2184
- return c > 3 && r && Object.defineProperty(target, key, r), r;
2185
- };
2186
- var __metadata = exports && exports.__metadata || function(k, v) {
2187
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
2188
- };
2189
- Object.defineProperty(exports, "__esModule", {
2190
- value: true
2191
- });
2192
- exports.PreMigrationKey = void 0;
2193
- var typeorm_1 = __require("typeorm");
2194
- var key_1 = require_key();
2195
- var PreMigrationKey = class PreMigrationKey extends key_1.Key {
2196
- static {
2197
- __name(this, "PreMigrationKey");
2198
- }
2199
- };
2200
- __decorate([
2201
- (0, typeorm_1.PrimaryColumn)(),
2202
- __metadata("design:type", String)
2203
- ], PreMigrationKey.prototype, "kid", void 0);
2204
- __decorate([
2205
- (0, typeorm_1.Column)({
2206
- nullable: true
2207
- }),
2208
- __metadata("design:type", String)
2209
- ], PreMigrationKey.prototype, "privateKeyHex", void 0);
2210
- PreMigrationKey = __decorate([
2211
- (0, typeorm_1.Entity)("key")
2212
- ], PreMigrationKey);
2213
- exports.PreMigrationKey = PreMigrationKey;
2214
- }
2215
- });
2216
-
2217
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/migrations/migration-functions.js
2218
- var require_migration_functions = __commonJS({
2219
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/migrations/migration-functions.js"(exports) {
2220
- "use strict";
2221
- Object.defineProperty(exports, "__esModule", {
2222
- value: true
2223
- });
2224
- exports.migrationGetTableName = exports.migrationGetExistingTableByName = void 0;
2225
- var typeorm_1 = __require("typeorm");
2226
- function migrationGetExistingTableByName(queryRunner, givenName, strictClassName) {
2227
- const table = migrationGetTableByNameImpl(queryRunner, givenName, strictClassName);
2228
- if (!table) {
2229
- throw Error(`Could not find table with name ${givenName}`);
2230
- }
2231
- return table;
2232
- }
2233
- __name(migrationGetExistingTableByName, "migrationGetExistingTableByName");
2234
- exports.migrationGetExistingTableByName = migrationGetExistingTableByName;
2235
- function migrationGetTableByNameImpl(queryRunner, givenName, strictClassName) {
2236
- let entityMetadata = queryRunner.connection.entityMetadatas.find((meta) => !!strictClassName ? meta.name === givenName : meta.givenTableName === givenName);
2237
- if (!entityMetadata && !strictClassName) {
2238
- entityMetadata = queryRunner.connection.entityMetadatas.find((meta) => meta.tableName === givenName);
2239
- }
2240
- return entityMetadata ? typeorm_1.Table.create(entityMetadata, queryRunner.connection.driver) : void 0;
2241
- }
2242
- __name(migrationGetTableByNameImpl, "migrationGetTableByNameImpl");
2243
- function migrationGetTableName(queryRunner, givenName, strictClassName) {
2244
- const table = migrationGetTableByNameImpl(queryRunner, givenName, strictClassName);
2245
- return !!table ? table.name : givenName;
2246
- }
2247
- __name(migrationGetTableName, "migrationGetTableName");
2248
- exports.migrationGetTableName = migrationGetTableName;
2249
- }
2250
- });
2251
-
2252
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/migrations/1.createDatabase.js
2253
- var require_createDatabase = __commonJS({
2254
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/migrations/1.createDatabase.js"(exports) {
2255
- "use strict";
2256
- var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
2257
- function adopt(value) {
2258
- return value instanceof P ? value : new P(function(resolve) {
2259
- resolve(value);
2260
- });
2261
- }
2262
- __name(adopt, "adopt");
2263
- return new (P || (P = Promise))(function(resolve, reject) {
2264
- function fulfilled(value) {
2265
- try {
2266
- step(generator.next(value));
2267
- } catch (e) {
2268
- reject(e);
2269
- }
2270
- }
2271
- __name(fulfilled, "fulfilled");
2272
- function rejected(value) {
2273
- try {
2274
- step(generator["throw"](value));
2275
- } catch (e) {
2276
- reject(e);
2277
- }
2278
- }
2279
- __name(rejected, "rejected");
2280
- function step(result) {
2281
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
2282
- }
2283
- __name(step, "step");
2284
- step((generator = generator.apply(thisArg, _arguments || [])).next());
2285
- });
2286
- };
2287
- var __importDefault = exports && exports.__importDefault || function(mod) {
2288
- return mod && mod.__esModule ? mod : {
2289
- "default": mod
2290
- };
2291
- };
2292
- Object.defineProperty(exports, "__esModule", {
2293
- value: true
2294
- });
2295
- exports.CreateDatabase1447159020001 = void 0;
2296
- var typeorm_1 = __require("typeorm");
2297
- var debug_1 = __importDefault(__require("debug"));
2298
- var migration_functions_js_1 = require_migration_functions();
2299
- var debug25 = (0, debug_1.default)("veramo:data-store:initial-migration");
2300
- var CreateDatabase1447159020001 = class CreateDatabase1447159020001 {
2301
- static {
2302
- __name(this, "CreateDatabase1447159020001");
2303
- }
2304
- constructor() {
2305
- this.name = "CreateDatabase1447159020001";
2306
- }
2307
- up(queryRunner) {
2308
- return __awaiter(this, void 0, void 0, function* () {
2309
- const dateTimeType = queryRunner.connection.driver.mappedDataTypes.createDate;
2310
- debug25(`creating identifier table`);
2311
- yield queryRunner.createTable(new typeorm_1.Table({
2312
- name: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "identifier"),
2313
- columns: [
2314
- {
2315
- name: "did",
2316
- type: "varchar",
2317
- isPrimary: true
2318
- },
2319
- {
2320
- name: "provider",
2321
- type: "varchar",
2322
- isNullable: true
2323
- },
2324
- {
2325
- name: "alias",
2326
- type: "varchar",
2327
- isNullable: true
2328
- },
2329
- {
2330
- name: "saveDate",
2331
- type: dateTimeType
2332
- },
2333
- {
2334
- name: "updateDate",
2335
- type: dateTimeType
2336
- },
2337
- {
2338
- name: "controllerKeyId",
2339
- type: "varchar",
2340
- isNullable: true
2341
- }
2342
- ],
2343
- indices: [
2344
- {
2345
- columnNames: [
2346
- "alias",
2347
- "provider"
2348
- ],
2349
- isUnique: true
2350
- }
2351
- ]
2352
- }), true);
2353
- debug25(`creating key table`);
2354
- yield queryRunner.createTable(new typeorm_1.Table({
2355
- name: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "key"),
2356
- columns: [
2357
- {
2358
- name: "kid",
2359
- type: "varchar",
2360
- isPrimary: true
2361
- },
2362
- {
2363
- name: "kms",
2364
- type: "varchar"
2365
- },
2366
- {
2367
- name: "type",
2368
- type: "varchar"
2369
- },
2370
- {
2371
- name: "publicKeyHex",
2372
- type: "varchar"
2373
- },
2374
- {
2375
- name: "privateKeyHex",
2376
- type: "varchar",
2377
- isNullable: true
2378
- },
2379
- {
2380
- name: "meta",
2381
- type: "text",
2382
- isNullable: true
2383
- },
2384
- {
2385
- name: "identifierDid",
2386
- type: "varchar"
2387
- }
2388
- ],
2389
- foreignKeys: [
2390
- {
2391
- columnNames: [
2392
- "identifierDid"
2393
- ],
2394
- referencedColumnNames: [
2395
- "did"
2396
- ],
2397
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "identifier")
2398
- }
2399
- ]
2400
- }), true);
2401
- debug25(`creating service table`);
2402
- yield queryRunner.createTable(new typeorm_1.Table({
2403
- name: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "service"),
2404
- columns: [
2405
- {
2406
- name: "id",
2407
- type: "varchar",
2408
- isPrimary: true
2409
- },
2410
- {
2411
- name: "type",
2412
- type: "varchar"
2413
- },
2414
- {
2415
- name: "serviceEndpoint",
2416
- type: "varchar"
2417
- },
2418
- {
2419
- name: "description",
2420
- type: "varchar",
2421
- isNullable: true
2422
- },
2423
- {
2424
- name: "identifierDid",
2425
- type: "varchar"
2426
- }
2427
- ],
2428
- foreignKeys: [
2429
- {
2430
- columnNames: [
2431
- "identifierDid"
2432
- ],
2433
- referencedColumnNames: [
2434
- "did"
2435
- ],
2436
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "identifier"),
2437
- onDelete: "cascade"
2438
- }
2439
- ]
2440
- }), true);
2441
- debug25(`creating credentials table`);
2442
- yield queryRunner.createTable(new typeorm_1.Table({
2443
- name: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "credential"),
2444
- columns: [
2445
- {
2446
- name: "hash",
2447
- type: "varchar",
2448
- isPrimary: true
2449
- },
2450
- {
2451
- name: "raw",
2452
- type: "text"
2453
- },
2454
- {
2455
- name: "id",
2456
- type: "varchar",
2457
- isNullable: true
2458
- },
2459
- {
2460
- name: "issuanceDate",
2461
- type: dateTimeType
2462
- },
2463
- {
2464
- name: "expirationDate",
2465
- type: dateTimeType,
2466
- isNullable: true
2467
- },
2468
- {
2469
- name: "context",
2470
- type: "text"
2471
- },
2472
- {
2473
- name: "type",
2474
- type: "text"
2475
- },
2476
- {
2477
- name: "issuerDid",
2478
- type: "varchar"
2479
- },
2480
- {
2481
- name: "subjectDid",
2482
- type: "varchar",
2483
- isNullable: true
2484
- }
2485
- ],
2486
- foreignKeys: [
2487
- {
2488
- columnNames: [
2489
- "issuerDid"
2490
- ],
2491
- referencedColumnNames: [
2492
- "did"
2493
- ],
2494
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "identifier"),
2495
- onDelete: "cascade"
2496
- },
2497
- {
2498
- columnNames: [
2499
- "subjectDid"
2500
- ],
2501
- referencedColumnNames: [
2502
- "did"
2503
- ],
2504
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "identifier")
2505
- }
2506
- ]
2507
- }), true);
2508
- debug25(`creating claims table`);
2509
- yield queryRunner.createTable(new typeorm_1.Table({
2510
- name: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "claim"),
2511
- columns: [
2512
- {
2513
- name: "hash",
2514
- type: "varchar",
2515
- isPrimary: true
2516
- },
2517
- {
2518
- name: "issuanceDate",
2519
- type: dateTimeType
2520
- },
2521
- {
2522
- name: "expirationDate",
2523
- type: dateTimeType,
2524
- isNullable: true
2525
- },
2526
- {
2527
- name: "context",
2528
- type: "text"
2529
- },
2530
- {
2531
- name: "credentialType",
2532
- type: "text"
2533
- },
2534
- {
2535
- name: "value",
2536
- type: "text"
2537
- },
2538
- {
2539
- name: "type",
2540
- type: "varchar"
2541
- },
2542
- {
2543
- name: "isObj",
2544
- type: "boolean"
2545
- },
2546
- {
2547
- name: "issuerDid",
2548
- type: "varchar",
2549
- isNullable: true
2550
- },
2551
- {
2552
- name: "subjectDid",
2553
- type: "varchar",
2554
- isNullable: true
2555
- },
2556
- {
2557
- name: "credentialHash",
2558
- type: "varchar"
2559
- }
2560
- ],
2561
- foreignKeys: [
2562
- {
2563
- columnNames: [
2564
- "issuerDid"
2565
- ],
2566
- referencedColumnNames: [
2567
- "did"
2568
- ],
2569
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "identifier"),
2570
- onDelete: "cascade"
2571
- },
2572
- {
2573
- columnNames: [
2574
- "subjectDid"
2575
- ],
2576
- referencedColumnNames: [
2577
- "did"
2578
- ],
2579
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "identifier")
2580
- },
2581
- {
2582
- columnNames: [
2583
- "credentialHash"
2584
- ],
2585
- referencedColumnNames: [
2586
- "hash"
2587
- ],
2588
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "credential"),
2589
- onDelete: "cascade"
2590
- }
2591
- ]
2592
- }), true);
2593
- debug25(`creating presentations table`);
2594
- yield queryRunner.createTable(new typeorm_1.Table({
2595
- name: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "presentation"),
2596
- columns: [
2597
- {
2598
- name: "hash",
2599
- type: "varchar",
2600
- isPrimary: true
2601
- },
2602
- {
2603
- name: "raw",
2604
- type: "text"
2605
- },
2606
- {
2607
- name: "id",
2608
- type: "varchar",
2609
- isNullable: true
2610
- },
2611
- {
2612
- name: "issuanceDate",
2613
- type: dateTimeType
2614
- },
2615
- {
2616
- name: "expirationDate",
2617
- type: dateTimeType,
2618
- isNullable: true
2619
- },
2620
- {
2621
- name: "context",
2622
- type: "text"
2623
- },
2624
- {
2625
- name: "type",
2626
- type: "text"
2627
- },
2628
- {
2629
- name: "holderDid",
2630
- type: "varchar",
2631
- isNullable: true
2632
- }
2633
- ],
2634
- foreignKeys: [
2635
- {
2636
- columnNames: [
2637
- "holderDid"
2638
- ],
2639
- referencedColumnNames: [
2640
- "did"
2641
- ],
2642
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "identifier"),
2643
- onDelete: "cascade"
2644
- }
2645
- ]
2646
- }), true);
2647
- debug25(`creating message table`);
2648
- yield queryRunner.createTable(new typeorm_1.Table({
2649
- name: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "message"),
2650
- columns: [
2651
- {
2652
- name: "id",
2653
- type: "varchar",
2654
- isPrimary: true
2655
- },
2656
- {
2657
- name: "saveDate",
2658
- type: dateTimeType
2659
- },
2660
- {
2661
- name: "updateDate",
2662
- type: dateTimeType
2663
- },
2664
- {
2665
- name: "createdAt",
2666
- type: dateTimeType,
2667
- isNullable: true
2668
- },
2669
- {
2670
- name: "expiresAt",
2671
- type: dateTimeType,
2672
- isNullable: true
2673
- },
2674
- {
2675
- name: "threadId",
2676
- type: "varchar",
2677
- isNullable: true
2678
- },
2679
- {
2680
- name: "type",
2681
- type: "varchar",
2682
- isNullable: true
2683
- },
2684
- {
2685
- name: "raw",
2686
- type: "varchar",
2687
- isNullable: true
2688
- },
2689
- {
2690
- name: "data",
2691
- type: "text",
2692
- isNullable: true
2693
- },
2694
- {
2695
- name: "replyTo",
2696
- type: "text",
2697
- isNullable: true
2698
- },
2699
- {
2700
- name: "replyUrl",
2701
- type: "varchar",
2702
- isNullable: true
2703
- },
2704
- {
2705
- name: "metaData",
2706
- type: "text",
2707
- isNullable: true
2708
- },
2709
- {
2710
- name: "fromDid",
2711
- type: "varchar",
2712
- isNullable: true
2713
- },
2714
- {
2715
- name: "toDid",
2716
- type: "varchar",
2717
- isNullable: true
2718
- }
2719
- ],
2720
- foreignKeys: [
2721
- {
2722
- columnNames: [
2723
- "fromDid"
2724
- ],
2725
- referencedColumnNames: [
2726
- "did"
2727
- ],
2728
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "identifier")
2729
- },
2730
- {
2731
- columnNames: [
2732
- "toDid"
2733
- ],
2734
- referencedColumnNames: [
2735
- "did"
2736
- ],
2737
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "identifier")
2738
- }
2739
- ]
2740
- }), true);
2741
- debug25(`creating presentation_verifier_identifier many to many table`);
2742
- yield queryRunner.createTable(new typeorm_1.Table({
2743
- name: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "presentation_verifier_identifier"),
2744
- columns: [
2745
- {
2746
- name: "presentationHash",
2747
- type: "varchar",
2748
- isPrimary: true
2749
- },
2750
- {
2751
- name: "identifierDid",
2752
- type: "varchar",
2753
- isPrimary: true
2754
- }
2755
- ],
2756
- indices: [
2757
- {
2758
- columnNames: [
2759
- "presentationHash",
2760
- "identifierDid"
2761
- ]
2762
- }
2763
- ],
2764
- foreignKeys: [
2765
- {
2766
- columnNames: [
2767
- "presentationHash"
2768
- ],
2769
- referencedColumnNames: [
2770
- "hash"
2771
- ],
2772
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "presentation"),
2773
- onDelete: "cascade"
2774
- },
2775
- {
2776
- columnNames: [
2777
- "identifierDid"
2778
- ],
2779
- referencedColumnNames: [
2780
- "did"
2781
- ],
2782
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "identifier"),
2783
- onDelete: "cascade"
2784
- }
2785
- ]
2786
- }), true);
2787
- debug25(`creating presentation_credentials_credential many to many table`);
2788
- yield queryRunner.createTable(new typeorm_1.Table({
2789
- name: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "presentation_credentials_credential"),
2790
- columns: [
2791
- {
2792
- name: "presentationHash",
2793
- type: "varchar",
2794
- isPrimary: true
2795
- },
2796
- {
2797
- name: "credentialHash",
2798
- type: "varchar",
2799
- isPrimary: true
2800
- }
2801
- ],
2802
- indices: [
2803
- {
2804
- columnNames: [
2805
- "presentationHash",
2806
- "credentialHash"
2807
- ]
2808
- }
2809
- ],
2810
- foreignKeys: [
2811
- {
2812
- columnNames: [
2813
- "presentationHash"
2814
- ],
2815
- referencedColumnNames: [
2816
- "hash"
2817
- ],
2818
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "presentation"),
2819
- onDelete: "cascade"
2820
- },
2821
- {
2822
- columnNames: [
2823
- "credentialHash"
2824
- ],
2825
- referencedColumnNames: [
2826
- "hash"
2827
- ],
2828
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "credential"),
2829
- onDelete: "cascade"
2830
- }
2831
- ]
2832
- }), true);
2833
- debug25(`creating message_presentations_presentation many to many table`);
2834
- yield queryRunner.createTable(new typeorm_1.Table({
2835
- name: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "message_presentations_presentation"),
2836
- columns: [
2837
- {
2838
- name: "messageId",
2839
- type: "varchar",
2840
- isPrimary: true
2841
- },
2842
- {
2843
- name: "presentationHash",
2844
- type: "varchar",
2845
- isPrimary: true
2846
- }
2847
- ],
2848
- indices: [
2849
- {
2850
- columnNames: [
2851
- "messageId",
2852
- "presentationHash"
2853
- ]
2854
- }
2855
- ],
2856
- foreignKeys: [
2857
- {
2858
- columnNames: [
2859
- "messageId"
2860
- ],
2861
- referencedColumnNames: [
2862
- "id"
2863
- ],
2864
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "message"),
2865
- onDelete: "cascade"
2866
- },
2867
- {
2868
- columnNames: [
2869
- "presentationHash"
2870
- ],
2871
- referencedColumnNames: [
2872
- "hash"
2873
- ],
2874
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "presentation"),
2875
- onDelete: "cascade"
2876
- }
2877
- ]
2878
- }), true);
2879
- debug25(`creating message_credentials_credential many to many table`);
2880
- yield queryRunner.createTable(new typeorm_1.Table({
2881
- name: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "message_credentials_credential"),
2882
- columns: [
2883
- {
2884
- name: "messageId",
2885
- type: "varchar",
2886
- isPrimary: true
2887
- },
2888
- {
2889
- name: "credentialHash",
2890
- type: "varchar",
2891
- isPrimary: true
2892
- }
2893
- ],
2894
- indices: [
2895
- {
2896
- columnNames: [
2897
- "messageId",
2898
- "credentialHash"
2899
- ]
2900
- }
2901
- ],
2902
- foreignKeys: [
2903
- {
2904
- columnNames: [
2905
- "messageId"
2906
- ],
2907
- referencedColumnNames: [
2908
- "id"
2909
- ],
2910
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "message"),
2911
- onDelete: "cascade"
2912
- },
2913
- {
2914
- columnNames: [
2915
- "credentialHash"
2916
- ],
2917
- referencedColumnNames: [
2918
- "hash"
2919
- ],
2920
- referencedTableName: (0, migration_functions_js_1.migrationGetTableName)(queryRunner, "credential"),
2921
- onDelete: "cascade"
2922
- }
2923
- ]
2924
- }), true);
2925
- });
2926
- }
2927
- down(queryRunner) {
2928
- return __awaiter(this, void 0, void 0, function* () {
2929
- throw new Error("illegal_operation: cannot roll back initial migration");
2930
- });
2931
- }
2932
- };
2933
- exports.CreateDatabase1447159020001 = CreateDatabase1447159020001;
2934
- }
2935
- });
2936
-
2937
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/migrations/2.simplifyRelations.js
2938
- var require_simplifyRelations = __commonJS({
2939
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/migrations/2.simplifyRelations.js"(exports) {
2940
- "use strict";
2941
- var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
2942
- function adopt(value) {
2943
- return value instanceof P ? value : new P(function(resolve) {
2944
- resolve(value);
2945
- });
2946
- }
2947
- __name(adopt, "adopt");
2948
- return new (P || (P = Promise))(function(resolve, reject) {
2949
- function fulfilled(value) {
2950
- try {
2951
- step(generator.next(value));
2952
- } catch (e) {
2953
- reject(e);
2954
- }
2955
- }
2956
- __name(fulfilled, "fulfilled");
2957
- function rejected(value) {
2958
- try {
2959
- step(generator["throw"](value));
2960
- } catch (e) {
2961
- reject(e);
2962
- }
2963
- }
2964
- __name(rejected, "rejected");
2965
- function step(result) {
2966
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
2967
- }
2968
- __name(step, "step");
2969
- step((generator = generator.apply(thisArg, _arguments || [])).next());
2970
- });
2971
- };
2972
- Object.defineProperty(exports, "__esModule", {
2973
- value: true
2974
- });
2975
- exports.SimplifyRelations1447159020002 = void 0;
2976
- var typeorm_1 = __require("typeorm");
2977
- var migration_functions_1 = require_migration_functions();
2978
- var SimplifyRelations1447159020002 = class SimplifyRelations1447159020002 {
2979
- static {
2980
- __name(this, "SimplifyRelations1447159020002");
2981
- }
2982
- constructor() {
2983
- this.name = "SimplifyRelations1447159020002";
2984
- }
2985
- up(queryRunner) {
2986
- return __awaiter(this, void 0, void 0, function* () {
2987
- yield queryRunner.changeColumn((0, migration_functions_1.migrationGetExistingTableByName)(queryRunner, "PreMigrationKey", true), "identifierDid", new typeorm_1.TableColumn({
2988
- name: "identifierDid",
2989
- type: "varchar",
2990
- isNullable: true
2991
- }));
2992
- yield queryRunner.changeColumn((0, migration_functions_1.migrationGetExistingTableByName)(queryRunner, "service"), "identifierDid", new typeorm_1.TableColumn({
2993
- name: "identifierDid",
2994
- type: "varchar",
2995
- isNullable: true
2996
- }));
2997
- });
2998
- }
2999
- down(queryRunner) {
3000
- return __awaiter(this, void 0, void 0, function* () {
3001
- throw new Error("illegal_operation: cannot roll back initial migration");
3002
- });
3003
- }
3004
- };
3005
- exports.SimplifyRelations1447159020002 = SimplifyRelations1447159020002;
3006
- }
3007
- });
3008
-
3009
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/migrations/3.createPrivateKeyStorage.js
3010
- var require_createPrivateKeyStorage = __commonJS({
3011
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/migrations/3.createPrivateKeyStorage.js"(exports) {
3012
- "use strict";
3013
- var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
3014
- function adopt(value) {
3015
- return value instanceof P ? value : new P(function(resolve) {
3016
- resolve(value);
3017
- });
3018
- }
3019
- __name(adopt, "adopt");
3020
- return new (P || (P = Promise))(function(resolve, reject) {
3021
- function fulfilled(value) {
3022
- try {
3023
- step(generator.next(value));
3024
- } catch (e) {
3025
- reject(e);
3026
- }
3027
- }
3028
- __name(fulfilled, "fulfilled");
3029
- function rejected(value) {
3030
- try {
3031
- step(generator["throw"](value));
3032
- } catch (e) {
3033
- reject(e);
3034
- }
3035
- }
3036
- __name(rejected, "rejected");
3037
- function step(result) {
3038
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
3039
- }
3040
- __name(step, "step");
3041
- step((generator = generator.apply(thisArg, _arguments || [])).next());
3042
- });
3043
- };
3044
- var __importDefault = exports && exports.__importDefault || function(mod) {
3045
- return mod && mod.__esModule ? mod : {
3046
- "default": mod
3047
- };
3048
- };
3049
- Object.defineProperty(exports, "__esModule", {
3050
- value: true
3051
- });
3052
- exports.CreatePrivateKeyStorage1629293428674 = void 0;
3053
- var typeorm_1 = __require("typeorm");
3054
- var __1 = require_build();
3055
- var PreMigrationEntities_1 = require_PreMigrationEntities();
3056
- var debug_1 = __importDefault(__require("debug"));
3057
- var migration_functions_1 = require_migration_functions();
3058
- var debug25 = (0, debug_1.default)("veramo:data-store:migrate-private-keys");
3059
- var CreatePrivateKeyStorage1629293428674 = class CreatePrivateKeyStorage1629293428674 {
3060
- static {
3061
- __name(this, "CreatePrivateKeyStorage1629293428674");
3062
- }
3063
- constructor() {
3064
- this.name = "CreatePrivateKeyStorage1629293428674";
3065
- }
3066
- up(queryRunner) {
3067
- return __awaiter(this, void 0, void 0, function* () {
3068
- debug25(`creating new private-key table`);
3069
- yield queryRunner.createTable(new typeorm_1.Table({
3070
- name: (0, migration_functions_1.migrationGetTableName)(queryRunner, "private-key"),
3071
- columns: [
3072
- {
3073
- name: "alias",
3074
- type: "varchar",
3075
- isPrimary: true
3076
- },
3077
- {
3078
- name: "type",
3079
- type: "varchar"
3080
- },
3081
- {
3082
- name: "privateKeyHex",
3083
- type: "varchar"
3084
- }
3085
- ]
3086
- }), true);
3087
- const keys = yield queryRunner.manager.find(PreMigrationEntities_1.PreMigrationKey);
3088
- debug25(`got ${keys.length} potential keys to migrate`);
3089
- const privKeys = keys.filter((key) => typeof key.privateKeyHex !== "undefined" && key.privateKeyHex !== null).map((key) => ({
3090
- alias: key.kid,
3091
- type: key.type,
3092
- privateKeyHex: key.privateKeyHex
3093
- }));
3094
- debug25(`${privKeys.length} keys need to be migrated`);
3095
- yield queryRunner.manager.createQueryBuilder().insert().into((0, migration_functions_1.migrationGetTableName)(queryRunner, "private-key")).values(privKeys).execute();
3096
- debug25(`dropping privKeyHex column from old key table`);
3097
- yield queryRunner.dropColumn((0, migration_functions_1.migrationGetExistingTableByName)(queryRunner, "PreMigrationKey", true), "privateKeyHex");
3098
- debug25(`migrated ${privKeys.length} keys to private key storage`);
3099
- });
3100
- }
3101
- down(queryRunner) {
3102
- return __awaiter(this, void 0, void 0, function* () {
3103
- debug25(`adding back privateKeyHex column to key table`);
3104
- yield queryRunner.addColumn("key", new typeorm_1.TableColumn({
3105
- name: "privateKeyHex",
3106
- type: "varchar",
3107
- isNullable: true
3108
- }));
3109
- debug25(`checking keys to be rolled back`);
3110
- const keys = yield queryRunner.manager.find(__1.PrivateKey);
3111
- debug25(`copying ${keys.length} keys`);
3112
- for (const key of keys) {
3113
- yield queryRunner.manager.createQueryBuilder().update(PreMigrationEntities_1.PreMigrationKey).set({
3114
- privateKeyHex: key.privateKeyHex
3115
- }).where("kid = :alias", {
3116
- alias: key.alias
3117
- }).execute();
3118
- }
3119
- debug25(`dropping private-key table`);
3120
- yield queryRunner.dropTable((0, migration_functions_1.migrationGetExistingTableByName)(queryRunner, "private-key"));
3121
- debug25(`rolled back ${keys.length} keys`);
3122
- });
3123
- }
3124
- };
3125
- exports.CreatePrivateKeyStorage1629293428674 = CreatePrivateKeyStorage1629293428674;
3126
- }
3127
- });
3128
-
3129
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/migrations/4.allowNullVPIssuanceDate.js
3130
- var require_allowNullVPIssuanceDate = __commonJS({
3131
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/migrations/4.allowNullVPIssuanceDate.js"(exports) {
3132
- "use strict";
3133
- var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
3134
- function adopt(value) {
3135
- return value instanceof P ? value : new P(function(resolve) {
3136
- resolve(value);
3137
- });
3138
- }
3139
- __name(adopt, "adopt");
3140
- return new (P || (P = Promise))(function(resolve, reject) {
3141
- function fulfilled(value) {
3142
- try {
3143
- step(generator.next(value));
3144
- } catch (e) {
3145
- reject(e);
3146
- }
3147
- }
3148
- __name(fulfilled, "fulfilled");
3149
- function rejected(value) {
3150
- try {
3151
- step(generator["throw"](value));
3152
- } catch (e) {
3153
- reject(e);
3154
- }
3155
- }
3156
- __name(rejected, "rejected");
3157
- function step(result) {
3158
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
3159
- }
3160
- __name(step, "step");
3161
- step((generator = generator.apply(thisArg, _arguments || [])).next());
3162
- });
3163
- };
3164
- var __importDefault = exports && exports.__importDefault || function(mod) {
3165
- return mod && mod.__esModule ? mod : {
3166
- "default": mod
3167
- };
3168
- };
3169
- Object.defineProperty(exports, "__esModule", {
3170
- value: true
3171
- });
3172
- exports.AllowNullIssuanceDateForPresentations1637237492913 = void 0;
3173
- var __1 = require_build();
3174
- var debug_1 = __importDefault(__require("debug"));
3175
- var migration_functions_js_1 = require_migration_functions();
3176
- var debug25 = (0, debug_1.default)("veramo:data-store:migrate-presentation-issuance-date");
3177
- var AllowNullIssuanceDateForPresentations1637237492913 = class AllowNullIssuanceDateForPresentations1637237492913 {
3178
- static {
3179
- __name(this, "AllowNullIssuanceDateForPresentations1637237492913");
3180
- }
3181
- constructor() {
3182
- this.name = "AllowNullIssuanceDateForPresentations1637237492913";
3183
- }
3184
- up(queryRunner) {
3185
- return __awaiter(this, void 0, void 0, function* () {
3186
- if (queryRunner.connection.driver.options.type === "sqlite") {
3187
- debug25(`splitting migration into multiple transactions to allow sqlite table updates`);
3188
- yield queryRunner.commitTransaction();
3189
- debug25(`turning off foreign keys`);
3190
- yield queryRunner.query("PRAGMA foreign_keys=off");
3191
- yield queryRunner.startTransaction();
3192
- }
3193
- const table = (0, migration_functions_js_1.migrationGetExistingTableByName)(queryRunner, "presentation");
3194
- const oldColumn = table === null || table === void 0 ? void 0 : table.findColumnByName("issuanceDate");
3195
- const newColumn = oldColumn.clone();
3196
- newColumn.isNullable = true;
3197
- debug25(`updating issuanceDate for presentations to allow null`);
3198
- yield queryRunner.changeColumn(table, oldColumn, newColumn);
3199
- debug25(`updated issuanceDate for presentations to allow null`);
3200
- if (queryRunner.connection.driver.options.type === "sqlite") {
3201
- debug25(`splitting migration into multiple transactions to allow sqlite table updates`);
3202
- yield queryRunner.commitTransaction();
3203
- debug25(`turning on foreign keys`);
3204
- yield queryRunner.query("PRAGMA foreign_keys=on");
3205
- yield queryRunner.startTransaction();
3206
- }
3207
- });
3208
- }
3209
- down(queryRunner) {
3210
- return __awaiter(this, void 0, void 0, function* () {
3211
- if (queryRunner.connection.driver.options.type === "sqlite") {
3212
- debug25(`splitting migration into multiple transactions to allow sqlite table updates`);
3213
- yield queryRunner.commitTransaction();
3214
- debug25(`turning off foreign keys`);
3215
- yield queryRunner.query("PRAGMA foreign_keys=off");
3216
- yield queryRunner.startTransaction();
3217
- }
3218
- const table = (0, migration_functions_js_1.migrationGetExistingTableByName)(queryRunner, "presentation");
3219
- debug25(`DOWN update NULL 'issuanceDate' with FAKE data for '${table.name}' table`);
3220
- yield queryRunner.manager.createQueryBuilder().update(__1.Presentation).set({
3221
- issuanceDate: /* @__PURE__ */ new Date(0)
3222
- }).where("issuanceDate is NULL").execute();
3223
- const oldColumn = table === null || table === void 0 ? void 0 : table.findColumnByName("issuanceDate");
3224
- const newColumn = oldColumn.clone();
3225
- newColumn.isNullable = false;
3226
- debug25(`updating issuanceDate for presentations to NOT allow null`);
3227
- yield queryRunner.changeColumn(table, oldColumn, newColumn);
3228
- debug25(`updated issuanceDate for presentations to NOT allow null`);
3229
- if (queryRunner.connection.driver.options.type === "sqlite") {
3230
- debug25(`splitting migration into multiple transactions to allow sqlite table updates`);
3231
- yield queryRunner.commitTransaction();
3232
- debug25(`turning on foreign keys`);
3233
- yield queryRunner.query("PRAGMA foreign_keys=on");
3234
- yield queryRunner.startTransaction();
3235
- }
3236
- debug25(`DOWN updated issuanceDate for presentations to NOT allow null`);
3237
- });
3238
- }
3239
- };
3240
- exports.AllowNullIssuanceDateForPresentations1637237492913 = AllowNullIssuanceDateForPresentations1637237492913;
3241
- }
3242
- });
3243
-
3244
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/migrations/index.js
3245
- var require_migrations = __commonJS({
3246
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/migrations/index.js"(exports) {
3247
- "use strict";
3248
- var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
3249
- if (k2 === void 0) k2 = k;
3250
- var desc = Object.getOwnPropertyDescriptor(m, k);
3251
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
3252
- desc = {
3253
- enumerable: true,
3254
- get: /* @__PURE__ */ __name(function() {
3255
- return m[k];
3256
- }, "get")
3257
- };
3258
- }
3259
- Object.defineProperty(o, k2, desc);
3260
- } : function(o, m, k, k2) {
3261
- if (k2 === void 0) k2 = k;
3262
- o[k2] = m[k];
3263
- });
3264
- var __exportStar = exports && exports.__exportStar || function(m, exports1) {
3265
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports1, p)) __createBinding(exports1, m, p);
3266
- };
3267
- Object.defineProperty(exports, "__esModule", {
3268
- value: true
3269
- });
3270
- exports.migrations = void 0;
3271
- var _1_createDatabase_1 = require_createDatabase();
3272
- var _2_simplifyRelations_1 = require_simplifyRelations();
3273
- var _3_createPrivateKeyStorage_1 = require_createPrivateKeyStorage();
3274
- var _4_allowNullVPIssuanceDate_1 = require_allowNullVPIssuanceDate();
3275
- __exportStar(require_migration_functions(), exports);
3276
- exports.migrations = [
3277
- _1_createDatabase_1.CreateDatabase1447159020001,
3278
- _2_simplifyRelations_1.SimplifyRelations1447159020002,
3279
- _3_createPrivateKeyStorage_1.CreatePrivateKeyStorage1629293428674,
3280
- _4_allowNullVPIssuanceDate_1.AllowNullIssuanceDateForPresentations1637237492913
3281
- ];
3282
- }
3283
- });
3284
-
3285
- // ../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/index.js
3286
- var require_build = __commonJS({
3287
- "../../node_modules/.pnpm/@veramo+data-store@4.2.0_patch_hash=25b55da53633b67af137c78afaf727c15cd0dd9f55a659a71d1_16b1082d47bace099b8c1c12369b6a86/node_modules/@veramo/data-store/build/index.js"(exports) {
3288
- "use strict";
3289
- Object.defineProperty(exports, "__esModule", {
3290
- value: true
3291
- });
3292
- exports.migrations = exports.PreMigrationKey = exports.PrivateKey = exports.Service = exports.Presentation = exports.Credential = exports.Claim = exports.Message = exports.Identifier = exports.Key = exports.Entities = exports.DataStoreDiscoveryProvider = exports.DataStoreORM = exports.DataStore = exports.PrivateKeyStore = exports.KeyStore = exports.DIDStore = void 0;
3293
- var did_store_1 = require_did_store();
3294
- Object.defineProperty(exports, "DIDStore", {
3295
- enumerable: true,
3296
- get: /* @__PURE__ */ __name(function() {
3297
- return did_store_1.DIDStore;
3298
- }, "get")
3299
- });
3300
- var key_store_1 = require_key_store();
3301
- Object.defineProperty(exports, "KeyStore", {
3302
- enumerable: true,
3303
- get: /* @__PURE__ */ __name(function() {
3304
- return key_store_1.KeyStore;
3305
- }, "get")
3306
- });
3307
- var private_key_store_1 = require_private_key_store();
3308
- Object.defineProperty(exports, "PrivateKeyStore", {
3309
- enumerable: true,
3310
- get: /* @__PURE__ */ __name(function() {
3311
- return private_key_store_1.PrivateKeyStore;
3312
- }, "get")
3313
- });
3314
- var data_store_1 = require_data_store();
3315
- Object.defineProperty(exports, "DataStore", {
3316
- enumerable: true,
3317
- get: /* @__PURE__ */ __name(function() {
3318
- return data_store_1.DataStore;
3319
- }, "get")
3320
- });
3321
- var data_store_orm_1 = require_data_store_orm();
3322
- Object.defineProperty(exports, "DataStoreORM", {
3323
- enumerable: true,
3324
- get: /* @__PURE__ */ __name(function() {
3325
- return data_store_orm_1.DataStoreORM;
3326
- }, "get")
3327
- });
3328
- var did_discovery_provider_1 = require_did_discovery_provider();
3329
- Object.defineProperty(exports, "DataStoreDiscoveryProvider", {
3330
- enumerable: true,
3331
- get: /* @__PURE__ */ __name(function() {
3332
- return did_discovery_provider_1.DataStoreDiscoveryProvider;
3333
- }, "get")
3334
- });
3335
- var key_1 = require_key();
3336
- Object.defineProperty(exports, "Key", {
3337
- enumerable: true,
3338
- get: /* @__PURE__ */ __name(function() {
3339
- return key_1.Key;
3340
- }, "get")
3341
- });
3342
- var identifier_1 = require_identifier();
3343
- Object.defineProperty(exports, "Identifier", {
3344
- enumerable: true,
3345
- get: /* @__PURE__ */ __name(function() {
3346
- return identifier_1.Identifier;
3347
- }, "get")
3348
- });
3349
- var claim_1 = require_claim();
3350
- Object.defineProperty(exports, "Claim", {
3351
- enumerable: true,
3352
- get: /* @__PURE__ */ __name(function() {
3353
- return claim_1.Claim;
3354
- }, "get")
3355
- });
3356
- var credential_1 = require_credential();
3357
- Object.defineProperty(exports, "Credential", {
3358
- enumerable: true,
3359
- get: /* @__PURE__ */ __name(function() {
3360
- return credential_1.Credential;
3361
- }, "get")
3362
- });
3363
- var presentation_1 = require_presentation();
3364
- Object.defineProperty(exports, "Presentation", {
3365
- enumerable: true,
3366
- get: /* @__PURE__ */ __name(function() {
3367
- return presentation_1.Presentation;
3368
- }, "get")
3369
- });
3370
- var service_1 = require_service();
3371
- Object.defineProperty(exports, "Service", {
3372
- enumerable: true,
3373
- get: /* @__PURE__ */ __name(function() {
3374
- return service_1.Service;
3375
- }, "get")
3376
- });
3377
- var message_1 = require_message();
3378
- Object.defineProperty(exports, "Message", {
3379
- enumerable: true,
3380
- get: /* @__PURE__ */ __name(function() {
3381
- return message_1.Message;
3382
- }, "get")
3383
- });
3384
- var private_key_1 = require_private_key();
3385
- Object.defineProperty(exports, "PrivateKey", {
3386
- enumerable: true,
3387
- get: /* @__PURE__ */ __name(function() {
3388
- return private_key_1.PrivateKey;
3389
- }, "get")
3390
- });
3391
- var PreMigrationEntities_1 = require_PreMigrationEntities();
3392
- Object.defineProperty(exports, "PreMigrationKey", {
3393
- enumerable: true,
3394
- get: /* @__PURE__ */ __name(function() {
3395
- return PreMigrationEntities_1.PreMigrationKey;
3396
- }, "get")
3397
- });
3398
- exports.Entities = [
3399
- key_1.Key,
3400
- identifier_1.Identifier,
3401
- message_1.Message,
3402
- claim_1.Claim,
3403
- credential_1.Credential,
3404
- presentation_1.Presentation,
3405
- service_1.Service,
3406
- private_key_1.PrivateKey,
3407
- PreMigrationEntities_1.PreMigrationKey
3408
- ];
3409
- var migrations_1 = require_migrations();
3410
- Object.defineProperty(exports, "migrations", {
3411
- enumerable: true,
3412
- get: /* @__PURE__ */ __name(function() {
3413
- return migrations_1.migrations;
3414
- }, "get")
3415
- });
3416
- }
3417
- });
3418
3
 
3419
4
  // src/index.ts
3420
- var import_data_store2 = __toESM(require_build(), 1);
5
+ import { Entities as VeramoDataStoreEntities2 } from "@veramo/data-store";
3421
6
 
3422
7
  // src/entities/contact/BaseConfigEntity.ts
3423
8
  import { BaseEntity as BaseEntity10, Entity as Entity12, JoinColumn as JoinColumn7, OneToOne as OneToOne6, PrimaryGeneratedColumn as PrimaryGeneratedColumn12, TableInheritance as TableInheritance2 } from "typeorm";
@@ -6289,10 +2874,23 @@ BaseLocaleBrandingEntity = _ts_decorate24([
6289
2874
  // src/entities/issuanceBranding/CredentialBrandingEntity.ts
6290
2875
  import { typeOrmDateTime as typeOrmDateTime13 } from "@sphereon/ssi-sdk.agent-config";
6291
2876
  import { ArrayMinSize, IsNotEmpty as IsNotEmpty10, validate as validate16 } from "class-validator";
6292
- import { BaseEntity as BaseEntity19, BeforeInsert as BeforeInsert18, BeforeUpdate as BeforeUpdate18, Column as Column24, CreateDateColumn as CreateDateColumn11, Entity as Entity21, Index as Index5, OneToMany as OneToMany6, PrimaryGeneratedColumn as PrimaryGeneratedColumn21, UpdateDateColumn as UpdateDateColumn11 } from "typeorm";
2877
+ import { BaseEntity as BaseEntity19, BeforeInsert as BeforeInsert19, BeforeUpdate as BeforeUpdate19, Column as Column24, CreateDateColumn as CreateDateColumn11, Entity as Entity21, Index as Index5, OneToMany as OneToMany6, PrimaryGeneratedColumn as PrimaryGeneratedColumn21, UpdateDateColumn as UpdateDateColumn11 } from "typeorm";
6293
2878
 
6294
2879
  // src/entities/issuanceBranding/CredentialLocaleBrandingEntity.ts
6295
- import { ChildEntity as ChildEntity5, Column as Column23, Index as Index4, JoinColumn as JoinColumn11, ManyToOne as ManyToOne9, OneToMany as OneToMany5 } from "typeorm";
2880
+ import { BeforeInsert as BeforeInsert18, BeforeUpdate as BeforeUpdate18, ChildEntity as ChildEntity5, Column as Column23, Index as Index4, JoinColumn as JoinColumn11, ManyToOne as ManyToOne9, OneToMany as OneToMany5 } from "typeorm";
2881
+
2882
+ // src/utils/issuanceBranding/HashUtils.ts
2883
+ var FNV_PRIME = 0x100000001b3n;
2884
+ var OFFSET_BASIS = 0xcbf29ce484222325n;
2885
+ function computeCompactHash(input) {
2886
+ let hash = OFFSET_BASIS;
2887
+ for (let i = 0; i < input.length; i++) {
2888
+ hash ^= BigInt(input.charCodeAt(i));
2889
+ hash = hash * FNV_PRIME & 0xffffffffffffffffn;
2890
+ }
2891
+ return hash.toString(36);
2892
+ }
2893
+ __name(computeCompactHash, "computeCompactHash");
6296
2894
 
6297
2895
  // src/entities/issuanceBranding/CredentialClaimsEntity.ts
6298
2896
  import { validate as validate15, Validate as Validate8 } from "class-validator";
@@ -6398,6 +2996,10 @@ var CredentialLocaleBrandingEntity = class extends BaseLocaleBrandingEntity {
6398
2996
  credentialBranding;
6399
2997
  claims;
6400
2998
  credentialBrandingId;
2999
+ state;
3000
+ setState() {
3001
+ this.state = computeCredentialLocaleBrandingState(this);
3002
+ }
6401
3003
  };
6402
3004
  _ts_decorate26([
6403
3005
  ManyToOne9(() => CredentialBrandingEntity, (credentialBranding) => credentialBranding.localeBranding, {
@@ -6427,6 +3029,21 @@ _ts_decorate26([
6427
3029
  }),
6428
3030
  _ts_metadata25("design:type", String)
6429
3031
  ], CredentialLocaleBrandingEntity.prototype, "credentialBrandingId", void 0);
3032
+ _ts_decorate26([
3033
+ Column23("varchar", {
3034
+ name: "state",
3035
+ length: 255,
3036
+ nullable: false
3037
+ }),
3038
+ _ts_metadata25("design:type", String)
3039
+ ], CredentialLocaleBrandingEntity.prototype, "state", void 0);
3040
+ _ts_decorate26([
3041
+ BeforeInsert18(),
3042
+ BeforeUpdate18(),
3043
+ _ts_metadata25("design:type", Function),
3044
+ _ts_metadata25("design:paramtypes", []),
3045
+ _ts_metadata25("design:returntype", void 0)
3046
+ ], CredentialLocaleBrandingEntity.prototype, "setState", null);
6430
3047
  CredentialLocaleBrandingEntity = _ts_decorate26([
6431
3048
  ChildEntity5("CredentialLocaleBranding"),
6432
3049
  Index4("IDX_CredentialLocaleBrandingEntity_credentialBranding_locale", [
@@ -6436,6 +3053,45 @@ CredentialLocaleBrandingEntity = _ts_decorate26([
6436
3053
  unique: true
6437
3054
  })
6438
3055
  ], CredentialLocaleBrandingEntity);
3056
+ var computeCredentialLocaleBrandingState = /* @__PURE__ */ __name((localeBranding) => {
3057
+ const sortedClaims = (localeBranding.claims ?? []).map((claim) => ({
3058
+ key: claim.key,
3059
+ name: claim.name
3060
+ })).sort((first, second) => first.key.localeCompare(second.key));
3061
+ const payload = {
3062
+ alias: localeBranding.alias ?? null,
3063
+ locale: localeBranding.locale ?? null,
3064
+ description: localeBranding.description ?? null,
3065
+ logo: localeBranding.logo ? {
3066
+ uri: localeBranding.logo.uri ?? null,
3067
+ dataUri: localeBranding.logo.dataUri ?? null,
3068
+ mediaType: localeBranding.logo.mediaType ?? null,
3069
+ alt: localeBranding.logo.alt ?? null,
3070
+ dimensions: localeBranding.logo.dimensions ? {
3071
+ width: localeBranding.logo.dimensions.width,
3072
+ height: localeBranding.logo.dimensions.height
3073
+ } : null
3074
+ } : null,
3075
+ background: localeBranding.background ? {
3076
+ color: localeBranding.background.color ?? null,
3077
+ image: localeBranding.background.image ? {
3078
+ uri: localeBranding.background.image.uri ?? null,
3079
+ dataUri: localeBranding.background.image.dataUri ?? null,
3080
+ mediaType: localeBranding.background.image.mediaType ?? null,
3081
+ alt: localeBranding.background.image.alt ?? null,
3082
+ dimensions: localeBranding.background.image.dimensions ? {
3083
+ width: localeBranding.background.image.dimensions.width,
3084
+ height: localeBranding.background.image.dimensions.height
3085
+ } : null
3086
+ } : null
3087
+ } : null,
3088
+ text: localeBranding.text ? {
3089
+ color: localeBranding.text.color ?? null
3090
+ } : null,
3091
+ claims: sortedClaims
3092
+ };
3093
+ return computeCompactHash(JSON.stringify(payload));
3094
+ }, "computeCredentialLocaleBrandingState");
6439
3095
 
6440
3096
  // src/entities/issuanceBranding/CredentialBrandingEntity.ts
6441
3097
  function _ts_decorate27(decorators, target, key, desc) {
@@ -6456,6 +3112,7 @@ var CredentialBrandingEntity = class extends BaseEntity19 {
6456
3112
  id;
6457
3113
  vcHash;
6458
3114
  issuerCorrelationId;
3115
+ state;
6459
3116
  localeBranding;
6460
3117
  createdAt;
6461
3118
  lastUpdatedAt;
@@ -6463,6 +3120,11 @@ var CredentialBrandingEntity = class extends BaseEntity19 {
6463
3120
  updateUpdatedDate() {
6464
3121
  this.lastUpdatedAt = /* @__PURE__ */ new Date();
6465
3122
  }
3123
+ setState() {
3124
+ if (this.localeBranding && Array.isArray(this.localeBranding)) {
3125
+ this.state = this.computeState();
3126
+ }
3127
+ }
6466
3128
  async validate() {
6467
3129
  const validation = await validate16(this);
6468
3130
  if (validation.length > 0) {
@@ -6470,6 +3132,31 @@ var CredentialBrandingEntity = class extends BaseEntity19 {
6470
3132
  }
6471
3133
  return;
6472
3134
  }
3135
+ computeState() {
3136
+ const localeStates = (this.localeBranding ?? []).map((localeBranding) => ({
3137
+ locale: localeBranding.locale ?? "",
3138
+ alias: localeBranding.alias ?? "",
3139
+ id: localeBranding.id ?? "",
3140
+ state: computeCredentialLocaleBrandingState(localeBranding)
3141
+ }));
3142
+ localeStates.sort((first, second) => {
3143
+ const localeCompare = first.locale.localeCompare(second.locale);
3144
+ if (localeCompare !== 0) {
3145
+ return localeCompare;
3146
+ }
3147
+ const aliasCompare = first.alias.localeCompare(second.alias);
3148
+ if (aliasCompare !== 0) {
3149
+ return aliasCompare;
3150
+ }
3151
+ return first.id.localeCompare(second.id);
3152
+ });
3153
+ const payload = {
3154
+ issuerCorrelationId: this.issuerCorrelationId,
3155
+ vcHash: this.vcHash,
3156
+ localeBranding: localeStates.map((entry) => entry.state)
3157
+ };
3158
+ return computeCompactHash(JSON.stringify(payload));
3159
+ }
6473
3160
  };
6474
3161
  _ts_decorate27([
6475
3162
  PrimaryGeneratedColumn21("uuid"),
@@ -6499,6 +3186,14 @@ _ts_decorate27([
6499
3186
  }),
6500
3187
  _ts_metadata26("design:type", String)
6501
3188
  ], CredentialBrandingEntity.prototype, "issuerCorrelationId", void 0);
3189
+ _ts_decorate27([
3190
+ Column24("varchar", {
3191
+ name: "state",
3192
+ length: 255,
3193
+ nullable: false
3194
+ }),
3195
+ _ts_metadata26("design:type", String)
3196
+ ], CredentialBrandingEntity.prototype, "state", void 0);
6502
3197
  _ts_decorate27([
6503
3198
  OneToMany6(() => CredentialLocaleBrandingEntity, (credentialLocaleBrandingEntity) => credentialLocaleBrandingEntity.credentialBranding, {
6504
3199
  cascade: true,
@@ -6528,15 +3223,22 @@ _ts_decorate27([
6528
3223
  _ts_metadata26("design:type", typeof Date === "undefined" ? Object : Date)
6529
3224
  ], CredentialBrandingEntity.prototype, "lastUpdatedAt", void 0);
6530
3225
  _ts_decorate27([
6531
- BeforeInsert18(),
6532
- BeforeUpdate18(),
3226
+ BeforeInsert19(),
3227
+ BeforeUpdate19(),
6533
3228
  _ts_metadata26("design:type", Function),
6534
3229
  _ts_metadata26("design:paramtypes", []),
6535
3230
  _ts_metadata26("design:returntype", void 0)
6536
3231
  ], CredentialBrandingEntity.prototype, "updateUpdatedDate", null);
6537
3232
  _ts_decorate27([
6538
- BeforeInsert18(),
6539
- BeforeUpdate18(),
3233
+ BeforeInsert19(),
3234
+ BeforeUpdate19(),
3235
+ _ts_metadata26("design:type", Function),
3236
+ _ts_metadata26("design:paramtypes", []),
3237
+ _ts_metadata26("design:returntype", void 0)
3238
+ ], CredentialBrandingEntity.prototype, "setState", null);
3239
+ _ts_decorate27([
3240
+ BeforeInsert19(),
3241
+ BeforeUpdate19(),
6540
3242
  _ts_metadata26("design:type", Function),
6541
3243
  _ts_metadata26("design:paramtypes", []),
6542
3244
  _ts_metadata26("design:returntype", Promise)
@@ -6554,11 +3256,11 @@ CredentialBrandingEntity = _ts_decorate27([
6554
3256
  // src/entities/issuanceBranding/IssuerBrandingEntity.ts
6555
3257
  import { typeOrmDateTime as typeOrmDateTime14 } from "@sphereon/ssi-sdk.agent-config";
6556
3258
  import { ArrayMinSize as ArrayMinSize2, IsNotEmpty as IsNotEmpty11, validate as validate17 } from "class-validator";
6557
- import { BaseEntity as BaseEntity20, BeforeInsert as BeforeInsert19, BeforeUpdate as BeforeUpdate19, Column as Column26, CreateDateColumn as CreateDateColumn12, Entity as Entity22, Index as Index7, OneToMany as OneToMany7, PrimaryGeneratedColumn as PrimaryGeneratedColumn22, UpdateDateColumn as UpdateDateColumn12 } from "typeorm";
3259
+ import { BaseEntity as BaseEntity20, BeforeInsert as BeforeInsert21, BeforeUpdate as BeforeUpdate21, Column as Column26, CreateDateColumn as CreateDateColumn12, Entity as Entity22, Index as Index7, OneToMany as OneToMany7, PrimaryGeneratedColumn as PrimaryGeneratedColumn22, UpdateDateColumn as UpdateDateColumn12 } from "typeorm";
6558
3260
 
6559
3261
  // src/entities/issuanceBranding/IssuerLocaleBrandingEntity.ts
6560
3262
  import { Validate as Validate9 } from "class-validator";
6561
- import { ChildEntity as ChildEntity6, Column as Column25, Index as Index6, JoinColumn as JoinColumn12, ManyToOne as ManyToOne10 } from "typeorm";
3263
+ import { BeforeInsert as BeforeInsert20, BeforeUpdate as BeforeUpdate20, ChildEntity as ChildEntity6, Column as Column25, Index as Index6, JoinColumn as JoinColumn12, ManyToOne as ManyToOne10 } from "typeorm";
6562
3264
  function _ts_decorate28(decorators, target, key, desc) {
6563
3265
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
6564
3266
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -6580,6 +3282,48 @@ var IssuerLocaleBrandingEntity = class extends BaseLocaleBrandingEntity {
6580
3282
  policyUri;
6581
3283
  contacts;
6582
3284
  issuerBrandingId;
3285
+ state;
3286
+ setState() {
3287
+ this.state = this.computeState();
3288
+ }
3289
+ computeState() {
3290
+ const payload = {
3291
+ alias: this.alias ?? null,
3292
+ locale: this.locale ?? null,
3293
+ description: this.description ?? null,
3294
+ clientUri: this.clientUri ?? null,
3295
+ tosUri: this.tosUri ?? null,
3296
+ policyUri: this.policyUri ?? null,
3297
+ contacts: this.contacts ?? null,
3298
+ logo: this.logo ? {
3299
+ uri: this.logo.uri ?? null,
3300
+ dataUri: this.logo.dataUri ?? null,
3301
+ mediaType: this.logo.mediaType ?? null,
3302
+ alt: this.logo.alt ?? null,
3303
+ dimensions: this.logo.dimensions ? {
3304
+ width: this.logo.dimensions.width,
3305
+ height: this.logo.dimensions.height
3306
+ } : null
3307
+ } : null,
3308
+ background: this.background ? {
3309
+ color: this.background.color ?? null,
3310
+ image: this.background.image ? {
3311
+ uri: this.background.image.uri ?? null,
3312
+ dataUri: this.background.image.dataUri ?? null,
3313
+ mediaType: this.background.image.mediaType ?? null,
3314
+ alt: this.background.image.alt ?? null,
3315
+ dimensions: this.background.image.dimensions ? {
3316
+ width: this.background.image.dimensions.width,
3317
+ height: this.background.image.dimensions.height
3318
+ } : null
3319
+ } : null
3320
+ } : null,
3321
+ text: this.text ? {
3322
+ color: this.text.color ?? null
3323
+ } : null
3324
+ };
3325
+ return computeCompactHash(JSON.stringify(payload));
3326
+ }
6583
3327
  };
6584
3328
  _ts_decorate28([
6585
3329
  ManyToOne10(() => IssuerBrandingEntity, (issuerBranding) => issuerBranding.localeBranding, {
@@ -6638,6 +3382,21 @@ _ts_decorate28([
6638
3382
  }),
6639
3383
  _ts_metadata27("design:type", String)
6640
3384
  ], IssuerLocaleBrandingEntity.prototype, "issuerBrandingId", void 0);
3385
+ _ts_decorate28([
3386
+ Column25("varchar", {
3387
+ name: "state",
3388
+ length: 255,
3389
+ nullable: false
3390
+ }),
3391
+ _ts_metadata27("design:type", String)
3392
+ ], IssuerLocaleBrandingEntity.prototype, "state", void 0);
3393
+ _ts_decorate28([
3394
+ BeforeInsert20(),
3395
+ BeforeUpdate20(),
3396
+ _ts_metadata27("design:type", Function),
3397
+ _ts_metadata27("design:paramtypes", []),
3398
+ _ts_metadata27("design:returntype", void 0)
3399
+ ], IssuerLocaleBrandingEntity.prototype, "setState", null);
6641
3400
  IssuerLocaleBrandingEntity = _ts_decorate28([
6642
3401
  ChildEntity6("IssuerLocaleBranding"),
6643
3402
  Index6("IDX_IssuerLocaleBrandingEntity_issuerBranding_locale", [
@@ -6726,15 +3485,15 @@ _ts_decorate29([
6726
3485
  _ts_metadata28("design:type", typeof Date === "undefined" ? Object : Date)
6727
3486
  ], IssuerBrandingEntity.prototype, "lastUpdatedAt", void 0);
6728
3487
  _ts_decorate29([
6729
- BeforeInsert19(),
6730
- BeforeUpdate19(),
3488
+ BeforeInsert21(),
3489
+ BeforeUpdate21(),
6731
3490
  _ts_metadata28("design:type", Function),
6732
3491
  _ts_metadata28("design:paramtypes", []),
6733
3492
  _ts_metadata28("design:returntype", void 0)
6734
3493
  ], IssuerBrandingEntity.prototype, "updateUpdatedDate", null);
6735
3494
  _ts_decorate29([
6736
- BeforeInsert19(),
6737
- BeforeUpdate19(),
3495
+ BeforeInsert21(),
3496
+ BeforeUpdate21(),
6738
3497
  _ts_metadata28("design:type", Function),
6739
3498
  _ts_metadata28("design:paramtypes", []),
6740
3499
  _ts_metadata28("design:returntype", Promise)
@@ -6985,7 +3744,7 @@ Oid4vcStateEntity = _ts_decorate31([
6985
3744
  // src/entities/presentationDefinition/DcqlQueryItemEntity.ts
6986
3745
  import { typeOrmDateTime as typeOrmDateTime17 } from "@sphereon/ssi-sdk.agent-config";
6987
3746
  import { IsNotEmpty as IsNotEmpty12 } from "class-validator";
6988
- import { BaseEntity as BaseEntity23, BeforeInsert as BeforeInsert20, BeforeUpdate as BeforeUpdate20, Column as Column29, CreateDateColumn as CreateDateColumn15, Entity as Entity25, Index as Index8, PrimaryGeneratedColumn as PrimaryGeneratedColumn23, UpdateDateColumn as UpdateDateColumn15 } from "typeorm";
3747
+ import { BaseEntity as BaseEntity23, BeforeInsert as BeforeInsert22, BeforeUpdate as BeforeUpdate22, Column as Column29, CreateDateColumn as CreateDateColumn15, Entity as Entity25, Index as Index8, PrimaryGeneratedColumn as PrimaryGeneratedColumn23, UpdateDateColumn as UpdateDateColumn15 } from "typeorm";
6989
3748
  function _ts_decorate32(decorators, target, key, desc) {
6990
3749
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
6991
3750
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -7104,8 +3863,8 @@ _ts_decorate32([
7104
3863
  _ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
7105
3864
  ], DcqlQueryItemEntity.prototype, "lastUpdatedAt", void 0);
7106
3865
  _ts_decorate32([
7107
- BeforeInsert20(),
7108
- BeforeUpdate20(),
3866
+ BeforeInsert22(),
3867
+ BeforeUpdate22(),
7109
3868
  _ts_metadata31("design:type", Function),
7110
3869
  _ts_metadata31("design:paramtypes", []),
7111
3870
  _ts_metadata31("design:returntype", void 0)
@@ -8072,10 +4831,19 @@ var ContactStore = class extends AbstractContactStore {
8072
4831
  const result = await partyRepository.find({
8073
4832
  where: {
8074
4833
  id: In(initialResult.map((party) => party.id))
8075
- }
4834
+ },
4835
+ relations: [
4836
+ "contact"
4837
+ ]
8076
4838
  });
8077
4839
  debug(`getParties() resulted in ${result.length} parties`);
8078
- return result.map(partyFrom);
4840
+ return result.filter((party) => {
4841
+ if (!party.contact) {
4842
+ console.warn(`party ${party.id} does not have an associated contact`);
4843
+ return false;
4844
+ }
4845
+ return true;
4846
+ }).map(partyFrom);
8079
4847
  }, "getParties");
8080
4848
  addParty = /* @__PURE__ */ __name(async (args) => {
8081
4849
  const { identities, contact, partyType } = args;
@@ -8871,7 +5639,7 @@ import { In as In2, Not } from "typeorm";
8871
5639
  var credentialBrandingFrom = /* @__PURE__ */ __name((credentialBranding) => {
8872
5640
  const result = {
8873
5641
  ...credentialBranding,
8874
- localeBranding: credentialBranding.localeBranding.map((localeBranding) => localeBrandingFrom(localeBranding))
5642
+ localeBranding: credentialBranding.localeBranding.map((localeBranding) => credentialLocaleBrandingFromEntity(localeBranding))
8875
5643
  };
8876
5644
  return replaceNullWithUndefined(result);
8877
5645
  }, "credentialBrandingFrom");
@@ -8889,6 +5657,19 @@ var localeBrandingFrom = /* @__PURE__ */ __name((localeBranding) => {
8889
5657
  };
8890
5658
  return replaceNullWithUndefined(result);
8891
5659
  }, "localeBrandingFrom");
5660
+ var credentialLocaleBrandingFromEntity = /* @__PURE__ */ __name((localeBranding) => {
5661
+ const base = localeBrandingFrom(localeBranding);
5662
+ const result = {
5663
+ ...base,
5664
+ state: localeBranding.state,
5665
+ claims: localeBranding.claims ? localeBranding.claims.map((claim) => ({
5666
+ id: claim.id,
5667
+ key: claim.key,
5668
+ name: claim.name
5669
+ })) : void 0
5670
+ };
5671
+ return replaceNullWithUndefined(result);
5672
+ }, "credentialLocaleBrandingFromEntity");
8892
5673
  var issuerLocaleBrandingEntityFrom = /* @__PURE__ */ __name((args) => {
8893
5674
  const issuerLocaleBrandingEntity = new IssuerLocaleBrandingEntity();
8894
5675
  issuerLocaleBrandingEntity.alias = isEmptyString(args.alias) ? void 0 : args.alias;
@@ -8993,7 +5774,7 @@ var IssuanceBrandingStore = class extends AbstractIssuanceBrandingStore {
8993
5774
  return credentialBrandingFrom(createdResult);
8994
5775
  }, "addCredentialBranding");
8995
5776
  getCredentialBranding = /* @__PURE__ */ __name(async (args) => {
8996
- const { filter } = args ?? {};
5777
+ const { filter, knownStates } = args ?? {};
8997
5778
  if (filter) {
8998
5779
  filter.forEach((filter2) => {
8999
5780
  if (filter2.localeBranding && "locale" in filter2.localeBranding && filter2.localeBranding.locale === void 0) {
@@ -9002,12 +5783,39 @@ var IssuanceBrandingStore = class extends AbstractIssuanceBrandingStore {
9002
5783
  });
9003
5784
  }
9004
5785
  debug3("Getting credential branding", args);
9005
- const result = await (await this.dbConnection).getRepository(CredentialBrandingEntity).find({
5786
+ const repository = (await this.dbConnection).getRepository(CredentialBrandingEntity);
5787
+ if (knownStates && Object.keys(knownStates).length > 0) {
5788
+ const stateQuery = repository.createQueryBuilder("branding").select([
5789
+ "branding.id",
5790
+ "branding.state"
5791
+ ]);
5792
+ if (filter) {
5793
+ stateQuery.where(filter);
5794
+ }
5795
+ const stateResults = await stateQuery.getRawMany().then((rows) => rows.map((row) => ({
5796
+ id: row.branding_id,
5797
+ state: row.branding_state
5798
+ })));
5799
+ const dirtyIds = stateResults.filter((result3) => {
5800
+ const knownState = knownStates[result3.id];
5801
+ return !knownState || knownState !== result3.state;
5802
+ }).map((result3) => result3.id);
5803
+ if (dirtyIds.length === 0) {
5804
+ return [];
5805
+ }
5806
+ const result2 = await repository.find({
5807
+ where: {
5808
+ id: In2(dirtyIds)
5809
+ }
5810
+ });
5811
+ return result2.map((branding) => credentialBrandingFrom(branding));
5812
+ }
5813
+ const result = await repository.find({
9006
5814
  ...filter && {
9007
5815
  where: filter
9008
5816
  }
9009
5817
  });
9010
- return result.map((credentialBranding) => credentialBrandingFrom(credentialBranding));
5818
+ return result.map((branding) => credentialBrandingFrom(branding));
9011
5819
  }, "getCredentialBranding");
9012
5820
  removeCredentialBranding = /* @__PURE__ */ __name(async (args) => {
9013
5821
  const { filter } = args;
@@ -9100,7 +5908,7 @@ var IssuanceBrandingStore = class extends AbstractIssuanceBrandingStore {
9100
5908
  where: filter
9101
5909
  }
9102
5910
  });
9103
- return credentialBrandingLocale ? credentialBrandingLocale.map((credentialLocaleBranding) => localeBrandingFrom(credentialLocaleBranding)) : [];
5911
+ return credentialBrandingLocale ? credentialBrandingLocale.map((credentialLocaleBranding) => credentialLocaleBrandingFromEntity(credentialLocaleBranding)) : [];
9104
5912
  }, "getCredentialLocaleBranding");
9105
5913
  removeCredentialLocaleBranding = /* @__PURE__ */ __name(async (args) => {
9106
5914
  const { filter } = args;
@@ -10313,7 +7121,7 @@ var cleanFilter = /* @__PURE__ */ __name((filter) => {
10313
7121
  }, "cleanFilter");
10314
7122
 
10315
7123
  // src/migrations/generic/index.ts
10316
- var import_data_store = __toESM(require_build(), 1);
7124
+ import { migrations as VeramoDataStoreMigrations, Entities as VeramoDataStoreEntities } from "@veramo/data-store";
10317
7125
 
10318
7126
  // src/migrations/generic/1-CreateContacts.ts
10319
7127
  import Debug8 from "debug";
@@ -11363,12 +8171,162 @@ var AddLinkedVpFields1763387280000 = class {
11363
8171
  }
11364
8172
  };
11365
8173
 
8174
+ // src/migrations/generic/15-AddBrandingState.ts
8175
+ import Debug14 from "debug";
8176
+
8177
+ // src/migrations/postgres/1766000000000-AddBrandingState.ts
8178
+ var AddBrandingStatePostgres1766000000000 = class {
8179
+ static {
8180
+ __name(this, "AddBrandingStatePostgres1766000000000");
8181
+ }
8182
+ name = "AddBrandingState1766000000000";
8183
+ async up(queryRunner) {
8184
+ await queryRunner.query(`ALTER TABLE "CredentialBranding" ADD "state" character varying(255) NOT NULL DEFAULT ''`);
8185
+ await queryRunner.query(`ALTER TABLE "BaseLocaleBranding" ADD "state" character varying(255) NOT NULL DEFAULT ''`);
8186
+ }
8187
+ async down(queryRunner) {
8188
+ await queryRunner.query(`ALTER TABLE "BaseLocaleBranding" DROP COLUMN "state"`);
8189
+ await queryRunner.query(`ALTER TABLE "CredentialBranding" DROP COLUMN "state"`);
8190
+ }
8191
+ };
8192
+
8193
+ // src/migrations/sqlite/1766000000000-AddBrandingState.ts
8194
+ var AddBrandingStateSqlite1766000000000 = class {
8195
+ static {
8196
+ __name(this, "AddBrandingStateSqlite1766000000000");
8197
+ }
8198
+ name = "AddBrandingState1766000000000";
8199
+ async up(queryRunner) {
8200
+ await queryRunner.query(`ALTER TABLE "CredentialBranding" ADD COLUMN "state" varchar(255) NOT NULL DEFAULT ''`);
8201
+ await queryRunner.query(`ALTER TABLE "BaseLocaleBranding" ADD COLUMN "state" varchar(255) NOT NULL DEFAULT ''`);
8202
+ }
8203
+ async down(queryRunner) {
8204
+ await queryRunner.query(`PRAGMA foreign_keys = OFF`);
8205
+ await queryRunner.query(`
8206
+ CREATE TABLE "CredentialBranding_old"
8207
+ (
8208
+ "id" varchar PRIMARY KEY NOT NULL,
8209
+ "vcHash" varchar(255) NOT NULL,
8210
+ "issuerCorrelationId" varchar(255) NOT NULL,
8211
+ "created_at" datetime NOT NULL DEFAULT (datetime('now')),
8212
+ "last_updated_at" datetime NOT NULL DEFAULT (datetime('now'))
8213
+ )
8214
+ `);
8215
+ await queryRunner.query(`
8216
+ INSERT INTO "CredentialBranding_old" ("id", "vcHash", "issuerCorrelationId", "created_at", "last_updated_at")
8217
+ SELECT "id", "vcHash", "issuerCorrelationId", "created_at", "last_updated_at"
8218
+ FROM "CredentialBranding"
8219
+ `);
8220
+ await queryRunner.query(`DROP TABLE "CredentialBranding"`);
8221
+ await queryRunner.query(`ALTER TABLE "CredentialBranding_old" RENAME TO "CredentialBranding"`);
8222
+ await queryRunner.query(`CREATE INDEX "IDX_CredentialBrandingEntity_issuerCorrelationId" ON "CredentialBranding" ("issuerCorrelationId")`);
8223
+ await queryRunner.query(`CREATE INDEX "IDX_CredentialBrandingEntity_vcHash" ON "CredentialBranding" ("vcHash")`);
8224
+ await queryRunner.query(`
8225
+ CREATE TABLE "BaseLocaleBranding_old"
8226
+ (
8227
+ "id" varchar PRIMARY KEY NOT NULL,
8228
+ "alias" varchar(255),
8229
+ "locale" varchar(255) NOT NULL,
8230
+ "description" varchar(255),
8231
+ "created_at" datetime NOT NULL DEFAULT (datetime('now')),
8232
+ "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')),
8233
+ "credentialBrandingId" varchar,
8234
+ "issuerBrandingId" varchar,
8235
+ "type" varchar NOT NULL,
8236
+ "logoId" varchar,
8237
+ "backgroundId" varchar,
8238
+ "textId" varchar,
8239
+ "client_uri" varchar,
8240
+ "tos_uri" varchar,
8241
+ "policy_uri" varchar,
8242
+ "contacts" varchar,
8243
+ CONSTRAINT "UQ_logoId" UNIQUE ("logoId"),
8244
+ CONSTRAINT "UQ_backgroundId" UNIQUE ("backgroundId"),
8245
+ CONSTRAINT "UQ_textId" UNIQUE ("textId"),
8246
+ CONSTRAINT "FK_BaseLocaleBranding_logoId" FOREIGN KEY ("logoId") REFERENCES "ImageAttributes" ("id") ON DELETE CASCADE ON UPDATE NO ACTION,
8247
+ CONSTRAINT "FK_BaseLocaleBranding_backgroundId" FOREIGN KEY ("backgroundId") REFERENCES "BackgroundAttributes" ("id") ON DELETE CASCADE ON UPDATE NO ACTION,
8248
+ CONSTRAINT "FK_BaseLocaleBranding_textId" FOREIGN KEY ("textId") REFERENCES "TextAttributes" ("id") ON DELETE CASCADE ON UPDATE NO ACTION,
8249
+ CONSTRAINT "FK_BaseLocaleBranding_credentialBrandingId" FOREIGN KEY ("credentialBrandingId") REFERENCES "CredentialBranding" ("id") ON DELETE CASCADE ON UPDATE NO ACTION,
8250
+ CONSTRAINT "FK_BaseLocaleBranding_issuerBrandingId" FOREIGN KEY ("issuerBrandingId") REFERENCES "IssuerBranding" ("id") ON DELETE CASCADE ON UPDATE NO ACTION
8251
+ )
8252
+ `);
8253
+ await queryRunner.query(`
8254
+ INSERT INTO "BaseLocaleBranding_old" ("id", "alias", "locale", "description", "created_at", "last_updated_at", "credentialBrandingId", "issuerBrandingId", "type", "logoId", "backgroundId", "textId", "client_uri", "tos_uri", "policy_uri", "contacts")
8255
+ SELECT "id", "alias", "locale", "description", "created_at", "last_updated_at", "credentialBrandingId", "issuerBrandingId", "type", "logoId", "backgroundId", "textId", "client_uri", "tos_uri", "policy_uri", "contacts"
8256
+ FROM "BaseLocaleBranding"
8257
+ `);
8258
+ await queryRunner.query(`DROP TABLE "BaseLocaleBranding"`);
8259
+ await queryRunner.query(`ALTER TABLE "BaseLocaleBranding_old" RENAME TO "BaseLocaleBranding"`);
8260
+ await queryRunner.query(`CREATE UNIQUE INDEX "IDX_CredentialLocaleBrandingEntity_credentialBranding_locale" ON "BaseLocaleBranding" ("credentialBrandingId", "locale")`);
8261
+ await queryRunner.query(`CREATE UNIQUE INDEX "IDX_IssuerLocaleBrandingEntity_issuerBranding_locale" ON "BaseLocaleBranding" ("issuerBrandingId", "locale")`);
8262
+ await queryRunner.query(`CREATE INDEX "IDX_BaseLocaleBranding_type" ON "BaseLocaleBranding" ("type")`);
8263
+ await queryRunner.query(`PRAGMA foreign_keys = ON`);
8264
+ }
8265
+ };
8266
+
8267
+ // src/migrations/generic/15-AddBrandingState.ts
8268
+ var debug14 = Debug14("sphereon:ssi-sdk:migrations");
8269
+ var AddBrandingState1766000000000 = class {
8270
+ static {
8271
+ __name(this, "AddBrandingState1766000000000");
8272
+ }
8273
+ name = "AddBrandingState1766000000000";
8274
+ async up(queryRunner) {
8275
+ debug14("migration: adding branding state checksum columns");
8276
+ const dbType = queryRunner.connection.driver.options.type;
8277
+ switch (dbType) {
8278
+ case "postgres": {
8279
+ debug14("using postgres migration file");
8280
+ const mig = new AddBrandingStatePostgres1766000000000();
8281
+ await mig.up(queryRunner);
8282
+ debug14("Migration statements executed");
8283
+ return;
8284
+ }
8285
+ case "sqlite":
8286
+ case "expo":
8287
+ case "react-native": {
8288
+ debug14("using sqlite/react-native migration file");
8289
+ const mig = new AddBrandingStateSqlite1766000000000();
8290
+ await mig.up(queryRunner);
8291
+ debug14("Migration statements executed");
8292
+ return;
8293
+ }
8294
+ default:
8295
+ return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
8296
+ }
8297
+ }
8298
+ async down(queryRunner) {
8299
+ debug14("migration: removing branding state checksum columns");
8300
+ const dbType = queryRunner.connection.driver.options.type;
8301
+ switch (dbType) {
8302
+ case "postgres": {
8303
+ debug14("using postgres migration file");
8304
+ const mig = new AddBrandingStatePostgres1766000000000();
8305
+ await mig.down(queryRunner);
8306
+ debug14("Migration statements executed");
8307
+ return;
8308
+ }
8309
+ case "sqlite":
8310
+ case "expo":
8311
+ case "react-native": {
8312
+ debug14("using sqlite/react-native migration file");
8313
+ const mig = new AddBrandingStateSqlite1766000000000();
8314
+ await mig.down(queryRunner);
8315
+ debug14("Migration statements executed");
8316
+ return;
8317
+ }
8318
+ default:
8319
+ return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
8320
+ }
8321
+ }
8322
+ };
8323
+
11366
8324
  // src/migrations/generic/15-AddServiceMetadata.ts
11367
- import Debug16 from "debug";
8325
+ import Debug17 from "debug";
11368
8326
 
11369
8327
  // src/migrations/postgres/1764000000001-AddServiceMetadata.ts
11370
- import Debug14 from "debug";
11371
- var debug14 = Debug14("sphereon:ssi-sdk:migrations");
8328
+ import Debug15 from "debug";
8329
+ var debug15 = Debug15("sphereon:ssi-sdk:migrations");
11372
8330
  var AddServiceMetadata1764000000001 = class {
11373
8331
  static {
11374
8332
  __name(this, "AddServiceMetadata1764000000001");
@@ -11377,7 +8335,7 @@ var AddServiceMetadata1764000000001 = class {
11377
8335
  async up(queryRunner) {
11378
8336
  const table = await queryRunner.getTable("service");
11379
8337
  if (!table) {
11380
- debug14("AddServiceMetadata: Skipping migration - service table does not exist. This is expected if Veramo DID Manager is not being used. If you need service metadata support, ensure Veramo migrations run before SSI-SDK migrations.");
8338
+ debug15("AddServiceMetadata: Skipping migration - service table does not exist. This is expected if Veramo DID Manager is not being used. If you need service metadata support, ensure Veramo migrations run before SSI-SDK migrations.");
11381
8339
  console.warn("[SSI-SDK Migration] AddServiceMetadata: Skipping - service table does not exist (Veramo DID Manager not in use)");
11382
8340
  return;
11383
8341
  }
@@ -11385,7 +8343,7 @@ var AddServiceMetadata1764000000001 = class {
11385
8343
  ALTER TABLE "service"
11386
8344
  ADD COLUMN IF NOT EXISTS "metadata" jsonb
11387
8345
  `);
11388
- debug14("AddServiceMetadata: Added metadata column to service table");
8346
+ debug15("AddServiceMetadata: Added metadata column to service table");
11389
8347
  }
11390
8348
  async down(queryRunner) {
11391
8349
  const table = await queryRunner.getTable("service");
@@ -11400,8 +8358,8 @@ var AddServiceMetadata1764000000001 = class {
11400
8358
  };
11401
8359
 
11402
8360
  // src/migrations/sqlite/1764000000002-AddServiceMetadata.ts
11403
- import Debug15 from "debug";
11404
- var debug15 = Debug15("sphereon:ssi-sdk:migrations");
8361
+ import Debug16 from "debug";
8362
+ var debug16 = Debug16("sphereon:ssi-sdk:migrations");
11405
8363
  var AddServiceMetadata1764000000002 = class {
11406
8364
  static {
11407
8365
  __name(this, "AddServiceMetadata1764000000002");
@@ -11410,7 +8368,7 @@ var AddServiceMetadata1764000000002 = class {
11410
8368
  async up(queryRunner) {
11411
8369
  const table = await queryRunner.getTable("service");
11412
8370
  if (!table) {
11413
- debug15("AddServiceMetadata: Skipping migration - service table does not exist. This is expected if Veramo DID Manager is not being used. If you need service metadata support, ensure Veramo migrations run before SSI-SDK migrations.");
8371
+ debug16("AddServiceMetadata: Skipping migration - service table does not exist. This is expected if Veramo DID Manager is not being used. If you need service metadata support, ensure Veramo migrations run before SSI-SDK migrations.");
11414
8372
  console.warn("[SSI-SDK Migration] AddServiceMetadata: Skipping - service table does not exist (Veramo DID Manager not in use)");
11415
8373
  return;
11416
8374
  }
@@ -11420,7 +8378,7 @@ var AddServiceMetadata1764000000002 = class {
11420
8378
  ALTER TABLE "service"
11421
8379
  ADD COLUMN "metadata" text
11422
8380
  `);
11423
- debug15("AddServiceMetadata: Added metadata column to service table");
8381
+ debug16("AddServiceMetadata: Added metadata column to service table");
11424
8382
  }
11425
8383
  }
11426
8384
  async down(queryRunner) {
@@ -11428,30 +8386,30 @@ var AddServiceMetadata1764000000002 = class {
11428
8386
  };
11429
8387
 
11430
8388
  // src/migrations/generic/15-AddServiceMetadata.ts
11431
- var debug16 = Debug16("sphereon:ssi-sdk:migrations");
8389
+ var debug17 = Debug17("sphereon:ssi-sdk:migrations");
11432
8390
  var AddServiceMetadata1764000000000 = class {
11433
8391
  static {
11434
8392
  __name(this, "AddServiceMetadata1764000000000");
11435
8393
  }
11436
8394
  name = "AddServiceMetadata1764000000000";
11437
8395
  async up(queryRunner) {
11438
- debug16("migration: adding metadata column to service table");
8396
+ debug17("migration: adding metadata column to service table");
11439
8397
  const dbType = queryRunner.connection.driver.options.type;
11440
8398
  switch (dbType) {
11441
8399
  case "postgres": {
11442
- debug16("using postgres migration file for AddServiceMetadata");
8400
+ debug17("using postgres migration file for AddServiceMetadata");
11443
8401
  const mig = new AddServiceMetadata1764000000001();
11444
8402
  await mig.up(queryRunner);
11445
- debug16("Postgres migration statements for AddServiceMetadata executed");
8403
+ debug17("Postgres migration statements for AddServiceMetadata executed");
11446
8404
  return;
11447
8405
  }
11448
8406
  case "sqlite":
11449
8407
  case "expo":
11450
8408
  case "react-native": {
11451
- debug16("using sqlite/react-native migration file for AddServiceMetadata");
8409
+ debug17("using sqlite/react-native migration file for AddServiceMetadata");
11452
8410
  const mig = new AddServiceMetadata1764000000002();
11453
8411
  await mig.up(queryRunner);
11454
- debug16("SQLite migration statements for AddServiceMetadata executed");
8412
+ debug17("SQLite migration statements for AddServiceMetadata executed");
11455
8413
  return;
11456
8414
  }
11457
8415
  default:
@@ -11459,23 +8417,23 @@ var AddServiceMetadata1764000000000 = class {
11459
8417
  }
11460
8418
  }
11461
8419
  async down(queryRunner) {
11462
- debug16("migration: reverting metadata column from service table");
8420
+ debug17("migration: reverting metadata column from service table");
11463
8421
  const dbType = queryRunner.connection.driver.options.type;
11464
8422
  switch (dbType) {
11465
8423
  case "postgres": {
11466
- debug16("using postgres migration file for AddServiceMetadata");
8424
+ debug17("using postgres migration file for AddServiceMetadata");
11467
8425
  const mig = new AddServiceMetadata1764000000001();
11468
8426
  await mig.down(queryRunner);
11469
- debug16("Postgres migration statements for AddServiceMetadata reverted");
8427
+ debug17("Postgres migration statements for AddServiceMetadata reverted");
11470
8428
  return;
11471
8429
  }
11472
8430
  case "sqlite":
11473
8431
  case "expo":
11474
8432
  case "react-native": {
11475
- debug16("using sqlite/react-native migration file for AddServiceMetadata");
8433
+ debug17("using sqlite/react-native migration file for AddServiceMetadata");
11476
8434
  const mig = new AddServiceMetadata1764000000002();
11477
8435
  await mig.down(queryRunner);
11478
- debug16("SQLite migration statements for AddServiceMetadata reverted");
8436
+ debug17("SQLite migration statements for AddServiceMetadata reverted");
11479
8437
  return;
11480
8438
  }
11481
8439
  default:
@@ -11485,31 +8443,31 @@ var AddServiceMetadata1764000000000 = class {
11485
8443
  };
11486
8444
 
11487
8445
  // src/migrations/generic/2-CreateIssuanceBranding.ts
11488
- import Debug17 from "debug";
11489
- var debug17 = Debug17("sphereon:ssi-sdk:migrations");
8446
+ import Debug18 from "debug";
8447
+ var debug18 = Debug18("sphereon:ssi-sdk:migrations");
11490
8448
  var CreateIssuanceBranding1659463079429 = class {
11491
8449
  static {
11492
8450
  __name(this, "CreateIssuanceBranding1659463079429");
11493
8451
  }
11494
8452
  name = "CreateIssuanceBranding1659463079429";
11495
8453
  async up(queryRunner) {
11496
- debug17("migration: creating issuance branding tables");
8454
+ debug18("migration: creating issuance branding tables");
11497
8455
  const dbType = queryRunner.connection.driver.options.type;
11498
8456
  switch (dbType) {
11499
8457
  case "postgres": {
11500
- debug17("using postgres migration file");
8458
+ debug18("using postgres migration file");
11501
8459
  const mig = new CreateIssuanceBranding1685628974232();
11502
8460
  await mig.up(queryRunner);
11503
- debug17("Migration statements executed");
8461
+ debug18("Migration statements executed");
11504
8462
  return;
11505
8463
  }
11506
8464
  case "sqlite":
11507
8465
  case "expo":
11508
8466
  case "react-native": {
11509
- debug17("using sqlite/react-native migration file");
8467
+ debug18("using sqlite/react-native migration file");
11510
8468
  const mig = new CreateIssuanceBranding1685628973231();
11511
8469
  await mig.up(queryRunner);
11512
- debug17("Migration statements executed");
8470
+ debug18("Migration statements executed");
11513
8471
  return;
11514
8472
  }
11515
8473
  default:
@@ -11517,23 +8475,23 @@ var CreateIssuanceBranding1659463079429 = class {
11517
8475
  }
11518
8476
  }
11519
8477
  async down(queryRunner) {
11520
- debug17("migration: reverting issuance branding tables");
8478
+ debug18("migration: reverting issuance branding tables");
11521
8479
  const dbType = queryRunner.connection.driver.options.type;
11522
8480
  switch (dbType) {
11523
8481
  case "postgres": {
11524
- debug17("using postgres migration file");
8482
+ debug18("using postgres migration file");
11525
8483
  const mig = new CreateIssuanceBranding1685628974232();
11526
8484
  await mig.down(queryRunner);
11527
- debug17("Migration statements executed");
8485
+ debug18("Migration statements executed");
11528
8486
  return;
11529
8487
  }
11530
8488
  case "sqlite":
11531
8489
  case "expo":
11532
8490
  case "react-native": {
11533
- debug17("using sqlite/react-native migration file");
8491
+ debug18("using sqlite/react-native migration file");
11534
8492
  const mig = new CreateIssuanceBranding1685628973231();
11535
8493
  await mig.down(queryRunner);
11536
- debug17("Migration statements executed");
8494
+ debug18("Migration statements executed");
11537
8495
  return;
11538
8496
  }
11539
8497
  default:
@@ -11543,7 +8501,7 @@ var CreateIssuanceBranding1659463079429 = class {
11543
8501
  };
11544
8502
 
11545
8503
  // src/migrations/generic/3-CreateContacts.ts
11546
- import Debug18 from "debug";
8504
+ import Debug19 from "debug";
11547
8505
 
11548
8506
  // src/migrations/postgres/1690925872592-CreateContacts.ts
11549
8507
  import { enablePostgresUuidExtension as enablePostgresUuidExtension3 } from "@sphereon/ssi-sdk.core";
@@ -11764,30 +8722,30 @@ var CreateContacts1690925872693 = class {
11764
8722
  };
11765
8723
 
11766
8724
  // src/migrations/generic/3-CreateContacts.ts
11767
- var debug18 = Debug18("sphereon:ssi-sdk:migrations");
8725
+ var debug19 = Debug19("sphereon:ssi-sdk:migrations");
11768
8726
  var CreateContacts1690925872318 = class {
11769
8727
  static {
11770
8728
  __name(this, "CreateContacts1690925872318");
11771
8729
  }
11772
8730
  name = "CreateContacts1690925872318";
11773
8731
  async up(queryRunner) {
11774
- debug18("migration: creating contacts tables");
8732
+ debug19("migration: creating contacts tables");
11775
8733
  const dbType = queryRunner.connection.driver.options.type;
11776
8734
  switch (dbType) {
11777
8735
  case "postgres": {
11778
- debug18("using postgres migration file");
8736
+ debug19("using postgres migration file");
11779
8737
  const mig = new CreateContacts1690925872592();
11780
8738
  await mig.up(queryRunner);
11781
- debug18("Migration statements executed");
8739
+ debug19("Migration statements executed");
11782
8740
  return;
11783
8741
  }
11784
8742
  case "sqlite":
11785
8743
  case "expo":
11786
8744
  case "react-native": {
11787
- debug18("using sqlite/react-native migration file");
8745
+ debug19("using sqlite/react-native migration file");
11788
8746
  const mig = new CreateContacts1690925872693();
11789
8747
  await mig.up(queryRunner);
11790
- debug18("Migration statements executed");
8748
+ debug19("Migration statements executed");
11791
8749
  return;
11792
8750
  }
11793
8751
  default:
@@ -11795,23 +8753,23 @@ var CreateContacts1690925872318 = class {
11795
8753
  }
11796
8754
  }
11797
8755
  async down(queryRunner) {
11798
- debug18("migration: reverting contacts tables");
8756
+ debug19("migration: reverting contacts tables");
11799
8757
  const dbType = queryRunner.connection.driver.options.type;
11800
8758
  switch (dbType) {
11801
8759
  case "postgres": {
11802
- debug18("using postgres migration file");
8760
+ debug19("using postgres migration file");
11803
8761
  const mig = new CreateContacts1690925872592();
11804
8762
  await mig.down(queryRunner);
11805
- debug18("Migration statements executed");
8763
+ debug19("Migration statements executed");
11806
8764
  return;
11807
8765
  }
11808
8766
  case "sqlite":
11809
8767
  case "expo":
11810
8768
  case "react-native": {
11811
- debug18("using sqlite/react-native migration file");
8769
+ debug19("using sqlite/react-native migration file");
11812
8770
  const mig = new CreateContacts1690925872693();
11813
8771
  await mig.down(queryRunner);
11814
- debug18("Migration statements executed");
8772
+ debug19("Migration statements executed");
11815
8773
  return;
11816
8774
  }
11817
8775
  default:
@@ -11821,7 +8779,7 @@ var CreateContacts1690925872318 = class {
11821
8779
  };
11822
8780
 
11823
8781
  // src/migrations/generic/4-CreateStatusList.ts
11824
- import Debug19 from "debug";
8782
+ import Debug20 from "debug";
11825
8783
 
11826
8784
  // src/migrations/postgres/1693866470001-CreateStatusList.ts
11827
8785
  var CreateStatusList1693866470001 = class {
@@ -12027,53 +8985,53 @@ var UpdateStatusList1737110469000 = class {
12027
8985
  };
12028
8986
 
12029
8987
  // src/migrations/generic/4-CreateStatusList.ts
12030
- var debug19 = Debug19("sphereon:ssi-sdk:migrations");
8988
+ var debug20 = Debug20("sphereon:ssi-sdk:migrations");
12031
8989
  var CreateStatusList1693866470000 = class {
12032
8990
  static {
12033
8991
  __name(this, "CreateStatusList1693866470000");
12034
8992
  }
12035
8993
  name = "CreateStatusList1693866470000";
12036
8994
  async up(queryRunner) {
12037
- debug19("migration: creating issuance branding tables");
8995
+ debug20("migration: creating issuance branding tables");
12038
8996
  const dbType = queryRunner.connection.driver.options.type;
12039
8997
  if (dbType === "postgres") {
12040
- debug19("using postgres migration files");
8998
+ debug20("using postgres migration files");
12041
8999
  const createMig = new CreateStatusList1693866470001();
12042
9000
  await createMig.up(queryRunner);
12043
9001
  const updateMig = new UpdateStatusList1737110469001();
12044
9002
  const up = await updateMig.up(queryRunner);
12045
- debug19("Migration statements executed");
9003
+ debug20("Migration statements executed");
12046
9004
  return up;
12047
9005
  } else if (dbType === "sqlite" || dbType === "react-native" || dbType === "expo") {
12048
- debug19("using sqlite/react-native migration files");
9006
+ debug20("using sqlite/react-native migration files");
12049
9007
  const createMig = new CreateStatusList1693866470002();
12050
9008
  await createMig.up(queryRunner);
12051
9009
  const updateMig = new UpdateStatusList1737110469000();
12052
9010
  const up = await updateMig.up(queryRunner);
12053
- debug19("Migration statements executed");
9011
+ debug20("Migration statements executed");
12054
9012
  return up;
12055
9013
  } else {
12056
9014
  return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
12057
9015
  }
12058
9016
  }
12059
9017
  async down(queryRunner) {
12060
- debug19("migration: reverting issuance branding tables");
9018
+ debug20("migration: reverting issuance branding tables");
12061
9019
  const dbType = queryRunner.connection.driver.options.type;
12062
9020
  if (dbType === "postgres") {
12063
- debug19("using postgres migration files");
9021
+ debug20("using postgres migration files");
12064
9022
  const updateMig = new UpdateStatusList1737110469001();
12065
9023
  await updateMig.down(queryRunner);
12066
9024
  const createMig = new CreateStatusList1693866470001();
12067
9025
  const down = await createMig.down(queryRunner);
12068
- debug19("Migration statements executed");
9026
+ debug20("Migration statements executed");
12069
9027
  return down;
12070
9028
  } else if (dbType === "sqlite" || dbType === "react-native" || dbType === "expo") {
12071
- debug19("using sqlite/react-native migration files");
9029
+ debug20("using sqlite/react-native migration files");
12072
9030
  const updateMig = new UpdateStatusList1737110469000();
12073
9031
  await updateMig.down(queryRunner);
12074
9032
  const createMig = new CreateStatusList1693866470002();
12075
9033
  const down = await createMig.down(queryRunner);
12076
- debug19("Migration statements executed");
9034
+ debug20("Migration statements executed");
12077
9035
  return down;
12078
9036
  } else {
12079
9037
  return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
@@ -12082,7 +9040,7 @@ var CreateStatusList1693866470000 = class {
12082
9040
  };
12083
9041
 
12084
9042
  // src/migrations/generic/5-CreateAuditEvents.ts
12085
- import Debug20 from "debug";
9043
+ import Debug21 from "debug";
12086
9044
 
12087
9045
  // src/migrations/postgres/1701634812183-CreateAuditEvents.ts
12088
9046
  var CreateAuditEvents1701634812183 = class {
@@ -12181,30 +9139,30 @@ var CreateAuditEvents1701634819487 = class {
12181
9139
  };
12182
9140
 
12183
9141
  // src/migrations/generic/5-CreateAuditEvents.ts
12184
- var debug20 = Debug20("sphereon:ssi-sdk:migrations");
9142
+ var debug21 = Debug21("sphereon:ssi-sdk:migrations");
12185
9143
  var CreateAuditEvents1701635835330 = class {
12186
9144
  static {
12187
9145
  __name(this, "CreateAuditEvents1701635835330");
12188
9146
  }
12189
9147
  name = "CreateAuditEvents1701635835330";
12190
9148
  async up(queryRunner) {
12191
- debug20("migration: creating audit events tables");
9149
+ debug21("migration: creating audit events tables");
12192
9150
  const dbType = queryRunner.connection.driver.options.type;
12193
9151
  switch (dbType) {
12194
9152
  case "postgres": {
12195
- debug20("using postgres migration file");
9153
+ debug21("using postgres migration file");
12196
9154
  const mig = new CreateAuditEvents1701634812183();
12197
9155
  await mig.up(queryRunner);
12198
- debug20("Migration statements executed");
9156
+ debug21("Migration statements executed");
12199
9157
  return;
12200
9158
  }
12201
9159
  case "sqlite":
12202
9160
  case "expo":
12203
9161
  case "react-native": {
12204
- debug20("using sqlite/react-native migration file");
9162
+ debug21("using sqlite/react-native migration file");
12205
9163
  const mig = new CreateAuditEvents1701634819487();
12206
9164
  await mig.up(queryRunner);
12207
- debug20("Migration statements executed");
9165
+ debug21("Migration statements executed");
12208
9166
  return;
12209
9167
  }
12210
9168
  default:
@@ -12212,23 +9170,23 @@ var CreateAuditEvents1701635835330 = class {
12212
9170
  }
12213
9171
  }
12214
9172
  async down(queryRunner) {
12215
- debug20("migration: reverting audit events tables");
9173
+ debug21("migration: reverting audit events tables");
12216
9174
  const dbType = queryRunner.connection.driver.options.type;
12217
9175
  switch (dbType) {
12218
9176
  case "postgres": {
12219
- debug20("using postgres migration file");
9177
+ debug21("using postgres migration file");
12220
9178
  const mig = new CreateAuditEvents1701634812183();
12221
9179
  await mig.down(queryRunner);
12222
- debug20("Migration statements executed");
9180
+ debug21("Migration statements executed");
12223
9181
  return;
12224
9182
  }
12225
9183
  case "sqlite":
12226
9184
  case "expo":
12227
9185
  case "react-native": {
12228
- debug20("using sqlite/react-native migration file");
9186
+ debug21("using sqlite/react-native migration file");
12229
9187
  const mig = new CreateAuditEvents1701634819487();
12230
9188
  await mig.down(queryRunner);
12231
- debug20("Migration statements executed");
9189
+ debug21("Migration statements executed");
12232
9190
  return;
12233
9191
  }
12234
9192
  default:
@@ -12238,7 +9196,7 @@ var CreateAuditEvents1701635835330 = class {
12238
9196
  };
12239
9197
 
12240
9198
  // src/migrations/generic/6-CreateDigitalCredential.ts
12241
- import Debug21 from "debug";
9199
+ import Debug22 from "debug";
12242
9200
 
12243
9201
  // src/migrations/postgres/1708525189001-CreateDigitalCredential.ts
12244
9202
  var CreateDigitalCredential1708525189001 = class {
@@ -12346,30 +9304,30 @@ var CreateDigitalCredential1708525189002 = class {
12346
9304
  };
12347
9305
 
12348
9306
  // src/migrations/generic/6-CreateDigitalCredential.ts
12349
- var debug21 = Debug21("sphereon:ssi-sdk:migrations");
9307
+ var debug22 = Debug22("sphereon:ssi-sdk:migrations");
12350
9308
  var CreateDigitalCredential1708525189000 = class {
12351
9309
  static {
12352
9310
  __name(this, "CreateDigitalCredential1708525189000");
12353
9311
  }
12354
9312
  name = "CreateDigitalCredential1708525189000";
12355
9313
  async up(queryRunner) {
12356
- debug21("migration: creating DigitalCredential tables");
9314
+ debug22("migration: creating DigitalCredential tables");
12357
9315
  const dbType = queryRunner.connection.driver.options.type;
12358
9316
  switch (dbType) {
12359
9317
  case "postgres": {
12360
- debug21("using postgres migration file for DigitalCredential");
9318
+ debug22("using postgres migration file for DigitalCredential");
12361
9319
  const mig = new CreateDigitalCredential1708525189001();
12362
9320
  await mig.up(queryRunner);
12363
- debug21("Postgres Migration statements for DigitalCredential executed");
9321
+ debug22("Postgres Migration statements for DigitalCredential executed");
12364
9322
  return;
12365
9323
  }
12366
9324
  case "sqlite":
12367
9325
  case "expo":
12368
9326
  case "react-native": {
12369
- debug21("using sqlite/react-native migration file for DigitalCredential");
9327
+ debug22("using sqlite/react-native migration file for DigitalCredential");
12370
9328
  const mig = new CreateDigitalCredential1708525189002();
12371
9329
  await mig.up(queryRunner);
12372
- debug21("SQLite Migration statements for DigitalCredential executed");
9330
+ debug22("SQLite Migration statements for DigitalCredential executed");
12373
9331
  return;
12374
9332
  }
12375
9333
  default:
@@ -12377,23 +9335,23 @@ var CreateDigitalCredential1708525189000 = class {
12377
9335
  }
12378
9336
  }
12379
9337
  async down(queryRunner) {
12380
- debug21("migration: reverting DigitalCredential tables");
9338
+ debug22("migration: reverting DigitalCredential tables");
12381
9339
  const dbType = queryRunner.connection.driver.options.type;
12382
9340
  switch (dbType) {
12383
9341
  case "postgres": {
12384
- debug21("using postgres migration file for DigitalCredential");
9342
+ debug22("using postgres migration file for DigitalCredential");
12385
9343
  const mig = new CreateDigitalCredential1708525189001();
12386
9344
  await mig.down(queryRunner);
12387
- debug21("Postgres Migration statements for DigitalCredential reverted");
9345
+ debug22("Postgres Migration statements for DigitalCredential reverted");
12388
9346
  return;
12389
9347
  }
12390
9348
  case "sqlite":
12391
9349
  case "expo":
12392
9350
  case "react-native": {
12393
- debug21("using sqlite/react-native migration file for DigitalCredential");
9351
+ debug22("using sqlite/react-native migration file for DigitalCredential");
12394
9352
  const mig = new CreateDigitalCredential1708525189002();
12395
9353
  await mig.down(queryRunner);
12396
- debug21("SQLite Migration statements for DigitalCredential reverted");
9354
+ debug22("SQLite Migration statements for DigitalCredential reverted");
12397
9355
  return;
12398
9356
  }
12399
9357
  default:
@@ -12403,7 +9361,7 @@ var CreateDigitalCredential1708525189000 = class {
12403
9361
  };
12404
9362
 
12405
9363
  // src/migrations/generic/7-CreateMachineStateStore.ts
12406
- import Debug22 from "debug";
9364
+ import Debug23 from "debug";
12407
9365
 
12408
9366
  // src/migrations/postgres/1708797018115-CreateMachineStateStore.ts
12409
9367
  var CreateMachineStateStore1708797018115 = class {
@@ -12465,30 +9423,30 @@ var CreateMachineStateStore1708796002272 = class {
12465
9423
  };
12466
9424
 
12467
9425
  // src/migrations/generic/7-CreateMachineStateStore.ts
12468
- var debug22 = Debug22("sphereon:ssi-sdk:migrations");
9426
+ var debug23 = Debug23("sphereon:ssi-sdk:migrations");
12469
9427
  var CreateMachineStateStore1708098041262 = class {
12470
9428
  static {
12471
9429
  __name(this, "CreateMachineStateStore1708098041262");
12472
9430
  }
12473
9431
  name = "CreateMachineStateStore1708098041262";
12474
9432
  async up(queryRunner) {
12475
- debug22("migration: creating machine state tables");
9433
+ debug23("migration: creating machine state tables");
12476
9434
  const dbType = queryRunner.connection.driver.options.type;
12477
9435
  switch (dbType) {
12478
9436
  case "postgres": {
12479
- debug22("using postgres migration file");
9437
+ debug23("using postgres migration file");
12480
9438
  const mig = new CreateMachineStateStore1708797018115();
12481
9439
  await mig.up(queryRunner);
12482
- debug22("Migration statements executed");
9440
+ debug23("Migration statements executed");
12483
9441
  return;
12484
9442
  }
12485
9443
  case "sqlite":
12486
9444
  case "expo":
12487
9445
  case "react-native": {
12488
- debug22("using sqlite/react-native migration file");
9446
+ debug23("using sqlite/react-native migration file");
12489
9447
  const mig = new CreateMachineStateStore1708796002272();
12490
9448
  await mig.up(queryRunner);
12491
- debug22("Migration statements executed");
9449
+ debug23("Migration statements executed");
12492
9450
  return;
12493
9451
  }
12494
9452
  default:
@@ -12496,23 +9454,23 @@ var CreateMachineStateStore1708098041262 = class {
12496
9454
  }
12497
9455
  }
12498
9456
  async down(queryRunner) {
12499
- debug22("migration: reverting machine state tables");
9457
+ debug23("migration: reverting machine state tables");
12500
9458
  const dbType = queryRunner.connection.driver.options.type;
12501
9459
  switch (dbType) {
12502
9460
  case "postgres": {
12503
- debug22("using postgres migration file");
9461
+ debug23("using postgres migration file");
12504
9462
  const mig = new CreateMachineStateStore1708797018115();
12505
9463
  await mig.down(queryRunner);
12506
- debug22("Migration statements executed");
9464
+ debug23("Migration statements executed");
12507
9465
  return;
12508
9466
  }
12509
9467
  case "sqlite":
12510
9468
  case "expo":
12511
9469
  case "react-native": {
12512
- debug22("using sqlite/react-native migration file");
9470
+ debug23("using sqlite/react-native migration file");
12513
9471
  const mig = new CreateMachineStateStore1708796002272();
12514
9472
  await mig.down(queryRunner);
12515
- debug22("Migration statements executed");
9473
+ debug23("Migration statements executed");
12516
9474
  return;
12517
9475
  }
12518
9476
  default:
@@ -12522,7 +9480,7 @@ var CreateMachineStateStore1708098041262 = class {
12522
9480
  };
12523
9481
 
12524
9482
  // src/migrations/generic/8-CreateContacts.ts
12525
- import Debug23 from "debug";
9483
+ import Debug24 from "debug";
12526
9484
 
12527
9485
  // src/migrations/postgres/1710438363001-CreateContacts.ts
12528
9486
  var CreateContacts1710438363001 = class {
@@ -12636,30 +9594,30 @@ var CreateContacts1710438363002 = class {
12636
9594
  };
12637
9595
 
12638
9596
  // src/migrations/generic/8-CreateContacts.ts
12639
- var debug23 = Debug23("sphereon:ssi-sdk:migrations");
9597
+ var debug24 = Debug24("sphereon:ssi-sdk:migrations");
12640
9598
  var CreateContacts1708525189000 = class {
12641
9599
  static {
12642
9600
  __name(this, "CreateContacts1708525189000");
12643
9601
  }
12644
9602
  name = "CreateContacts1708525189000";
12645
9603
  async up(queryRunner) {
12646
- debug23("migration: updating contact tables");
9604
+ debug24("migration: updating contact tables");
12647
9605
  const dbType = queryRunner.connection.driver.options.type;
12648
9606
  switch (dbType) {
12649
9607
  case "postgres": {
12650
- debug23("using postgres migration file");
9608
+ debug24("using postgres migration file");
12651
9609
  const mig = new CreateContacts1710438363001();
12652
9610
  await mig.up(queryRunner);
12653
- debug23("Migration statements executed");
9611
+ debug24("Migration statements executed");
12654
9612
  return;
12655
9613
  }
12656
9614
  case "sqlite":
12657
9615
  case "expo":
12658
9616
  case "react-native": {
12659
- debug23("using sqlite/react-native migration file");
9617
+ debug24("using sqlite/react-native migration file");
12660
9618
  const mig = new CreateContacts1710438363002();
12661
9619
  await mig.up(queryRunner);
12662
- debug23("Migration statements executed");
9620
+ debug24("Migration statements executed");
12663
9621
  return;
12664
9622
  }
12665
9623
  default:
@@ -12667,23 +9625,23 @@ var CreateContacts1708525189000 = class {
12667
9625
  }
12668
9626
  }
12669
9627
  async down(queryRunner) {
12670
- debug23("migration: reverting machine state tables");
9628
+ debug24("migration: reverting machine state tables");
12671
9629
  const dbType = queryRunner.connection.driver.options.type;
12672
9630
  switch (dbType) {
12673
9631
  case "postgres": {
12674
- debug23("using postgres migration file");
9632
+ debug24("using postgres migration file");
12675
9633
  const mig = new CreateContacts1710438363001();
12676
9634
  await mig.down(queryRunner);
12677
- debug23("Migration statements executed");
9635
+ debug24("Migration statements executed");
12678
9636
  return;
12679
9637
  }
12680
9638
  case "sqlite":
12681
9639
  case "expo":
12682
9640
  case "react-native": {
12683
- debug23("using sqlite/react-native migration file");
9641
+ debug24("using sqlite/react-native migration file");
12684
9642
  const mig = new CreateContacts1710438363002();
12685
9643
  await mig.down(queryRunner);
12686
- debug23("Migration statements executed");
9644
+ debug24("Migration statements executed");
12687
9645
  return;
12688
9646
  }
12689
9647
  default:
@@ -12693,7 +9651,7 @@ var CreateContacts1708525189000 = class {
12693
9651
  };
12694
9652
 
12695
9653
  // src/migrations/generic/9-CreateContacts.ts
12696
- import Debug24 from "debug";
9654
+ import Debug25 from "debug";
12697
9655
 
12698
9656
  // src/migrations/postgres/1715761125001-CreateContacts.ts
12699
9657
  var CreateContacts1715761125001 = class {
@@ -12805,30 +9763,30 @@ var CreateContacts1715761125002 = class {
12805
9763
  };
12806
9764
 
12807
9765
  // src/migrations/generic/9-CreateContacts.ts
12808
- var debug24 = Debug24("sphereon:ssi-sdk:migrations");
9766
+ var debug25 = Debug25("sphereon:ssi-sdk:migrations");
12809
9767
  var CreateContacts1715761125000 = class {
12810
9768
  static {
12811
9769
  __name(this, "CreateContacts1715761125000");
12812
9770
  }
12813
9771
  name = "CreateContacts1715761125000";
12814
9772
  async up(queryRunner) {
12815
- debug24("migration: updating contact tables");
9773
+ debug25("migration: updating contact tables");
12816
9774
  const dbType = queryRunner.connection.driver.options.type;
12817
9775
  switch (dbType) {
12818
9776
  case "postgres": {
12819
- debug24("using postgres migration file");
9777
+ debug25("using postgres migration file");
12820
9778
  const mig = new CreateContacts1715761125001();
12821
9779
  await mig.up(queryRunner);
12822
- debug24("Migration statements executed");
9780
+ debug25("Migration statements executed");
12823
9781
  return;
12824
9782
  }
12825
9783
  case "sqlite":
12826
9784
  case "expo":
12827
9785
  case "react-native": {
12828
- debug24("using sqlite/react-native migration file");
9786
+ debug25("using sqlite/react-native migration file");
12829
9787
  const mig = new CreateContacts1715761125002();
12830
9788
  await mig.up(queryRunner);
12831
- debug24("Migration statements executed");
9789
+ debug25("Migration statements executed");
12832
9790
  return;
12833
9791
  }
12834
9792
  default:
@@ -12836,23 +9794,23 @@ var CreateContacts1715761125000 = class {
12836
9794
  }
12837
9795
  }
12838
9796
  async down(queryRunner) {
12839
- debug24("migration: reverting machine state tables");
9797
+ debug25("migration: reverting machine state tables");
12840
9798
  const dbType = queryRunner.connection.driver.options.type;
12841
9799
  switch (dbType) {
12842
9800
  case "postgres": {
12843
- debug24("using postgres migration file");
9801
+ debug25("using postgres migration file");
12844
9802
  const mig = new CreateContacts1715761125001();
12845
9803
  await mig.down(queryRunner);
12846
- debug24("Migration statements executed");
9804
+ debug25("Migration statements executed");
12847
9805
  return;
12848
9806
  }
12849
9807
  case "sqlite":
12850
9808
  case "expo":
12851
9809
  case "react-native": {
12852
- debug24("using sqlite/react-native migration file");
9810
+ debug25("using sqlite/react-native migration file");
12853
9811
  const mig = new CreateContacts1715761125002();
12854
9812
  await mig.down(queryRunner);
12855
- debug24("Migration statements executed");
9813
+ debug25("Migration statements executed");
12856
9814
  return;
12857
9815
  }
12858
9816
  default:
@@ -12870,7 +9828,8 @@ var DataStoreContactMigrations = [
12870
9828
  ];
12871
9829
  var DataStoreIssuanceBrandingMigrations = [
12872
9830
  CreateIssuanceBranding1659463079429,
12873
- FixCredentialClaimsReferencesUuid1741895822987
9831
+ FixCredentialClaimsReferencesUuid1741895822987,
9832
+ AddBrandingState1766000000000
12874
9833
  ];
12875
9834
  var DataStoreStatusListMigrations = [
12876
9835
  CreateStatusList1693866470000,
@@ -12905,7 +9864,7 @@ var DataStoreMigrations = [
12905
9864
  ...DataStoreServiceMigrations
12906
9865
  ];
12907
9866
  var DataStoreMigrationsWithVeramo = [
12908
- ...import_data_store.migrations,
9867
+ ...VeramoDataStoreMigrations,
12909
9868
  ...DataStoreMigrations
12910
9869
  ];
12911
9870
 
@@ -13138,11 +10097,9 @@ var DataStoreEntities = [
13138
10097
  ...DataStorePresentationDefinitionEntities
13139
10098
  ];
13140
10099
  var DataStoreEntitiesWithVeramo = [
13141
- ...import_data_store2.Entities,
10100
+ ...VeramoDataStoreEntities2,
13142
10101
  ...DataStoreEntities
13143
10102
  ];
13144
- var export_VeramoDataStoreEntities = import_data_store.Entities;
13145
- var export_VeramoDataStoreMigrations = import_data_store.migrations;
13146
10103
  export {
13147
10104
  AbstractEventLoggerStore2 as AbstractEventLoggerStore,
13148
10105
  AuditEventEntity,
@@ -13205,8 +10162,8 @@ export {
13205
10162
  StatusListEntryEntity,
13206
10163
  StatusListStore,
13207
10164
  TextAttributesEntity,
13208
- export_VeramoDataStoreEntities as VeramoDataStoreEntities,
13209
- export_VeramoDataStoreMigrations as VeramoDataStoreMigrations,
10165
+ VeramoDataStoreEntities,
10166
+ VeramoDataStoreMigrations,
13210
10167
  activityEventEntityFrom,
13211
10168
  activityEventFrom,
13212
10169
  auditEventEntityFrom,
@@ -13224,6 +10181,7 @@ export {
13224
10181
  credentialBrandingFrom,
13225
10182
  credentialClaimsEntityFrom,
13226
10183
  credentialLocaleBrandingEntityFrom,
10184
+ credentialLocaleBrandingFromEntity,
13227
10185
  dcqlQueryEntityItemFrom,
13228
10186
  dcqlQueryItemFrom,
13229
10187
  didAuthConfigEntityFrom,