@sphereon/ssi-sdk.data-store 0.36.1-next.119 → 0.36.1-next.149

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.
Files changed (28) hide show
  1. package/dist/index.cjs +669 -107
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +21 -1
  4. package/dist/index.d.ts +21 -1
  5. package/dist/index.js +686 -122
  6. package/dist/index.js.map +1 -1
  7. package/package.json +9 -8
  8. package/src/__tests__/contact.entities.test.ts +3 -3
  9. package/src/__tests__/contact.store.test.ts +3 -3
  10. package/src/__tests__/issuanceBranding.entities.test.ts +5 -5
  11. package/src/__tests__/issuanceBranding.store.test.ts +314 -4
  12. package/src/contact/ContactStore.ts +51 -4
  13. package/src/entities/issuanceBranding/CredentialBrandingEntity.ts +44 -1
  14. package/src/entities/issuanceBranding/CredentialLocaleBrandingEntity.ts +64 -1
  15. package/src/entities/issuanceBranding/IssuerLocaleBrandingEntity.ts +63 -1
  16. package/src/index.ts +12 -0
  17. package/src/issuanceBranding/IssuanceBrandingStore.ts +45 -6
  18. package/src/migrations/generic/15-AddBrandingState.ts +64 -0
  19. package/src/migrations/generic/15-AddServiceMetadata.ts +66 -0
  20. package/src/migrations/generic/index.ts +21 -1
  21. package/src/migrations/index.ts +4 -0
  22. package/src/migrations/postgres/1764000000001-AddServiceMetadata.ts +44 -0
  23. package/src/migrations/postgres/1766000000000-AddBrandingState.ts +15 -0
  24. package/src/migrations/sqlite/1764000000002-AddServiceMetadata.ts +41 -0
  25. package/src/migrations/sqlite/1766000000000-AddBrandingState.ts +87 -0
  26. package/src/utils/issuanceBranding/HashUtils.ts +30 -0
  27. package/src/utils/issuanceBranding/MappingUtils.ts +21 -1
  28. package/src/utils/presentationDefinition/MappingUtils.ts +5 -2
