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