@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.cjs
CHANGED
|
@@ -2857,7 +2857,7 @@ IssuerLocaleBrandingEntity = _ts_decorate25([
|
|
|
2857
2857
|
], IssuerLocaleBrandingEntity);
|
|
2858
2858
|
|
|
2859
2859
|
// src/entities/statusList/StatusListEntities.ts
|
|
2860
|
-
var
|
|
2860
|
+
var import_ssi_types = require("@sphereon/ssi-types");
|
|
2861
2861
|
var import_typeorm27 = __toESM(require("typeorm"), 1);
|
|
2862
2862
|
|
|
2863
2863
|
// src/entities/statusList/StatusList2021EntryEntity.ts
|
|
@@ -2956,16 +2956,20 @@ _ts_decorate26([
|
|
|
2956
2956
|
_ts_metadata25("design:type", String)
|
|
2957
2957
|
], StatusListEntryEntity.prototype, "value", void 0);
|
|
2958
2958
|
StatusListEntryEntity = _ts_decorate26([
|
|
2959
|
-
(0, import_typeorm25.Entity)("StatusListEntry")
|
|
2959
|
+
(0, import_typeorm25.Entity)("StatusListEntry"),
|
|
2960
|
+
(0, import_typeorm25.TableInheritance)({
|
|
2961
|
+
column: {
|
|
2962
|
+
type: "varchar",
|
|
2963
|
+
name: "type"
|
|
2964
|
+
}
|
|
2965
|
+
})
|
|
2960
2966
|
], StatusListEntryEntity);
|
|
2961
2967
|
|
|
2962
2968
|
// src/entities/statusList/StatusListEntities.ts
|
|
2963
2969
|
var import_ssi_sdk13 = require("@sphereon/ssi-sdk.agent-config");
|
|
2964
2970
|
|
|
2965
2971
|
// src/entities/statusList/BitstringStatusListEntryEntity.ts
|
|
2966
|
-
var import_class_validator19 = require("class-validator");
|
|
2967
2972
|
var import_typeorm26 = require("typeorm");
|
|
2968
|
-
var import_ssi_types = require("@sphereon/ssi-types");
|
|
2969
2973
|
function _ts_decorate27(decorators, target, key, desc) {
|
|
2970
2974
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2971
2975
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2977,94 +2981,32 @@ function _ts_metadata26(k, v) {
|
|
|
2977
2981
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2978
2982
|
}
|
|
2979
2983
|
__name(_ts_metadata26, "_ts_metadata");
|
|
2980
|
-
var BitstringStatusListEntryEntity = class extends
|
|
2984
|
+
var BitstringStatusListEntryEntity = class extends StatusListEntryEntity {
|
|
2981
2985
|
static {
|
|
2982
2986
|
__name(this, "BitstringStatusListEntryEntity");
|
|
2983
2987
|
}
|
|
2984
|
-
statusListId;
|
|
2985
|
-
statusListIndex;
|
|
2986
|
-
statusList;
|
|
2987
|
-
credentialId;
|
|
2988
|
-
credentialHash;
|
|
2989
|
-
entryCorrelationId;
|
|
2990
2988
|
statusPurpose;
|
|
2991
|
-
|
|
2989
|
+
bitsPerStatus;
|
|
2992
2990
|
statusMessage;
|
|
2993
2991
|
statusReference;
|
|
2994
2992
|
};
|
|
2995
|
-
_ts_decorate27([
|
|
2996
|
-
(0, import_typeorm26.PrimaryColumn)({
|
|
2997
|
-
name: "statusListId",
|
|
2998
|
-
type: "varchar",
|
|
2999
|
-
nullable: false,
|
|
3000
|
-
unique: false
|
|
3001
|
-
}),
|
|
3002
|
-
(0, import_class_validator19.Validate)(IsNonEmptyStringConstraint, {
|
|
3003
|
-
message: "Status list id is required"
|
|
3004
|
-
}),
|
|
3005
|
-
_ts_metadata26("design:type", String)
|
|
3006
|
-
], BitstringStatusListEntryEntity.prototype, "statusListId", void 0);
|
|
3007
|
-
_ts_decorate27([
|
|
3008
|
-
(0, import_typeorm26.PrimaryColumn)({
|
|
3009
|
-
name: "statusListIndex",
|
|
3010
|
-
type: "integer",
|
|
3011
|
-
nullable: false,
|
|
3012
|
-
unique: false
|
|
3013
|
-
}),
|
|
3014
|
-
_ts_metadata26("design:type", Number)
|
|
3015
|
-
], BitstringStatusListEntryEntity.prototype, "statusListIndex", void 0);
|
|
3016
|
-
_ts_decorate27([
|
|
3017
|
-
(0, import_typeorm26.ManyToOne)(() => BitstringStatusListEntity, (statusList) => statusList.statusListEntries),
|
|
3018
|
-
(0, import_typeorm26.JoinColumn)({
|
|
3019
|
-
name: "statusListId"
|
|
3020
|
-
}),
|
|
3021
|
-
_ts_metadata26("design:type", typeof BitstringStatusListEntity === "undefined" ? Object : BitstringStatusListEntity)
|
|
3022
|
-
], BitstringStatusListEntryEntity.prototype, "statusList", void 0);
|
|
3023
|
-
_ts_decorate27([
|
|
3024
|
-
(0, import_typeorm26.Column)({
|
|
3025
|
-
name: "credentialId",
|
|
3026
|
-
type: "text",
|
|
3027
|
-
nullable: true
|
|
3028
|
-
}),
|
|
3029
|
-
_ts_metadata26("design:type", String)
|
|
3030
|
-
], BitstringStatusListEntryEntity.prototype, "credentialId", void 0);
|
|
3031
|
-
_ts_decorate27([
|
|
3032
|
-
(0, import_typeorm26.Column)({
|
|
3033
|
-
name: "credentialHash",
|
|
3034
|
-
length: 128,
|
|
3035
|
-
type: "varchar",
|
|
3036
|
-
nullable: true,
|
|
3037
|
-
unique: false
|
|
3038
|
-
}),
|
|
3039
|
-
_ts_metadata26("design:type", String)
|
|
3040
|
-
], BitstringStatusListEntryEntity.prototype, "credentialHash", void 0);
|
|
3041
|
-
_ts_decorate27([
|
|
3042
|
-
(0, import_typeorm26.Column)({
|
|
3043
|
-
name: "correlationId",
|
|
3044
|
-
length: 255,
|
|
3045
|
-
type: "varchar",
|
|
3046
|
-
nullable: true,
|
|
3047
|
-
unique: false
|
|
3048
|
-
}),
|
|
3049
|
-
_ts_metadata26("design:type", String)
|
|
3050
|
-
], BitstringStatusListEntryEntity.prototype, "entryCorrelationId", void 0);
|
|
3051
2993
|
_ts_decorate27([
|
|
3052
2994
|
(0, import_typeorm26.Column)({
|
|
3053
2995
|
type: "varchar",
|
|
3054
2996
|
name: "statusPurpose",
|
|
3055
2997
|
nullable: false
|
|
3056
2998
|
}),
|
|
3057
|
-
_ts_metadata26("design:type",
|
|
2999
|
+
_ts_metadata26("design:type", String)
|
|
3058
3000
|
], BitstringStatusListEntryEntity.prototype, "statusPurpose", void 0);
|
|
3059
3001
|
_ts_decorate27([
|
|
3060
3002
|
(0, import_typeorm26.Column)({
|
|
3061
3003
|
type: "integer",
|
|
3062
|
-
name: "
|
|
3004
|
+
name: "bitsPerStatus",
|
|
3063
3005
|
nullable: true,
|
|
3064
3006
|
default: 1
|
|
3065
3007
|
}),
|
|
3066
3008
|
_ts_metadata26("design:type", Number)
|
|
3067
|
-
], BitstringStatusListEntryEntity.prototype, "
|
|
3009
|
+
], BitstringStatusListEntryEntity.prototype, "bitsPerStatus", void 0);
|
|
3068
3010
|
_ts_decorate27([
|
|
3069
3011
|
(0, import_typeorm26.Column)({
|
|
3070
3012
|
type: "text",
|
|
@@ -3116,7 +3058,7 @@ _ts_decorate27([
|
|
|
3116
3058
|
_ts_metadata26("design:type", Object)
|
|
3117
3059
|
], BitstringStatusListEntryEntity.prototype, "statusReference", void 0);
|
|
3118
3060
|
BitstringStatusListEntryEntity = _ts_decorate27([
|
|
3119
|
-
(0, import_typeorm26.
|
|
3061
|
+
(0, import_typeorm26.ChildEntity)("bitstring")
|
|
3120
3062
|
], BitstringStatusListEntryEntity);
|
|
3121
3063
|
|
|
3122
3064
|
// src/entities/statusList/StatusListEntities.ts
|
|
@@ -3131,14 +3073,15 @@ function _ts_metadata27(k, v) {
|
|
|
3131
3073
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3132
3074
|
}
|
|
3133
3075
|
__name(_ts_metadata27, "_ts_metadata");
|
|
3134
|
-
var { BaseEntity:
|
|
3135
|
-
var StatusListEntity = class extends
|
|
3076
|
+
var { BaseEntity: BaseEntity20, ChildEntity: ChildEntity6, Column: Column25, Entity: Entity22, OneToMany: OneToMany8, PrimaryColumn: PrimaryColumn2, TableInheritance: TableInheritance5, Unique } = import_typeorm27.default;
|
|
3077
|
+
var StatusListEntity = class extends BaseEntity20 {
|
|
3136
3078
|
static {
|
|
3137
3079
|
__name(this, "StatusListEntity");
|
|
3138
3080
|
}
|
|
3139
3081
|
id;
|
|
3140
3082
|
correlationId;
|
|
3141
3083
|
length;
|
|
3084
|
+
type;
|
|
3142
3085
|
issuer;
|
|
3143
3086
|
driverType;
|
|
3144
3087
|
credentialIdMode;
|
|
@@ -3146,7 +3089,7 @@ var StatusListEntity = class extends BaseEntity21 {
|
|
|
3146
3089
|
statusListCredential;
|
|
3147
3090
|
};
|
|
3148
3091
|
_ts_decorate28([
|
|
3149
|
-
|
|
3092
|
+
PrimaryColumn2({
|
|
3150
3093
|
name: "id",
|
|
3151
3094
|
type: "varchar"
|
|
3152
3095
|
}),
|
|
@@ -3169,6 +3112,14 @@ _ts_decorate28([
|
|
|
3169
3112
|
}),
|
|
3170
3113
|
_ts_metadata27("design:type", Number)
|
|
3171
3114
|
], StatusListEntity.prototype, "length", void 0);
|
|
3115
|
+
_ts_decorate28([
|
|
3116
|
+
Column25("simple-enum", {
|
|
3117
|
+
name: "type",
|
|
3118
|
+
enum: import_ssi_types.StatusListType,
|
|
3119
|
+
nullable: false
|
|
3120
|
+
}),
|
|
3121
|
+
_ts_metadata27("design:type", typeof import_ssi_types.StatusListType === "undefined" ? Object : import_ssi_types.StatusListType)
|
|
3122
|
+
], StatusListEntity.prototype, "type", void 0);
|
|
3172
3123
|
_ts_decorate28([
|
|
3173
3124
|
Column25({
|
|
3174
3125
|
name: "issuer",
|
|
@@ -3195,20 +3146,20 @@ _ts_decorate28([
|
|
|
3195
3146
|
_ts_decorate28([
|
|
3196
3147
|
Column25("simple-enum", {
|
|
3197
3148
|
name: "driverType",
|
|
3198
|
-
enum:
|
|
3149
|
+
enum: import_ssi_types.StatusListDriverType,
|
|
3199
3150
|
nullable: false,
|
|
3200
|
-
default:
|
|
3151
|
+
default: import_ssi_types.StatusListDriverType.AGENT_TYPEORM
|
|
3201
3152
|
}),
|
|
3202
|
-
_ts_metadata27("design:type", typeof
|
|
3153
|
+
_ts_metadata27("design:type", typeof import_ssi_types.StatusListDriverType === "undefined" ? Object : import_ssi_types.StatusListDriverType)
|
|
3203
3154
|
], StatusListEntity.prototype, "driverType", void 0);
|
|
3204
3155
|
_ts_decorate28([
|
|
3205
3156
|
Column25("simple-enum", {
|
|
3206
3157
|
name: "credentialIdMode",
|
|
3207
|
-
enum:
|
|
3158
|
+
enum: import_ssi_types.StatusListCredentialIdMode,
|
|
3208
3159
|
nullable: false,
|
|
3209
|
-
default:
|
|
3160
|
+
default: import_ssi_types.StatusListCredentialIdMode.ISSUANCE
|
|
3210
3161
|
}),
|
|
3211
|
-
_ts_metadata27("design:type", typeof
|
|
3162
|
+
_ts_metadata27("design:type", typeof import_ssi_types.StatusListCredentialIdMode === "undefined" ? Object : import_ssi_types.StatusListCredentialIdMode)
|
|
3212
3163
|
], StatusListEntity.prototype, "credentialIdMode", void 0);
|
|
3213
3164
|
_ts_decorate28([
|
|
3214
3165
|
Column25({
|
|
@@ -3247,15 +3198,15 @@ _ts_decorate28([
|
|
|
3247
3198
|
_ts_metadata27("design:type", typeof StatusListCredential === "undefined" ? Object : StatusListCredential)
|
|
3248
3199
|
], StatusListEntity.prototype, "statusListCredential", void 0);
|
|
3249
3200
|
StatusListEntity = _ts_decorate28([
|
|
3250
|
-
|
|
3201
|
+
Entity22("StatusList"),
|
|
3251
3202
|
Unique("UQ_correlationId", [
|
|
3252
3203
|
"correlationId"
|
|
3253
3204
|
]),
|
|
3254
|
-
|
|
3205
|
+
TableInheritance5({
|
|
3255
3206
|
column: {
|
|
3256
3207
|
type: "simple-enum",
|
|
3257
3208
|
name: "type",
|
|
3258
|
-
enum:
|
|
3209
|
+
enum: import_ssi_types.StatusListType
|
|
3259
3210
|
}
|
|
3260
3211
|
})
|
|
3261
3212
|
], StatusListEntity);
|
|
@@ -3293,7 +3244,7 @@ _ts_decorate28([
|
|
|
3293
3244
|
_ts_metadata27("design:type", Array)
|
|
3294
3245
|
], StatusList2021Entity.prototype, "statusListEntries", void 0);
|
|
3295
3246
|
StatusList2021Entity = _ts_decorate28([
|
|
3296
|
-
|
|
3247
|
+
ChildEntity6(import_ssi_types.StatusListType.StatusList2021)
|
|
3297
3248
|
], StatusList2021Entity);
|
|
3298
3249
|
var OAuthStatusListEntity = class extends StatusListEntity {
|
|
3299
3250
|
static {
|
|
@@ -3319,14 +3270,14 @@ _ts_decorate28([
|
|
|
3319
3270
|
_ts_metadata27("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3320
3271
|
], OAuthStatusListEntity.prototype, "expiresAt", void 0);
|
|
3321
3272
|
OAuthStatusListEntity = _ts_decorate28([
|
|
3322
|
-
|
|
3273
|
+
ChildEntity6(import_ssi_types.StatusListType.OAuthStatusList)
|
|
3323
3274
|
], OAuthStatusListEntity);
|
|
3324
3275
|
var BitstringStatusListEntity = class extends StatusListEntity {
|
|
3325
3276
|
static {
|
|
3326
3277
|
__name(this, "BitstringStatusListEntity");
|
|
3327
3278
|
}
|
|
3328
3279
|
statusPurpose;
|
|
3329
|
-
|
|
3280
|
+
bitsPerStatus;
|
|
3330
3281
|
validFrom;
|
|
3331
3282
|
validUntil;
|
|
3332
3283
|
ttl;
|
|
@@ -3357,12 +3308,11 @@ _ts_decorate28([
|
|
|
3357
3308
|
_ts_decorate28([
|
|
3358
3309
|
Column25({
|
|
3359
3310
|
type: "integer",
|
|
3360
|
-
name: "
|
|
3361
|
-
nullable:
|
|
3362
|
-
default: 1
|
|
3311
|
+
name: "bitsPerStatus",
|
|
3312
|
+
nullable: false
|
|
3363
3313
|
}),
|
|
3364
3314
|
_ts_metadata27("design:type", Number)
|
|
3365
|
-
], BitstringStatusListEntity.prototype, "
|
|
3315
|
+
], BitstringStatusListEntity.prototype, "bitsPerStatus", void 0);
|
|
3366
3316
|
_ts_decorate28([
|
|
3367
3317
|
Column25({
|
|
3368
3318
|
name: "validFrom",
|
|
@@ -3392,7 +3342,7 @@ _ts_decorate28([
|
|
|
3392
3342
|
_ts_metadata27("design:type", Array)
|
|
3393
3343
|
], BitstringStatusListEntity.prototype, "statusListEntries", void 0);
|
|
3394
3344
|
BitstringStatusListEntity = _ts_decorate28([
|
|
3395
|
-
|
|
3345
|
+
ChildEntity6(import_ssi_types.StatusListType.BitstringStatusList)
|
|
3396
3346
|
], BitstringStatusListEntity);
|
|
3397
3347
|
|
|
3398
3348
|
// src/entities/machineState/MachineStateInfoEntity.ts
|
|
@@ -3528,7 +3478,7 @@ MachineStateInfoEntity = _ts_decorate29([
|
|
|
3528
3478
|
], MachineStateInfoEntity);
|
|
3529
3479
|
|
|
3530
3480
|
// src/entities/contact/OrganizationEntity.ts
|
|
3531
|
-
var
|
|
3481
|
+
var import_class_validator19 = require("class-validator");
|
|
3532
3482
|
var import_typeorm29 = require("typeorm");
|
|
3533
3483
|
function _ts_decorate30(decorators, target, key, desc) {
|
|
3534
3484
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -3550,7 +3500,7 @@ var OrganizationEntity = class extends BaseContactEntity {
|
|
|
3550
3500
|
ownerId;
|
|
3551
3501
|
tenantId;
|
|
3552
3502
|
async validate() {
|
|
3553
|
-
const validation = await (0,
|
|
3503
|
+
const validation = await (0, import_class_validator19.validate)(this);
|
|
3554
3504
|
if (validation.length > 0) {
|
|
3555
3505
|
const constraint = getConstraint(validation[0]);
|
|
3556
3506
|
if (constraint) {
|
|
@@ -3567,7 +3517,7 @@ _ts_decorate30([
|
|
|
3567
3517
|
nullable: false,
|
|
3568
3518
|
unique: true
|
|
3569
3519
|
}),
|
|
3570
|
-
(0,
|
|
3520
|
+
(0, import_class_validator19.IsNotEmpty)({
|
|
3571
3521
|
message: "Blank legal names are not allowed"
|
|
3572
3522
|
}),
|
|
3573
3523
|
_ts_metadata29("design:type", String)
|
|
@@ -3579,7 +3529,7 @@ _ts_decorate30([
|
|
|
3579
3529
|
nullable: false,
|
|
3580
3530
|
unique: false
|
|
3581
3531
|
}),
|
|
3582
|
-
(0,
|
|
3532
|
+
(0, import_class_validator19.IsNotEmpty)({
|
|
3583
3533
|
message: "Blank display names are not allowed"
|
|
3584
3534
|
}),
|
|
3585
3535
|
_ts_metadata29("design:type", String)
|
|
@@ -3611,7 +3561,7 @@ OrganizationEntity = _ts_decorate30([
|
|
|
3611
3561
|
|
|
3612
3562
|
// src/entities/contact/NaturalPersonEntity.ts
|
|
3613
3563
|
var import_typeorm30 = require("typeorm");
|
|
3614
|
-
var
|
|
3564
|
+
var import_class_validator20 = require("class-validator");
|
|
3615
3565
|
function _ts_decorate31(decorators, target, key, desc) {
|
|
3616
3566
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3617
3567
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -3634,7 +3584,7 @@ var NaturalPersonEntity = class extends BaseContactEntity {
|
|
|
3634
3584
|
ownerId;
|
|
3635
3585
|
tenantId;
|
|
3636
3586
|
async validate() {
|
|
3637
|
-
const validation = await (0,
|
|
3587
|
+
const validation = await (0, import_class_validator20.validate)(this);
|
|
3638
3588
|
if (validation.length > 0) {
|
|
3639
3589
|
const constraint = getConstraint(validation[0]);
|
|
3640
3590
|
if (constraint) {
|
|
@@ -3651,7 +3601,7 @@ _ts_decorate31([
|
|
|
3651
3601
|
nullable: false,
|
|
3652
3602
|
unique: false
|
|
3653
3603
|
}),
|
|
3654
|
-
(0,
|
|
3604
|
+
(0, import_class_validator20.IsNotEmpty)({
|
|
3655
3605
|
message: "Blank first names are not allowed"
|
|
3656
3606
|
}),
|
|
3657
3607
|
_ts_metadata30("design:type", String)
|
|
@@ -3663,7 +3613,7 @@ _ts_decorate31([
|
|
|
3663
3613
|
nullable: true,
|
|
3664
3614
|
unique: false
|
|
3665
3615
|
}),
|
|
3666
|
-
(0,
|
|
3616
|
+
(0, import_class_validator20.Validate)(IsNonEmptyStringConstraint, {
|
|
3667
3617
|
message: "Blank middle names are not allowed"
|
|
3668
3618
|
}),
|
|
3669
3619
|
_ts_metadata30("design:type", String)
|
|
@@ -3675,7 +3625,7 @@ _ts_decorate31([
|
|
|
3675
3625
|
nullable: false,
|
|
3676
3626
|
unique: false
|
|
3677
3627
|
}),
|
|
3678
|
-
(0,
|
|
3628
|
+
(0, import_class_validator20.IsNotEmpty)({
|
|
3679
3629
|
message: "Blank last names are not allowed"
|
|
3680
3630
|
}),
|
|
3681
3631
|
_ts_metadata30("design:type", String)
|
|
@@ -3687,7 +3637,7 @@ _ts_decorate31([
|
|
|
3687
3637
|
nullable: false,
|
|
3688
3638
|
unique: false
|
|
3689
3639
|
}),
|
|
3690
|
-
(0,
|
|
3640
|
+
(0, import_class_validator20.IsNotEmpty)({
|
|
3691
3641
|
message: "Blank display names are not allowed"
|
|
3692
3642
|
}),
|
|
3693
3643
|
_ts_metadata30("design:type", String)
|
|
@@ -3718,7 +3668,7 @@ NaturalPersonEntity = _ts_decorate31([
|
|
|
3718
3668
|
], NaturalPersonEntity);
|
|
3719
3669
|
|
|
3720
3670
|
// src/entities/eventLogger/AuditEventEntity.ts
|
|
3721
|
-
var
|
|
3671
|
+
var import_ssi_types2 = require("@sphereon/ssi-types");
|
|
3722
3672
|
var import_ssi_sdk15 = require("@sphereon/ssi-sdk.core");
|
|
3723
3673
|
var import_ssi_sdk16 = require("@sphereon/ssi-sdk.agent-config");
|
|
3724
3674
|
var import_typeorm31 = require("typeorm");
|
|
@@ -3780,20 +3730,20 @@ _ts_decorate32([
|
|
|
3780
3730
|
_ts_decorate32([
|
|
3781
3731
|
(0, import_typeorm31.Column)("simple-enum", {
|
|
3782
3732
|
name: "eventType",
|
|
3783
|
-
enum:
|
|
3733
|
+
enum: import_ssi_types2.LoggingEventType,
|
|
3784
3734
|
nullable: false,
|
|
3785
3735
|
unique: false
|
|
3786
3736
|
}),
|
|
3787
|
-
_ts_metadata31("design:type", typeof
|
|
3737
|
+
_ts_metadata31("design:type", typeof import_ssi_types2.LoggingEventType === "undefined" ? Object : import_ssi_types2.LoggingEventType)
|
|
3788
3738
|
], AuditEventEntity.prototype, "type", void 0);
|
|
3789
3739
|
_ts_decorate32([
|
|
3790
3740
|
(0, import_typeorm31.Column)("simple-enum", {
|
|
3791
3741
|
name: "level",
|
|
3792
|
-
enum:
|
|
3742
|
+
enum: import_ssi_types2.LogLevel,
|
|
3793
3743
|
nullable: false,
|
|
3794
3744
|
unique: false
|
|
3795
3745
|
}),
|
|
3796
|
-
_ts_metadata31("design:type", typeof
|
|
3746
|
+
_ts_metadata31("design:type", typeof import_ssi_types2.LogLevel === "undefined" ? Object : import_ssi_types2.LogLevel)
|
|
3797
3747
|
], AuditEventEntity.prototype, "level", void 0);
|
|
3798
3748
|
_ts_decorate32([
|
|
3799
3749
|
(0, import_typeorm31.Column)("text", {
|
|
@@ -3806,29 +3756,29 @@ _ts_decorate32([
|
|
|
3806
3756
|
_ts_decorate32([
|
|
3807
3757
|
(0, import_typeorm31.Column)("simple-enum", {
|
|
3808
3758
|
name: "system",
|
|
3809
|
-
enum:
|
|
3759
|
+
enum: import_ssi_types2.System,
|
|
3810
3760
|
nullable: false,
|
|
3811
3761
|
unique: false
|
|
3812
3762
|
}),
|
|
3813
|
-
_ts_metadata31("design:type", typeof
|
|
3763
|
+
_ts_metadata31("design:type", typeof import_ssi_types2.System === "undefined" ? Object : import_ssi_types2.System)
|
|
3814
3764
|
], AuditEventEntity.prototype, "system", void 0);
|
|
3815
3765
|
_ts_decorate32([
|
|
3816
3766
|
(0, import_typeorm31.Column)("simple-enum", {
|
|
3817
3767
|
name: "subSystemType",
|
|
3818
|
-
enum:
|
|
3768
|
+
enum: import_ssi_types2.SubSystem,
|
|
3819
3769
|
nullable: false,
|
|
3820
3770
|
unique: false
|
|
3821
3771
|
}),
|
|
3822
|
-
_ts_metadata31("design:type", typeof
|
|
3772
|
+
_ts_metadata31("design:type", typeof import_ssi_types2.SubSystem === "undefined" ? Object : import_ssi_types2.SubSystem)
|
|
3823
3773
|
], AuditEventEntity.prototype, "subSystemType", void 0);
|
|
3824
3774
|
_ts_decorate32([
|
|
3825
3775
|
(0, import_typeorm31.Column)("simple-enum", {
|
|
3826
3776
|
name: "actionType",
|
|
3827
|
-
enum:
|
|
3777
|
+
enum: import_ssi_types2.ActionType,
|
|
3828
3778
|
nullable: false,
|
|
3829
3779
|
unique: false
|
|
3830
3780
|
}),
|
|
3831
|
-
_ts_metadata31("design:type", typeof
|
|
3781
|
+
_ts_metadata31("design:type", typeof import_ssi_types2.ActionType === "undefined" ? Object : import_ssi_types2.ActionType)
|
|
3832
3782
|
], AuditEventEntity.prototype, "actionType", void 0);
|
|
3833
3783
|
_ts_decorate32([
|
|
3834
3784
|
(0, import_typeorm31.Column)({
|
|
@@ -3842,20 +3792,20 @@ _ts_decorate32([
|
|
|
3842
3792
|
_ts_decorate32([
|
|
3843
3793
|
(0, import_typeorm31.Column)("simple-enum", {
|
|
3844
3794
|
name: "initiatorType",
|
|
3845
|
-
enum:
|
|
3795
|
+
enum: import_ssi_types2.InitiatorType,
|
|
3846
3796
|
nullable: false,
|
|
3847
3797
|
unique: false
|
|
3848
3798
|
}),
|
|
3849
|
-
_ts_metadata31("design:type", typeof
|
|
3799
|
+
_ts_metadata31("design:type", typeof import_ssi_types2.InitiatorType === "undefined" ? Object : import_ssi_types2.InitiatorType)
|
|
3850
3800
|
], AuditEventEntity.prototype, "initiatorType", void 0);
|
|
3851
3801
|
_ts_decorate32([
|
|
3852
3802
|
(0, import_typeorm31.Column)("simple-enum", {
|
|
3853
3803
|
name: "systemCorrelationIdType",
|
|
3854
|
-
enum:
|
|
3804
|
+
enum: import_ssi_types2.SystemCorrelationIdType,
|
|
3855
3805
|
nullable: true,
|
|
3856
3806
|
unique: false
|
|
3857
3807
|
}),
|
|
3858
|
-
_ts_metadata31("design:type", typeof
|
|
3808
|
+
_ts_metadata31("design:type", typeof import_ssi_types2.SystemCorrelationIdType === "undefined" ? Object : import_ssi_types2.SystemCorrelationIdType)
|
|
3859
3809
|
], AuditEventEntity.prototype, "systemCorrelationIdType", void 0);
|
|
3860
3810
|
_ts_decorate32([
|
|
3861
3811
|
(0, import_typeorm31.Column)("text", {
|
|
@@ -4246,7 +4196,7 @@ DigitalCredentialEntity = _ts_decorate33([
|
|
|
4246
4196
|
|
|
4247
4197
|
// src/entities/presentationDefinition/PresentationDefinitionItemEntity.ts
|
|
4248
4198
|
var import_typeorm33 = require("typeorm");
|
|
4249
|
-
var
|
|
4199
|
+
var import_class_validator21 = require("class-validator");
|
|
4250
4200
|
var import_ssi_sdk18 = require("@sphereon/ssi-sdk.agent-config");
|
|
4251
4201
|
function _ts_decorate34(decorators, target, key, desc) {
|
|
4252
4202
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -4290,7 +4240,7 @@ _ts_decorate34([
|
|
|
4290
4240
|
nullable: false,
|
|
4291
4241
|
unique: false
|
|
4292
4242
|
}),
|
|
4293
|
-
(0,
|
|
4243
|
+
(0, import_class_validator21.IsNotEmpty)({
|
|
4294
4244
|
message: "A blank definition id field is not allowed"
|
|
4295
4245
|
}),
|
|
4296
4246
|
_ts_metadata33("design:type", String)
|
|
@@ -4303,7 +4253,7 @@ _ts_decorate34([
|
|
|
4303
4253
|
nullable: false,
|
|
4304
4254
|
unique: false
|
|
4305
4255
|
}),
|
|
4306
|
-
(0,
|
|
4256
|
+
(0, import_class_validator21.IsNotEmpty)({
|
|
4307
4257
|
message: "A blank version field is not allowed"
|
|
4308
4258
|
}),
|
|
4309
4259
|
_ts_metadata33("design:type", String)
|
|
@@ -4345,7 +4295,7 @@ _ts_decorate34([
|
|
|
4345
4295
|
nullable: false,
|
|
4346
4296
|
unique: false
|
|
4347
4297
|
}),
|
|
4348
|
-
(0,
|
|
4298
|
+
(0, import_class_validator21.IsNotEmpty)({
|
|
4349
4299
|
message: "A blank PD definition payload field is not allowed"
|
|
4350
4300
|
}),
|
|
4351
4301
|
_ts_metadata33("design:type", String)
|
|
@@ -4357,7 +4307,7 @@ _ts_decorate34([
|
|
|
4357
4307
|
nullable: true,
|
|
4358
4308
|
unique: false
|
|
4359
4309
|
}),
|
|
4360
|
-
(0,
|
|
4310
|
+
(0, import_class_validator21.IsNotEmpty)({
|
|
4361
4311
|
message: "A blank dcql definition payload field is not allowed"
|
|
4362
4312
|
}),
|
|
4363
4313
|
_ts_metadata33("design:type", String)
|
|
@@ -6231,50 +6181,53 @@ var IssuanceBrandingStore = class extends AbstractIssuanceBrandingStore {
|
|
|
6231
6181
|
};
|
|
6232
6182
|
|
|
6233
6183
|
// src/statusList/StatusListStore.ts
|
|
6234
|
-
var
|
|
6184
|
+
var import_ssi_types4 = require("@sphereon/ssi-types");
|
|
6235
6185
|
var import_debug4 = __toESM(require("debug"), 1);
|
|
6236
6186
|
var import_typeorm37 = require("typeorm");
|
|
6237
6187
|
|
|
6238
6188
|
// src/utils/statusList/MappingUtils.ts
|
|
6239
|
-
var
|
|
6189
|
+
var import_ssi_types3 = require("@sphereon/ssi-types");
|
|
6240
6190
|
var statusListEntityFrom = /* @__PURE__ */ __name((args) => {
|
|
6241
|
-
if (args.type ===
|
|
6191
|
+
if (args.type === import_ssi_types3.StatusListType.StatusList2021) {
|
|
6242
6192
|
const entity = new StatusList2021Entity();
|
|
6243
6193
|
const sl2021 = args;
|
|
6244
6194
|
entity.indexingDirection = sl2021.indexingDirection;
|
|
6245
6195
|
entity.statusPurpose = sl2021.statusPurpose;
|
|
6246
6196
|
setBaseFields(entity, args);
|
|
6247
6197
|
Object.defineProperty(entity, "type", {
|
|
6248
|
-
value:
|
|
6198
|
+
value: import_ssi_types3.StatusListType.StatusList2021,
|
|
6249
6199
|
enumerable: true,
|
|
6250
6200
|
configurable: true
|
|
6251
6201
|
});
|
|
6252
6202
|
return entity;
|
|
6253
6203
|
}
|
|
6254
|
-
if (args.type ===
|
|
6204
|
+
if (args.type === import_ssi_types3.StatusListType.OAuthStatusList) {
|
|
6255
6205
|
const entity = new OAuthStatusListEntity();
|
|
6256
6206
|
const oauthSl = args;
|
|
6257
6207
|
entity.bitsPerStatus = oauthSl.bitsPerStatus;
|
|
6258
6208
|
entity.expiresAt = oauthSl.expiresAt;
|
|
6259
6209
|
setBaseFields(entity, args);
|
|
6260
6210
|
Object.defineProperty(entity, "type", {
|
|
6261
|
-
value:
|
|
6211
|
+
value: import_ssi_types3.StatusListType.OAuthStatusList,
|
|
6262
6212
|
enumerable: true,
|
|
6263
6213
|
configurable: true
|
|
6264
6214
|
});
|
|
6265
6215
|
return entity;
|
|
6266
6216
|
}
|
|
6267
|
-
if (args.type ===
|
|
6217
|
+
if (args.type === import_ssi_types3.StatusListType.BitstringStatusList) {
|
|
6268
6218
|
const entity = new BitstringStatusListEntity();
|
|
6269
6219
|
const bitstringsl = args;
|
|
6220
|
+
if (!bitstringsl.bitsPerStatus) {
|
|
6221
|
+
throw Error("bitsPerStatus must be set for BitstringStatusList");
|
|
6222
|
+
}
|
|
6270
6223
|
entity.statusPurpose = bitstringsl.statusPurpose;
|
|
6271
|
-
entity.
|
|
6224
|
+
entity.bitsPerStatus = bitstringsl.bitsPerStatus;
|
|
6272
6225
|
entity.validFrom = bitstringsl.validFrom;
|
|
6273
6226
|
entity.validUntil = bitstringsl.validUntil;
|
|
6274
6227
|
entity.ttl = bitstringsl.ttl;
|
|
6275
6228
|
setBaseFields(entity, args);
|
|
6276
6229
|
Object.defineProperty(entity, "type", {
|
|
6277
|
-
value:
|
|
6230
|
+
value: import_ssi_types3.StatusListType.BitstringStatusList,
|
|
6278
6231
|
enumerable: true,
|
|
6279
6232
|
configurable: true
|
|
6280
6233
|
});
|
|
@@ -6286,7 +6239,7 @@ var statusListFrom = /* @__PURE__ */ __name((entity) => {
|
|
|
6286
6239
|
if (entity instanceof StatusList2021Entity) {
|
|
6287
6240
|
const result = {
|
|
6288
6241
|
...getBaseFields(entity),
|
|
6289
|
-
type:
|
|
6242
|
+
type: import_ssi_types3.StatusListType.StatusList2021,
|
|
6290
6243
|
indexingDirection: entity.indexingDirection,
|
|
6291
6244
|
statusPurpose: entity.statusPurpose
|
|
6292
6245
|
};
|
|
@@ -6295,7 +6248,7 @@ var statusListFrom = /* @__PURE__ */ __name((entity) => {
|
|
|
6295
6248
|
if (entity instanceof OAuthStatusListEntity) {
|
|
6296
6249
|
const result = {
|
|
6297
6250
|
...getBaseFields(entity),
|
|
6298
|
-
type:
|
|
6251
|
+
type: import_ssi_types3.StatusListType.OAuthStatusList,
|
|
6299
6252
|
bitsPerStatus: entity.bitsPerStatus,
|
|
6300
6253
|
expiresAt: entity.expiresAt
|
|
6301
6254
|
};
|
|
@@ -6304,9 +6257,9 @@ var statusListFrom = /* @__PURE__ */ __name((entity) => {
|
|
|
6304
6257
|
if (entity instanceof BitstringStatusListEntity) {
|
|
6305
6258
|
const result = {
|
|
6306
6259
|
...getBaseFields(entity),
|
|
6307
|
-
type:
|
|
6260
|
+
type: import_ssi_types3.StatusListType.BitstringStatusList,
|
|
6308
6261
|
statusPurpose: entity.statusPurpose,
|
|
6309
|
-
|
|
6262
|
+
bitsPerStatus: entity.bitsPerStatus,
|
|
6310
6263
|
validFrom: entity.validFrom,
|
|
6311
6264
|
validUntil: entity.validUntil,
|
|
6312
6265
|
ttl: entity.ttl
|
|
@@ -6363,33 +6316,45 @@ var StatusListStore = class {
|
|
|
6363
6316
|
...args,
|
|
6364
6317
|
id: args.statusListId
|
|
6365
6318
|
});
|
|
6366
|
-
const repo = await this.getStatusListEntryRepo();
|
|
6319
|
+
const repo = await this.getStatusListEntryRepo(statusList.type);
|
|
6367
6320
|
const results = (await repo.find({
|
|
6368
6321
|
where: {
|
|
6369
|
-
statusList,
|
|
6322
|
+
statusListId: statusList.id,
|
|
6370
6323
|
statusListIndex: (0, import_typeorm37.In)(statusListIndex)
|
|
6371
6324
|
}
|
|
6372
6325
|
})).map((index) => index.statusListIndex);
|
|
6373
6326
|
return statusListIndex.filter((index) => !results.includes(index));
|
|
6374
6327
|
}
|
|
6375
6328
|
async addStatusListEntry(args) {
|
|
6376
|
-
|
|
6329
|
+
if (!args.statusListId) {
|
|
6330
|
+
throw new Error("statusListId is required");
|
|
6331
|
+
}
|
|
6332
|
+
const statusList = await this.getStatusList({
|
|
6333
|
+
id: args.statusListId
|
|
6334
|
+
});
|
|
6335
|
+
const result = await (await this.getStatusListEntryRepo(statusList.type)).save(args);
|
|
6336
|
+
return result;
|
|
6377
6337
|
}
|
|
6378
6338
|
async updateStatusListEntry(args) {
|
|
6379
|
-
const statusListId = args.statusListId
|
|
6339
|
+
const statusListId = args.statusListId;
|
|
6340
|
+
if (!statusListId) {
|
|
6341
|
+
throw new Error("statusListId is required");
|
|
6342
|
+
}
|
|
6343
|
+
const statusList = await this.getStatusList({
|
|
6344
|
+
id: statusListId
|
|
6345
|
+
});
|
|
6380
6346
|
const result = await this.getStatusListEntryByIndex({
|
|
6381
6347
|
...args,
|
|
6382
6348
|
statusListId,
|
|
6383
6349
|
errorOnNotFound: false
|
|
6384
6350
|
});
|
|
6385
6351
|
const updatedEntry = {
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
credentialId: args.credentialId
|
|
6352
|
+
...result,
|
|
6353
|
+
...args,
|
|
6354
|
+
statusListId
|
|
6390
6355
|
};
|
|
6391
6356
|
const updStatusListId = result?.statusListId ?? statusListId;
|
|
6392
|
-
const updateResult = await (await this.getStatusListEntryRepo()).upsert({
|
|
6357
|
+
const updateResult = await (await this.getStatusListEntryRepo(statusList.type)).upsert({
|
|
6393
6358
|
...result ?? {
|
|
6394
6359
|
statusListId: updStatusListId,
|
|
6395
6360
|
statusListIndex: args.statusListIndex
|
|
@@ -6415,7 +6380,12 @@ var StatusListStore = class {
|
|
|
6415
6380
|
if (!statusListIndex && !entryCorrelationId) {
|
|
6416
6381
|
throw Error(`Cannot get statusList entry without either a statusListIndex or entryCorrelationId`);
|
|
6417
6382
|
}
|
|
6418
|
-
const
|
|
6383
|
+
const statusList = statusListId ? await this.getStatusList({
|
|
6384
|
+
id: statusListId
|
|
6385
|
+
}) : await this.getStatusList({
|
|
6386
|
+
correlationId: statusListCorrelationId
|
|
6387
|
+
});
|
|
6388
|
+
const result = await (await this.getStatusListEntryRepo(statusList.type)).findOne({
|
|
6419
6389
|
where: {
|
|
6420
6390
|
...statusListId && {
|
|
6421
6391
|
statusListId
|
|
@@ -6459,8 +6429,8 @@ var StatusListStore = class {
|
|
|
6459
6429
|
},
|
|
6460
6430
|
credentialId
|
|
6461
6431
|
};
|
|
6462
|
-
console.log(`Entries: ${JSON.stringify(await (await this.getStatusListEntryRepo()).find(), null, 2)}`);
|
|
6463
|
-
const result = await (await this.getStatusListEntryRepo()).findOne({
|
|
6432
|
+
console.log(`Entries: ${JSON.stringify(await (await this.getStatusListEntryRepo(statusList.type)).find(), null, 2)}`);
|
|
6433
|
+
const result = await (await this.getStatusListEntryRepo(statusList.type)).findOne({
|
|
6464
6434
|
where
|
|
6465
6435
|
});
|
|
6466
6436
|
if (!result && args.errorOnNotFound) {
|
|
@@ -6476,7 +6446,11 @@ var StatusListStore = class {
|
|
|
6476
6446
|
error2 = true;
|
|
6477
6447
|
}
|
|
6478
6448
|
if (!error) {
|
|
6479
|
-
const
|
|
6449
|
+
const statusList = await this.getStatusList({
|
|
6450
|
+
id: args.statusListId,
|
|
6451
|
+
correlationId: args.statusListCorrelationId
|
|
6452
|
+
});
|
|
6453
|
+
const result = await (await this.getStatusListEntryRepo(statusList.type)).delete({
|
|
6480
6454
|
...args.statusListId && {
|
|
6481
6455
|
statusList: args.statusListId
|
|
6482
6456
|
},
|
|
@@ -6499,7 +6473,10 @@ var StatusListStore = class {
|
|
|
6499
6473
|
if (error) {
|
|
6500
6474
|
console.log(`Could not delete statusList ${args.statusListId} entry by index ${args.statusListIndex}`);
|
|
6501
6475
|
} else {
|
|
6502
|
-
const
|
|
6476
|
+
const statusList = await this.getStatusList({
|
|
6477
|
+
id: args.statusListId
|
|
6478
|
+
});
|
|
6479
|
+
const result = await (await this.getStatusListEntryRepo(statusList.type)).delete({
|
|
6503
6480
|
...args.statusListId && {
|
|
6504
6481
|
statusList: args.statusListId
|
|
6505
6482
|
},
|
|
@@ -6513,15 +6490,16 @@ var StatusListStore = class {
|
|
|
6513
6490
|
return !error;
|
|
6514
6491
|
}
|
|
6515
6492
|
async getStatusListEntries(args) {
|
|
6516
|
-
|
|
6493
|
+
const statusList = await this.getStatusList({
|
|
6494
|
+
id: args.statusListId
|
|
6495
|
+
});
|
|
6496
|
+
const results = await (await this.getStatusListEntryRepo(statusList.type)).find({
|
|
6517
6497
|
where: {
|
|
6518
6498
|
...args?.filter,
|
|
6519
6499
|
statusList: args.statusListId
|
|
6520
6500
|
}
|
|
6521
6501
|
});
|
|
6522
|
-
|
|
6523
|
-
async getStatusList(args) {
|
|
6524
|
-
return statusListFrom(await this.getStatusListEntity(args));
|
|
6502
|
+
return results;
|
|
6525
6503
|
}
|
|
6526
6504
|
async getStatusListEntity(args) {
|
|
6527
6505
|
if (!args.id && !args.correlationId) {
|
|
@@ -6545,6 +6523,10 @@ var StatusListStore = class {
|
|
|
6545
6523
|
}
|
|
6546
6524
|
return result;
|
|
6547
6525
|
}
|
|
6526
|
+
async getStatusList(args) {
|
|
6527
|
+
const entity = await this.getStatusListEntity(args);
|
|
6528
|
+
return statusListFrom(entity);
|
|
6529
|
+
}
|
|
6548
6530
|
async getStatusLists(args) {
|
|
6549
6531
|
const result = await (await this.getStatusListRepo()).find({
|
|
6550
6532
|
where: args.filter
|
|
@@ -6585,7 +6567,7 @@ var StatusListStore = class {
|
|
|
6585
6567
|
}
|
|
6586
6568
|
async removeStatusList(args) {
|
|
6587
6569
|
const result = await this.getStatusListEntity(args);
|
|
6588
|
-
await (await this.getStatusListEntryRepo()).delete({
|
|
6570
|
+
await (await this.getStatusListEntryRepo(result.type)).delete({
|
|
6589
6571
|
statusListId: result.id
|
|
6590
6572
|
});
|
|
6591
6573
|
const deletedEntity = await (await this.getStatusListRepo()).remove(result);
|
|
@@ -6597,18 +6579,24 @@ var StatusListStore = class {
|
|
|
6597
6579
|
async getStatusListRepo(type) {
|
|
6598
6580
|
const dataSource = await this.getDS();
|
|
6599
6581
|
switch (type) {
|
|
6600
|
-
case
|
|
6582
|
+
case import_ssi_types4.StatusListType.StatusList2021:
|
|
6601
6583
|
return dataSource.getRepository(StatusList2021Entity);
|
|
6602
|
-
case
|
|
6584
|
+
case import_ssi_types4.StatusListType.OAuthStatusList:
|
|
6603
6585
|
return dataSource.getRepository(OAuthStatusListEntity);
|
|
6604
|
-
case
|
|
6586
|
+
case import_ssi_types4.StatusListType.BitstringStatusList:
|
|
6605
6587
|
return dataSource.getRepository(BitstringStatusListEntity);
|
|
6606
6588
|
default:
|
|
6607
6589
|
return dataSource.getRepository(StatusListEntity);
|
|
6608
6590
|
}
|
|
6609
6591
|
}
|
|
6610
|
-
async getStatusListEntryRepo() {
|
|
6611
|
-
|
|
6592
|
+
async getStatusListEntryRepo(type) {
|
|
6593
|
+
const dataSource = await this.getDS();
|
|
6594
|
+
switch (type) {
|
|
6595
|
+
case import_ssi_types4.StatusListType.BitstringStatusList:
|
|
6596
|
+
return dataSource.getRepository(BitstringStatusListEntryEntity);
|
|
6597
|
+
default:
|
|
6598
|
+
return dataSource.getRepository(StatusListEntryEntity);
|
|
6599
|
+
}
|
|
6612
6600
|
}
|
|
6613
6601
|
};
|
|
6614
6602
|
|
|
@@ -6620,15 +6608,15 @@ var AbstractEventLoggerStore = class {
|
|
|
6620
6608
|
};
|
|
6621
6609
|
|
|
6622
6610
|
// src/eventLogger/EventLoggerStore.ts
|
|
6623
|
-
var
|
|
6611
|
+
var import_ssi_types6 = require("@sphereon/ssi-types");
|
|
6624
6612
|
var import_debug5 = __toESM(require("debug"), 1);
|
|
6625
6613
|
|
|
6626
6614
|
// src/utils/eventLogger/MappingUtils.ts
|
|
6627
|
-
var
|
|
6615
|
+
var import_ssi_types5 = require("@sphereon/ssi-types");
|
|
6628
6616
|
var auditEventFrom = /* @__PURE__ */ __name((event) => {
|
|
6629
6617
|
const result = {
|
|
6630
6618
|
id: event.id,
|
|
6631
|
-
type:
|
|
6619
|
+
type: import_ssi_types5.LoggingEventType.AUDIT,
|
|
6632
6620
|
description: event.description,
|
|
6633
6621
|
timestamp: event.timestamp,
|
|
6634
6622
|
level: event.level,
|
|
@@ -6655,7 +6643,7 @@ var auditEventFrom = /* @__PURE__ */ __name((event) => {
|
|
|
6655
6643
|
}, "auditEventFrom");
|
|
6656
6644
|
var auditEventEntityFrom = /* @__PURE__ */ __name((args) => {
|
|
6657
6645
|
const auditEventEntity = new AuditEventEntity();
|
|
6658
|
-
auditEventEntity.type =
|
|
6646
|
+
auditEventEntity.type = import_ssi_types5.LoggingEventType.AUDIT;
|
|
6659
6647
|
auditEventEntity.timestamp = args.timestamp;
|
|
6660
6648
|
auditEventEntity.level = args.level;
|
|
6661
6649
|
auditEventEntity.correlationId = args.correlationId;
|
|
@@ -6679,7 +6667,7 @@ var auditEventEntityFrom = /* @__PURE__ */ __name((args) => {
|
|
|
6679
6667
|
var activityEventFrom = /* @__PURE__ */ __name((event) => {
|
|
6680
6668
|
const result = {
|
|
6681
6669
|
id: event.id,
|
|
6682
|
-
type:
|
|
6670
|
+
type: import_ssi_types5.LoggingEventType.ACTIVITY,
|
|
6683
6671
|
credentialType: event.credentialType,
|
|
6684
6672
|
originalCredential: event.originalCredential,
|
|
6685
6673
|
credentialHash: event.credentialHash,
|
|
@@ -6711,7 +6699,7 @@ var activityEventFrom = /* @__PURE__ */ __name((event) => {
|
|
|
6711
6699
|
}, "activityEventFrom");
|
|
6712
6700
|
var activityEventEntityFrom = /* @__PURE__ */ __name((args) => {
|
|
6713
6701
|
const activityEventEntity = new AuditEventEntity();
|
|
6714
|
-
activityEventEntity.type =
|
|
6702
|
+
activityEventEntity.type = import_ssi_types5.LoggingEventType.ACTIVITY;
|
|
6715
6703
|
activityEventEntity.timestamp = args.timestamp;
|
|
6716
6704
|
activityEventEntity.level = args.level;
|
|
6717
6705
|
activityEventEntity.correlationId = args.correlationId;
|
|
@@ -6753,11 +6741,11 @@ var EventLoggerStore = class extends AbstractEventLoggerStore {
|
|
|
6753
6741
|
const { filter = [] } = args ?? {};
|
|
6754
6742
|
const auditEventsFilter = filter.map((item) => ({
|
|
6755
6743
|
...item,
|
|
6756
|
-
type:
|
|
6744
|
+
type: import_ssi_types6.LoggingEventType.AUDIT
|
|
6757
6745
|
}));
|
|
6758
6746
|
if (auditEventsFilter.length === 0) {
|
|
6759
6747
|
auditEventsFilter.push({
|
|
6760
|
-
type:
|
|
6748
|
+
type: import_ssi_types6.LoggingEventType.AUDIT
|
|
6761
6749
|
});
|
|
6762
6750
|
}
|
|
6763
6751
|
const connection = await this.dbConnection;
|
|
@@ -6779,11 +6767,11 @@ var EventLoggerStore = class extends AbstractEventLoggerStore {
|
|
|
6779
6767
|
const { filter = [] } = args ?? {};
|
|
6780
6768
|
const activityEventsFilter = filter.map((item) => ({
|
|
6781
6769
|
...item,
|
|
6782
|
-
type:
|
|
6770
|
+
type: import_ssi_types6.LoggingEventType.ACTIVITY
|
|
6783
6771
|
}));
|
|
6784
6772
|
if (activityEventsFilter.length === 0) {
|
|
6785
6773
|
activityEventsFilter.push({
|
|
6786
|
-
type:
|
|
6774
|
+
type: import_ssi_types6.LoggingEventType.ACTIVITY
|
|
6787
6775
|
});
|
|
6788
6776
|
}
|
|
6789
6777
|
const connection = await this.dbConnection;
|
|
@@ -9086,41 +9074,32 @@ var CreateBitstringStatusListPG1741895823000 = class {
|
|
|
9086
9074
|
}
|
|
9087
9075
|
name = "CreateBitstringStatusList1741895823000";
|
|
9088
9076
|
async up(queryRunner) {
|
|
9089
|
-
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "
|
|
9077
|
+
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "bitsPerStatus" integer DEFAULT 1`);
|
|
9090
9078
|
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "ttl" integer`);
|
|
9091
9079
|
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "validFrom" TIMESTAMP`);
|
|
9092
9080
|
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "validUntil" TIMESTAMP`);
|
|
9093
9081
|
await queryRunner.query(`ALTER TABLE "StatusList" DROP CONSTRAINT IF EXISTS "CHK_StatusList_type"`);
|
|
9094
9082
|
await queryRunner.query(`ALTER TABLE "StatusList" ADD CONSTRAINT "CHK_StatusList_type" CHECK ("type" IN ('StatusList2021', 'OAuthStatusList', 'BitstringStatusList'))`);
|
|
9095
|
-
await queryRunner.query(`
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
"correlationId" character varying(255),
|
|
9102
|
-
"statusPurpose" character varying NOT NULL,
|
|
9103
|
-
"statusSize" integer DEFAULT 1,
|
|
9104
|
-
"statusMessage" text,
|
|
9105
|
-
"statusReference" text,
|
|
9106
|
-
CONSTRAINT "PK_BitstringStatusListEntry" PRIMARY KEY ("statusListId", "statusListIndex")
|
|
9107
|
-
)
|
|
9108
|
-
`);
|
|
9109
|
-
await queryRunner.query(`
|
|
9110
|
-
ALTER TABLE "BitstringStatusListEntry"
|
|
9111
|
-
ADD CONSTRAINT "FK_BitstringStatusListEntry_statusListId"
|
|
9112
|
-
FOREIGN KEY ("statusListId") REFERENCES "StatusList"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
|
|
9113
|
-
`);
|
|
9083
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "type" character varying NOT NULL DEFAULT 'StatusListEntryEntity'`);
|
|
9084
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "statusPurpose" character varying`);
|
|
9085
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "bitsPerStatus" integer DEFAULT 1`);
|
|
9086
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "statusMessage" text`);
|
|
9087
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "statusReference" text`);
|
|
9088
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD CONSTRAINT "CHK_StatusListEntry_type" CHECK ("type" IN ('StatusListEntryEntity', 'bitstring'))`);
|
|
9114
9089
|
}
|
|
9115
9090
|
async down(queryRunner) {
|
|
9116
|
-
await queryRunner.query(`ALTER TABLE "
|
|
9117
|
-
await queryRunner.query(`
|
|
9091
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP CONSTRAINT "CHK_StatusListEntry_type"`);
|
|
9092
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "statusReference"`);
|
|
9093
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "statusMessage"`);
|
|
9094
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "bitsPerStatus"`);
|
|
9095
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "statusPurpose"`);
|
|
9096
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "type"`);
|
|
9118
9097
|
await queryRunner.query(`ALTER TABLE "StatusList" DROP CONSTRAINT "CHK_StatusList_type"`);
|
|
9119
9098
|
await queryRunner.query(`ALTER TABLE "StatusList" ADD CONSTRAINT "CHK_StatusList_type" CHECK ("type" IN ('StatusList2021', 'OAuthStatusList'))`);
|
|
9120
9099
|
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "validUntil"`);
|
|
9121
9100
|
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "validFrom"`);
|
|
9122
9101
|
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "ttl"`);
|
|
9123
|
-
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "
|
|
9102
|
+
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "bitsPerStatus"`);
|
|
9124
9103
|
}
|
|
9125
9104
|
};
|
|
9126
9105
|
|
|
@@ -9140,13 +9119,12 @@ var CreateBitstringStatusListSqlite1741895823001 = class {
|
|
|
9140
9119
|
"type" varchar CHECK( "type" IN ('StatusList2021', 'OAuthStatusList', 'BitstringStatusList') ) NOT NULL DEFAULT ('StatusList2021'),
|
|
9141
9120
|
"driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'),
|
|
9142
9121
|
"credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'),
|
|
9143
|
-
"proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt') ) NOT NULL DEFAULT ('lds'),
|
|
9122
|
+
"proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt', 'vc+jwt') ) NOT NULL DEFAULT ('lds'),
|
|
9144
9123
|
"indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ),
|
|
9145
9124
|
"statusPurpose" varchar,
|
|
9146
9125
|
"statusListCredential" text,
|
|
9147
|
-
"bitsPerStatus" integer,
|
|
9148
9126
|
"expiresAt" datetime,
|
|
9149
|
-
"
|
|
9127
|
+
"bitsPerStatus" integer DEFAULT (1),
|
|
9150
9128
|
"ttl" integer,
|
|
9151
9129
|
"validFrom" datetime,
|
|
9152
9130
|
"validUntil" datetime,
|
|
@@ -9168,22 +9146,59 @@ var CreateBitstringStatusListSqlite1741895823001 = class {
|
|
|
9168
9146
|
await queryRunner.query(`DROP TABLE "StatusList"`);
|
|
9169
9147
|
await queryRunner.query(`ALTER TABLE "temporary_StatusList" RENAME TO "StatusList"`);
|
|
9170
9148
|
await queryRunner.query(`
|
|
9171
|
-
CREATE TABLE "
|
|
9149
|
+
CREATE TABLE "temporary_StatusListEntry" (
|
|
9172
9150
|
"statusListId" varchar NOT NULL,
|
|
9173
9151
|
"statusListIndex" integer NOT NULL,
|
|
9174
9152
|
"credentialId" text,
|
|
9175
9153
|
"credentialHash" varchar(128),
|
|
9176
9154
|
"correlationId" varchar(255),
|
|
9177
|
-
"
|
|
9178
|
-
"
|
|
9155
|
+
"value" varchar(50),
|
|
9156
|
+
"type" varchar CHECK( "type" IN ('StatusListEntryEntity', 'bitstring') ) NOT NULL DEFAULT ('StatusListEntryEntity'),
|
|
9157
|
+
"statusPurpose" varchar,
|
|
9158
|
+
"bitsPerStatus" integer DEFAULT (1),
|
|
9179
9159
|
"statusMessage" text,
|
|
9180
9160
|
"statusReference" text,
|
|
9181
9161
|
PRIMARY KEY ("statusListId", "statusListIndex")
|
|
9182
9162
|
)
|
|
9183
9163
|
`);
|
|
9164
|
+
await queryRunner.query(`
|
|
9165
|
+
INSERT INTO "temporary_StatusListEntry"(
|
|
9166
|
+
"statusListId", "statusListIndex", "credentialId", "credentialHash",
|
|
9167
|
+
"correlationId", "value", "type"
|
|
9168
|
+
)
|
|
9169
|
+
SELECT
|
|
9170
|
+
"statusListId", "statusListIndex", "credentialId", "credentialHash",
|
|
9171
|
+
"correlationId", "value", 'StatusListEntryEntity'
|
|
9172
|
+
FROM "StatusListEntry"
|
|
9173
|
+
`);
|
|
9174
|
+
await queryRunner.query(`DROP TABLE "StatusListEntry"`);
|
|
9175
|
+
await queryRunner.query(`ALTER TABLE "temporary_StatusListEntry" RENAME TO "StatusListEntry"`);
|
|
9184
9176
|
}
|
|
9185
9177
|
async down(queryRunner) {
|
|
9186
|
-
await queryRunner.query(`
|
|
9178
|
+
await queryRunner.query(`
|
|
9179
|
+
CREATE TABLE "temporary_StatusListEntry" (
|
|
9180
|
+
"statusListId" varchar NOT NULL,
|
|
9181
|
+
"statusListIndex" integer NOT NULL,
|
|
9182
|
+
"credentialId" text,
|
|
9183
|
+
"credentialHash" varchar(128),
|
|
9184
|
+
"correlationId" varchar(255),
|
|
9185
|
+
"value" varchar(50),
|
|
9186
|
+
PRIMARY KEY ("statusListId", "statusListIndex")
|
|
9187
|
+
)
|
|
9188
|
+
`);
|
|
9189
|
+
await queryRunner.query(`
|
|
9190
|
+
INSERT INTO "temporary_StatusListEntry"(
|
|
9191
|
+
"statusListId", "statusListIndex", "credentialId", "credentialHash",
|
|
9192
|
+
"correlationId", "value"
|
|
9193
|
+
)
|
|
9194
|
+
SELECT
|
|
9195
|
+
"statusListId", "statusListIndex", "credentialId", "credentialHash",
|
|
9196
|
+
"correlationId", "value"
|
|
9197
|
+
FROM "StatusListEntry"
|
|
9198
|
+
WHERE "type" = 'StatusListEntryEntity'
|
|
9199
|
+
`);
|
|
9200
|
+
await queryRunner.query(`DROP TABLE "StatusListEntry"`);
|
|
9201
|
+
await queryRunner.query(`ALTER TABLE "temporary_StatusListEntry" RENAME TO "StatusListEntry"`);
|
|
9187
9202
|
await queryRunner.query(`
|
|
9188
9203
|
CREATE TABLE "temporary_StatusList" (
|
|
9189
9204
|
"id" varchar PRIMARY KEY NOT NULL,
|
|
@@ -9193,7 +9208,7 @@ var CreateBitstringStatusListSqlite1741895823001 = class {
|
|
|
9193
9208
|
"type" varchar CHECK( "type" IN ('StatusList2021', 'OAuthStatusList') ) NOT NULL DEFAULT ('StatusList2021'),
|
|
9194
9209
|
"driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'),
|
|
9195
9210
|
"credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'),
|
|
9196
|
-
"proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt') ) NOT NULL DEFAULT ('lds'),
|
|
9211
|
+
"proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt', 'vc+jwt') ) NOT NULL DEFAULT ('lds'),
|
|
9197
9212
|
"indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ),
|
|
9198
9213
|
"statusPurpose" varchar,
|
|
9199
9214
|
"statusListCredential" text,
|
|
@@ -9307,7 +9322,7 @@ var DataStoreMigrations = [
|
|
|
9307
9322
|
];
|
|
9308
9323
|
|
|
9309
9324
|
// src/utils/digitalCredential/MappingUtils.ts
|
|
9310
|
-
var
|
|
9325
|
+
var import_ssi_types7 = require("@sphereon/ssi-types");
|
|
9311
9326
|
var import_utils = require("@veramo/utils");
|
|
9312
9327
|
var import_ssi_sdk23 = require("@sphereon/ssi-sdk.core");
|
|
9313
9328
|
function determineDocumentType(raw) {
|
|
@@ -9315,11 +9330,11 @@ function determineDocumentType(raw) {
|
|
|
9315
9330
|
if (!rawDocument) {
|
|
9316
9331
|
throw new Error(`Couldn't parse the credential: ${raw}`);
|
|
9317
9332
|
}
|
|
9318
|
-
const hasProof =
|
|
9319
|
-
const isCredential = isHex(raw) ||
|
|
9320
|
-
const isPresentation =
|
|
9333
|
+
const hasProof = import_ssi_types7.CredentialMapper.hasProof(rawDocument);
|
|
9334
|
+
const isCredential = isHex(raw) || import_ssi_types7.ObjectUtils.isBase64(raw) || import_ssi_types7.CredentialMapper.isCredential(rawDocument);
|
|
9335
|
+
const isPresentation = import_ssi_types7.CredentialMapper.isPresentation(rawDocument);
|
|
9321
9336
|
if (isCredential) {
|
|
9322
|
-
return hasProof || isHex(raw) ||
|
|
9337
|
+
return hasProof || isHex(raw) || import_ssi_types7.ObjectUtils.isBase64(raw) ? DocumentType.VC : DocumentType.C;
|
|
9323
9338
|
} else if (isPresentation) {
|
|
9324
9339
|
return hasProof ? DocumentType.VP : DocumentType.P;
|
|
9325
9340
|
}
|
|
@@ -9331,9 +9346,9 @@ function isHex(input) {
|
|
|
9331
9346
|
}
|
|
9332
9347
|
__name(isHex, "isHex");
|
|
9333
9348
|
function parseRawDocument(raw) {
|
|
9334
|
-
if (isHex(raw) ||
|
|
9349
|
+
if (isHex(raw) || import_ssi_types7.ObjectUtils.isBase64(raw)) {
|
|
9335
9350
|
return raw;
|
|
9336
|
-
} else if (
|
|
9351
|
+
} else if (import_ssi_types7.CredentialMapper.isJwtEncoded(raw) || import_ssi_types7.CredentialMapper.isSdJwtEncoded(raw)) {
|
|
9337
9352
|
return raw;
|
|
9338
9353
|
}
|
|
9339
9354
|
try {
|
|
@@ -9345,9 +9360,9 @@ function parseRawDocument(raw) {
|
|
|
9345
9360
|
__name(parseRawDocument, "parseRawDocument");
|
|
9346
9361
|
function ensureRawDocument(input) {
|
|
9347
9362
|
if (typeof input === "string") {
|
|
9348
|
-
if (isHex(input) ||
|
|
9363
|
+
if (isHex(input) || import_ssi_types7.ObjectUtils.isBase64(input)) {
|
|
9349
9364
|
return input;
|
|
9350
|
-
} else if (
|
|
9365
|
+
} else if (import_ssi_types7.CredentialMapper.isJwtEncoded(input) || import_ssi_types7.CredentialMapper.isSdJwtEncoded(input)) {
|
|
9351
9366
|
return input;
|
|
9352
9367
|
}
|
|
9353
9368
|
throw Error("Unknown input to be mapped as rawDocument");
|
|
@@ -9361,13 +9376,13 @@ function ensureRawDocument(input) {
|
|
|
9361
9376
|
__name(ensureRawDocument, "ensureRawDocument");
|
|
9362
9377
|
function determineCredentialDocumentFormat(documentFormat) {
|
|
9363
9378
|
switch (documentFormat) {
|
|
9364
|
-
case
|
|
9379
|
+
case import_ssi_types7.DocumentFormat.JSONLD:
|
|
9365
9380
|
return CredentialDocumentFormat.JSON_LD;
|
|
9366
|
-
case
|
|
9381
|
+
case import_ssi_types7.DocumentFormat.JWT:
|
|
9367
9382
|
return CredentialDocumentFormat.JWT;
|
|
9368
|
-
case
|
|
9383
|
+
case import_ssi_types7.DocumentFormat.SD_JWT_VC:
|
|
9369
9384
|
return CredentialDocumentFormat.SD_JWT;
|
|
9370
|
-
case
|
|
9385
|
+
case import_ssi_types7.DocumentFormat.MSO_MDOC:
|
|
9371
9386
|
return CredentialDocumentFormat.MSO_MDOC;
|
|
9372
9387
|
default:
|
|
9373
9388
|
throw new Error(`Not supported document format: ${documentFormat}`);
|
|
@@ -9406,14 +9421,14 @@ var safeStringify = /* @__PURE__ */ __name((object) => {
|
|
|
9406
9421
|
}, "safeStringify");
|
|
9407
9422
|
var nonPersistedDigitalCredentialEntityFromAddArgs = /* @__PURE__ */ __name((addCredentialArgs) => {
|
|
9408
9423
|
const documentType = determineDocumentType(addCredentialArgs.rawDocument);
|
|
9409
|
-
const documentFormat =
|
|
9424
|
+
const documentFormat = import_ssi_types7.CredentialMapper.detectDocumentType(addCredentialArgs.rawDocument);
|
|
9410
9425
|
const hasher = addCredentialArgs?.opts?.hasher ?? import_ssi_sdk23.defaultHasher;
|
|
9411
|
-
if (documentFormat ===
|
|
9426
|
+
if (documentFormat === import_ssi_types7.DocumentFormat.SD_JWT_VC && !addCredentialArgs.opts?.hasher) {
|
|
9412
9427
|
throw new Error("No hasher function is provided for SD_JWT credential.");
|
|
9413
9428
|
}
|
|
9414
|
-
const uniformDocument = documentType === DocumentType.VC || documentType === DocumentType.C ?
|
|
9429
|
+
const uniformDocument = documentType === DocumentType.VC || documentType === DocumentType.C ? import_ssi_types7.CredentialMapper.toUniformCredential(addCredentialArgs.rawDocument, {
|
|
9415
9430
|
hasher
|
|
9416
|
-
}) :
|
|
9431
|
+
}) : import_ssi_types7.CredentialMapper.toUniformPresentation(addCredentialArgs.rawDocument, {
|
|
9417
9432
|
hasher
|
|
9418
9433
|
});
|
|
9419
9434
|
const validFrom = getValidFrom(uniformDocument);
|