@sphereon/ssi-sdk.data-store 0.34.1-feature.SSISDK.17.bitstring.sl.9 → 0.34.1-next.29
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 +199 -182
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +92 -42
- package/dist/index.d.ts +92 -42
- package/dist/index.js +209 -192
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/__tests__/statusList.store.test.ts +1 -0
- package/src/entities/statusList/BitstringStatusListEntryEntity.ts +8 -30
- package/src/entities/statusList/StatusList2021EntryEntity.ts +2 -1
- package/src/entities/statusList/StatusListEntities.ts +7 -0
- package/src/migrations/postgres/1741895823000-CreateBitstringStatusList.ts +23 -24
- package/src/migrations/sqlite/1741895823001-CreateBitstringStatusList.ts +49 -6
- package/src/statusList/IStatusListStore.ts +14 -11
- package/src/statusList/StatusListStore.ts +69 -33
- package/src/types/index.ts +0 -1
- package/src/types/statusList/IAbstractStatusListStore.ts +54 -4
- package/src/types/statusList/statusList.ts +40 -2
- package/src/utils/statusList/MappingUtils.ts +49 -46
- package/src/types/statusList/bitstringTypes.ts +0 -7
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,15 +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 {
|
|
2801
|
-
import { BaseEntity as BaseEntity20, Column as Column24, Entity as Entity22, JoinColumn as JoinColumn14, ManyToOne as ManyToOne12, PrimaryColumn as PrimaryColumn2 } from "typeorm";
|
|
2806
|
+
import { ChildEntity as ChildEntity5, Column as Column24 } from "typeorm";
|
|
2802
2807
|
function _ts_decorate27(decorators, target, key, desc) {
|
|
2803
2808
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2804
2809
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2810,77 +2815,15 @@ function _ts_metadata26(k, v) {
|
|
|
2810
2815
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2811
2816
|
}
|
|
2812
2817
|
__name(_ts_metadata26, "_ts_metadata");
|
|
2813
|
-
var BitstringStatusListEntryEntity = class extends
|
|
2818
|
+
var BitstringStatusListEntryEntity = class extends StatusListEntryEntity {
|
|
2814
2819
|
static {
|
|
2815
2820
|
__name(this, "BitstringStatusListEntryEntity");
|
|
2816
2821
|
}
|
|
2817
|
-
statusListId;
|
|
2818
|
-
statusListIndex;
|
|
2819
|
-
statusList;
|
|
2820
|
-
credentialId;
|
|
2821
|
-
credentialHash;
|
|
2822
|
-
entryCorrelationId;
|
|
2823
2822
|
statusPurpose;
|
|
2824
2823
|
bitsPerStatus;
|
|
2825
2824
|
statusMessage;
|
|
2826
2825
|
statusReference;
|
|
2827
2826
|
};
|
|
2828
|
-
_ts_decorate27([
|
|
2829
|
-
PrimaryColumn2({
|
|
2830
|
-
name: "statusListId",
|
|
2831
|
-
type: "varchar",
|
|
2832
|
-
nullable: false,
|
|
2833
|
-
unique: false
|
|
2834
|
-
}),
|
|
2835
|
-
Validate10(IsNonEmptyStringConstraint, {
|
|
2836
|
-
message: "Status list id is required"
|
|
2837
|
-
}),
|
|
2838
|
-
_ts_metadata26("design:type", String)
|
|
2839
|
-
], BitstringStatusListEntryEntity.prototype, "statusListId", void 0);
|
|
2840
|
-
_ts_decorate27([
|
|
2841
|
-
PrimaryColumn2({
|
|
2842
|
-
name: "statusListIndex",
|
|
2843
|
-
type: "integer",
|
|
2844
|
-
nullable: false,
|
|
2845
|
-
unique: false
|
|
2846
|
-
}),
|
|
2847
|
-
_ts_metadata26("design:type", Number)
|
|
2848
|
-
], BitstringStatusListEntryEntity.prototype, "statusListIndex", void 0);
|
|
2849
|
-
_ts_decorate27([
|
|
2850
|
-
ManyToOne12(() => BitstringStatusListEntity, (statusList) => statusList.statusListEntries),
|
|
2851
|
-
JoinColumn14({
|
|
2852
|
-
name: "statusListId"
|
|
2853
|
-
}),
|
|
2854
|
-
_ts_metadata26("design:type", typeof BitstringStatusListEntity === "undefined" ? Object : BitstringStatusListEntity)
|
|
2855
|
-
], BitstringStatusListEntryEntity.prototype, "statusList", void 0);
|
|
2856
|
-
_ts_decorate27([
|
|
2857
|
-
Column24({
|
|
2858
|
-
name: "credentialId",
|
|
2859
|
-
type: "text",
|
|
2860
|
-
nullable: true
|
|
2861
|
-
}),
|
|
2862
|
-
_ts_metadata26("design:type", String)
|
|
2863
|
-
], BitstringStatusListEntryEntity.prototype, "credentialId", void 0);
|
|
2864
|
-
_ts_decorate27([
|
|
2865
|
-
Column24({
|
|
2866
|
-
name: "credentialHash",
|
|
2867
|
-
length: 128,
|
|
2868
|
-
type: "varchar",
|
|
2869
|
-
nullable: true,
|
|
2870
|
-
unique: false
|
|
2871
|
-
}),
|
|
2872
|
-
_ts_metadata26("design:type", String)
|
|
2873
|
-
], BitstringStatusListEntryEntity.prototype, "credentialHash", void 0);
|
|
2874
|
-
_ts_decorate27([
|
|
2875
|
-
Column24({
|
|
2876
|
-
name: "correlationId",
|
|
2877
|
-
length: 255,
|
|
2878
|
-
type: "varchar",
|
|
2879
|
-
nullable: true,
|
|
2880
|
-
unique: false
|
|
2881
|
-
}),
|
|
2882
|
-
_ts_metadata26("design:type", String)
|
|
2883
|
-
], BitstringStatusListEntryEntity.prototype, "entryCorrelationId", void 0);
|
|
2884
2827
|
_ts_decorate27([
|
|
2885
2828
|
Column24({
|
|
2886
2829
|
type: "varchar",
|
|
@@ -2949,7 +2892,7 @@ _ts_decorate27([
|
|
|
2949
2892
|
_ts_metadata26("design:type", Object)
|
|
2950
2893
|
], BitstringStatusListEntryEntity.prototype, "statusReference", void 0);
|
|
2951
2894
|
BitstringStatusListEntryEntity = _ts_decorate27([
|
|
2952
|
-
|
|
2895
|
+
ChildEntity5("bitstring")
|
|
2953
2896
|
], BitstringStatusListEntryEntity);
|
|
2954
2897
|
|
|
2955
2898
|
// src/entities/statusList/StatusListEntities.ts
|
|
@@ -2964,14 +2907,15 @@ function _ts_metadata27(k, v) {
|
|
|
2964
2907
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2965
2908
|
}
|
|
2966
2909
|
__name(_ts_metadata27, "_ts_metadata");
|
|
2967
|
-
var { BaseEntity:
|
|
2968
|
-
var StatusListEntity = class extends
|
|
2910
|
+
var { BaseEntity: BaseEntity20, ChildEntity: ChildEntity6, Column: Column25, Entity: Entity22, OneToMany: OneToMany8, PrimaryColumn: PrimaryColumn2, TableInheritance: TableInheritance5, Unique } = typeorm9;
|
|
2911
|
+
var StatusListEntity = class extends BaseEntity20 {
|
|
2969
2912
|
static {
|
|
2970
2913
|
__name(this, "StatusListEntity");
|
|
2971
2914
|
}
|
|
2972
2915
|
id;
|
|
2973
2916
|
correlationId;
|
|
2974
2917
|
length;
|
|
2918
|
+
type;
|
|
2975
2919
|
issuer;
|
|
2976
2920
|
driverType;
|
|
2977
2921
|
credentialIdMode;
|
|
@@ -2979,7 +2923,7 @@ var StatusListEntity = class extends BaseEntity21 {
|
|
|
2979
2923
|
statusListCredential;
|
|
2980
2924
|
};
|
|
2981
2925
|
_ts_decorate28([
|
|
2982
|
-
|
|
2926
|
+
PrimaryColumn2({
|
|
2983
2927
|
name: "id",
|
|
2984
2928
|
type: "varchar"
|
|
2985
2929
|
}),
|
|
@@ -3002,6 +2946,14 @@ _ts_decorate28([
|
|
|
3002
2946
|
}),
|
|
3003
2947
|
_ts_metadata27("design:type", Number)
|
|
3004
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);
|
|
3005
2957
|
_ts_decorate28([
|
|
3006
2958
|
Column25({
|
|
3007
2959
|
name: "issuer",
|
|
@@ -3080,11 +3032,11 @@ _ts_decorate28([
|
|
|
3080
3032
|
_ts_metadata27("design:type", typeof StatusListCredential === "undefined" ? Object : StatusListCredential)
|
|
3081
3033
|
], StatusListEntity.prototype, "statusListCredential", void 0);
|
|
3082
3034
|
StatusListEntity = _ts_decorate28([
|
|
3083
|
-
|
|
3035
|
+
Entity22("StatusList"),
|
|
3084
3036
|
Unique("UQ_correlationId", [
|
|
3085
3037
|
"correlationId"
|
|
3086
3038
|
]),
|
|
3087
|
-
|
|
3039
|
+
TableInheritance5({
|
|
3088
3040
|
column: {
|
|
3089
3041
|
type: "simple-enum",
|
|
3090
3042
|
name: "type",
|
|
@@ -3126,7 +3078,7 @@ _ts_decorate28([
|
|
|
3126
3078
|
_ts_metadata27("design:type", Array)
|
|
3127
3079
|
], StatusList2021Entity.prototype, "statusListEntries", void 0);
|
|
3128
3080
|
StatusList2021Entity = _ts_decorate28([
|
|
3129
|
-
|
|
3081
|
+
ChildEntity6(StatusListType.StatusList2021)
|
|
3130
3082
|
], StatusList2021Entity);
|
|
3131
3083
|
var OAuthStatusListEntity = class extends StatusListEntity {
|
|
3132
3084
|
static {
|
|
@@ -3152,7 +3104,7 @@ _ts_decorate28([
|
|
|
3152
3104
|
_ts_metadata27("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3153
3105
|
], OAuthStatusListEntity.prototype, "expiresAt", void 0);
|
|
3154
3106
|
OAuthStatusListEntity = _ts_decorate28([
|
|
3155
|
-
|
|
3107
|
+
ChildEntity6(StatusListType.OAuthStatusList)
|
|
3156
3108
|
], OAuthStatusListEntity);
|
|
3157
3109
|
var BitstringStatusListEntity = class extends StatusListEntity {
|
|
3158
3110
|
static {
|
|
@@ -3224,11 +3176,11 @@ _ts_decorate28([
|
|
|
3224
3176
|
_ts_metadata27("design:type", Array)
|
|
3225
3177
|
], BitstringStatusListEntity.prototype, "statusListEntries", void 0);
|
|
3226
3178
|
BitstringStatusListEntity = _ts_decorate28([
|
|
3227
|
-
|
|
3179
|
+
ChildEntity6(StatusListType.BitstringStatusList)
|
|
3228
3180
|
], BitstringStatusListEntity);
|
|
3229
3181
|
|
|
3230
3182
|
// src/entities/machineState/MachineStateInfoEntity.ts
|
|
3231
|
-
import { BaseEntity as
|
|
3183
|
+
import { BaseEntity as BaseEntity21, Column as Column26, CreateDateColumn as CreateDateColumn11, Entity as Entity23, PrimaryColumn as PrimaryColumn3, UpdateDateColumn as UpdateDateColumn11 } from "typeorm";
|
|
3232
3184
|
import { typeOrmDateTime as typeOrmDateTime14 } from "@sphereon/ssi-sdk.agent-config";
|
|
3233
3185
|
function _ts_decorate29(decorators, target, key, desc) {
|
|
3234
3186
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -3241,7 +3193,7 @@ function _ts_metadata28(k, v) {
|
|
|
3241
3193
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3242
3194
|
}
|
|
3243
3195
|
__name(_ts_metadata28, "_ts_metadata");
|
|
3244
|
-
var MachineStateInfoEntity = class extends
|
|
3196
|
+
var MachineStateInfoEntity = class extends BaseEntity21 {
|
|
3245
3197
|
static {
|
|
3246
3198
|
__name(this, "MachineStateInfoEntity");
|
|
3247
3199
|
}
|
|
@@ -3260,7 +3212,7 @@ var MachineStateInfoEntity = class extends BaseEntity22 {
|
|
|
3260
3212
|
tenantId;
|
|
3261
3213
|
};
|
|
3262
3214
|
_ts_decorate29([
|
|
3263
|
-
|
|
3215
|
+
PrimaryColumn3({
|
|
3264
3216
|
name: "instance_id",
|
|
3265
3217
|
type: "varchar",
|
|
3266
3218
|
nullable: false
|
|
@@ -3356,12 +3308,12 @@ _ts_decorate29([
|
|
|
3356
3308
|
_ts_metadata28("design:type", String)
|
|
3357
3309
|
], MachineStateInfoEntity.prototype, "tenantId", void 0);
|
|
3358
3310
|
MachineStateInfoEntity = _ts_decorate29([
|
|
3359
|
-
|
|
3311
|
+
Entity23("MachineStateInfoEntity")
|
|
3360
3312
|
], MachineStateInfoEntity);
|
|
3361
3313
|
|
|
3362
3314
|
// src/entities/contact/OrganizationEntity.ts
|
|
3363
3315
|
import { IsNotEmpty as IsNotEmpty10, validate as validate16 } from "class-validator";
|
|
3364
|
-
import { BeforeInsert as BeforeInsert18, BeforeUpdate as BeforeUpdate18, ChildEntity as
|
|
3316
|
+
import { BeforeInsert as BeforeInsert18, BeforeUpdate as BeforeUpdate18, ChildEntity as ChildEntity7, Column as Column27 } from "typeorm";
|
|
3365
3317
|
function _ts_decorate30(decorators, target, key, desc) {
|
|
3366
3318
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3367
3319
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -3438,12 +3390,12 @@ _ts_decorate30([
|
|
|
3438
3390
|
_ts_metadata29("design:returntype", Promise)
|
|
3439
3391
|
], OrganizationEntity.prototype, "validate", null);
|
|
3440
3392
|
OrganizationEntity = _ts_decorate30([
|
|
3441
|
-
|
|
3393
|
+
ChildEntity7("Organization")
|
|
3442
3394
|
], OrganizationEntity);
|
|
3443
3395
|
|
|
3444
3396
|
// src/entities/contact/NaturalPersonEntity.ts
|
|
3445
|
-
import { Column as Column28, ChildEntity as
|
|
3446
|
-
import { validate as validate17, IsNotEmpty as IsNotEmpty11, Validate as
|
|
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";
|
|
3447
3399
|
function _ts_decorate31(decorators, target, key, desc) {
|
|
3448
3400
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3449
3401
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -3495,7 +3447,7 @@ _ts_decorate31([
|
|
|
3495
3447
|
nullable: true,
|
|
3496
3448
|
unique: false
|
|
3497
3449
|
}),
|
|
3498
|
-
|
|
3450
|
+
Validate10(IsNonEmptyStringConstraint, {
|
|
3499
3451
|
message: "Blank middle names are not allowed"
|
|
3500
3452
|
}),
|
|
3501
3453
|
_ts_metadata30("design:type", String)
|
|
@@ -3546,14 +3498,14 @@ _ts_decorate31([
|
|
|
3546
3498
|
_ts_metadata30("design:returntype", Promise)
|
|
3547
3499
|
], NaturalPersonEntity.prototype, "validate", null);
|
|
3548
3500
|
NaturalPersonEntity = _ts_decorate31([
|
|
3549
|
-
|
|
3501
|
+
ChildEntity8("NaturalPerson")
|
|
3550
3502
|
], NaturalPersonEntity);
|
|
3551
3503
|
|
|
3552
3504
|
// src/entities/eventLogger/AuditEventEntity.ts
|
|
3553
3505
|
import { ActionType, InitiatorType, LoggingEventType, LogLevel, SubSystem, System, SystemCorrelationIdType } from "@sphereon/ssi-types";
|
|
3554
3506
|
import { CredentialType, PartyCorrelationType } from "@sphereon/ssi-sdk.core";
|
|
3555
3507
|
import { typeOrmDateTime as typeOrmDateTime15 } from "@sphereon/ssi-sdk.agent-config";
|
|
3556
|
-
import { BaseEntity as
|
|
3508
|
+
import { BaseEntity as BaseEntity22, Column as Column29, CreateDateColumn as CreateDateColumn12, Entity as Entity24, PrimaryGeneratedColumn as PrimaryGeneratedColumn21, UpdateDateColumn as UpdateDateColumn12 } from "typeorm";
|
|
3557
3509
|
function _ts_decorate32(decorators, target, key, desc) {
|
|
3558
3510
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3559
3511
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -3565,7 +3517,7 @@ function _ts_metadata31(k, v) {
|
|
|
3565
3517
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3566
3518
|
}
|
|
3567
3519
|
__name(_ts_metadata31, "_ts_metadata");
|
|
3568
|
-
var AuditEventEntity = class extends
|
|
3520
|
+
var AuditEventEntity = class extends BaseEntity22 {
|
|
3569
3521
|
static {
|
|
3570
3522
|
__name(this, "AuditEventEntity");
|
|
3571
3523
|
}
|
|
@@ -3812,12 +3764,12 @@ _ts_decorate32([
|
|
|
3812
3764
|
_ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3813
3765
|
], AuditEventEntity.prototype, "lastUpdatedAt", void 0);
|
|
3814
3766
|
AuditEventEntity = _ts_decorate32([
|
|
3815
|
-
|
|
3767
|
+
Entity24("AuditEvents")
|
|
3816
3768
|
], AuditEventEntity);
|
|
3817
3769
|
|
|
3818
3770
|
// src/entities/digitalCredential/DigitalCredentialEntity.ts
|
|
3819
3771
|
import { typeormDate, typeOrmDateTime as typeOrmDateTime16 } from "@sphereon/ssi-sdk.agent-config";
|
|
3820
|
-
import { BaseEntity as
|
|
3772
|
+
import { BaseEntity as BaseEntity23, Column as Column30, CreateDateColumn as CreateDateColumn13, Entity as Entity25, PrimaryGeneratedColumn as PrimaryGeneratedColumn22, UpdateDateColumn as UpdateDateColumn13 } from "typeorm";
|
|
3821
3773
|
function _ts_decorate33(decorators, target, key, desc) {
|
|
3822
3774
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3823
3775
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -3829,7 +3781,7 @@ function _ts_metadata32(k, v) {
|
|
|
3829
3781
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3830
3782
|
}
|
|
3831
3783
|
__name(_ts_metadata32, "_ts_metadata");
|
|
3832
|
-
var DigitalCredentialEntity = class extends
|
|
3784
|
+
var DigitalCredentialEntity = class extends BaseEntity23 {
|
|
3833
3785
|
static {
|
|
3834
3786
|
__name(this, "DigitalCredentialEntity");
|
|
3835
3787
|
}
|
|
@@ -4073,11 +4025,11 @@ _ts_decorate33([
|
|
|
4073
4025
|
_ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
|
|
4074
4026
|
], DigitalCredentialEntity.prototype, "revokedAt", void 0);
|
|
4075
4027
|
DigitalCredentialEntity = _ts_decorate33([
|
|
4076
|
-
|
|
4028
|
+
Entity25("DigitalCredential")
|
|
4077
4029
|
], DigitalCredentialEntity);
|
|
4078
4030
|
|
|
4079
4031
|
// src/entities/presentationDefinition/PresentationDefinitionItemEntity.ts
|
|
4080
|
-
import { BaseEntity as
|
|
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";
|
|
4081
4033
|
import { IsNotEmpty as IsNotEmpty12 } from "class-validator";
|
|
4082
4034
|
import { typeOrmDateTime as typeOrmDateTime17 } from "@sphereon/ssi-sdk.agent-config";
|
|
4083
4035
|
function _ts_decorate34(decorators, target, key, desc) {
|
|
@@ -4091,7 +4043,7 @@ function _ts_metadata33(k, v) {
|
|
|
4091
4043
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4092
4044
|
}
|
|
4093
4045
|
__name(_ts_metadata33, "_ts_metadata");
|
|
4094
|
-
var PresentationDefinitionItemEntity = class extends
|
|
4046
|
+
var PresentationDefinitionItemEntity = class extends BaseEntity24 {
|
|
4095
4047
|
static {
|
|
4096
4048
|
__name(this, "PresentationDefinitionItemEntity");
|
|
4097
4049
|
}
|
|
@@ -4218,7 +4170,7 @@ _ts_decorate34([
|
|
|
4218
4170
|
_ts_metadata33("design:returntype", void 0)
|
|
4219
4171
|
], PresentationDefinitionItemEntity.prototype, "updateUpdatedDate", null);
|
|
4220
4172
|
PresentationDefinitionItemEntity = _ts_decorate34([
|
|
4221
|
-
|
|
4173
|
+
Entity26("PresentationDefinitionItem"),
|
|
4222
4174
|
Index8([
|
|
4223
4175
|
"version"
|
|
4224
4176
|
], {
|
|
@@ -4228,7 +4180,7 @@ PresentationDefinitionItemEntity = _ts_decorate34([
|
|
|
4228
4180
|
|
|
4229
4181
|
// src/entities/oid4vcState/Oid4vcStateEntity.ts
|
|
4230
4182
|
import { typeOrmDateTime as typeOrmDateTime18 } from "@sphereon/ssi-sdk.agent-config";
|
|
4231
|
-
import { BaseEntity as
|
|
4183
|
+
import { BaseEntity as BaseEntity25, Column as Column32, CreateDateColumn as CreateDateColumn15, Entity as Entity27, PrimaryColumn as PrimaryColumn4, UpdateDateColumn as UpdateDateColumn15 } from "typeorm";
|
|
4232
4184
|
function _ts_decorate35(decorators, target, key, desc) {
|
|
4233
4185
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4234
4186
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -4240,7 +4192,7 @@ function _ts_metadata34(k, v) {
|
|
|
4240
4192
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4241
4193
|
}
|
|
4242
4194
|
__name(_ts_metadata34, "_ts_metadata");
|
|
4243
|
-
var Oid4vcStateEntity = class extends
|
|
4195
|
+
var Oid4vcStateEntity = class extends BaseEntity25 {
|
|
4244
4196
|
static {
|
|
4245
4197
|
__name(this, "Oid4vcStateEntity");
|
|
4246
4198
|
}
|
|
@@ -4255,7 +4207,7 @@ var Oid4vcStateEntity = class extends BaseEntity26 {
|
|
|
4255
4207
|
tenantId;
|
|
4256
4208
|
};
|
|
4257
4209
|
_ts_decorate35([
|
|
4258
|
-
|
|
4210
|
+
PrimaryColumn4({
|
|
4259
4211
|
name: "id",
|
|
4260
4212
|
type: "varchar",
|
|
4261
4213
|
nullable: false
|
|
@@ -4327,7 +4279,7 @@ _ts_decorate35([
|
|
|
4327
4279
|
_ts_metadata34("design:type", String)
|
|
4328
4280
|
], Oid4vcStateEntity.prototype, "tenantId", void 0);
|
|
4329
4281
|
Oid4vcStateEntity = _ts_decorate35([
|
|
4330
|
-
|
|
4282
|
+
Entity27("Oid4vcStateEntity")
|
|
4331
4283
|
], Oid4vcStateEntity);
|
|
4332
4284
|
|
|
4333
4285
|
// src/contact/ContactStore.ts
|
|
@@ -6070,52 +6022,55 @@ import { In as In3 } from "typeorm";
|
|
|
6070
6022
|
// src/utils/statusList/MappingUtils.ts
|
|
6071
6023
|
import { StatusListType as StatusListType2 } from "@sphereon/ssi-types";
|
|
6072
6024
|
var statusListEntityFrom = /* @__PURE__ */ __name((args) => {
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
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}`);
|
|
6117
6073
|
}
|
|
6118
|
-
throw new Error(`Invalid status list type ${args.type}`);
|
|
6119
6074
|
}, "statusListEntityFrom");
|
|
6120
6075
|
var statusListFrom = /* @__PURE__ */ __name((entity) => {
|
|
6121
6076
|
if (entity instanceof StatusList2021Entity) {
|
|
@@ -6198,7 +6153,7 @@ var StatusListStore = class {
|
|
|
6198
6153
|
...args,
|
|
6199
6154
|
id: args.statusListId
|
|
6200
6155
|
});
|
|
6201
|
-
const repo = await this.getStatusListEntryRepo();
|
|
6156
|
+
const repo = await this.getStatusListEntryRepo(statusList.type);
|
|
6202
6157
|
const results = (await repo.find({
|
|
6203
6158
|
where: {
|
|
6204
6159
|
statusListId: statusList.id,
|
|
@@ -6208,23 +6163,34 @@ var StatusListStore = class {
|
|
|
6208
6163
|
return statusListIndex.filter((index) => !results.includes(index));
|
|
6209
6164
|
}
|
|
6210
6165
|
async addStatusListEntry(args) {
|
|
6211
|
-
|
|
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);
|
|
6212
6173
|
}
|
|
6213
6174
|
async updateStatusListEntry(args) {
|
|
6214
|
-
const statusListId = args.statusListId
|
|
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
|
+
});
|
|
6215
6182
|
const result = await this.getStatusListEntryByIndex({
|
|
6216
6183
|
...args,
|
|
6217
6184
|
statusListId,
|
|
6218
6185
|
errorOnNotFound: false
|
|
6219
6186
|
});
|
|
6220
6187
|
const updatedEntry = {
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
credentialId: args.credentialId
|
|
6188
|
+
...result,
|
|
6189
|
+
...args,
|
|
6190
|
+
statusListId
|
|
6225
6191
|
};
|
|
6226
6192
|
const updStatusListId = result?.statusListId ?? statusListId;
|
|
6227
|
-
const updateResult = await (await this.getStatusListEntryRepo()).upsert({
|
|
6193
|
+
const updateResult = await (await this.getStatusListEntryRepo(statusList.type)).upsert({
|
|
6228
6194
|
...result ?? {
|
|
6229
6195
|
statusListId: updStatusListId,
|
|
6230
6196
|
statusListIndex: args.statusListIndex
|
|
@@ -6236,7 +6202,7 @@ var StatusListStore = class {
|
|
|
6236
6202
|
"statusListIndex"
|
|
6237
6203
|
]
|
|
6238
6204
|
});
|
|
6239
|
-
|
|
6205
|
+
debug4(updateResult);
|
|
6240
6206
|
return await this.getStatusListEntryByIndex({
|
|
6241
6207
|
...args,
|
|
6242
6208
|
statusListId: updStatusListId,
|
|
@@ -6250,7 +6216,12 @@ var StatusListStore = class {
|
|
|
6250
6216
|
if (!statusListIndex && !entryCorrelationId) {
|
|
6251
6217
|
throw Error(`Cannot get statusList entry without either a statusListIndex or entryCorrelationId`);
|
|
6252
6218
|
}
|
|
6253
|
-
const
|
|
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({
|
|
6254
6225
|
where: {
|
|
6255
6226
|
...statusListId && {
|
|
6256
6227
|
statusListId
|
|
@@ -6294,8 +6265,8 @@ var StatusListStore = class {
|
|
|
6294
6265
|
},
|
|
6295
6266
|
credentialId
|
|
6296
6267
|
};
|
|
6297
|
-
|
|
6298
|
-
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({
|
|
6299
6270
|
where
|
|
6300
6271
|
});
|
|
6301
6272
|
if (!result && args.errorOnNotFound) {
|
|
@@ -6311,7 +6282,11 @@ var StatusListStore = class {
|
|
|
6311
6282
|
error2 = true;
|
|
6312
6283
|
}
|
|
6313
6284
|
if (!error) {
|
|
6314
|
-
const
|
|
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({
|
|
6315
6290
|
...args.statusListId && {
|
|
6316
6291
|
statusList: args.statusListId
|
|
6317
6292
|
},
|
|
@@ -6332,9 +6307,12 @@ var StatusListStore = class {
|
|
|
6332
6307
|
error2 = true;
|
|
6333
6308
|
}
|
|
6334
6309
|
if (error) {
|
|
6335
|
-
console.
|
|
6310
|
+
console.error(`Could not delete statusList ${args.statusListId} entry by index ${args.statusListIndex}`);
|
|
6336
6311
|
} else {
|
|
6337
|
-
const
|
|
6312
|
+
const statusList = await this.getStatusList({
|
|
6313
|
+
id: args.statusListId
|
|
6314
|
+
});
|
|
6315
|
+
const result = await (await this.getStatusListEntryRepo(statusList.type)).delete({
|
|
6338
6316
|
...args.statusListId && {
|
|
6339
6317
|
statusList: args.statusListId
|
|
6340
6318
|
},
|
|
@@ -6348,15 +6326,16 @@ var StatusListStore = class {
|
|
|
6348
6326
|
return !error;
|
|
6349
6327
|
}
|
|
6350
6328
|
async getStatusListEntries(args) {
|
|
6351
|
-
|
|
6329
|
+
const statusList = await this.getStatusList({
|
|
6330
|
+
id: args.statusListId
|
|
6331
|
+
});
|
|
6332
|
+
const results = await (await this.getStatusListEntryRepo(statusList.type)).find({
|
|
6352
6333
|
where: {
|
|
6353
6334
|
...args?.filter,
|
|
6354
6335
|
statusList: args.statusListId
|
|
6355
6336
|
}
|
|
6356
6337
|
});
|
|
6357
|
-
|
|
6358
|
-
async getStatusList(args) {
|
|
6359
|
-
return statusListFrom(await this.getStatusListEntity(args));
|
|
6338
|
+
return results;
|
|
6360
6339
|
}
|
|
6361
6340
|
async getStatusListEntity(args) {
|
|
6362
6341
|
if (!args.id && !args.correlationId) {
|
|
@@ -6380,6 +6359,10 @@ var StatusListStore = class {
|
|
|
6380
6359
|
}
|
|
6381
6360
|
return result;
|
|
6382
6361
|
}
|
|
6362
|
+
async getStatusList(args) {
|
|
6363
|
+
const entity = await this.getStatusListEntity(args);
|
|
6364
|
+
return statusListFrom(entity);
|
|
6365
|
+
}
|
|
6383
6366
|
async getStatusLists(args) {
|
|
6384
6367
|
const result = await (await this.getStatusListRepo()).find({
|
|
6385
6368
|
where: args.filter
|
|
@@ -6420,7 +6403,7 @@ var StatusListStore = class {
|
|
|
6420
6403
|
}
|
|
6421
6404
|
async removeStatusList(args) {
|
|
6422
6405
|
const result = await this.getStatusListEntity(args);
|
|
6423
|
-
await (await this.getStatusListEntryRepo()).delete({
|
|
6406
|
+
await (await this.getStatusListEntryRepo(result.type)).delete({
|
|
6424
6407
|
statusListId: result.id
|
|
6425
6408
|
});
|
|
6426
6409
|
const deletedEntity = await (await this.getStatusListRepo()).remove(result);
|
|
@@ -6442,8 +6425,14 @@ var StatusListStore = class {
|
|
|
6442
6425
|
return dataSource.getRepository(StatusListEntity);
|
|
6443
6426
|
}
|
|
6444
6427
|
}
|
|
6445
|
-
async getStatusListEntryRepo() {
|
|
6446
|
-
|
|
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
|
+
}
|
|
6447
6436
|
}
|
|
6448
6437
|
};
|
|
6449
6438
|
|
|
@@ -8927,29 +8916,20 @@ var CreateBitstringStatusListPG1741895823000 = class {
|
|
|
8927
8916
|
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "validUntil" TIMESTAMP`);
|
|
8928
8917
|
await queryRunner.query(`ALTER TABLE "StatusList" DROP CONSTRAINT IF EXISTS "CHK_StatusList_type"`);
|
|
8929
8918
|
await queryRunner.query(`ALTER TABLE "StatusList" ADD CONSTRAINT "CHK_StatusList_type" CHECK ("type" IN ('StatusList2021', 'OAuthStatusList', 'BitstringStatusList'))`);
|
|
8930
|
-
await queryRunner.query(`
|
|
8931
|
-
|
|
8932
|
-
|
|
8933
|
-
|
|
8934
|
-
|
|
8935
|
-
|
|
8936
|
-
"correlationId" character varying(255),
|
|
8937
|
-
"statusPurpose" character varying NOT NULL,
|
|
8938
|
-
"bitsPerStatus" integer DEFAULT 1,
|
|
8939
|
-
"statusMessage" text,
|
|
8940
|
-
"statusReference" text,
|
|
8941
|
-
CONSTRAINT "PK_BitstringStatusListEntry" PRIMARY KEY ("statusListId", "statusListIndex")
|
|
8942
|
-
)
|
|
8943
|
-
`);
|
|
8944
|
-
await queryRunner.query(`
|
|
8945
|
-
ALTER TABLE "BitstringStatusListEntry"
|
|
8946
|
-
ADD CONSTRAINT "FK_BitstringStatusListEntry_statusListId"
|
|
8947
|
-
FOREIGN KEY ("statusListId") REFERENCES "StatusList"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
|
|
8948
|
-
`);
|
|
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'))`);
|
|
8949
8925
|
}
|
|
8950
8926
|
async down(queryRunner) {
|
|
8951
|
-
await queryRunner.query(`ALTER TABLE "
|
|
8952
|
-
await queryRunner.query(`
|
|
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"`);
|
|
8953
8933
|
await queryRunner.query(`ALTER TABLE "StatusList" DROP CONSTRAINT "CHK_StatusList_type"`);
|
|
8954
8934
|
await queryRunner.query(`ALTER TABLE "StatusList" ADD CONSTRAINT "CHK_StatusList_type" CHECK ("type" IN ('StatusList2021', 'OAuthStatusList'))`);
|
|
8955
8935
|
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "validUntil"`);
|
|
@@ -8975,7 +8955,7 @@ var CreateBitstringStatusListSqlite1741895823001 = class {
|
|
|
8975
8955
|
"type" varchar CHECK( "type" IN ('StatusList2021', 'OAuthStatusList', 'BitstringStatusList') ) NOT NULL DEFAULT ('StatusList2021'),
|
|
8976
8956
|
"driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'),
|
|
8977
8957
|
"credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'),
|
|
8978
|
-
"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'),
|
|
8979
8959
|
"indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ),
|
|
8980
8960
|
"statusPurpose" varchar,
|
|
8981
8961
|
"statusListCredential" text,
|
|
@@ -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 "
|
|
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
|
-
"
|
|
8991
|
+
"value" varchar(50),
|
|
8992
|
+
"type" varchar CHECK( "type" IN ('StatusListEntryEntity', 'bitstring') ) NOT NULL DEFAULT ('StatusListEntryEntity'),
|
|
8993
|
+
"statusPurpose" varchar,
|
|
9012
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(`
|
|
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,
|