@sphereon/ssi-sdk.data-store 0.34.0 → 0.34.1-feature.SSISDK.17.bitstring.sl.2

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.cjs CHANGED
@@ -41,6 +41,8 @@ __export(index_exports, {
41
41
  BaseConfigEntity: () => BaseConfigEntity,
42
42
  BaseContactEntity: () => BaseContactEntity,
43
43
  BaseLocaleBrandingEntity: () => BaseLocaleBrandingEntity,
44
+ BitstringStatusListEntity: () => BitstringStatusListEntity,
45
+ BitstringStatusListEntryEntity: () => BitstringStatusListEntryEntity,
44
46
  ConnectionEntity: () => ConnectionEntity,
45
47
  ConnectionType: () => ConnectionType,
46
48
  ContactMetadataItemEntity: () => ContactMetadataItemEntity,
@@ -2855,8 +2857,8 @@ IssuerLocaleBrandingEntity = _ts_decorate25([
2855
2857
  ], IssuerLocaleBrandingEntity);
2856
2858
 
2857
2859
  // src/entities/statusList/StatusListEntities.ts
2858
- var import_ssi_types = require("@sphereon/ssi-types");
2859
- var import_typeorm26 = __toESM(require("typeorm"), 1);
2860
+ var import_ssi_types2 = require("@sphereon/ssi-types");
2861
+ var import_typeorm27 = __toESM(require("typeorm"), 1);
2860
2862
 
2861
2863
  // src/entities/statusList/StatusList2021EntryEntity.ts
2862
2864
  var import_class_validator18 = require("class-validator");
@@ -2909,7 +2911,7 @@ _ts_decorate26([
2909
2911
  _ts_metadata25("design:type", Number)
2910
2912
  ], StatusListEntryEntity.prototype, "statusListIndex", void 0);
2911
2913
  _ts_decorate26([
2912
- (0, import_typeorm25.ManyToOne)(() => StatusListEntity, (statusList) => statusList.statusListEntries),
2914
+ (0, import_typeorm25.ManyToOne)(() => StatusList2021Entity, (statusList) => statusList.statusListEntries),
2913
2915
  (0, import_typeorm25.JoinColumn)({
2914
2916
  name: "statusListId"
2915
2917
  }),
@@ -2959,6 +2961,11 @@ StatusListEntryEntity = _ts_decorate26([
2959
2961
 
2960
2962
  // src/entities/statusList/StatusListEntities.ts
2961
2963
  var import_ssi_sdk13 = require("@sphereon/ssi-sdk.agent-config");
2964
+
2965
+ // src/entities/statusList/BitstringStatusListEntryEntity.ts
2966
+ var import_class_validator19 = require("class-validator");
2967
+ var import_typeorm26 = require("typeorm");
2968
+ var import_ssi_types = require("@sphereon/ssi-types");
2962
2969
  function _ts_decorate27(decorators, target, key, desc) {
2963
2970
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2964
2971
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -2970,8 +2977,162 @@ function _ts_metadata26(k, v) {
2970
2977
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
2971
2978
  }
2972
2979
  __name(_ts_metadata26, "_ts_metadata");
2973
- var { BaseEntity: BaseEntity20, ChildEntity: ChildEntity5, Column: Column24, Entity: Entity22, OneToMany: OneToMany8, PrimaryColumn: PrimaryColumn2, TableInheritance: TableInheritance4, Unique } = import_typeorm26.default;
2974
- var StatusListEntity = class extends BaseEntity20 {
2980
+ var BitstringStatusListEntryEntity = class extends import_typeorm26.BaseEntity {
2981
+ static {
2982
+ __name(this, "BitstringStatusListEntryEntity");
2983
+ }
2984
+ statusListId;
2985
+ statusListIndex;
2986
+ statusList;
2987
+ credentialId;
2988
+ credentialHash;
2989
+ entryCorrelationId;
2990
+ statusPurpose;
2991
+ statusSize;
2992
+ statusMessage;
2993
+ statusReference;
2994
+ };
2995
+ _ts_decorate27([
2996
+ (0, import_typeorm26.PrimaryColumn)({
2997
+ name: "statusListId",
2998
+ type: "varchar",
2999
+ nullable: false,
3000
+ unique: false
3001
+ }),
3002
+ (0, import_class_validator19.Validate)(IsNonEmptyStringConstraint, {
3003
+ message: "Status list id is required"
3004
+ }),
3005
+ _ts_metadata26("design:type", String)
3006
+ ], BitstringStatusListEntryEntity.prototype, "statusListId", void 0);
3007
+ _ts_decorate27([
3008
+ (0, import_typeorm26.PrimaryColumn)({
3009
+ name: "statusListIndex",
3010
+ type: "integer",
3011
+ nullable: false,
3012
+ unique: false
3013
+ }),
3014
+ _ts_metadata26("design:type", Number)
3015
+ ], BitstringStatusListEntryEntity.prototype, "statusListIndex", void 0);
3016
+ _ts_decorate27([
3017
+ (0, import_typeorm26.ManyToOne)(() => BitstringStatusListEntity, (statusList) => statusList.statusListEntries),
3018
+ (0, import_typeorm26.JoinColumn)({
3019
+ name: "statusListId"
3020
+ }),
3021
+ _ts_metadata26("design:type", typeof BitstringStatusListEntity === "undefined" ? Object : BitstringStatusListEntity)
3022
+ ], BitstringStatusListEntryEntity.prototype, "statusList", void 0);
3023
+ _ts_decorate27([
3024
+ (0, import_typeorm26.Column)({
3025
+ name: "credentialId",
3026
+ type: "text",
3027
+ nullable: true
3028
+ }),
3029
+ _ts_metadata26("design:type", String)
3030
+ ], BitstringStatusListEntryEntity.prototype, "credentialId", void 0);
3031
+ _ts_decorate27([
3032
+ (0, import_typeorm26.Column)({
3033
+ name: "credentialHash",
3034
+ length: 128,
3035
+ type: "varchar",
3036
+ nullable: true,
3037
+ unique: false
3038
+ }),
3039
+ _ts_metadata26("design:type", String)
3040
+ ], BitstringStatusListEntryEntity.prototype, "credentialHash", void 0);
3041
+ _ts_decorate27([
3042
+ (0, import_typeorm26.Column)({
3043
+ name: "correlationId",
3044
+ length: 255,
3045
+ type: "varchar",
3046
+ nullable: true,
3047
+ unique: false
3048
+ }),
3049
+ _ts_metadata26("design:type", String)
3050
+ ], BitstringStatusListEntryEntity.prototype, "entryCorrelationId", void 0);
3051
+ _ts_decorate27([
3052
+ (0, import_typeorm26.Column)({
3053
+ type: "varchar",
3054
+ name: "statusPurpose",
3055
+ nullable: false
3056
+ }),
3057
+ _ts_metadata26("design:type", typeof import_ssi_types.BitstringStatusPurpose === "undefined" ? Object : import_ssi_types.BitstringStatusPurpose)
3058
+ ], BitstringStatusListEntryEntity.prototype, "statusPurpose", void 0);
3059
+ _ts_decorate27([
3060
+ (0, import_typeorm26.Column)({
3061
+ type: "integer",
3062
+ name: "statusSize",
3063
+ nullable: true,
3064
+ default: 1
3065
+ }),
3066
+ _ts_metadata26("design:type", Number)
3067
+ ], BitstringStatusListEntryEntity.prototype, "statusSize", void 0);
3068
+ _ts_decorate27([
3069
+ (0, import_typeorm26.Column)({
3070
+ type: "text",
3071
+ name: "statusMessage",
3072
+ nullable: true,
3073
+ transformer: {
3074
+ from(value) {
3075
+ if (!value) {
3076
+ return void 0;
3077
+ }
3078
+ return JSON.parse(value);
3079
+ },
3080
+ to(value) {
3081
+ if (!value) {
3082
+ return void 0;
3083
+ }
3084
+ return JSON.stringify(value);
3085
+ }
3086
+ }
3087
+ }),
3088
+ _ts_metadata26("design:type", typeof Array === "undefined" ? Object : Array)
3089
+ ], BitstringStatusListEntryEntity.prototype, "statusMessage", void 0);
3090
+ _ts_decorate27([
3091
+ (0, import_typeorm26.Column)({
3092
+ type: "text",
3093
+ name: "statusReference",
3094
+ nullable: true,
3095
+ transformer: {
3096
+ from(value) {
3097
+ if (!value) {
3098
+ return void 0;
3099
+ }
3100
+ if (value.startsWith("[")) {
3101
+ return JSON.parse(value);
3102
+ }
3103
+ return value;
3104
+ },
3105
+ to(value) {
3106
+ if (!value) {
3107
+ return void 0;
3108
+ }
3109
+ if (Array.isArray(value)) {
3110
+ return JSON.stringify(value);
3111
+ }
3112
+ return value;
3113
+ }
3114
+ }
3115
+ }),
3116
+ _ts_metadata26("design:type", Object)
3117
+ ], BitstringStatusListEntryEntity.prototype, "statusReference", void 0);
3118
+ BitstringStatusListEntryEntity = _ts_decorate27([
3119
+ (0, import_typeorm26.Entity)("BitstringStatusListEntry")
3120
+ ], BitstringStatusListEntryEntity);
3121
+
3122
+ // src/entities/statusList/StatusListEntities.ts
3123
+ function _ts_decorate28(decorators, target, key, desc) {
3124
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3125
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3126
+ 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;
3127
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
3128
+ }
3129
+ __name(_ts_decorate28, "_ts_decorate");
3130
+ function _ts_metadata27(k, v) {
3131
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
3132
+ }
3133
+ __name(_ts_metadata27, "_ts_metadata");
3134
+ var { BaseEntity: BaseEntity21, ChildEntity: ChildEntity5, Column: Column25, Entity: Entity23, OneToMany: OneToMany8, PrimaryColumn: PrimaryColumn3, TableInheritance: TableInheritance4, Unique } = import_typeorm27.default;
3135
+ var StatusListEntity = class extends BaseEntity21 {
2975
3136
  static {
2976
3137
  __name(this, "StatusListEntity");
2977
3138
  }
@@ -2983,34 +3144,33 @@ var StatusListEntity = class extends BaseEntity20 {
2983
3144
  credentialIdMode;
2984
3145
  proofFormat;
2985
3146
  statusListCredential;
2986
- statusListEntries;
2987
3147
  };
2988
- _ts_decorate27([
2989
- PrimaryColumn2({
3148
+ _ts_decorate28([
3149
+ PrimaryColumn3({
2990
3150
  name: "id",
2991
3151
  type: "varchar"
2992
3152
  }),
2993
- _ts_metadata26("design:type", String)
3153
+ _ts_metadata27("design:type", String)
2994
3154
  ], StatusListEntity.prototype, "id", void 0);
2995
- _ts_decorate27([
2996
- Column24({
3155
+ _ts_decorate28([
3156
+ Column25({
2997
3157
  name: "correlationId",
2998
3158
  type: "varchar",
2999
3159
  nullable: false
3000
3160
  }),
3001
- _ts_metadata26("design:type", String)
3161
+ _ts_metadata27("design:type", String)
3002
3162
  ], StatusListEntity.prototype, "correlationId", void 0);
3003
- _ts_decorate27([
3004
- Column24({
3163
+ _ts_decorate28([
3164
+ Column25({
3005
3165
  name: "length",
3006
3166
  type: "integer",
3007
3167
  nullable: false,
3008
3168
  unique: false
3009
3169
  }),
3010
- _ts_metadata26("design:type", Number)
3170
+ _ts_metadata27("design:type", Number)
3011
3171
  ], StatusListEntity.prototype, "length", void 0);
3012
- _ts_decorate27([
3013
- Column24({
3172
+ _ts_decorate28([
3173
+ Column25({
3014
3174
  name: "issuer",
3015
3175
  type: "text",
3016
3176
  nullable: false,
@@ -3030,28 +3190,28 @@ _ts_decorate27([
3030
3190
  }
3031
3191
  }
3032
3192
  }),
3033
- _ts_metadata26("design:type", Object)
3193
+ _ts_metadata27("design:type", Object)
3034
3194
  ], StatusListEntity.prototype, "issuer", void 0);
3035
- _ts_decorate27([
3036
- Column24("simple-enum", {
3195
+ _ts_decorate28([
3196
+ Column25("simple-enum", {
3037
3197
  name: "driverType",
3038
- enum: import_ssi_types.StatusListDriverType,
3198
+ enum: import_ssi_types2.StatusListDriverType,
3039
3199
  nullable: false,
3040
- default: import_ssi_types.StatusListDriverType.AGENT_TYPEORM
3200
+ default: import_ssi_types2.StatusListDriverType.AGENT_TYPEORM
3041
3201
  }),
3042
- _ts_metadata26("design:type", typeof import_ssi_types.StatusListDriverType === "undefined" ? Object : import_ssi_types.StatusListDriverType)
3202
+ _ts_metadata27("design:type", typeof import_ssi_types2.StatusListDriverType === "undefined" ? Object : import_ssi_types2.StatusListDriverType)
3043
3203
  ], StatusListEntity.prototype, "driverType", void 0);
3044
- _ts_decorate27([
3045
- Column24("simple-enum", {
3204
+ _ts_decorate28([
3205
+ Column25("simple-enum", {
3046
3206
  name: "credentialIdMode",
3047
- enum: import_ssi_types.StatusListCredentialIdMode,
3207
+ enum: import_ssi_types2.StatusListCredentialIdMode,
3048
3208
  nullable: false,
3049
- default: import_ssi_types.StatusListCredentialIdMode.ISSUANCE
3209
+ default: import_ssi_types2.StatusListCredentialIdMode.ISSUANCE
3050
3210
  }),
3051
- _ts_metadata26("design:type", typeof import_ssi_types.StatusListCredentialIdMode === "undefined" ? Object : import_ssi_types.StatusListCredentialIdMode)
3211
+ _ts_metadata27("design:type", typeof import_ssi_types2.StatusListCredentialIdMode === "undefined" ? Object : import_ssi_types2.StatusListCredentialIdMode)
3052
3212
  ], StatusListEntity.prototype, "credentialIdMode", void 0);
3053
- _ts_decorate27([
3054
- Column24({
3213
+ _ts_decorate28([
3214
+ Column25({
3055
3215
  type: "varchar",
3056
3216
  name: "proofFormat",
3057
3217
  enum: [
@@ -3061,10 +3221,10 @@ _ts_decorate27([
3061
3221
  nullable: false,
3062
3222
  default: "lds"
3063
3223
  }),
3064
- _ts_metadata26("design:type", typeof CredentialProofFormat === "undefined" ? Object : CredentialProofFormat)
3224
+ _ts_metadata27("design:type", typeof CredentialProofFormat === "undefined" ? Object : CredentialProofFormat)
3065
3225
  ], StatusListEntity.prototype, "proofFormat", void 0);
3066
- _ts_decorate27([
3067
- Column24({
3226
+ _ts_decorate28([
3227
+ Column25({
3068
3228
  name: "statusListCredential",
3069
3229
  type: "text",
3070
3230
  nullable: true,
@@ -3084,14 +3244,10 @@ _ts_decorate27([
3084
3244
  }
3085
3245
  }
3086
3246
  }),
3087
- _ts_metadata26("design:type", typeof StatusListCredential === "undefined" ? Object : StatusListCredential)
3247
+ _ts_metadata27("design:type", typeof StatusListCredential === "undefined" ? Object : StatusListCredential)
3088
3248
  ], StatusListEntity.prototype, "statusListCredential", void 0);
3089
- _ts_decorate27([
3090
- OneToMany8((type) => StatusListEntryEntity, (entry) => entry.statusList),
3091
- _ts_metadata26("design:type", Array)
3092
- ], StatusListEntity.prototype, "statusListEntries", void 0);
3093
- StatusListEntity = _ts_decorate27([
3094
- Entity22("StatusList"),
3249
+ StatusListEntity = _ts_decorate28([
3250
+ Entity23("StatusList"),
3095
3251
  Unique("UQ_correlationId", [
3096
3252
  "correlationId"
3097
3253
  ]),
@@ -3099,7 +3255,7 @@ StatusListEntity = _ts_decorate27([
3099
3255
  column: {
3100
3256
  type: "simple-enum",
3101
3257
  name: "type",
3102
- enum: import_ssi_types.StatusListType
3258
+ enum: import_ssi_types2.StatusListType
3103
3259
  }
3104
3260
  })
3105
3261
  ], StatusListEntity);
@@ -3109,9 +3265,10 @@ var StatusList2021Entity = class extends StatusListEntity {
3109
3265
  }
3110
3266
  indexingDirection;
3111
3267
  statusPurpose;
3268
+ statusListEntries;
3112
3269
  };
3113
- _ts_decorate27([
3114
- Column24({
3270
+ _ts_decorate28([
3271
+ Column25({
3115
3272
  type: "varchar",
3116
3273
  name: "indexingDirection",
3117
3274
  enum: [
@@ -3120,19 +3277,23 @@ _ts_decorate27([
3120
3277
  nullable: false,
3121
3278
  default: "rightToLeft"
3122
3279
  }),
3123
- _ts_metadata26("design:type", typeof StatusListIndexingDirection === "undefined" ? Object : StatusListIndexingDirection)
3280
+ _ts_metadata27("design:type", typeof StatusListIndexingDirection === "undefined" ? Object : StatusListIndexingDirection)
3124
3281
  ], StatusList2021Entity.prototype, "indexingDirection", void 0);
3125
- _ts_decorate27([
3126
- Column24({
3282
+ _ts_decorate28([
3283
+ Column25({
3127
3284
  type: "varchar",
3128
3285
  name: "statusPurpose",
3129
3286
  nullable: false,
3130
3287
  default: "revocation"
3131
3288
  }),
3132
- _ts_metadata26("design:type", typeof StatusPurpose2021 === "undefined" ? Object : StatusPurpose2021)
3289
+ _ts_metadata27("design:type", typeof StatusPurpose2021 === "undefined" ? Object : StatusPurpose2021)
3133
3290
  ], StatusList2021Entity.prototype, "statusPurpose", void 0);
3134
- StatusList2021Entity = _ts_decorate27([
3135
- ChildEntity5(import_ssi_types.StatusListType.StatusList2021)
3291
+ _ts_decorate28([
3292
+ OneToMany8((type) => StatusListEntryEntity, (entry) => entry.statusList),
3293
+ _ts_metadata27("design:type", Array)
3294
+ ], StatusList2021Entity.prototype, "statusListEntries", void 0);
3295
+ StatusList2021Entity = _ts_decorate28([
3296
+ ChildEntity5(import_ssi_types2.StatusListType.StatusList2021)
3136
3297
  ], StatusList2021Entity);
3137
3298
  var OAuthStatusListEntity = class extends StatusListEntity {
3138
3299
  static {
@@ -3141,41 +3302,114 @@ var OAuthStatusListEntity = class extends StatusListEntity {
3141
3302
  bitsPerStatus;
3142
3303
  expiresAt;
3143
3304
  };
3144
- _ts_decorate27([
3145
- Column24({
3305
+ _ts_decorate28([
3306
+ Column25({
3146
3307
  type: "integer",
3147
3308
  name: "bitsPerStatus",
3148
3309
  nullable: false
3149
3310
  }),
3150
- _ts_metadata26("design:type", Number)
3311
+ _ts_metadata27("design:type", Number)
3151
3312
  ], OAuthStatusListEntity.prototype, "bitsPerStatus", void 0);
3152
- _ts_decorate27([
3153
- Column24({
3313
+ _ts_decorate28([
3314
+ Column25({
3154
3315
  name: "expiresAt",
3155
3316
  nullable: true,
3156
3317
  type: (0, import_ssi_sdk13.typeOrmDateTime)()
3157
3318
  }),
3158
- _ts_metadata26("design:type", typeof Date === "undefined" ? Object : Date)
3319
+ _ts_metadata27("design:type", typeof Date === "undefined" ? Object : Date)
3159
3320
  ], OAuthStatusListEntity.prototype, "expiresAt", void 0);
3160
- OAuthStatusListEntity = _ts_decorate27([
3161
- ChildEntity5(import_ssi_types.StatusListType.OAuthStatusList)
3321
+ OAuthStatusListEntity = _ts_decorate28([
3322
+ ChildEntity5(import_ssi_types2.StatusListType.OAuthStatusList)
3162
3323
  ], OAuthStatusListEntity);
3324
+ var BitstringStatusListEntity = class extends StatusListEntity {
3325
+ static {
3326
+ __name(this, "BitstringStatusListEntity");
3327
+ }
3328
+ statusPurpose;
3329
+ statusSize;
3330
+ validFrom;
3331
+ validUntil;
3332
+ ttl;
3333
+ statusListEntries;
3334
+ };
3335
+ _ts_decorate28([
3336
+ Column25({
3337
+ type: "varchar",
3338
+ name: "statusPurpose",
3339
+ nullable: false,
3340
+ transformer: {
3341
+ from(value) {
3342
+ if (value?.includes(",")) {
3343
+ return value.split(",").map((v) => v.trim());
3344
+ }
3345
+ return value;
3346
+ },
3347
+ to(value) {
3348
+ if (Array.isArray(value)) {
3349
+ return value.join(",");
3350
+ }
3351
+ return value;
3352
+ }
3353
+ }
3354
+ }),
3355
+ _ts_metadata27("design:type", Object)
3356
+ ], BitstringStatusListEntity.prototype, "statusPurpose", void 0);
3357
+ _ts_decorate28([
3358
+ Column25({
3359
+ type: "integer",
3360
+ name: "statusSize",
3361
+ nullable: true,
3362
+ default: 1
3363
+ }),
3364
+ _ts_metadata27("design:type", Number)
3365
+ ], BitstringStatusListEntity.prototype, "statusSize", void 0);
3366
+ _ts_decorate28([
3367
+ Column25({
3368
+ name: "validFrom",
3369
+ nullable: true,
3370
+ type: (0, import_ssi_sdk13.typeOrmDateTime)()
3371
+ }),
3372
+ _ts_metadata27("design:type", typeof Date === "undefined" ? Object : Date)
3373
+ ], BitstringStatusListEntity.prototype, "validFrom", void 0);
3374
+ _ts_decorate28([
3375
+ Column25({
3376
+ name: "validUntil",
3377
+ nullable: true,
3378
+ type: (0, import_ssi_sdk13.typeOrmDateTime)()
3379
+ }),
3380
+ _ts_metadata27("design:type", typeof Date === "undefined" ? Object : Date)
3381
+ ], BitstringStatusListEntity.prototype, "validUntil", void 0);
3382
+ _ts_decorate28([
3383
+ Column25({
3384
+ type: "integer",
3385
+ name: "ttl",
3386
+ nullable: true
3387
+ }),
3388
+ _ts_metadata27("design:type", Number)
3389
+ ], BitstringStatusListEntity.prototype, "ttl", void 0);
3390
+ _ts_decorate28([
3391
+ OneToMany8((type) => BitstringStatusListEntryEntity, (entry) => entry.statusList),
3392
+ _ts_metadata27("design:type", Array)
3393
+ ], BitstringStatusListEntity.prototype, "statusListEntries", void 0);
3394
+ BitstringStatusListEntity = _ts_decorate28([
3395
+ ChildEntity5(import_ssi_types2.StatusListType.BitstringStatusList)
3396
+ ], BitstringStatusListEntity);
3163
3397
 
3164
3398
  // src/entities/machineState/MachineStateInfoEntity.ts
3165
- var import_typeorm27 = require("typeorm");
3399
+ var import_typeorm28 = require("typeorm");
3166
3400
  var import_ssi_sdk14 = require("@sphereon/ssi-sdk.agent-config");
3167
- function _ts_decorate28(decorators, target, key, desc) {
3401
+ function _ts_decorate29(decorators, target, key, desc) {
3168
3402
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3169
3403
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3170
3404
  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;
3171
3405
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3172
3406
  }
3173
- __name(_ts_decorate28, "_ts_decorate");
3174
- function _ts_metadata27(k, v) {
3407
+ __name(_ts_decorate29, "_ts_decorate");
3408
+ function _ts_metadata28(k, v) {
3175
3409
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
3176
3410
  }
3177
- __name(_ts_metadata27, "_ts_metadata");
3178
- var MachineStateInfoEntity = class extends import_typeorm27.BaseEntity {
3411
+ __name(_ts_metadata28, "_ts_metadata");
3412
+ var MachineStateInfoEntity = class extends import_typeorm28.BaseEntity {
3179
3413
  static {
3180
3414
  __name(this, "MachineStateInfoEntity");
3181
3415
  }
@@ -3193,120 +3427,120 @@ var MachineStateInfoEntity = class extends import_typeorm27.BaseEntity {
3193
3427
  completedAt;
3194
3428
  tenantId;
3195
3429
  };
3196
- _ts_decorate28([
3197
- (0, import_typeorm27.PrimaryColumn)({
3430
+ _ts_decorate29([
3431
+ (0, import_typeorm28.PrimaryColumn)({
3198
3432
  name: "instance_id",
3199
3433
  type: "varchar",
3200
3434
  nullable: false
3201
3435
  }),
3202
- _ts_metadata27("design:type", String)
3436
+ _ts_metadata28("design:type", String)
3203
3437
  ], MachineStateInfoEntity.prototype, "instanceId", void 0);
3204
- _ts_decorate28([
3205
- (0, import_typeorm27.Column)({
3438
+ _ts_decorate29([
3439
+ (0, import_typeorm28.Column)({
3206
3440
  name: "session_id",
3207
3441
  type: "varchar",
3208
3442
  nullable: true
3209
3443
  }),
3210
- _ts_metadata27("design:type", String)
3444
+ _ts_metadata28("design:type", String)
3211
3445
  ], MachineStateInfoEntity.prototype, "sessionId", void 0);
3212
- _ts_decorate28([
3213
- (0, import_typeorm27.Column)({
3446
+ _ts_decorate29([
3447
+ (0, import_typeorm28.Column)({
3214
3448
  name: "machine_name",
3215
3449
  type: "varchar",
3216
3450
  nullable: false
3217
3451
  }),
3218
- _ts_metadata27("design:type", String)
3452
+ _ts_metadata28("design:type", String)
3219
3453
  ], MachineStateInfoEntity.prototype, "machineName", void 0);
3220
- _ts_decorate28([
3221
- (0, import_typeorm27.Column)({
3454
+ _ts_decorate29([
3455
+ (0, import_typeorm28.Column)({
3222
3456
  name: "latest_state_name",
3223
3457
  type: "varchar",
3224
3458
  nullable: true
3225
3459
  }),
3226
- _ts_metadata27("design:type", String)
3460
+ _ts_metadata28("design:type", String)
3227
3461
  ], MachineStateInfoEntity.prototype, "latestStateName", void 0);
3228
- _ts_decorate28([
3229
- (0, import_typeorm27.Column)({
3462
+ _ts_decorate29([
3463
+ (0, import_typeorm28.Column)({
3230
3464
  name: "latest_event_type",
3231
3465
  type: "varchar",
3232
3466
  nullable: false
3233
3467
  }),
3234
- _ts_metadata27("design:type", String)
3468
+ _ts_metadata28("design:type", String)
3235
3469
  ], MachineStateInfoEntity.prototype, "latestEventType", void 0);
3236
- _ts_decorate28([
3237
- (0, import_typeorm27.Column)({
3470
+ _ts_decorate29([
3471
+ (0, import_typeorm28.Column)({
3238
3472
  name: "state",
3239
3473
  type: "text",
3240
3474
  nullable: false
3241
3475
  }),
3242
- _ts_metadata27("design:type", String)
3476
+ _ts_metadata28("design:type", String)
3243
3477
  ], MachineStateInfoEntity.prototype, "state", void 0);
3244
- _ts_decorate28([
3245
- (0, import_typeorm27.CreateDateColumn)({
3478
+ _ts_decorate29([
3479
+ (0, import_typeorm28.CreateDateColumn)({
3246
3480
  name: "created_at",
3247
3481
  nullable: false,
3248
3482
  type: (0, import_ssi_sdk14.typeOrmDateTime)()
3249
3483
  }),
3250
- _ts_metadata27("design:type", typeof Date === "undefined" ? Object : Date)
3484
+ _ts_metadata28("design:type", typeof Date === "undefined" ? Object : Date)
3251
3485
  ], MachineStateInfoEntity.prototype, "createdAt", void 0);
3252
- _ts_decorate28([
3253
- (0, import_typeorm27.UpdateDateColumn)({
3486
+ _ts_decorate29([
3487
+ (0, import_typeorm28.UpdateDateColumn)({
3254
3488
  name: "updated_at",
3255
3489
  nullable: false,
3256
3490
  type: (0, import_ssi_sdk14.typeOrmDateTime)()
3257
3491
  }),
3258
- _ts_metadata27("design:type", typeof Date === "undefined" ? Object : Date)
3492
+ _ts_metadata28("design:type", typeof Date === "undefined" ? Object : Date)
3259
3493
  ], MachineStateInfoEntity.prototype, "updatedAt", void 0);
3260
- _ts_decorate28([
3261
- (0, import_typeorm27.Column)({
3494
+ _ts_decorate29([
3495
+ (0, import_typeorm28.Column)({
3262
3496
  name: "updated_count",
3263
3497
  type: "integer",
3264
3498
  nullable: false
3265
3499
  }),
3266
- _ts_metadata27("design:type", Number)
3500
+ _ts_metadata28("design:type", Number)
3267
3501
  ], MachineStateInfoEntity.prototype, "updatedCount", void 0);
3268
- _ts_decorate28([
3269
- (0, import_typeorm27.Column)({
3502
+ _ts_decorate29([
3503
+ (0, import_typeorm28.Column)({
3270
3504
  name: "expires_at",
3271
3505
  nullable: true,
3272
3506
  type: (0, import_ssi_sdk14.typeOrmDateTime)()
3273
3507
  }),
3274
- _ts_metadata27("design:type", typeof Date === "undefined" ? Object : Date)
3508
+ _ts_metadata28("design:type", typeof Date === "undefined" ? Object : Date)
3275
3509
  ], MachineStateInfoEntity.prototype, "expiresAt", void 0);
3276
- _ts_decorate28([
3277
- (0, import_typeorm27.Column)({
3510
+ _ts_decorate29([
3511
+ (0, import_typeorm28.Column)({
3278
3512
  name: "completed_at",
3279
3513
  nullable: true,
3280
3514
  type: (0, import_ssi_sdk14.typeOrmDateTime)()
3281
3515
  }),
3282
- _ts_metadata27("design:type", typeof Date === "undefined" ? Object : Date)
3516
+ _ts_metadata28("design:type", typeof Date === "undefined" ? Object : Date)
3283
3517
  ], MachineStateInfoEntity.prototype, "completedAt", void 0);
3284
- _ts_decorate28([
3285
- (0, import_typeorm27.Column)({
3518
+ _ts_decorate29([
3519
+ (0, import_typeorm28.Column)({
3286
3520
  name: "tenant_id",
3287
3521
  type: "varchar",
3288
3522
  nullable: true
3289
3523
  }),
3290
- _ts_metadata27("design:type", String)
3524
+ _ts_metadata28("design:type", String)
3291
3525
  ], MachineStateInfoEntity.prototype, "tenantId", void 0);
3292
- MachineStateInfoEntity = _ts_decorate28([
3293
- (0, import_typeorm27.Entity)("MachineStateInfoEntity")
3526
+ MachineStateInfoEntity = _ts_decorate29([
3527
+ (0, import_typeorm28.Entity)("MachineStateInfoEntity")
3294
3528
  ], MachineStateInfoEntity);
3295
3529
 
3296
3530
  // src/entities/contact/OrganizationEntity.ts
3297
- var import_class_validator19 = require("class-validator");
3298
- var import_typeorm28 = require("typeorm");
3299
- function _ts_decorate29(decorators, target, key, desc) {
3531
+ var import_class_validator20 = require("class-validator");
3532
+ var import_typeorm29 = require("typeorm");
3533
+ function _ts_decorate30(decorators, target, key, desc) {
3300
3534
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3301
3535
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3302
3536
  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;
3303
3537
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3304
3538
  }
3305
- __name(_ts_decorate29, "_ts_decorate");
3306
- function _ts_metadata28(k, v) {
3539
+ __name(_ts_decorate30, "_ts_decorate");
3540
+ function _ts_metadata29(k, v) {
3307
3541
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
3308
3542
  }
3309
- __name(_ts_metadata28, "_ts_metadata");
3543
+ __name(_ts_metadata29, "_ts_metadata");
3310
3544
  var OrganizationEntity = class extends BaseContactEntity {
3311
3545
  static {
3312
3546
  __name(this, "OrganizationEntity");
@@ -3316,7 +3550,7 @@ var OrganizationEntity = class extends BaseContactEntity {
3316
3550
  ownerId;
3317
3551
  tenantId;
3318
3552
  async validate() {
3319
- const validation = await (0, import_class_validator19.validate)(this);
3553
+ const validation = await (0, import_class_validator20.validate)(this);
3320
3554
  if (validation.length > 0) {
3321
3555
  const constraint = getConstraint(validation[0]);
3322
3556
  if (constraint) {
@@ -3326,69 +3560,69 @@ var OrganizationEntity = class extends BaseContactEntity {
3326
3560
  }
3327
3561
  }
3328
3562
  };
3329
- _ts_decorate29([
3330
- (0, import_typeorm28.Column)("varchar", {
3563
+ _ts_decorate30([
3564
+ (0, import_typeorm29.Column)("varchar", {
3331
3565
  name: "legal_name",
3332
3566
  length: 255,
3333
3567
  nullable: false,
3334
3568
  unique: true
3335
3569
  }),
3336
- (0, import_class_validator19.IsNotEmpty)({
3570
+ (0, import_class_validator20.IsNotEmpty)({
3337
3571
  message: "Blank legal names are not allowed"
3338
3572
  }),
3339
- _ts_metadata28("design:type", String)
3573
+ _ts_metadata29("design:type", String)
3340
3574
  ], OrganizationEntity.prototype, "legalName", void 0);
3341
- _ts_decorate29([
3342
- (0, import_typeorm28.Column)("varchar", {
3575
+ _ts_decorate30([
3576
+ (0, import_typeorm29.Column)("varchar", {
3343
3577
  name: "display_name",
3344
3578
  length: 255,
3345
3579
  nullable: false,
3346
3580
  unique: false
3347
3581
  }),
3348
- (0, import_class_validator19.IsNotEmpty)({
3582
+ (0, import_class_validator20.IsNotEmpty)({
3349
3583
  message: "Blank display names are not allowed"
3350
3584
  }),
3351
- _ts_metadata28("design:type", String)
3585
+ _ts_metadata29("design:type", String)
3352
3586
  ], OrganizationEntity.prototype, "displayName", void 0);
3353
- _ts_decorate29([
3354
- (0, import_typeorm28.Column)("text", {
3587
+ _ts_decorate30([
3588
+ (0, import_typeorm29.Column)("text", {
3355
3589
  name: "owner_id",
3356
3590
  nullable: true
3357
3591
  }),
3358
- _ts_metadata28("design:type", String)
3592
+ _ts_metadata29("design:type", String)
3359
3593
  ], OrganizationEntity.prototype, "ownerId", void 0);
3360
- _ts_decorate29([
3361
- (0, import_typeorm28.Column)("text", {
3594
+ _ts_decorate30([
3595
+ (0, import_typeorm29.Column)("text", {
3362
3596
  name: "tenant_id",
3363
3597
  nullable: true
3364
3598
  }),
3365
- _ts_metadata28("design:type", String)
3599
+ _ts_metadata29("design:type", String)
3366
3600
  ], OrganizationEntity.prototype, "tenantId", void 0);
3367
- _ts_decorate29([
3368
- (0, import_typeorm28.BeforeInsert)(),
3369
- (0, import_typeorm28.BeforeUpdate)(),
3370
- _ts_metadata28("design:type", Function),
3371
- _ts_metadata28("design:paramtypes", []),
3372
- _ts_metadata28("design:returntype", Promise)
3601
+ _ts_decorate30([
3602
+ (0, import_typeorm29.BeforeInsert)(),
3603
+ (0, import_typeorm29.BeforeUpdate)(),
3604
+ _ts_metadata29("design:type", Function),
3605
+ _ts_metadata29("design:paramtypes", []),
3606
+ _ts_metadata29("design:returntype", Promise)
3373
3607
  ], OrganizationEntity.prototype, "validate", null);
3374
- OrganizationEntity = _ts_decorate29([
3375
- (0, import_typeorm28.ChildEntity)("Organization")
3608
+ OrganizationEntity = _ts_decorate30([
3609
+ (0, import_typeorm29.ChildEntity)("Organization")
3376
3610
  ], OrganizationEntity);
3377
3611
 
3378
3612
  // src/entities/contact/NaturalPersonEntity.ts
3379
- var import_typeorm29 = require("typeorm");
3380
- var import_class_validator20 = require("class-validator");
3381
- function _ts_decorate30(decorators, target, key, desc) {
3613
+ var import_typeorm30 = require("typeorm");
3614
+ var import_class_validator21 = require("class-validator");
3615
+ function _ts_decorate31(decorators, target, key, desc) {
3382
3616
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3383
3617
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3384
3618
  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;
3385
3619
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3386
3620
  }
3387
- __name(_ts_decorate30, "_ts_decorate");
3388
- function _ts_metadata29(k, v) {
3621
+ __name(_ts_decorate31, "_ts_decorate");
3622
+ function _ts_metadata30(k, v) {
3389
3623
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
3390
3624
  }
3391
- __name(_ts_metadata29, "_ts_metadata");
3625
+ __name(_ts_metadata30, "_ts_metadata");
3392
3626
  var NaturalPersonEntity = class extends BaseContactEntity {
3393
3627
  static {
3394
3628
  __name(this, "NaturalPersonEntity");
@@ -3400,7 +3634,7 @@ var NaturalPersonEntity = class extends BaseContactEntity {
3400
3634
  ownerId;
3401
3635
  tenantId;
3402
3636
  async validate() {
3403
- const validation = await (0, import_class_validator20.validate)(this);
3637
+ const validation = await (0, import_class_validator21.validate)(this);
3404
3638
  if (validation.length > 0) {
3405
3639
  const constraint = getConstraint(validation[0]);
3406
3640
  if (constraint) {
@@ -3410,96 +3644,96 @@ var NaturalPersonEntity = class extends BaseContactEntity {
3410
3644
  }
3411
3645
  }
3412
3646
  };
3413
- _ts_decorate30([
3414
- (0, import_typeorm29.Column)("varchar", {
3647
+ _ts_decorate31([
3648
+ (0, import_typeorm30.Column)("varchar", {
3415
3649
  name: "first_name",
3416
3650
  length: 255,
3417
3651
  nullable: false,
3418
3652
  unique: false
3419
3653
  }),
3420
- (0, import_class_validator20.IsNotEmpty)({
3654
+ (0, import_class_validator21.IsNotEmpty)({
3421
3655
  message: "Blank first names are not allowed"
3422
3656
  }),
3423
- _ts_metadata29("design:type", String)
3657
+ _ts_metadata30("design:type", String)
3424
3658
  ], NaturalPersonEntity.prototype, "firstName", void 0);
3425
- _ts_decorate30([
3426
- (0, import_typeorm29.Column)("varchar", {
3659
+ _ts_decorate31([
3660
+ (0, import_typeorm30.Column)("varchar", {
3427
3661
  name: "middle_name",
3428
3662
  length: 255,
3429
3663
  nullable: true,
3430
3664
  unique: false
3431
3665
  }),
3432
- (0, import_class_validator20.Validate)(IsNonEmptyStringConstraint, {
3666
+ (0, import_class_validator21.Validate)(IsNonEmptyStringConstraint, {
3433
3667
  message: "Blank middle names are not allowed"
3434
3668
  }),
3435
- _ts_metadata29("design:type", String)
3669
+ _ts_metadata30("design:type", String)
3436
3670
  ], NaturalPersonEntity.prototype, "middleName", void 0);
3437
- _ts_decorate30([
3438
- (0, import_typeorm29.Column)("varchar", {
3671
+ _ts_decorate31([
3672
+ (0, import_typeorm30.Column)("varchar", {
3439
3673
  name: "last_name",
3440
3674
  length: 255,
3441
3675
  nullable: false,
3442
3676
  unique: false
3443
3677
  }),
3444
- (0, import_class_validator20.IsNotEmpty)({
3678
+ (0, import_class_validator21.IsNotEmpty)({
3445
3679
  message: "Blank last names are not allowed"
3446
3680
  }),
3447
- _ts_metadata29("design:type", String)
3681
+ _ts_metadata30("design:type", String)
3448
3682
  ], NaturalPersonEntity.prototype, "lastName", void 0);
3449
- _ts_decorate30([
3450
- (0, import_typeorm29.Column)("varchar", {
3683
+ _ts_decorate31([
3684
+ (0, import_typeorm30.Column)("varchar", {
3451
3685
  name: "display_name",
3452
3686
  length: 255,
3453
3687
  nullable: false,
3454
3688
  unique: false
3455
3689
  }),
3456
- (0, import_class_validator20.IsNotEmpty)({
3690
+ (0, import_class_validator21.IsNotEmpty)({
3457
3691
  message: "Blank display names are not allowed"
3458
3692
  }),
3459
- _ts_metadata29("design:type", String)
3693
+ _ts_metadata30("design:type", String)
3460
3694
  ], NaturalPersonEntity.prototype, "displayName", void 0);
3461
- _ts_decorate30([
3462
- (0, import_typeorm29.Column)("text", {
3695
+ _ts_decorate31([
3696
+ (0, import_typeorm30.Column)("text", {
3463
3697
  name: "owner_id",
3464
3698
  nullable: true
3465
3699
  }),
3466
- _ts_metadata29("design:type", String)
3700
+ _ts_metadata30("design:type", String)
3467
3701
  ], NaturalPersonEntity.prototype, "ownerId", void 0);
3468
- _ts_decorate30([
3469
- (0, import_typeorm29.Column)("text", {
3702
+ _ts_decorate31([
3703
+ (0, import_typeorm30.Column)("text", {
3470
3704
  name: "tenant_id",
3471
3705
  nullable: true
3472
3706
  }),
3473
- _ts_metadata29("design:type", String)
3707
+ _ts_metadata30("design:type", String)
3474
3708
  ], NaturalPersonEntity.prototype, "tenantId", void 0);
3475
- _ts_decorate30([
3476
- (0, import_typeorm29.BeforeInsert)(),
3477
- (0, import_typeorm29.BeforeUpdate)(),
3478
- _ts_metadata29("design:type", Function),
3479
- _ts_metadata29("design:paramtypes", []),
3480
- _ts_metadata29("design:returntype", Promise)
3709
+ _ts_decorate31([
3710
+ (0, import_typeorm30.BeforeInsert)(),
3711
+ (0, import_typeorm30.BeforeUpdate)(),
3712
+ _ts_metadata30("design:type", Function),
3713
+ _ts_metadata30("design:paramtypes", []),
3714
+ _ts_metadata30("design:returntype", Promise)
3481
3715
  ], NaturalPersonEntity.prototype, "validate", null);
3482
- NaturalPersonEntity = _ts_decorate30([
3483
- (0, import_typeorm29.ChildEntity)("NaturalPerson")
3716
+ NaturalPersonEntity = _ts_decorate31([
3717
+ (0, import_typeorm30.ChildEntity)("NaturalPerson")
3484
3718
  ], NaturalPersonEntity);
3485
3719
 
3486
3720
  // src/entities/eventLogger/AuditEventEntity.ts
3487
- var import_ssi_types2 = require("@sphereon/ssi-types");
3721
+ var import_ssi_types3 = require("@sphereon/ssi-types");
3488
3722
  var import_ssi_sdk15 = require("@sphereon/ssi-sdk.core");
3489
3723
  var import_ssi_sdk16 = require("@sphereon/ssi-sdk.agent-config");
3490
- var import_typeorm30 = require("typeorm");
3491
- function _ts_decorate31(decorators, target, key, desc) {
3724
+ var import_typeorm31 = require("typeorm");
3725
+ function _ts_decorate32(decorators, target, key, desc) {
3492
3726
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3493
3727
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3494
3728
  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;
3495
3729
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3496
3730
  }
3497
- __name(_ts_decorate31, "_ts_decorate");
3498
- function _ts_metadata30(k, v) {
3731
+ __name(_ts_decorate32, "_ts_decorate");
3732
+ function _ts_metadata31(k, v) {
3499
3733
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
3500
3734
  }
3501
- __name(_ts_metadata30, "_ts_metadata");
3502
- var AuditEventEntity = class extends import_typeorm30.BaseEntity {
3735
+ __name(_ts_metadata31, "_ts_metadata");
3736
+ var AuditEventEntity = class extends import_typeorm31.BaseEntity {
3503
3737
  static {
3504
3738
  __name(this, "AuditEventEntity");
3505
3739
  }
@@ -3530,240 +3764,240 @@ var AuditEventEntity = class extends import_typeorm30.BaseEntity {
3530
3764
  createdAt;
3531
3765
  lastUpdatedAt;
3532
3766
  };
3533
- _ts_decorate31([
3534
- (0, import_typeorm30.PrimaryGeneratedColumn)("uuid"),
3535
- _ts_metadata30("design:type", String)
3767
+ _ts_decorate32([
3768
+ (0, import_typeorm31.PrimaryGeneratedColumn)("uuid"),
3769
+ _ts_metadata31("design:type", String)
3536
3770
  ], AuditEventEntity.prototype, "id", void 0);
3537
- _ts_decorate31([
3538
- (0, import_typeorm30.Column)({
3771
+ _ts_decorate32([
3772
+ (0, import_typeorm31.Column)({
3539
3773
  name: "timestamp",
3540
3774
  nullable: false,
3541
3775
  unique: false,
3542
3776
  type: (0, import_ssi_sdk16.typeOrmDateTime)()
3543
3777
  }),
3544
- _ts_metadata30("design:type", typeof Date === "undefined" ? Object : Date)
3778
+ _ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
3545
3779
  ], AuditEventEntity.prototype, "timestamp", void 0);
3546
- _ts_decorate31([
3547
- (0, import_typeorm30.Column)("simple-enum", {
3780
+ _ts_decorate32([
3781
+ (0, import_typeorm31.Column)("simple-enum", {
3548
3782
  name: "eventType",
3549
- enum: import_ssi_types2.LoggingEventType,
3783
+ enum: import_ssi_types3.LoggingEventType,
3550
3784
  nullable: false,
3551
3785
  unique: false
3552
3786
  }),
3553
- _ts_metadata30("design:type", typeof import_ssi_types2.LoggingEventType === "undefined" ? Object : import_ssi_types2.LoggingEventType)
3787
+ _ts_metadata31("design:type", typeof import_ssi_types3.LoggingEventType === "undefined" ? Object : import_ssi_types3.LoggingEventType)
3554
3788
  ], AuditEventEntity.prototype, "type", void 0);
3555
- _ts_decorate31([
3556
- (0, import_typeorm30.Column)("simple-enum", {
3789
+ _ts_decorate32([
3790
+ (0, import_typeorm31.Column)("simple-enum", {
3557
3791
  name: "level",
3558
- enum: import_ssi_types2.LogLevel,
3792
+ enum: import_ssi_types3.LogLevel,
3559
3793
  nullable: false,
3560
3794
  unique: false
3561
3795
  }),
3562
- _ts_metadata30("design:type", typeof import_ssi_types2.LogLevel === "undefined" ? Object : import_ssi_types2.LogLevel)
3796
+ _ts_metadata31("design:type", typeof import_ssi_types3.LogLevel === "undefined" ? Object : import_ssi_types3.LogLevel)
3563
3797
  ], AuditEventEntity.prototype, "level", void 0);
3564
- _ts_decorate31([
3565
- (0, import_typeorm30.Column)("text", {
3798
+ _ts_decorate32([
3799
+ (0, import_typeorm31.Column)("text", {
3566
3800
  name: "correlationId",
3567
3801
  nullable: false,
3568
3802
  unique: false
3569
3803
  }),
3570
- _ts_metadata30("design:type", String)
3804
+ _ts_metadata31("design:type", String)
3571
3805
  ], AuditEventEntity.prototype, "correlationId", void 0);
3572
- _ts_decorate31([
3573
- (0, import_typeorm30.Column)("simple-enum", {
3806
+ _ts_decorate32([
3807
+ (0, import_typeorm31.Column)("simple-enum", {
3574
3808
  name: "system",
3575
- enum: import_ssi_types2.System,
3809
+ enum: import_ssi_types3.System,
3576
3810
  nullable: false,
3577
3811
  unique: false
3578
3812
  }),
3579
- _ts_metadata30("design:type", typeof import_ssi_types2.System === "undefined" ? Object : import_ssi_types2.System)
3813
+ _ts_metadata31("design:type", typeof import_ssi_types3.System === "undefined" ? Object : import_ssi_types3.System)
3580
3814
  ], AuditEventEntity.prototype, "system", void 0);
3581
- _ts_decorate31([
3582
- (0, import_typeorm30.Column)("simple-enum", {
3815
+ _ts_decorate32([
3816
+ (0, import_typeorm31.Column)("simple-enum", {
3583
3817
  name: "subSystemType",
3584
- enum: import_ssi_types2.SubSystem,
3818
+ enum: import_ssi_types3.SubSystem,
3585
3819
  nullable: false,
3586
3820
  unique: false
3587
3821
  }),
3588
- _ts_metadata30("design:type", typeof import_ssi_types2.SubSystem === "undefined" ? Object : import_ssi_types2.SubSystem)
3822
+ _ts_metadata31("design:type", typeof import_ssi_types3.SubSystem === "undefined" ? Object : import_ssi_types3.SubSystem)
3589
3823
  ], AuditEventEntity.prototype, "subSystemType", void 0);
3590
- _ts_decorate31([
3591
- (0, import_typeorm30.Column)("simple-enum", {
3824
+ _ts_decorate32([
3825
+ (0, import_typeorm31.Column)("simple-enum", {
3592
3826
  name: "actionType",
3593
- enum: import_ssi_types2.ActionType,
3827
+ enum: import_ssi_types3.ActionType,
3594
3828
  nullable: false,
3595
3829
  unique: false
3596
3830
  }),
3597
- _ts_metadata30("design:type", typeof import_ssi_types2.ActionType === "undefined" ? Object : import_ssi_types2.ActionType)
3831
+ _ts_metadata31("design:type", typeof import_ssi_types3.ActionType === "undefined" ? Object : import_ssi_types3.ActionType)
3598
3832
  ], AuditEventEntity.prototype, "actionType", void 0);
3599
- _ts_decorate31([
3600
- (0, import_typeorm30.Column)({
3833
+ _ts_decorate32([
3834
+ (0, import_typeorm31.Column)({
3601
3835
  name: "actionSubType",
3602
3836
  type: "varchar",
3603
3837
  nullable: false,
3604
3838
  unique: false
3605
3839
  }),
3606
- _ts_metadata30("design:type", typeof ActionSubType === "undefined" ? Object : ActionSubType)
3840
+ _ts_metadata31("design:type", typeof ActionSubType === "undefined" ? Object : ActionSubType)
3607
3841
  ], AuditEventEntity.prototype, "actionSubType", void 0);
3608
- _ts_decorate31([
3609
- (0, import_typeorm30.Column)("simple-enum", {
3842
+ _ts_decorate32([
3843
+ (0, import_typeorm31.Column)("simple-enum", {
3610
3844
  name: "initiatorType",
3611
- enum: import_ssi_types2.InitiatorType,
3845
+ enum: import_ssi_types3.InitiatorType,
3612
3846
  nullable: false,
3613
3847
  unique: false
3614
3848
  }),
3615
- _ts_metadata30("design:type", typeof import_ssi_types2.InitiatorType === "undefined" ? Object : import_ssi_types2.InitiatorType)
3849
+ _ts_metadata31("design:type", typeof import_ssi_types3.InitiatorType === "undefined" ? Object : import_ssi_types3.InitiatorType)
3616
3850
  ], AuditEventEntity.prototype, "initiatorType", void 0);
3617
- _ts_decorate31([
3618
- (0, import_typeorm30.Column)("simple-enum", {
3851
+ _ts_decorate32([
3852
+ (0, import_typeorm31.Column)("simple-enum", {
3619
3853
  name: "systemCorrelationIdType",
3620
- enum: import_ssi_types2.SystemCorrelationIdType,
3854
+ enum: import_ssi_types3.SystemCorrelationIdType,
3621
3855
  nullable: true,
3622
3856
  unique: false
3623
3857
  }),
3624
- _ts_metadata30("design:type", typeof import_ssi_types2.SystemCorrelationIdType === "undefined" ? Object : import_ssi_types2.SystemCorrelationIdType)
3858
+ _ts_metadata31("design:type", typeof import_ssi_types3.SystemCorrelationIdType === "undefined" ? Object : import_ssi_types3.SystemCorrelationIdType)
3625
3859
  ], AuditEventEntity.prototype, "systemCorrelationIdType", void 0);
3626
- _ts_decorate31([
3627
- (0, import_typeorm30.Column)("text", {
3860
+ _ts_decorate32([
3861
+ (0, import_typeorm31.Column)("text", {
3628
3862
  name: "systemCorrelationId",
3629
3863
  nullable: true,
3630
3864
  unique: false
3631
3865
  }),
3632
- _ts_metadata30("design:type", String)
3866
+ _ts_metadata31("design:type", String)
3633
3867
  ], AuditEventEntity.prototype, "systemCorrelationId", void 0);
3634
- _ts_decorate31([
3635
- (0, import_typeorm30.Column)("text", {
3868
+ _ts_decorate32([
3869
+ (0, import_typeorm31.Column)("text", {
3636
3870
  name: "systemAlias",
3637
3871
  nullable: true,
3638
3872
  unique: false
3639
3873
  }),
3640
- _ts_metadata30("design:type", String)
3874
+ _ts_metadata31("design:type", String)
3641
3875
  ], AuditEventEntity.prototype, "systemAlias", void 0);
3642
- _ts_decorate31([
3643
- (0, import_typeorm30.Column)("simple-enum", {
3876
+ _ts_decorate32([
3877
+ (0, import_typeorm31.Column)("simple-enum", {
3644
3878
  name: "partyCorrelationType",
3645
3879
  enum: import_ssi_sdk15.PartyCorrelationType,
3646
3880
  nullable: true,
3647
3881
  unique: false
3648
3882
  }),
3649
- _ts_metadata30("design:type", typeof import_ssi_sdk15.PartyCorrelationType === "undefined" ? Object : import_ssi_sdk15.PartyCorrelationType)
3883
+ _ts_metadata31("design:type", typeof import_ssi_sdk15.PartyCorrelationType === "undefined" ? Object : import_ssi_sdk15.PartyCorrelationType)
3650
3884
  ], AuditEventEntity.prototype, "partyCorrelationType", void 0);
3651
- _ts_decorate31([
3652
- (0, import_typeorm30.Column)("text", {
3885
+ _ts_decorate32([
3886
+ (0, import_typeorm31.Column)("text", {
3653
3887
  name: "partyCorrelationId",
3654
3888
  nullable: true,
3655
3889
  unique: false
3656
3890
  }),
3657
- _ts_metadata30("design:type", String)
3891
+ _ts_metadata31("design:type", String)
3658
3892
  ], AuditEventEntity.prototype, "partyCorrelationId", void 0);
3659
- _ts_decorate31([
3660
- (0, import_typeorm30.Column)("text", {
3893
+ _ts_decorate32([
3894
+ (0, import_typeorm31.Column)("text", {
3661
3895
  name: "partyAlias",
3662
3896
  nullable: true,
3663
3897
  unique: false
3664
3898
  }),
3665
- _ts_metadata30("design:type", String)
3899
+ _ts_metadata31("design:type", String)
3666
3900
  ], AuditEventEntity.prototype, "partyAlias", void 0);
3667
- _ts_decorate31([
3668
- (0, import_typeorm30.Column)("text", {
3901
+ _ts_decorate32([
3902
+ (0, import_typeorm31.Column)("text", {
3669
3903
  name: "description",
3670
3904
  nullable: false,
3671
3905
  unique: false
3672
3906
  }),
3673
- _ts_metadata30("design:type", String)
3907
+ _ts_metadata31("design:type", String)
3674
3908
  ], AuditEventEntity.prototype, "description", void 0);
3675
- _ts_decorate31([
3676
- (0, import_typeorm30.Column)("simple-enum", {
3909
+ _ts_decorate32([
3910
+ (0, import_typeorm31.Column)("simple-enum", {
3677
3911
  name: "credentialType",
3678
3912
  enum: import_ssi_sdk15.CredentialType,
3679
3913
  nullable: true,
3680
3914
  unique: false
3681
3915
  }),
3682
- _ts_metadata30("design:type", typeof import_ssi_sdk15.CredentialType === "undefined" ? Object : import_ssi_sdk15.CredentialType)
3916
+ _ts_metadata31("design:type", typeof import_ssi_sdk15.CredentialType === "undefined" ? Object : import_ssi_sdk15.CredentialType)
3683
3917
  ], AuditEventEntity.prototype, "credentialType", void 0);
3684
- _ts_decorate31([
3685
- (0, import_typeorm30.Column)("text", {
3918
+ _ts_decorate32([
3919
+ (0, import_typeorm31.Column)("text", {
3686
3920
  name: "credentialHash",
3687
3921
  nullable: true,
3688
3922
  unique: false
3689
3923
  }),
3690
- _ts_metadata30("design:type", String)
3924
+ _ts_metadata31("design:type", String)
3691
3925
  ], AuditEventEntity.prototype, "credentialHash", void 0);
3692
- _ts_decorate31([
3693
- (0, import_typeorm30.Column)("text", {
3926
+ _ts_decorate32([
3927
+ (0, import_typeorm31.Column)("text", {
3694
3928
  name: "parentCredentialHash",
3695
3929
  nullable: true,
3696
3930
  unique: false
3697
3931
  }),
3698
- _ts_metadata30("design:type", String)
3932
+ _ts_metadata31("design:type", String)
3699
3933
  ], AuditEventEntity.prototype, "parentCredentialHash", void 0);
3700
- _ts_decorate31([
3701
- (0, import_typeorm30.Column)("text", {
3934
+ _ts_decorate32([
3935
+ (0, import_typeorm31.Column)("text", {
3702
3936
  name: "originalCredential",
3703
3937
  nullable: true,
3704
3938
  unique: false
3705
3939
  }),
3706
- _ts_metadata30("design:type", String)
3940
+ _ts_metadata31("design:type", String)
3707
3941
  ], AuditEventEntity.prototype, "originalCredential", void 0);
3708
- _ts_decorate31([
3709
- (0, import_typeorm30.Column)("text", {
3942
+ _ts_decorate32([
3943
+ (0, import_typeorm31.Column)("text", {
3710
3944
  name: "sharePurpose",
3711
3945
  nullable: true,
3712
3946
  unique: false
3713
3947
  }),
3714
- _ts_metadata30("design:type", String)
3948
+ _ts_metadata31("design:type", String)
3715
3949
  ], AuditEventEntity.prototype, "sharePurpose", void 0);
3716
- _ts_decorate31([
3717
- (0, import_typeorm30.Column)("text", {
3950
+ _ts_decorate32([
3951
+ (0, import_typeorm31.Column)("text", {
3718
3952
  name: "data",
3719
3953
  nullable: true,
3720
3954
  unique: false
3721
3955
  }),
3722
- _ts_metadata30("design:type", String)
3956
+ _ts_metadata31("design:type", String)
3723
3957
  ], AuditEventEntity.prototype, "data", void 0);
3724
- _ts_decorate31([
3725
- (0, import_typeorm30.Column)("text", {
3958
+ _ts_decorate32([
3959
+ (0, import_typeorm31.Column)("text", {
3726
3960
  name: "diagnosticData",
3727
3961
  nullable: true,
3728
3962
  unique: false
3729
3963
  }),
3730
- _ts_metadata30("design:type", String)
3964
+ _ts_metadata31("design:type", String)
3731
3965
  ], AuditEventEntity.prototype, "diagnosticData", void 0);
3732
- _ts_decorate31([
3733
- (0, import_typeorm30.CreateDateColumn)({
3966
+ _ts_decorate32([
3967
+ (0, import_typeorm31.CreateDateColumn)({
3734
3968
  name: "created_at",
3735
3969
  nullable: false,
3736
3970
  type: (0, import_ssi_sdk16.typeOrmDateTime)()
3737
3971
  }),
3738
- _ts_metadata30("design:type", typeof Date === "undefined" ? Object : Date)
3972
+ _ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
3739
3973
  ], AuditEventEntity.prototype, "createdAt", void 0);
3740
- _ts_decorate31([
3741
- (0, import_typeorm30.UpdateDateColumn)({
3974
+ _ts_decorate32([
3975
+ (0, import_typeorm31.UpdateDateColumn)({
3742
3976
  name: "last_updated_at",
3743
3977
  nullable: false,
3744
3978
  type: (0, import_ssi_sdk16.typeOrmDateTime)()
3745
3979
  }),
3746
- _ts_metadata30("design:type", typeof Date === "undefined" ? Object : Date)
3980
+ _ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
3747
3981
  ], AuditEventEntity.prototype, "lastUpdatedAt", void 0);
3748
- AuditEventEntity = _ts_decorate31([
3749
- (0, import_typeorm30.Entity)("AuditEvents")
3982
+ AuditEventEntity = _ts_decorate32([
3983
+ (0, import_typeorm31.Entity)("AuditEvents")
3750
3984
  ], AuditEventEntity);
3751
3985
 
3752
3986
  // src/entities/digitalCredential/DigitalCredentialEntity.ts
3753
3987
  var import_ssi_sdk17 = require("@sphereon/ssi-sdk.agent-config");
3754
- var import_typeorm31 = require("typeorm");
3755
- function _ts_decorate32(decorators, target, key, desc) {
3988
+ var import_typeorm32 = require("typeorm");
3989
+ function _ts_decorate33(decorators, target, key, desc) {
3756
3990
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3757
3991
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
3758
3992
  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;
3759
3993
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3760
3994
  }
3761
- __name(_ts_decorate32, "_ts_decorate");
3762
- function _ts_metadata31(k, v) {
3995
+ __name(_ts_decorate33, "_ts_decorate");
3996
+ function _ts_metadata32(k, v) {
3763
3997
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
3764
3998
  }
3765
- __name(_ts_metadata31, "_ts_metadata");
3766
- var DigitalCredentialEntity = class extends import_typeorm31.BaseEntity {
3999
+ __name(_ts_metadata32, "_ts_metadata");
4000
+ var DigitalCredentialEntity = class extends import_typeorm32.BaseEntity {
3767
4001
  static {
3768
4002
  __name(this, "DigitalCredentialEntity");
3769
4003
  }
@@ -3796,236 +4030,236 @@ var DigitalCredentialEntity = class extends import_typeorm31.BaseEntity {
3796
4030
  verifiedAt;
3797
4031
  revokedAt;
3798
4032
  };
3799
- _ts_decorate32([
3800
- (0, import_typeorm31.PrimaryGeneratedColumn)("uuid"),
3801
- _ts_metadata31("design:type", String)
4033
+ _ts_decorate33([
4034
+ (0, import_typeorm32.PrimaryGeneratedColumn)("uuid"),
4035
+ _ts_metadata32("design:type", String)
3802
4036
  ], DigitalCredentialEntity.prototype, "id", void 0);
3803
- _ts_decorate32([
3804
- (0, import_typeorm31.Column)("text", {
4037
+ _ts_decorate33([
4038
+ (0, import_typeorm32.Column)("text", {
3805
4039
  name: "parent_id",
3806
4040
  nullable: true
3807
4041
  }),
3808
- _ts_metadata31("design:type", String)
4042
+ _ts_metadata32("design:type", String)
3809
4043
  ], DigitalCredentialEntity.prototype, "parentId", void 0);
3810
- _ts_decorate32([
3811
- (0, import_typeorm31.Column)("simple-enum", {
4044
+ _ts_decorate33([
4045
+ (0, import_typeorm32.Column)("simple-enum", {
3812
4046
  name: "document_type",
3813
4047
  enum: DocumentType,
3814
4048
  nullable: false
3815
4049
  }),
3816
- _ts_metadata31("design:type", typeof DocumentType === "undefined" ? Object : DocumentType)
4050
+ _ts_metadata32("design:type", typeof DocumentType === "undefined" ? Object : DocumentType)
3817
4051
  ], DigitalCredentialEntity.prototype, "documentType", void 0);
3818
- _ts_decorate32([
3819
- (0, import_typeorm31.Column)("simple-enum", {
4052
+ _ts_decorate33([
4053
+ (0, import_typeorm32.Column)("simple-enum", {
3820
4054
  name: "regulation_type",
3821
4055
  enum: RegulationType,
3822
4056
  nullable: false
3823
4057
  }),
3824
- _ts_metadata31("design:type", typeof RegulationType === "undefined" ? Object : RegulationType)
4058
+ _ts_metadata32("design:type", typeof RegulationType === "undefined" ? Object : RegulationType)
3825
4059
  ], DigitalCredentialEntity.prototype, "regulationType", void 0);
3826
- _ts_decorate32([
3827
- (0, import_typeorm31.Column)("simple-enum", {
4060
+ _ts_decorate33([
4061
+ (0, import_typeorm32.Column)("simple-enum", {
3828
4062
  name: "document_format",
3829
4063
  enum: CredentialDocumentFormat,
3830
4064
  nullable: false
3831
4065
  }),
3832
- _ts_metadata31("design:type", typeof CredentialDocumentFormat === "undefined" ? Object : CredentialDocumentFormat)
4066
+ _ts_metadata32("design:type", typeof CredentialDocumentFormat === "undefined" ? Object : CredentialDocumentFormat)
3833
4067
  ], DigitalCredentialEntity.prototype, "documentFormat", void 0);
3834
- _ts_decorate32([
3835
- (0, import_typeorm31.Column)("simple-enum", {
4068
+ _ts_decorate33([
4069
+ (0, import_typeorm32.Column)("simple-enum", {
3836
4070
  name: "credential_role",
3837
4071
  enum: CredentialRole,
3838
4072
  nullable: false
3839
4073
  }),
3840
- _ts_metadata31("design:type", typeof CredentialRole === "undefined" ? Object : CredentialRole)
4074
+ _ts_metadata32("design:type", typeof CredentialRole === "undefined" ? Object : CredentialRole)
3841
4075
  ], DigitalCredentialEntity.prototype, "credentialRole", void 0);
3842
- _ts_decorate32([
3843
- (0, import_typeorm31.Column)("text", {
4076
+ _ts_decorate33([
4077
+ (0, import_typeorm32.Column)("text", {
3844
4078
  name: "raw_document",
3845
4079
  nullable: false
3846
4080
  }),
3847
- _ts_metadata31("design:type", String)
4081
+ _ts_metadata32("design:type", String)
3848
4082
  ], DigitalCredentialEntity.prototype, "rawDocument", void 0);
3849
- _ts_decorate32([
3850
- (0, import_typeorm31.Column)("text", {
4083
+ _ts_decorate33([
4084
+ (0, import_typeorm32.Column)("text", {
3851
4085
  name: "uniform_document",
3852
4086
  nullable: false
3853
4087
  }),
3854
- _ts_metadata31("design:type", String)
4088
+ _ts_metadata32("design:type", String)
3855
4089
  ], DigitalCredentialEntity.prototype, "uniformDocument", void 0);
3856
- _ts_decorate32([
3857
- (0, import_typeorm31.Column)("text", {
4090
+ _ts_decorate33([
4091
+ (0, import_typeorm32.Column)("text", {
3858
4092
  name: "credential_id",
3859
4093
  nullable: true,
3860
4094
  unique: false
3861
4095
  }),
3862
- _ts_metadata31("design:type", String)
4096
+ _ts_metadata32("design:type", String)
3863
4097
  ], DigitalCredentialEntity.prototype, "credentialId", void 0);
3864
- _ts_decorate32([
3865
- (0, import_typeorm31.Column)("text", {
4098
+ _ts_decorate33([
4099
+ (0, import_typeorm32.Column)("text", {
3866
4100
  name: "hash",
3867
4101
  nullable: false,
3868
4102
  unique: true
3869
4103
  }),
3870
- _ts_metadata31("design:type", String)
4104
+ _ts_metadata32("design:type", String)
3871
4105
  ], DigitalCredentialEntity.prototype, "hash", void 0);
3872
- _ts_decorate32([
3873
- (0, import_typeorm31.Column)("text", {
4106
+ _ts_decorate33([
4107
+ (0, import_typeorm32.Column)("text", {
3874
4108
  name: "kms_key_ref",
3875
4109
  nullable: true
3876
4110
  }),
3877
- _ts_metadata31("design:type", String)
4111
+ _ts_metadata32("design:type", String)
3878
4112
  ], DigitalCredentialEntity.prototype, "kmsKeyRef", void 0);
3879
- _ts_decorate32([
3880
- (0, import_typeorm31.Column)("text", {
4113
+ _ts_decorate33([
4114
+ (0, import_typeorm32.Column)("text", {
3881
4115
  name: "identifier_method",
3882
4116
  nullable: true
3883
4117
  }),
3884
- _ts_metadata31("design:type", String)
4118
+ _ts_metadata32("design:type", String)
3885
4119
  ], DigitalCredentialEntity.prototype, "identifierMethod", void 0);
3886
- _ts_decorate32([
3887
- (0, import_typeorm31.Column)("simple-enum", {
4120
+ _ts_decorate33([
4121
+ (0, import_typeorm32.Column)("simple-enum", {
3888
4122
  name: "issuer_correlation_type",
3889
4123
  enum: CredentialCorrelationType,
3890
4124
  nullable: false
3891
4125
  }),
3892
- _ts_metadata31("design:type", typeof CredentialCorrelationType === "undefined" ? Object : CredentialCorrelationType)
4126
+ _ts_metadata32("design:type", typeof CredentialCorrelationType === "undefined" ? Object : CredentialCorrelationType)
3893
4127
  ], DigitalCredentialEntity.prototype, "issuerCorrelationType", void 0);
3894
- _ts_decorate32([
3895
- (0, import_typeorm31.Column)("simple-enum", {
4128
+ _ts_decorate33([
4129
+ (0, import_typeorm32.Column)("simple-enum", {
3896
4130
  name: "subject_correlation_type",
3897
4131
  enum: CredentialCorrelationType,
3898
4132
  nullable: true
3899
4133
  }),
3900
- _ts_metadata31("design:type", typeof CredentialCorrelationType === "undefined" ? Object : CredentialCorrelationType)
4134
+ _ts_metadata32("design:type", typeof CredentialCorrelationType === "undefined" ? Object : CredentialCorrelationType)
3901
4135
  ], DigitalCredentialEntity.prototype, "subjectCorrelationType", void 0);
3902
- _ts_decorate32([
3903
- (0, import_typeorm31.Column)("simple-enum", {
4136
+ _ts_decorate33([
4137
+ (0, import_typeorm32.Column)("simple-enum", {
3904
4138
  name: "rp_correlation_type",
3905
4139
  enum: CredentialCorrelationType,
3906
4140
  nullable: true
3907
4141
  }),
3908
- _ts_metadata31("design:type", typeof CredentialCorrelationType === "undefined" ? Object : CredentialCorrelationType)
4142
+ _ts_metadata32("design:type", typeof CredentialCorrelationType === "undefined" ? Object : CredentialCorrelationType)
3909
4143
  ], DigitalCredentialEntity.prototype, "rpCorrelationType", void 0);
3910
- _ts_decorate32([
3911
- (0, import_typeorm31.Column)("boolean", {
4144
+ _ts_decorate33([
4145
+ (0, import_typeorm32.Column)("boolean", {
3912
4146
  name: "issuer_signed",
3913
4147
  nullable: true
3914
4148
  }),
3915
- _ts_metadata31("design:type", Boolean)
4149
+ _ts_metadata32("design:type", Boolean)
3916
4150
  ], DigitalCredentialEntity.prototype, "isIssuerSigned", void 0);
3917
- _ts_decorate32([
3918
- (0, import_typeorm31.Column)("text", {
4151
+ _ts_decorate33([
4152
+ (0, import_typeorm32.Column)("text", {
3919
4153
  name: "issuer_correlation_id",
3920
4154
  nullable: false
3921
4155
  }),
3922
- _ts_metadata31("design:type", String)
4156
+ _ts_metadata32("design:type", String)
3923
4157
  ], DigitalCredentialEntity.prototype, "issuerCorrelationId", void 0);
3924
- _ts_decorate32([
3925
- (0, import_typeorm31.Column)("text", {
4158
+ _ts_decorate33([
4159
+ (0, import_typeorm32.Column)("text", {
3926
4160
  name: "subject_correlation_id",
3927
4161
  nullable: true
3928
4162
  }),
3929
- _ts_metadata31("design:type", String)
4163
+ _ts_metadata32("design:type", String)
3930
4164
  ], DigitalCredentialEntity.prototype, "subjectCorrelationId", void 0);
3931
- _ts_decorate32([
3932
- (0, import_typeorm31.Column)("text", {
4165
+ _ts_decorate33([
4166
+ (0, import_typeorm32.Column)("text", {
3933
4167
  name: "rp_correlation_id",
3934
4168
  nullable: true
3935
4169
  }),
3936
- _ts_metadata31("design:type", String)
4170
+ _ts_metadata32("design:type", String)
3937
4171
  ], DigitalCredentialEntity.prototype, "rpCorrelationId", void 0);
3938
- _ts_decorate32([
3939
- (0, import_typeorm31.Column)("simple-enum", {
4172
+ _ts_decorate33([
4173
+ (0, import_typeorm32.Column)("simple-enum", {
3940
4174
  name: "verified_state",
3941
4175
  enum: CredentialStateType,
3942
4176
  nullable: true
3943
4177
  }),
3944
- _ts_metadata31("design:type", typeof CredentialStateType === "undefined" ? Object : CredentialStateType)
4178
+ _ts_metadata32("design:type", typeof CredentialStateType === "undefined" ? Object : CredentialStateType)
3945
4179
  ], DigitalCredentialEntity.prototype, "verifiedState", void 0);
3946
- _ts_decorate32([
3947
- (0, import_typeorm31.Column)("text", {
4180
+ _ts_decorate33([
4181
+ (0, import_typeorm32.Column)("text", {
3948
4182
  name: "tenant_id",
3949
4183
  nullable: true
3950
4184
  }),
3951
- _ts_metadata31("design:type", String)
4185
+ _ts_metadata32("design:type", String)
3952
4186
  ], DigitalCredentialEntity.prototype, "tenantId", void 0);
3953
- _ts_decorate32([
3954
- (0, import_typeorm31.CreateDateColumn)({
4187
+ _ts_decorate33([
4188
+ (0, import_typeorm32.CreateDateColumn)({
3955
4189
  name: "created_at",
3956
4190
  nullable: false,
3957
4191
  type: (0, import_ssi_sdk17.typeOrmDateTime)()
3958
4192
  }),
3959
- _ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
4193
+ _ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
3960
4194
  ], DigitalCredentialEntity.prototype, "createdAt", void 0);
3961
- _ts_decorate32([
3962
- (0, import_typeorm31.Column)({
4195
+ _ts_decorate33([
4196
+ (0, import_typeorm32.Column)({
3963
4197
  name: "presented_at",
3964
4198
  nullable: true,
3965
4199
  type: (0, import_ssi_sdk17.typeormDate)()
3966
4200
  }),
3967
- _ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
4201
+ _ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
3968
4202
  ], DigitalCredentialEntity.prototype, "presentedAt", void 0);
3969
- _ts_decorate32([
3970
- (0, import_typeorm31.UpdateDateColumn)({
4203
+ _ts_decorate33([
4204
+ (0, import_typeorm32.UpdateDateColumn)({
3971
4205
  name: "last_updated_at",
3972
4206
  nullable: false,
3973
4207
  type: (0, import_ssi_sdk17.typeOrmDateTime)()
3974
4208
  }),
3975
- _ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
4209
+ _ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
3976
4210
  ], DigitalCredentialEntity.prototype, "lastUpdatedAt", void 0);
3977
- _ts_decorate32([
3978
- (0, import_typeorm31.Column)({
4211
+ _ts_decorate33([
4212
+ (0, import_typeorm32.Column)({
3979
4213
  name: "valid_until",
3980
4214
  nullable: true,
3981
4215
  type: (0, import_ssi_sdk17.typeormDate)()
3982
4216
  }),
3983
- _ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
4217
+ _ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
3984
4218
  ], DigitalCredentialEntity.prototype, "validUntil", void 0);
3985
- _ts_decorate32([
3986
- (0, import_typeorm31.Column)({
4219
+ _ts_decorate33([
4220
+ (0, import_typeorm32.Column)({
3987
4221
  name: "valid_from",
3988
4222
  nullable: true,
3989
4223
  type: (0, import_ssi_sdk17.typeormDate)()
3990
4224
  }),
3991
- _ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
4225
+ _ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
3992
4226
  ], DigitalCredentialEntity.prototype, "validFrom", void 0);
3993
- _ts_decorate32([
3994
- (0, import_typeorm31.Column)({
4227
+ _ts_decorate33([
4228
+ (0, import_typeorm32.Column)({
3995
4229
  name: "verified_at",
3996
4230
  nullable: true,
3997
4231
  type: (0, import_ssi_sdk17.typeOrmDateTime)()
3998
4232
  }),
3999
- _ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
4233
+ _ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
4000
4234
  ], DigitalCredentialEntity.prototype, "verifiedAt", void 0);
4001
- _ts_decorate32([
4002
- (0, import_typeorm31.Column)({
4235
+ _ts_decorate33([
4236
+ (0, import_typeorm32.Column)({
4003
4237
  name: "revoked_at",
4004
4238
  nullable: true,
4005
4239
  type: (0, import_ssi_sdk17.typeOrmDateTime)()
4006
4240
  }),
4007
- _ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
4241
+ _ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
4008
4242
  ], DigitalCredentialEntity.prototype, "revokedAt", void 0);
4009
- DigitalCredentialEntity = _ts_decorate32([
4010
- (0, import_typeorm31.Entity)("DigitalCredential")
4243
+ DigitalCredentialEntity = _ts_decorate33([
4244
+ (0, import_typeorm32.Entity)("DigitalCredential")
4011
4245
  ], DigitalCredentialEntity);
4012
4246
 
4013
4247
  // src/entities/presentationDefinition/PresentationDefinitionItemEntity.ts
4014
- var import_typeorm32 = require("typeorm");
4015
- var import_class_validator21 = require("class-validator");
4248
+ var import_typeorm33 = require("typeorm");
4249
+ var import_class_validator22 = require("class-validator");
4016
4250
  var import_ssi_sdk18 = require("@sphereon/ssi-sdk.agent-config");
4017
- function _ts_decorate33(decorators, target, key, desc) {
4251
+ function _ts_decorate34(decorators, target, key, desc) {
4018
4252
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4019
4253
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4020
4254
  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;
4021
4255
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4022
4256
  }
4023
- __name(_ts_decorate33, "_ts_decorate");
4024
- function _ts_metadata32(k, v) {
4257
+ __name(_ts_decorate34, "_ts_decorate");
4258
+ function _ts_metadata33(k, v) {
4025
4259
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
4026
4260
  }
4027
- __name(_ts_metadata32, "_ts_metadata");
4028
- var PresentationDefinitionItemEntity = class extends import_typeorm32.BaseEntity {
4261
+ __name(_ts_metadata33, "_ts_metadata");
4262
+ var PresentationDefinitionItemEntity = class extends import_typeorm33.BaseEntity {
4029
4263
  static {
4030
4264
  __name(this, "PresentationDefinitionItemEntity");
4031
4265
  }
@@ -4044,116 +4278,116 @@ var PresentationDefinitionItemEntity = class extends import_typeorm32.BaseEntity
4044
4278
  this.lastUpdatedAt = /* @__PURE__ */ new Date();
4045
4279
  }
4046
4280
  };
4047
- _ts_decorate33([
4048
- (0, import_typeorm32.PrimaryGeneratedColumn)("uuid"),
4049
- _ts_metadata32("design:type", String)
4281
+ _ts_decorate34([
4282
+ (0, import_typeorm33.PrimaryGeneratedColumn)("uuid"),
4283
+ _ts_metadata33("design:type", String)
4050
4284
  ], PresentationDefinitionItemEntity.prototype, "id", void 0);
4051
- _ts_decorate33([
4052
- (0, import_typeorm32.Column)({
4285
+ _ts_decorate34([
4286
+ (0, import_typeorm33.Column)({
4053
4287
  name: "definition_id",
4054
4288
  length: 255,
4055
4289
  type: "varchar",
4056
4290
  nullable: false,
4057
4291
  unique: false
4058
4292
  }),
4059
- (0, import_class_validator21.IsNotEmpty)({
4293
+ (0, import_class_validator22.IsNotEmpty)({
4060
4294
  message: "A blank definition id field is not allowed"
4061
4295
  }),
4062
- _ts_metadata32("design:type", String)
4296
+ _ts_metadata33("design:type", String)
4063
4297
  ], PresentationDefinitionItemEntity.prototype, "definitionId", void 0);
4064
- _ts_decorate33([
4065
- (0, import_typeorm32.Column)({
4298
+ _ts_decorate34([
4299
+ (0, import_typeorm33.Column)({
4066
4300
  name: "version",
4067
4301
  length: 255,
4068
4302
  type: "varchar",
4069
4303
  nullable: false,
4070
4304
  unique: false
4071
4305
  }),
4072
- (0, import_class_validator21.IsNotEmpty)({
4306
+ (0, import_class_validator22.IsNotEmpty)({
4073
4307
  message: "A blank version field is not allowed"
4074
4308
  }),
4075
- _ts_metadata32("design:type", String)
4309
+ _ts_metadata33("design:type", String)
4076
4310
  ], PresentationDefinitionItemEntity.prototype, "version", void 0);
4077
- _ts_decorate33([
4078
- (0, import_typeorm32.Column)({
4311
+ _ts_decorate34([
4312
+ (0, import_typeorm33.Column)({
4079
4313
  name: "tenant_id",
4080
4314
  length: 255,
4081
4315
  type: "varchar",
4082
4316
  nullable: true,
4083
4317
  unique: false
4084
4318
  }),
4085
- _ts_metadata32("design:type", String)
4319
+ _ts_metadata33("design:type", String)
4086
4320
  ], PresentationDefinitionItemEntity.prototype, "tenantId", void 0);
4087
- _ts_decorate33([
4088
- (0, import_typeorm32.Column)({
4321
+ _ts_decorate34([
4322
+ (0, import_typeorm33.Column)({
4089
4323
  name: "purpose",
4090
4324
  length: 255,
4091
4325
  type: "varchar",
4092
4326
  nullable: true,
4093
4327
  unique: false
4094
4328
  }),
4095
- _ts_metadata32("design:type", String)
4329
+ _ts_metadata33("design:type", String)
4096
4330
  ], PresentationDefinitionItemEntity.prototype, "purpose", void 0);
4097
- _ts_decorate33([
4098
- (0, import_typeorm32.Column)({
4331
+ _ts_decorate34([
4332
+ (0, import_typeorm33.Column)({
4099
4333
  name: "name",
4100
4334
  length: 255,
4101
4335
  type: "varchar",
4102
4336
  nullable: true,
4103
4337
  unique: false
4104
4338
  }),
4105
- _ts_metadata32("design:type", String)
4339
+ _ts_metadata33("design:type", String)
4106
4340
  ], PresentationDefinitionItemEntity.prototype, "name", void 0);
4107
- _ts_decorate33([
4108
- (0, import_typeorm32.Column)({
4341
+ _ts_decorate34([
4342
+ (0, import_typeorm33.Column)({
4109
4343
  name: "definition_payload",
4110
4344
  type: "text",
4111
4345
  nullable: false,
4112
4346
  unique: false
4113
4347
  }),
4114
- (0, import_class_validator21.IsNotEmpty)({
4348
+ (0, import_class_validator22.IsNotEmpty)({
4115
4349
  message: "A blank PD definition payload field is not allowed"
4116
4350
  }),
4117
- _ts_metadata32("design:type", String)
4351
+ _ts_metadata33("design:type", String)
4118
4352
  ], PresentationDefinitionItemEntity.prototype, "definitionPayload", void 0);
4119
- _ts_decorate33([
4120
- (0, import_typeorm32.Column)({
4353
+ _ts_decorate34([
4354
+ (0, import_typeorm33.Column)({
4121
4355
  name: "dcql_payload",
4122
4356
  type: "text",
4123
4357
  nullable: true,
4124
4358
  unique: false
4125
4359
  }),
4126
- (0, import_class_validator21.IsNotEmpty)({
4360
+ (0, import_class_validator22.IsNotEmpty)({
4127
4361
  message: "A blank dcql definition payload field is not allowed"
4128
4362
  }),
4129
- _ts_metadata32("design:type", String)
4363
+ _ts_metadata33("design:type", String)
4130
4364
  ], PresentationDefinitionItemEntity.prototype, "dcqlPayload", void 0);
4131
- _ts_decorate33([
4132
- (0, import_typeorm32.CreateDateColumn)({
4365
+ _ts_decorate34([
4366
+ (0, import_typeorm33.CreateDateColumn)({
4133
4367
  name: "created_at",
4134
4368
  nullable: false,
4135
4369
  type: (0, import_ssi_sdk18.typeOrmDateTime)()
4136
4370
  }),
4137
- _ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
4371
+ _ts_metadata33("design:type", typeof Date === "undefined" ? Object : Date)
4138
4372
  ], PresentationDefinitionItemEntity.prototype, "createdAt", void 0);
4139
- _ts_decorate33([
4140
- (0, import_typeorm32.UpdateDateColumn)({
4373
+ _ts_decorate34([
4374
+ (0, import_typeorm33.UpdateDateColumn)({
4141
4375
  name: "last_updated_at",
4142
4376
  nullable: false,
4143
4377
  type: (0, import_ssi_sdk18.typeOrmDateTime)()
4144
4378
  }),
4145
- _ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
4379
+ _ts_metadata33("design:type", typeof Date === "undefined" ? Object : Date)
4146
4380
  ], PresentationDefinitionItemEntity.prototype, "lastUpdatedAt", void 0);
4147
- _ts_decorate33([
4148
- (0, import_typeorm32.BeforeInsert)(),
4149
- (0, import_typeorm32.BeforeUpdate)(),
4150
- _ts_metadata32("design:type", Function),
4151
- _ts_metadata32("design:paramtypes", []),
4152
- _ts_metadata32("design:returntype", void 0)
4381
+ _ts_decorate34([
4382
+ (0, import_typeorm33.BeforeInsert)(),
4383
+ (0, import_typeorm33.BeforeUpdate)(),
4384
+ _ts_metadata33("design:type", Function),
4385
+ _ts_metadata33("design:paramtypes", []),
4386
+ _ts_metadata33("design:returntype", void 0)
4153
4387
  ], PresentationDefinitionItemEntity.prototype, "updateUpdatedDate", null);
4154
- PresentationDefinitionItemEntity = _ts_decorate33([
4155
- (0, import_typeorm32.Entity)("PresentationDefinitionItem"),
4156
- (0, import_typeorm32.Index)([
4388
+ PresentationDefinitionItemEntity = _ts_decorate34([
4389
+ (0, import_typeorm33.Entity)("PresentationDefinitionItem"),
4390
+ (0, import_typeorm33.Index)([
4157
4391
  "version"
4158
4392
  ], {
4159
4393
  unique: false
@@ -4162,19 +4396,19 @@ PresentationDefinitionItemEntity = _ts_decorate33([
4162
4396
 
4163
4397
  // src/entities/oid4vcState/Oid4vcStateEntity.ts
4164
4398
  var import_ssi_sdk19 = require("@sphereon/ssi-sdk.agent-config");
4165
- var import_typeorm33 = require("typeorm");
4166
- function _ts_decorate34(decorators, target, key, desc) {
4399
+ var import_typeorm34 = require("typeorm");
4400
+ function _ts_decorate35(decorators, target, key, desc) {
4167
4401
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4168
4402
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4169
4403
  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;
4170
4404
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4171
4405
  }
4172
- __name(_ts_decorate34, "_ts_decorate");
4173
- function _ts_metadata33(k, v) {
4406
+ __name(_ts_decorate35, "_ts_decorate");
4407
+ function _ts_metadata34(k, v) {
4174
4408
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
4175
4409
  }
4176
- __name(_ts_metadata33, "_ts_metadata");
4177
- var Oid4vcStateEntity = class extends import_typeorm33.BaseEntity {
4410
+ __name(_ts_metadata34, "_ts_metadata");
4411
+ var Oid4vcStateEntity = class extends import_typeorm34.BaseEntity {
4178
4412
  static {
4179
4413
  __name(this, "Oid4vcStateEntity");
4180
4414
  }
@@ -4188,84 +4422,84 @@ var Oid4vcStateEntity = class extends import_typeorm33.BaseEntity {
4188
4422
  expiresAt;
4189
4423
  tenantId;
4190
4424
  };
4191
- _ts_decorate34([
4192
- (0, import_typeorm33.PrimaryColumn)({
4425
+ _ts_decorate35([
4426
+ (0, import_typeorm34.PrimaryColumn)({
4193
4427
  name: "id",
4194
4428
  type: "varchar",
4195
4429
  nullable: false
4196
4430
  }),
4197
- _ts_metadata33("design:type", String)
4431
+ _ts_metadata34("design:type", String)
4198
4432
  ], Oid4vcStateEntity.prototype, "id", void 0);
4199
- _ts_decorate34([
4200
- (0, import_typeorm33.Column)({
4433
+ _ts_decorate35([
4434
+ (0, import_typeorm34.Column)({
4201
4435
  name: "lookup_ids",
4202
4436
  type: "array",
4203
4437
  nullable: true
4204
4438
  }),
4205
- _ts_metadata33("design:type", typeof Array === "undefined" ? Object : Array)
4439
+ _ts_metadata34("design:type", typeof Array === "undefined" ? Object : Array)
4206
4440
  ], Oid4vcStateEntity.prototype, "lookups", void 0);
4207
- _ts_decorate34([
4208
- (0, import_typeorm33.Column)({
4441
+ _ts_decorate35([
4442
+ (0, import_typeorm34.Column)({
4209
4443
  name: "state_id",
4210
4444
  type: "varchar",
4211
4445
  nullable: true
4212
4446
  }),
4213
- _ts_metadata33("design:type", String)
4447
+ _ts_metadata34("design:type", String)
4214
4448
  ], Oid4vcStateEntity.prototype, "stateId", void 0);
4215
- _ts_decorate34([
4216
- (0, import_typeorm33.Column)({
4449
+ _ts_decorate35([
4450
+ (0, import_typeorm34.Column)({
4217
4451
  name: "correlation_id",
4218
4452
  type: "varchar",
4219
4453
  nullable: true
4220
4454
  }),
4221
- _ts_metadata33("design:type", String)
4455
+ _ts_metadata34("design:type", String)
4222
4456
  ], Oid4vcStateEntity.prototype, "correlationId", void 0);
4223
- _ts_decorate34([
4224
- (0, import_typeorm33.Column)({
4457
+ _ts_decorate35([
4458
+ (0, import_typeorm34.Column)({
4225
4459
  name: "state",
4226
4460
  type: "json",
4227
4461
  nullable: false
4228
4462
  }),
4229
- _ts_metadata33("design:type", typeof StateType === "undefined" ? Object : StateType)
4463
+ _ts_metadata34("design:type", typeof StateType === "undefined" ? Object : StateType)
4230
4464
  ], Oid4vcStateEntity.prototype, "state", void 0);
4231
- _ts_decorate34([
4232
- (0, import_typeorm33.CreateDateColumn)({
4465
+ _ts_decorate35([
4466
+ (0, import_typeorm34.CreateDateColumn)({
4233
4467
  name: "created_at",
4234
4468
  nullable: false,
4235
4469
  type: (0, import_ssi_sdk19.typeOrmDateTime)()
4236
4470
  }),
4237
- _ts_metadata33("design:type", typeof Date === "undefined" ? Object : Date)
4471
+ _ts_metadata34("design:type", typeof Date === "undefined" ? Object : Date)
4238
4472
  ], Oid4vcStateEntity.prototype, "createdAt", void 0);
4239
- _ts_decorate34([
4240
- (0, import_typeorm33.UpdateDateColumn)({
4473
+ _ts_decorate35([
4474
+ (0, import_typeorm34.UpdateDateColumn)({
4241
4475
  name: "updated_at",
4242
4476
  nullable: false,
4243
4477
  type: (0, import_ssi_sdk19.typeOrmDateTime)()
4244
4478
  }),
4245
- _ts_metadata33("design:type", typeof Date === "undefined" ? Object : Date)
4479
+ _ts_metadata34("design:type", typeof Date === "undefined" ? Object : Date)
4246
4480
  ], Oid4vcStateEntity.prototype, "updatedAt", void 0);
4247
- _ts_decorate34([
4248
- (0, import_typeorm33.Column)({
4481
+ _ts_decorate35([
4482
+ (0, import_typeorm34.Column)({
4249
4483
  name: "expires_at",
4250
4484
  nullable: true,
4251
4485
  type: (0, import_ssi_sdk19.typeOrmDateTime)()
4252
4486
  }),
4253
- _ts_metadata33("design:type", typeof Date === "undefined" ? Object : Date)
4487
+ _ts_metadata34("design:type", typeof Date === "undefined" ? Object : Date)
4254
4488
  ], Oid4vcStateEntity.prototype, "expiresAt", void 0);
4255
- _ts_decorate34([
4256
- (0, import_typeorm33.Column)({
4489
+ _ts_decorate35([
4490
+ (0, import_typeorm34.Column)({
4257
4491
  name: "tenant_id",
4258
4492
  type: "varchar",
4259
4493
  nullable: true
4260
4494
  }),
4261
- _ts_metadata33("design:type", String)
4495
+ _ts_metadata34("design:type", String)
4262
4496
  ], Oid4vcStateEntity.prototype, "tenantId", void 0);
4263
- Oid4vcStateEntity = _ts_decorate34([
4264
- (0, import_typeorm33.Entity)("Oid4vcStateEntity")
4497
+ Oid4vcStateEntity = _ts_decorate35([
4498
+ (0, import_typeorm34.Entity)("Oid4vcStateEntity")
4265
4499
  ], Oid4vcStateEntity);
4266
4500
 
4267
4501
  // src/contact/ContactStore.ts
4268
- var import_typeorm34 = require("typeorm");
4502
+ var import_typeorm35 = require("typeorm");
4269
4503
  var import_debug = __toESM(require("debug"), 1);
4270
4504
 
4271
4505
  // src/contact/AbstractContactStore.ts
@@ -4734,7 +4968,7 @@ var ContactStore = class extends AbstractContactStore {
4734
4968
  });
4735
4969
  const result = await partyRepository.find({
4736
4970
  where: {
4737
- id: (0, import_typeorm34.In)(initialResult.map((party) => party.id))
4971
+ id: (0, import_typeorm35.In)(initialResult.map((party) => party.id))
4738
4972
  }
4739
4973
  });
4740
4974
  debug(`getParties() resulted in ${result.length} parties`);
@@ -4830,7 +5064,7 @@ var ContactStore = class extends AbstractContactStore {
4830
5064
  });
4831
5065
  const result = await identityRepository.find({
4832
5066
  where: {
4833
- id: (0, import_typeorm34.In)(initialResult.map((identity) => identity.id))
5067
+ id: (0, import_typeorm35.In)(initialResult.map((identity) => identity.id))
4834
5068
  }
4835
5069
  });
4836
5070
  return result.map(identityFrom);
@@ -4935,7 +5169,7 @@ var ContactStore = class extends AbstractContactStore {
4935
5169
  });
4936
5170
  const result = await partyRelationshipRepository.find({
4937
5171
  where: {
4938
- id: (0, import_typeorm34.In)(initialResult.map((partyRelationship) => partyRelationship.id))
5172
+ id: (0, import_typeorm35.In)(initialResult.map((partyRelationship) => partyRelationship.id))
4939
5173
  }
4940
5174
  });
4941
5175
  return result.map((partyRelationship) => partyRelationshipFrom(partyRelationship));
@@ -5001,7 +5235,7 @@ var ContactStore = class extends AbstractContactStore {
5001
5235
  });
5002
5236
  const result = await partyTypeRepository.find({
5003
5237
  where: {
5004
- id: (0, import_typeorm34.In)(initialResult.map((partyType) => partyType.id))
5238
+ id: (0, import_typeorm35.In)(initialResult.map((partyType) => partyType.id))
5005
5239
  }
5006
5240
  });
5007
5241
  return result.map((partyType) => partyTypeFrom(partyType));
@@ -5069,7 +5303,7 @@ var ContactStore = class extends AbstractContactStore {
5069
5303
  });
5070
5304
  const result = await electronicAddressRepository.find({
5071
5305
  where: {
5072
- id: (0, import_typeorm34.In)(initialResult.map((electronicAddress) => electronicAddress.id))
5306
+ id: (0, import_typeorm35.In)(initialResult.map((electronicAddress) => electronicAddress.id))
5073
5307
  }
5074
5308
  });
5075
5309
  return result.map((electronicAddress) => electronicAddressFrom(electronicAddress));
@@ -5145,7 +5379,7 @@ var ContactStore = class extends AbstractContactStore {
5145
5379
  });
5146
5380
  const result = await physicalAddressRepository.find({
5147
5381
  where: {
5148
- id: (0, import_typeorm34.In)(initialResult.map((physicalAddress) => physicalAddress.id))
5382
+ id: (0, import_typeorm35.In)(initialResult.map((physicalAddress) => physicalAddress.id))
5149
5383
  }
5150
5384
  });
5151
5385
  return result.map((physicalAddress) => physicalAddressFrom(physicalAddress));
@@ -5504,7 +5738,7 @@ var AbstractIssuanceBrandingStore = class {
5504
5738
 
5505
5739
  // src/issuanceBranding/IssuanceBrandingStore.ts
5506
5740
  var import_debug3 = __toESM(require("debug"), 1);
5507
- var import_typeorm35 = require("typeorm");
5741
+ var import_typeorm36 = require("typeorm");
5508
5742
 
5509
5743
  // src/utils/issuanceBranding/MappingUtils.ts
5510
5744
  var credentialBrandingFrom = /* @__PURE__ */ __name((credentialBranding) => {
@@ -5698,7 +5932,7 @@ var IssuanceBrandingStore = class extends AbstractIssuanceBrandingStore {
5698
5932
  credentialBranding: {
5699
5933
  id: credentialBrandingId
5700
5934
  },
5701
- locale: (0, import_typeorm35.In)(localeBranding.map((localeBranding2) => localeBranding2.locale))
5935
+ locale: (0, import_typeorm36.In)(localeBranding.map((localeBranding2) => localeBranding2.locale))
5702
5936
  }
5703
5937
  });
5704
5938
  if (locales && locales.length > 0) {
@@ -5766,7 +6000,7 @@ var IssuanceBrandingStore = class extends AbstractIssuanceBrandingStore {
5766
6000
  credentialBranding: {
5767
6001
  id: result.credentialBrandingId
5768
6002
  },
5769
- id: (0, import_typeorm35.Not)((0, import_typeorm35.In)([
6003
+ id: (0, import_typeorm36.Not)((0, import_typeorm36.In)([
5770
6004
  localeBranding.id
5771
6005
  ])),
5772
6006
  locale: localeBranding.locale
@@ -5869,7 +6103,7 @@ var IssuanceBrandingStore = class extends AbstractIssuanceBrandingStore {
5869
6103
  issuerBranding: {
5870
6104
  id: issuerBrandingId
5871
6105
  },
5872
- locale: (0, import_typeorm35.In)(localeBranding.map((localeBranding2) => localeBranding2.locale))
6106
+ locale: (0, import_typeorm36.In)(localeBranding.map((localeBranding2) => localeBranding2.locale))
5873
6107
  }
5874
6108
  });
5875
6109
  if (locales && locales.length > 0) {
@@ -5937,7 +6171,7 @@ var IssuanceBrandingStore = class extends AbstractIssuanceBrandingStore {
5937
6171
  issuerBranding: {
5938
6172
  id: result.issuerBrandingId
5939
6173
  },
5940
- id: (0, import_typeorm35.Not)((0, import_typeorm35.In)([
6174
+ id: (0, import_typeorm36.Not)((0, import_typeorm36.In)([
5941
6175
  localeBranding.id
5942
6176
  ])),
5943
6177
  locale: localeBranding.locale
@@ -5997,34 +6231,50 @@ var IssuanceBrandingStore = class extends AbstractIssuanceBrandingStore {
5997
6231
  };
5998
6232
 
5999
6233
  // src/statusList/StatusListStore.ts
6000
- var import_ssi_types4 = require("@sphereon/ssi-types");
6234
+ var import_ssi_types5 = require("@sphereon/ssi-types");
6001
6235
  var import_debug4 = __toESM(require("debug"), 1);
6002
- var import_typeorm36 = require("typeorm");
6236
+ var import_typeorm37 = require("typeorm");
6003
6237
 
6004
6238
  // src/utils/statusList/MappingUtils.ts
6005
- var import_ssi_types3 = require("@sphereon/ssi-types");
6239
+ var import_ssi_types4 = require("@sphereon/ssi-types");
6006
6240
  var statusListEntityFrom = /* @__PURE__ */ __name((args) => {
6007
- if (args.type === import_ssi_types3.StatusListType.StatusList2021) {
6241
+ if (args.type === import_ssi_types4.StatusListType.StatusList2021) {
6008
6242
  const entity = new StatusList2021Entity();
6009
6243
  const sl2021 = args;
6010
6244
  entity.indexingDirection = sl2021.indexingDirection;
6011
6245
  entity.statusPurpose = sl2021.statusPurpose;
6012
6246
  setBaseFields(entity, args);
6013
6247
  Object.defineProperty(entity, "type", {
6014
- value: import_ssi_types3.StatusListType.StatusList2021,
6248
+ value: import_ssi_types4.StatusListType.StatusList2021,
6015
6249
  enumerable: true,
6016
6250
  configurable: true
6017
6251
  });
6018
6252
  return entity;
6019
6253
  }
6020
- if (args.type === import_ssi_types3.StatusListType.OAuthStatusList) {
6254
+ if (args.type === import_ssi_types4.StatusListType.OAuthStatusList) {
6021
6255
  const entity = new OAuthStatusListEntity();
6022
6256
  const oauthSl = args;
6023
6257
  entity.bitsPerStatus = oauthSl.bitsPerStatus;
6024
6258
  entity.expiresAt = oauthSl.expiresAt;
6025
6259
  setBaseFields(entity, args);
6026
6260
  Object.defineProperty(entity, "type", {
6027
- value: import_ssi_types3.StatusListType.OAuthStatusList,
6261
+ value: import_ssi_types4.StatusListType.OAuthStatusList,
6262
+ enumerable: true,
6263
+ configurable: true
6264
+ });
6265
+ return entity;
6266
+ }
6267
+ if (args.type === import_ssi_types4.StatusListType.BitstringStatusList) {
6268
+ const entity = new BitstringStatusListEntity();
6269
+ const bitstringsl = args;
6270
+ entity.statusPurpose = bitstringsl.statusPurpose;
6271
+ entity.statusSize = bitstringsl.statusSize;
6272
+ entity.validFrom = bitstringsl.validFrom;
6273
+ entity.validUntil = bitstringsl.validUntil;
6274
+ entity.ttl = bitstringsl.ttl;
6275
+ setBaseFields(entity, args);
6276
+ Object.defineProperty(entity, "type", {
6277
+ value: import_ssi_types4.StatusListType.BitstringStatusList,
6028
6278
  enumerable: true,
6029
6279
  configurable: true
6030
6280
  });
@@ -6036,7 +6286,7 @@ var statusListFrom = /* @__PURE__ */ __name((entity) => {
6036
6286
  if (entity instanceof StatusList2021Entity) {
6037
6287
  const result = {
6038
6288
  ...getBaseFields(entity),
6039
- type: import_ssi_types3.StatusListType.StatusList2021,
6289
+ type: import_ssi_types4.StatusListType.StatusList2021,
6040
6290
  indexingDirection: entity.indexingDirection,
6041
6291
  statusPurpose: entity.statusPurpose
6042
6292
  };
@@ -6045,12 +6295,24 @@ var statusListFrom = /* @__PURE__ */ __name((entity) => {
6045
6295
  if (entity instanceof OAuthStatusListEntity) {
6046
6296
  const result = {
6047
6297
  ...getBaseFields(entity),
6048
- type: import_ssi_types3.StatusListType.OAuthStatusList,
6298
+ type: import_ssi_types4.StatusListType.OAuthStatusList,
6049
6299
  bitsPerStatus: entity.bitsPerStatus,
6050
6300
  expiresAt: entity.expiresAt
6051
6301
  };
6052
6302
  return replaceNullWithUndefined(result);
6053
6303
  }
6304
+ if (entity instanceof BitstringStatusListEntity) {
6305
+ const result = {
6306
+ ...getBaseFields(entity),
6307
+ type: import_ssi_types4.StatusListType.BitstringStatusList,
6308
+ statusPurpose: entity.statusPurpose,
6309
+ statusSize: entity.statusSize,
6310
+ validFrom: entity.validFrom,
6311
+ validUntil: entity.validUntil,
6312
+ ttl: entity.ttl
6313
+ };
6314
+ return replaceNullWithUndefined(result);
6315
+ }
6054
6316
  throw new Error(`Invalid status list type ${typeof entity}`);
6055
6317
  }, "statusListFrom");
6056
6318
  var setBaseFields = /* @__PURE__ */ __name((entity, args) => {
@@ -6105,7 +6367,7 @@ var StatusListStore = class {
6105
6367
  const results = (await repo.find({
6106
6368
  where: {
6107
6369
  statusList,
6108
- statusListIndex: (0, import_typeorm36.In)(statusListIndex)
6370
+ statusListIndex: (0, import_typeorm37.In)(statusListIndex)
6109
6371
  }
6110
6372
  })).map((index) => index.statusListIndex);
6111
6373
  return statusListIndex.filter((index) => !results.includes(index));
@@ -6335,10 +6597,12 @@ var StatusListStore = class {
6335
6597
  async getStatusListRepo(type) {
6336
6598
  const dataSource = await this.getDS();
6337
6599
  switch (type) {
6338
- case import_ssi_types4.StatusListType.StatusList2021:
6600
+ case import_ssi_types5.StatusListType.StatusList2021:
6339
6601
  return dataSource.getRepository(StatusList2021Entity);
6340
- case import_ssi_types4.StatusListType.OAuthStatusList:
6602
+ case import_ssi_types5.StatusListType.OAuthStatusList:
6341
6603
  return dataSource.getRepository(OAuthStatusListEntity);
6604
+ case import_ssi_types5.StatusListType.BitstringStatusList:
6605
+ return dataSource.getRepository(BitstringStatusListEntity);
6342
6606
  default:
6343
6607
  return dataSource.getRepository(StatusListEntity);
6344
6608
  }
@@ -6356,15 +6620,15 @@ var AbstractEventLoggerStore = class {
6356
6620
  };
6357
6621
 
6358
6622
  // src/eventLogger/EventLoggerStore.ts
6359
- var import_ssi_types6 = require("@sphereon/ssi-types");
6623
+ var import_ssi_types7 = require("@sphereon/ssi-types");
6360
6624
  var import_debug5 = __toESM(require("debug"), 1);
6361
6625
 
6362
6626
  // src/utils/eventLogger/MappingUtils.ts
6363
- var import_ssi_types5 = require("@sphereon/ssi-types");
6627
+ var import_ssi_types6 = require("@sphereon/ssi-types");
6364
6628
  var auditEventFrom = /* @__PURE__ */ __name((event) => {
6365
6629
  const result = {
6366
6630
  id: event.id,
6367
- type: import_ssi_types5.LoggingEventType.AUDIT,
6631
+ type: import_ssi_types6.LoggingEventType.AUDIT,
6368
6632
  description: event.description,
6369
6633
  timestamp: event.timestamp,
6370
6634
  level: event.level,
@@ -6391,7 +6655,7 @@ var auditEventFrom = /* @__PURE__ */ __name((event) => {
6391
6655
  }, "auditEventFrom");
6392
6656
  var auditEventEntityFrom = /* @__PURE__ */ __name((args) => {
6393
6657
  const auditEventEntity = new AuditEventEntity();
6394
- auditEventEntity.type = import_ssi_types5.LoggingEventType.AUDIT;
6658
+ auditEventEntity.type = import_ssi_types6.LoggingEventType.AUDIT;
6395
6659
  auditEventEntity.timestamp = args.timestamp;
6396
6660
  auditEventEntity.level = args.level;
6397
6661
  auditEventEntity.correlationId = args.correlationId;
@@ -6415,7 +6679,7 @@ var auditEventEntityFrom = /* @__PURE__ */ __name((args) => {
6415
6679
  var activityEventFrom = /* @__PURE__ */ __name((event) => {
6416
6680
  const result = {
6417
6681
  id: event.id,
6418
- type: import_ssi_types5.LoggingEventType.ACTIVITY,
6682
+ type: import_ssi_types6.LoggingEventType.ACTIVITY,
6419
6683
  credentialType: event.credentialType,
6420
6684
  originalCredential: event.originalCredential,
6421
6685
  credentialHash: event.credentialHash,
@@ -6447,7 +6711,7 @@ var activityEventFrom = /* @__PURE__ */ __name((event) => {
6447
6711
  }, "activityEventFrom");
6448
6712
  var activityEventEntityFrom = /* @__PURE__ */ __name((args) => {
6449
6713
  const activityEventEntity = new AuditEventEntity();
6450
- activityEventEntity.type = import_ssi_types5.LoggingEventType.ACTIVITY;
6714
+ activityEventEntity.type = import_ssi_types6.LoggingEventType.ACTIVITY;
6451
6715
  activityEventEntity.timestamp = args.timestamp;
6452
6716
  activityEventEntity.level = args.level;
6453
6717
  activityEventEntity.correlationId = args.correlationId;
@@ -6489,11 +6753,11 @@ var EventLoggerStore = class extends AbstractEventLoggerStore {
6489
6753
  const { filter = [] } = args ?? {};
6490
6754
  const auditEventsFilter = filter.map((item) => ({
6491
6755
  ...item,
6492
- type: import_ssi_types6.LoggingEventType.AUDIT
6756
+ type: import_ssi_types7.LoggingEventType.AUDIT
6493
6757
  }));
6494
6758
  if (auditEventsFilter.length === 0) {
6495
6759
  auditEventsFilter.push({
6496
- type: import_ssi_types6.LoggingEventType.AUDIT
6760
+ type: import_ssi_types7.LoggingEventType.AUDIT
6497
6761
  });
6498
6762
  }
6499
6763
  const connection = await this.dbConnection;
@@ -6515,11 +6779,11 @@ var EventLoggerStore = class extends AbstractEventLoggerStore {
6515
6779
  const { filter = [] } = args ?? {};
6516
6780
  const activityEventsFilter = filter.map((item) => ({
6517
6781
  ...item,
6518
- type: import_ssi_types6.LoggingEventType.ACTIVITY
6782
+ type: import_ssi_types7.LoggingEventType.ACTIVITY
6519
6783
  }));
6520
6784
  if (activityEventsFilter.length === 0) {
6521
6785
  activityEventsFilter.push({
6522
- type: import_ssi_types6.LoggingEventType.ACTIVITY
6786
+ type: import_ssi_types7.LoggingEventType.ACTIVITY
6523
6787
  });
6524
6788
  }
6525
6789
  const connection = await this.dbConnection;
@@ -6548,7 +6812,7 @@ var IAbstractMachineStateStore = class {
6548
6812
 
6549
6813
  // src/machineState/MachineStateStore.ts
6550
6814
  var import_debug6 = __toESM(require("debug"), 1);
6551
- var import_typeorm37 = require("typeorm");
6815
+ var import_typeorm38 = require("typeorm");
6552
6816
  var debug6 = (0, import_debug6.default)("sphereon:ssi-sdk:machine-state:store");
6553
6817
  var MachineStateStore = class _MachineStateStore extends IAbstractMachineStateStore {
6554
6818
  static {
@@ -6584,7 +6848,7 @@ var MachineStateStore = class _MachineStateStore extends IAbstractMachineStateSt
6584
6848
  const { tenantId, machineName, instanceId } = args;
6585
6849
  const connection = await this._dbConnection;
6586
6850
  debug6(`Executing findActiveMachineStates query with machineName: ${machineName}, tenantId: ${tenantId}`);
6587
- const queryBuilder = connection.getRepository(MachineStateInfoEntity).createQueryBuilder("state").where("state.completedAt IS NULL").andWhere(new import_typeorm37.Brackets((qb) => {
6851
+ const queryBuilder = connection.getRepository(MachineStateInfoEntity).createQueryBuilder("state").where("state.completedAt IS NULL").andWhere(new import_typeorm38.Brackets((qb) => {
6588
6852
  qb.where("state.expiresAt IS NULL").orWhere("state.expiresAt > :now", {
6589
6853
  now: /* @__PURE__ */ new Date()
6590
6854
  });
@@ -6654,10 +6918,10 @@ var MachineStateStore = class _MachineStateStore extends IAbstractMachineStateSt
6654
6918
  },
6655
6919
  // When deleteOnDone state is set we only look at completedAt, in other cases we compare current time with expiresAt
6656
6920
  ...!deleteDoneStates && {
6657
- expiresAt: (0, import_typeorm37.LessThan)(/* @__PURE__ */ new Date())
6921
+ expiresAt: (0, import_typeorm38.LessThan)(/* @__PURE__ */ new Date())
6658
6922
  },
6659
6923
  ...deleteDoneStates && {
6660
- completedAt: (0, import_typeorm37.Not)((0, import_typeorm37.IsNull)())
6924
+ completedAt: (0, import_typeorm38.Not)((0, import_typeorm38.IsNull)())
6661
6925
  }
6662
6926
  };
6663
6927
  const result = await connection.getRepository(MachineStateInfoEntity).delete(deleteCriteria);
@@ -6685,7 +6949,7 @@ var AbstractPDStore = class {
6685
6949
  };
6686
6950
 
6687
6951
  // src/presentationDefinition/PDStore.ts
6688
- var import_typeorm38 = require("typeorm");
6952
+ var import_typeorm39 = require("typeorm");
6689
6953
  var import_debug7 = __toESM(require("debug"), 1);
6690
6954
 
6691
6955
  // src/utils/presentationDefinition/MappingUtils.ts
@@ -6781,7 +7045,7 @@ var PDStore = class extends AbstractPDStore {
6781
7045
  const initialResult = await this.findIds(pdRepository, filter);
6782
7046
  const result = await pdRepository.find({
6783
7047
  where: {
6784
- id: (0, import_typeorm38.In)(initialResult.map((entity) => entity.id))
7048
+ id: (0, import_typeorm39.In)(initialResult.map((entity) => entity.id))
6785
7049
  },
6786
7050
  order: {
6787
7051
  version: "DESC"
@@ -6843,7 +7107,7 @@ var PDStore = class extends AbstractPDStore {
6843
7107
  const initialResult = await this.findIds(pdRepository, filter);
6844
7108
  const result = await pdRepository.find({
6845
7109
  where: {
6846
- id: (0, import_typeorm38.In)(initialResult.map((entity) => entity.id))
7110
+ id: (0, import_typeorm39.In)(initialResult.map((entity) => entity.id))
6847
7111
  }
6848
7112
  });
6849
7113
  for (const entity of result) {
@@ -6857,7 +7121,7 @@ var PDStore = class extends AbstractPDStore {
6857
7121
  if (idFilters && idFilters.length > 0 && idFilters.length === filter?.length) {
6858
7122
  return await pdRepository.find({
6859
7123
  where: {
6860
- id: (0, import_typeorm38.In)(idFilters)
7124
+ id: (0, import_typeorm39.In)(idFilters)
6861
7125
  }
6862
7126
  });
6863
7127
  } else {
@@ -8812,6 +9076,199 @@ var FixCredentialClaimsReferencesUuid1741895822987 = class {
8812
9076
  }
8813
9077
  };
8814
9078
 
9079
+ // src/migrations/generic/12-CreateBitstringStatusList.ts
9080
+ var import_debug19 = __toESM(require("debug"), 1);
9081
+
9082
+ // src/migrations/postgres/1741895823000-CreateBitstringStatusList.ts
9083
+ var CreateBitstringStatusListPG1741895823000 = class {
9084
+ static {
9085
+ __name(this, "CreateBitstringStatusListPG1741895823000");
9086
+ }
9087
+ name = "CreateBitstringStatusList1741895823000";
9088
+ async up(queryRunner) {
9089
+ await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "statusSize" integer DEFAULT 1`);
9090
+ await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "ttl" integer`);
9091
+ await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "validFrom" TIMESTAMP`);
9092
+ await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "validUntil" TIMESTAMP`);
9093
+ await queryRunner.query(`ALTER TABLE "StatusList" DROP CONSTRAINT IF EXISTS "CHK_StatusList_type"`);
9094
+ await queryRunner.query(`ALTER TABLE "StatusList" ADD CONSTRAINT "CHK_StatusList_type" CHECK ("type" IN ('StatusList2021', 'OAuthStatusList', 'BitstringStatusList'))`);
9095
+ await queryRunner.query(`
9096
+ CREATE TABLE "BitstringStatusListEntry" (
9097
+ "statusListId" character varying NOT NULL,
9098
+ "statusListIndex" integer NOT NULL,
9099
+ "credentialId" text,
9100
+ "credentialHash" character varying(128),
9101
+ "correlationId" character varying(255),
9102
+ "statusPurpose" character varying NOT NULL,
9103
+ "statusSize" integer DEFAULT 1,
9104
+ "statusMessage" text,
9105
+ "statusReference" text,
9106
+ CONSTRAINT "PK_BitstringStatusListEntry" PRIMARY KEY ("statusListId", "statusListIndex")
9107
+ )
9108
+ `);
9109
+ await queryRunner.query(`
9110
+ ALTER TABLE "BitstringStatusListEntry"
9111
+ ADD CONSTRAINT "FK_BitstringStatusListEntry_statusListId"
9112
+ FOREIGN KEY ("statusListId") REFERENCES "StatusList"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
9113
+ `);
9114
+ }
9115
+ async down(queryRunner) {
9116
+ await queryRunner.query(`ALTER TABLE "BitstringStatusListEntry" DROP CONSTRAINT "FK_BitstringStatusListEntry_statusListId"`);
9117
+ await queryRunner.query(`DROP TABLE "BitstringStatusListEntry"`);
9118
+ await queryRunner.query(`ALTER TABLE "StatusList" DROP CONSTRAINT "CHK_StatusList_type"`);
9119
+ await queryRunner.query(`ALTER TABLE "StatusList" ADD CONSTRAINT "CHK_StatusList_type" CHECK ("type" IN ('StatusList2021', 'OAuthStatusList'))`);
9120
+ await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "validUntil"`);
9121
+ await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "validFrom"`);
9122
+ await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "ttl"`);
9123
+ await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "statusSize"`);
9124
+ }
9125
+ };
9126
+
9127
+ // src/migrations/sqlite/1741895823001-CreateBitstringStatusList.ts
9128
+ var CreateBitstringStatusListSqlite1741895823001 = class {
9129
+ static {
9130
+ __name(this, "CreateBitstringStatusListSqlite1741895823001");
9131
+ }
9132
+ name = "CreateBitstringStatusList1741895823000";
9133
+ async up(queryRunner) {
9134
+ await queryRunner.query(`
9135
+ CREATE TABLE "temporary_StatusList" (
9136
+ "id" varchar PRIMARY KEY NOT NULL,
9137
+ "correlationId" varchar NOT NULL,
9138
+ "length" integer NOT NULL,
9139
+ "issuer" text NOT NULL,
9140
+ "type" varchar CHECK( "type" IN ('StatusList2021', 'OAuthStatusList', 'BitstringStatusList') ) NOT NULL DEFAULT ('StatusList2021'),
9141
+ "driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'),
9142
+ "credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'),
9143
+ "proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt') ) NOT NULL DEFAULT ('lds'),
9144
+ "indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ),
9145
+ "statusPurpose" varchar,
9146
+ "statusListCredential" text,
9147
+ "bitsPerStatus" integer,
9148
+ "expiresAt" datetime,
9149
+ "statusSize" integer DEFAULT (1),
9150
+ "ttl" integer,
9151
+ "validFrom" datetime,
9152
+ "validUntil" datetime,
9153
+ CONSTRAINT "UQ_correlationId" UNIQUE ("correlationId")
9154
+ )
9155
+ `);
9156
+ await queryRunner.query(`
9157
+ INSERT INTO "temporary_StatusList"(
9158
+ "id", "correlationId", "length", "issuer", "type", "driverType",
9159
+ "credentialIdMode", "proofFormat", "indexingDirection", "statusPurpose",
9160
+ "statusListCredential", "bitsPerStatus", "expiresAt"
9161
+ )
9162
+ SELECT
9163
+ "id", "correlationId", "length", "issuer", "type", "driverType",
9164
+ "credentialIdMode", "proofFormat", "indexingDirection", "statusPurpose",
9165
+ "statusListCredential", "bitsPerStatus", "expiresAt"
9166
+ FROM "StatusList"
9167
+ `);
9168
+ await queryRunner.query(`DROP TABLE "StatusList"`);
9169
+ await queryRunner.query(`ALTER TABLE "temporary_StatusList" RENAME TO "StatusList"`);
9170
+ await queryRunner.query(`
9171
+ CREATE TABLE "BitstringStatusListEntry" (
9172
+ "statusListId" varchar NOT NULL,
9173
+ "statusListIndex" integer NOT NULL,
9174
+ "credentialId" text,
9175
+ "credentialHash" varchar(128),
9176
+ "correlationId" varchar(255),
9177
+ "statusPurpose" varchar NOT NULL,
9178
+ "statusSize" integer DEFAULT (1),
9179
+ "statusMessage" text,
9180
+ "statusReference" text,
9181
+ PRIMARY KEY ("statusListId", "statusListIndex")
9182
+ )
9183
+ `);
9184
+ }
9185
+ async down(queryRunner) {
9186
+ await queryRunner.query(`DROP TABLE "BitstringStatusListEntry"`);
9187
+ await queryRunner.query(`
9188
+ CREATE TABLE "temporary_StatusList" (
9189
+ "id" varchar PRIMARY KEY NOT NULL,
9190
+ "correlationId" varchar NOT NULL,
9191
+ "length" integer NOT NULL,
9192
+ "issuer" text NOT NULL,
9193
+ "type" varchar CHECK( "type" IN ('StatusList2021', 'OAuthStatusList') ) NOT NULL DEFAULT ('StatusList2021'),
9194
+ "driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'),
9195
+ "credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'),
9196
+ "proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt') ) NOT NULL DEFAULT ('lds'),
9197
+ "indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ),
9198
+ "statusPurpose" varchar,
9199
+ "statusListCredential" text,
9200
+ "bitsPerStatus" integer,
9201
+ "expiresAt" datetime,
9202
+ CONSTRAINT "UQ_correlationId" UNIQUE ("correlationId")
9203
+ )
9204
+ `);
9205
+ await queryRunner.query(`
9206
+ INSERT INTO "temporary_StatusList"(
9207
+ "id", "correlationId", "length", "issuer", "type", "driverType",
9208
+ "credentialIdMode", "proofFormat", "indexingDirection", "statusPurpose",
9209
+ "statusListCredential", "bitsPerStatus", "expiresAt"
9210
+ )
9211
+ SELECT
9212
+ "id", "correlationId", "length", "issuer",
9213
+ CASE WHEN "type" = 'BitstringStatusList' THEN 'StatusList2021' ELSE "type" END,
9214
+ "driverType", "credentialIdMode", "proofFormat", "indexingDirection",
9215
+ "statusPurpose", "statusListCredential", "bitsPerStatus", "expiresAt"
9216
+ FROM "StatusList"
9217
+ `);
9218
+ await queryRunner.query(`DROP TABLE "StatusList"`);
9219
+ await queryRunner.query(`ALTER TABLE "temporary_StatusList" RENAME TO "StatusList"`);
9220
+ }
9221
+ };
9222
+
9223
+ // src/migrations/generic/12-CreateBitstringStatusList.ts
9224
+ var debug19 = (0, import_debug19.default)("sphereon:ssi-sdk:migrations");
9225
+ var CreateBitstringStatusList1741895823000 = class {
9226
+ static {
9227
+ __name(this, "CreateBitstringStatusList1741895823000");
9228
+ }
9229
+ name = "CreateBitstringStatusList1741895823000";
9230
+ async up(queryRunner) {
9231
+ debug19("migration: creating bitstring status list tables");
9232
+ const dbType = queryRunner.connection.driver.options.type;
9233
+ switch (dbType) {
9234
+ case "postgres": {
9235
+ const mig = new CreateBitstringStatusListPG1741895823000();
9236
+ await mig.up(queryRunner);
9237
+ return;
9238
+ }
9239
+ case "sqlite":
9240
+ case "expo":
9241
+ case "react-native": {
9242
+ const mig = new CreateBitstringStatusListSqlite1741895823001();
9243
+ await mig.up(queryRunner);
9244
+ return;
9245
+ }
9246
+ default:
9247
+ return Promise.reject(`Migrations only supported for sqlite and postgres. Was ${dbType}`);
9248
+ }
9249
+ }
9250
+ async down(queryRunner) {
9251
+ debug19("migration: dropping bitstring status list tables");
9252
+ const dbType = queryRunner.connection.driver.options.type;
9253
+ switch (dbType) {
9254
+ case "postgres": {
9255
+ const mig = new CreateBitstringStatusListPG1741895823000();
9256
+ await mig.down(queryRunner);
9257
+ return;
9258
+ }
9259
+ case "sqlite":
9260
+ case "expo":
9261
+ case "react-native": {
9262
+ const mig = new CreateBitstringStatusListSqlite1741895823001();
9263
+ await mig.down(queryRunner);
9264
+ return;
9265
+ }
9266
+ default:
9267
+ return Promise.reject(`Migrations only supported for sqlite and postgres. Was ${dbType}`);
9268
+ }
9269
+ }
9270
+ };
9271
+
8815
9272
  // src/migrations/generic/index.ts
8816
9273
  var DataStoreContactMigrations = [
8817
9274
  CreateContacts1659463079429,
@@ -8824,7 +9281,8 @@ var DataStoreIssuanceBrandingMigrations = [
8824
9281
  FixCredentialClaimsReferencesUuid1741895822987
8825
9282
  ];
8826
9283
  var DataStoreStatusListMigrations = [
8827
- CreateStatusList1693866470000
9284
+ CreateStatusList1693866470000,
9285
+ CreateBitstringStatusList1741895823000
8828
9286
  ];
8829
9287
  var DataStoreEventLoggerMigrations = [
8830
9288
  CreateAuditEvents1701635835330
@@ -8849,7 +9307,7 @@ var DataStoreMigrations = [
8849
9307
  ];
8850
9308
 
8851
9309
  // src/utils/digitalCredential/MappingUtils.ts
8852
- var import_ssi_types7 = require("@sphereon/ssi-types");
9310
+ var import_ssi_types8 = require("@sphereon/ssi-types");
8853
9311
  var import_utils = require("@veramo/utils");
8854
9312
  var import_ssi_sdk23 = require("@sphereon/ssi-sdk.core");
8855
9313
  function determineDocumentType(raw) {
@@ -8857,11 +9315,11 @@ function determineDocumentType(raw) {
8857
9315
  if (!rawDocument) {
8858
9316
  throw new Error(`Couldn't parse the credential: ${raw}`);
8859
9317
  }
8860
- const hasProof = import_ssi_types7.CredentialMapper.hasProof(rawDocument);
8861
- const isCredential = isHex(raw) || import_ssi_types7.ObjectUtils.isBase64(raw) || import_ssi_types7.CredentialMapper.isCredential(rawDocument);
8862
- const isPresentation = import_ssi_types7.CredentialMapper.isPresentation(rawDocument);
9318
+ const hasProof = import_ssi_types8.CredentialMapper.hasProof(rawDocument);
9319
+ const isCredential = isHex(raw) || import_ssi_types8.ObjectUtils.isBase64(raw) || import_ssi_types8.CredentialMapper.isCredential(rawDocument);
9320
+ const isPresentation = import_ssi_types8.CredentialMapper.isPresentation(rawDocument);
8863
9321
  if (isCredential) {
8864
- return hasProof || isHex(raw) || import_ssi_types7.ObjectUtils.isBase64(raw) ? DocumentType.VC : DocumentType.C;
9322
+ return hasProof || isHex(raw) || import_ssi_types8.ObjectUtils.isBase64(raw) ? DocumentType.VC : DocumentType.C;
8865
9323
  } else if (isPresentation) {
8866
9324
  return hasProof ? DocumentType.VP : DocumentType.P;
8867
9325
  }
@@ -8873,9 +9331,9 @@ function isHex(input) {
8873
9331
  }
8874
9332
  __name(isHex, "isHex");
8875
9333
  function parseRawDocument(raw) {
8876
- if (isHex(raw) || import_ssi_types7.ObjectUtils.isBase64(raw)) {
9334
+ if (isHex(raw) || import_ssi_types8.ObjectUtils.isBase64(raw)) {
8877
9335
  return raw;
8878
- } else if (import_ssi_types7.CredentialMapper.isJwtEncoded(raw) || import_ssi_types7.CredentialMapper.isSdJwtEncoded(raw)) {
9336
+ } else if (import_ssi_types8.CredentialMapper.isJwtEncoded(raw) || import_ssi_types8.CredentialMapper.isSdJwtEncoded(raw)) {
8879
9337
  return raw;
8880
9338
  }
8881
9339
  try {
@@ -8887,9 +9345,9 @@ function parseRawDocument(raw) {
8887
9345
  __name(parseRawDocument, "parseRawDocument");
8888
9346
  function ensureRawDocument(input) {
8889
9347
  if (typeof input === "string") {
8890
- if (isHex(input) || import_ssi_types7.ObjectUtils.isBase64(input)) {
9348
+ if (isHex(input) || import_ssi_types8.ObjectUtils.isBase64(input)) {
8891
9349
  return input;
8892
- } else if (import_ssi_types7.CredentialMapper.isJwtEncoded(input) || import_ssi_types7.CredentialMapper.isSdJwtEncoded(input)) {
9350
+ } else if (import_ssi_types8.CredentialMapper.isJwtEncoded(input) || import_ssi_types8.CredentialMapper.isSdJwtEncoded(input)) {
8893
9351
  return input;
8894
9352
  }
8895
9353
  throw Error("Unknown input to be mapped as rawDocument");
@@ -8903,13 +9361,13 @@ function ensureRawDocument(input) {
8903
9361
  __name(ensureRawDocument, "ensureRawDocument");
8904
9362
  function determineCredentialDocumentFormat(documentFormat) {
8905
9363
  switch (documentFormat) {
8906
- case import_ssi_types7.DocumentFormat.JSONLD:
9364
+ case import_ssi_types8.DocumentFormat.JSONLD:
8907
9365
  return CredentialDocumentFormat.JSON_LD;
8908
- case import_ssi_types7.DocumentFormat.JWT:
9366
+ case import_ssi_types8.DocumentFormat.JWT:
8909
9367
  return CredentialDocumentFormat.JWT;
8910
- case import_ssi_types7.DocumentFormat.SD_JWT_VC:
9368
+ case import_ssi_types8.DocumentFormat.SD_JWT_VC:
8911
9369
  return CredentialDocumentFormat.SD_JWT;
8912
- case import_ssi_types7.DocumentFormat.MSO_MDOC:
9370
+ case import_ssi_types8.DocumentFormat.MSO_MDOC:
8913
9371
  return CredentialDocumentFormat.MSO_MDOC;
8914
9372
  default:
8915
9373
  throw new Error(`Not supported document format: ${documentFormat}`);
@@ -8948,14 +9406,14 @@ var safeStringify = /* @__PURE__ */ __name((object) => {
8948
9406
  }, "safeStringify");
8949
9407
  var nonPersistedDigitalCredentialEntityFromAddArgs = /* @__PURE__ */ __name((addCredentialArgs) => {
8950
9408
  const documentType = determineDocumentType(addCredentialArgs.rawDocument);
8951
- const documentFormat = import_ssi_types7.CredentialMapper.detectDocumentType(addCredentialArgs.rawDocument);
9409
+ const documentFormat = import_ssi_types8.CredentialMapper.detectDocumentType(addCredentialArgs.rawDocument);
8952
9410
  const hasher = addCredentialArgs?.opts?.hasher ?? import_ssi_sdk23.defaultHasher;
8953
- if (documentFormat === import_ssi_types7.DocumentFormat.SD_JWT_VC && !addCredentialArgs.opts?.hasher) {
9411
+ if (documentFormat === import_ssi_types8.DocumentFormat.SD_JWT_VC && !addCredentialArgs.opts?.hasher) {
8954
9412
  throw new Error("No hasher function is provided for SD_JWT credential.");
8955
9413
  }
8956
- const uniformDocument = documentType === DocumentType.VC || documentType === DocumentType.C ? import_ssi_types7.CredentialMapper.toUniformCredential(addCredentialArgs.rawDocument, {
9414
+ const uniformDocument = documentType === DocumentType.VC || documentType === DocumentType.C ? import_ssi_types8.CredentialMapper.toUniformCredential(addCredentialArgs.rawDocument, {
8957
9415
  hasher
8958
- }) : import_ssi_types7.CredentialMapper.toUniformPresentation(addCredentialArgs.rawDocument, {
9416
+ }) : import_ssi_types8.CredentialMapper.toUniformPresentation(addCredentialArgs.rawDocument, {
8959
9417
  hasher
8960
9418
  });
8961
9419
  const validFrom = getValidFrom(uniformDocument);
@@ -9029,6 +9487,8 @@ var DataStoreStatusListEntities = [
9029
9487
  StatusListEntity,
9030
9488
  StatusList2021Entity,
9031
9489
  OAuthStatusListEntity,
9490
+ BitstringStatusListEntity,
9491
+ BitstringStatusListEntryEntity,
9032
9492
  StatusListEntryEntity
9033
9493
  ];
9034
9494
  var DataStoreEventLoggerEntities = [