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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2696,7 +2696,7 @@ import typeorm9 from "typeorm";
2696
2696
 
2697
2697
  // src/entities/statusList/StatusList2021EntryEntity.ts
2698
2698
  import { Validate as Validate9 } from "class-validator";
2699
- import { BaseEntity as BaseEntity19, Column as Column23, Entity as Entity21, JoinColumn as JoinColumn13, ManyToOne as ManyToOne11, PrimaryColumn } from "typeorm";
2699
+ import { BaseEntity as BaseEntity19, Column as Column23, Entity as Entity21, JoinColumn as JoinColumn13, ManyToOne as ManyToOne11, PrimaryColumn, TableInheritance as TableInheritance4 } from "typeorm";
2700
2700
  function _ts_decorate26(decorators, target, key, desc) {
2701
2701
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2702
2702
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -2790,16 +2790,20 @@ _ts_decorate26([
2790
2790
  _ts_metadata25("design:type", String)
2791
2791
  ], StatusListEntryEntity.prototype, "value", void 0);
2792
2792
  StatusListEntryEntity = _ts_decorate26([
2793
- Entity21("StatusListEntry")
2793
+ Entity21("StatusListEntry"),
2794
+ TableInheritance4({
2795
+ column: {
2796
+ type: "varchar",
2797
+ name: "type"
2798
+ }
2799
+ })
2794
2800
  ], StatusListEntryEntity);
2795
2801
 
2796
2802
  // src/entities/statusList/StatusListEntities.ts
2797
2803
  import { typeOrmDateTime as typeOrmDateTime13 } from "@sphereon/ssi-sdk.agent-config";
2798
2804
 
2799
2805
  // src/entities/statusList/BitstringStatusListEntryEntity.ts
2800
- import { Validate as Validate10 } from "class-validator";
2801
- import { BaseEntity as BaseEntity20, Column as Column24, Entity as Entity22, JoinColumn as JoinColumn14, ManyToOne as ManyToOne12, PrimaryColumn as PrimaryColumn2 } from "typeorm";
2802
- import { BitstringStatusPurpose } from "@sphereon/ssi-types";
2806
+ import { ChildEntity as ChildEntity5, Column as Column24 } from "typeorm";
2803
2807
  function _ts_decorate27(decorators, target, key, desc) {
2804
2808
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2805
2809
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -2811,94 +2815,32 @@ function _ts_metadata26(k, v) {
2811
2815
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
2812
2816
  }
2813
2817
  __name(_ts_metadata26, "_ts_metadata");
2814
- var BitstringStatusListEntryEntity = class extends BaseEntity20 {
2818
+ var BitstringStatusListEntryEntity = class extends StatusListEntryEntity {
2815
2819
  static {
2816
2820
  __name(this, "BitstringStatusListEntryEntity");
2817
2821
  }
2818
- statusListId;
2819
- statusListIndex;
2820
- statusList;
2821
- credentialId;
2822
- credentialHash;
2823
- entryCorrelationId;
2824
2822
  statusPurpose;
2825
- statusSize;
2823
+ bitsPerStatus;
2826
2824
  statusMessage;
2827
2825
  statusReference;
2828
2826
  };
2829
- _ts_decorate27([
2830
- PrimaryColumn2({
2831
- name: "statusListId",
2832
- type: "varchar",
2833
- nullable: false,
2834
- unique: false
2835
- }),
2836
- Validate10(IsNonEmptyStringConstraint, {
2837
- message: "Status list id is required"
2838
- }),
2839
- _ts_metadata26("design:type", String)
2840
- ], BitstringStatusListEntryEntity.prototype, "statusListId", void 0);
2841
- _ts_decorate27([
2842
- PrimaryColumn2({
2843
- name: "statusListIndex",
2844
- type: "integer",
2845
- nullable: false,
2846
- unique: false
2847
- }),
2848
- _ts_metadata26("design:type", Number)
2849
- ], BitstringStatusListEntryEntity.prototype, "statusListIndex", void 0);
2850
- _ts_decorate27([
2851
- ManyToOne12(() => BitstringStatusListEntity, (statusList) => statusList.statusListEntries),
2852
- JoinColumn14({
2853
- name: "statusListId"
2854
- }),
2855
- _ts_metadata26("design:type", typeof BitstringStatusListEntity === "undefined" ? Object : BitstringStatusListEntity)
2856
- ], BitstringStatusListEntryEntity.prototype, "statusList", void 0);
2857
- _ts_decorate27([
2858
- Column24({
2859
- name: "credentialId",
2860
- type: "text",
2861
- nullable: true
2862
- }),
2863
- _ts_metadata26("design:type", String)
2864
- ], BitstringStatusListEntryEntity.prototype, "credentialId", void 0);
2865
- _ts_decorate27([
2866
- Column24({
2867
- name: "credentialHash",
2868
- length: 128,
2869
- type: "varchar",
2870
- nullable: true,
2871
- unique: false
2872
- }),
2873
- _ts_metadata26("design:type", String)
2874
- ], BitstringStatusListEntryEntity.prototype, "credentialHash", void 0);
2875
- _ts_decorate27([
2876
- Column24({
2877
- name: "correlationId",
2878
- length: 255,
2879
- type: "varchar",
2880
- nullable: true,
2881
- unique: false
2882
- }),
2883
- _ts_metadata26("design:type", String)
2884
- ], BitstringStatusListEntryEntity.prototype, "entryCorrelationId", void 0);
2885
2827
  _ts_decorate27([
2886
2828
  Column24({
2887
2829
  type: "varchar",
2888
2830
  name: "statusPurpose",
2889
2831
  nullable: false
2890
2832
  }),
2891
- _ts_metadata26("design:type", typeof BitstringStatusPurpose === "undefined" ? Object : BitstringStatusPurpose)
2833
+ _ts_metadata26("design:type", String)
2892
2834
  ], BitstringStatusListEntryEntity.prototype, "statusPurpose", void 0);
2893
2835
  _ts_decorate27([
2894
2836
  Column24({
2895
2837
  type: "integer",
2896
- name: "statusSize",
2838
+ name: "bitsPerStatus",
2897
2839
  nullable: true,
2898
2840
  default: 1
2899
2841
  }),
2900
2842
  _ts_metadata26("design:type", Number)
2901
- ], BitstringStatusListEntryEntity.prototype, "statusSize", void 0);
2843
+ ], BitstringStatusListEntryEntity.prototype, "bitsPerStatus", void 0);
2902
2844
  _ts_decorate27([
2903
2845
  Column24({
2904
2846
  type: "text",
@@ -2950,7 +2892,7 @@ _ts_decorate27([
2950
2892
  _ts_metadata26("design:type", Object)
2951
2893
  ], BitstringStatusListEntryEntity.prototype, "statusReference", void 0);
2952
2894
  BitstringStatusListEntryEntity = _ts_decorate27([
2953
- Entity22("BitstringStatusListEntry")
2895
+ ChildEntity5("bitstring")
2954
2896
  ], BitstringStatusListEntryEntity);
2955
2897
 
2956
2898
  // src/entities/statusList/StatusListEntities.ts
@@ -2965,14 +2907,15 @@ function _ts_metadata27(k, v) {
2965
2907
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
2966
2908
  }
2967
2909
  __name(_ts_metadata27, "_ts_metadata");
2968
- var { BaseEntity: BaseEntity21, ChildEntity: ChildEntity5, Column: Column25, Entity: Entity23, OneToMany: OneToMany8, PrimaryColumn: PrimaryColumn3, TableInheritance: TableInheritance4, Unique } = typeorm9;
2969
- var StatusListEntity = class extends BaseEntity21 {
2910
+ var { BaseEntity: BaseEntity20, ChildEntity: ChildEntity6, Column: Column25, Entity: Entity22, OneToMany: OneToMany8, PrimaryColumn: PrimaryColumn2, TableInheritance: TableInheritance5, Unique } = typeorm9;
2911
+ var StatusListEntity = class extends BaseEntity20 {
2970
2912
  static {
2971
2913
  __name(this, "StatusListEntity");
2972
2914
  }
2973
2915
  id;
2974
2916
  correlationId;
2975
2917
  length;
2918
+ type;
2976
2919
  issuer;
2977
2920
  driverType;
2978
2921
  credentialIdMode;
@@ -2980,7 +2923,7 @@ var StatusListEntity = class extends BaseEntity21 {
2980
2923
  statusListCredential;
2981
2924
  };
2982
2925
  _ts_decorate28([
2983
- PrimaryColumn3({
2926
+ PrimaryColumn2({
2984
2927
  name: "id",
2985
2928
  type: "varchar"
2986
2929
  }),
@@ -3003,6 +2946,14 @@ _ts_decorate28([
3003
2946
  }),
3004
2947
  _ts_metadata27("design:type", Number)
3005
2948
  ], StatusListEntity.prototype, "length", void 0);
2949
+ _ts_decorate28([
2950
+ Column25("simple-enum", {
2951
+ name: "type",
2952
+ enum: StatusListType,
2953
+ nullable: false
2954
+ }),
2955
+ _ts_metadata27("design:type", typeof StatusListType === "undefined" ? Object : StatusListType)
2956
+ ], StatusListEntity.prototype, "type", void 0);
3006
2957
  _ts_decorate28([
3007
2958
  Column25({
3008
2959
  name: "issuer",
@@ -3081,11 +3032,11 @@ _ts_decorate28([
3081
3032
  _ts_metadata27("design:type", typeof StatusListCredential === "undefined" ? Object : StatusListCredential)
3082
3033
  ], StatusListEntity.prototype, "statusListCredential", void 0);
3083
3034
  StatusListEntity = _ts_decorate28([
3084
- Entity23("StatusList"),
3035
+ Entity22("StatusList"),
3085
3036
  Unique("UQ_correlationId", [
3086
3037
  "correlationId"
3087
3038
  ]),
3088
- TableInheritance4({
3039
+ TableInheritance5({
3089
3040
  column: {
3090
3041
  type: "simple-enum",
3091
3042
  name: "type",
@@ -3127,7 +3078,7 @@ _ts_decorate28([
3127
3078
  _ts_metadata27("design:type", Array)
3128
3079
  ], StatusList2021Entity.prototype, "statusListEntries", void 0);
3129
3080
  StatusList2021Entity = _ts_decorate28([
3130
- ChildEntity5(StatusListType.StatusList2021)
3081
+ ChildEntity6(StatusListType.StatusList2021)
3131
3082
  ], StatusList2021Entity);
3132
3083
  var OAuthStatusListEntity = class extends StatusListEntity {
3133
3084
  static {
@@ -3153,14 +3104,14 @@ _ts_decorate28([
3153
3104
  _ts_metadata27("design:type", typeof Date === "undefined" ? Object : Date)
3154
3105
  ], OAuthStatusListEntity.prototype, "expiresAt", void 0);
3155
3106
  OAuthStatusListEntity = _ts_decorate28([
3156
- ChildEntity5(StatusListType.OAuthStatusList)
3107
+ ChildEntity6(StatusListType.OAuthStatusList)
3157
3108
  ], OAuthStatusListEntity);
3158
3109
  var BitstringStatusListEntity = class extends StatusListEntity {
3159
3110
  static {
3160
3111
  __name(this, "BitstringStatusListEntity");
3161
3112
  }
3162
3113
  statusPurpose;
3163
- statusSize;
3114
+ bitsPerStatus;
3164
3115
  validFrom;
3165
3116
  validUntil;
3166
3117
  ttl;
@@ -3191,12 +3142,11 @@ _ts_decorate28([
3191
3142
  _ts_decorate28([
3192
3143
  Column25({
3193
3144
  type: "integer",
3194
- name: "statusSize",
3195
- nullable: true,
3196
- default: 1
3145
+ name: "bitsPerStatus",
3146
+ nullable: false
3197
3147
  }),
3198
3148
  _ts_metadata27("design:type", Number)
3199
- ], BitstringStatusListEntity.prototype, "statusSize", void 0);
3149
+ ], BitstringStatusListEntity.prototype, "bitsPerStatus", void 0);
3200
3150
  _ts_decorate28([
3201
3151
  Column25({
3202
3152
  name: "validFrom",
@@ -3226,11 +3176,11 @@ _ts_decorate28([
3226
3176
  _ts_metadata27("design:type", Array)
3227
3177
  ], BitstringStatusListEntity.prototype, "statusListEntries", void 0);
3228
3178
  BitstringStatusListEntity = _ts_decorate28([
3229
- ChildEntity5(StatusListType.BitstringStatusList)
3179
+ ChildEntity6(StatusListType.BitstringStatusList)
3230
3180
  ], BitstringStatusListEntity);
3231
3181
 
3232
3182
  // src/entities/machineState/MachineStateInfoEntity.ts
3233
- import { BaseEntity as BaseEntity22, Column as Column26, CreateDateColumn as CreateDateColumn11, Entity as Entity24, PrimaryColumn as PrimaryColumn4, UpdateDateColumn as UpdateDateColumn11 } from "typeorm";
3183
+ import { BaseEntity as BaseEntity21, Column as Column26, CreateDateColumn as CreateDateColumn11, Entity as Entity23, PrimaryColumn as PrimaryColumn3, UpdateDateColumn as UpdateDateColumn11 } from "typeorm";
3234
3184
  import { typeOrmDateTime as typeOrmDateTime14 } from "@sphereon/ssi-sdk.agent-config";
3235
3185
  function _ts_decorate29(decorators, target, key, desc) {
3236
3186
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
@@ -3243,7 +3193,7 @@ function _ts_metadata28(k, v) {
3243
3193
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
3244
3194
  }
3245
3195
  __name(_ts_metadata28, "_ts_metadata");
3246
- var MachineStateInfoEntity = class extends BaseEntity22 {
3196
+ var MachineStateInfoEntity = class extends BaseEntity21 {
3247
3197
  static {
3248
3198
  __name(this, "MachineStateInfoEntity");
3249
3199
  }
@@ -3262,7 +3212,7 @@ var MachineStateInfoEntity = class extends BaseEntity22 {
3262
3212
  tenantId;
3263
3213
  };
3264
3214
  _ts_decorate29([
3265
- PrimaryColumn4({
3215
+ PrimaryColumn3({
3266
3216
  name: "instance_id",
3267
3217
  type: "varchar",
3268
3218
  nullable: false
@@ -3358,12 +3308,12 @@ _ts_decorate29([
3358
3308
  _ts_metadata28("design:type", String)
3359
3309
  ], MachineStateInfoEntity.prototype, "tenantId", void 0);
3360
3310
  MachineStateInfoEntity = _ts_decorate29([
3361
- Entity24("MachineStateInfoEntity")
3311
+ Entity23("MachineStateInfoEntity")
3362
3312
  ], MachineStateInfoEntity);
3363
3313
 
3364
3314
  // src/entities/contact/OrganizationEntity.ts
3365
3315
  import { IsNotEmpty as IsNotEmpty10, validate as validate16 } from "class-validator";
3366
- import { BeforeInsert as BeforeInsert18, BeforeUpdate as BeforeUpdate18, ChildEntity as ChildEntity6, Column as Column27 } from "typeorm";
3316
+ import { BeforeInsert as BeforeInsert18, BeforeUpdate as BeforeUpdate18, ChildEntity as ChildEntity7, Column as Column27 } from "typeorm";
3367
3317
  function _ts_decorate30(decorators, target, key, desc) {
3368
3318
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3369
3319
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -3440,12 +3390,12 @@ _ts_decorate30([
3440
3390
  _ts_metadata29("design:returntype", Promise)
3441
3391
  ], OrganizationEntity.prototype, "validate", null);
3442
3392
  OrganizationEntity = _ts_decorate30([
3443
- ChildEntity6("Organization")
3393
+ ChildEntity7("Organization")
3444
3394
  ], OrganizationEntity);
3445
3395
 
3446
3396
  // src/entities/contact/NaturalPersonEntity.ts
3447
- import { Column as Column28, ChildEntity as ChildEntity7, BeforeInsert as BeforeInsert19, BeforeUpdate as BeforeUpdate19 } from "typeorm";
3448
- import { validate as validate17, IsNotEmpty as IsNotEmpty11, Validate as Validate11 } from "class-validator";
3397
+ import { Column as Column28, ChildEntity as ChildEntity8, BeforeInsert as BeforeInsert19, BeforeUpdate as BeforeUpdate19 } from "typeorm";
3398
+ import { validate as validate17, IsNotEmpty as IsNotEmpty11, Validate as Validate10 } from "class-validator";
3449
3399
  function _ts_decorate31(decorators, target, key, desc) {
3450
3400
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3451
3401
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -3497,7 +3447,7 @@ _ts_decorate31([
3497
3447
  nullable: true,
3498
3448
  unique: false
3499
3449
  }),
3500
- Validate11(IsNonEmptyStringConstraint, {
3450
+ Validate10(IsNonEmptyStringConstraint, {
3501
3451
  message: "Blank middle names are not allowed"
3502
3452
  }),
3503
3453
  _ts_metadata30("design:type", String)
@@ -3548,14 +3498,14 @@ _ts_decorate31([
3548
3498
  _ts_metadata30("design:returntype", Promise)
3549
3499
  ], NaturalPersonEntity.prototype, "validate", null);
3550
3500
  NaturalPersonEntity = _ts_decorate31([
3551
- ChildEntity7("NaturalPerson")
3501
+ ChildEntity8("NaturalPerson")
3552
3502
  ], NaturalPersonEntity);
3553
3503
 
3554
3504
  // src/entities/eventLogger/AuditEventEntity.ts
3555
3505
  import { ActionType, InitiatorType, LoggingEventType, LogLevel, SubSystem, System, SystemCorrelationIdType } from "@sphereon/ssi-types";
3556
3506
  import { CredentialType, PartyCorrelationType } from "@sphereon/ssi-sdk.core";
3557
3507
  import { typeOrmDateTime as typeOrmDateTime15 } from "@sphereon/ssi-sdk.agent-config";
3558
- import { BaseEntity as BaseEntity23, Column as Column29, CreateDateColumn as CreateDateColumn12, Entity as Entity25, PrimaryGeneratedColumn as PrimaryGeneratedColumn21, UpdateDateColumn as UpdateDateColumn12 } from "typeorm";
3508
+ import { BaseEntity as BaseEntity22, Column as Column29, CreateDateColumn as CreateDateColumn12, Entity as Entity24, PrimaryGeneratedColumn as PrimaryGeneratedColumn21, UpdateDateColumn as UpdateDateColumn12 } from "typeorm";
3559
3509
  function _ts_decorate32(decorators, target, key, desc) {
3560
3510
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3561
3511
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -3567,7 +3517,7 @@ function _ts_metadata31(k, v) {
3567
3517
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
3568
3518
  }
3569
3519
  __name(_ts_metadata31, "_ts_metadata");
3570
- var AuditEventEntity = class extends BaseEntity23 {
3520
+ var AuditEventEntity = class extends BaseEntity22 {
3571
3521
  static {
3572
3522
  __name(this, "AuditEventEntity");
3573
3523
  }
@@ -3814,12 +3764,12 @@ _ts_decorate32([
3814
3764
  _ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
3815
3765
  ], AuditEventEntity.prototype, "lastUpdatedAt", void 0);
3816
3766
  AuditEventEntity = _ts_decorate32([
3817
- Entity25("AuditEvents")
3767
+ Entity24("AuditEvents")
3818
3768
  ], AuditEventEntity);
3819
3769
 
3820
3770
  // src/entities/digitalCredential/DigitalCredentialEntity.ts
3821
3771
  import { typeormDate, typeOrmDateTime as typeOrmDateTime16 } from "@sphereon/ssi-sdk.agent-config";
3822
- import { BaseEntity as BaseEntity24, Column as Column30, CreateDateColumn as CreateDateColumn13, Entity as Entity26, PrimaryGeneratedColumn as PrimaryGeneratedColumn22, UpdateDateColumn as UpdateDateColumn13 } from "typeorm";
3772
+ import { BaseEntity as BaseEntity23, Column as Column30, CreateDateColumn as CreateDateColumn13, Entity as Entity25, PrimaryGeneratedColumn as PrimaryGeneratedColumn22, UpdateDateColumn as UpdateDateColumn13 } from "typeorm";
3823
3773
  function _ts_decorate33(decorators, target, key, desc) {
3824
3774
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3825
3775
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -3831,7 +3781,7 @@ function _ts_metadata32(k, v) {
3831
3781
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
3832
3782
  }
3833
3783
  __name(_ts_metadata32, "_ts_metadata");
3834
- var DigitalCredentialEntity = class extends BaseEntity24 {
3784
+ var DigitalCredentialEntity = class extends BaseEntity23 {
3835
3785
  static {
3836
3786
  __name(this, "DigitalCredentialEntity");
3837
3787
  }
@@ -4075,11 +4025,11 @@ _ts_decorate33([
4075
4025
  _ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
4076
4026
  ], DigitalCredentialEntity.prototype, "revokedAt", void 0);
4077
4027
  DigitalCredentialEntity = _ts_decorate33([
4078
- Entity26("DigitalCredential")
4028
+ Entity25("DigitalCredential")
4079
4029
  ], DigitalCredentialEntity);
4080
4030
 
4081
4031
  // src/entities/presentationDefinition/PresentationDefinitionItemEntity.ts
4082
- import { BaseEntity as BaseEntity25, BeforeInsert as BeforeInsert20, BeforeUpdate as BeforeUpdate20, Column as Column31, CreateDateColumn as CreateDateColumn14, Entity as Entity27, Index as Index8, PrimaryGeneratedColumn as PrimaryGeneratedColumn23, UpdateDateColumn as UpdateDateColumn14 } from "typeorm";
4032
+ import { BaseEntity as BaseEntity24, BeforeInsert as BeforeInsert20, BeforeUpdate as BeforeUpdate20, Column as Column31, CreateDateColumn as CreateDateColumn14, Entity as Entity26, Index as Index8, PrimaryGeneratedColumn as PrimaryGeneratedColumn23, UpdateDateColumn as UpdateDateColumn14 } from "typeorm";
4083
4033
  import { IsNotEmpty as IsNotEmpty12 } from "class-validator";
4084
4034
  import { typeOrmDateTime as typeOrmDateTime17 } from "@sphereon/ssi-sdk.agent-config";
4085
4035
  function _ts_decorate34(decorators, target, key, desc) {
@@ -4093,7 +4043,7 @@ function _ts_metadata33(k, v) {
4093
4043
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
4094
4044
  }
4095
4045
  __name(_ts_metadata33, "_ts_metadata");
4096
- var PresentationDefinitionItemEntity = class extends BaseEntity25 {
4046
+ var PresentationDefinitionItemEntity = class extends BaseEntity24 {
4097
4047
  static {
4098
4048
  __name(this, "PresentationDefinitionItemEntity");
4099
4049
  }
@@ -4220,7 +4170,7 @@ _ts_decorate34([
4220
4170
  _ts_metadata33("design:returntype", void 0)
4221
4171
  ], PresentationDefinitionItemEntity.prototype, "updateUpdatedDate", null);
4222
4172
  PresentationDefinitionItemEntity = _ts_decorate34([
4223
- Entity27("PresentationDefinitionItem"),
4173
+ Entity26("PresentationDefinitionItem"),
4224
4174
  Index8([
4225
4175
  "version"
4226
4176
  ], {
@@ -4230,7 +4180,7 @@ PresentationDefinitionItemEntity = _ts_decorate34([
4230
4180
 
4231
4181
  // src/entities/oid4vcState/Oid4vcStateEntity.ts
4232
4182
  import { typeOrmDateTime as typeOrmDateTime18 } from "@sphereon/ssi-sdk.agent-config";
4233
- import { BaseEntity as BaseEntity26, Column as Column32, CreateDateColumn as CreateDateColumn15, Entity as Entity28, PrimaryColumn as PrimaryColumn5, UpdateDateColumn as UpdateDateColumn15 } from "typeorm";
4183
+ import { BaseEntity as BaseEntity25, Column as Column32, CreateDateColumn as CreateDateColumn15, Entity as Entity27, PrimaryColumn as PrimaryColumn4, UpdateDateColumn as UpdateDateColumn15 } from "typeorm";
4234
4184
  function _ts_decorate35(decorators, target, key, desc) {
4235
4185
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4236
4186
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -4242,7 +4192,7 @@ function _ts_metadata34(k, v) {
4242
4192
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
4243
4193
  }
4244
4194
  __name(_ts_metadata34, "_ts_metadata");
4245
- var Oid4vcStateEntity = class extends BaseEntity26 {
4195
+ var Oid4vcStateEntity = class extends BaseEntity25 {
4246
4196
  static {
4247
4197
  __name(this, "Oid4vcStateEntity");
4248
4198
  }
@@ -4257,7 +4207,7 @@ var Oid4vcStateEntity = class extends BaseEntity26 {
4257
4207
  tenantId;
4258
4208
  };
4259
4209
  _ts_decorate35([
4260
- PrimaryColumn5({
4210
+ PrimaryColumn4({
4261
4211
  name: "id",
4262
4212
  type: "varchar",
4263
4213
  nullable: false
@@ -4329,7 +4279,7 @@ _ts_decorate35([
4329
4279
  _ts_metadata34("design:type", String)
4330
4280
  ], Oid4vcStateEntity.prototype, "tenantId", void 0);
4331
4281
  Oid4vcStateEntity = _ts_decorate35([
4332
- Entity28("Oid4vcStateEntity")
4282
+ Entity27("Oid4vcStateEntity")
4333
4283
  ], Oid4vcStateEntity);
4334
4284
 
4335
4285
  // src/contact/ContactStore.ts
@@ -6072,49 +6022,55 @@ import { In as In3 } from "typeorm";
6072
6022
  // src/utils/statusList/MappingUtils.ts
6073
6023
  import { StatusListType as StatusListType2 } from "@sphereon/ssi-types";
6074
6024
  var statusListEntityFrom = /* @__PURE__ */ __name((args) => {
6075
- if (args.type === StatusListType2.StatusList2021) {
6076
- const entity = new StatusList2021Entity();
6077
- const sl2021 = args;
6078
- entity.indexingDirection = sl2021.indexingDirection;
6079
- entity.statusPurpose = sl2021.statusPurpose;
6080
- setBaseFields(entity, args);
6081
- Object.defineProperty(entity, "type", {
6082
- value: StatusListType2.StatusList2021,
6083
- enumerable: true,
6084
- configurable: true
6085
- });
6086
- return entity;
6087
- }
6088
- if (args.type === StatusListType2.OAuthStatusList) {
6089
- const entity = new OAuthStatusListEntity();
6090
- const oauthSl = args;
6091
- entity.bitsPerStatus = oauthSl.bitsPerStatus;
6092
- entity.expiresAt = oauthSl.expiresAt;
6093
- setBaseFields(entity, args);
6094
- Object.defineProperty(entity, "type", {
6095
- value: StatusListType2.OAuthStatusList,
6096
- enumerable: true,
6097
- configurable: true
6098
- });
6099
- return entity;
6100
- }
6101
- if (args.type === StatusListType2.BitstringStatusList) {
6102
- const entity = new BitstringStatusListEntity();
6103
- const bitstringsl = args;
6104
- entity.statusPurpose = bitstringsl.statusPurpose;
6105
- entity.statusSize = bitstringsl.statusSize;
6106
- entity.validFrom = bitstringsl.validFrom;
6107
- entity.validUntil = bitstringsl.validUntil;
6108
- entity.ttl = bitstringsl.ttl;
6109
- setBaseFields(entity, args);
6110
- Object.defineProperty(entity, "type", {
6111
- value: StatusListType2.BitstringStatusList,
6112
- enumerable: true,
6113
- configurable: true
6114
- });
6115
- return entity;
6025
+ switch (args.type) {
6026
+ case StatusListType2.StatusList2021: {
6027
+ const entity = new StatusList2021Entity();
6028
+ const sl2021 = args;
6029
+ entity.indexingDirection = sl2021.indexingDirection;
6030
+ entity.statusPurpose = sl2021.statusPurpose;
6031
+ setBaseFields(entity, args);
6032
+ Object.defineProperty(entity, "type", {
6033
+ value: StatusListType2.StatusList2021,
6034
+ enumerable: true,
6035
+ configurable: true
6036
+ });
6037
+ return entity;
6038
+ }
6039
+ case StatusListType2.OAuthStatusList: {
6040
+ const entity = new OAuthStatusListEntity();
6041
+ const oauthSl = args;
6042
+ entity.bitsPerStatus = oauthSl.bitsPerStatus;
6043
+ entity.expiresAt = oauthSl.expiresAt;
6044
+ setBaseFields(entity, args);
6045
+ Object.defineProperty(entity, "type", {
6046
+ value: StatusListType2.OAuthStatusList,
6047
+ enumerable: true,
6048
+ configurable: true
6049
+ });
6050
+ return entity;
6051
+ }
6052
+ case StatusListType2.BitstringStatusList: {
6053
+ const entity = new BitstringStatusListEntity();
6054
+ const bitstringsl = args;
6055
+ if (!bitstringsl.bitsPerStatus) {
6056
+ throw Error("bitsPerStatus must be set for BitstringStatusList");
6057
+ }
6058
+ entity.statusPurpose = bitstringsl.statusPurpose;
6059
+ entity.bitsPerStatus = bitstringsl.bitsPerStatus;
6060
+ entity.validFrom = bitstringsl.validFrom;
6061
+ entity.validUntil = bitstringsl.validUntil;
6062
+ entity.ttl = bitstringsl.ttl;
6063
+ setBaseFields(entity, args);
6064
+ Object.defineProperty(entity, "type", {
6065
+ value: StatusListType2.BitstringStatusList,
6066
+ enumerable: true,
6067
+ configurable: true
6068
+ });
6069
+ return entity;
6070
+ }
6071
+ default:
6072
+ throw new Error(`Invalid status list type ${args.type}`);
6116
6073
  }
6117
- throw new Error(`Invalid status list type ${args.type}`);
6118
6074
  }, "statusListEntityFrom");
6119
6075
  var statusListFrom = /* @__PURE__ */ __name((entity) => {
6120
6076
  if (entity instanceof StatusList2021Entity) {
@@ -6140,7 +6096,7 @@ var statusListFrom = /* @__PURE__ */ __name((entity) => {
6140
6096
  ...getBaseFields(entity),
6141
6097
  type: StatusListType2.BitstringStatusList,
6142
6098
  statusPurpose: entity.statusPurpose,
6143
- statusSize: entity.statusSize,
6099
+ bitsPerStatus: entity.bitsPerStatus,
6144
6100
  validFrom: entity.validFrom,
6145
6101
  validUntil: entity.validUntil,
6146
6102
  ttl: entity.ttl
@@ -6197,33 +6153,44 @@ var StatusListStore = class {
6197
6153
  ...args,
6198
6154
  id: args.statusListId
6199
6155
  });
6200
- const repo = await this.getStatusListEntryRepo();
6156
+ const repo = await this.getStatusListEntryRepo(statusList.type);
6201
6157
  const results = (await repo.find({
6202
6158
  where: {
6203
- statusList,
6159
+ statusListId: statusList.id,
6204
6160
  statusListIndex: In3(statusListIndex)
6205
6161
  }
6206
6162
  })).map((index) => index.statusListIndex);
6207
6163
  return statusListIndex.filter((index) => !results.includes(index));
6208
6164
  }
6209
6165
  async addStatusListEntry(args) {
6210
- return (await this.getStatusListEntryRepo()).save(args);
6166
+ if (!args.statusListId) {
6167
+ throw new Error("statusListId is required");
6168
+ }
6169
+ const statusList = await this.getStatusList({
6170
+ id: args.statusListId
6171
+ });
6172
+ return await (await this.getStatusListEntryRepo(statusList.type)).save(args);
6211
6173
  }
6212
6174
  async updateStatusListEntry(args) {
6213
- const statusListId = args.statusListId ?? args.statusList?.id;
6175
+ const statusListId = args.statusListId;
6176
+ if (!statusListId) {
6177
+ throw new Error("statusListId is required");
6178
+ }
6179
+ const statusList = await this.getStatusList({
6180
+ id: statusListId
6181
+ });
6214
6182
  const result = await this.getStatusListEntryByIndex({
6215
6183
  ...args,
6216
6184
  statusListId,
6217
6185
  errorOnNotFound: false
6218
6186
  });
6219
6187
  const updatedEntry = {
6220
- value: args.value,
6221
- correlationId: args.correlationId,
6222
- credentialHash: args.credentialHash,
6223
- credentialId: args.credentialId
6188
+ ...result,
6189
+ ...args,
6190
+ statusListId
6224
6191
  };
6225
6192
  const updStatusListId = result?.statusListId ?? statusListId;
6226
- const updateResult = await (await this.getStatusListEntryRepo()).upsert({
6193
+ const updateResult = await (await this.getStatusListEntryRepo(statusList.type)).upsert({
6227
6194
  ...result ?? {
6228
6195
  statusListId: updStatusListId,
6229
6196
  statusListIndex: args.statusListIndex
@@ -6235,7 +6202,7 @@ var StatusListStore = class {
6235
6202
  "statusListIndex"
6236
6203
  ]
6237
6204
  });
6238
- console.log(updateResult);
6205
+ debug4(updateResult);
6239
6206
  return await this.getStatusListEntryByIndex({
6240
6207
  ...args,
6241
6208
  statusListId: updStatusListId,
@@ -6249,7 +6216,12 @@ var StatusListStore = class {
6249
6216
  if (!statusListIndex && !entryCorrelationId) {
6250
6217
  throw Error(`Cannot get statusList entry without either a statusListIndex or entryCorrelationId`);
6251
6218
  }
6252
- const result = await (await this.getStatusListEntryRepo()).findOne({
6219
+ const statusList = statusListId ? await this.getStatusList({
6220
+ id: statusListId
6221
+ }) : await this.getStatusList({
6222
+ correlationId: statusListCorrelationId
6223
+ });
6224
+ const result = await (await this.getStatusListEntryRepo(statusList.type)).findOne({
6253
6225
  where: {
6254
6226
  ...statusListId && {
6255
6227
  statusListId
@@ -6293,8 +6265,8 @@ var StatusListStore = class {
6293
6265
  },
6294
6266
  credentialId
6295
6267
  };
6296
- console.log(`Entries: ${JSON.stringify(await (await this.getStatusListEntryRepo()).find(), null, 2)}`);
6297
- const result = await (await this.getStatusListEntryRepo()).findOne({
6268
+ debug4(`Entries: ${JSON.stringify(await (await this.getStatusListEntryRepo(statusList.type)).find(), null, 2)}`);
6269
+ const result = await (await this.getStatusListEntryRepo(statusList.type)).findOne({
6298
6270
  where
6299
6271
  });
6300
6272
  if (!result && args.errorOnNotFound) {
@@ -6310,7 +6282,11 @@ var StatusListStore = class {
6310
6282
  error2 = true;
6311
6283
  }
6312
6284
  if (!error) {
6313
- const result = await (await this.getStatusListEntryRepo()).delete({
6285
+ const statusList = await this.getStatusList({
6286
+ id: args.statusListId,
6287
+ correlationId: args.statusListCorrelationId
6288
+ });
6289
+ const result = await (await this.getStatusListEntryRepo(statusList.type)).delete({
6314
6290
  ...args.statusListId && {
6315
6291
  statusList: args.statusListId
6316
6292
  },
@@ -6331,9 +6307,12 @@ var StatusListStore = class {
6331
6307
  error2 = true;
6332
6308
  }
6333
6309
  if (error) {
6334
- console.log(`Could not delete statusList ${args.statusListId} entry by index ${args.statusListIndex}`);
6310
+ console.error(`Could not delete statusList ${args.statusListId} entry by index ${args.statusListIndex}`);
6335
6311
  } else {
6336
- const result = await (await this.getStatusListEntryRepo()).delete({
6312
+ const statusList = await this.getStatusList({
6313
+ id: args.statusListId
6314
+ });
6315
+ const result = await (await this.getStatusListEntryRepo(statusList.type)).delete({
6337
6316
  ...args.statusListId && {
6338
6317
  statusList: args.statusListId
6339
6318
  },
@@ -6347,15 +6326,16 @@ var StatusListStore = class {
6347
6326
  return !error;
6348
6327
  }
6349
6328
  async getStatusListEntries(args) {
6350
- return (await this.getStatusListEntryRepo()).find({
6329
+ const statusList = await this.getStatusList({
6330
+ id: args.statusListId
6331
+ });
6332
+ const results = await (await this.getStatusListEntryRepo(statusList.type)).find({
6351
6333
  where: {
6352
6334
  ...args?.filter,
6353
6335
  statusList: args.statusListId
6354
6336
  }
6355
6337
  });
6356
- }
6357
- async getStatusList(args) {
6358
- return statusListFrom(await this.getStatusListEntity(args));
6338
+ return results;
6359
6339
  }
6360
6340
  async getStatusListEntity(args) {
6361
6341
  if (!args.id && !args.correlationId) {
@@ -6379,6 +6359,10 @@ var StatusListStore = class {
6379
6359
  }
6380
6360
  return result;
6381
6361
  }
6362
+ async getStatusList(args) {
6363
+ const entity = await this.getStatusListEntity(args);
6364
+ return statusListFrom(entity);
6365
+ }
6382
6366
  async getStatusLists(args) {
6383
6367
  const result = await (await this.getStatusListRepo()).find({
6384
6368
  where: args.filter
@@ -6419,7 +6403,7 @@ var StatusListStore = class {
6419
6403
  }
6420
6404
  async removeStatusList(args) {
6421
6405
  const result = await this.getStatusListEntity(args);
6422
- await (await this.getStatusListEntryRepo()).delete({
6406
+ await (await this.getStatusListEntryRepo(result.type)).delete({
6423
6407
  statusListId: result.id
6424
6408
  });
6425
6409
  const deletedEntity = await (await this.getStatusListRepo()).remove(result);
@@ -6441,8 +6425,14 @@ var StatusListStore = class {
6441
6425
  return dataSource.getRepository(StatusListEntity);
6442
6426
  }
6443
6427
  }
6444
- async getStatusListEntryRepo() {
6445
- return (await this.getDS()).getRepository(StatusListEntryEntity);
6428
+ async getStatusListEntryRepo(type) {
6429
+ const dataSource = await this.getDS();
6430
+ switch (type) {
6431
+ case StatusListType3.BitstringStatusList:
6432
+ return dataSource.getRepository(BitstringStatusListEntryEntity);
6433
+ default:
6434
+ return dataSource.getRepository(StatusListEntryEntity);
6435
+ }
6446
6436
  }
6447
6437
  };
6448
6438
 
@@ -8920,41 +8910,32 @@ var CreateBitstringStatusListPG1741895823000 = class {
8920
8910
  }
8921
8911
  name = "CreateBitstringStatusList1741895823000";
8922
8912
  async up(queryRunner) {
8923
- await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "statusSize" integer DEFAULT 1`);
8913
+ await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "bitsPerStatus" integer DEFAULT 1`);
8924
8914
  await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "ttl" integer`);
8925
8915
  await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "validFrom" TIMESTAMP`);
8926
8916
  await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "validUntil" TIMESTAMP`);
8927
8917
  await queryRunner.query(`ALTER TABLE "StatusList" DROP CONSTRAINT IF EXISTS "CHK_StatusList_type"`);
8928
8918
  await queryRunner.query(`ALTER TABLE "StatusList" ADD CONSTRAINT "CHK_StatusList_type" CHECK ("type" IN ('StatusList2021', 'OAuthStatusList', 'BitstringStatusList'))`);
8929
- await queryRunner.query(`
8930
- CREATE TABLE "BitstringStatusListEntry" (
8931
- "statusListId" character varying NOT NULL,
8932
- "statusListIndex" integer NOT NULL,
8933
- "credentialId" text,
8934
- "credentialHash" character varying(128),
8935
- "correlationId" character varying(255),
8936
- "statusPurpose" character varying NOT NULL,
8937
- "statusSize" integer DEFAULT 1,
8938
- "statusMessage" text,
8939
- "statusReference" text,
8940
- CONSTRAINT "PK_BitstringStatusListEntry" PRIMARY KEY ("statusListId", "statusListIndex")
8941
- )
8942
- `);
8943
- await queryRunner.query(`
8944
- ALTER TABLE "BitstringStatusListEntry"
8945
- ADD CONSTRAINT "FK_BitstringStatusListEntry_statusListId"
8946
- FOREIGN KEY ("statusListId") REFERENCES "StatusList"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
8947
- `);
8919
+ await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "type" character varying NOT NULL DEFAULT 'StatusListEntryEntity'`);
8920
+ await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "statusPurpose" character varying`);
8921
+ await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "bitsPerStatus" integer DEFAULT 1`);
8922
+ await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "statusMessage" text`);
8923
+ await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "statusReference" text`);
8924
+ await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD CONSTRAINT "CHK_StatusListEntry_type" CHECK ("type" IN ('StatusListEntryEntity', 'bitstring'))`);
8948
8925
  }
8949
8926
  async down(queryRunner) {
8950
- await queryRunner.query(`ALTER TABLE "BitstringStatusListEntry" DROP CONSTRAINT "FK_BitstringStatusListEntry_statusListId"`);
8951
- await queryRunner.query(`DROP TABLE "BitstringStatusListEntry"`);
8927
+ await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP CONSTRAINT "CHK_StatusListEntry_type"`);
8928
+ await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "statusReference"`);
8929
+ await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "statusMessage"`);
8930
+ await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "bitsPerStatus"`);
8931
+ await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "statusPurpose"`);
8932
+ await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "type"`);
8952
8933
  await queryRunner.query(`ALTER TABLE "StatusList" DROP CONSTRAINT "CHK_StatusList_type"`);
8953
8934
  await queryRunner.query(`ALTER TABLE "StatusList" ADD CONSTRAINT "CHK_StatusList_type" CHECK ("type" IN ('StatusList2021', 'OAuthStatusList'))`);
8954
8935
  await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "validUntil"`);
8955
8936
  await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "validFrom"`);
8956
8937
  await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "ttl"`);
8957
- await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "statusSize"`);
8938
+ await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "bitsPerStatus"`);
8958
8939
  }
8959
8940
  };
8960
8941
 
@@ -8974,13 +8955,12 @@ var CreateBitstringStatusListSqlite1741895823001 = class {
8974
8955
  "type" varchar CHECK( "type" IN ('StatusList2021', 'OAuthStatusList', 'BitstringStatusList') ) NOT NULL DEFAULT ('StatusList2021'),
8975
8956
  "driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'),
8976
8957
  "credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'),
8977
- "proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt') ) NOT NULL DEFAULT ('lds'),
8958
+ "proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt', 'vc+jwt') ) NOT NULL DEFAULT ('lds'),
8978
8959
  "indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ),
8979
8960
  "statusPurpose" varchar,
8980
8961
  "statusListCredential" text,
8981
- "bitsPerStatus" integer,
8982
8962
  "expiresAt" datetime,
8983
- "statusSize" integer DEFAULT (1),
8963
+ "bitsPerStatus" integer DEFAULT (1),
8984
8964
  "ttl" integer,
8985
8965
  "validFrom" datetime,
8986
8966
  "validUntil" datetime,
@@ -9002,22 +8982,59 @@ var CreateBitstringStatusListSqlite1741895823001 = class {
9002
8982
  await queryRunner.query(`DROP TABLE "StatusList"`);
9003
8983
  await queryRunner.query(`ALTER TABLE "temporary_StatusList" RENAME TO "StatusList"`);
9004
8984
  await queryRunner.query(`
9005
- CREATE TABLE "BitstringStatusListEntry" (
8985
+ CREATE TABLE "temporary_StatusListEntry" (
9006
8986
  "statusListId" varchar NOT NULL,
9007
8987
  "statusListIndex" integer NOT NULL,
9008
8988
  "credentialId" text,
9009
8989
  "credentialHash" varchar(128),
9010
8990
  "correlationId" varchar(255),
9011
- "statusPurpose" varchar NOT NULL,
9012
- "statusSize" integer DEFAULT (1),
8991
+ "value" varchar(50),
8992
+ "type" varchar CHECK( "type" IN ('StatusListEntryEntity', 'bitstring') ) NOT NULL DEFAULT ('StatusListEntryEntity'),
8993
+ "statusPurpose" varchar,
8994
+ "bitsPerStatus" integer DEFAULT (1),
9013
8995
  "statusMessage" text,
9014
8996
  "statusReference" text,
9015
8997
  PRIMARY KEY ("statusListId", "statusListIndex")
9016
8998
  )
9017
8999
  `);
9000
+ await queryRunner.query(`
9001
+ INSERT INTO "temporary_StatusListEntry"(
9002
+ "statusListId", "statusListIndex", "credentialId", "credentialHash",
9003
+ "correlationId", "value", "type"
9004
+ )
9005
+ SELECT
9006
+ "statusListId", "statusListIndex", "credentialId", "credentialHash",
9007
+ "correlationId", "value", 'StatusListEntryEntity'
9008
+ FROM "StatusListEntry"
9009
+ `);
9010
+ await queryRunner.query(`DROP TABLE "StatusListEntry"`);
9011
+ await queryRunner.query(`ALTER TABLE "temporary_StatusListEntry" RENAME TO "StatusListEntry"`);
9018
9012
  }
9019
9013
  async down(queryRunner) {
9020
- await queryRunner.query(`DROP TABLE "BitstringStatusListEntry"`);
9014
+ await queryRunner.query(`
9015
+ CREATE TABLE "temporary_StatusListEntry" (
9016
+ "statusListId" varchar NOT NULL,
9017
+ "statusListIndex" integer NOT NULL,
9018
+ "credentialId" text,
9019
+ "credentialHash" varchar(128),
9020
+ "correlationId" varchar(255),
9021
+ "value" varchar(50),
9022
+ PRIMARY KEY ("statusListId", "statusListIndex")
9023
+ )
9024
+ `);
9025
+ await queryRunner.query(`
9026
+ INSERT INTO "temporary_StatusListEntry"(
9027
+ "statusListId", "statusListIndex", "credentialId", "credentialHash",
9028
+ "correlationId", "value"
9029
+ )
9030
+ SELECT
9031
+ "statusListId", "statusListIndex", "credentialId", "credentialHash",
9032
+ "correlationId", "value"
9033
+ FROM "StatusListEntry"
9034
+ WHERE "type" = 'StatusListEntryEntity'
9035
+ `);
9036
+ await queryRunner.query(`DROP TABLE "StatusListEntry"`);
9037
+ await queryRunner.query(`ALTER TABLE "temporary_StatusListEntry" RENAME TO "StatusListEntry"`);
9021
9038
  await queryRunner.query(`
9022
9039
  CREATE TABLE "temporary_StatusList" (
9023
9040
  "id" varchar PRIMARY KEY NOT NULL,
@@ -9027,7 +9044,7 @@ var CreateBitstringStatusListSqlite1741895823001 = class {
9027
9044
  "type" varchar CHECK( "type" IN ('StatusList2021', 'OAuthStatusList') ) NOT NULL DEFAULT ('StatusList2021'),
9028
9045
  "driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'),
9029
9046
  "credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'),
9030
- "proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt') ) NOT NULL DEFAULT ('lds'),
9047
+ "proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt', 'vc+jwt') ) NOT NULL DEFAULT ('lds'),
9031
9048
  "indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ),
9032
9049
  "statusPurpose" varchar,
9033
9050
  "statusListCredential" text,