@sphereon/ssi-sdk.data-store 0.34.0 → 0.34.1-feature.SSISDK.17.bitstring.sl.2
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 +958 -498
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -6
- package/dist/index.d.ts +38 -6
- package/dist/index.js +848 -388
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/__tests__/statusList.entities.test.ts +58 -1
- package/src/__tests__/statusList.store.test.ts +63 -1
- package/src/entities/statusList/BitstringStatusListEntryEntity.ts +83 -0
- package/src/entities/statusList/StatusList2021EntryEntity.ts +2 -2
- package/src/entities/statusList/StatusListEntities.ts +48 -5
- package/src/index.ts +12 -2
- package/src/migrations/generic/12-CreateBitstringStatusList.ts +52 -0
- package/src/migrations/generic/index.ts +2 -1
- package/src/migrations/postgres/1741895823000-CreateBitstringStatusList.ts +54 -0
- package/src/migrations/sqlite/1741895823001-CreateBitstringStatusList.ts +103 -0
- package/src/statusList/StatusListStore.ts +3 -1
- package/src/types/statusList/statusList.ts +17 -2
- package/src/utils/statusList/MappingUtils.ts +36 -2
package/dist/index.js
CHANGED
|
@@ -2745,7 +2745,7 @@ _ts_decorate26([
|
|
|
2745
2745
|
_ts_metadata25("design:type", Number)
|
|
2746
2746
|
], StatusListEntryEntity.prototype, "statusListIndex", void 0);
|
|
2747
2747
|
_ts_decorate26([
|
|
2748
|
-
ManyToOne11(() =>
|
|
2748
|
+
ManyToOne11(() => StatusList2021Entity, (statusList) => statusList.statusListEntries),
|
|
2749
2749
|
JoinColumn13({
|
|
2750
2750
|
name: "statusListId"
|
|
2751
2751
|
}),
|
|
@@ -2795,6 +2795,11 @@ StatusListEntryEntity = _ts_decorate26([
|
|
|
2795
2795
|
|
|
2796
2796
|
// src/entities/statusList/StatusListEntities.ts
|
|
2797
2797
|
import { typeOrmDateTime as typeOrmDateTime13 } from "@sphereon/ssi-sdk.agent-config";
|
|
2798
|
+
|
|
2799
|
+
// src/entities/statusList/BitstringStatusListEntryEntity.ts
|
|
2800
|
+
import { Validate as Validate10 } from "class-validator";
|
|
2801
|
+
import { BaseEntity as BaseEntity20, Column as Column24, Entity as Entity22, JoinColumn as JoinColumn14, ManyToOne as ManyToOne12, PrimaryColumn as PrimaryColumn2 } from "typeorm";
|
|
2802
|
+
import { BitstringStatusPurpose } from "@sphereon/ssi-types";
|
|
2798
2803
|
function _ts_decorate27(decorators, target, key, desc) {
|
|
2799
2804
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2800
2805
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2806,8 +2811,162 @@ function _ts_metadata26(k, v) {
|
|
|
2806
2811
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2807
2812
|
}
|
|
2808
2813
|
__name(_ts_metadata26, "_ts_metadata");
|
|
2809
|
-
var
|
|
2810
|
-
|
|
2814
|
+
var BitstringStatusListEntryEntity = class extends BaseEntity20 {
|
|
2815
|
+
static {
|
|
2816
|
+
__name(this, "BitstringStatusListEntryEntity");
|
|
2817
|
+
}
|
|
2818
|
+
statusListId;
|
|
2819
|
+
statusListIndex;
|
|
2820
|
+
statusList;
|
|
2821
|
+
credentialId;
|
|
2822
|
+
credentialHash;
|
|
2823
|
+
entryCorrelationId;
|
|
2824
|
+
statusPurpose;
|
|
2825
|
+
statusSize;
|
|
2826
|
+
statusMessage;
|
|
2827
|
+
statusReference;
|
|
2828
|
+
};
|
|
2829
|
+
_ts_decorate27([
|
|
2830
|
+
PrimaryColumn2({
|
|
2831
|
+
name: "statusListId",
|
|
2832
|
+
type: "varchar",
|
|
2833
|
+
nullable: false,
|
|
2834
|
+
unique: false
|
|
2835
|
+
}),
|
|
2836
|
+
Validate10(IsNonEmptyStringConstraint, {
|
|
2837
|
+
message: "Status list id is required"
|
|
2838
|
+
}),
|
|
2839
|
+
_ts_metadata26("design:type", String)
|
|
2840
|
+
], BitstringStatusListEntryEntity.prototype, "statusListId", void 0);
|
|
2841
|
+
_ts_decorate27([
|
|
2842
|
+
PrimaryColumn2({
|
|
2843
|
+
name: "statusListIndex",
|
|
2844
|
+
type: "integer",
|
|
2845
|
+
nullable: false,
|
|
2846
|
+
unique: false
|
|
2847
|
+
}),
|
|
2848
|
+
_ts_metadata26("design:type", Number)
|
|
2849
|
+
], BitstringStatusListEntryEntity.prototype, "statusListIndex", void 0);
|
|
2850
|
+
_ts_decorate27([
|
|
2851
|
+
ManyToOne12(() => BitstringStatusListEntity, (statusList) => statusList.statusListEntries),
|
|
2852
|
+
JoinColumn14({
|
|
2853
|
+
name: "statusListId"
|
|
2854
|
+
}),
|
|
2855
|
+
_ts_metadata26("design:type", typeof BitstringStatusListEntity === "undefined" ? Object : BitstringStatusListEntity)
|
|
2856
|
+
], BitstringStatusListEntryEntity.prototype, "statusList", void 0);
|
|
2857
|
+
_ts_decorate27([
|
|
2858
|
+
Column24({
|
|
2859
|
+
name: "credentialId",
|
|
2860
|
+
type: "text",
|
|
2861
|
+
nullable: true
|
|
2862
|
+
}),
|
|
2863
|
+
_ts_metadata26("design:type", String)
|
|
2864
|
+
], BitstringStatusListEntryEntity.prototype, "credentialId", void 0);
|
|
2865
|
+
_ts_decorate27([
|
|
2866
|
+
Column24({
|
|
2867
|
+
name: "credentialHash",
|
|
2868
|
+
length: 128,
|
|
2869
|
+
type: "varchar",
|
|
2870
|
+
nullable: true,
|
|
2871
|
+
unique: false
|
|
2872
|
+
}),
|
|
2873
|
+
_ts_metadata26("design:type", String)
|
|
2874
|
+
], BitstringStatusListEntryEntity.prototype, "credentialHash", void 0);
|
|
2875
|
+
_ts_decorate27([
|
|
2876
|
+
Column24({
|
|
2877
|
+
name: "correlationId",
|
|
2878
|
+
length: 255,
|
|
2879
|
+
type: "varchar",
|
|
2880
|
+
nullable: true,
|
|
2881
|
+
unique: false
|
|
2882
|
+
}),
|
|
2883
|
+
_ts_metadata26("design:type", String)
|
|
2884
|
+
], BitstringStatusListEntryEntity.prototype, "entryCorrelationId", void 0);
|
|
2885
|
+
_ts_decorate27([
|
|
2886
|
+
Column24({
|
|
2887
|
+
type: "varchar",
|
|
2888
|
+
name: "statusPurpose",
|
|
2889
|
+
nullable: false
|
|
2890
|
+
}),
|
|
2891
|
+
_ts_metadata26("design:type", typeof BitstringStatusPurpose === "undefined" ? Object : BitstringStatusPurpose)
|
|
2892
|
+
], BitstringStatusListEntryEntity.prototype, "statusPurpose", void 0);
|
|
2893
|
+
_ts_decorate27([
|
|
2894
|
+
Column24({
|
|
2895
|
+
type: "integer",
|
|
2896
|
+
name: "statusSize",
|
|
2897
|
+
nullable: true,
|
|
2898
|
+
default: 1
|
|
2899
|
+
}),
|
|
2900
|
+
_ts_metadata26("design:type", Number)
|
|
2901
|
+
], BitstringStatusListEntryEntity.prototype, "statusSize", void 0);
|
|
2902
|
+
_ts_decorate27([
|
|
2903
|
+
Column24({
|
|
2904
|
+
type: "text",
|
|
2905
|
+
name: "statusMessage",
|
|
2906
|
+
nullable: true,
|
|
2907
|
+
transformer: {
|
|
2908
|
+
from(value) {
|
|
2909
|
+
if (!value) {
|
|
2910
|
+
return void 0;
|
|
2911
|
+
}
|
|
2912
|
+
return JSON.parse(value);
|
|
2913
|
+
},
|
|
2914
|
+
to(value) {
|
|
2915
|
+
if (!value) {
|
|
2916
|
+
return void 0;
|
|
2917
|
+
}
|
|
2918
|
+
return JSON.stringify(value);
|
|
2919
|
+
}
|
|
2920
|
+
}
|
|
2921
|
+
}),
|
|
2922
|
+
_ts_metadata26("design:type", typeof Array === "undefined" ? Object : Array)
|
|
2923
|
+
], BitstringStatusListEntryEntity.prototype, "statusMessage", void 0);
|
|
2924
|
+
_ts_decorate27([
|
|
2925
|
+
Column24({
|
|
2926
|
+
type: "text",
|
|
2927
|
+
name: "statusReference",
|
|
2928
|
+
nullable: true,
|
|
2929
|
+
transformer: {
|
|
2930
|
+
from(value) {
|
|
2931
|
+
if (!value) {
|
|
2932
|
+
return void 0;
|
|
2933
|
+
}
|
|
2934
|
+
if (value.startsWith("[")) {
|
|
2935
|
+
return JSON.parse(value);
|
|
2936
|
+
}
|
|
2937
|
+
return value;
|
|
2938
|
+
},
|
|
2939
|
+
to(value) {
|
|
2940
|
+
if (!value) {
|
|
2941
|
+
return void 0;
|
|
2942
|
+
}
|
|
2943
|
+
if (Array.isArray(value)) {
|
|
2944
|
+
return JSON.stringify(value);
|
|
2945
|
+
}
|
|
2946
|
+
return value;
|
|
2947
|
+
}
|
|
2948
|
+
}
|
|
2949
|
+
}),
|
|
2950
|
+
_ts_metadata26("design:type", Object)
|
|
2951
|
+
], BitstringStatusListEntryEntity.prototype, "statusReference", void 0);
|
|
2952
|
+
BitstringStatusListEntryEntity = _ts_decorate27([
|
|
2953
|
+
Entity22("BitstringStatusListEntry")
|
|
2954
|
+
], BitstringStatusListEntryEntity);
|
|
2955
|
+
|
|
2956
|
+
// src/entities/statusList/StatusListEntities.ts
|
|
2957
|
+
function _ts_decorate28(decorators, target, key, desc) {
|
|
2958
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2959
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2960
|
+
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;
|
|
2961
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2962
|
+
}
|
|
2963
|
+
__name(_ts_decorate28, "_ts_decorate");
|
|
2964
|
+
function _ts_metadata27(k, v) {
|
|
2965
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2966
|
+
}
|
|
2967
|
+
__name(_ts_metadata27, "_ts_metadata");
|
|
2968
|
+
var { BaseEntity: BaseEntity21, ChildEntity: ChildEntity5, Column: Column25, Entity: Entity23, OneToMany: OneToMany8, PrimaryColumn: PrimaryColumn3, TableInheritance: TableInheritance4, Unique } = typeorm9;
|
|
2969
|
+
var StatusListEntity = class extends BaseEntity21 {
|
|
2811
2970
|
static {
|
|
2812
2971
|
__name(this, "StatusListEntity");
|
|
2813
2972
|
}
|
|
@@ -2819,34 +2978,33 @@ var StatusListEntity = class extends BaseEntity20 {
|
|
|
2819
2978
|
credentialIdMode;
|
|
2820
2979
|
proofFormat;
|
|
2821
2980
|
statusListCredential;
|
|
2822
|
-
statusListEntries;
|
|
2823
2981
|
};
|
|
2824
|
-
|
|
2825
|
-
|
|
2982
|
+
_ts_decorate28([
|
|
2983
|
+
PrimaryColumn3({
|
|
2826
2984
|
name: "id",
|
|
2827
2985
|
type: "varchar"
|
|
2828
2986
|
}),
|
|
2829
|
-
|
|
2987
|
+
_ts_metadata27("design:type", String)
|
|
2830
2988
|
], StatusListEntity.prototype, "id", void 0);
|
|
2831
|
-
|
|
2832
|
-
|
|
2989
|
+
_ts_decorate28([
|
|
2990
|
+
Column25({
|
|
2833
2991
|
name: "correlationId",
|
|
2834
2992
|
type: "varchar",
|
|
2835
2993
|
nullable: false
|
|
2836
2994
|
}),
|
|
2837
|
-
|
|
2995
|
+
_ts_metadata27("design:type", String)
|
|
2838
2996
|
], StatusListEntity.prototype, "correlationId", void 0);
|
|
2839
|
-
|
|
2840
|
-
|
|
2997
|
+
_ts_decorate28([
|
|
2998
|
+
Column25({
|
|
2841
2999
|
name: "length",
|
|
2842
3000
|
type: "integer",
|
|
2843
3001
|
nullable: false,
|
|
2844
3002
|
unique: false
|
|
2845
3003
|
}),
|
|
2846
|
-
|
|
3004
|
+
_ts_metadata27("design:type", Number)
|
|
2847
3005
|
], StatusListEntity.prototype, "length", void 0);
|
|
2848
|
-
|
|
2849
|
-
|
|
3006
|
+
_ts_decorate28([
|
|
3007
|
+
Column25({
|
|
2850
3008
|
name: "issuer",
|
|
2851
3009
|
type: "text",
|
|
2852
3010
|
nullable: false,
|
|
@@ -2866,28 +3024,28 @@ _ts_decorate27([
|
|
|
2866
3024
|
}
|
|
2867
3025
|
}
|
|
2868
3026
|
}),
|
|
2869
|
-
|
|
3027
|
+
_ts_metadata27("design:type", Object)
|
|
2870
3028
|
], StatusListEntity.prototype, "issuer", void 0);
|
|
2871
|
-
|
|
2872
|
-
|
|
3029
|
+
_ts_decorate28([
|
|
3030
|
+
Column25("simple-enum", {
|
|
2873
3031
|
name: "driverType",
|
|
2874
3032
|
enum: StatusListDriverType,
|
|
2875
3033
|
nullable: false,
|
|
2876
3034
|
default: StatusListDriverType.AGENT_TYPEORM
|
|
2877
3035
|
}),
|
|
2878
|
-
|
|
3036
|
+
_ts_metadata27("design:type", typeof StatusListDriverType === "undefined" ? Object : StatusListDriverType)
|
|
2879
3037
|
], StatusListEntity.prototype, "driverType", void 0);
|
|
2880
|
-
|
|
2881
|
-
|
|
3038
|
+
_ts_decorate28([
|
|
3039
|
+
Column25("simple-enum", {
|
|
2882
3040
|
name: "credentialIdMode",
|
|
2883
3041
|
enum: StatusListCredentialIdMode,
|
|
2884
3042
|
nullable: false,
|
|
2885
3043
|
default: StatusListCredentialIdMode.ISSUANCE
|
|
2886
3044
|
}),
|
|
2887
|
-
|
|
3045
|
+
_ts_metadata27("design:type", typeof StatusListCredentialIdMode === "undefined" ? Object : StatusListCredentialIdMode)
|
|
2888
3046
|
], StatusListEntity.prototype, "credentialIdMode", void 0);
|
|
2889
|
-
|
|
2890
|
-
|
|
3047
|
+
_ts_decorate28([
|
|
3048
|
+
Column25({
|
|
2891
3049
|
type: "varchar",
|
|
2892
3050
|
name: "proofFormat",
|
|
2893
3051
|
enum: [
|
|
@@ -2897,10 +3055,10 @@ _ts_decorate27([
|
|
|
2897
3055
|
nullable: false,
|
|
2898
3056
|
default: "lds"
|
|
2899
3057
|
}),
|
|
2900
|
-
|
|
3058
|
+
_ts_metadata27("design:type", typeof CredentialProofFormat === "undefined" ? Object : CredentialProofFormat)
|
|
2901
3059
|
], StatusListEntity.prototype, "proofFormat", void 0);
|
|
2902
|
-
|
|
2903
|
-
|
|
3060
|
+
_ts_decorate28([
|
|
3061
|
+
Column25({
|
|
2904
3062
|
name: "statusListCredential",
|
|
2905
3063
|
type: "text",
|
|
2906
3064
|
nullable: true,
|
|
@@ -2920,14 +3078,10 @@ _ts_decorate27([
|
|
|
2920
3078
|
}
|
|
2921
3079
|
}
|
|
2922
3080
|
}),
|
|
2923
|
-
|
|
3081
|
+
_ts_metadata27("design:type", typeof StatusListCredential === "undefined" ? Object : StatusListCredential)
|
|
2924
3082
|
], StatusListEntity.prototype, "statusListCredential", void 0);
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
_ts_metadata26("design:type", Array)
|
|
2928
|
-
], StatusListEntity.prototype, "statusListEntries", void 0);
|
|
2929
|
-
StatusListEntity = _ts_decorate27([
|
|
2930
|
-
Entity22("StatusList"),
|
|
3083
|
+
StatusListEntity = _ts_decorate28([
|
|
3084
|
+
Entity23("StatusList"),
|
|
2931
3085
|
Unique("UQ_correlationId", [
|
|
2932
3086
|
"correlationId"
|
|
2933
3087
|
]),
|
|
@@ -2945,9 +3099,10 @@ var StatusList2021Entity = class extends StatusListEntity {
|
|
|
2945
3099
|
}
|
|
2946
3100
|
indexingDirection;
|
|
2947
3101
|
statusPurpose;
|
|
3102
|
+
statusListEntries;
|
|
2948
3103
|
};
|
|
2949
|
-
|
|
2950
|
-
|
|
3104
|
+
_ts_decorate28([
|
|
3105
|
+
Column25({
|
|
2951
3106
|
type: "varchar",
|
|
2952
3107
|
name: "indexingDirection",
|
|
2953
3108
|
enum: [
|
|
@@ -2956,18 +3111,22 @@ _ts_decorate27([
|
|
|
2956
3111
|
nullable: false,
|
|
2957
3112
|
default: "rightToLeft"
|
|
2958
3113
|
}),
|
|
2959
|
-
|
|
3114
|
+
_ts_metadata27("design:type", typeof StatusListIndexingDirection === "undefined" ? Object : StatusListIndexingDirection)
|
|
2960
3115
|
], StatusList2021Entity.prototype, "indexingDirection", void 0);
|
|
2961
|
-
|
|
2962
|
-
|
|
3116
|
+
_ts_decorate28([
|
|
3117
|
+
Column25({
|
|
2963
3118
|
type: "varchar",
|
|
2964
3119
|
name: "statusPurpose",
|
|
2965
3120
|
nullable: false,
|
|
2966
3121
|
default: "revocation"
|
|
2967
3122
|
}),
|
|
2968
|
-
|
|
3123
|
+
_ts_metadata27("design:type", typeof StatusPurpose2021 === "undefined" ? Object : StatusPurpose2021)
|
|
2969
3124
|
], StatusList2021Entity.prototype, "statusPurpose", void 0);
|
|
2970
|
-
|
|
3125
|
+
_ts_decorate28([
|
|
3126
|
+
OneToMany8((type) => StatusListEntryEntity, (entry) => entry.statusList),
|
|
3127
|
+
_ts_metadata27("design:type", Array)
|
|
3128
|
+
], StatusList2021Entity.prototype, "statusListEntries", void 0);
|
|
3129
|
+
StatusList2021Entity = _ts_decorate28([
|
|
2971
3130
|
ChildEntity5(StatusListType.StatusList2021)
|
|
2972
3131
|
], StatusList2021Entity);
|
|
2973
3132
|
var OAuthStatusListEntity = class extends StatusListEntity {
|
|
@@ -2977,41 +3136,114 @@ var OAuthStatusListEntity = class extends StatusListEntity {
|
|
|
2977
3136
|
bitsPerStatus;
|
|
2978
3137
|
expiresAt;
|
|
2979
3138
|
};
|
|
2980
|
-
|
|
2981
|
-
|
|
3139
|
+
_ts_decorate28([
|
|
3140
|
+
Column25({
|
|
2982
3141
|
type: "integer",
|
|
2983
3142
|
name: "bitsPerStatus",
|
|
2984
3143
|
nullable: false
|
|
2985
3144
|
}),
|
|
2986
|
-
|
|
3145
|
+
_ts_metadata27("design:type", Number)
|
|
2987
3146
|
], OAuthStatusListEntity.prototype, "bitsPerStatus", void 0);
|
|
2988
|
-
|
|
2989
|
-
|
|
3147
|
+
_ts_decorate28([
|
|
3148
|
+
Column25({
|
|
2990
3149
|
name: "expiresAt",
|
|
2991
3150
|
nullable: true,
|
|
2992
3151
|
type: typeOrmDateTime13()
|
|
2993
3152
|
}),
|
|
2994
|
-
|
|
3153
|
+
_ts_metadata27("design:type", typeof Date === "undefined" ? Object : Date)
|
|
2995
3154
|
], OAuthStatusListEntity.prototype, "expiresAt", void 0);
|
|
2996
|
-
OAuthStatusListEntity =
|
|
3155
|
+
OAuthStatusListEntity = _ts_decorate28([
|
|
2997
3156
|
ChildEntity5(StatusListType.OAuthStatusList)
|
|
2998
3157
|
], OAuthStatusListEntity);
|
|
3158
|
+
var BitstringStatusListEntity = class extends StatusListEntity {
|
|
3159
|
+
static {
|
|
3160
|
+
__name(this, "BitstringStatusListEntity");
|
|
3161
|
+
}
|
|
3162
|
+
statusPurpose;
|
|
3163
|
+
statusSize;
|
|
3164
|
+
validFrom;
|
|
3165
|
+
validUntil;
|
|
3166
|
+
ttl;
|
|
3167
|
+
statusListEntries;
|
|
3168
|
+
};
|
|
3169
|
+
_ts_decorate28([
|
|
3170
|
+
Column25({
|
|
3171
|
+
type: "varchar",
|
|
3172
|
+
name: "statusPurpose",
|
|
3173
|
+
nullable: false,
|
|
3174
|
+
transformer: {
|
|
3175
|
+
from(value) {
|
|
3176
|
+
if (value?.includes(",")) {
|
|
3177
|
+
return value.split(",").map((v) => v.trim());
|
|
3178
|
+
}
|
|
3179
|
+
return value;
|
|
3180
|
+
},
|
|
3181
|
+
to(value) {
|
|
3182
|
+
if (Array.isArray(value)) {
|
|
3183
|
+
return value.join(",");
|
|
3184
|
+
}
|
|
3185
|
+
return value;
|
|
3186
|
+
}
|
|
3187
|
+
}
|
|
3188
|
+
}),
|
|
3189
|
+
_ts_metadata27("design:type", Object)
|
|
3190
|
+
], BitstringStatusListEntity.prototype, "statusPurpose", void 0);
|
|
3191
|
+
_ts_decorate28([
|
|
3192
|
+
Column25({
|
|
3193
|
+
type: "integer",
|
|
3194
|
+
name: "statusSize",
|
|
3195
|
+
nullable: true,
|
|
3196
|
+
default: 1
|
|
3197
|
+
}),
|
|
3198
|
+
_ts_metadata27("design:type", Number)
|
|
3199
|
+
], BitstringStatusListEntity.prototype, "statusSize", void 0);
|
|
3200
|
+
_ts_decorate28([
|
|
3201
|
+
Column25({
|
|
3202
|
+
name: "validFrom",
|
|
3203
|
+
nullable: true,
|
|
3204
|
+
type: typeOrmDateTime13()
|
|
3205
|
+
}),
|
|
3206
|
+
_ts_metadata27("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3207
|
+
], BitstringStatusListEntity.prototype, "validFrom", void 0);
|
|
3208
|
+
_ts_decorate28([
|
|
3209
|
+
Column25({
|
|
3210
|
+
name: "validUntil",
|
|
3211
|
+
nullable: true,
|
|
3212
|
+
type: typeOrmDateTime13()
|
|
3213
|
+
}),
|
|
3214
|
+
_ts_metadata27("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3215
|
+
], BitstringStatusListEntity.prototype, "validUntil", void 0);
|
|
3216
|
+
_ts_decorate28([
|
|
3217
|
+
Column25({
|
|
3218
|
+
type: "integer",
|
|
3219
|
+
name: "ttl",
|
|
3220
|
+
nullable: true
|
|
3221
|
+
}),
|
|
3222
|
+
_ts_metadata27("design:type", Number)
|
|
3223
|
+
], BitstringStatusListEntity.prototype, "ttl", void 0);
|
|
3224
|
+
_ts_decorate28([
|
|
3225
|
+
OneToMany8((type) => BitstringStatusListEntryEntity, (entry) => entry.statusList),
|
|
3226
|
+
_ts_metadata27("design:type", Array)
|
|
3227
|
+
], BitstringStatusListEntity.prototype, "statusListEntries", void 0);
|
|
3228
|
+
BitstringStatusListEntity = _ts_decorate28([
|
|
3229
|
+
ChildEntity5(StatusListType.BitstringStatusList)
|
|
3230
|
+
], BitstringStatusListEntity);
|
|
2999
3231
|
|
|
3000
3232
|
// src/entities/machineState/MachineStateInfoEntity.ts
|
|
3001
|
-
import { BaseEntity as
|
|
3233
|
+
import { BaseEntity as BaseEntity22, Column as Column26, CreateDateColumn as CreateDateColumn11, Entity as Entity24, PrimaryColumn as PrimaryColumn4, UpdateDateColumn as UpdateDateColumn11 } from "typeorm";
|
|
3002
3234
|
import { typeOrmDateTime as typeOrmDateTime14 } from "@sphereon/ssi-sdk.agent-config";
|
|
3003
|
-
function
|
|
3235
|
+
function _ts_decorate29(decorators, target, key, desc) {
|
|
3004
3236
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3005
3237
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3006
3238
|
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;
|
|
3007
3239
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3008
3240
|
}
|
|
3009
|
-
__name(
|
|
3010
|
-
function
|
|
3241
|
+
__name(_ts_decorate29, "_ts_decorate");
|
|
3242
|
+
function _ts_metadata28(k, v) {
|
|
3011
3243
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3012
3244
|
}
|
|
3013
|
-
__name(
|
|
3014
|
-
var MachineStateInfoEntity = class extends
|
|
3245
|
+
__name(_ts_metadata28, "_ts_metadata");
|
|
3246
|
+
var MachineStateInfoEntity = class extends BaseEntity22 {
|
|
3015
3247
|
static {
|
|
3016
3248
|
__name(this, "MachineStateInfoEntity");
|
|
3017
3249
|
}
|
|
@@ -3029,120 +3261,120 @@ var MachineStateInfoEntity = class extends BaseEntity21 {
|
|
|
3029
3261
|
completedAt;
|
|
3030
3262
|
tenantId;
|
|
3031
3263
|
};
|
|
3032
|
-
|
|
3033
|
-
|
|
3264
|
+
_ts_decorate29([
|
|
3265
|
+
PrimaryColumn4({
|
|
3034
3266
|
name: "instance_id",
|
|
3035
3267
|
type: "varchar",
|
|
3036
3268
|
nullable: false
|
|
3037
3269
|
}),
|
|
3038
|
-
|
|
3270
|
+
_ts_metadata28("design:type", String)
|
|
3039
3271
|
], MachineStateInfoEntity.prototype, "instanceId", void 0);
|
|
3040
|
-
|
|
3041
|
-
|
|
3272
|
+
_ts_decorate29([
|
|
3273
|
+
Column26({
|
|
3042
3274
|
name: "session_id",
|
|
3043
3275
|
type: "varchar",
|
|
3044
3276
|
nullable: true
|
|
3045
3277
|
}),
|
|
3046
|
-
|
|
3278
|
+
_ts_metadata28("design:type", String)
|
|
3047
3279
|
], MachineStateInfoEntity.prototype, "sessionId", void 0);
|
|
3048
|
-
|
|
3049
|
-
|
|
3280
|
+
_ts_decorate29([
|
|
3281
|
+
Column26({
|
|
3050
3282
|
name: "machine_name",
|
|
3051
3283
|
type: "varchar",
|
|
3052
3284
|
nullable: false
|
|
3053
3285
|
}),
|
|
3054
|
-
|
|
3286
|
+
_ts_metadata28("design:type", String)
|
|
3055
3287
|
], MachineStateInfoEntity.prototype, "machineName", void 0);
|
|
3056
|
-
|
|
3057
|
-
|
|
3288
|
+
_ts_decorate29([
|
|
3289
|
+
Column26({
|
|
3058
3290
|
name: "latest_state_name",
|
|
3059
3291
|
type: "varchar",
|
|
3060
3292
|
nullable: true
|
|
3061
3293
|
}),
|
|
3062
|
-
|
|
3294
|
+
_ts_metadata28("design:type", String)
|
|
3063
3295
|
], MachineStateInfoEntity.prototype, "latestStateName", void 0);
|
|
3064
|
-
|
|
3065
|
-
|
|
3296
|
+
_ts_decorate29([
|
|
3297
|
+
Column26({
|
|
3066
3298
|
name: "latest_event_type",
|
|
3067
3299
|
type: "varchar",
|
|
3068
3300
|
nullable: false
|
|
3069
3301
|
}),
|
|
3070
|
-
|
|
3302
|
+
_ts_metadata28("design:type", String)
|
|
3071
3303
|
], MachineStateInfoEntity.prototype, "latestEventType", void 0);
|
|
3072
|
-
|
|
3073
|
-
|
|
3304
|
+
_ts_decorate29([
|
|
3305
|
+
Column26({
|
|
3074
3306
|
name: "state",
|
|
3075
3307
|
type: "text",
|
|
3076
3308
|
nullable: false
|
|
3077
3309
|
}),
|
|
3078
|
-
|
|
3310
|
+
_ts_metadata28("design:type", String)
|
|
3079
3311
|
], MachineStateInfoEntity.prototype, "state", void 0);
|
|
3080
|
-
|
|
3312
|
+
_ts_decorate29([
|
|
3081
3313
|
CreateDateColumn11({
|
|
3082
3314
|
name: "created_at",
|
|
3083
3315
|
nullable: false,
|
|
3084
3316
|
type: typeOrmDateTime14()
|
|
3085
3317
|
}),
|
|
3086
|
-
|
|
3318
|
+
_ts_metadata28("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3087
3319
|
], MachineStateInfoEntity.prototype, "createdAt", void 0);
|
|
3088
|
-
|
|
3320
|
+
_ts_decorate29([
|
|
3089
3321
|
UpdateDateColumn11({
|
|
3090
3322
|
name: "updated_at",
|
|
3091
3323
|
nullable: false,
|
|
3092
3324
|
type: typeOrmDateTime14()
|
|
3093
3325
|
}),
|
|
3094
|
-
|
|
3326
|
+
_ts_metadata28("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3095
3327
|
], MachineStateInfoEntity.prototype, "updatedAt", void 0);
|
|
3096
|
-
|
|
3097
|
-
|
|
3328
|
+
_ts_decorate29([
|
|
3329
|
+
Column26({
|
|
3098
3330
|
name: "updated_count",
|
|
3099
3331
|
type: "integer",
|
|
3100
3332
|
nullable: false
|
|
3101
3333
|
}),
|
|
3102
|
-
|
|
3334
|
+
_ts_metadata28("design:type", Number)
|
|
3103
3335
|
], MachineStateInfoEntity.prototype, "updatedCount", void 0);
|
|
3104
|
-
|
|
3105
|
-
|
|
3336
|
+
_ts_decorate29([
|
|
3337
|
+
Column26({
|
|
3106
3338
|
name: "expires_at",
|
|
3107
3339
|
nullable: true,
|
|
3108
3340
|
type: typeOrmDateTime14()
|
|
3109
3341
|
}),
|
|
3110
|
-
|
|
3342
|
+
_ts_metadata28("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3111
3343
|
], MachineStateInfoEntity.prototype, "expiresAt", void 0);
|
|
3112
|
-
|
|
3113
|
-
|
|
3344
|
+
_ts_decorate29([
|
|
3345
|
+
Column26({
|
|
3114
3346
|
name: "completed_at",
|
|
3115
3347
|
nullable: true,
|
|
3116
3348
|
type: typeOrmDateTime14()
|
|
3117
3349
|
}),
|
|
3118
|
-
|
|
3350
|
+
_ts_metadata28("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3119
3351
|
], MachineStateInfoEntity.prototype, "completedAt", void 0);
|
|
3120
|
-
|
|
3121
|
-
|
|
3352
|
+
_ts_decorate29([
|
|
3353
|
+
Column26({
|
|
3122
3354
|
name: "tenant_id",
|
|
3123
3355
|
type: "varchar",
|
|
3124
3356
|
nullable: true
|
|
3125
3357
|
}),
|
|
3126
|
-
|
|
3358
|
+
_ts_metadata28("design:type", String)
|
|
3127
3359
|
], MachineStateInfoEntity.prototype, "tenantId", void 0);
|
|
3128
|
-
MachineStateInfoEntity =
|
|
3129
|
-
|
|
3360
|
+
MachineStateInfoEntity = _ts_decorate29([
|
|
3361
|
+
Entity24("MachineStateInfoEntity")
|
|
3130
3362
|
], MachineStateInfoEntity);
|
|
3131
3363
|
|
|
3132
3364
|
// src/entities/contact/OrganizationEntity.ts
|
|
3133
3365
|
import { IsNotEmpty as IsNotEmpty10, validate as validate16 } from "class-validator";
|
|
3134
|
-
import { BeforeInsert as BeforeInsert18, BeforeUpdate as BeforeUpdate18, ChildEntity as ChildEntity6, Column as
|
|
3135
|
-
function
|
|
3366
|
+
import { BeforeInsert as BeforeInsert18, BeforeUpdate as BeforeUpdate18, ChildEntity as ChildEntity6, Column as Column27 } from "typeorm";
|
|
3367
|
+
function _ts_decorate30(decorators, target, key, desc) {
|
|
3136
3368
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3137
3369
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3138
3370
|
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;
|
|
3139
3371
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3140
3372
|
}
|
|
3141
|
-
__name(
|
|
3142
|
-
function
|
|
3373
|
+
__name(_ts_decorate30, "_ts_decorate");
|
|
3374
|
+
function _ts_metadata29(k, v) {
|
|
3143
3375
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3144
3376
|
}
|
|
3145
|
-
__name(
|
|
3377
|
+
__name(_ts_metadata29, "_ts_metadata");
|
|
3146
3378
|
var OrganizationEntity = class extends BaseContactEntity {
|
|
3147
3379
|
static {
|
|
3148
3380
|
__name(this, "OrganizationEntity");
|
|
@@ -3162,8 +3394,8 @@ var OrganizationEntity = class extends BaseContactEntity {
|
|
|
3162
3394
|
}
|
|
3163
3395
|
}
|
|
3164
3396
|
};
|
|
3165
|
-
|
|
3166
|
-
|
|
3397
|
+
_ts_decorate30([
|
|
3398
|
+
Column27("varchar", {
|
|
3167
3399
|
name: "legal_name",
|
|
3168
3400
|
length: 255,
|
|
3169
3401
|
nullable: false,
|
|
@@ -3172,10 +3404,10 @@ _ts_decorate29([
|
|
|
3172
3404
|
IsNotEmpty10({
|
|
3173
3405
|
message: "Blank legal names are not allowed"
|
|
3174
3406
|
}),
|
|
3175
|
-
|
|
3407
|
+
_ts_metadata29("design:type", String)
|
|
3176
3408
|
], OrganizationEntity.prototype, "legalName", void 0);
|
|
3177
|
-
|
|
3178
|
-
|
|
3409
|
+
_ts_decorate30([
|
|
3410
|
+
Column27("varchar", {
|
|
3179
3411
|
name: "display_name",
|
|
3180
3412
|
length: 255,
|
|
3181
3413
|
nullable: false,
|
|
@@ -3184,47 +3416,47 @@ _ts_decorate29([
|
|
|
3184
3416
|
IsNotEmpty10({
|
|
3185
3417
|
message: "Blank display names are not allowed"
|
|
3186
3418
|
}),
|
|
3187
|
-
|
|
3419
|
+
_ts_metadata29("design:type", String)
|
|
3188
3420
|
], OrganizationEntity.prototype, "displayName", void 0);
|
|
3189
|
-
|
|
3190
|
-
|
|
3421
|
+
_ts_decorate30([
|
|
3422
|
+
Column27("text", {
|
|
3191
3423
|
name: "owner_id",
|
|
3192
3424
|
nullable: true
|
|
3193
3425
|
}),
|
|
3194
|
-
|
|
3426
|
+
_ts_metadata29("design:type", String)
|
|
3195
3427
|
], OrganizationEntity.prototype, "ownerId", void 0);
|
|
3196
|
-
|
|
3197
|
-
|
|
3428
|
+
_ts_decorate30([
|
|
3429
|
+
Column27("text", {
|
|
3198
3430
|
name: "tenant_id",
|
|
3199
3431
|
nullable: true
|
|
3200
3432
|
}),
|
|
3201
|
-
|
|
3433
|
+
_ts_metadata29("design:type", String)
|
|
3202
3434
|
], OrganizationEntity.prototype, "tenantId", void 0);
|
|
3203
|
-
|
|
3435
|
+
_ts_decorate30([
|
|
3204
3436
|
BeforeInsert18(),
|
|
3205
3437
|
BeforeUpdate18(),
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3438
|
+
_ts_metadata29("design:type", Function),
|
|
3439
|
+
_ts_metadata29("design:paramtypes", []),
|
|
3440
|
+
_ts_metadata29("design:returntype", Promise)
|
|
3209
3441
|
], OrganizationEntity.prototype, "validate", null);
|
|
3210
|
-
OrganizationEntity =
|
|
3442
|
+
OrganizationEntity = _ts_decorate30([
|
|
3211
3443
|
ChildEntity6("Organization")
|
|
3212
3444
|
], OrganizationEntity);
|
|
3213
3445
|
|
|
3214
3446
|
// src/entities/contact/NaturalPersonEntity.ts
|
|
3215
|
-
import { Column as
|
|
3216
|
-
import { validate as validate17, IsNotEmpty as IsNotEmpty11, Validate as
|
|
3217
|
-
function
|
|
3447
|
+
import { Column as Column28, ChildEntity as ChildEntity7, BeforeInsert as BeforeInsert19, BeforeUpdate as BeforeUpdate19 } from "typeorm";
|
|
3448
|
+
import { validate as validate17, IsNotEmpty as IsNotEmpty11, Validate as Validate11 } from "class-validator";
|
|
3449
|
+
function _ts_decorate31(decorators, target, key, desc) {
|
|
3218
3450
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3219
3451
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3220
3452
|
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;
|
|
3221
3453
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3222
3454
|
}
|
|
3223
|
-
__name(
|
|
3224
|
-
function
|
|
3455
|
+
__name(_ts_decorate31, "_ts_decorate");
|
|
3456
|
+
function _ts_metadata30(k, v) {
|
|
3225
3457
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3226
3458
|
}
|
|
3227
|
-
__name(
|
|
3459
|
+
__name(_ts_metadata30, "_ts_metadata");
|
|
3228
3460
|
var NaturalPersonEntity = class extends BaseContactEntity {
|
|
3229
3461
|
static {
|
|
3230
3462
|
__name(this, "NaturalPersonEntity");
|
|
@@ -3246,8 +3478,8 @@ var NaturalPersonEntity = class extends BaseContactEntity {
|
|
|
3246
3478
|
}
|
|
3247
3479
|
}
|
|
3248
3480
|
};
|
|
3249
|
-
|
|
3250
|
-
|
|
3481
|
+
_ts_decorate31([
|
|
3482
|
+
Column28("varchar", {
|
|
3251
3483
|
name: "first_name",
|
|
3252
3484
|
length: 255,
|
|
3253
3485
|
nullable: false,
|
|
@@ -3256,22 +3488,22 @@ _ts_decorate30([
|
|
|
3256
3488
|
IsNotEmpty11({
|
|
3257
3489
|
message: "Blank first names are not allowed"
|
|
3258
3490
|
}),
|
|
3259
|
-
|
|
3491
|
+
_ts_metadata30("design:type", String)
|
|
3260
3492
|
], NaturalPersonEntity.prototype, "firstName", void 0);
|
|
3261
|
-
|
|
3262
|
-
|
|
3493
|
+
_ts_decorate31([
|
|
3494
|
+
Column28("varchar", {
|
|
3263
3495
|
name: "middle_name",
|
|
3264
3496
|
length: 255,
|
|
3265
3497
|
nullable: true,
|
|
3266
3498
|
unique: false
|
|
3267
3499
|
}),
|
|
3268
|
-
|
|
3500
|
+
Validate11(IsNonEmptyStringConstraint, {
|
|
3269
3501
|
message: "Blank middle names are not allowed"
|
|
3270
3502
|
}),
|
|
3271
|
-
|
|
3503
|
+
_ts_metadata30("design:type", String)
|
|
3272
3504
|
], NaturalPersonEntity.prototype, "middleName", void 0);
|
|
3273
|
-
|
|
3274
|
-
|
|
3505
|
+
_ts_decorate31([
|
|
3506
|
+
Column28("varchar", {
|
|
3275
3507
|
name: "last_name",
|
|
3276
3508
|
length: 255,
|
|
3277
3509
|
nullable: false,
|
|
@@ -3280,10 +3512,10 @@ _ts_decorate30([
|
|
|
3280
3512
|
IsNotEmpty11({
|
|
3281
3513
|
message: "Blank last names are not allowed"
|
|
3282
3514
|
}),
|
|
3283
|
-
|
|
3515
|
+
_ts_metadata30("design:type", String)
|
|
3284
3516
|
], NaturalPersonEntity.prototype, "lastName", void 0);
|
|
3285
|
-
|
|
3286
|
-
|
|
3517
|
+
_ts_decorate31([
|
|
3518
|
+
Column28("varchar", {
|
|
3287
3519
|
name: "display_name",
|
|
3288
3520
|
length: 255,
|
|
3289
3521
|
nullable: false,
|
|
@@ -3292,30 +3524,30 @@ _ts_decorate30([
|
|
|
3292
3524
|
IsNotEmpty11({
|
|
3293
3525
|
message: "Blank display names are not allowed"
|
|
3294
3526
|
}),
|
|
3295
|
-
|
|
3527
|
+
_ts_metadata30("design:type", String)
|
|
3296
3528
|
], NaturalPersonEntity.prototype, "displayName", void 0);
|
|
3297
|
-
|
|
3298
|
-
|
|
3529
|
+
_ts_decorate31([
|
|
3530
|
+
Column28("text", {
|
|
3299
3531
|
name: "owner_id",
|
|
3300
3532
|
nullable: true
|
|
3301
3533
|
}),
|
|
3302
|
-
|
|
3534
|
+
_ts_metadata30("design:type", String)
|
|
3303
3535
|
], NaturalPersonEntity.prototype, "ownerId", void 0);
|
|
3304
|
-
|
|
3305
|
-
|
|
3536
|
+
_ts_decorate31([
|
|
3537
|
+
Column28("text", {
|
|
3306
3538
|
name: "tenant_id",
|
|
3307
3539
|
nullable: true
|
|
3308
3540
|
}),
|
|
3309
|
-
|
|
3541
|
+
_ts_metadata30("design:type", String)
|
|
3310
3542
|
], NaturalPersonEntity.prototype, "tenantId", void 0);
|
|
3311
|
-
|
|
3543
|
+
_ts_decorate31([
|
|
3312
3544
|
BeforeInsert19(),
|
|
3313
3545
|
BeforeUpdate19(),
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3546
|
+
_ts_metadata30("design:type", Function),
|
|
3547
|
+
_ts_metadata30("design:paramtypes", []),
|
|
3548
|
+
_ts_metadata30("design:returntype", Promise)
|
|
3317
3549
|
], NaturalPersonEntity.prototype, "validate", null);
|
|
3318
|
-
NaturalPersonEntity =
|
|
3550
|
+
NaturalPersonEntity = _ts_decorate31([
|
|
3319
3551
|
ChildEntity7("NaturalPerson")
|
|
3320
3552
|
], NaturalPersonEntity);
|
|
3321
3553
|
|
|
@@ -3323,19 +3555,19 @@ NaturalPersonEntity = _ts_decorate30([
|
|
|
3323
3555
|
import { ActionType, InitiatorType, LoggingEventType, LogLevel, SubSystem, System, SystemCorrelationIdType } from "@sphereon/ssi-types";
|
|
3324
3556
|
import { CredentialType, PartyCorrelationType } from "@sphereon/ssi-sdk.core";
|
|
3325
3557
|
import { typeOrmDateTime as typeOrmDateTime15 } from "@sphereon/ssi-sdk.agent-config";
|
|
3326
|
-
import { BaseEntity as
|
|
3327
|
-
function
|
|
3558
|
+
import { BaseEntity as BaseEntity23, Column as Column29, CreateDateColumn as CreateDateColumn12, Entity as Entity25, PrimaryGeneratedColumn as PrimaryGeneratedColumn21, UpdateDateColumn as UpdateDateColumn12 } from "typeorm";
|
|
3559
|
+
function _ts_decorate32(decorators, target, key, desc) {
|
|
3328
3560
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3329
3561
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3330
3562
|
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;
|
|
3331
3563
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3332
3564
|
}
|
|
3333
|
-
__name(
|
|
3334
|
-
function
|
|
3565
|
+
__name(_ts_decorate32, "_ts_decorate");
|
|
3566
|
+
function _ts_metadata31(k, v) {
|
|
3335
3567
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3336
3568
|
}
|
|
3337
|
-
__name(
|
|
3338
|
-
var AuditEventEntity = class extends
|
|
3569
|
+
__name(_ts_metadata31, "_ts_metadata");
|
|
3570
|
+
var AuditEventEntity = class extends BaseEntity23 {
|
|
3339
3571
|
static {
|
|
3340
3572
|
__name(this, "AuditEventEntity");
|
|
3341
3573
|
}
|
|
@@ -3366,240 +3598,240 @@ var AuditEventEntity = class extends BaseEntity22 {
|
|
|
3366
3598
|
createdAt;
|
|
3367
3599
|
lastUpdatedAt;
|
|
3368
3600
|
};
|
|
3369
|
-
|
|
3601
|
+
_ts_decorate32([
|
|
3370
3602
|
PrimaryGeneratedColumn21("uuid"),
|
|
3371
|
-
|
|
3603
|
+
_ts_metadata31("design:type", String)
|
|
3372
3604
|
], AuditEventEntity.prototype, "id", void 0);
|
|
3373
|
-
|
|
3374
|
-
|
|
3605
|
+
_ts_decorate32([
|
|
3606
|
+
Column29({
|
|
3375
3607
|
name: "timestamp",
|
|
3376
3608
|
nullable: false,
|
|
3377
3609
|
unique: false,
|
|
3378
3610
|
type: typeOrmDateTime15()
|
|
3379
3611
|
}),
|
|
3380
|
-
|
|
3612
|
+
_ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3381
3613
|
], AuditEventEntity.prototype, "timestamp", void 0);
|
|
3382
|
-
|
|
3383
|
-
|
|
3614
|
+
_ts_decorate32([
|
|
3615
|
+
Column29("simple-enum", {
|
|
3384
3616
|
name: "eventType",
|
|
3385
3617
|
enum: LoggingEventType,
|
|
3386
3618
|
nullable: false,
|
|
3387
3619
|
unique: false
|
|
3388
3620
|
}),
|
|
3389
|
-
|
|
3621
|
+
_ts_metadata31("design:type", typeof LoggingEventType === "undefined" ? Object : LoggingEventType)
|
|
3390
3622
|
], AuditEventEntity.prototype, "type", void 0);
|
|
3391
|
-
|
|
3392
|
-
|
|
3623
|
+
_ts_decorate32([
|
|
3624
|
+
Column29("simple-enum", {
|
|
3393
3625
|
name: "level",
|
|
3394
3626
|
enum: LogLevel,
|
|
3395
3627
|
nullable: false,
|
|
3396
3628
|
unique: false
|
|
3397
3629
|
}),
|
|
3398
|
-
|
|
3630
|
+
_ts_metadata31("design:type", typeof LogLevel === "undefined" ? Object : LogLevel)
|
|
3399
3631
|
], AuditEventEntity.prototype, "level", void 0);
|
|
3400
|
-
|
|
3401
|
-
|
|
3632
|
+
_ts_decorate32([
|
|
3633
|
+
Column29("text", {
|
|
3402
3634
|
name: "correlationId",
|
|
3403
3635
|
nullable: false,
|
|
3404
3636
|
unique: false
|
|
3405
3637
|
}),
|
|
3406
|
-
|
|
3638
|
+
_ts_metadata31("design:type", String)
|
|
3407
3639
|
], AuditEventEntity.prototype, "correlationId", void 0);
|
|
3408
|
-
|
|
3409
|
-
|
|
3640
|
+
_ts_decorate32([
|
|
3641
|
+
Column29("simple-enum", {
|
|
3410
3642
|
name: "system",
|
|
3411
3643
|
enum: System,
|
|
3412
3644
|
nullable: false,
|
|
3413
3645
|
unique: false
|
|
3414
3646
|
}),
|
|
3415
|
-
|
|
3647
|
+
_ts_metadata31("design:type", typeof System === "undefined" ? Object : System)
|
|
3416
3648
|
], AuditEventEntity.prototype, "system", void 0);
|
|
3417
|
-
|
|
3418
|
-
|
|
3649
|
+
_ts_decorate32([
|
|
3650
|
+
Column29("simple-enum", {
|
|
3419
3651
|
name: "subSystemType",
|
|
3420
3652
|
enum: SubSystem,
|
|
3421
3653
|
nullable: false,
|
|
3422
3654
|
unique: false
|
|
3423
3655
|
}),
|
|
3424
|
-
|
|
3656
|
+
_ts_metadata31("design:type", typeof SubSystem === "undefined" ? Object : SubSystem)
|
|
3425
3657
|
], AuditEventEntity.prototype, "subSystemType", void 0);
|
|
3426
|
-
|
|
3427
|
-
|
|
3658
|
+
_ts_decorate32([
|
|
3659
|
+
Column29("simple-enum", {
|
|
3428
3660
|
name: "actionType",
|
|
3429
3661
|
enum: ActionType,
|
|
3430
3662
|
nullable: false,
|
|
3431
3663
|
unique: false
|
|
3432
3664
|
}),
|
|
3433
|
-
|
|
3665
|
+
_ts_metadata31("design:type", typeof ActionType === "undefined" ? Object : ActionType)
|
|
3434
3666
|
], AuditEventEntity.prototype, "actionType", void 0);
|
|
3435
|
-
|
|
3436
|
-
|
|
3667
|
+
_ts_decorate32([
|
|
3668
|
+
Column29({
|
|
3437
3669
|
name: "actionSubType",
|
|
3438
3670
|
type: "varchar",
|
|
3439
3671
|
nullable: false,
|
|
3440
3672
|
unique: false
|
|
3441
3673
|
}),
|
|
3442
|
-
|
|
3674
|
+
_ts_metadata31("design:type", typeof ActionSubType === "undefined" ? Object : ActionSubType)
|
|
3443
3675
|
], AuditEventEntity.prototype, "actionSubType", void 0);
|
|
3444
|
-
|
|
3445
|
-
|
|
3676
|
+
_ts_decorate32([
|
|
3677
|
+
Column29("simple-enum", {
|
|
3446
3678
|
name: "initiatorType",
|
|
3447
3679
|
enum: InitiatorType,
|
|
3448
3680
|
nullable: false,
|
|
3449
3681
|
unique: false
|
|
3450
3682
|
}),
|
|
3451
|
-
|
|
3683
|
+
_ts_metadata31("design:type", typeof InitiatorType === "undefined" ? Object : InitiatorType)
|
|
3452
3684
|
], AuditEventEntity.prototype, "initiatorType", void 0);
|
|
3453
|
-
|
|
3454
|
-
|
|
3685
|
+
_ts_decorate32([
|
|
3686
|
+
Column29("simple-enum", {
|
|
3455
3687
|
name: "systemCorrelationIdType",
|
|
3456
3688
|
enum: SystemCorrelationIdType,
|
|
3457
3689
|
nullable: true,
|
|
3458
3690
|
unique: false
|
|
3459
3691
|
}),
|
|
3460
|
-
|
|
3692
|
+
_ts_metadata31("design:type", typeof SystemCorrelationIdType === "undefined" ? Object : SystemCorrelationIdType)
|
|
3461
3693
|
], AuditEventEntity.prototype, "systemCorrelationIdType", void 0);
|
|
3462
|
-
|
|
3463
|
-
|
|
3694
|
+
_ts_decorate32([
|
|
3695
|
+
Column29("text", {
|
|
3464
3696
|
name: "systemCorrelationId",
|
|
3465
3697
|
nullable: true,
|
|
3466
3698
|
unique: false
|
|
3467
3699
|
}),
|
|
3468
|
-
|
|
3700
|
+
_ts_metadata31("design:type", String)
|
|
3469
3701
|
], AuditEventEntity.prototype, "systemCorrelationId", void 0);
|
|
3470
|
-
|
|
3471
|
-
|
|
3702
|
+
_ts_decorate32([
|
|
3703
|
+
Column29("text", {
|
|
3472
3704
|
name: "systemAlias",
|
|
3473
3705
|
nullable: true,
|
|
3474
3706
|
unique: false
|
|
3475
3707
|
}),
|
|
3476
|
-
|
|
3708
|
+
_ts_metadata31("design:type", String)
|
|
3477
3709
|
], AuditEventEntity.prototype, "systemAlias", void 0);
|
|
3478
|
-
|
|
3479
|
-
|
|
3710
|
+
_ts_decorate32([
|
|
3711
|
+
Column29("simple-enum", {
|
|
3480
3712
|
name: "partyCorrelationType",
|
|
3481
3713
|
enum: PartyCorrelationType,
|
|
3482
3714
|
nullable: true,
|
|
3483
3715
|
unique: false
|
|
3484
3716
|
}),
|
|
3485
|
-
|
|
3717
|
+
_ts_metadata31("design:type", typeof PartyCorrelationType === "undefined" ? Object : PartyCorrelationType)
|
|
3486
3718
|
], AuditEventEntity.prototype, "partyCorrelationType", void 0);
|
|
3487
|
-
|
|
3488
|
-
|
|
3719
|
+
_ts_decorate32([
|
|
3720
|
+
Column29("text", {
|
|
3489
3721
|
name: "partyCorrelationId",
|
|
3490
3722
|
nullable: true,
|
|
3491
3723
|
unique: false
|
|
3492
3724
|
}),
|
|
3493
|
-
|
|
3725
|
+
_ts_metadata31("design:type", String)
|
|
3494
3726
|
], AuditEventEntity.prototype, "partyCorrelationId", void 0);
|
|
3495
|
-
|
|
3496
|
-
|
|
3727
|
+
_ts_decorate32([
|
|
3728
|
+
Column29("text", {
|
|
3497
3729
|
name: "partyAlias",
|
|
3498
3730
|
nullable: true,
|
|
3499
3731
|
unique: false
|
|
3500
3732
|
}),
|
|
3501
|
-
|
|
3733
|
+
_ts_metadata31("design:type", String)
|
|
3502
3734
|
], AuditEventEntity.prototype, "partyAlias", void 0);
|
|
3503
|
-
|
|
3504
|
-
|
|
3735
|
+
_ts_decorate32([
|
|
3736
|
+
Column29("text", {
|
|
3505
3737
|
name: "description",
|
|
3506
3738
|
nullable: false,
|
|
3507
3739
|
unique: false
|
|
3508
3740
|
}),
|
|
3509
|
-
|
|
3741
|
+
_ts_metadata31("design:type", String)
|
|
3510
3742
|
], AuditEventEntity.prototype, "description", void 0);
|
|
3511
|
-
|
|
3512
|
-
|
|
3743
|
+
_ts_decorate32([
|
|
3744
|
+
Column29("simple-enum", {
|
|
3513
3745
|
name: "credentialType",
|
|
3514
3746
|
enum: CredentialType,
|
|
3515
3747
|
nullable: true,
|
|
3516
3748
|
unique: false
|
|
3517
3749
|
}),
|
|
3518
|
-
|
|
3750
|
+
_ts_metadata31("design:type", typeof CredentialType === "undefined" ? Object : CredentialType)
|
|
3519
3751
|
], AuditEventEntity.prototype, "credentialType", void 0);
|
|
3520
|
-
|
|
3521
|
-
|
|
3752
|
+
_ts_decorate32([
|
|
3753
|
+
Column29("text", {
|
|
3522
3754
|
name: "credentialHash",
|
|
3523
3755
|
nullable: true,
|
|
3524
3756
|
unique: false
|
|
3525
3757
|
}),
|
|
3526
|
-
|
|
3758
|
+
_ts_metadata31("design:type", String)
|
|
3527
3759
|
], AuditEventEntity.prototype, "credentialHash", void 0);
|
|
3528
|
-
|
|
3529
|
-
|
|
3760
|
+
_ts_decorate32([
|
|
3761
|
+
Column29("text", {
|
|
3530
3762
|
name: "parentCredentialHash",
|
|
3531
3763
|
nullable: true,
|
|
3532
3764
|
unique: false
|
|
3533
3765
|
}),
|
|
3534
|
-
|
|
3766
|
+
_ts_metadata31("design:type", String)
|
|
3535
3767
|
], AuditEventEntity.prototype, "parentCredentialHash", void 0);
|
|
3536
|
-
|
|
3537
|
-
|
|
3768
|
+
_ts_decorate32([
|
|
3769
|
+
Column29("text", {
|
|
3538
3770
|
name: "originalCredential",
|
|
3539
3771
|
nullable: true,
|
|
3540
3772
|
unique: false
|
|
3541
3773
|
}),
|
|
3542
|
-
|
|
3774
|
+
_ts_metadata31("design:type", String)
|
|
3543
3775
|
], AuditEventEntity.prototype, "originalCredential", void 0);
|
|
3544
|
-
|
|
3545
|
-
|
|
3776
|
+
_ts_decorate32([
|
|
3777
|
+
Column29("text", {
|
|
3546
3778
|
name: "sharePurpose",
|
|
3547
3779
|
nullable: true,
|
|
3548
3780
|
unique: false
|
|
3549
3781
|
}),
|
|
3550
|
-
|
|
3782
|
+
_ts_metadata31("design:type", String)
|
|
3551
3783
|
], AuditEventEntity.prototype, "sharePurpose", void 0);
|
|
3552
|
-
|
|
3553
|
-
|
|
3784
|
+
_ts_decorate32([
|
|
3785
|
+
Column29("text", {
|
|
3554
3786
|
name: "data",
|
|
3555
3787
|
nullable: true,
|
|
3556
3788
|
unique: false
|
|
3557
3789
|
}),
|
|
3558
|
-
|
|
3790
|
+
_ts_metadata31("design:type", String)
|
|
3559
3791
|
], AuditEventEntity.prototype, "data", void 0);
|
|
3560
|
-
|
|
3561
|
-
|
|
3792
|
+
_ts_decorate32([
|
|
3793
|
+
Column29("text", {
|
|
3562
3794
|
name: "diagnosticData",
|
|
3563
3795
|
nullable: true,
|
|
3564
3796
|
unique: false
|
|
3565
3797
|
}),
|
|
3566
|
-
|
|
3798
|
+
_ts_metadata31("design:type", String)
|
|
3567
3799
|
], AuditEventEntity.prototype, "diagnosticData", void 0);
|
|
3568
|
-
|
|
3800
|
+
_ts_decorate32([
|
|
3569
3801
|
CreateDateColumn12({
|
|
3570
3802
|
name: "created_at",
|
|
3571
3803
|
nullable: false,
|
|
3572
3804
|
type: typeOrmDateTime15()
|
|
3573
3805
|
}),
|
|
3574
|
-
|
|
3806
|
+
_ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3575
3807
|
], AuditEventEntity.prototype, "createdAt", void 0);
|
|
3576
|
-
|
|
3808
|
+
_ts_decorate32([
|
|
3577
3809
|
UpdateDateColumn12({
|
|
3578
3810
|
name: "last_updated_at",
|
|
3579
3811
|
nullable: false,
|
|
3580
3812
|
type: typeOrmDateTime15()
|
|
3581
3813
|
}),
|
|
3582
|
-
|
|
3814
|
+
_ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3583
3815
|
], AuditEventEntity.prototype, "lastUpdatedAt", void 0);
|
|
3584
|
-
AuditEventEntity =
|
|
3585
|
-
|
|
3816
|
+
AuditEventEntity = _ts_decorate32([
|
|
3817
|
+
Entity25("AuditEvents")
|
|
3586
3818
|
], AuditEventEntity);
|
|
3587
3819
|
|
|
3588
3820
|
// src/entities/digitalCredential/DigitalCredentialEntity.ts
|
|
3589
3821
|
import { typeormDate, typeOrmDateTime as typeOrmDateTime16 } from "@sphereon/ssi-sdk.agent-config";
|
|
3590
|
-
import { BaseEntity as
|
|
3591
|
-
function
|
|
3822
|
+
import { BaseEntity as BaseEntity24, Column as Column30, CreateDateColumn as CreateDateColumn13, Entity as Entity26, PrimaryGeneratedColumn as PrimaryGeneratedColumn22, UpdateDateColumn as UpdateDateColumn13 } from "typeorm";
|
|
3823
|
+
function _ts_decorate33(decorators, target, key, desc) {
|
|
3592
3824
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3593
3825
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3594
3826
|
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;
|
|
3595
3827
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3596
3828
|
}
|
|
3597
|
-
__name(
|
|
3598
|
-
function
|
|
3829
|
+
__name(_ts_decorate33, "_ts_decorate");
|
|
3830
|
+
function _ts_metadata32(k, v) {
|
|
3599
3831
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3600
3832
|
}
|
|
3601
|
-
__name(
|
|
3602
|
-
var DigitalCredentialEntity = class extends
|
|
3833
|
+
__name(_ts_metadata32, "_ts_metadata");
|
|
3834
|
+
var DigitalCredentialEntity = class extends BaseEntity24 {
|
|
3603
3835
|
static {
|
|
3604
3836
|
__name(this, "DigitalCredentialEntity");
|
|
3605
3837
|
}
|
|
@@ -3632,236 +3864,236 @@ var DigitalCredentialEntity = class extends BaseEntity23 {
|
|
|
3632
3864
|
verifiedAt;
|
|
3633
3865
|
revokedAt;
|
|
3634
3866
|
};
|
|
3635
|
-
|
|
3867
|
+
_ts_decorate33([
|
|
3636
3868
|
PrimaryGeneratedColumn22("uuid"),
|
|
3637
|
-
|
|
3869
|
+
_ts_metadata32("design:type", String)
|
|
3638
3870
|
], DigitalCredentialEntity.prototype, "id", void 0);
|
|
3639
|
-
|
|
3640
|
-
|
|
3871
|
+
_ts_decorate33([
|
|
3872
|
+
Column30("text", {
|
|
3641
3873
|
name: "parent_id",
|
|
3642
3874
|
nullable: true
|
|
3643
3875
|
}),
|
|
3644
|
-
|
|
3876
|
+
_ts_metadata32("design:type", String)
|
|
3645
3877
|
], DigitalCredentialEntity.prototype, "parentId", void 0);
|
|
3646
|
-
|
|
3647
|
-
|
|
3878
|
+
_ts_decorate33([
|
|
3879
|
+
Column30("simple-enum", {
|
|
3648
3880
|
name: "document_type",
|
|
3649
3881
|
enum: DocumentType,
|
|
3650
3882
|
nullable: false
|
|
3651
3883
|
}),
|
|
3652
|
-
|
|
3884
|
+
_ts_metadata32("design:type", typeof DocumentType === "undefined" ? Object : DocumentType)
|
|
3653
3885
|
], DigitalCredentialEntity.prototype, "documentType", void 0);
|
|
3654
|
-
|
|
3655
|
-
|
|
3886
|
+
_ts_decorate33([
|
|
3887
|
+
Column30("simple-enum", {
|
|
3656
3888
|
name: "regulation_type",
|
|
3657
3889
|
enum: RegulationType,
|
|
3658
3890
|
nullable: false
|
|
3659
3891
|
}),
|
|
3660
|
-
|
|
3892
|
+
_ts_metadata32("design:type", typeof RegulationType === "undefined" ? Object : RegulationType)
|
|
3661
3893
|
], DigitalCredentialEntity.prototype, "regulationType", void 0);
|
|
3662
|
-
|
|
3663
|
-
|
|
3894
|
+
_ts_decorate33([
|
|
3895
|
+
Column30("simple-enum", {
|
|
3664
3896
|
name: "document_format",
|
|
3665
3897
|
enum: CredentialDocumentFormat,
|
|
3666
3898
|
nullable: false
|
|
3667
3899
|
}),
|
|
3668
|
-
|
|
3900
|
+
_ts_metadata32("design:type", typeof CredentialDocumentFormat === "undefined" ? Object : CredentialDocumentFormat)
|
|
3669
3901
|
], DigitalCredentialEntity.prototype, "documentFormat", void 0);
|
|
3670
|
-
|
|
3671
|
-
|
|
3902
|
+
_ts_decorate33([
|
|
3903
|
+
Column30("simple-enum", {
|
|
3672
3904
|
name: "credential_role",
|
|
3673
3905
|
enum: CredentialRole,
|
|
3674
3906
|
nullable: false
|
|
3675
3907
|
}),
|
|
3676
|
-
|
|
3908
|
+
_ts_metadata32("design:type", typeof CredentialRole === "undefined" ? Object : CredentialRole)
|
|
3677
3909
|
], DigitalCredentialEntity.prototype, "credentialRole", void 0);
|
|
3678
|
-
|
|
3679
|
-
|
|
3910
|
+
_ts_decorate33([
|
|
3911
|
+
Column30("text", {
|
|
3680
3912
|
name: "raw_document",
|
|
3681
3913
|
nullable: false
|
|
3682
3914
|
}),
|
|
3683
|
-
|
|
3915
|
+
_ts_metadata32("design:type", String)
|
|
3684
3916
|
], DigitalCredentialEntity.prototype, "rawDocument", void 0);
|
|
3685
|
-
|
|
3686
|
-
|
|
3917
|
+
_ts_decorate33([
|
|
3918
|
+
Column30("text", {
|
|
3687
3919
|
name: "uniform_document",
|
|
3688
3920
|
nullable: false
|
|
3689
3921
|
}),
|
|
3690
|
-
|
|
3922
|
+
_ts_metadata32("design:type", String)
|
|
3691
3923
|
], DigitalCredentialEntity.prototype, "uniformDocument", void 0);
|
|
3692
|
-
|
|
3693
|
-
|
|
3924
|
+
_ts_decorate33([
|
|
3925
|
+
Column30("text", {
|
|
3694
3926
|
name: "credential_id",
|
|
3695
3927
|
nullable: true,
|
|
3696
3928
|
unique: false
|
|
3697
3929
|
}),
|
|
3698
|
-
|
|
3930
|
+
_ts_metadata32("design:type", String)
|
|
3699
3931
|
], DigitalCredentialEntity.prototype, "credentialId", void 0);
|
|
3700
|
-
|
|
3701
|
-
|
|
3932
|
+
_ts_decorate33([
|
|
3933
|
+
Column30("text", {
|
|
3702
3934
|
name: "hash",
|
|
3703
3935
|
nullable: false,
|
|
3704
3936
|
unique: true
|
|
3705
3937
|
}),
|
|
3706
|
-
|
|
3938
|
+
_ts_metadata32("design:type", String)
|
|
3707
3939
|
], DigitalCredentialEntity.prototype, "hash", void 0);
|
|
3708
|
-
|
|
3709
|
-
|
|
3940
|
+
_ts_decorate33([
|
|
3941
|
+
Column30("text", {
|
|
3710
3942
|
name: "kms_key_ref",
|
|
3711
3943
|
nullable: true
|
|
3712
3944
|
}),
|
|
3713
|
-
|
|
3714
|
-
], DigitalCredentialEntity.prototype, "kmsKeyRef", void 0);
|
|
3715
|
-
|
|
3716
|
-
|
|
3945
|
+
_ts_metadata32("design:type", String)
|
|
3946
|
+
], DigitalCredentialEntity.prototype, "kmsKeyRef", void 0);
|
|
3947
|
+
_ts_decorate33([
|
|
3948
|
+
Column30("text", {
|
|
3717
3949
|
name: "identifier_method",
|
|
3718
3950
|
nullable: true
|
|
3719
3951
|
}),
|
|
3720
|
-
|
|
3952
|
+
_ts_metadata32("design:type", String)
|
|
3721
3953
|
], DigitalCredentialEntity.prototype, "identifierMethod", void 0);
|
|
3722
|
-
|
|
3723
|
-
|
|
3954
|
+
_ts_decorate33([
|
|
3955
|
+
Column30("simple-enum", {
|
|
3724
3956
|
name: "issuer_correlation_type",
|
|
3725
3957
|
enum: CredentialCorrelationType,
|
|
3726
3958
|
nullable: false
|
|
3727
3959
|
}),
|
|
3728
|
-
|
|
3960
|
+
_ts_metadata32("design:type", typeof CredentialCorrelationType === "undefined" ? Object : CredentialCorrelationType)
|
|
3729
3961
|
], DigitalCredentialEntity.prototype, "issuerCorrelationType", void 0);
|
|
3730
|
-
|
|
3731
|
-
|
|
3962
|
+
_ts_decorate33([
|
|
3963
|
+
Column30("simple-enum", {
|
|
3732
3964
|
name: "subject_correlation_type",
|
|
3733
3965
|
enum: CredentialCorrelationType,
|
|
3734
3966
|
nullable: true
|
|
3735
3967
|
}),
|
|
3736
|
-
|
|
3968
|
+
_ts_metadata32("design:type", typeof CredentialCorrelationType === "undefined" ? Object : CredentialCorrelationType)
|
|
3737
3969
|
], DigitalCredentialEntity.prototype, "subjectCorrelationType", void 0);
|
|
3738
|
-
|
|
3739
|
-
|
|
3970
|
+
_ts_decorate33([
|
|
3971
|
+
Column30("simple-enum", {
|
|
3740
3972
|
name: "rp_correlation_type",
|
|
3741
3973
|
enum: CredentialCorrelationType,
|
|
3742
3974
|
nullable: true
|
|
3743
3975
|
}),
|
|
3744
|
-
|
|
3976
|
+
_ts_metadata32("design:type", typeof CredentialCorrelationType === "undefined" ? Object : CredentialCorrelationType)
|
|
3745
3977
|
], DigitalCredentialEntity.prototype, "rpCorrelationType", void 0);
|
|
3746
|
-
|
|
3747
|
-
|
|
3978
|
+
_ts_decorate33([
|
|
3979
|
+
Column30("boolean", {
|
|
3748
3980
|
name: "issuer_signed",
|
|
3749
3981
|
nullable: true
|
|
3750
3982
|
}),
|
|
3751
|
-
|
|
3983
|
+
_ts_metadata32("design:type", Boolean)
|
|
3752
3984
|
], DigitalCredentialEntity.prototype, "isIssuerSigned", void 0);
|
|
3753
|
-
|
|
3754
|
-
|
|
3985
|
+
_ts_decorate33([
|
|
3986
|
+
Column30("text", {
|
|
3755
3987
|
name: "issuer_correlation_id",
|
|
3756
3988
|
nullable: false
|
|
3757
3989
|
}),
|
|
3758
|
-
|
|
3990
|
+
_ts_metadata32("design:type", String)
|
|
3759
3991
|
], DigitalCredentialEntity.prototype, "issuerCorrelationId", void 0);
|
|
3760
|
-
|
|
3761
|
-
|
|
3992
|
+
_ts_decorate33([
|
|
3993
|
+
Column30("text", {
|
|
3762
3994
|
name: "subject_correlation_id",
|
|
3763
3995
|
nullable: true
|
|
3764
3996
|
}),
|
|
3765
|
-
|
|
3997
|
+
_ts_metadata32("design:type", String)
|
|
3766
3998
|
], DigitalCredentialEntity.prototype, "subjectCorrelationId", void 0);
|
|
3767
|
-
|
|
3768
|
-
|
|
3999
|
+
_ts_decorate33([
|
|
4000
|
+
Column30("text", {
|
|
3769
4001
|
name: "rp_correlation_id",
|
|
3770
4002
|
nullable: true
|
|
3771
4003
|
}),
|
|
3772
|
-
|
|
4004
|
+
_ts_metadata32("design:type", String)
|
|
3773
4005
|
], DigitalCredentialEntity.prototype, "rpCorrelationId", void 0);
|
|
3774
|
-
|
|
3775
|
-
|
|
4006
|
+
_ts_decorate33([
|
|
4007
|
+
Column30("simple-enum", {
|
|
3776
4008
|
name: "verified_state",
|
|
3777
4009
|
enum: CredentialStateType,
|
|
3778
4010
|
nullable: true
|
|
3779
4011
|
}),
|
|
3780
|
-
|
|
4012
|
+
_ts_metadata32("design:type", typeof CredentialStateType === "undefined" ? Object : CredentialStateType)
|
|
3781
4013
|
], DigitalCredentialEntity.prototype, "verifiedState", void 0);
|
|
3782
|
-
|
|
3783
|
-
|
|
4014
|
+
_ts_decorate33([
|
|
4015
|
+
Column30("text", {
|
|
3784
4016
|
name: "tenant_id",
|
|
3785
4017
|
nullable: true
|
|
3786
4018
|
}),
|
|
3787
|
-
|
|
4019
|
+
_ts_metadata32("design:type", String)
|
|
3788
4020
|
], DigitalCredentialEntity.prototype, "tenantId", void 0);
|
|
3789
|
-
|
|
4021
|
+
_ts_decorate33([
|
|
3790
4022
|
CreateDateColumn13({
|
|
3791
4023
|
name: "created_at",
|
|
3792
4024
|
nullable: false,
|
|
3793
4025
|
type: typeOrmDateTime16()
|
|
3794
4026
|
}),
|
|
3795
|
-
|
|
4027
|
+
_ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3796
4028
|
], DigitalCredentialEntity.prototype, "createdAt", void 0);
|
|
3797
|
-
|
|
3798
|
-
|
|
4029
|
+
_ts_decorate33([
|
|
4030
|
+
Column30({
|
|
3799
4031
|
name: "presented_at",
|
|
3800
4032
|
nullable: true,
|
|
3801
4033
|
type: typeormDate()
|
|
3802
4034
|
}),
|
|
3803
|
-
|
|
4035
|
+
_ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3804
4036
|
], DigitalCredentialEntity.prototype, "presentedAt", void 0);
|
|
3805
|
-
|
|
4037
|
+
_ts_decorate33([
|
|
3806
4038
|
UpdateDateColumn13({
|
|
3807
4039
|
name: "last_updated_at",
|
|
3808
4040
|
nullable: false,
|
|
3809
4041
|
type: typeOrmDateTime16()
|
|
3810
4042
|
}),
|
|
3811
|
-
|
|
4043
|
+
_ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3812
4044
|
], DigitalCredentialEntity.prototype, "lastUpdatedAt", void 0);
|
|
3813
|
-
|
|
3814
|
-
|
|
4045
|
+
_ts_decorate33([
|
|
4046
|
+
Column30({
|
|
3815
4047
|
name: "valid_until",
|
|
3816
4048
|
nullable: true,
|
|
3817
4049
|
type: typeormDate()
|
|
3818
4050
|
}),
|
|
3819
|
-
|
|
4051
|
+
_ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3820
4052
|
], DigitalCredentialEntity.prototype, "validUntil", void 0);
|
|
3821
|
-
|
|
3822
|
-
|
|
4053
|
+
_ts_decorate33([
|
|
4054
|
+
Column30({
|
|
3823
4055
|
name: "valid_from",
|
|
3824
4056
|
nullable: true,
|
|
3825
4057
|
type: typeormDate()
|
|
3826
4058
|
}),
|
|
3827
|
-
|
|
4059
|
+
_ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3828
4060
|
], DigitalCredentialEntity.prototype, "validFrom", void 0);
|
|
3829
|
-
|
|
3830
|
-
|
|
4061
|
+
_ts_decorate33([
|
|
4062
|
+
Column30({
|
|
3831
4063
|
name: "verified_at",
|
|
3832
4064
|
nullable: true,
|
|
3833
4065
|
type: typeOrmDateTime16()
|
|
3834
4066
|
}),
|
|
3835
|
-
|
|
4067
|
+
_ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3836
4068
|
], DigitalCredentialEntity.prototype, "verifiedAt", void 0);
|
|
3837
|
-
|
|
3838
|
-
|
|
4069
|
+
_ts_decorate33([
|
|
4070
|
+
Column30({
|
|
3839
4071
|
name: "revoked_at",
|
|
3840
4072
|
nullable: true,
|
|
3841
4073
|
type: typeOrmDateTime16()
|
|
3842
4074
|
}),
|
|
3843
|
-
|
|
4075
|
+
_ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3844
4076
|
], DigitalCredentialEntity.prototype, "revokedAt", void 0);
|
|
3845
|
-
DigitalCredentialEntity =
|
|
3846
|
-
|
|
4077
|
+
DigitalCredentialEntity = _ts_decorate33([
|
|
4078
|
+
Entity26("DigitalCredential")
|
|
3847
4079
|
], DigitalCredentialEntity);
|
|
3848
4080
|
|
|
3849
4081
|
// src/entities/presentationDefinition/PresentationDefinitionItemEntity.ts
|
|
3850
|
-
import { BaseEntity as
|
|
4082
|
+
import { BaseEntity as BaseEntity25, BeforeInsert as BeforeInsert20, BeforeUpdate as BeforeUpdate20, Column as Column31, CreateDateColumn as CreateDateColumn14, Entity as Entity27, Index as Index8, PrimaryGeneratedColumn as PrimaryGeneratedColumn23, UpdateDateColumn as UpdateDateColumn14 } from "typeorm";
|
|
3851
4083
|
import { IsNotEmpty as IsNotEmpty12 } from "class-validator";
|
|
3852
4084
|
import { typeOrmDateTime as typeOrmDateTime17 } from "@sphereon/ssi-sdk.agent-config";
|
|
3853
|
-
function
|
|
4085
|
+
function _ts_decorate34(decorators, target, key, desc) {
|
|
3854
4086
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3855
4087
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3856
4088
|
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;
|
|
3857
4089
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3858
4090
|
}
|
|
3859
|
-
__name(
|
|
3860
|
-
function
|
|
4091
|
+
__name(_ts_decorate34, "_ts_decorate");
|
|
4092
|
+
function _ts_metadata33(k, v) {
|
|
3861
4093
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3862
4094
|
}
|
|
3863
|
-
__name(
|
|
3864
|
-
var PresentationDefinitionItemEntity = class extends
|
|
4095
|
+
__name(_ts_metadata33, "_ts_metadata");
|
|
4096
|
+
var PresentationDefinitionItemEntity = class extends BaseEntity25 {
|
|
3865
4097
|
static {
|
|
3866
4098
|
__name(this, "PresentationDefinitionItemEntity");
|
|
3867
4099
|
}
|
|
@@ -3880,12 +4112,12 @@ var PresentationDefinitionItemEntity = class extends BaseEntity24 {
|
|
|
3880
4112
|
this.lastUpdatedAt = /* @__PURE__ */ new Date();
|
|
3881
4113
|
}
|
|
3882
4114
|
};
|
|
3883
|
-
|
|
4115
|
+
_ts_decorate34([
|
|
3884
4116
|
PrimaryGeneratedColumn23("uuid"),
|
|
3885
|
-
|
|
4117
|
+
_ts_metadata33("design:type", String)
|
|
3886
4118
|
], PresentationDefinitionItemEntity.prototype, "id", void 0);
|
|
3887
|
-
|
|
3888
|
-
|
|
4119
|
+
_ts_decorate34([
|
|
4120
|
+
Column31({
|
|
3889
4121
|
name: "definition_id",
|
|
3890
4122
|
length: 255,
|
|
3891
4123
|
type: "varchar",
|
|
@@ -3895,10 +4127,10 @@ _ts_decorate33([
|
|
|
3895
4127
|
IsNotEmpty12({
|
|
3896
4128
|
message: "A blank definition id field is not allowed"
|
|
3897
4129
|
}),
|
|
3898
|
-
|
|
4130
|
+
_ts_metadata33("design:type", String)
|
|
3899
4131
|
], PresentationDefinitionItemEntity.prototype, "definitionId", void 0);
|
|
3900
|
-
|
|
3901
|
-
|
|
4132
|
+
_ts_decorate34([
|
|
4133
|
+
Column31({
|
|
3902
4134
|
name: "version",
|
|
3903
4135
|
length: 255,
|
|
3904
4136
|
type: "varchar",
|
|
@@ -3908,40 +4140,40 @@ _ts_decorate33([
|
|
|
3908
4140
|
IsNotEmpty12({
|
|
3909
4141
|
message: "A blank version field is not allowed"
|
|
3910
4142
|
}),
|
|
3911
|
-
|
|
4143
|
+
_ts_metadata33("design:type", String)
|
|
3912
4144
|
], PresentationDefinitionItemEntity.prototype, "version", void 0);
|
|
3913
|
-
|
|
3914
|
-
|
|
4145
|
+
_ts_decorate34([
|
|
4146
|
+
Column31({
|
|
3915
4147
|
name: "tenant_id",
|
|
3916
4148
|
length: 255,
|
|
3917
4149
|
type: "varchar",
|
|
3918
4150
|
nullable: true,
|
|
3919
4151
|
unique: false
|
|
3920
4152
|
}),
|
|
3921
|
-
|
|
4153
|
+
_ts_metadata33("design:type", String)
|
|
3922
4154
|
], PresentationDefinitionItemEntity.prototype, "tenantId", void 0);
|
|
3923
|
-
|
|
3924
|
-
|
|
4155
|
+
_ts_decorate34([
|
|
4156
|
+
Column31({
|
|
3925
4157
|
name: "purpose",
|
|
3926
4158
|
length: 255,
|
|
3927
4159
|
type: "varchar",
|
|
3928
4160
|
nullable: true,
|
|
3929
4161
|
unique: false
|
|
3930
4162
|
}),
|
|
3931
|
-
|
|
4163
|
+
_ts_metadata33("design:type", String)
|
|
3932
4164
|
], PresentationDefinitionItemEntity.prototype, "purpose", void 0);
|
|
3933
|
-
|
|
3934
|
-
|
|
4165
|
+
_ts_decorate34([
|
|
4166
|
+
Column31({
|
|
3935
4167
|
name: "name",
|
|
3936
4168
|
length: 255,
|
|
3937
4169
|
type: "varchar",
|
|
3938
4170
|
nullable: true,
|
|
3939
4171
|
unique: false
|
|
3940
4172
|
}),
|
|
3941
|
-
|
|
4173
|
+
_ts_metadata33("design:type", String)
|
|
3942
4174
|
], PresentationDefinitionItemEntity.prototype, "name", void 0);
|
|
3943
|
-
|
|
3944
|
-
|
|
4175
|
+
_ts_decorate34([
|
|
4176
|
+
Column31({
|
|
3945
4177
|
name: "definition_payload",
|
|
3946
4178
|
type: "text",
|
|
3947
4179
|
nullable: false,
|
|
@@ -3950,10 +4182,10 @@ _ts_decorate33([
|
|
|
3950
4182
|
IsNotEmpty12({
|
|
3951
4183
|
message: "A blank PD definition payload field is not allowed"
|
|
3952
4184
|
}),
|
|
3953
|
-
|
|
4185
|
+
_ts_metadata33("design:type", String)
|
|
3954
4186
|
], PresentationDefinitionItemEntity.prototype, "definitionPayload", void 0);
|
|
3955
|
-
|
|
3956
|
-
|
|
4187
|
+
_ts_decorate34([
|
|
4188
|
+
Column31({
|
|
3957
4189
|
name: "dcql_payload",
|
|
3958
4190
|
type: "text",
|
|
3959
4191
|
nullable: true,
|
|
@@ -3962,33 +4194,33 @@ _ts_decorate33([
|
|
|
3962
4194
|
IsNotEmpty12({
|
|
3963
4195
|
message: "A blank dcql definition payload field is not allowed"
|
|
3964
4196
|
}),
|
|
3965
|
-
|
|
4197
|
+
_ts_metadata33("design:type", String)
|
|
3966
4198
|
], PresentationDefinitionItemEntity.prototype, "dcqlPayload", void 0);
|
|
3967
|
-
|
|
4199
|
+
_ts_decorate34([
|
|
3968
4200
|
CreateDateColumn14({
|
|
3969
4201
|
name: "created_at",
|
|
3970
4202
|
nullable: false,
|
|
3971
4203
|
type: typeOrmDateTime17()
|
|
3972
4204
|
}),
|
|
3973
|
-
|
|
4205
|
+
_ts_metadata33("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3974
4206
|
], PresentationDefinitionItemEntity.prototype, "createdAt", void 0);
|
|
3975
|
-
|
|
4207
|
+
_ts_decorate34([
|
|
3976
4208
|
UpdateDateColumn14({
|
|
3977
4209
|
name: "last_updated_at",
|
|
3978
4210
|
nullable: false,
|
|
3979
4211
|
type: typeOrmDateTime17()
|
|
3980
4212
|
}),
|
|
3981
|
-
|
|
4213
|
+
_ts_metadata33("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3982
4214
|
], PresentationDefinitionItemEntity.prototype, "lastUpdatedAt", void 0);
|
|
3983
|
-
|
|
4215
|
+
_ts_decorate34([
|
|
3984
4216
|
BeforeInsert20(),
|
|
3985
4217
|
BeforeUpdate20(),
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
4218
|
+
_ts_metadata33("design:type", Function),
|
|
4219
|
+
_ts_metadata33("design:paramtypes", []),
|
|
4220
|
+
_ts_metadata33("design:returntype", void 0)
|
|
3989
4221
|
], PresentationDefinitionItemEntity.prototype, "updateUpdatedDate", null);
|
|
3990
|
-
PresentationDefinitionItemEntity =
|
|
3991
|
-
|
|
4222
|
+
PresentationDefinitionItemEntity = _ts_decorate34([
|
|
4223
|
+
Entity27("PresentationDefinitionItem"),
|
|
3992
4224
|
Index8([
|
|
3993
4225
|
"version"
|
|
3994
4226
|
], {
|
|
@@ -3998,19 +4230,19 @@ PresentationDefinitionItemEntity = _ts_decorate33([
|
|
|
3998
4230
|
|
|
3999
4231
|
// src/entities/oid4vcState/Oid4vcStateEntity.ts
|
|
4000
4232
|
import { typeOrmDateTime as typeOrmDateTime18 } from "@sphereon/ssi-sdk.agent-config";
|
|
4001
|
-
import { BaseEntity as
|
|
4002
|
-
function
|
|
4233
|
+
import { BaseEntity as BaseEntity26, Column as Column32, CreateDateColumn as CreateDateColumn15, Entity as Entity28, PrimaryColumn as PrimaryColumn5, UpdateDateColumn as UpdateDateColumn15 } from "typeorm";
|
|
4234
|
+
function _ts_decorate35(decorators, target, key, desc) {
|
|
4003
4235
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4004
4236
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4005
4237
|
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;
|
|
4006
4238
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4007
4239
|
}
|
|
4008
|
-
__name(
|
|
4009
|
-
function
|
|
4240
|
+
__name(_ts_decorate35, "_ts_decorate");
|
|
4241
|
+
function _ts_metadata34(k, v) {
|
|
4010
4242
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4011
4243
|
}
|
|
4012
|
-
__name(
|
|
4013
|
-
var Oid4vcStateEntity = class extends
|
|
4244
|
+
__name(_ts_metadata34, "_ts_metadata");
|
|
4245
|
+
var Oid4vcStateEntity = class extends BaseEntity26 {
|
|
4014
4246
|
static {
|
|
4015
4247
|
__name(this, "Oid4vcStateEntity");
|
|
4016
4248
|
}
|
|
@@ -4024,80 +4256,80 @@ var Oid4vcStateEntity = class extends BaseEntity25 {
|
|
|
4024
4256
|
expiresAt;
|
|
4025
4257
|
tenantId;
|
|
4026
4258
|
};
|
|
4027
|
-
|
|
4028
|
-
|
|
4259
|
+
_ts_decorate35([
|
|
4260
|
+
PrimaryColumn5({
|
|
4029
4261
|
name: "id",
|
|
4030
4262
|
type: "varchar",
|
|
4031
4263
|
nullable: false
|
|
4032
4264
|
}),
|
|
4033
|
-
|
|
4265
|
+
_ts_metadata34("design:type", String)
|
|
4034
4266
|
], Oid4vcStateEntity.prototype, "id", void 0);
|
|
4035
|
-
|
|
4036
|
-
|
|
4267
|
+
_ts_decorate35([
|
|
4268
|
+
Column32({
|
|
4037
4269
|
name: "lookup_ids",
|
|
4038
4270
|
type: "array",
|
|
4039
4271
|
nullable: true
|
|
4040
4272
|
}),
|
|
4041
|
-
|
|
4273
|
+
_ts_metadata34("design:type", typeof Array === "undefined" ? Object : Array)
|
|
4042
4274
|
], Oid4vcStateEntity.prototype, "lookups", void 0);
|
|
4043
|
-
|
|
4044
|
-
|
|
4275
|
+
_ts_decorate35([
|
|
4276
|
+
Column32({
|
|
4045
4277
|
name: "state_id",
|
|
4046
4278
|
type: "varchar",
|
|
4047
4279
|
nullable: true
|
|
4048
4280
|
}),
|
|
4049
|
-
|
|
4281
|
+
_ts_metadata34("design:type", String)
|
|
4050
4282
|
], Oid4vcStateEntity.prototype, "stateId", void 0);
|
|
4051
|
-
|
|
4052
|
-
|
|
4283
|
+
_ts_decorate35([
|
|
4284
|
+
Column32({
|
|
4053
4285
|
name: "correlation_id",
|
|
4054
4286
|
type: "varchar",
|
|
4055
4287
|
nullable: true
|
|
4056
4288
|
}),
|
|
4057
|
-
|
|
4289
|
+
_ts_metadata34("design:type", String)
|
|
4058
4290
|
], Oid4vcStateEntity.prototype, "correlationId", void 0);
|
|
4059
|
-
|
|
4060
|
-
|
|
4291
|
+
_ts_decorate35([
|
|
4292
|
+
Column32({
|
|
4061
4293
|
name: "state",
|
|
4062
4294
|
type: "json",
|
|
4063
4295
|
nullable: false
|
|
4064
4296
|
}),
|
|
4065
|
-
|
|
4297
|
+
_ts_metadata34("design:type", typeof StateType === "undefined" ? Object : StateType)
|
|
4066
4298
|
], Oid4vcStateEntity.prototype, "state", void 0);
|
|
4067
|
-
|
|
4299
|
+
_ts_decorate35([
|
|
4068
4300
|
CreateDateColumn15({
|
|
4069
4301
|
name: "created_at",
|
|
4070
4302
|
nullable: false,
|
|
4071
4303
|
type: typeOrmDateTime18()
|
|
4072
4304
|
}),
|
|
4073
|
-
|
|
4305
|
+
_ts_metadata34("design:type", typeof Date === "undefined" ? Object : Date)
|
|
4074
4306
|
], Oid4vcStateEntity.prototype, "createdAt", void 0);
|
|
4075
|
-
|
|
4307
|
+
_ts_decorate35([
|
|
4076
4308
|
UpdateDateColumn15({
|
|
4077
4309
|
name: "updated_at",
|
|
4078
4310
|
nullable: false,
|
|
4079
4311
|
type: typeOrmDateTime18()
|
|
4080
4312
|
}),
|
|
4081
|
-
|
|
4313
|
+
_ts_metadata34("design:type", typeof Date === "undefined" ? Object : Date)
|
|
4082
4314
|
], Oid4vcStateEntity.prototype, "updatedAt", void 0);
|
|
4083
|
-
|
|
4084
|
-
|
|
4315
|
+
_ts_decorate35([
|
|
4316
|
+
Column32({
|
|
4085
4317
|
name: "expires_at",
|
|
4086
4318
|
nullable: true,
|
|
4087
4319
|
type: typeOrmDateTime18()
|
|
4088
4320
|
}),
|
|
4089
|
-
|
|
4321
|
+
_ts_metadata34("design:type", typeof Date === "undefined" ? Object : Date)
|
|
4090
4322
|
], Oid4vcStateEntity.prototype, "expiresAt", void 0);
|
|
4091
|
-
|
|
4092
|
-
|
|
4323
|
+
_ts_decorate35([
|
|
4324
|
+
Column32({
|
|
4093
4325
|
name: "tenant_id",
|
|
4094
4326
|
type: "varchar",
|
|
4095
4327
|
nullable: true
|
|
4096
4328
|
}),
|
|
4097
|
-
|
|
4329
|
+
_ts_metadata34("design:type", String)
|
|
4098
4330
|
], Oid4vcStateEntity.prototype, "tenantId", void 0);
|
|
4099
|
-
Oid4vcStateEntity =
|
|
4100
|
-
|
|
4331
|
+
Oid4vcStateEntity = _ts_decorate35([
|
|
4332
|
+
Entity28("Oid4vcStateEntity")
|
|
4101
4333
|
], Oid4vcStateEntity);
|
|
4102
4334
|
|
|
4103
4335
|
// src/contact/ContactStore.ts
|
|
@@ -5866,6 +6098,22 @@ var statusListEntityFrom = /* @__PURE__ */ __name((args) => {
|
|
|
5866
6098
|
});
|
|
5867
6099
|
return entity;
|
|
5868
6100
|
}
|
|
6101
|
+
if (args.type === StatusListType2.BitstringStatusList) {
|
|
6102
|
+
const entity = new BitstringStatusListEntity();
|
|
6103
|
+
const bitstringsl = args;
|
|
6104
|
+
entity.statusPurpose = bitstringsl.statusPurpose;
|
|
6105
|
+
entity.statusSize = bitstringsl.statusSize;
|
|
6106
|
+
entity.validFrom = bitstringsl.validFrom;
|
|
6107
|
+
entity.validUntil = bitstringsl.validUntil;
|
|
6108
|
+
entity.ttl = bitstringsl.ttl;
|
|
6109
|
+
setBaseFields(entity, args);
|
|
6110
|
+
Object.defineProperty(entity, "type", {
|
|
6111
|
+
value: StatusListType2.BitstringStatusList,
|
|
6112
|
+
enumerable: true,
|
|
6113
|
+
configurable: true
|
|
6114
|
+
});
|
|
6115
|
+
return entity;
|
|
6116
|
+
}
|
|
5869
6117
|
throw new Error(`Invalid status list type ${args.type}`);
|
|
5870
6118
|
}, "statusListEntityFrom");
|
|
5871
6119
|
var statusListFrom = /* @__PURE__ */ __name((entity) => {
|
|
@@ -5887,6 +6135,18 @@ var statusListFrom = /* @__PURE__ */ __name((entity) => {
|
|
|
5887
6135
|
};
|
|
5888
6136
|
return replaceNullWithUndefined(result);
|
|
5889
6137
|
}
|
|
6138
|
+
if (entity instanceof BitstringStatusListEntity) {
|
|
6139
|
+
const result = {
|
|
6140
|
+
...getBaseFields(entity),
|
|
6141
|
+
type: StatusListType2.BitstringStatusList,
|
|
6142
|
+
statusPurpose: entity.statusPurpose,
|
|
6143
|
+
statusSize: entity.statusSize,
|
|
6144
|
+
validFrom: entity.validFrom,
|
|
6145
|
+
validUntil: entity.validUntil,
|
|
6146
|
+
ttl: entity.ttl
|
|
6147
|
+
};
|
|
6148
|
+
return replaceNullWithUndefined(result);
|
|
6149
|
+
}
|
|
5890
6150
|
throw new Error(`Invalid status list type ${typeof entity}`);
|
|
5891
6151
|
}, "statusListFrom");
|
|
5892
6152
|
var setBaseFields = /* @__PURE__ */ __name((entity, args) => {
|
|
@@ -6175,6 +6435,8 @@ var StatusListStore = class {
|
|
|
6175
6435
|
return dataSource.getRepository(StatusList2021Entity);
|
|
6176
6436
|
case StatusListType3.OAuthStatusList:
|
|
6177
6437
|
return dataSource.getRepository(OAuthStatusListEntity);
|
|
6438
|
+
case StatusListType3.BitstringStatusList:
|
|
6439
|
+
return dataSource.getRepository(BitstringStatusListEntity);
|
|
6178
6440
|
default:
|
|
6179
6441
|
return dataSource.getRepository(StatusListEntity);
|
|
6180
6442
|
}
|
|
@@ -8648,6 +8910,199 @@ var FixCredentialClaimsReferencesUuid1741895822987 = class {
|
|
|
8648
8910
|
}
|
|
8649
8911
|
};
|
|
8650
8912
|
|
|
8913
|
+
// src/migrations/generic/12-CreateBitstringStatusList.ts
|
|
8914
|
+
import Debug19 from "debug";
|
|
8915
|
+
|
|
8916
|
+
// src/migrations/postgres/1741895823000-CreateBitstringStatusList.ts
|
|
8917
|
+
var CreateBitstringStatusListPG1741895823000 = class {
|
|
8918
|
+
static {
|
|
8919
|
+
__name(this, "CreateBitstringStatusListPG1741895823000");
|
|
8920
|
+
}
|
|
8921
|
+
name = "CreateBitstringStatusList1741895823000";
|
|
8922
|
+
async up(queryRunner) {
|
|
8923
|
+
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "statusSize" integer DEFAULT 1`);
|
|
8924
|
+
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "ttl" integer`);
|
|
8925
|
+
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "validFrom" TIMESTAMP`);
|
|
8926
|
+
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "validUntil" TIMESTAMP`);
|
|
8927
|
+
await queryRunner.query(`ALTER TABLE "StatusList" DROP CONSTRAINT IF EXISTS "CHK_StatusList_type"`);
|
|
8928
|
+
await queryRunner.query(`ALTER TABLE "StatusList" ADD CONSTRAINT "CHK_StatusList_type" CHECK ("type" IN ('StatusList2021', 'OAuthStatusList', 'BitstringStatusList'))`);
|
|
8929
|
+
await queryRunner.query(`
|
|
8930
|
+
CREATE TABLE "BitstringStatusListEntry" (
|
|
8931
|
+
"statusListId" character varying NOT NULL,
|
|
8932
|
+
"statusListIndex" integer NOT NULL,
|
|
8933
|
+
"credentialId" text,
|
|
8934
|
+
"credentialHash" character varying(128),
|
|
8935
|
+
"correlationId" character varying(255),
|
|
8936
|
+
"statusPurpose" character varying NOT NULL,
|
|
8937
|
+
"statusSize" integer DEFAULT 1,
|
|
8938
|
+
"statusMessage" text,
|
|
8939
|
+
"statusReference" text,
|
|
8940
|
+
CONSTRAINT "PK_BitstringStatusListEntry" PRIMARY KEY ("statusListId", "statusListIndex")
|
|
8941
|
+
)
|
|
8942
|
+
`);
|
|
8943
|
+
await queryRunner.query(`
|
|
8944
|
+
ALTER TABLE "BitstringStatusListEntry"
|
|
8945
|
+
ADD CONSTRAINT "FK_BitstringStatusListEntry_statusListId"
|
|
8946
|
+
FOREIGN KEY ("statusListId") REFERENCES "StatusList"("id") ON DELETE NO ACTION ON UPDATE NO ACTION
|
|
8947
|
+
`);
|
|
8948
|
+
}
|
|
8949
|
+
async down(queryRunner) {
|
|
8950
|
+
await queryRunner.query(`ALTER TABLE "BitstringStatusListEntry" DROP CONSTRAINT "FK_BitstringStatusListEntry_statusListId"`);
|
|
8951
|
+
await queryRunner.query(`DROP TABLE "BitstringStatusListEntry"`);
|
|
8952
|
+
await queryRunner.query(`ALTER TABLE "StatusList" DROP CONSTRAINT "CHK_StatusList_type"`);
|
|
8953
|
+
await queryRunner.query(`ALTER TABLE "StatusList" ADD CONSTRAINT "CHK_StatusList_type" CHECK ("type" IN ('StatusList2021', 'OAuthStatusList'))`);
|
|
8954
|
+
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "validUntil"`);
|
|
8955
|
+
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "validFrom"`);
|
|
8956
|
+
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "ttl"`);
|
|
8957
|
+
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "statusSize"`);
|
|
8958
|
+
}
|
|
8959
|
+
};
|
|
8960
|
+
|
|
8961
|
+
// src/migrations/sqlite/1741895823001-CreateBitstringStatusList.ts
|
|
8962
|
+
var CreateBitstringStatusListSqlite1741895823001 = class {
|
|
8963
|
+
static {
|
|
8964
|
+
__name(this, "CreateBitstringStatusListSqlite1741895823001");
|
|
8965
|
+
}
|
|
8966
|
+
name = "CreateBitstringStatusList1741895823000";
|
|
8967
|
+
async up(queryRunner) {
|
|
8968
|
+
await queryRunner.query(`
|
|
8969
|
+
CREATE TABLE "temporary_StatusList" (
|
|
8970
|
+
"id" varchar PRIMARY KEY NOT NULL,
|
|
8971
|
+
"correlationId" varchar NOT NULL,
|
|
8972
|
+
"length" integer NOT NULL,
|
|
8973
|
+
"issuer" text NOT NULL,
|
|
8974
|
+
"type" varchar CHECK( "type" IN ('StatusList2021', 'OAuthStatusList', 'BitstringStatusList') ) NOT NULL DEFAULT ('StatusList2021'),
|
|
8975
|
+
"driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'),
|
|
8976
|
+
"credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'),
|
|
8977
|
+
"proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt') ) NOT NULL DEFAULT ('lds'),
|
|
8978
|
+
"indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ),
|
|
8979
|
+
"statusPurpose" varchar,
|
|
8980
|
+
"statusListCredential" text,
|
|
8981
|
+
"bitsPerStatus" integer,
|
|
8982
|
+
"expiresAt" datetime,
|
|
8983
|
+
"statusSize" integer DEFAULT (1),
|
|
8984
|
+
"ttl" integer,
|
|
8985
|
+
"validFrom" datetime,
|
|
8986
|
+
"validUntil" datetime,
|
|
8987
|
+
CONSTRAINT "UQ_correlationId" UNIQUE ("correlationId")
|
|
8988
|
+
)
|
|
8989
|
+
`);
|
|
8990
|
+
await queryRunner.query(`
|
|
8991
|
+
INSERT INTO "temporary_StatusList"(
|
|
8992
|
+
"id", "correlationId", "length", "issuer", "type", "driverType",
|
|
8993
|
+
"credentialIdMode", "proofFormat", "indexingDirection", "statusPurpose",
|
|
8994
|
+
"statusListCredential", "bitsPerStatus", "expiresAt"
|
|
8995
|
+
)
|
|
8996
|
+
SELECT
|
|
8997
|
+
"id", "correlationId", "length", "issuer", "type", "driverType",
|
|
8998
|
+
"credentialIdMode", "proofFormat", "indexingDirection", "statusPurpose",
|
|
8999
|
+
"statusListCredential", "bitsPerStatus", "expiresAt"
|
|
9000
|
+
FROM "StatusList"
|
|
9001
|
+
`);
|
|
9002
|
+
await queryRunner.query(`DROP TABLE "StatusList"`);
|
|
9003
|
+
await queryRunner.query(`ALTER TABLE "temporary_StatusList" RENAME TO "StatusList"`);
|
|
9004
|
+
await queryRunner.query(`
|
|
9005
|
+
CREATE TABLE "BitstringStatusListEntry" (
|
|
9006
|
+
"statusListId" varchar NOT NULL,
|
|
9007
|
+
"statusListIndex" integer NOT NULL,
|
|
9008
|
+
"credentialId" text,
|
|
9009
|
+
"credentialHash" varchar(128),
|
|
9010
|
+
"correlationId" varchar(255),
|
|
9011
|
+
"statusPurpose" varchar NOT NULL,
|
|
9012
|
+
"statusSize" integer DEFAULT (1),
|
|
9013
|
+
"statusMessage" text,
|
|
9014
|
+
"statusReference" text,
|
|
9015
|
+
PRIMARY KEY ("statusListId", "statusListIndex")
|
|
9016
|
+
)
|
|
9017
|
+
`);
|
|
9018
|
+
}
|
|
9019
|
+
async down(queryRunner) {
|
|
9020
|
+
await queryRunner.query(`DROP TABLE "BitstringStatusListEntry"`);
|
|
9021
|
+
await queryRunner.query(`
|
|
9022
|
+
CREATE TABLE "temporary_StatusList" (
|
|
9023
|
+
"id" varchar PRIMARY KEY NOT NULL,
|
|
9024
|
+
"correlationId" varchar NOT NULL,
|
|
9025
|
+
"length" integer NOT NULL,
|
|
9026
|
+
"issuer" text NOT NULL,
|
|
9027
|
+
"type" varchar CHECK( "type" IN ('StatusList2021', 'OAuthStatusList') ) NOT NULL DEFAULT ('StatusList2021'),
|
|
9028
|
+
"driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'),
|
|
9029
|
+
"credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'),
|
|
9030
|
+
"proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt') ) NOT NULL DEFAULT ('lds'),
|
|
9031
|
+
"indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ),
|
|
9032
|
+
"statusPurpose" varchar,
|
|
9033
|
+
"statusListCredential" text,
|
|
9034
|
+
"bitsPerStatus" integer,
|
|
9035
|
+
"expiresAt" datetime,
|
|
9036
|
+
CONSTRAINT "UQ_correlationId" UNIQUE ("correlationId")
|
|
9037
|
+
)
|
|
9038
|
+
`);
|
|
9039
|
+
await queryRunner.query(`
|
|
9040
|
+
INSERT INTO "temporary_StatusList"(
|
|
9041
|
+
"id", "correlationId", "length", "issuer", "type", "driverType",
|
|
9042
|
+
"credentialIdMode", "proofFormat", "indexingDirection", "statusPurpose",
|
|
9043
|
+
"statusListCredential", "bitsPerStatus", "expiresAt"
|
|
9044
|
+
)
|
|
9045
|
+
SELECT
|
|
9046
|
+
"id", "correlationId", "length", "issuer",
|
|
9047
|
+
CASE WHEN "type" = 'BitstringStatusList' THEN 'StatusList2021' ELSE "type" END,
|
|
9048
|
+
"driverType", "credentialIdMode", "proofFormat", "indexingDirection",
|
|
9049
|
+
"statusPurpose", "statusListCredential", "bitsPerStatus", "expiresAt"
|
|
9050
|
+
FROM "StatusList"
|
|
9051
|
+
`);
|
|
9052
|
+
await queryRunner.query(`DROP TABLE "StatusList"`);
|
|
9053
|
+
await queryRunner.query(`ALTER TABLE "temporary_StatusList" RENAME TO "StatusList"`);
|
|
9054
|
+
}
|
|
9055
|
+
};
|
|
9056
|
+
|
|
9057
|
+
// src/migrations/generic/12-CreateBitstringStatusList.ts
|
|
9058
|
+
var debug19 = Debug19("sphereon:ssi-sdk:migrations");
|
|
9059
|
+
var CreateBitstringStatusList1741895823000 = class {
|
|
9060
|
+
static {
|
|
9061
|
+
__name(this, "CreateBitstringStatusList1741895823000");
|
|
9062
|
+
}
|
|
9063
|
+
name = "CreateBitstringStatusList1741895823000";
|
|
9064
|
+
async up(queryRunner) {
|
|
9065
|
+
debug19("migration: creating bitstring status list tables");
|
|
9066
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
9067
|
+
switch (dbType) {
|
|
9068
|
+
case "postgres": {
|
|
9069
|
+
const mig = new CreateBitstringStatusListPG1741895823000();
|
|
9070
|
+
await mig.up(queryRunner);
|
|
9071
|
+
return;
|
|
9072
|
+
}
|
|
9073
|
+
case "sqlite":
|
|
9074
|
+
case "expo":
|
|
9075
|
+
case "react-native": {
|
|
9076
|
+
const mig = new CreateBitstringStatusListSqlite1741895823001();
|
|
9077
|
+
await mig.up(queryRunner);
|
|
9078
|
+
return;
|
|
9079
|
+
}
|
|
9080
|
+
default:
|
|
9081
|
+
return Promise.reject(`Migrations only supported for sqlite and postgres. Was ${dbType}`);
|
|
9082
|
+
}
|
|
9083
|
+
}
|
|
9084
|
+
async down(queryRunner) {
|
|
9085
|
+
debug19("migration: dropping bitstring status list tables");
|
|
9086
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
9087
|
+
switch (dbType) {
|
|
9088
|
+
case "postgres": {
|
|
9089
|
+
const mig = new CreateBitstringStatusListPG1741895823000();
|
|
9090
|
+
await mig.down(queryRunner);
|
|
9091
|
+
return;
|
|
9092
|
+
}
|
|
9093
|
+
case "sqlite":
|
|
9094
|
+
case "expo":
|
|
9095
|
+
case "react-native": {
|
|
9096
|
+
const mig = new CreateBitstringStatusListSqlite1741895823001();
|
|
9097
|
+
await mig.down(queryRunner);
|
|
9098
|
+
return;
|
|
9099
|
+
}
|
|
9100
|
+
default:
|
|
9101
|
+
return Promise.reject(`Migrations only supported for sqlite and postgres. Was ${dbType}`);
|
|
9102
|
+
}
|
|
9103
|
+
}
|
|
9104
|
+
};
|
|
9105
|
+
|
|
8651
9106
|
// src/migrations/generic/index.ts
|
|
8652
9107
|
var DataStoreContactMigrations = [
|
|
8653
9108
|
CreateContacts1659463079429,
|
|
@@ -8660,7 +9115,8 @@ var DataStoreIssuanceBrandingMigrations = [
|
|
|
8660
9115
|
FixCredentialClaimsReferencesUuid1741895822987
|
|
8661
9116
|
];
|
|
8662
9117
|
var DataStoreStatusListMigrations = [
|
|
8663
|
-
CreateStatusList1693866470000
|
|
9118
|
+
CreateStatusList1693866470000,
|
|
9119
|
+
CreateBitstringStatusList1741895823000
|
|
8664
9120
|
];
|
|
8665
9121
|
var DataStoreEventLoggerMigrations = [
|
|
8666
9122
|
CreateAuditEvents1701635835330
|
|
@@ -8865,6 +9321,8 @@ var DataStoreStatusListEntities = [
|
|
|
8865
9321
|
StatusListEntity,
|
|
8866
9322
|
StatusList2021Entity,
|
|
8867
9323
|
OAuthStatusListEntity,
|
|
9324
|
+
BitstringStatusListEntity,
|
|
9325
|
+
BitstringStatusListEntryEntity,
|
|
8868
9326
|
StatusListEntryEntity
|
|
8869
9327
|
];
|
|
8870
9328
|
var DataStoreEventLoggerEntities = [
|
|
@@ -8896,6 +9354,8 @@ export {
|
|
|
8896
9354
|
BaseConfigEntity,
|
|
8897
9355
|
BaseContactEntity,
|
|
8898
9356
|
BaseLocaleBrandingEntity,
|
|
9357
|
+
BitstringStatusListEntity,
|
|
9358
|
+
BitstringStatusListEntryEntity,
|
|
8899
9359
|
ConnectionEntity,
|
|
8900
9360
|
ConnectionType,
|
|
8901
9361
|
ContactMetadataItemEntity,
|