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