package/dist/index.cjs CHANGED
@@ -51,6 +51,7 @@ __export(index_exports, {
51
51
  DataStoreDigitalCredentialEntities: () => DataStoreDigitalCredentialEntities,
52
52
  DataStoreDigitalCredentialMigrations: () => DataStoreDigitalCredentialMigrations,
53
53
  DataStoreEntities: () => DataStoreEntities,
54
+ DataStoreEntitiesWithVeramo: () => DataStoreEntitiesWithVeramo,
54
55
  DataStoreEventLoggerEntities: () => DataStoreEventLoggerEntities,
55
56
  DataStoreEventLoggerMigrations: () => DataStoreEventLoggerMigrations,
56
57
  DataStoreIssuanceBrandingEntities: () => DataStoreIssuanceBrandingEntities,
@@ -58,9 +59,11 @@ __export(index_exports, {
58
59
  DataStoreMachineStateEntities: () => DataStoreMachineStateEntities,
59
60
  DataStoreMachineStateMigrations: () => DataStoreMachineStateMigrations,
60
61
  DataStoreMigrations: () => DataStoreMigrations,
62
+ DataStoreMigrationsWithVeramo: () => DataStoreMigrationsWithVeramo,
61
63
  DataStoreOid4vcStateEntities: () => DataStoreOid4vcStateEntities,
62
64
  DataStorePresentationDefinitionEntities: () => DataStorePresentationDefinitionEntities,
63
65
  DataStorePresentationDefinitionMigrations: () => DataStorePresentationDefinitionMigrations,
66
+ DataStoreServiceMigrations: () => DataStoreServiceMigrations,
64
67
  DataStoreStatusListEntities: () => DataStoreStatusListEntities,
65
68
  DataStoreStatusListMigrations: () => DataStoreStatusListMigrations,
66
69
  DcqlQueryItemEntity: () => DcqlQueryItemEntity,
@@ -89,6 +92,8 @@ __export(index_exports, {
89
92
  StatusListEntryEntity: () => StatusListEntryEntity,
90
93
  StatusListStore: () => StatusListStore,
91
94
  TextAttributesEntity: () => TextAttributesEntity,
95
+ VeramoDataStoreEntities: () => import_data_store.Entities,
96
+ VeramoDataStoreMigrations: () => import_data_store.migrations,
92
97
  activityEventEntityFrom: () => activityEventEntityFrom,
93
98
  activityEventFrom: () => activityEventFrom,
94
99
  auditEventEntityFrom: () => auditEventEntityFrom,
@@ -106,6 +111,7 @@ __export(index_exports, {
106
111
  credentialBrandingFrom: () => credentialBrandingFrom,
107
112
  credentialClaimsEntityFrom: () => credentialClaimsEntityFrom,
108
113
  credentialLocaleBrandingEntityFrom: () => credentialLocaleBrandingEntityFrom,
114
+ credentialLocaleBrandingFromEntity: () => credentialLocaleBrandingFromEntity,
109
115
  dcqlQueryEntityItemFrom: () => dcqlQueryEntityItemFrom,
110
116
  dcqlQueryItemFrom: () => dcqlQueryItemFrom,
111
117
  didAuthConfigEntityFrom: () => didAuthConfigEntityFrom,
@@ -152,6 +158,7 @@ __export(index_exports, {
152
158
  textAttributesEntityFrom: () => textAttributesEntityFrom
153
159
  });
154
160
  module.exports = __toCommonJS(index_exports);
161
+ var import_data_store2 = require("@veramo/data-store");
155
162
 
156
163
  // src/entities/contact/BaseConfigEntity.ts
157
164
  var import_typeorm12 = require("typeorm");
@@ -3028,6 +3035,19 @@ var import_typeorm26 = require("typeorm");
3028
3035
  // src/entities/issuanceBranding/CredentialLocaleBrandingEntity.ts
3029
3036
  var import_typeorm25 = require("typeorm");
3030
3037
 
3038
+ // src/utils/issuanceBranding/HashUtils.ts
3039
+ var FNV_PRIME = 0x100000001b3n;
3040
+ var OFFSET_BASIS = 0xcbf29ce484222325n;
3041
+ function computeCompactHash(input) {
3042
+ let hash = OFFSET_BASIS;
3043
+ for (let i = 0; i < input.length; i++) {
3044
+ hash ^= BigInt(input.charCodeAt(i));
3045
+ hash = hash * FNV_PRIME & 0xffffffffffffffffn;
3046
+ }
3047
+ return hash.toString(36);
3048
+ }
3049
+ __name(computeCompactHash, "computeCompactHash");
3050
+
3031
3051
  // src/entities/issuanceBranding/CredentialClaimsEntity.ts
3032
3052
  var import_class_validator16 = require("class-validator");
3033
3053
  var import_typeorm24 = require("typeorm");
@@ -3132,6 +3152,10 @@ var CredentialLocaleBrandingEntity = class extends BaseLocaleBrandingEntity {
3132
3152
  credentialBranding;
3133
3153
  claims;
3134
3154
  credentialBrandingId;
3155
+ state;
3156
+ setState() {
3157
+ this.state = computeCredentialLocaleBrandingState(this);
3158
+ }
3135
3159
  };
3136
3160
  _ts_decorate26([
3137
3161
  (0, import_typeorm25.ManyToOne)(() => CredentialBrandingEntity, (credentialBranding) => credentialBranding.localeBranding, {
@@ -3161,6 +3185,21 @@ _ts_decorate26([
3161
3185
  }),
3162
3186
  _ts_metadata25("design:type", String)
3163
3187
  ], CredentialLocaleBrandingEntity.prototype, "credentialBrandingId", void 0);
3188
+ _ts_decorate26([
3189
+ (0, import_typeorm25.Column)("varchar", {
3190
+ name: "state",
3191
+ length: 255,
3192
+ nullable: false
3193
+ }),
3194
+ _ts_metadata25("design:type", String)
3195
+ ], CredentialLocaleBrandingEntity.prototype, "state", void 0);
3196
+ _ts_decorate26([
3197
+ (0, import_typeorm25.BeforeInsert)(),
3198
+ (0, import_typeorm25.BeforeUpdate)(),
3199
+ _ts_metadata25("design:type", Function),
3200
+ _ts_metadata25("design:paramtypes", []),
3201
+ _ts_metadata25("design:returntype", void 0)
3202
+ ], CredentialLocaleBrandingEntity.prototype, "setState", null);
3164
3203
  CredentialLocaleBrandingEntity = _ts_decorate26([
3165
3204
  (0, import_typeorm25.ChildEntity)("CredentialLocaleBranding"),
3166
3205
  (0, import_typeorm25.Index)("IDX_CredentialLocaleBrandingEntity_credentialBranding_locale", [
@@ -3170,6 +3209,45 @@ CredentialLocaleBrandingEntity = _ts_decorate26([
3170
3209
  unique: true
3171
3210
  })
3172
3211
  ], CredentialLocaleBrandingEntity);
3212
+ var computeCredentialLocaleBrandingState = /* @__PURE__ */ __name((localeBranding) => {
3213
+ const sortedClaims = (localeBranding.claims ?? []).map((claim) => ({
3214
+ key: claim.key,
3215
+ name: claim.name
3216
+ })).sort((first, second) => first.key.localeCompare(second.key));
3217
+ const payload = {
3218
+ alias: localeBranding.alias ?? null,
3219
+ locale: localeBranding.locale ?? null,
3220
+ description: localeBranding.description ?? null,
3221
+ logo: localeBranding.logo ? {
3222
+ uri: localeBranding.logo.uri ?? null,
3223
+ dataUri: localeBranding.logo.dataUri ?? null,
3224
+ mediaType: localeBranding.logo.mediaType ?? null,
3225
+ alt: localeBranding.logo.alt ?? null,
3226
+ dimensions: localeBranding.logo.dimensions ? {
3227
+ width: localeBranding.logo.dimensions.width,
3228
+ height: localeBranding.logo.dimensions.height
3229
+ } : null
3230
+ } : null,
3231
+ background: localeBranding.background ? {
3232
+ color: localeBranding.background.color ?? null,
3233
+ image: localeBranding.background.image ? {
3234
+ uri: localeBranding.background.image.uri ?? null,
3235
+ dataUri: localeBranding.background.image.dataUri ?? null,
3236
+ mediaType: localeBranding.background.image.mediaType ?? null,
3237
+ alt: localeBranding.background.image.alt ?? null,
3238
+ dimensions: localeBranding.background.image.dimensions ? {
3239
+ width: localeBranding.background.image.dimensions.width,
3240
+ height: localeBranding.background.image.dimensions.height
3241
+ } : null
3242
+ } : null
3243
+ } : null,
3244
+ text: localeBranding.text ? {
3245
+ color: localeBranding.text.color ?? null
3246
+ } : null,
3247
+ claims: sortedClaims
3248
+ };
3249
+ return computeCompactHash(JSON.stringify(payload));
3250
+ }, "computeCredentialLocaleBrandingState");
3173
3251
 
3174
3252
  // src/entities/issuanceBranding/CredentialBrandingEntity.ts
3175
3253
  function _ts_decorate27(decorators, target, key, desc) {
@@ -3190,6 +3268,7 @@ var CredentialBrandingEntity = class extends import_typeorm26.BaseEntity {
3190
3268
  id;
3191
3269
  vcHash;
3192
3270
  issuerCorrelationId;
3271
+ state;
3193
3272
  localeBranding;
3194
3273
  createdAt;
3195
3274
  lastUpdatedAt;
@@ -3197,6 +3276,11 @@ var CredentialBrandingEntity = class extends import_typeorm26.BaseEntity {
3197
3276
  updateUpdatedDate() {
3198
3277
  this.lastUpdatedAt = /* @__PURE__ */ new Date();
3199
3278
  }
3279
+ setState() {
3280
+ if (this.localeBranding && Array.isArray(this.localeBranding)) {
3281
+ this.state = this.computeState();
3282
+ }
3283
+ }
3200
3284
  async validate() {
3201
3285
  const validation = await (0, import_class_validator17.validate)(this);
3202
3286
  if (validation.length > 0) {
@@ -3204,6 +3288,31 @@ var CredentialBrandingEntity = class extends import_typeorm26.BaseEntity {
3204
3288
  }
3205
3289
  return;
3206
3290
  }
3291
+ computeState() {
3292
+ const localeStates = (this.localeBranding ?? []).map((localeBranding) => ({
3293
+ locale: localeBranding.locale ?? "",
3294
+ alias: localeBranding.alias ?? "",
3295
+ id: localeBranding.id ?? "",
3296
+ state: computeCredentialLocaleBrandingState(localeBranding)
3297
+ }));
3298
+ localeStates.sort((first, second) => {
3299
+ const localeCompare = first.locale.localeCompare(second.locale);
3300
+ if (localeCompare !== 0) {
3301
+ return localeCompare;
3302
+ }
3303
+ const aliasCompare = first.alias.localeCompare(second.alias);
3304
+ if (aliasCompare !== 0) {
3305
+ return aliasCompare;
3306
+ }
3307
+ return first.id.localeCompare(second.id);
3308
+ });
3309
+ const payload = {
3310
+ issuerCorrelationId: this.issuerCorrelationId,
3311
+ vcHash: this.vcHash,
3312
+ localeBranding: localeStates.map((entry) => entry.state)
3313
+ };
3314
+ return computeCompactHash(JSON.stringify(payload));
3315
+ }
3207
3316
  };
3208
3317
  _ts_decorate27([
3209
3318
  (0, import_typeorm26.PrimaryGeneratedColumn)("uuid"),
@@ -3233,6 +3342,14 @@ _ts_decorate27([
3233
3342
  }),
3234
3343
  _ts_metadata26("design:type", String)
3235
3344
  ], CredentialBrandingEntity.prototype, "issuerCorrelationId", void 0);
3345
+ _ts_decorate27([
3346
+ (0, import_typeorm26.Column)("varchar", {
3347
+ name: "state",
3348
+ length: 255,
3349
+ nullable: false
3350
+ }),
3351
+ _ts_metadata26("design:type", String)
3352
+ ], CredentialBrandingEntity.prototype, "state", void 0);
3236
3353
  _ts_decorate27([
3237
3354
  (0, import_typeorm26.OneToMany)(() => CredentialLocaleBrandingEntity, (credentialLocaleBrandingEntity) => credentialLocaleBrandingEntity.credentialBranding, {
3238
3355
  cascade: true,
@@ -3268,6 +3385,13 @@ _ts_decorate27([
3268
3385
  _ts_metadata26("design:paramtypes", []),
3269
3386
  _ts_metadata26("design:returntype", void 0)
3270
3387
  ], CredentialBrandingEntity.prototype, "updateUpdatedDate", null);
3388
+ _ts_decorate27([
3389
+ (0, import_typeorm26.BeforeInsert)(),
3390
+ (0, import_typeorm26.BeforeUpdate)(),
3391
+ _ts_metadata26("design:type", Function),
3392
+ _ts_metadata26("design:paramtypes", []),
3393
+ _ts_metadata26("design:returntype", void 0)
3394
+ ], CredentialBrandingEntity.prototype, "setState", null);
3271
3395
  _ts_decorate27([
3272
3396
  (0, import_typeorm26.BeforeInsert)(),
3273
3397
  (0, import_typeorm26.BeforeUpdate)(),
@@ -3314,6 +3438,48 @@ var IssuerLocaleBrandingEntity = class extends BaseLocaleBrandingEntity {
3314
3438
  policyUri;
3315
3439
  contacts;
3316
3440
  issuerBrandingId;
3441
+ state;
3442
+ setState() {
3443
+ this.state = this.computeState();
3444
+ }
3445
+ computeState() {
3446
+ const payload = {
3447
+ alias: this.alias ?? null,
3448
+ locale: this.locale ?? null,
3449
+ description: this.description ?? null,
3450
+ clientUri: this.clientUri ?? null,
3451
+ tosUri: this.tosUri ?? null,
3452
+ policyUri: this.policyUri ?? null,
3453
+ contacts: this.contacts ?? null,
3454
+ logo: this.logo ? {
3455
+ uri: this.logo.uri ?? null,
3456
+ dataUri: this.logo.dataUri ?? null,
3457
+ mediaType: this.logo.mediaType ?? null,
3458
+ alt: this.logo.alt ?? null,
3459
+ dimensions: this.logo.dimensions ? {
3460
+ width: this.logo.dimensions.width,
3461
+ height: this.logo.dimensions.height
3462
+ } : null
3463
+ } : null,
3464
+ background: this.background ? {
3465
+ color: this.background.color ?? null,
3466
+ image: this.background.image ? {
3467
+ uri: this.background.image.uri ?? null,
3468
+ dataUri: this.background.image.dataUri ?? null,
3469
+ mediaType: this.background.image.mediaType ?? null,
3470
+ alt: this.background.image.alt ?? null,
3471
+ dimensions: this.background.image.dimensions ? {
3472
+ width: this.background.image.dimensions.width,
3473
+ height: this.background.image.dimensions.height
3474
+ } : null
3475
+ } : null
3476
+ } : null,
3477
+ text: this.text ? {
3478
+ color: this.text.color ?? null
3479
+ } : null
3480
+ };
3481
+ return computeCompactHash(JSON.stringify(payload));
3482
+ }
3317
3483
  };
3318
3484
  _ts_decorate28([
3319
3485
  (0, import_typeorm27.ManyToOne)(() => IssuerBrandingEntity, (issuerBranding) => issuerBranding.localeBranding, {
@@ -3372,6 +3538,21 @@ _ts_decorate28([
3372
3538
  }),
3373
3539
  _ts_metadata27("design:type", String)
3374
3540
  ], IssuerLocaleBrandingEntity.prototype, "issuerBrandingId", void 0);
3541
+ _ts_decorate28([
3542
+ (0, import_typeorm27.Column)("varchar", {
3543
+ name: "state",
3544
+ length: 255,
3545
+ nullable: false
3546
+ }),
3547
+ _ts_metadata27("design:type", String)
3548
+ ], IssuerLocaleBrandingEntity.prototype, "state", void 0);
3549
+ _ts_decorate28([
3550
+ (0, import_typeorm27.BeforeInsert)(),
3551
+ (0, import_typeorm27.BeforeUpdate)(),
3552
+ _ts_metadata27("design:type", Function),
3553
+ _ts_metadata27("design:paramtypes", []),
3554
+ _ts_metadata27("design:returntype", void 0)
3555
+ ], IssuerLocaleBrandingEntity.prototype, "setState", null);
3375
3556
  IssuerLocaleBrandingEntity = _ts_decorate28([
3376
3557
  (0, import_typeorm27.ChildEntity)("IssuerLocaleBranding"),
3377
3558
  (0, import_typeorm27.Index)("IDX_IssuerLocaleBrandingEntity_issuerBranding_locale", [
@@ -4806,10 +4987,19 @@ var ContactStore = class extends import_ssi_sdk25.AbstractContactStore {
4806
4987
  const result = await partyRepository.find({
4807
4988
  where: {
4808
4989
  id: (0, import_typeorm35.In)(initialResult.map((party) => party.id))
4809
- }
4990
+ },
4991
+ relations: [
4992
+ "contact"
4993
+ ]
4810
4994
  });
4811
4995
  debug(`getParties() resulted in ${result.length} parties`);
4812
- return result.map(partyFrom);
4996
+ return result.filter((party) => {
4997
+ if (!party.contact) {
4998
+ console.warn(`party ${party.id} does not have an associated contact`);
4999
+ return false;
5000
+ }
5001
+ return true;
5002
+ }).map(partyFrom);
4813
5003
  }, "getParties");
4814
5004
  addParty = /* @__PURE__ */ __name(async (args) => {
4815
5005
  const { identities, contact, partyType } = args;
@@ -4924,10 +5114,54 @@ var ContactStore = class extends import_ssi_sdk25.AbstractContactStore {
4924
5114
  return Promise.reject(Error(`Connection type ${identity.connection.type}, does not match for provided config`));
4925
5115
  }
4926
5116
  }
4927
- const identityEntity = identityEntityFrom(identity);
5117
+ const identityRepository = (await this.dbConnection).getRepository(IdentityEntity);
5118
+ const correlationIdentifierRepository = (await this.dbConnection).getRepository(CorrelationIdentifierEntity);
5119
+ const existingCorrelationIdentifier = await correlationIdentifierRepository.findOne({
5120
+ where: {
5121
+ correlationId: identity.identifier.correlationId
5122
+ }
5123
+ });
5124
+ if (existingCorrelationIdentifier) {
5125
+ const existingIdentity = await identityRepository.findOne({
5126
+ where: {
5127
+ identifier: {
5128
+ id: existingCorrelationIdentifier.id
5129
+ }
5130
+ }
5131
+ });
5132
+ if (existingIdentity) {
5133
+ debug("Identity with same correlationId already exists, returning existing identity", identity.identifier.correlationId);
5134
+ return identityFrom(existingIdentity);
5135
+ }
5136
+ }
5137
+ const existingAlias = await identityRepository.findOne({
5138
+ where: {
5139
+ alias: identity.alias
5140
+ }
5141
+ });
5142
+ let uniqueAlias = identity.alias;
5143
+ if (existingAlias) {
5144
+ let counter = 1;
5145
+ while (await identityRepository.findOne({
5146
+ where: {
5147
+ alias: `${identity.alias}_${counter}`
5148
+ }
5149
+ })) {
5150
+ counter++;
5151
+ }
5152
+ uniqueAlias = `${identity.alias}_${counter}`;
5153
+ debug("Alias collision detected, using unique alias", {
5154
+ original: identity.alias,
5155
+ unique: uniqueAlias
5156
+ });
5157
+ }
5158
+ const identityEntity = identityEntityFrom({
5159
+ ...identity,
5160
+ alias: uniqueAlias
5161
+ });
4928
5162
  identityEntity.party = party;
4929
5163
  debug("Adding identity", identity);
4930
- const result = await (await this.dbConnection).getRepository(IdentityEntity).save(identityEntity, {
5164
+ const result = await identityRepository.save(identityEntity, {
4931
5165
  transaction: true
4932
5166
  });
4933
5167
  return identityFrom(result);
@@ -5605,7 +5839,7 @@ var import_typeorm37 = require("typeorm");
5605
5839
  var credentialBrandingFrom = /* @__PURE__ */ __name((credentialBranding) => {
5606
5840
  const result = {
5607
5841
  ...credentialBranding,
5608
- localeBranding: credentialBranding.localeBranding.map((localeBranding) => localeBrandingFrom(localeBranding))
5842
+ localeBranding: credentialBranding.localeBranding.map((localeBranding) => credentialLocaleBrandingFromEntity(localeBranding))
5609
5843
  };
5610
5844
  return replaceNullWithUndefined(result);
5611
5845
  }, "credentialBrandingFrom");
@@ -5623,6 +5857,19 @@ var localeBrandingFrom = /* @__PURE__ */ __name((localeBranding) => {
5623
5857
  };
5624
5858
  return replaceNullWithUndefined(result);
5625
5859
  }, "localeBrandingFrom");
5860
+ var credentialLocaleBrandingFromEntity = /* @__PURE__ */ __name((localeBranding) => {
5861
+ const base = localeBrandingFrom(localeBranding);
5862
+ const result = {
5863
+ ...base,
5864
+ state: localeBranding.state,
5865
+ claims: localeBranding.claims ? localeBranding.claims.map((claim) => ({
5866
+ id: claim.id,
5867
+ key: claim.key,
5868
+ name: claim.name
5869
+ })) : void 0
5870
+ };
5871
+ return replaceNullWithUndefined(result);
5872
+ }, "credentialLocaleBrandingFromEntity");
5626
5873
  var issuerLocaleBrandingEntityFrom = /* @__PURE__ */ __name((args) => {
5627
5874
  const issuerLocaleBrandingEntity = new IssuerLocaleBrandingEntity();
5628
5875
  issuerLocaleBrandingEntity.alias = isEmptyString(args.alias) ? void 0 : args.alias;
@@ -5727,7 +5974,7 @@ var IssuanceBrandingStore = class extends import_ssi_sdk27.AbstractIssuanceBrand
5727
5974
  return credentialBrandingFrom(createdResult);
5728
5975
  }, "addCredentialBranding");
5729
5976
  getCredentialBranding = /* @__PURE__ */ __name(async (args) => {
5730
- const { filter } = args ?? {};
5977
+ const { filter, knownStates } = args ?? {};
5731
5978
  if (filter) {
5732
5979
  filter.forEach((filter2) => {
5733
5980
  if (filter2.localeBranding && "locale" in filter2.localeBranding && filter2.localeBranding.locale === void 0) {
@@ -5736,12 +5983,39 @@ var IssuanceBrandingStore = class extends import_ssi_sdk27.AbstractIssuanceBrand
5736
5983
  });
5737
5984
  }
5738
5985
  debug3("Getting credential branding", args);
5739
- const result = await (await this.dbConnection).getRepository(CredentialBrandingEntity).find({
5986
+ const repository = (await this.dbConnection).getRepository(CredentialBrandingEntity);
5987
+ if (knownStates && Object.keys(knownStates).length > 0) {
5988
+ const stateQuery = repository.createQueryBuilder("branding").select([
5989
+ "branding.id",
5990
+ "branding.state"
5991
+ ]);
5992
+ if (filter) {
5993
+ stateQuery.where(filter);
5994
+ }
5995
+ const stateResults = await stateQuery.getRawMany().then((rows) => rows.map((row) => ({
5996
+ id: row.branding_id,
5997
+ state: row.branding_state
5998
+ })));
5999
+ const dirtyIds = stateResults.filter((result3) => {
6000
+ const knownState = knownStates[result3.id];
6001
+ return !knownState || knownState !== result3.state;
6002
+ }).map((result3) => result3.id);
6003
+ if (dirtyIds.length === 0) {
6004
+ return [];
6005
+ }
6006
+ const result2 = await repository.find({
6007
+ where: {
6008
+ id: (0, import_typeorm37.In)(dirtyIds)
6009
+ }
6010
+ });
6011
+ return result2.map((branding) => credentialBrandingFrom(branding));
6012
+ }
6013
+ const result = await repository.find({
5740
6014
  ...filter && {
5741
6015
  where: filter
5742
6016
  }
5743
6017
  });
5744
- return result.map((credentialBranding) => credentialBrandingFrom(credentialBranding));
6018
+ return result.map((branding) => credentialBrandingFrom(branding));
5745
6019
  }, "getCredentialBranding");
5746
6020
  removeCredentialBranding = /* @__PURE__ */ __name(async (args) => {
5747
6021
  const { filter } = args;
@@ -5834,7 +6108,7 @@ var IssuanceBrandingStore = class extends import_ssi_sdk27.AbstractIssuanceBrand
5834
6108
  where: filter
5835
6109
  }
5836
6110
  });
5837
- return credentialBrandingLocale ? credentialBrandingLocale.map((credentialLocaleBranding) => localeBrandingFrom(credentialLocaleBranding)) : [];
6111
+ return credentialBrandingLocale ? credentialBrandingLocale.map((credentialLocaleBranding) => credentialLocaleBrandingFromEntity(credentialLocaleBranding)) : [];
5838
6112
  }, "getCredentialLocaleBranding");
5839
6113
  removeCredentialLocaleBranding = /* @__PURE__ */ __name(async (args) => {
5840
6114
  const { filter } = args;
@@ -6839,8 +7113,9 @@ var import_debug7 = __toESM(require("debug"), 1);
6839
7113
  var import_typeorm40 = require("typeorm");
6840
7114
 
6841
7115
  // src/utils/presentationDefinition/MappingUtils.ts
6842
- var blakepkg = __toESM(require("blakejs"), 1);
7116
+ var blakejs = __toESM(require("blakejs"), 1);
6843
7117
  var import_dcql = require("dcql");
7118
+ var blake = blakejs.default ?? blakejs;
6844
7119
  var dcqlQueryItemFrom = /* @__PURE__ */ __name((entity) => {
6845
7120
  const result = {
6846
7121
  id: entity.id,
@@ -6873,7 +7148,7 @@ var dcqlQueryEntityItemFrom = /* @__PURE__ */ __name((item) => {
6873
7148
  return entity;
6874
7149
  }, "dcqlQueryEntityItemFrom");
6875
7150
  function hashPayload(payload) {
6876
- return blakepkg.blake2bHex(JSON.stringify(payload));
7151
+ return blake.blake2bHex(JSON.stringify(payload));
6877
7152
  }
6878
7153
  __name(hashPayload, "hashPayload");
6879
7154
  function isPresentationDefinitionEqual(base, compare) {
@@ -7046,6 +7321,9 @@ var cleanFilter = /* @__PURE__ */ __name((filter) => {
7046
7321
  });
7047
7322
  }, "cleanFilter");
7048
7323
 
7324
+ // src/migrations/generic/index.ts
7325
+ var import_data_store = require("@veramo/data-store");
7326
+
7049
7327
  // src/migrations/generic/1-CreateContacts.ts
7050
7328
  var import_debug8 = __toESM(require("debug"), 1);
7051
7329
 
@@ -8094,21 +8372,113 @@ var AddLinkedVpFields1763387280000 = class {
8094
8372
  }
8095
8373
  };
8096
8374
 
8097
- // src/migrations/generic/2-CreateIssuanceBranding.ts
8375
+ // src/migrations/generic/15-AddBrandingState.ts
8098
8376
  var import_debug14 = __toESM(require("debug"), 1);
8377
+
8378
+ // src/migrations/postgres/1766000000000-AddBrandingState.ts
8379
+ var AddBrandingStatePostgres1766000000000 = class {
8380
+ static {
8381
+ __name(this, "AddBrandingStatePostgres1766000000000");
8382
+ }
8383
+ name = "AddBrandingState1766000000000";
8384
+ async up(queryRunner) {
8385
+ await queryRunner.query(`ALTER TABLE "CredentialBranding" ADD "state" character varying(255) NOT NULL DEFAULT ''`);
8386
+ await queryRunner.query(`ALTER TABLE "BaseLocaleBranding" ADD "state" character varying(255) NOT NULL DEFAULT ''`);
8387
+ }
8388
+ async down(queryRunner) {
8389
+ await queryRunner.query(`ALTER TABLE "BaseLocaleBranding" DROP COLUMN "state"`);
8390
+ await queryRunner.query(`ALTER TABLE "CredentialBranding" DROP COLUMN "state"`);
8391
+ }
8392
+ };
8393
+
8394
+ // src/migrations/sqlite/1766000000000-AddBrandingState.ts
8395
+ var AddBrandingStateSqlite1766000000000 = class {
8396
+ static {
8397
+ __name(this, "AddBrandingStateSqlite1766000000000");
8398
+ }
8399
+ name = "AddBrandingState1766000000000";
8400
+ async up(queryRunner) {
8401
+ await queryRunner.query(`ALTER TABLE "CredentialBranding" ADD COLUMN "state" varchar(255) NOT NULL DEFAULT ''`);
8402
+ await queryRunner.query(`ALTER TABLE "BaseLocaleBranding" ADD COLUMN "state" varchar(255) NOT NULL DEFAULT ''`);
8403
+ }
8404
+ async down(queryRunner) {
8405
+ await queryRunner.query(`PRAGMA foreign_keys = OFF`);
8406
+ await queryRunner.query(`
8407
+ CREATE TABLE "CredentialBranding_old"
8408
+ (
8409
+ "id" varchar PRIMARY KEY NOT NULL,
8410
+ "vcHash" varchar(255) NOT NULL,
8411
+ "issuerCorrelationId" varchar(255) NOT NULL,
8412
+ "created_at" datetime NOT NULL DEFAULT (datetime('now')),
8413
+ "last_updated_at" datetime NOT NULL DEFAULT (datetime('now'))
8414
+ )
8415
+ `);
8416
+ await queryRunner.query(`
8417
+ INSERT INTO "CredentialBranding_old" ("id", "vcHash", "issuerCorrelationId", "created_at", "last_updated_at")
8418
+ SELECT "id", "vcHash", "issuerCorrelationId", "created_at", "last_updated_at"
8419
+ FROM "CredentialBranding"
8420
+ `);
8421
+ await queryRunner.query(`DROP TABLE "CredentialBranding"`);
8422
+ await queryRunner.query(`ALTER TABLE "CredentialBranding_old" RENAME TO "CredentialBranding"`);
8423
+ await queryRunner.query(`CREATE INDEX "IDX_CredentialBrandingEntity_issuerCorrelationId" ON "CredentialBranding" ("issuerCorrelationId")`);
8424
+ await queryRunner.query(`CREATE INDEX "IDX_CredentialBrandingEntity_vcHash" ON "CredentialBranding" ("vcHash")`);
8425
+ await queryRunner.query(`
8426
+ CREATE TABLE "BaseLocaleBranding_old"
8427
+ (
8428
+ "id" varchar PRIMARY KEY NOT NULL,
8429
+ "alias" varchar(255),
8430
+ "locale" varchar(255) NOT NULL,
8431
+ "description" varchar(255),
8432
+ "created_at" datetime NOT NULL DEFAULT (datetime('now')),
8433
+ "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')),
8434
+ "credentialBrandingId" varchar,
8435
+ "issuerBrandingId" varchar,
8436
+ "type" varchar NOT NULL,
8437
+ "logoId" varchar,
8438
+ "backgroundId" varchar,
8439
+ "textId" varchar,
8440
+ "client_uri" varchar,
8441
+ "tos_uri" varchar,
8442
+ "policy_uri" varchar,
8443
+ "contacts" varchar,
8444
+ CONSTRAINT "UQ_logoId" UNIQUE ("logoId"),
8445
+ CONSTRAINT "UQ_backgroundId" UNIQUE ("backgroundId"),
8446
+ CONSTRAINT "UQ_textId" UNIQUE ("textId"),
8447
+ CONSTRAINT "FK_BaseLocaleBranding_logoId" FOREIGN KEY ("logoId") REFERENCES "ImageAttributes" ("id") ON DELETE CASCADE ON UPDATE NO ACTION,
8448
+ CONSTRAINT "FK_BaseLocaleBranding_backgroundId" FOREIGN KEY ("backgroundId") REFERENCES "BackgroundAttributes" ("id") ON DELETE CASCADE ON UPDATE NO ACTION,
8449
+ CONSTRAINT "FK_BaseLocaleBranding_textId" FOREIGN KEY ("textId") REFERENCES "TextAttributes" ("id") ON DELETE CASCADE ON UPDATE NO ACTION,
8450
+ CONSTRAINT "FK_BaseLocaleBranding_credentialBrandingId" FOREIGN KEY ("credentialBrandingId") REFERENCES "CredentialBranding" ("id") ON DELETE CASCADE ON UPDATE NO ACTION,
8451
+ CONSTRAINT "FK_BaseLocaleBranding_issuerBrandingId" FOREIGN KEY ("issuerBrandingId") REFERENCES "IssuerBranding" ("id") ON DELETE CASCADE ON UPDATE NO ACTION
8452
+ )
8453
+ `);
8454
+ await queryRunner.query(`
8455
+ 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")
8456
+ SELECT "id", "alias", "locale", "description", "created_at", "last_updated_at", "credentialBrandingId", "issuerBrandingId", "type", "logoId", "backgroundId", "textId", "client_uri", "tos_uri", "policy_uri", "contacts"
8457
+ FROM "BaseLocaleBranding"
8458
+ `);
8459
+ await queryRunner.query(`DROP TABLE "BaseLocaleBranding"`);
8460
+ await queryRunner.query(`ALTER TABLE "BaseLocaleBranding_old" RENAME TO "BaseLocaleBranding"`);
8461
+ await queryRunner.query(`CREATE UNIQUE INDEX "IDX_CredentialLocaleBrandingEntity_credentialBranding_locale" ON "BaseLocaleBranding" ("credentialBrandingId", "locale")`);
8462
+ await queryRunner.query(`CREATE UNIQUE INDEX "IDX_IssuerLocaleBrandingEntity_issuerBranding_locale" ON "BaseLocaleBranding" ("issuerBrandingId", "locale")`);
8463
+ await queryRunner.query(`CREATE INDEX "IDX_BaseLocaleBranding_type" ON "BaseLocaleBranding" ("type")`);
8464
+ await queryRunner.query(`PRAGMA foreign_keys = ON`);
8465
+ }
8466
+ };
8467
+
8468
+ // src/migrations/generic/15-AddBrandingState.ts
8099
8469
  var debug14 = (0, import_debug14.default)("sphereon:ssi-sdk:migrations");
8100
- var CreateIssuanceBranding1659463079429 = class {
8470
+ var AddBrandingState1766000000000 = class {
8101
8471
  static {
8102
- __name(this, "CreateIssuanceBranding1659463079429");
8472
+ __name(this, "AddBrandingState1766000000000");
8103
8473
  }
8104
- name = "CreateIssuanceBranding1659463079429";
8474
+ name = "AddBrandingState1766000000000";
8105
8475
  async up(queryRunner) {
8106
- debug14("migration: creating issuance branding tables");
8476
+ debug14("migration: adding branding state checksum columns");
8107
8477
  const dbType = queryRunner.connection.driver.options.type;
8108
8478
  switch (dbType) {
8109
8479
  case "postgres": {
8110
8480
  debug14("using postgres migration file");
8111
- const mig = new CreateIssuanceBranding1685628974232();
8481
+ const mig = new AddBrandingStatePostgres1766000000000();
8112
8482
  await mig.up(queryRunner);
8113
8483
  debug14("Migration statements executed");
8114
8484
  return;
@@ -8117,7 +8487,7 @@ var CreateIssuanceBranding1659463079429 = class {
8117
8487
  case "expo":
8118
8488
  case "react-native": {
8119
8489
  debug14("using sqlite/react-native migration file");
8120
- const mig = new CreateIssuanceBranding1685628973231();
8490
+ const mig = new AddBrandingStateSqlite1766000000000();
8121
8491
  await mig.up(queryRunner);
8122
8492
  debug14("Migration statements executed");
8123
8493
  return;
@@ -8127,12 +8497,12 @@ var CreateIssuanceBranding1659463079429 = class {
8127
8497
  }
8128
8498
  }
8129
8499
  async down(queryRunner) {
8130
- debug14("migration: reverting issuance branding tables");
8500
+ debug14("migration: removing branding state checksum columns");
8131
8501
  const dbType = queryRunner.connection.driver.options.type;
8132
8502
  switch (dbType) {
8133
8503
  case "postgres": {
8134
8504
  debug14("using postgres migration file");
8135
- const mig = new CreateIssuanceBranding1685628974232();
8505
+ const mig = new AddBrandingStatePostgres1766000000000();
8136
8506
  await mig.down(queryRunner);
8137
8507
  debug14("Migration statements executed");
8138
8508
  return;
@@ -8141,7 +8511,7 @@ var CreateIssuanceBranding1659463079429 = class {
8141
8511
  case "expo":
8142
8512
  case "react-native": {
8143
8513
  debug14("using sqlite/react-native migration file");
8144
- const mig = new CreateIssuanceBranding1685628973231();
8514
+ const mig = new AddBrandingStateSqlite1766000000000();
8145
8515
  await mig.down(queryRunner);
8146
8516
  debug14("Migration statements executed");
8147
8517
  return;
@@ -8152,8 +8522,187 @@ var CreateIssuanceBranding1659463079429 = class {
8152
8522
  }
8153
8523
  };
8154
8524
 
8155
- // src/migrations/generic/3-CreateContacts.ts
8525
+ // src/migrations/generic/15-AddServiceMetadata.ts
8526
+ var import_debug17 = __toESM(require("debug"), 1);
8527
+
8528
+ // src/migrations/postgres/1764000000001-AddServiceMetadata.ts
8156
8529
  var import_debug15 = __toESM(require("debug"), 1);
8530
+ var debug15 = (0, import_debug15.default)("sphereon:ssi-sdk:migrations");
8531
+ var AddServiceMetadata1764000000001 = class {
8532
+ static {
8533
+ __name(this, "AddServiceMetadata1764000000001");
8534
+ }
8535
+ name = "AddServiceMetadata1764000000001";
8536
+ async up(queryRunner) {
8537
+ const table = await queryRunner.getTable("service");
8538
+ if (!table) {
8539
+ 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.");
8540
+ console.warn("[SSI-SDK Migration] AddServiceMetadata: Skipping - service table does not exist (Veramo DID Manager not in use)");
8541
+ return;
8542
+ }
8543
+ await queryRunner.query(`
8544
+ ALTER TABLE "service"
8545
+ ADD COLUMN IF NOT EXISTS "metadata" jsonb
8546
+ `);
8547
+ debug15("AddServiceMetadata: Added metadata column to service table");
8548
+ }
8549
+ async down(queryRunner) {
8550
+ const table = await queryRunner.getTable("service");
8551
+ if (!table) {
8552
+ return;
8553
+ }
8554
+ await queryRunner.query(`
8555
+ ALTER TABLE "service"
8556
+ DROP COLUMN IF EXISTS "metadata"
8557
+ `);
8558
+ }
8559
+ };
8560
+
8561
+ // src/migrations/sqlite/1764000000002-AddServiceMetadata.ts
8562
+ var import_debug16 = __toESM(require("debug"), 1);
8563
+ var debug16 = (0, import_debug16.default)("sphereon:ssi-sdk:migrations");
8564
+ var AddServiceMetadata1764000000002 = class {
8565
+ static {
8566
+ __name(this, "AddServiceMetadata1764000000002");
8567
+ }
8568
+ name = "AddServiceMetadata1764000000002";
8569
+ async up(queryRunner) {
8570
+ const table = await queryRunner.getTable("service");
8571
+ if (!table) {
8572
+ 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.");
8573
+ console.warn("[SSI-SDK Migration] AddServiceMetadata: Skipping - service table does not exist (Veramo DID Manager not in use)");
8574
+ return;
8575
+ }
8576
+ const hasMetadataColumn = table.columns.some((col) => col.name === "metadata");
8577
+ if (!hasMetadataColumn) {
8578
+ await queryRunner.query(`
8579
+ ALTER TABLE "service"
8580
+ ADD COLUMN "metadata" text
8581
+ `);
8582
+ debug16("AddServiceMetadata: Added metadata column to service table");
8583
+ }
8584
+ }
8585
+ async down(queryRunner) {
8586
+ }
8587
+ };
8588
+
8589
+ // src/migrations/generic/15-AddServiceMetadata.ts
8590
+ var debug17 = (0, import_debug17.default)("sphereon:ssi-sdk:migrations");
8591
+ var AddServiceMetadata1764000000000 = class {
8592
+ static {
8593
+ __name(this, "AddServiceMetadata1764000000000");
8594
+ }
8595
+ name = "AddServiceMetadata1764000000000";
8596
+ async up(queryRunner) {
8597
+ debug17("migration: adding metadata column to service table");
8598
+ const dbType = queryRunner.connection.driver.options.type;
8599
+ switch (dbType) {
8600
+ case "postgres": {
8601
+ debug17("using postgres migration file for AddServiceMetadata");
8602
+ const mig = new AddServiceMetadata1764000000001();
8603
+ await mig.up(queryRunner);
8604
+ debug17("Postgres migration statements for AddServiceMetadata executed");
8605
+ return;
8606
+ }
8607
+ case "sqlite":
8608
+ case "expo":
8609
+ case "react-native": {
8610
+ debug17("using sqlite/react-native migration file for AddServiceMetadata");
8611
+ const mig = new AddServiceMetadata1764000000002();
8612
+ await mig.up(queryRunner);
8613
+ debug17("SQLite migration statements for AddServiceMetadata executed");
8614
+ return;
8615
+ }
8616
+ default:
8617
+ return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo, and postgres for AddServiceMetadata. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
8618
+ }
8619
+ }
8620
+ async down(queryRunner) {
8621
+ debug17("migration: reverting metadata column from service table");
8622
+ const dbType = queryRunner.connection.driver.options.type;
8623
+ switch (dbType) {
8624
+ case "postgres": {
8625
+ debug17("using postgres migration file for AddServiceMetadata");
8626
+ const mig = new AddServiceMetadata1764000000001();
8627
+ await mig.down(queryRunner);
8628
+ debug17("Postgres migration statements for AddServiceMetadata reverted");
8629
+ return;
8630
+ }
8631
+ case "sqlite":
8632
+ case "expo":
8633
+ case "react-native": {
8634
+ debug17("using sqlite/react-native migration file for AddServiceMetadata");
8635
+ const mig = new AddServiceMetadata1764000000002();
8636
+ await mig.down(queryRunner);
8637
+ debug17("SQLite migration statements for AddServiceMetadata reverted");
8638
+ return;
8639
+ }
8640
+ default:
8641
+ return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo, and postgres for AddServiceMetadata. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
8642
+ }
8643
+ }
8644
+ };
8645
+
8646
+ // src/migrations/generic/2-CreateIssuanceBranding.ts
8647
+ var import_debug18 = __toESM(require("debug"), 1);
8648
+ var debug18 = (0, import_debug18.default)("sphereon:ssi-sdk:migrations");
8649
+ var CreateIssuanceBranding1659463079429 = class {
8650
+ static {
8651
+ __name(this, "CreateIssuanceBranding1659463079429");
8652
+ }
8653
+ name = "CreateIssuanceBranding1659463079429";
8654
+ async up(queryRunner) {
8655
+ debug18("migration: creating issuance branding tables");
8656
+ const dbType = queryRunner.connection.driver.options.type;
8657
+ switch (dbType) {
8658
+ case "postgres": {
8659
+ debug18("using postgres migration file");
8660
+ const mig = new CreateIssuanceBranding1685628974232();
8661
+ await mig.up(queryRunner);
8662
+ debug18("Migration statements executed");
8663
+ return;
8664
+ }
8665
+ case "sqlite":
8666
+ case "expo":
8667
+ case "react-native": {
8668
+ debug18("using sqlite/react-native migration file");
8669
+ const mig = new CreateIssuanceBranding1685628973231();
8670
+ await mig.up(queryRunner);
8671
+ debug18("Migration statements executed");
8672
+ return;
8673
+ }
8674
+ default:
8675
+ 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`);
8676
+ }
8677
+ }
8678
+ async down(queryRunner) {
8679
+ debug18("migration: reverting issuance branding tables");
8680
+ const dbType = queryRunner.connection.driver.options.type;
8681
+ switch (dbType) {
8682
+ case "postgres": {
8683
+ debug18("using postgres migration file");
8684
+ const mig = new CreateIssuanceBranding1685628974232();
8685
+ await mig.down(queryRunner);
8686
+ debug18("Migration statements executed");
8687
+ return;
8688
+ }
8689
+ case "sqlite":
8690
+ case "expo":
8691
+ case "react-native": {
8692
+ debug18("using sqlite/react-native migration file");
8693
+ const mig = new CreateIssuanceBranding1685628973231();
8694
+ await mig.down(queryRunner);
8695
+ debug18("Migration statements executed");
8696
+ return;
8697
+ }
8698
+ default:
8699
+ 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`);
8700
+ }
8701
+ }
8702
+ };
8703
+
8704
+ // src/migrations/generic/3-CreateContacts.ts
8705
+ var import_debug19 = __toESM(require("debug"), 1);
8157
8706
 
8158
8707
  // src/migrations/postgres/1690925872592-CreateContacts.ts
8159
8708
  var import_ssi_sdk33 = require("@sphereon/ssi-sdk.core");
@@ -8374,30 +8923,30 @@ var CreateContacts1690925872693 = class {
8374
8923
  };
8375
8924
 
8376
8925
  // src/migrations/generic/3-CreateContacts.ts
8377
- var debug15 = (0, import_debug15.default)("sphereon:ssi-sdk:migrations");
8926
+ var debug19 = (0, import_debug19.default)("sphereon:ssi-sdk:migrations");
8378
8927
  var CreateContacts1690925872318 = class {
8379
8928
  static {
8380
8929
  __name(this, "CreateContacts1690925872318");
8381
8930
  }
8382
8931
  name = "CreateContacts1690925872318";
8383
8932
  async up(queryRunner) {
8384
- debug15("migration: creating contacts tables");
8933
+ debug19("migration: creating contacts tables");
8385
8934
  const dbType = queryRunner.connection.driver.options.type;
8386
8935
  switch (dbType) {
8387
8936
  case "postgres": {
8388
- debug15("using postgres migration file");
8937
+ debug19("using postgres migration file");
8389
8938
  const mig = new CreateContacts1690925872592();
8390
8939
  await mig.up(queryRunner);
8391
- debug15("Migration statements executed");
8940
+ debug19("Migration statements executed");
8392
8941
  return;
8393
8942
  }
8394
8943
  case "sqlite":
8395
8944
  case "expo":
8396
8945
  case "react-native": {
8397
- debug15("using sqlite/react-native migration file");
8946
+ debug19("using sqlite/react-native migration file");
8398
8947
  const mig = new CreateContacts1690925872693();
8399
8948
  await mig.up(queryRunner);
8400
- debug15("Migration statements executed");
8949
+ debug19("Migration statements executed");
8401
8950
  return;
8402
8951
  }
8403
8952
  default:
@@ -8405,23 +8954,23 @@ var CreateContacts1690925872318 = class {
8405
8954
  }
8406
8955
  }
8407
8956
  async down(queryRunner) {
8408
- debug15("migration: reverting contacts tables");
8957
+ debug19("migration: reverting contacts tables");
8409
8958
  const dbType = queryRunner.connection.driver.options.type;
8410
8959
  switch (dbType) {
8411
8960
  case "postgres": {
8412
- debug15("using postgres migration file");
8961
+ debug19("using postgres migration file");
8413
8962
  const mig = new CreateContacts1690925872592();
8414
8963
  await mig.down(queryRunner);
8415
- debug15("Migration statements executed");
8964
+ debug19("Migration statements executed");
8416
8965
  return;
8417
8966
  }
8418
8967
  case "sqlite":
8419
8968
  case "expo":
8420
8969
  case "react-native": {
8421
- debug15("using sqlite/react-native migration file");
8970
+ debug19("using sqlite/react-native migration file");
8422
8971
  const mig = new CreateContacts1690925872693();
8423
8972
  await mig.down(queryRunner);
8424
- debug15("Migration statements executed");
8973
+ debug19("Migration statements executed");
8425
8974
  return;
8426
8975
  }
8427
8976
  default:
@@ -8431,7 +8980,7 @@ var CreateContacts1690925872318 = class {
8431
8980
  };
8432
8981
 
8433
8982
  // src/migrations/generic/4-CreateStatusList.ts
8434
- var import_debug16 = __toESM(require("debug"), 1);
8983
+ var import_debug20 = __toESM(require("debug"), 1);
8435
8984
 
8436
8985
  // src/migrations/postgres/1693866470001-CreateStatusList.ts
8437
8986
  var CreateStatusList1693866470001 = class {
@@ -8637,53 +9186,53 @@ var UpdateStatusList1737110469000 = class {
8637
9186
  };
8638
9187
 
8639
9188
  // src/migrations/generic/4-CreateStatusList.ts
8640
- var debug16 = (0, import_debug16.default)("sphereon:ssi-sdk:migrations");
9189
+ var debug20 = (0, import_debug20.default)("sphereon:ssi-sdk:migrations");
8641
9190
  var CreateStatusList1693866470000 = class {
8642
9191
  static {
8643
9192
  __name(this, "CreateStatusList1693866470000");
8644
9193
  }
8645
9194
  name = "CreateStatusList1693866470000";
8646
9195
  async up(queryRunner) {
8647
- debug16("migration: creating issuance branding tables");
9196
+ debug20("migration: creating issuance branding tables");
8648
9197
  const dbType = queryRunner.connection.driver.options.type;
8649
9198
  if (dbType === "postgres") {
8650
- debug16("using postgres migration files");
9199
+ debug20("using postgres migration files");
8651
9200
  const createMig = new CreateStatusList1693866470001();
8652
9201
  await createMig.up(queryRunner);
8653
9202
  const updateMig = new UpdateStatusList1737110469001();
8654
9203
  const up = await updateMig.up(queryRunner);
8655
- debug16("Migration statements executed");
9204
+ debug20("Migration statements executed");
8656
9205
  return up;
8657
9206
  } else if (dbType === "sqlite" || dbType === "react-native" || dbType === "expo") {
8658
- debug16("using sqlite/react-native migration files");
9207
+ debug20("using sqlite/react-native migration files");
8659
9208
  const createMig = new CreateStatusList1693866470002();
8660
9209
  await createMig.up(queryRunner);
8661
9210
  const updateMig = new UpdateStatusList1737110469000();
8662
9211
  const up = await updateMig.up(queryRunner);
8663
- debug16("Migration statements executed");
9212
+ debug20("Migration statements executed");
8664
9213
  return up;
8665
9214
  } else {
8666
9215
  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`);
8667
9216
  }
8668
9217
  }
8669
9218
  async down(queryRunner) {
8670
- debug16("migration: reverting issuance branding tables");
9219
+ debug20("migration: reverting issuance branding tables");
8671
9220
  const dbType = queryRunner.connection.driver.options.type;
8672
9221
  if (dbType === "postgres") {
8673
- debug16("using postgres migration files");
9222
+ debug20("using postgres migration files");
8674
9223
  const updateMig = new UpdateStatusList1737110469001();
8675
9224
  await updateMig.down(queryRunner);
8676
9225
  const createMig = new CreateStatusList1693866470001();
8677
9226
  const down = await createMig.down(queryRunner);
8678
- debug16("Migration statements executed");
9227
+ debug20("Migration statements executed");
8679
9228
  return down;
8680
9229
  } else if (dbType === "sqlite" || dbType === "react-native" || dbType === "expo") {
8681
- debug16("using sqlite/react-native migration files");
9230
+ debug20("using sqlite/react-native migration files");
8682
9231
  const updateMig = new UpdateStatusList1737110469000();
8683
9232
  await updateMig.down(queryRunner);
8684
9233
  const createMig = new CreateStatusList1693866470002();
8685
9234
  const down = await createMig.down(queryRunner);
8686
- debug16("Migration statements executed");
9235
+ debug20("Migration statements executed");
8687
9236
  return down;
8688
9237
  } else {
8689
9238
  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`);
@@ -8692,7 +9241,7 @@ var CreateStatusList1693866470000 = class {
8692
9241
  };
8693
9242
 
8694
9243
  // src/migrations/generic/5-CreateAuditEvents.ts
8695
- var import_debug17 = __toESM(require("debug"), 1);
9244
+ var import_debug21 = __toESM(require("debug"), 1);
8696
9245
 
8697
9246
  // src/migrations/postgres/1701634812183-CreateAuditEvents.ts
8698
9247
  var CreateAuditEvents1701634812183 = class {
@@ -8791,30 +9340,30 @@ var CreateAuditEvents1701634819487 = class {
8791
9340
  };
8792
9341
 
8793
9342
  // src/migrations/generic/5-CreateAuditEvents.ts
8794
- var debug17 = (0, import_debug17.default)("sphereon:ssi-sdk:migrations");
9343
+ var debug21 = (0, import_debug21.default)("sphereon:ssi-sdk:migrations");
8795
9344
  var CreateAuditEvents1701635835330 = class {
8796
9345
  static {
8797
9346
  __name(this, "CreateAuditEvents1701635835330");
8798
9347
  }
8799
9348
  name = "CreateAuditEvents1701635835330";
8800
9349
  async up(queryRunner) {
8801
- debug17("migration: creating audit events tables");
9350
+ debug21("migration: creating audit events tables");
8802
9351
  const dbType = queryRunner.connection.driver.options.type;
8803
9352
  switch (dbType) {
8804
9353
  case "postgres": {
8805
- debug17("using postgres migration file");
9354
+ debug21("using postgres migration file");
8806
9355
  const mig = new CreateAuditEvents1701634812183();
8807
9356
  await mig.up(queryRunner);
8808
- debug17("Migration statements executed");
9357
+ debug21("Migration statements executed");
8809
9358
  return;
8810
9359
  }
8811
9360
  case "sqlite":
8812
9361
  case "expo":
8813
9362
  case "react-native": {
8814
- debug17("using sqlite/react-native migration file");
9363
+ debug21("using sqlite/react-native migration file");
8815
9364
  const mig = new CreateAuditEvents1701634819487();
8816
9365
  await mig.up(queryRunner);
8817
- debug17("Migration statements executed");
9366
+ debug21("Migration statements executed");
8818
9367
  return;
8819
9368
  }
8820
9369
  default:
@@ -8822,23 +9371,23 @@ var CreateAuditEvents1701635835330 = class {
8822
9371
  }
8823
9372
  }
8824
9373
  async down(queryRunner) {
8825
- debug17("migration: reverting audit events tables");
9374
+ debug21("migration: reverting audit events tables");
8826
9375
  const dbType = queryRunner.connection.driver.options.type;
8827
9376
  switch (dbType) {
8828
9377
  case "postgres": {
8829
- debug17("using postgres migration file");
9378
+ debug21("using postgres migration file");
8830
9379
  const mig = new CreateAuditEvents1701634812183();
8831
9380
  await mig.down(queryRunner);
8832
- debug17("Migration statements executed");
9381
+ debug21("Migration statements executed");
8833
9382
  return;
8834
9383
  }
8835
9384
  case "sqlite":
8836
9385
  case "expo":
8837
9386
  case "react-native": {
8838
- debug17("using sqlite/react-native migration file");
9387
+ debug21("using sqlite/react-native migration file");
8839
9388
  const mig = new CreateAuditEvents1701634819487();
8840
9389
  await mig.down(queryRunner);
8841
- debug17("Migration statements executed");
9390
+ debug21("Migration statements executed");
8842
9391
  return;
8843
9392
  }
8844
9393
  default:
@@ -8848,7 +9397,7 @@ var CreateAuditEvents1701635835330 = class {
8848
9397
  };
8849
9398
 
8850
9399
  // src/migrations/generic/6-CreateDigitalCredential.ts
8851
- var import_debug18 = __toESM(require("debug"), 1);
9400
+ var import_debug22 = __toESM(require("debug"), 1);
8852
9401
 
8853
9402
  // src/migrations/postgres/1708525189001-CreateDigitalCredential.ts
8854
9403
  var CreateDigitalCredential1708525189001 = class {
@@ -8956,30 +9505,30 @@ var CreateDigitalCredential1708525189002 = class {
8956
9505
  };
8957
9506
 
8958
9507
  // src/migrations/generic/6-CreateDigitalCredential.ts
8959
- var debug18 = (0, import_debug18.default)("sphereon:ssi-sdk:migrations");
9508
+ var debug22 = (0, import_debug22.default)("sphereon:ssi-sdk:migrations");
8960
9509
  var CreateDigitalCredential1708525189000 = class {
8961
9510
  static {
8962
9511
  __name(this, "CreateDigitalCredential1708525189000");
8963
9512
  }
8964
9513
  name = "CreateDigitalCredential1708525189000";
8965
9514
  async up(queryRunner) {
8966
- debug18("migration: creating DigitalCredential tables");
9515
+ debug22("migration: creating DigitalCredential tables");
8967
9516
  const dbType = queryRunner.connection.driver.options.type;
8968
9517
  switch (dbType) {
8969
9518
  case "postgres": {
8970
- debug18("using postgres migration file for DigitalCredential");
9519
+ debug22("using postgres migration file for DigitalCredential");
8971
9520
  const mig = new CreateDigitalCredential1708525189001();
8972
9521
  await mig.up(queryRunner);
8973
- debug18("Postgres Migration statements for DigitalCredential executed");
9522
+ debug22("Postgres Migration statements for DigitalCredential executed");
8974
9523
  return;
8975
9524
  }
8976
9525
  case "sqlite":
8977
9526
  case "expo":
8978
9527
  case "react-native": {
8979
- debug18("using sqlite/react-native migration file for DigitalCredential");
9528
+ debug22("using sqlite/react-native migration file for DigitalCredential");
8980
9529
  const mig = new CreateDigitalCredential1708525189002();
8981
9530
  await mig.up(queryRunner);
8982
- debug18("SQLite Migration statements for DigitalCredential executed");
9531
+ debug22("SQLite Migration statements for DigitalCredential executed");
8983
9532
  return;
8984
9533
  }
8985
9534
  default:
@@ -8987,23 +9536,23 @@ var CreateDigitalCredential1708525189000 = class {
8987
9536
  }
8988
9537
  }
8989
9538
  async down(queryRunner) {
8990
- debug18("migration: reverting DigitalCredential tables");
9539
+ debug22("migration: reverting DigitalCredential tables");
8991
9540
  const dbType = queryRunner.connection.driver.options.type;
8992
9541
  switch (dbType) {
8993
9542
  case "postgres": {
8994
- debug18("using postgres migration file for DigitalCredential");
9543
+ debug22("using postgres migration file for DigitalCredential");
8995
9544
  const mig = new CreateDigitalCredential1708525189001();
8996
9545
  await mig.down(queryRunner);
8997
- debug18("Postgres Migration statements for DigitalCredential reverted");
9546
+ debug22("Postgres Migration statements for DigitalCredential reverted");
8998
9547
  return;
8999
9548
  }
9000
9549
  case "sqlite":
9001
9550
  case "expo":
9002
9551
  case "react-native": {
9003
- debug18("using sqlite/react-native migration file for DigitalCredential");
9552
+ debug22("using sqlite/react-native migration file for DigitalCredential");
9004
9553
  const mig = new CreateDigitalCredential1708525189002();
9005
9554
  await mig.down(queryRunner);
9006
- debug18("SQLite Migration statements for DigitalCredential reverted");
9555
+ debug22("SQLite Migration statements for DigitalCredential reverted");
9007
9556
  return;
9008
9557
  }
9009
9558
  default:
@@ -9013,7 +9562,7 @@ var CreateDigitalCredential1708525189000 = class {
9013
9562
  };
9014
9563
 
9015
9564
  // src/migrations/generic/7-CreateMachineStateStore.ts
9016
- var import_debug19 = __toESM(require("debug"), 1);
9565
+ var import_debug23 = __toESM(require("debug"), 1);
9017
9566
 
9018
9567
  // src/migrations/postgres/1708797018115-CreateMachineStateStore.ts
9019
9568
  var CreateMachineStateStore1708797018115 = class {
@@ -9075,30 +9624,30 @@ var CreateMachineStateStore1708796002272 = class {
9075
9624
  };
9076
9625
 
9077
9626
  // src/migrations/generic/7-CreateMachineStateStore.ts
9078
- var debug19 = (0, import_debug19.default)("sphereon:ssi-sdk:migrations");
9627
+ var debug23 = (0, import_debug23.default)("sphereon:ssi-sdk:migrations");
9079
9628
  var CreateMachineStateStore1708098041262 = class {
9080
9629
  static {
9081
9630
  __name(this, "CreateMachineStateStore1708098041262");
9082
9631
  }
9083
9632
  name = "CreateMachineStateStore1708098041262";
9084
9633
  async up(queryRunner) {
9085
- debug19("migration: creating machine state tables");
9634
+ debug23("migration: creating machine state tables");
9086
9635
  const dbType = queryRunner.connection.driver.options.type;
9087
9636
  switch (dbType) {
9088
9637
  case "postgres": {
9089
- debug19("using postgres migration file");
9638
+ debug23("using postgres migration file");
9090
9639
  const mig = new CreateMachineStateStore1708797018115();
9091
9640
  await mig.up(queryRunner);
9092
- debug19("Migration statements executed");
9641
+ debug23("Migration statements executed");
9093
9642
  return;
9094
9643
  }
9095
9644
  case "sqlite":
9096
9645
  case "expo":
9097
9646
  case "react-native": {
9098
- debug19("using sqlite/react-native migration file");
9647
+ debug23("using sqlite/react-native migration file");
9099
9648
  const mig = new CreateMachineStateStore1708796002272();
9100
9649
  await mig.up(queryRunner);
9101
- debug19("Migration statements executed");
9650
+ debug23("Migration statements executed");
9102
9651
  return;
9103
9652
  }
9104
9653
  default:
@@ -9106,23 +9655,23 @@ var CreateMachineStateStore1708098041262 = class {
9106
9655
  }
9107
9656
  }
9108
9657
  async down(queryRunner) {
9109
- debug19("migration: reverting machine state tables");
9658
+ debug23("migration: reverting machine state tables");
9110
9659
  const dbType = queryRunner.connection.driver.options.type;
9111
9660
  switch (dbType) {
9112
9661
  case "postgres": {
9113
- debug19("using postgres migration file");
9662
+ debug23("using postgres migration file");
9114
9663
  const mig = new CreateMachineStateStore1708797018115();
9115
9664
  await mig.down(queryRunner);
9116
- debug19("Migration statements executed");
9665
+ debug23("Migration statements executed");
9117
9666
  return;
9118
9667
  }
9119
9668
  case "sqlite":
9120
9669
  case "expo":
9121
9670
  case "react-native": {
9122
- debug19("using sqlite/react-native migration file");
9671
+ debug23("using sqlite/react-native migration file");
9123
9672
  const mig = new CreateMachineStateStore1708796002272();
9124
9673
  await mig.down(queryRunner);
9125
- debug19("Migration statements executed");
9674
+ debug23("Migration statements executed");
9126
9675
  return;
9127
9676
  }
9128
9677
  default:
@@ -9132,7 +9681,7 @@ var CreateMachineStateStore1708098041262 = class {
9132
9681
  };
9133
9682
 
9134
9683
  // src/migrations/generic/8-CreateContacts.ts
9135
- var import_debug20 = __toESM(require("debug"), 1);
9684
+ var import_debug24 = __toESM(require("debug"), 1);
9136
9685
 
9137
9686
  // src/migrations/postgres/1710438363001-CreateContacts.ts
9138
9687
  var CreateContacts1710438363001 = class {
@@ -9246,30 +9795,30 @@ var CreateContacts1710438363002 = class {
9246
9795
  };
9247
9796
 
9248
9797
  // src/migrations/generic/8-CreateContacts.ts
9249
- var debug20 = (0, import_debug20.default)("sphereon:ssi-sdk:migrations");
9798
+ var debug24 = (0, import_debug24.default)("sphereon:ssi-sdk:migrations");
9250
9799
  var CreateContacts1708525189000 = class {
9251
9800
  static {
9252
9801
  __name(this, "CreateContacts1708525189000");
9253
9802
  }
9254
9803
  name = "CreateContacts1708525189000";
9255
9804
  async up(queryRunner) {
9256
- debug20("migration: updating contact tables");
9805
+ debug24("migration: updating contact tables");
9257
9806
  const dbType = queryRunner.connection.driver.options.type;
9258
9807
  switch (dbType) {
9259
9808
  case "postgres": {
9260
- debug20("using postgres migration file");
9809
+ debug24("using postgres migration file");
9261
9810
  const mig = new CreateContacts1710438363001();
9262
9811
  await mig.up(queryRunner);
9263
- debug20("Migration statements executed");
9812
+ debug24("Migration statements executed");
9264
9813
  return;
9265
9814
  }
9266
9815
  case "sqlite":
9267
9816
  case "expo":
9268
9817
  case "react-native": {
9269
- debug20("using sqlite/react-native migration file");
9818
+ debug24("using sqlite/react-native migration file");
9270
9819
  const mig = new CreateContacts1710438363002();
9271
9820
  await mig.up(queryRunner);
9272
- debug20("Migration statements executed");
9821
+ debug24("Migration statements executed");
9273
9822
  return;
9274
9823
  }
9275
9824
  default:
@@ -9277,23 +9826,23 @@ var CreateContacts1708525189000 = class {
9277
9826
  }
9278
9827
  }
9279
9828
  async down(queryRunner) {
9280
- debug20("migration: reverting machine state tables");
9829
+ debug24("migration: reverting machine state tables");
9281
9830
  const dbType = queryRunner.connection.driver.options.type;
9282
9831
  switch (dbType) {
9283
9832
  case "postgres": {
9284
- debug20("using postgres migration file");
9833
+ debug24("using postgres migration file");
9285
9834
  const mig = new CreateContacts1710438363001();
9286
9835
  await mig.down(queryRunner);
9287
- debug20("Migration statements executed");
9836
+ debug24("Migration statements executed");
9288
9837
  return;
9289
9838
  }
9290
9839
  case "sqlite":
9291
9840
  case "expo":
9292
9841
  case "react-native": {
9293
- debug20("using sqlite/react-native migration file");
9842
+ debug24("using sqlite/react-native migration file");
9294
9843
  const mig = new CreateContacts1710438363002();
9295
9844
  await mig.down(queryRunner);
9296
- debug20("Migration statements executed");
9845
+ debug24("Migration statements executed");
9297
9846
  return;
9298
9847
  }
9299
9848
  default:
@@ -9303,7 +9852,7 @@ var CreateContacts1708525189000 = class {
9303
9852
  };
9304
9853
 
9305
9854
  // src/migrations/generic/9-CreateContacts.ts
9306
- var import_debug21 = __toESM(require("debug"), 1);
9855
+ var import_debug25 = __toESM(require("debug"), 1);
9307
9856
 
9308
9857
  // src/migrations/postgres/1715761125001-CreateContacts.ts
9309
9858
  var CreateContacts1715761125001 = class {
@@ -9415,30 +9964,30 @@ var CreateContacts1715761125002 = class {
9415
9964
  };
9416
9965
 
9417
9966
  // src/migrations/generic/9-CreateContacts.ts
9418
- var debug21 = (0, import_debug21.default)("sphereon:ssi-sdk:migrations");
9967
+ var debug25 = (0, import_debug25.default)("sphereon:ssi-sdk:migrations");
9419
9968
  var CreateContacts1715761125000 = class {
9420
9969
  static {
9421
9970
  __name(this, "CreateContacts1715761125000");
9422
9971
  }
9423
9972
  name = "CreateContacts1715761125000";
9424
9973
  async up(queryRunner) {
9425
- debug21("migration: updating contact tables");
9974
+ debug25("migration: updating contact tables");
9426
9975
  const dbType = queryRunner.connection.driver.options.type;
9427
9976
  switch (dbType) {
9428
9977
  case "postgres": {
9429
- debug21("using postgres migration file");
9978
+ debug25("using postgres migration file");
9430
9979
  const mig = new CreateContacts1715761125001();
9431
9980
  await mig.up(queryRunner);
9432
- debug21("Migration statements executed");
9981
+ debug25("Migration statements executed");
9433
9982
  return;
9434
9983
  }
9435
9984
  case "sqlite":
9436
9985
  case "expo":
9437
9986
  case "react-native": {
9438
- debug21("using sqlite/react-native migration file");
9987
+ debug25("using sqlite/react-native migration file");
9439
9988
  const mig = new CreateContacts1715761125002();
9440
9989
  await mig.up(queryRunner);
9441
- debug21("Migration statements executed");
9990
+ debug25("Migration statements executed");
9442
9991
  return;
9443
9992
  }
9444
9993
  default:
@@ -9446,23 +9995,23 @@ var CreateContacts1715761125000 = class {
9446
9995
  }
9447
9996
  }
9448
9997
  async down(queryRunner) {
9449
- debug21("migration: reverting machine state tables");
9998
+ debug25("migration: reverting machine state tables");
9450
9999
  const dbType = queryRunner.connection.driver.options.type;
9451
10000
  switch (dbType) {
9452
10001
  case "postgres": {
9453
- debug21("using postgres migration file");
10002
+ debug25("using postgres migration file");
9454
10003
  const mig = new CreateContacts1715761125001();
9455
10004
  await mig.down(queryRunner);
9456
- debug21("Migration statements executed");
10005
+ debug25("Migration statements executed");
9457
10006
  return;
9458
10007
  }
9459
10008
  case "sqlite":
9460
10009
  case "expo":
9461
10010
  case "react-native": {
9462
- debug21("using sqlite/react-native migration file");
10011
+ debug25("using sqlite/react-native migration file");
9463
10012
  const mig = new CreateContacts1715761125002();
9464
10013
  await mig.down(queryRunner);
9465
- debug21("Migration statements executed");
10014
+ debug25("Migration statements executed");
9466
10015
  return;
9467
10016
  }
9468
10017
  default:
@@ -9480,7 +10029,8 @@ var DataStoreContactMigrations = [
9480
10029
  ];
9481
10030
  var DataStoreIssuanceBrandingMigrations = [
9482
10031
  CreateIssuanceBranding1659463079429,
9483
- FixCredentialClaimsReferencesUuid1741895822987
10032
+ FixCredentialClaimsReferencesUuid1741895822987,
10033
+ AddBrandingState1766000000000
9484
10034
  ];
9485
10035
  var DataStoreStatusListMigrations = [
9486
10036
  CreateStatusList1693866470000,
@@ -9501,6 +10051,9 @@ var DataStorePresentationDefinitionMigrations = [
9501
10051
  CreatePresentationDefinitions1716533767523,
9502
10052
  CreateDcqlQueryItem1726617600000
9503
10053
  ];
10054
+ var DataStoreServiceMigrations = [
10055
+ AddServiceMetadata1764000000000
10056
+ ];
9504
10057
  var DataStoreMigrations = [
9505
10058
  ...DataStoreContactMigrations,
9506
10059
  ...DataStoreIssuanceBrandingMigrations,
@@ -9508,7 +10061,12 @@ var DataStoreMigrations = [
9508
10061
  ...DataStoreEventLoggerMigrations,
9509
10062
  ...DataStoreDigitalCredentialMigrations,
9510
10063
  ...DataStoreMachineStateMigrations,
9511
- ...DataStorePresentationDefinitionMigrations
10064
+ ...DataStorePresentationDefinitionMigrations,
10065
+ ...DataStoreServiceMigrations
10066
+ ];
10067
+ var DataStoreMigrationsWithVeramo = [
10068
+ ...import_data_store.migrations,
10069
+ ...DataStoreMigrations
9512
10070
  ];
9513
10071
 
9514
10072
  // src/utils/digitalCredential/MappingUtils.ts
@@ -9739,4 +10297,8 @@ var DataStoreEntities = [
9739
10297
  ...DataStoreMachineStateEntities,
9740
10298
  ...DataStorePresentationDefinitionEntities
9741
10299
  ];
10300
+ var DataStoreEntitiesWithVeramo = [
10301
+ ...import_data_store2.Entities,
10302
+ ...DataStoreEntities
10303
+ ];
9742
10304
  //# sourceMappingURL=index.cjs.map