@sphereon/ssi-sdk.data-store 0.34.1-feature.SSISDK.17.bitstring.sl.2 → 0.34.1-feature.SSISDK.17.bitstring.sl.24
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 +232 -217
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +94 -44
- package/dist/index.d.ts +94 -44
- package/dist/index.js +178 -163
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/__tests__/statusList.entities.test.ts +4 -4
- package/src/__tests__/statusList.store.test.ts +2 -1
- package/src/entities/statusList/BitstringStatusListEntryEntity.ts +11 -34
- package/src/entities/statusList/StatusList2021EntryEntity.ts +2 -1
- package/src/entities/statusList/StatusListEntities.ts +14 -8
- package/src/migrations/postgres/1741895823000-CreateBitstringStatusList.ts +25 -26
- package/src/migrations/sqlite/1741895823001-CreateBitstringStatusList.ts +51 -9
- package/src/statusList/IStatusListStore.ts +14 -11
- package/src/statusList/StatusListStore.ts +69 -32
- package/src/types/statusList/IAbstractStatusListStore.ts +44 -4
- package/src/types/statusList/statusList.ts +41 -8
- package/src/utils/statusList/MappingUtils.ts +7 -3
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 {
|
|
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
|
|
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
|
-
|
|
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",
|
|
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: "
|
|
2838
|
+
name: "bitsPerStatus",
|
|
2897
2839
|
nullable: true,
|
|
2898
2840
|
default: 1
|
|
2899
2841
|
}),
|
|
2900
2842
|
_ts_metadata26("design:type", Number)
|
|
2901
|
-
], BitstringStatusListEntryEntity.prototype, "
|
|
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
|
-
|
|
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:
|
|
2969
|
-
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 {
|
|
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
|
-
|
|
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
|
-
|
|
3035
|
+
Entity22("StatusList"),
|
|
3085
3036
|
Unique("UQ_correlationId", [
|
|
3086
3037
|
"correlationId"
|
|
3087
3038
|
]),
|
|
3088
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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: "
|
|
3195
|
-
nullable:
|
|
3196
|
-
default: 1
|
|
3145
|
+
name: "bitsPerStatus",
|
|
3146
|
+
nullable: false
|
|
3197
3147
|
}),
|
|
3198
3148
|
_ts_metadata27("design:type", Number)
|
|
3199
|
-
], BitstringStatusListEntity.prototype, "
|
|
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
|
-
|
|
3179
|
+
ChildEntity6(StatusListType.BitstringStatusList)
|
|
3230
3180
|
], BitstringStatusListEntity);
|
|
3231
3181
|
|
|
3232
3182
|
// src/entities/machineState/MachineStateInfoEntity.ts
|
|
3233
|
-
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";
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
3393
|
+
ChildEntity7("Organization")
|
|
3444
3394
|
], OrganizationEntity);
|
|
3445
3395
|
|
|
3446
3396
|
// src/entities/contact/NaturalPersonEntity.ts
|
|
3447
|
-
import { Column as Column28, ChildEntity as
|
|
3448
|
-
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";
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
4028
|
+
Entity25("DigitalCredential")
|
|
4079
4029
|
], DigitalCredentialEntity);
|
|
4080
4030
|
|
|
4081
4031
|
// src/entities/presentationDefinition/PresentationDefinitionItemEntity.ts
|
|
4082
|
-
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";
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
4282
|
+
Entity27("Oid4vcStateEntity")
|
|
4333
4283
|
], Oid4vcStateEntity);
|
|
4334
4284
|
|
|
4335
4285
|
// src/contact/ContactStore.ts
|
|
@@ -6101,8 +6051,11 @@ var statusListEntityFrom = /* @__PURE__ */ __name((args) => {
|
|
|
6101
6051
|
if (args.type === StatusListType2.BitstringStatusList) {
|
|
6102
6052
|
const entity = new BitstringStatusListEntity();
|
|
6103
6053
|
const bitstringsl = args;
|
|
6054
|
+
if (!bitstringsl.bitsPerStatus) {
|
|
6055
|
+
throw Error("bitsPerStatus must be set for BitstringStatusList");
|
|
6056
|
+
}
|
|
6104
6057
|
entity.statusPurpose = bitstringsl.statusPurpose;
|
|
6105
|
-
entity.
|
|
6058
|
+
entity.bitsPerStatus = bitstringsl.bitsPerStatus;
|
|
6106
6059
|
entity.validFrom = bitstringsl.validFrom;
|
|
6107
6060
|
entity.validUntil = bitstringsl.validUntil;
|
|
6108
6061
|
entity.ttl = bitstringsl.ttl;
|
|
@@ -6140,7 +6093,7 @@ var statusListFrom = /* @__PURE__ */ __name((entity) => {
|
|
|
6140
6093
|
...getBaseFields(entity),
|
|
6141
6094
|
type: StatusListType2.BitstringStatusList,
|
|
6142
6095
|
statusPurpose: entity.statusPurpose,
|
|
6143
|
-
|
|
6096
|
+
bitsPerStatus: entity.bitsPerStatus,
|
|
6144
6097
|
validFrom: entity.validFrom,
|
|
6145
6098
|
validUntil: entity.validUntil,
|
|
6146
6099
|
ttl: entity.ttl
|
|
@@ -6197,33 +6150,45 @@ var StatusListStore = class {
|
|
|
6197
6150
|
...args,
|
|
6198
6151
|
id: args.statusListId
|
|
6199
6152
|
});
|
|
6200
|
-
const repo = await this.getStatusListEntryRepo();
|
|
6153
|
+
const repo = await this.getStatusListEntryRepo(statusList.type);
|
|
6201
6154
|
const results = (await repo.find({
|
|
6202
6155
|
where: {
|
|
6203
|
-
statusList,
|
|
6156
|
+
statusListId: statusList.id,
|
|
6204
6157
|
statusListIndex: In3(statusListIndex)
|
|
6205
6158
|
}
|
|
6206
6159
|
})).map((index) => index.statusListIndex);
|
|
6207
6160
|
return statusListIndex.filter((index) => !results.includes(index));
|
|
6208
6161
|
}
|
|
6209
6162
|
async addStatusListEntry(args) {
|
|
6210
|
-
|
|
6163
|
+
if (!args.statusListId) {
|
|
6164
|
+
throw new Error("statusListId is required");
|
|
6165
|
+
}
|
|
6166
|
+
const statusList = await this.getStatusList({
|
|
6167
|
+
id: args.statusListId
|
|
6168
|
+
});
|
|
6169
|
+
const result = await (await this.getStatusListEntryRepo(statusList.type)).save(args);
|
|
6170
|
+
return result;
|
|
6211
6171
|
}
|
|
6212
6172
|
async updateStatusListEntry(args) {
|
|
6213
|
-
const statusListId = args.statusListId
|
|
6173
|
+
const statusListId = args.statusListId;
|
|
6174
|
+
if (!statusListId) {
|
|
6175
|
+
throw new Error("statusListId is required");
|
|
6176
|
+
}
|
|
6177
|
+
const statusList = await this.getStatusList({
|
|
6178
|
+
id: statusListId
|
|
6179
|
+
});
|
|
6214
6180
|
const result = await this.getStatusListEntryByIndex({
|
|
6215
6181
|
...args,
|
|
6216
6182
|
statusListId,
|
|
6217
6183
|
errorOnNotFound: false
|
|
6218
6184
|
});
|
|
6219
6185
|
const updatedEntry = {
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
credentialId: args.credentialId
|
|
6186
|
+
...result,
|
|
6187
|
+
...args,
|
|
6188
|
+
statusListId
|
|
6224
6189
|
};
|
|
6225
6190
|
const updStatusListId = result?.statusListId ?? statusListId;
|
|
6226
|
-
const updateResult = await (await this.getStatusListEntryRepo()).upsert({
|
|
6191
|
+
const updateResult = await (await this.getStatusListEntryRepo(statusList.type)).upsert({
|
|
6227
6192
|
...result ?? {
|
|
6228
6193
|
statusListId: updStatusListId,
|
|
6229
6194
|
statusListIndex: args.statusListIndex
|
|
@@ -6249,7 +6214,12 @@ var StatusListStore = class {
|
|
|
6249
6214
|
if (!statusListIndex && !entryCorrelationId) {
|
|
6250
6215
|
throw Error(`Cannot get statusList entry without either a statusListIndex or entryCorrelationId`);
|
|
6251
6216
|
}
|
|
6252
|
-
const
|
|
6217
|
+
const statusList = statusListId ? await this.getStatusList({
|
|
6218
|
+
id: statusListId
|
|
6219
|
+
}) : await this.getStatusList({
|
|
6220
|
+
correlationId: statusListCorrelationId
|
|
6221
|
+
});
|
|
6222
|
+
const result = await (await this.getStatusListEntryRepo(statusList.type)).findOne({
|
|
6253
6223
|
where: {
|
|
6254
6224
|
...statusListId && {
|
|
6255
6225
|
statusListId
|
|
@@ -6293,8 +6263,8 @@ var StatusListStore = class {
|
|
|
6293
6263
|
},
|
|
6294
6264
|
credentialId
|
|
6295
6265
|
};
|
|
6296
|
-
console.log(`Entries: ${JSON.stringify(await (await this.getStatusListEntryRepo()).find(), null, 2)}`);
|
|
6297
|
-
const result = await (await this.getStatusListEntryRepo()).findOne({
|
|
6266
|
+
console.log(`Entries: ${JSON.stringify(await (await this.getStatusListEntryRepo(statusList.type)).find(), null, 2)}`);
|
|
6267
|
+
const result = await (await this.getStatusListEntryRepo(statusList.type)).findOne({
|
|
6298
6268
|
where
|
|
6299
6269
|
});
|
|
6300
6270
|
if (!result && args.errorOnNotFound) {
|
|
@@ -6310,7 +6280,11 @@ var StatusListStore = class {
|
|
|
6310
6280
|
error2 = true;
|
|
6311
6281
|
}
|
|
6312
6282
|
if (!error) {
|
|
6313
|
-
const
|
|
6283
|
+
const statusList = await this.getStatusList({
|
|
6284
|
+
id: args.statusListId,
|
|
6285
|
+
correlationId: args.statusListCorrelationId
|
|
6286
|
+
});
|
|
6287
|
+
const result = await (await this.getStatusListEntryRepo(statusList.type)).delete({
|
|
6314
6288
|
...args.statusListId && {
|
|
6315
6289
|
statusList: args.statusListId
|
|
6316
6290
|
},
|
|
@@ -6333,7 +6307,10 @@ var StatusListStore = class {
|
|
|
6333
6307
|
if (error) {
|
|
6334
6308
|
console.log(`Could not delete statusList ${args.statusListId} entry by index ${args.statusListIndex}`);
|
|
6335
6309
|
} else {
|
|
6336
|
-
const
|
|
6310
|
+
const statusList = await this.getStatusList({
|
|
6311
|
+
id: args.statusListId
|
|
6312
|
+
});
|
|
6313
|
+
const result = await (await this.getStatusListEntryRepo(statusList.type)).delete({
|
|
6337
6314
|
...args.statusListId && {
|
|
6338
6315
|
statusList: args.statusListId
|
|
6339
6316
|
},
|
|
@@ -6347,15 +6324,16 @@ var StatusListStore = class {
|
|
|
6347
6324
|
return !error;
|
|
6348
6325
|
}
|
|
6349
6326
|
async getStatusListEntries(args) {
|
|
6350
|
-
|
|
6327
|
+
const statusList = await this.getStatusList({
|
|
6328
|
+
id: args.statusListId
|
|
6329
|
+
});
|
|
6330
|
+
const results = await (await this.getStatusListEntryRepo(statusList.type)).find({
|
|
6351
6331
|
where: {
|
|
6352
6332
|
...args?.filter,
|
|
6353
6333
|
statusList: args.statusListId
|
|
6354
6334
|
}
|
|
6355
6335
|
});
|
|
6356
|
-
|
|
6357
|
-
async getStatusList(args) {
|
|
6358
|
-
return statusListFrom(await this.getStatusListEntity(args));
|
|
6336
|
+
return results;
|
|
6359
6337
|
}
|
|
6360
6338
|
async getStatusListEntity(args) {
|
|
6361
6339
|
if (!args.id && !args.correlationId) {
|
|
@@ -6379,6 +6357,10 @@ var StatusListStore = class {
|
|
|
6379
6357
|
}
|
|
6380
6358
|
return result;
|
|
6381
6359
|
}
|
|
6360
|
+
async getStatusList(args) {
|
|
6361
|
+
const entity = await this.getStatusListEntity(args);
|
|
6362
|
+
return statusListFrom(entity);
|
|
6363
|
+
}
|
|
6382
6364
|
async getStatusLists(args) {
|
|
6383
6365
|
const result = await (await this.getStatusListRepo()).find({
|
|
6384
6366
|
where: args.filter
|
|
@@ -6419,7 +6401,7 @@ var StatusListStore = class {
|
|
|
6419
6401
|
}
|
|
6420
6402
|
async removeStatusList(args) {
|
|
6421
6403
|
const result = await this.getStatusListEntity(args);
|
|
6422
|
-
await (await this.getStatusListEntryRepo()).delete({
|
|
6404
|
+
await (await this.getStatusListEntryRepo(result.type)).delete({
|
|
6423
6405
|
statusListId: result.id
|
|
6424
6406
|
});
|
|
6425
6407
|
const deletedEntity = await (await this.getStatusListRepo()).remove(result);
|
|
@@ -6441,8 +6423,14 @@ var StatusListStore = class {
|
|
|
6441
6423
|
return dataSource.getRepository(StatusListEntity);
|
|
6442
6424
|
}
|
|
6443
6425
|
}
|
|
6444
|
-
async getStatusListEntryRepo() {
|
|
6445
|
-
|
|
6426
|
+
async getStatusListEntryRepo(type) {
|
|
6427
|
+
const dataSource = await this.getDS();
|
|
6428
|
+
switch (type) {
|
|
6429
|
+
case StatusListType3.BitstringStatusList:
|
|
6430
|
+
return dataSource.getRepository(BitstringStatusListEntryEntity);
|
|
6431
|
+
default:
|
|
6432
|
+
return dataSource.getRepository(StatusListEntryEntity);
|
|
6433
|
+
}
|
|
6446
6434
|
}
|
|
6447
6435
|
};
|
|
6448
6436
|
|
|
@@ -8920,41 +8908,32 @@ var CreateBitstringStatusListPG1741895823000 = class {
|
|
|
8920
8908
|
}
|
|
8921
8909
|
name = "CreateBitstringStatusList1741895823000";
|
|
8922
8910
|
async up(queryRunner) {
|
|
8923
|
-
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "
|
|
8911
|
+
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "bitsPerStatus" integer DEFAULT 1`);
|
|
8924
8912
|
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "ttl" integer`);
|
|
8925
8913
|
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "validFrom" TIMESTAMP`);
|
|
8926
8914
|
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "validUntil" TIMESTAMP`);
|
|
8927
8915
|
await queryRunner.query(`ALTER TABLE "StatusList" DROP CONSTRAINT IF EXISTS "CHK_StatusList_type"`);
|
|
8928
8916
|
await queryRunner.query(`ALTER TABLE "StatusList" ADD CONSTRAINT "CHK_StatusList_type" CHECK ("type" IN ('StatusList2021', 'OAuthStatusList', 'BitstringStatusList'))`);
|
|
8929
|
-
await queryRunner.query(`
|
|
8930
|
-
|
|
8931
|
-
|
|
8932
|
-
|
|
8933
|
-
|
|
8934
|
-
|
|
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
|
-
`);
|
|
8917
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "type" character varying NOT NULL DEFAULT 'StatusListEntryEntity'`);
|
|
8918
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "statusPurpose" character varying`);
|
|
8919
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "bitsPerStatus" integer DEFAULT 1`);
|
|
8920
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "statusMessage" text`);
|
|
8921
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "statusReference" text`);
|
|
8922
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD CONSTRAINT "CHK_StatusListEntry_type" CHECK ("type" IN ('StatusListEntryEntity', 'bitstring'))`);
|
|
8948
8923
|
}
|
|
8949
8924
|
async down(queryRunner) {
|
|
8950
|
-
await queryRunner.query(`ALTER TABLE "
|
|
8951
|
-
await queryRunner.query(`
|
|
8925
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP CONSTRAINT "CHK_StatusListEntry_type"`);
|
|
8926
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "statusReference"`);
|
|
8927
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "statusMessage"`);
|
|
8928
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "bitsPerStatus"`);
|
|
8929
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "statusPurpose"`);
|
|
8930
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "type"`);
|
|
8952
8931
|
await queryRunner.query(`ALTER TABLE "StatusList" DROP CONSTRAINT "CHK_StatusList_type"`);
|
|
8953
8932
|
await queryRunner.query(`ALTER TABLE "StatusList" ADD CONSTRAINT "CHK_StatusList_type" CHECK ("type" IN ('StatusList2021', 'OAuthStatusList'))`);
|
|
8954
8933
|
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "validUntil"`);
|
|
8955
8934
|
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "validFrom"`);
|
|
8956
8935
|
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "ttl"`);
|
|
8957
|
-
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "
|
|
8936
|
+
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "bitsPerStatus"`);
|
|
8958
8937
|
}
|
|
8959
8938
|
};
|
|
8960
8939
|
|
|
@@ -8974,13 +8953,12 @@ var CreateBitstringStatusListSqlite1741895823001 = class {
|
|
|
8974
8953
|
"type" varchar CHECK( "type" IN ('StatusList2021', 'OAuthStatusList', 'BitstringStatusList') ) NOT NULL DEFAULT ('StatusList2021'),
|
|
8975
8954
|
"driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'),
|
|
8976
8955
|
"credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'),
|
|
8977
|
-
"proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt') ) NOT NULL DEFAULT ('lds'),
|
|
8956
|
+
"proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt', 'vc+jwt') ) NOT NULL DEFAULT ('lds'),
|
|
8978
8957
|
"indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ),
|
|
8979
8958
|
"statusPurpose" varchar,
|
|
8980
8959
|
"statusListCredential" text,
|
|
8981
|
-
"bitsPerStatus" integer,
|
|
8982
8960
|
"expiresAt" datetime,
|
|
8983
|
-
"
|
|
8961
|
+
"bitsPerStatus" integer DEFAULT (1),
|
|
8984
8962
|
"ttl" integer,
|
|
8985
8963
|
"validFrom" datetime,
|
|
8986
8964
|
"validUntil" datetime,
|
|
@@ -9002,22 +8980,59 @@ var CreateBitstringStatusListSqlite1741895823001 = class {
|
|
|
9002
8980
|
await queryRunner.query(`DROP TABLE "StatusList"`);
|
|
9003
8981
|
await queryRunner.query(`ALTER TABLE "temporary_StatusList" RENAME TO "StatusList"`);
|
|
9004
8982
|
await queryRunner.query(`
|
|
9005
|
-
CREATE TABLE "
|
|
8983
|
+
CREATE TABLE "temporary_StatusListEntry" (
|
|
9006
8984
|
"statusListId" varchar NOT NULL,
|
|
9007
8985
|
"statusListIndex" integer NOT NULL,
|
|
9008
8986
|
"credentialId" text,
|
|
9009
8987
|
"credentialHash" varchar(128),
|
|
9010
8988
|
"correlationId" varchar(255),
|
|
9011
|
-
"
|
|
9012
|
-
"
|
|
8989
|
+
"value" varchar(50),
|
|
8990
|
+
"type" varchar CHECK( "type" IN ('StatusListEntryEntity', 'bitstring') ) NOT NULL DEFAULT ('StatusListEntryEntity'),
|
|
8991
|
+
"statusPurpose" varchar,
|
|
8992
|
+
"bitsPerStatus" integer DEFAULT (1),
|
|
9013
8993
|
"statusMessage" text,
|
|
9014
8994
|
"statusReference" text,
|
|
9015
8995
|
PRIMARY KEY ("statusListId", "statusListIndex")
|
|
9016
8996
|
)
|
|
9017
8997
|
`);
|
|
8998
|
+
await queryRunner.query(`
|
|
8999
|
+
INSERT INTO "temporary_StatusListEntry"(
|
|
9000
|
+
"statusListId", "statusListIndex", "credentialId", "credentialHash",
|
|
9001
|
+
"correlationId", "value", "type"
|
|
9002
|
+
)
|
|
9003
|
+
SELECT
|
|
9004
|
+
"statusListId", "statusListIndex", "credentialId", "credentialHash",
|
|
9005
|
+
"correlationId", "value", 'StatusListEntryEntity'
|
|
9006
|
+
FROM "StatusListEntry"
|
|
9007
|
+
`);
|
|
9008
|
+
await queryRunner.query(`DROP TABLE "StatusListEntry"`);
|
|
9009
|
+
await queryRunner.query(`ALTER TABLE "temporary_StatusListEntry" RENAME TO "StatusListEntry"`);
|
|
9018
9010
|
}
|
|
9019
9011
|
async down(queryRunner) {
|
|
9020
|
-
await queryRunner.query(`
|
|
9012
|
+
await queryRunner.query(`
|
|
9013
|
+
CREATE TABLE "temporary_StatusListEntry" (
|
|
9014
|
+
"statusListId" varchar NOT NULL,
|
|
9015
|
+
"statusListIndex" integer NOT NULL,
|
|
9016
|
+
"credentialId" text,
|
|
9017
|
+
"credentialHash" varchar(128),
|
|
9018
|
+
"correlationId" varchar(255),
|
|
9019
|
+
"value" varchar(50),
|
|
9020
|
+
PRIMARY KEY ("statusListId", "statusListIndex")
|
|
9021
|
+
)
|
|
9022
|
+
`);
|
|
9023
|
+
await queryRunner.query(`
|
|
9024
|
+
INSERT INTO "temporary_StatusListEntry"(
|
|
9025
|
+
"statusListId", "statusListIndex", "credentialId", "credentialHash",
|
|
9026
|
+
"correlationId", "value"
|
|
9027
|
+
)
|
|
9028
|
+
SELECT
|
|
9029
|
+
"statusListId", "statusListIndex", "credentialId", "credentialHash",
|
|
9030
|
+
"correlationId", "value"
|
|
9031
|
+
FROM "StatusListEntry"
|
|
9032
|
+
WHERE "type" = 'StatusListEntryEntity'
|
|
9033
|
+
`);
|
|
9034
|
+
await queryRunner.query(`DROP TABLE "StatusListEntry"`);
|
|
9035
|
+
await queryRunner.query(`ALTER TABLE "temporary_StatusListEntry" RENAME TO "StatusListEntry"`);
|
|
9021
9036
|
await queryRunner.query(`
|
|
9022
9037
|
CREATE TABLE "temporary_StatusList" (
|
|
9023
9038
|
"id" varchar PRIMARY KEY NOT NULL,
|
|
@@ -9027,7 +9042,7 @@ var CreateBitstringStatusListSqlite1741895823001 = class {
|
|
|
9027
9042
|
"type" varchar CHECK( "type" IN ('StatusList2021', 'OAuthStatusList') ) NOT NULL DEFAULT ('StatusList2021'),
|
|
9028
9043
|
"driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'),
|
|
9029
9044
|
"credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'),
|
|
9030
|
-
"proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt') ) NOT NULL DEFAULT ('lds'),
|
|
9045
|
+
"proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt', 'vc+jwt') ) NOT NULL DEFAULT ('lds'),
|
|
9031
9046
|
"indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ),
|
|
9032
9047
|
"statusPurpose" varchar,
|
|
9033
9048
|
"statusListCredential" text,
|