@sphereon/ssi-sdk.data-store 0.34.1-next.7 → 0.34.1-next.86
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 +982 -504
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +112 -27
- package/dist/index.d.ts +112 -27
- package/dist/index.js +928 -450
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/src/__tests__/statusList.entities.test.ts +58 -1
- package/src/__tests__/statusList.store.test.ts +64 -1
- package/src/entities/statusList/BitstringStatusListEntryEntity.ts +60 -0
- package/src/entities/statusList/StatusList2021EntryEntity.ts +4 -3
- package/src/entities/statusList/StatusListEntities.ts +54 -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/1737110469001-UpdateStatusList.ts +1 -1
- package/src/migrations/postgres/1741895823000-CreateBitstringStatusList.ts +55 -0
- package/src/migrations/sqlite/1741895823001-CreateBitstringStatusList.ts +145 -0
- package/src/statusList/IStatusListStore.ts +14 -11
- package/src/statusList/StatusListStore.ts +73 -35
- package/src/types/digitalCredential/enums.ts +1 -1
- package/src/types/statusList/IAbstractStatusListStore.ts +54 -4
- package/src/types/statusList/statusList.ts +50 -2
- package/src/utils/statusList/MappingUtils.ts +71 -30
package/dist/index.cjs
CHANGED
|
@@ -41,6 +41,8 @@ __export(index_exports, {
|
|
|
41
41
|
BaseConfigEntity: () => BaseConfigEntity,
|
|
42
42
|
BaseContactEntity: () => BaseContactEntity,
|
|
43
43
|
BaseLocaleBrandingEntity: () => BaseLocaleBrandingEntity,
|
|
44
|
+
BitstringStatusListEntity: () => BitstringStatusListEntity,
|
|
45
|
+
BitstringStatusListEntryEntity: () => BitstringStatusListEntryEntity,
|
|
44
46
|
ConnectionEntity: () => ConnectionEntity,
|
|
45
47
|
ConnectionType: () => ConnectionType,
|
|
46
48
|
ContactMetadataItemEntity: () => ContactMetadataItemEntity,
|
|
@@ -172,55 +174,55 @@ var import_typeorm12 = __toESM(require("typeorm"), 1);
|
|
|
172
174
|
var import_typeorm11 = __toESM(require("typeorm"), 1);
|
|
173
175
|
|
|
174
176
|
// src/types/contact/contact.ts
|
|
175
|
-
var ConnectionType = /* @__PURE__ */ function(ConnectionType2) {
|
|
177
|
+
var ConnectionType = /* @__PURE__ */ (function(ConnectionType2) {
|
|
176
178
|
ConnectionType2["OPENID_CONNECT"] = "OIDC";
|
|
177
179
|
ConnectionType2["SIOPv2"] = "SIOPv2";
|
|
178
180
|
ConnectionType2["SIOPv2_OpenID4VP"] = "SIOPv2+OpenID4VP";
|
|
179
181
|
return ConnectionType2;
|
|
180
|
-
}({});
|
|
181
|
-
var CorrelationIdentifierType = /* @__PURE__ */ function(CorrelationIdentifierType2) {
|
|
182
|
+
})({});
|
|
183
|
+
var CorrelationIdentifierType = /* @__PURE__ */ (function(CorrelationIdentifierType2) {
|
|
182
184
|
CorrelationIdentifierType2["DID"] = "did";
|
|
183
185
|
CorrelationIdentifierType2["URL"] = "url";
|
|
184
186
|
return CorrelationIdentifierType2;
|
|
185
|
-
}({});
|
|
186
|
-
var PartyTypeType = /* @__PURE__ */ function(PartyTypeType2) {
|
|
187
|
+
})({});
|
|
188
|
+
var PartyTypeType = /* @__PURE__ */ (function(PartyTypeType2) {
|
|
187
189
|
PartyTypeType2["NATURAL_PERSON"] = "naturalPerson";
|
|
188
190
|
PartyTypeType2["ORGANIZATION"] = "organization";
|
|
189
191
|
return PartyTypeType2;
|
|
190
|
-
}({});
|
|
191
|
-
var PartyOrigin = /* @__PURE__ */ function(PartyOrigin2) {
|
|
192
|
+
})({});
|
|
193
|
+
var PartyOrigin = /* @__PURE__ */ (function(PartyOrigin2) {
|
|
192
194
|
PartyOrigin2["INTERNAL"] = "INTERNAL";
|
|
193
195
|
PartyOrigin2["EXTERNAL"] = "EXTERNAL";
|
|
194
196
|
return PartyOrigin2;
|
|
195
|
-
}({});
|
|
196
|
-
var IdentityOrigin = /* @__PURE__ */ function(IdentityOrigin2) {
|
|
197
|
+
})({});
|
|
198
|
+
var IdentityOrigin = /* @__PURE__ */ (function(IdentityOrigin2) {
|
|
197
199
|
IdentityOrigin2["INTERNAL"] = "INTERNAL";
|
|
198
200
|
IdentityOrigin2["EXTERNAL"] = "EXTERNAL";
|
|
199
201
|
return IdentityOrigin2;
|
|
200
|
-
}({});
|
|
202
|
+
})({});
|
|
201
203
|
|
|
202
204
|
// src/types/digitalCredential/enums.ts
|
|
203
|
-
var DocumentType = /* @__PURE__ */ function(DocumentType2) {
|
|
205
|
+
var DocumentType = /* @__PURE__ */ (function(DocumentType2) {
|
|
204
206
|
DocumentType2["VC"] = "VC";
|
|
205
207
|
DocumentType2["VP"] = "VP";
|
|
206
208
|
DocumentType2["P"] = "P";
|
|
207
209
|
DocumentType2["C"] = "C";
|
|
208
210
|
return DocumentType2;
|
|
209
|
-
}({});
|
|
210
|
-
var RegulationType = /* @__PURE__ */ function(RegulationType2) {
|
|
211
|
+
})({});
|
|
212
|
+
var RegulationType = /* @__PURE__ */ (function(RegulationType2) {
|
|
211
213
|
RegulationType2["PID"] = "PID";
|
|
212
214
|
RegulationType2["QEAA"] = "QEAA";
|
|
213
215
|
RegulationType2["EAA"] = "EAA";
|
|
214
216
|
RegulationType2["NON_REGULATED"] = "NON_REGULATED";
|
|
215
217
|
return RegulationType2;
|
|
216
|
-
}({});
|
|
217
|
-
var CredentialDocumentFormat = /* @__PURE__ */ function(CredentialDocumentFormat2) {
|
|
218
|
+
})({});
|
|
219
|
+
var CredentialDocumentFormat = /* @__PURE__ */ (function(CredentialDocumentFormat2) {
|
|
218
220
|
CredentialDocumentFormat2["JSON_LD"] = "JSON_LD";
|
|
219
221
|
CredentialDocumentFormat2["JWT"] = "JWT";
|
|
220
222
|
CredentialDocumentFormat2["SD_JWT"] = "SD_JWT";
|
|
221
223
|
CredentialDocumentFormat2["MSO_MDOC"] = "MSO_MDOC";
|
|
222
224
|
return CredentialDocumentFormat2;
|
|
223
|
-
}({});
|
|
225
|
+
})({});
|
|
224
226
|
(function(CredentialDocumentFormat2) {
|
|
225
227
|
function fromSpecValue(credentialFormat) {
|
|
226
228
|
const format = credentialFormat.toLowerCase();
|
|
@@ -241,7 +243,7 @@ var CredentialDocumentFormat = /* @__PURE__ */ function(CredentialDocumentFormat
|
|
|
241
243
|
function toSpecValue(documentFormat, documentType) {
|
|
242
244
|
switch (documentFormat) {
|
|
243
245
|
case "SD_JWT":
|
|
244
|
-
return "
|
|
246
|
+
return "dc+sd-jwt";
|
|
245
247
|
case "MSO_MDOC":
|
|
246
248
|
return "mso_mdoc";
|
|
247
249
|
case "JSON_LD":
|
|
@@ -253,26 +255,26 @@ var CredentialDocumentFormat = /* @__PURE__ */ function(CredentialDocumentFormat
|
|
|
253
255
|
__name(toSpecValue, "toSpecValue");
|
|
254
256
|
CredentialDocumentFormat2.toSpecValue = toSpecValue;
|
|
255
257
|
})(CredentialDocumentFormat || (CredentialDocumentFormat = {}));
|
|
256
|
-
var CredentialCorrelationType = /* @__PURE__ */ function(CredentialCorrelationType2) {
|
|
258
|
+
var CredentialCorrelationType = /* @__PURE__ */ (function(CredentialCorrelationType2) {
|
|
257
259
|
CredentialCorrelationType2["DID"] = "DID";
|
|
258
260
|
CredentialCorrelationType2["X509_SAN"] = "X509_SAN";
|
|
259
261
|
CredentialCorrelationType2["KID"] = "KID";
|
|
260
262
|
CredentialCorrelationType2["URL"] = "URL";
|
|
261
263
|
return CredentialCorrelationType2;
|
|
262
|
-
}({});
|
|
263
|
-
var CredentialRole = /* @__PURE__ */ function(CredentialRole2) {
|
|
264
|
+
})({});
|
|
265
|
+
var CredentialRole = /* @__PURE__ */ (function(CredentialRole2) {
|
|
264
266
|
CredentialRole2["ISSUER"] = "ISSUER";
|
|
265
267
|
CredentialRole2["VERIFIER"] = "VERIFIER";
|
|
266
268
|
CredentialRole2["HOLDER"] = "HOLDER";
|
|
267
269
|
CredentialRole2["FEDERATION_TRUST_ANCHOR"] = "FEDERATION_TRUST_ANCHOR";
|
|
268
270
|
return CredentialRole2;
|
|
269
|
-
}({});
|
|
270
|
-
var CredentialStateType = /* @__PURE__ */ function(CredentialStateType2) {
|
|
271
|
+
})({});
|
|
272
|
+
var CredentialStateType = /* @__PURE__ */ (function(CredentialStateType2) {
|
|
271
273
|
CredentialStateType2["REVOKED"] = "REVOKED";
|
|
272
274
|
CredentialStateType2["VERIFIED"] = "VERIFIED";
|
|
273
275
|
CredentialStateType2["EXPIRED"] = "EXPIRED";
|
|
274
276
|
return CredentialStateType2;
|
|
275
|
-
}({});
|
|
277
|
+
})({});
|
|
276
278
|
|
|
277
279
|
// src/entities/contact/IdentityEntity.ts
|
|
278
280
|
var import_typeorm10 = require("typeorm");
|
|
@@ -2856,7 +2858,7 @@ IssuerLocaleBrandingEntity = _ts_decorate25([
|
|
|
2856
2858
|
|
|
2857
2859
|
// src/entities/statusList/StatusListEntities.ts
|
|
2858
2860
|
var import_ssi_types = require("@sphereon/ssi-types");
|
|
2859
|
-
var
|
|
2861
|
+
var import_typeorm27 = __toESM(require("typeorm"), 1);
|
|
2860
2862
|
|
|
2861
2863
|
// src/entities/statusList/StatusList2021EntryEntity.ts
|
|
2862
2864
|
var import_class_validator18 = require("class-validator");
|
|
@@ -2909,7 +2911,7 @@ _ts_decorate26([
|
|
|
2909
2911
|
_ts_metadata25("design:type", Number)
|
|
2910
2912
|
], StatusListEntryEntity.prototype, "statusListIndex", void 0);
|
|
2911
2913
|
_ts_decorate26([
|
|
2912
|
-
(0, import_typeorm25.ManyToOne)(() =>
|
|
2914
|
+
(0, import_typeorm25.ManyToOne)(() => StatusList2021Entity, (statusList) => statusList.statusListEntries),
|
|
2913
2915
|
(0, import_typeorm25.JoinColumn)({
|
|
2914
2916
|
name: "statusListId"
|
|
2915
2917
|
}),
|
|
@@ -2954,11 +2956,20 @@ _ts_decorate26([
|
|
|
2954
2956
|
_ts_metadata25("design:type", String)
|
|
2955
2957
|
], StatusListEntryEntity.prototype, "value", void 0);
|
|
2956
2958
|
StatusListEntryEntity = _ts_decorate26([
|
|
2957
|
-
(0, import_typeorm25.Entity)("StatusListEntry")
|
|
2959
|
+
(0, import_typeorm25.Entity)("StatusListEntry"),
|
|
2960
|
+
(0, import_typeorm25.TableInheritance)({
|
|
2961
|
+
column: {
|
|
2962
|
+
type: "varchar",
|
|
2963
|
+
name: "type"
|
|
2964
|
+
}
|
|
2965
|
+
})
|
|
2958
2966
|
], StatusListEntryEntity);
|
|
2959
2967
|
|
|
2960
2968
|
// src/entities/statusList/StatusListEntities.ts
|
|
2961
2969
|
var import_ssi_sdk13 = require("@sphereon/ssi-sdk.agent-config");
|
|
2970
|
+
|
|
2971
|
+
// src/entities/statusList/BitstringStatusListEntryEntity.ts
|
|
2972
|
+
var import_typeorm26 = require("typeorm");
|
|
2962
2973
|
function _ts_decorate27(decorators, target, key, desc) {
|
|
2963
2974
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2964
2975
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2970,7 +2981,99 @@ function _ts_metadata26(k, v) {
|
|
|
2970
2981
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2971
2982
|
}
|
|
2972
2983
|
__name(_ts_metadata26, "_ts_metadata");
|
|
2973
|
-
var
|
|
2984
|
+
var BitstringStatusListEntryEntity = class extends StatusListEntryEntity {
|
|
2985
|
+
static {
|
|
2986
|
+
__name(this, "BitstringStatusListEntryEntity");
|
|
2987
|
+
}
|
|
2988
|
+
statusPurpose;
|
|
2989
|
+
bitsPerStatus;
|
|
2990
|
+
statusMessage;
|
|
2991
|
+
statusReference;
|
|
2992
|
+
};
|
|
2993
|
+
_ts_decorate27([
|
|
2994
|
+
(0, import_typeorm26.Column)({
|
|
2995
|
+
type: "varchar",
|
|
2996
|
+
name: "statusPurpose",
|
|
2997
|
+
nullable: false
|
|
2998
|
+
}),
|
|
2999
|
+
_ts_metadata26("design:type", String)
|
|
3000
|
+
], BitstringStatusListEntryEntity.prototype, "statusPurpose", void 0);
|
|
3001
|
+
_ts_decorate27([
|
|
3002
|
+
(0, import_typeorm26.Column)({
|
|
3003
|
+
type: "integer",
|
|
3004
|
+
name: "bitsPerStatus",
|
|
3005
|
+
nullable: true,
|
|
3006
|
+
default: 1
|
|
3007
|
+
}),
|
|
3008
|
+
_ts_metadata26("design:type", Number)
|
|
3009
|
+
], BitstringStatusListEntryEntity.prototype, "bitsPerStatus", void 0);
|
|
3010
|
+
_ts_decorate27([
|
|
3011
|
+
(0, import_typeorm26.Column)({
|
|
3012
|
+
type: "text",
|
|
3013
|
+
name: "statusMessage",
|
|
3014
|
+
nullable: true,
|
|
3015
|
+
transformer: {
|
|
3016
|
+
from(value) {
|
|
3017
|
+
if (!value) {
|
|
3018
|
+
return void 0;
|
|
3019
|
+
}
|
|
3020
|
+
return JSON.parse(value);
|
|
3021
|
+
},
|
|
3022
|
+
to(value) {
|
|
3023
|
+
if (!value) {
|
|
3024
|
+
return void 0;
|
|
3025
|
+
}
|
|
3026
|
+
return JSON.stringify(value);
|
|
3027
|
+
}
|
|
3028
|
+
}
|
|
3029
|
+
}),
|
|
3030
|
+
_ts_metadata26("design:type", typeof Array === "undefined" ? Object : Array)
|
|
3031
|
+
], BitstringStatusListEntryEntity.prototype, "statusMessage", void 0);
|
|
3032
|
+
_ts_decorate27([
|
|
3033
|
+
(0, import_typeorm26.Column)({
|
|
3034
|
+
type: "text",
|
|
3035
|
+
name: "statusReference",
|
|
3036
|
+
nullable: true,
|
|
3037
|
+
transformer: {
|
|
3038
|
+
from(value) {
|
|
3039
|
+
if (!value) {
|
|
3040
|
+
return void 0;
|
|
3041
|
+
}
|
|
3042
|
+
if (value.startsWith("[")) {
|
|
3043
|
+
return JSON.parse(value);
|
|
3044
|
+
}
|
|
3045
|
+
return value;
|
|
3046
|
+
},
|
|
3047
|
+
to(value) {
|
|
3048
|
+
if (!value) {
|
|
3049
|
+
return void 0;
|
|
3050
|
+
}
|
|
3051
|
+
if (Array.isArray(value)) {
|
|
3052
|
+
return JSON.stringify(value);
|
|
3053
|
+
}
|
|
3054
|
+
return value;
|
|
3055
|
+
}
|
|
3056
|
+
}
|
|
3057
|
+
}),
|
|
3058
|
+
_ts_metadata26("design:type", Object)
|
|
3059
|
+
], BitstringStatusListEntryEntity.prototype, "statusReference", void 0);
|
|
3060
|
+
BitstringStatusListEntryEntity = _ts_decorate27([
|
|
3061
|
+
(0, import_typeorm26.ChildEntity)("bitstring")
|
|
3062
|
+
], BitstringStatusListEntryEntity);
|
|
3063
|
+
|
|
3064
|
+
// src/entities/statusList/StatusListEntities.ts
|
|
3065
|
+
function _ts_decorate28(decorators, target, key, desc) {
|
|
3066
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3067
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3068
|
+
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;
|
|
3069
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3070
|
+
}
|
|
3071
|
+
__name(_ts_decorate28, "_ts_decorate");
|
|
3072
|
+
function _ts_metadata27(k, v) {
|
|
3073
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3074
|
+
}
|
|
3075
|
+
__name(_ts_metadata27, "_ts_metadata");
|
|
3076
|
+
var { BaseEntity: BaseEntity20, ChildEntity: ChildEntity6, Column: Column25, Entity: Entity22, OneToMany: OneToMany8, PrimaryColumn: PrimaryColumn2, TableInheritance: TableInheritance5, Unique } = import_typeorm27.default;
|
|
2974
3077
|
var StatusListEntity = class extends BaseEntity20 {
|
|
2975
3078
|
static {
|
|
2976
3079
|
__name(this, "StatusListEntity");
|
|
@@ -2978,39 +3081,47 @@ var StatusListEntity = class extends BaseEntity20 {
|
|
|
2978
3081
|
id;
|
|
2979
3082
|
correlationId;
|
|
2980
3083
|
length;
|
|
3084
|
+
type;
|
|
2981
3085
|
issuer;
|
|
2982
3086
|
driverType;
|
|
2983
3087
|
credentialIdMode;
|
|
2984
3088
|
proofFormat;
|
|
2985
3089
|
statusListCredential;
|
|
2986
|
-
statusListEntries;
|
|
2987
3090
|
};
|
|
2988
|
-
|
|
3091
|
+
_ts_decorate28([
|
|
2989
3092
|
PrimaryColumn2({
|
|
2990
3093
|
name: "id",
|
|
2991
3094
|
type: "varchar"
|
|
2992
3095
|
}),
|
|
2993
|
-
|
|
3096
|
+
_ts_metadata27("design:type", String)
|
|
2994
3097
|
], StatusListEntity.prototype, "id", void 0);
|
|
2995
|
-
|
|
2996
|
-
|
|
3098
|
+
_ts_decorate28([
|
|
3099
|
+
Column25({
|
|
2997
3100
|
name: "correlationId",
|
|
2998
3101
|
type: "varchar",
|
|
2999
3102
|
nullable: false
|
|
3000
3103
|
}),
|
|
3001
|
-
|
|
3104
|
+
_ts_metadata27("design:type", String)
|
|
3002
3105
|
], StatusListEntity.prototype, "correlationId", void 0);
|
|
3003
|
-
|
|
3004
|
-
|
|
3106
|
+
_ts_decorate28([
|
|
3107
|
+
Column25({
|
|
3005
3108
|
name: "length",
|
|
3006
3109
|
type: "integer",
|
|
3007
3110
|
nullable: false,
|
|
3008
3111
|
unique: false
|
|
3009
3112
|
}),
|
|
3010
|
-
|
|
3113
|
+
_ts_metadata27("design:type", Number)
|
|
3011
3114
|
], StatusListEntity.prototype, "length", void 0);
|
|
3012
|
-
|
|
3013
|
-
|
|
3115
|
+
_ts_decorate28([
|
|
3116
|
+
Column25("simple-enum", {
|
|
3117
|
+
name: "type",
|
|
3118
|
+
enum: import_ssi_types.StatusListType,
|
|
3119
|
+
nullable: false
|
|
3120
|
+
}),
|
|
3121
|
+
_ts_metadata27("design:type", typeof import_ssi_types.StatusListType === "undefined" ? Object : import_ssi_types.StatusListType)
|
|
3122
|
+
], StatusListEntity.prototype, "type", void 0);
|
|
3123
|
+
_ts_decorate28([
|
|
3124
|
+
Column25({
|
|
3014
3125
|
name: "issuer",
|
|
3015
3126
|
type: "text",
|
|
3016
3127
|
nullable: false,
|
|
@@ -3030,28 +3141,28 @@ _ts_decorate27([
|
|
|
3030
3141
|
}
|
|
3031
3142
|
}
|
|
3032
3143
|
}),
|
|
3033
|
-
|
|
3144
|
+
_ts_metadata27("design:type", Object)
|
|
3034
3145
|
], StatusListEntity.prototype, "issuer", void 0);
|
|
3035
|
-
|
|
3036
|
-
|
|
3146
|
+
_ts_decorate28([
|
|
3147
|
+
Column25("simple-enum", {
|
|
3037
3148
|
name: "driverType",
|
|
3038
3149
|
enum: import_ssi_types.StatusListDriverType,
|
|
3039
3150
|
nullable: false,
|
|
3040
3151
|
default: import_ssi_types.StatusListDriverType.AGENT_TYPEORM
|
|
3041
3152
|
}),
|
|
3042
|
-
|
|
3153
|
+
_ts_metadata27("design:type", typeof import_ssi_types.StatusListDriverType === "undefined" ? Object : import_ssi_types.StatusListDriverType)
|
|
3043
3154
|
], StatusListEntity.prototype, "driverType", void 0);
|
|
3044
|
-
|
|
3045
|
-
|
|
3155
|
+
_ts_decorate28([
|
|
3156
|
+
Column25("simple-enum", {
|
|
3046
3157
|
name: "credentialIdMode",
|
|
3047
3158
|
enum: import_ssi_types.StatusListCredentialIdMode,
|
|
3048
3159
|
nullable: false,
|
|
3049
3160
|
default: import_ssi_types.StatusListCredentialIdMode.ISSUANCE
|
|
3050
3161
|
}),
|
|
3051
|
-
|
|
3162
|
+
_ts_metadata27("design:type", typeof import_ssi_types.StatusListCredentialIdMode === "undefined" ? Object : import_ssi_types.StatusListCredentialIdMode)
|
|
3052
3163
|
], StatusListEntity.prototype, "credentialIdMode", void 0);
|
|
3053
|
-
|
|
3054
|
-
|
|
3164
|
+
_ts_decorate28([
|
|
3165
|
+
Column25({
|
|
3055
3166
|
type: "varchar",
|
|
3056
3167
|
name: "proofFormat",
|
|
3057
3168
|
enum: [
|
|
@@ -3061,10 +3172,10 @@ _ts_decorate27([
|
|
|
3061
3172
|
nullable: false,
|
|
3062
3173
|
default: "lds"
|
|
3063
3174
|
}),
|
|
3064
|
-
|
|
3175
|
+
_ts_metadata27("design:type", typeof CredentialProofFormat === "undefined" ? Object : CredentialProofFormat)
|
|
3065
3176
|
], StatusListEntity.prototype, "proofFormat", void 0);
|
|
3066
|
-
|
|
3067
|
-
|
|
3177
|
+
_ts_decorate28([
|
|
3178
|
+
Column25({
|
|
3068
3179
|
name: "statusListCredential",
|
|
3069
3180
|
type: "text",
|
|
3070
3181
|
nullable: true,
|
|
@@ -3084,18 +3195,14 @@ _ts_decorate27([
|
|
|
3084
3195
|
}
|
|
3085
3196
|
}
|
|
3086
3197
|
}),
|
|
3087
|
-
|
|
3198
|
+
_ts_metadata27("design:type", typeof StatusListCredential === "undefined" ? Object : StatusListCredential)
|
|
3088
3199
|
], StatusListEntity.prototype, "statusListCredential", void 0);
|
|
3089
|
-
|
|
3090
|
-
OneToMany8((type) => StatusListEntryEntity, (entry) => entry.statusList),
|
|
3091
|
-
_ts_metadata26("design:type", Array)
|
|
3092
|
-
], StatusListEntity.prototype, "statusListEntries", void 0);
|
|
3093
|
-
StatusListEntity = _ts_decorate27([
|
|
3200
|
+
StatusListEntity = _ts_decorate28([
|
|
3094
3201
|
Entity22("StatusList"),
|
|
3095
3202
|
Unique("UQ_correlationId", [
|
|
3096
3203
|
"correlationId"
|
|
3097
3204
|
]),
|
|
3098
|
-
|
|
3205
|
+
TableInheritance5({
|
|
3099
3206
|
column: {
|
|
3100
3207
|
type: "simple-enum",
|
|
3101
3208
|
name: "type",
|
|
@@ -3109,9 +3216,10 @@ var StatusList2021Entity = class extends StatusListEntity {
|
|
|
3109
3216
|
}
|
|
3110
3217
|
indexingDirection;
|
|
3111
3218
|
statusPurpose;
|
|
3219
|
+
statusListEntries;
|
|
3112
3220
|
};
|
|
3113
|
-
|
|
3114
|
-
|
|
3221
|
+
_ts_decorate28([
|
|
3222
|
+
Column25({
|
|
3115
3223
|
type: "varchar",
|
|
3116
3224
|
name: "indexingDirection",
|
|
3117
3225
|
enum: [
|
|
@@ -3120,19 +3228,23 @@ _ts_decorate27([
|
|
|
3120
3228
|
nullable: false,
|
|
3121
3229
|
default: "rightToLeft"
|
|
3122
3230
|
}),
|
|
3123
|
-
|
|
3231
|
+
_ts_metadata27("design:type", typeof StatusListIndexingDirection === "undefined" ? Object : StatusListIndexingDirection)
|
|
3124
3232
|
], StatusList2021Entity.prototype, "indexingDirection", void 0);
|
|
3125
|
-
|
|
3126
|
-
|
|
3233
|
+
_ts_decorate28([
|
|
3234
|
+
Column25({
|
|
3127
3235
|
type: "varchar",
|
|
3128
3236
|
name: "statusPurpose",
|
|
3129
3237
|
nullable: false,
|
|
3130
3238
|
default: "revocation"
|
|
3131
3239
|
}),
|
|
3132
|
-
|
|
3240
|
+
_ts_metadata27("design:type", typeof StatusPurpose2021 === "undefined" ? Object : StatusPurpose2021)
|
|
3133
3241
|
], StatusList2021Entity.prototype, "statusPurpose", void 0);
|
|
3134
|
-
|
|
3135
|
-
|
|
3242
|
+
_ts_decorate28([
|
|
3243
|
+
OneToMany8((type) => StatusListEntryEntity, (entry) => entry.statusList),
|
|
3244
|
+
_ts_metadata27("design:type", Array)
|
|
3245
|
+
], StatusList2021Entity.prototype, "statusListEntries", void 0);
|
|
3246
|
+
StatusList2021Entity = _ts_decorate28([
|
|
3247
|
+
ChildEntity6(import_ssi_types.StatusListType.StatusList2021)
|
|
3136
3248
|
], StatusList2021Entity);
|
|
3137
3249
|
var OAuthStatusListEntity = class extends StatusListEntity {
|
|
3138
3250
|
static {
|
|
@@ -3141,41 +3253,113 @@ var OAuthStatusListEntity = class extends StatusListEntity {
|
|
|
3141
3253
|
bitsPerStatus;
|
|
3142
3254
|
expiresAt;
|
|
3143
3255
|
};
|
|
3144
|
-
|
|
3145
|
-
|
|
3256
|
+
_ts_decorate28([
|
|
3257
|
+
Column25({
|
|
3146
3258
|
type: "integer",
|
|
3147
3259
|
name: "bitsPerStatus",
|
|
3148
3260
|
nullable: false
|
|
3149
3261
|
}),
|
|
3150
|
-
|
|
3262
|
+
_ts_metadata27("design:type", Number)
|
|
3151
3263
|
], OAuthStatusListEntity.prototype, "bitsPerStatus", void 0);
|
|
3152
|
-
|
|
3153
|
-
|
|
3264
|
+
_ts_decorate28([
|
|
3265
|
+
Column25({
|
|
3154
3266
|
name: "expiresAt",
|
|
3155
3267
|
nullable: true,
|
|
3156
3268
|
type: (0, import_ssi_sdk13.typeOrmDateTime)()
|
|
3157
3269
|
}),
|
|
3158
|
-
|
|
3270
|
+
_ts_metadata27("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3159
3271
|
], OAuthStatusListEntity.prototype, "expiresAt", void 0);
|
|
3160
|
-
OAuthStatusListEntity =
|
|
3161
|
-
|
|
3272
|
+
OAuthStatusListEntity = _ts_decorate28([
|
|
3273
|
+
ChildEntity6(import_ssi_types.StatusListType.OAuthStatusList)
|
|
3162
3274
|
], OAuthStatusListEntity);
|
|
3275
|
+
var BitstringStatusListEntity = class extends StatusListEntity {
|
|
3276
|
+
static {
|
|
3277
|
+
__name(this, "BitstringStatusListEntity");
|
|
3278
|
+
}
|
|
3279
|
+
statusPurpose;
|
|
3280
|
+
bitsPerStatus;
|
|
3281
|
+
validFrom;
|
|
3282
|
+
validUntil;
|
|
3283
|
+
ttl;
|
|
3284
|
+
statusListEntries;
|
|
3285
|
+
};
|
|
3286
|
+
_ts_decorate28([
|
|
3287
|
+
Column25({
|
|
3288
|
+
type: "varchar",
|
|
3289
|
+
name: "statusPurpose",
|
|
3290
|
+
nullable: false,
|
|
3291
|
+
transformer: {
|
|
3292
|
+
from(value) {
|
|
3293
|
+
if (value?.includes(",")) {
|
|
3294
|
+
return value.split(",").map((v) => v.trim());
|
|
3295
|
+
}
|
|
3296
|
+
return value;
|
|
3297
|
+
},
|
|
3298
|
+
to(value) {
|
|
3299
|
+
if (Array.isArray(value)) {
|
|
3300
|
+
return value.join(",");
|
|
3301
|
+
}
|
|
3302
|
+
return value;
|
|
3303
|
+
}
|
|
3304
|
+
}
|
|
3305
|
+
}),
|
|
3306
|
+
_ts_metadata27("design:type", Object)
|
|
3307
|
+
], BitstringStatusListEntity.prototype, "statusPurpose", void 0);
|
|
3308
|
+
_ts_decorate28([
|
|
3309
|
+
Column25({
|
|
3310
|
+
type: "integer",
|
|
3311
|
+
name: "bitsPerStatus",
|
|
3312
|
+
nullable: false
|
|
3313
|
+
}),
|
|
3314
|
+
_ts_metadata27("design:type", Number)
|
|
3315
|
+
], BitstringStatusListEntity.prototype, "bitsPerStatus", void 0);
|
|
3316
|
+
_ts_decorate28([
|
|
3317
|
+
Column25({
|
|
3318
|
+
name: "validFrom",
|
|
3319
|
+
nullable: true,
|
|
3320
|
+
type: (0, import_ssi_sdk13.typeOrmDateTime)()
|
|
3321
|
+
}),
|
|
3322
|
+
_ts_metadata27("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3323
|
+
], BitstringStatusListEntity.prototype, "validFrom", void 0);
|
|
3324
|
+
_ts_decorate28([
|
|
3325
|
+
Column25({
|
|
3326
|
+
name: "validUntil",
|
|
3327
|
+
nullable: true,
|
|
3328
|
+
type: (0, import_ssi_sdk13.typeOrmDateTime)()
|
|
3329
|
+
}),
|
|
3330
|
+
_ts_metadata27("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3331
|
+
], BitstringStatusListEntity.prototype, "validUntil", void 0);
|
|
3332
|
+
_ts_decorate28([
|
|
3333
|
+
Column25({
|
|
3334
|
+
type: "integer",
|
|
3335
|
+
name: "ttl",
|
|
3336
|
+
nullable: true
|
|
3337
|
+
}),
|
|
3338
|
+
_ts_metadata27("design:type", Number)
|
|
3339
|
+
], BitstringStatusListEntity.prototype, "ttl", void 0);
|
|
3340
|
+
_ts_decorate28([
|
|
3341
|
+
OneToMany8((type) => BitstringStatusListEntryEntity, (entry) => entry.statusList),
|
|
3342
|
+
_ts_metadata27("design:type", Array)
|
|
3343
|
+
], BitstringStatusListEntity.prototype, "statusListEntries", void 0);
|
|
3344
|
+
BitstringStatusListEntity = _ts_decorate28([
|
|
3345
|
+
ChildEntity6(import_ssi_types.StatusListType.BitstringStatusList)
|
|
3346
|
+
], BitstringStatusListEntity);
|
|
3163
3347
|
|
|
3164
3348
|
// src/entities/machineState/MachineStateInfoEntity.ts
|
|
3165
|
-
var
|
|
3349
|
+
var import_typeorm28 = require("typeorm");
|
|
3166
3350
|
var import_ssi_sdk14 = require("@sphereon/ssi-sdk.agent-config");
|
|
3167
|
-
function
|
|
3351
|
+
function _ts_decorate29(decorators, target, key, desc) {
|
|
3168
3352
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3169
3353
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3170
3354
|
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;
|
|
3171
3355
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3172
3356
|
}
|
|
3173
|
-
__name(
|
|
3174
|
-
function
|
|
3357
|
+
__name(_ts_decorate29, "_ts_decorate");
|
|
3358
|
+
function _ts_metadata28(k, v) {
|
|
3175
3359
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3176
3360
|
}
|
|
3177
|
-
__name(
|
|
3178
|
-
var MachineStateInfoEntity = class extends
|
|
3361
|
+
__name(_ts_metadata28, "_ts_metadata");
|
|
3362
|
+
var MachineStateInfoEntity = class extends import_typeorm28.BaseEntity {
|
|
3179
3363
|
static {
|
|
3180
3364
|
__name(this, "MachineStateInfoEntity");
|
|
3181
3365
|
}
|
|
@@ -3193,120 +3377,120 @@ var MachineStateInfoEntity = class extends import_typeorm27.BaseEntity {
|
|
|
3193
3377
|
completedAt;
|
|
3194
3378
|
tenantId;
|
|
3195
3379
|
};
|
|
3196
|
-
|
|
3197
|
-
(0,
|
|
3380
|
+
_ts_decorate29([
|
|
3381
|
+
(0, import_typeorm28.PrimaryColumn)({
|
|
3198
3382
|
name: "instance_id",
|
|
3199
3383
|
type: "varchar",
|
|
3200
3384
|
nullable: false
|
|
3201
3385
|
}),
|
|
3202
|
-
|
|
3386
|
+
_ts_metadata28("design:type", String)
|
|
3203
3387
|
], MachineStateInfoEntity.prototype, "instanceId", void 0);
|
|
3204
|
-
|
|
3205
|
-
(0,
|
|
3388
|
+
_ts_decorate29([
|
|
3389
|
+
(0, import_typeorm28.Column)({
|
|
3206
3390
|
name: "session_id",
|
|
3207
3391
|
type: "varchar",
|
|
3208
3392
|
nullable: true
|
|
3209
3393
|
}),
|
|
3210
|
-
|
|
3394
|
+
_ts_metadata28("design:type", String)
|
|
3211
3395
|
], MachineStateInfoEntity.prototype, "sessionId", void 0);
|
|
3212
|
-
|
|
3213
|
-
(0,
|
|
3396
|
+
_ts_decorate29([
|
|
3397
|
+
(0, import_typeorm28.Column)({
|
|
3214
3398
|
name: "machine_name",
|
|
3215
3399
|
type: "varchar",
|
|
3216
3400
|
nullable: false
|
|
3217
3401
|
}),
|
|
3218
|
-
|
|
3402
|
+
_ts_metadata28("design:type", String)
|
|
3219
3403
|
], MachineStateInfoEntity.prototype, "machineName", void 0);
|
|
3220
|
-
|
|
3221
|
-
(0,
|
|
3404
|
+
_ts_decorate29([
|
|
3405
|
+
(0, import_typeorm28.Column)({
|
|
3222
3406
|
name: "latest_state_name",
|
|
3223
3407
|
type: "varchar",
|
|
3224
3408
|
nullable: true
|
|
3225
3409
|
}),
|
|
3226
|
-
|
|
3410
|
+
_ts_metadata28("design:type", String)
|
|
3227
3411
|
], MachineStateInfoEntity.prototype, "latestStateName", void 0);
|
|
3228
|
-
|
|
3229
|
-
(0,
|
|
3412
|
+
_ts_decorate29([
|
|
3413
|
+
(0, import_typeorm28.Column)({
|
|
3230
3414
|
name: "latest_event_type",
|
|
3231
3415
|
type: "varchar",
|
|
3232
3416
|
nullable: false
|
|
3233
3417
|
}),
|
|
3234
|
-
|
|
3418
|
+
_ts_metadata28("design:type", String)
|
|
3235
3419
|
], MachineStateInfoEntity.prototype, "latestEventType", void 0);
|
|
3236
|
-
|
|
3237
|
-
(0,
|
|
3420
|
+
_ts_decorate29([
|
|
3421
|
+
(0, import_typeorm28.Column)({
|
|
3238
3422
|
name: "state",
|
|
3239
3423
|
type: "text",
|
|
3240
3424
|
nullable: false
|
|
3241
3425
|
}),
|
|
3242
|
-
|
|
3426
|
+
_ts_metadata28("design:type", String)
|
|
3243
3427
|
], MachineStateInfoEntity.prototype, "state", void 0);
|
|
3244
|
-
|
|
3245
|
-
(0,
|
|
3428
|
+
_ts_decorate29([
|
|
3429
|
+
(0, import_typeorm28.CreateDateColumn)({
|
|
3246
3430
|
name: "created_at",
|
|
3247
3431
|
nullable: false,
|
|
3248
3432
|
type: (0, import_ssi_sdk14.typeOrmDateTime)()
|
|
3249
3433
|
}),
|
|
3250
|
-
|
|
3434
|
+
_ts_metadata28("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3251
3435
|
], MachineStateInfoEntity.prototype, "createdAt", void 0);
|
|
3252
|
-
|
|
3253
|
-
(0,
|
|
3436
|
+
_ts_decorate29([
|
|
3437
|
+
(0, import_typeorm28.UpdateDateColumn)({
|
|
3254
3438
|
name: "updated_at",
|
|
3255
3439
|
nullable: false,
|
|
3256
3440
|
type: (0, import_ssi_sdk14.typeOrmDateTime)()
|
|
3257
3441
|
}),
|
|
3258
|
-
|
|
3442
|
+
_ts_metadata28("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3259
3443
|
], MachineStateInfoEntity.prototype, "updatedAt", void 0);
|
|
3260
|
-
|
|
3261
|
-
(0,
|
|
3444
|
+
_ts_decorate29([
|
|
3445
|
+
(0, import_typeorm28.Column)({
|
|
3262
3446
|
name: "updated_count",
|
|
3263
3447
|
type: "integer",
|
|
3264
3448
|
nullable: false
|
|
3265
3449
|
}),
|
|
3266
|
-
|
|
3450
|
+
_ts_metadata28("design:type", Number)
|
|
3267
3451
|
], MachineStateInfoEntity.prototype, "updatedCount", void 0);
|
|
3268
|
-
|
|
3269
|
-
(0,
|
|
3452
|
+
_ts_decorate29([
|
|
3453
|
+
(0, import_typeorm28.Column)({
|
|
3270
3454
|
name: "expires_at",
|
|
3271
3455
|
nullable: true,
|
|
3272
3456
|
type: (0, import_ssi_sdk14.typeOrmDateTime)()
|
|
3273
3457
|
}),
|
|
3274
|
-
|
|
3458
|
+
_ts_metadata28("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3275
3459
|
], MachineStateInfoEntity.prototype, "expiresAt", void 0);
|
|
3276
|
-
|
|
3277
|
-
(0,
|
|
3460
|
+
_ts_decorate29([
|
|
3461
|
+
(0, import_typeorm28.Column)({
|
|
3278
3462
|
name: "completed_at",
|
|
3279
3463
|
nullable: true,
|
|
3280
3464
|
type: (0, import_ssi_sdk14.typeOrmDateTime)()
|
|
3281
3465
|
}),
|
|
3282
|
-
|
|
3466
|
+
_ts_metadata28("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3283
3467
|
], MachineStateInfoEntity.prototype, "completedAt", void 0);
|
|
3284
|
-
|
|
3285
|
-
(0,
|
|
3468
|
+
_ts_decorate29([
|
|
3469
|
+
(0, import_typeorm28.Column)({
|
|
3286
3470
|
name: "tenant_id",
|
|
3287
3471
|
type: "varchar",
|
|
3288
3472
|
nullable: true
|
|
3289
3473
|
}),
|
|
3290
|
-
|
|
3474
|
+
_ts_metadata28("design:type", String)
|
|
3291
3475
|
], MachineStateInfoEntity.prototype, "tenantId", void 0);
|
|
3292
|
-
MachineStateInfoEntity =
|
|
3293
|
-
(0,
|
|
3476
|
+
MachineStateInfoEntity = _ts_decorate29([
|
|
3477
|
+
(0, import_typeorm28.Entity)("MachineStateInfoEntity")
|
|
3294
3478
|
], MachineStateInfoEntity);
|
|
3295
3479
|
|
|
3296
3480
|
// src/entities/contact/OrganizationEntity.ts
|
|
3297
3481
|
var import_class_validator19 = require("class-validator");
|
|
3298
|
-
var
|
|
3299
|
-
function
|
|
3482
|
+
var import_typeorm29 = require("typeorm");
|
|
3483
|
+
function _ts_decorate30(decorators, target, key, desc) {
|
|
3300
3484
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3301
3485
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3302
3486
|
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;
|
|
3303
3487
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3304
3488
|
}
|
|
3305
|
-
__name(
|
|
3306
|
-
function
|
|
3489
|
+
__name(_ts_decorate30, "_ts_decorate");
|
|
3490
|
+
function _ts_metadata29(k, v) {
|
|
3307
3491
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3308
3492
|
}
|
|
3309
|
-
__name(
|
|
3493
|
+
__name(_ts_metadata29, "_ts_metadata");
|
|
3310
3494
|
var OrganizationEntity = class extends BaseContactEntity {
|
|
3311
3495
|
static {
|
|
3312
3496
|
__name(this, "OrganizationEntity");
|
|
@@ -3326,8 +3510,8 @@ var OrganizationEntity = class extends BaseContactEntity {
|
|
|
3326
3510
|
}
|
|
3327
3511
|
}
|
|
3328
3512
|
};
|
|
3329
|
-
|
|
3330
|
-
(0,
|
|
3513
|
+
_ts_decorate30([
|
|
3514
|
+
(0, import_typeorm29.Column)("varchar", {
|
|
3331
3515
|
name: "legal_name",
|
|
3332
3516
|
length: 255,
|
|
3333
3517
|
nullable: false,
|
|
@@ -3336,10 +3520,10 @@ _ts_decorate29([
|
|
|
3336
3520
|
(0, import_class_validator19.IsNotEmpty)({
|
|
3337
3521
|
message: "Blank legal names are not allowed"
|
|
3338
3522
|
}),
|
|
3339
|
-
|
|
3523
|
+
_ts_metadata29("design:type", String)
|
|
3340
3524
|
], OrganizationEntity.prototype, "legalName", void 0);
|
|
3341
|
-
|
|
3342
|
-
(0,
|
|
3525
|
+
_ts_decorate30([
|
|
3526
|
+
(0, import_typeorm29.Column)("varchar", {
|
|
3343
3527
|
name: "display_name",
|
|
3344
3528
|
length: 255,
|
|
3345
3529
|
nullable: false,
|
|
@@ -3348,47 +3532,47 @@ _ts_decorate29([
|
|
|
3348
3532
|
(0, import_class_validator19.IsNotEmpty)({
|
|
3349
3533
|
message: "Blank display names are not allowed"
|
|
3350
3534
|
}),
|
|
3351
|
-
|
|
3535
|
+
_ts_metadata29("design:type", String)
|
|
3352
3536
|
], OrganizationEntity.prototype, "displayName", void 0);
|
|
3353
|
-
|
|
3354
|
-
(0,
|
|
3537
|
+
_ts_decorate30([
|
|
3538
|
+
(0, import_typeorm29.Column)("text", {
|
|
3355
3539
|
name: "owner_id",
|
|
3356
3540
|
nullable: true
|
|
3357
3541
|
}),
|
|
3358
|
-
|
|
3542
|
+
_ts_metadata29("design:type", String)
|
|
3359
3543
|
], OrganizationEntity.prototype, "ownerId", void 0);
|
|
3360
|
-
|
|
3361
|
-
(0,
|
|
3544
|
+
_ts_decorate30([
|
|
3545
|
+
(0, import_typeorm29.Column)("text", {
|
|
3362
3546
|
name: "tenant_id",
|
|
3363
3547
|
nullable: true
|
|
3364
3548
|
}),
|
|
3365
|
-
|
|
3549
|
+
_ts_metadata29("design:type", String)
|
|
3366
3550
|
], OrganizationEntity.prototype, "tenantId", void 0);
|
|
3367
|
-
|
|
3368
|
-
(0,
|
|
3369
|
-
(0,
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3551
|
+
_ts_decorate30([
|
|
3552
|
+
(0, import_typeorm29.BeforeInsert)(),
|
|
3553
|
+
(0, import_typeorm29.BeforeUpdate)(),
|
|
3554
|
+
_ts_metadata29("design:type", Function),
|
|
3555
|
+
_ts_metadata29("design:paramtypes", []),
|
|
3556
|
+
_ts_metadata29("design:returntype", Promise)
|
|
3373
3557
|
], OrganizationEntity.prototype, "validate", null);
|
|
3374
|
-
OrganizationEntity =
|
|
3375
|
-
(0,
|
|
3558
|
+
OrganizationEntity = _ts_decorate30([
|
|
3559
|
+
(0, import_typeorm29.ChildEntity)("Organization")
|
|
3376
3560
|
], OrganizationEntity);
|
|
3377
3561
|
|
|
3378
3562
|
// src/entities/contact/NaturalPersonEntity.ts
|
|
3379
|
-
var
|
|
3563
|
+
var import_typeorm30 = require("typeorm");
|
|
3380
3564
|
var import_class_validator20 = require("class-validator");
|
|
3381
|
-
function
|
|
3565
|
+
function _ts_decorate31(decorators, target, key, desc) {
|
|
3382
3566
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3383
3567
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3384
3568
|
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;
|
|
3385
3569
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3386
3570
|
}
|
|
3387
|
-
__name(
|
|
3388
|
-
function
|
|
3571
|
+
__name(_ts_decorate31, "_ts_decorate");
|
|
3572
|
+
function _ts_metadata30(k, v) {
|
|
3389
3573
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3390
3574
|
}
|
|
3391
|
-
__name(
|
|
3575
|
+
__name(_ts_metadata30, "_ts_metadata");
|
|
3392
3576
|
var NaturalPersonEntity = class extends BaseContactEntity {
|
|
3393
3577
|
static {
|
|
3394
3578
|
__name(this, "NaturalPersonEntity");
|
|
@@ -3410,8 +3594,8 @@ var NaturalPersonEntity = class extends BaseContactEntity {
|
|
|
3410
3594
|
}
|
|
3411
3595
|
}
|
|
3412
3596
|
};
|
|
3413
|
-
|
|
3414
|
-
(0,
|
|
3597
|
+
_ts_decorate31([
|
|
3598
|
+
(0, import_typeorm30.Column)("varchar", {
|
|
3415
3599
|
name: "first_name",
|
|
3416
3600
|
length: 255,
|
|
3417
3601
|
nullable: false,
|
|
@@ -3420,10 +3604,10 @@ _ts_decorate30([
|
|
|
3420
3604
|
(0, import_class_validator20.IsNotEmpty)({
|
|
3421
3605
|
message: "Blank first names are not allowed"
|
|
3422
3606
|
}),
|
|
3423
|
-
|
|
3607
|
+
_ts_metadata30("design:type", String)
|
|
3424
3608
|
], NaturalPersonEntity.prototype, "firstName", void 0);
|
|
3425
|
-
|
|
3426
|
-
(0,
|
|
3609
|
+
_ts_decorate31([
|
|
3610
|
+
(0, import_typeorm30.Column)("varchar", {
|
|
3427
3611
|
name: "middle_name",
|
|
3428
3612
|
length: 255,
|
|
3429
3613
|
nullable: true,
|
|
@@ -3432,10 +3616,10 @@ _ts_decorate30([
|
|
|
3432
3616
|
(0, import_class_validator20.Validate)(IsNonEmptyStringConstraint, {
|
|
3433
3617
|
message: "Blank middle names are not allowed"
|
|
3434
3618
|
}),
|
|
3435
|
-
|
|
3619
|
+
_ts_metadata30("design:type", String)
|
|
3436
3620
|
], NaturalPersonEntity.prototype, "middleName", void 0);
|
|
3437
|
-
|
|
3438
|
-
(0,
|
|
3621
|
+
_ts_decorate31([
|
|
3622
|
+
(0, import_typeorm30.Column)("varchar", {
|
|
3439
3623
|
name: "last_name",
|
|
3440
3624
|
length: 255,
|
|
3441
3625
|
nullable: false,
|
|
@@ -3444,10 +3628,10 @@ _ts_decorate30([
|
|
|
3444
3628
|
(0, import_class_validator20.IsNotEmpty)({
|
|
3445
3629
|
message: "Blank last names are not allowed"
|
|
3446
3630
|
}),
|
|
3447
|
-
|
|
3631
|
+
_ts_metadata30("design:type", String)
|
|
3448
3632
|
], NaturalPersonEntity.prototype, "lastName", void 0);
|
|
3449
|
-
|
|
3450
|
-
(0,
|
|
3633
|
+
_ts_decorate31([
|
|
3634
|
+
(0, import_typeorm30.Column)("varchar", {
|
|
3451
3635
|
name: "display_name",
|
|
3452
3636
|
length: 255,
|
|
3453
3637
|
nullable: false,
|
|
@@ -3456,50 +3640,50 @@ _ts_decorate30([
|
|
|
3456
3640
|
(0, import_class_validator20.IsNotEmpty)({
|
|
3457
3641
|
message: "Blank display names are not allowed"
|
|
3458
3642
|
}),
|
|
3459
|
-
|
|
3643
|
+
_ts_metadata30("design:type", String)
|
|
3460
3644
|
], NaturalPersonEntity.prototype, "displayName", void 0);
|
|
3461
|
-
|
|
3462
|
-
(0,
|
|
3645
|
+
_ts_decorate31([
|
|
3646
|
+
(0, import_typeorm30.Column)("text", {
|
|
3463
3647
|
name: "owner_id",
|
|
3464
3648
|
nullable: true
|
|
3465
3649
|
}),
|
|
3466
|
-
|
|
3650
|
+
_ts_metadata30("design:type", String)
|
|
3467
3651
|
], NaturalPersonEntity.prototype, "ownerId", void 0);
|
|
3468
|
-
|
|
3469
|
-
(0,
|
|
3652
|
+
_ts_decorate31([
|
|
3653
|
+
(0, import_typeorm30.Column)("text", {
|
|
3470
3654
|
name: "tenant_id",
|
|
3471
3655
|
nullable: true
|
|
3472
3656
|
}),
|
|
3473
|
-
|
|
3657
|
+
_ts_metadata30("design:type", String)
|
|
3474
3658
|
], NaturalPersonEntity.prototype, "tenantId", void 0);
|
|
3475
|
-
|
|
3476
|
-
(0,
|
|
3477
|
-
(0,
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3659
|
+
_ts_decorate31([
|
|
3660
|
+
(0, import_typeorm30.BeforeInsert)(),
|
|
3661
|
+
(0, import_typeorm30.BeforeUpdate)(),
|
|
3662
|
+
_ts_metadata30("design:type", Function),
|
|
3663
|
+
_ts_metadata30("design:paramtypes", []),
|
|
3664
|
+
_ts_metadata30("design:returntype", Promise)
|
|
3481
3665
|
], NaturalPersonEntity.prototype, "validate", null);
|
|
3482
|
-
NaturalPersonEntity =
|
|
3483
|
-
(0,
|
|
3666
|
+
NaturalPersonEntity = _ts_decorate31([
|
|
3667
|
+
(0, import_typeorm30.ChildEntity)("NaturalPerson")
|
|
3484
3668
|
], NaturalPersonEntity);
|
|
3485
3669
|
|
|
3486
3670
|
// src/entities/eventLogger/AuditEventEntity.ts
|
|
3487
3671
|
var import_ssi_types2 = require("@sphereon/ssi-types");
|
|
3488
3672
|
var import_ssi_sdk15 = require("@sphereon/ssi-sdk.core");
|
|
3489
3673
|
var import_ssi_sdk16 = require("@sphereon/ssi-sdk.agent-config");
|
|
3490
|
-
var
|
|
3491
|
-
function
|
|
3674
|
+
var import_typeorm31 = require("typeorm");
|
|
3675
|
+
function _ts_decorate32(decorators, target, key, desc) {
|
|
3492
3676
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3493
3677
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3494
3678
|
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;
|
|
3495
3679
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3496
3680
|
}
|
|
3497
|
-
__name(
|
|
3498
|
-
function
|
|
3681
|
+
__name(_ts_decorate32, "_ts_decorate");
|
|
3682
|
+
function _ts_metadata31(k, v) {
|
|
3499
3683
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3500
3684
|
}
|
|
3501
|
-
__name(
|
|
3502
|
-
var AuditEventEntity = class extends
|
|
3685
|
+
__name(_ts_metadata31, "_ts_metadata");
|
|
3686
|
+
var AuditEventEntity = class extends import_typeorm31.BaseEntity {
|
|
3503
3687
|
static {
|
|
3504
3688
|
__name(this, "AuditEventEntity");
|
|
3505
3689
|
}
|
|
@@ -3530,240 +3714,240 @@ var AuditEventEntity = class extends import_typeorm30.BaseEntity {
|
|
|
3530
3714
|
createdAt;
|
|
3531
3715
|
lastUpdatedAt;
|
|
3532
3716
|
};
|
|
3533
|
-
|
|
3534
|
-
(0,
|
|
3535
|
-
|
|
3717
|
+
_ts_decorate32([
|
|
3718
|
+
(0, import_typeorm31.PrimaryGeneratedColumn)("uuid"),
|
|
3719
|
+
_ts_metadata31("design:type", String)
|
|
3536
3720
|
], AuditEventEntity.prototype, "id", void 0);
|
|
3537
|
-
|
|
3538
|
-
(0,
|
|
3721
|
+
_ts_decorate32([
|
|
3722
|
+
(0, import_typeorm31.Column)({
|
|
3539
3723
|
name: "timestamp",
|
|
3540
3724
|
nullable: false,
|
|
3541
3725
|
unique: false,
|
|
3542
3726
|
type: (0, import_ssi_sdk16.typeOrmDateTime)()
|
|
3543
3727
|
}),
|
|
3544
|
-
|
|
3728
|
+
_ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3545
3729
|
], AuditEventEntity.prototype, "timestamp", void 0);
|
|
3546
|
-
|
|
3547
|
-
(0,
|
|
3730
|
+
_ts_decorate32([
|
|
3731
|
+
(0, import_typeorm31.Column)("simple-enum", {
|
|
3548
3732
|
name: "eventType",
|
|
3549
3733
|
enum: import_ssi_types2.LoggingEventType,
|
|
3550
3734
|
nullable: false,
|
|
3551
3735
|
unique: false
|
|
3552
3736
|
}),
|
|
3553
|
-
|
|
3737
|
+
_ts_metadata31("design:type", typeof import_ssi_types2.LoggingEventType === "undefined" ? Object : import_ssi_types2.LoggingEventType)
|
|
3554
3738
|
], AuditEventEntity.prototype, "type", void 0);
|
|
3555
|
-
|
|
3556
|
-
(0,
|
|
3739
|
+
_ts_decorate32([
|
|
3740
|
+
(0, import_typeorm31.Column)("simple-enum", {
|
|
3557
3741
|
name: "level",
|
|
3558
3742
|
enum: import_ssi_types2.LogLevel,
|
|
3559
3743
|
nullable: false,
|
|
3560
3744
|
unique: false
|
|
3561
3745
|
}),
|
|
3562
|
-
|
|
3746
|
+
_ts_metadata31("design:type", typeof import_ssi_types2.LogLevel === "undefined" ? Object : import_ssi_types2.LogLevel)
|
|
3563
3747
|
], AuditEventEntity.prototype, "level", void 0);
|
|
3564
|
-
|
|
3565
|
-
(0,
|
|
3748
|
+
_ts_decorate32([
|
|
3749
|
+
(0, import_typeorm31.Column)("text", {
|
|
3566
3750
|
name: "correlationId",
|
|
3567
3751
|
nullable: false,
|
|
3568
3752
|
unique: false
|
|
3569
3753
|
}),
|
|
3570
|
-
|
|
3754
|
+
_ts_metadata31("design:type", String)
|
|
3571
3755
|
], AuditEventEntity.prototype, "correlationId", void 0);
|
|
3572
|
-
|
|
3573
|
-
(0,
|
|
3756
|
+
_ts_decorate32([
|
|
3757
|
+
(0, import_typeorm31.Column)("simple-enum", {
|
|
3574
3758
|
name: "system",
|
|
3575
3759
|
enum: import_ssi_types2.System,
|
|
3576
3760
|
nullable: false,
|
|
3577
3761
|
unique: false
|
|
3578
3762
|
}),
|
|
3579
|
-
|
|
3763
|
+
_ts_metadata31("design:type", typeof import_ssi_types2.System === "undefined" ? Object : import_ssi_types2.System)
|
|
3580
3764
|
], AuditEventEntity.prototype, "system", void 0);
|
|
3581
|
-
|
|
3582
|
-
(0,
|
|
3765
|
+
_ts_decorate32([
|
|
3766
|
+
(0, import_typeorm31.Column)("simple-enum", {
|
|
3583
3767
|
name: "subSystemType",
|
|
3584
3768
|
enum: import_ssi_types2.SubSystem,
|
|
3585
3769
|
nullable: false,
|
|
3586
3770
|
unique: false
|
|
3587
3771
|
}),
|
|
3588
|
-
|
|
3772
|
+
_ts_metadata31("design:type", typeof import_ssi_types2.SubSystem === "undefined" ? Object : import_ssi_types2.SubSystem)
|
|
3589
3773
|
], AuditEventEntity.prototype, "subSystemType", void 0);
|
|
3590
|
-
|
|
3591
|
-
(0,
|
|
3774
|
+
_ts_decorate32([
|
|
3775
|
+
(0, import_typeorm31.Column)("simple-enum", {
|
|
3592
3776
|
name: "actionType",
|
|
3593
3777
|
enum: import_ssi_types2.ActionType,
|
|
3594
3778
|
nullable: false,
|
|
3595
3779
|
unique: false
|
|
3596
3780
|
}),
|
|
3597
|
-
|
|
3781
|
+
_ts_metadata31("design:type", typeof import_ssi_types2.ActionType === "undefined" ? Object : import_ssi_types2.ActionType)
|
|
3598
3782
|
], AuditEventEntity.prototype, "actionType", void 0);
|
|
3599
|
-
|
|
3600
|
-
(0,
|
|
3783
|
+
_ts_decorate32([
|
|
3784
|
+
(0, import_typeorm31.Column)({
|
|
3601
3785
|
name: "actionSubType",
|
|
3602
3786
|
type: "varchar",
|
|
3603
3787
|
nullable: false,
|
|
3604
3788
|
unique: false
|
|
3605
3789
|
}),
|
|
3606
|
-
|
|
3790
|
+
_ts_metadata31("design:type", typeof ActionSubType === "undefined" ? Object : ActionSubType)
|
|
3607
3791
|
], AuditEventEntity.prototype, "actionSubType", void 0);
|
|
3608
|
-
|
|
3609
|
-
(0,
|
|
3792
|
+
_ts_decorate32([
|
|
3793
|
+
(0, import_typeorm31.Column)("simple-enum", {
|
|
3610
3794
|
name: "initiatorType",
|
|
3611
3795
|
enum: import_ssi_types2.InitiatorType,
|
|
3612
3796
|
nullable: false,
|
|
3613
3797
|
unique: false
|
|
3614
3798
|
}),
|
|
3615
|
-
|
|
3799
|
+
_ts_metadata31("design:type", typeof import_ssi_types2.InitiatorType === "undefined" ? Object : import_ssi_types2.InitiatorType)
|
|
3616
3800
|
], AuditEventEntity.prototype, "initiatorType", void 0);
|
|
3617
|
-
|
|
3618
|
-
(0,
|
|
3801
|
+
_ts_decorate32([
|
|
3802
|
+
(0, import_typeorm31.Column)("simple-enum", {
|
|
3619
3803
|
name: "systemCorrelationIdType",
|
|
3620
3804
|
enum: import_ssi_types2.SystemCorrelationIdType,
|
|
3621
3805
|
nullable: true,
|
|
3622
3806
|
unique: false
|
|
3623
3807
|
}),
|
|
3624
|
-
|
|
3808
|
+
_ts_metadata31("design:type", typeof import_ssi_types2.SystemCorrelationIdType === "undefined" ? Object : import_ssi_types2.SystemCorrelationIdType)
|
|
3625
3809
|
], AuditEventEntity.prototype, "systemCorrelationIdType", void 0);
|
|
3626
|
-
|
|
3627
|
-
(0,
|
|
3810
|
+
_ts_decorate32([
|
|
3811
|
+
(0, import_typeorm31.Column)("text", {
|
|
3628
3812
|
name: "systemCorrelationId",
|
|
3629
3813
|
nullable: true,
|
|
3630
3814
|
unique: false
|
|
3631
3815
|
}),
|
|
3632
|
-
|
|
3816
|
+
_ts_metadata31("design:type", String)
|
|
3633
3817
|
], AuditEventEntity.prototype, "systemCorrelationId", void 0);
|
|
3634
|
-
|
|
3635
|
-
(0,
|
|
3818
|
+
_ts_decorate32([
|
|
3819
|
+
(0, import_typeorm31.Column)("text", {
|
|
3636
3820
|
name: "systemAlias",
|
|
3637
3821
|
nullable: true,
|
|
3638
3822
|
unique: false
|
|
3639
3823
|
}),
|
|
3640
|
-
|
|
3824
|
+
_ts_metadata31("design:type", String)
|
|
3641
3825
|
], AuditEventEntity.prototype, "systemAlias", void 0);
|
|
3642
|
-
|
|
3643
|
-
(0,
|
|
3826
|
+
_ts_decorate32([
|
|
3827
|
+
(0, import_typeorm31.Column)("simple-enum", {
|
|
3644
3828
|
name: "partyCorrelationType",
|
|
3645
3829
|
enum: import_ssi_sdk15.PartyCorrelationType,
|
|
3646
3830
|
nullable: true,
|
|
3647
3831
|
unique: false
|
|
3648
3832
|
}),
|
|
3649
|
-
|
|
3833
|
+
_ts_metadata31("design:type", typeof import_ssi_sdk15.PartyCorrelationType === "undefined" ? Object : import_ssi_sdk15.PartyCorrelationType)
|
|
3650
3834
|
], AuditEventEntity.prototype, "partyCorrelationType", void 0);
|
|
3651
|
-
|
|
3652
|
-
(0,
|
|
3835
|
+
_ts_decorate32([
|
|
3836
|
+
(0, import_typeorm31.Column)("text", {
|
|
3653
3837
|
name: "partyCorrelationId",
|
|
3654
3838
|
nullable: true,
|
|
3655
3839
|
unique: false
|
|
3656
3840
|
}),
|
|
3657
|
-
|
|
3841
|
+
_ts_metadata31("design:type", String)
|
|
3658
3842
|
], AuditEventEntity.prototype, "partyCorrelationId", void 0);
|
|
3659
|
-
|
|
3660
|
-
(0,
|
|
3843
|
+
_ts_decorate32([
|
|
3844
|
+
(0, import_typeorm31.Column)("text", {
|
|
3661
3845
|
name: "partyAlias",
|
|
3662
3846
|
nullable: true,
|
|
3663
3847
|
unique: false
|
|
3664
3848
|
}),
|
|
3665
|
-
|
|
3849
|
+
_ts_metadata31("design:type", String)
|
|
3666
3850
|
], AuditEventEntity.prototype, "partyAlias", void 0);
|
|
3667
|
-
|
|
3668
|
-
(0,
|
|
3851
|
+
_ts_decorate32([
|
|
3852
|
+
(0, import_typeorm31.Column)("text", {
|
|
3669
3853
|
name: "description",
|
|
3670
3854
|
nullable: false,
|
|
3671
3855
|
unique: false
|
|
3672
3856
|
}),
|
|
3673
|
-
|
|
3857
|
+
_ts_metadata31("design:type", String)
|
|
3674
3858
|
], AuditEventEntity.prototype, "description", void 0);
|
|
3675
|
-
|
|
3676
|
-
(0,
|
|
3859
|
+
_ts_decorate32([
|
|
3860
|
+
(0, import_typeorm31.Column)("simple-enum", {
|
|
3677
3861
|
name: "credentialType",
|
|
3678
3862
|
enum: import_ssi_sdk15.CredentialType,
|
|
3679
3863
|
nullable: true,
|
|
3680
3864
|
unique: false
|
|
3681
3865
|
}),
|
|
3682
|
-
|
|
3866
|
+
_ts_metadata31("design:type", typeof import_ssi_sdk15.CredentialType === "undefined" ? Object : import_ssi_sdk15.CredentialType)
|
|
3683
3867
|
], AuditEventEntity.prototype, "credentialType", void 0);
|
|
3684
|
-
|
|
3685
|
-
(0,
|
|
3868
|
+
_ts_decorate32([
|
|
3869
|
+
(0, import_typeorm31.Column)("text", {
|
|
3686
3870
|
name: "credentialHash",
|
|
3687
3871
|
nullable: true,
|
|
3688
3872
|
unique: false
|
|
3689
3873
|
}),
|
|
3690
|
-
|
|
3874
|
+
_ts_metadata31("design:type", String)
|
|
3691
3875
|
], AuditEventEntity.prototype, "credentialHash", void 0);
|
|
3692
|
-
|
|
3693
|
-
(0,
|
|
3876
|
+
_ts_decorate32([
|
|
3877
|
+
(0, import_typeorm31.Column)("text", {
|
|
3694
3878
|
name: "parentCredentialHash",
|
|
3695
3879
|
nullable: true,
|
|
3696
3880
|
unique: false
|
|
3697
3881
|
}),
|
|
3698
|
-
|
|
3882
|
+
_ts_metadata31("design:type", String)
|
|
3699
3883
|
], AuditEventEntity.prototype, "parentCredentialHash", void 0);
|
|
3700
|
-
|
|
3701
|
-
(0,
|
|
3884
|
+
_ts_decorate32([
|
|
3885
|
+
(0, import_typeorm31.Column)("text", {
|
|
3702
3886
|
name: "originalCredential",
|
|
3703
3887
|
nullable: true,
|
|
3704
3888
|
unique: false
|
|
3705
3889
|
}),
|
|
3706
|
-
|
|
3890
|
+
_ts_metadata31("design:type", String)
|
|
3707
3891
|
], AuditEventEntity.prototype, "originalCredential", void 0);
|
|
3708
|
-
|
|
3709
|
-
(0,
|
|
3892
|
+
_ts_decorate32([
|
|
3893
|
+
(0, import_typeorm31.Column)("text", {
|
|
3710
3894
|
name: "sharePurpose",
|
|
3711
3895
|
nullable: true,
|
|
3712
3896
|
unique: false
|
|
3713
3897
|
}),
|
|
3714
|
-
|
|
3898
|
+
_ts_metadata31("design:type", String)
|
|
3715
3899
|
], AuditEventEntity.prototype, "sharePurpose", void 0);
|
|
3716
|
-
|
|
3717
|
-
(0,
|
|
3900
|
+
_ts_decorate32([
|
|
3901
|
+
(0, import_typeorm31.Column)("text", {
|
|
3718
3902
|
name: "data",
|
|
3719
3903
|
nullable: true,
|
|
3720
3904
|
unique: false
|
|
3721
3905
|
}),
|
|
3722
|
-
|
|
3906
|
+
_ts_metadata31("design:type", String)
|
|
3723
3907
|
], AuditEventEntity.prototype, "data", void 0);
|
|
3724
|
-
|
|
3725
|
-
(0,
|
|
3908
|
+
_ts_decorate32([
|
|
3909
|
+
(0, import_typeorm31.Column)("text", {
|
|
3726
3910
|
name: "diagnosticData",
|
|
3727
3911
|
nullable: true,
|
|
3728
3912
|
unique: false
|
|
3729
3913
|
}),
|
|
3730
|
-
|
|
3914
|
+
_ts_metadata31("design:type", String)
|
|
3731
3915
|
], AuditEventEntity.prototype, "diagnosticData", void 0);
|
|
3732
|
-
|
|
3733
|
-
(0,
|
|
3916
|
+
_ts_decorate32([
|
|
3917
|
+
(0, import_typeorm31.CreateDateColumn)({
|
|
3734
3918
|
name: "created_at",
|
|
3735
3919
|
nullable: false,
|
|
3736
3920
|
type: (0, import_ssi_sdk16.typeOrmDateTime)()
|
|
3737
3921
|
}),
|
|
3738
|
-
|
|
3922
|
+
_ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3739
3923
|
], AuditEventEntity.prototype, "createdAt", void 0);
|
|
3740
|
-
|
|
3741
|
-
(0,
|
|
3924
|
+
_ts_decorate32([
|
|
3925
|
+
(0, import_typeorm31.UpdateDateColumn)({
|
|
3742
3926
|
name: "last_updated_at",
|
|
3743
3927
|
nullable: false,
|
|
3744
3928
|
type: (0, import_ssi_sdk16.typeOrmDateTime)()
|
|
3745
3929
|
}),
|
|
3746
|
-
|
|
3930
|
+
_ts_metadata31("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3747
3931
|
], AuditEventEntity.prototype, "lastUpdatedAt", void 0);
|
|
3748
|
-
AuditEventEntity =
|
|
3749
|
-
(0,
|
|
3932
|
+
AuditEventEntity = _ts_decorate32([
|
|
3933
|
+
(0, import_typeorm31.Entity)("AuditEvents")
|
|
3750
3934
|
], AuditEventEntity);
|
|
3751
3935
|
|
|
3752
3936
|
// src/entities/digitalCredential/DigitalCredentialEntity.ts
|
|
3753
3937
|
var import_ssi_sdk17 = require("@sphereon/ssi-sdk.agent-config");
|
|
3754
|
-
var
|
|
3755
|
-
function
|
|
3938
|
+
var import_typeorm32 = require("typeorm");
|
|
3939
|
+
function _ts_decorate33(decorators, target, key, desc) {
|
|
3756
3940
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3757
3941
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3758
3942
|
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;
|
|
3759
3943
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3760
3944
|
}
|
|
3761
|
-
__name(
|
|
3762
|
-
function
|
|
3945
|
+
__name(_ts_decorate33, "_ts_decorate");
|
|
3946
|
+
function _ts_metadata32(k, v) {
|
|
3763
3947
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3764
3948
|
}
|
|
3765
|
-
__name(
|
|
3766
|
-
var DigitalCredentialEntity = class extends
|
|
3949
|
+
__name(_ts_metadata32, "_ts_metadata");
|
|
3950
|
+
var DigitalCredentialEntity = class extends import_typeorm32.BaseEntity {
|
|
3767
3951
|
static {
|
|
3768
3952
|
__name(this, "DigitalCredentialEntity");
|
|
3769
3953
|
}
|
|
@@ -3796,236 +3980,236 @@ var DigitalCredentialEntity = class extends import_typeorm31.BaseEntity {
|
|
|
3796
3980
|
verifiedAt;
|
|
3797
3981
|
revokedAt;
|
|
3798
3982
|
};
|
|
3799
|
-
|
|
3800
|
-
(0,
|
|
3801
|
-
|
|
3983
|
+
_ts_decorate33([
|
|
3984
|
+
(0, import_typeorm32.PrimaryGeneratedColumn)("uuid"),
|
|
3985
|
+
_ts_metadata32("design:type", String)
|
|
3802
3986
|
], DigitalCredentialEntity.prototype, "id", void 0);
|
|
3803
|
-
|
|
3804
|
-
(0,
|
|
3987
|
+
_ts_decorate33([
|
|
3988
|
+
(0, import_typeorm32.Column)("text", {
|
|
3805
3989
|
name: "parent_id",
|
|
3806
3990
|
nullable: true
|
|
3807
3991
|
}),
|
|
3808
|
-
|
|
3992
|
+
_ts_metadata32("design:type", String)
|
|
3809
3993
|
], DigitalCredentialEntity.prototype, "parentId", void 0);
|
|
3810
|
-
|
|
3811
|
-
(0,
|
|
3994
|
+
_ts_decorate33([
|
|
3995
|
+
(0, import_typeorm32.Column)("simple-enum", {
|
|
3812
3996
|
name: "document_type",
|
|
3813
3997
|
enum: DocumentType,
|
|
3814
3998
|
nullable: false
|
|
3815
3999
|
}),
|
|
3816
|
-
|
|
4000
|
+
_ts_metadata32("design:type", typeof DocumentType === "undefined" ? Object : DocumentType)
|
|
3817
4001
|
], DigitalCredentialEntity.prototype, "documentType", void 0);
|
|
3818
|
-
|
|
3819
|
-
(0,
|
|
4002
|
+
_ts_decorate33([
|
|
4003
|
+
(0, import_typeorm32.Column)("simple-enum", {
|
|
3820
4004
|
name: "regulation_type",
|
|
3821
4005
|
enum: RegulationType,
|
|
3822
4006
|
nullable: false
|
|
3823
4007
|
}),
|
|
3824
|
-
|
|
4008
|
+
_ts_metadata32("design:type", typeof RegulationType === "undefined" ? Object : RegulationType)
|
|
3825
4009
|
], DigitalCredentialEntity.prototype, "regulationType", void 0);
|
|
3826
|
-
|
|
3827
|
-
(0,
|
|
4010
|
+
_ts_decorate33([
|
|
4011
|
+
(0, import_typeorm32.Column)("simple-enum", {
|
|
3828
4012
|
name: "document_format",
|
|
3829
4013
|
enum: CredentialDocumentFormat,
|
|
3830
4014
|
nullable: false
|
|
3831
4015
|
}),
|
|
3832
|
-
|
|
4016
|
+
_ts_metadata32("design:type", typeof CredentialDocumentFormat === "undefined" ? Object : CredentialDocumentFormat)
|
|
3833
4017
|
], DigitalCredentialEntity.prototype, "documentFormat", void 0);
|
|
3834
|
-
|
|
3835
|
-
(0,
|
|
4018
|
+
_ts_decorate33([
|
|
4019
|
+
(0, import_typeorm32.Column)("simple-enum", {
|
|
3836
4020
|
name: "credential_role",
|
|
3837
4021
|
enum: CredentialRole,
|
|
3838
4022
|
nullable: false
|
|
3839
4023
|
}),
|
|
3840
|
-
|
|
4024
|
+
_ts_metadata32("design:type", typeof CredentialRole === "undefined" ? Object : CredentialRole)
|
|
3841
4025
|
], DigitalCredentialEntity.prototype, "credentialRole", void 0);
|
|
3842
|
-
|
|
3843
|
-
(0,
|
|
4026
|
+
_ts_decorate33([
|
|
4027
|
+
(0, import_typeorm32.Column)("text", {
|
|
3844
4028
|
name: "raw_document",
|
|
3845
4029
|
nullable: false
|
|
3846
4030
|
}),
|
|
3847
|
-
|
|
4031
|
+
_ts_metadata32("design:type", String)
|
|
3848
4032
|
], DigitalCredentialEntity.prototype, "rawDocument", void 0);
|
|
3849
|
-
|
|
3850
|
-
(0,
|
|
4033
|
+
_ts_decorate33([
|
|
4034
|
+
(0, import_typeorm32.Column)("text", {
|
|
3851
4035
|
name: "uniform_document",
|
|
3852
4036
|
nullable: false
|
|
3853
4037
|
}),
|
|
3854
|
-
|
|
4038
|
+
_ts_metadata32("design:type", String)
|
|
3855
4039
|
], DigitalCredentialEntity.prototype, "uniformDocument", void 0);
|
|
3856
|
-
|
|
3857
|
-
(0,
|
|
4040
|
+
_ts_decorate33([
|
|
4041
|
+
(0, import_typeorm32.Column)("text", {
|
|
3858
4042
|
name: "credential_id",
|
|
3859
4043
|
nullable: true,
|
|
3860
4044
|
unique: false
|
|
3861
4045
|
}),
|
|
3862
|
-
|
|
4046
|
+
_ts_metadata32("design:type", String)
|
|
3863
4047
|
], DigitalCredentialEntity.prototype, "credentialId", void 0);
|
|
3864
|
-
|
|
3865
|
-
(0,
|
|
4048
|
+
_ts_decorate33([
|
|
4049
|
+
(0, import_typeorm32.Column)("text", {
|
|
3866
4050
|
name: "hash",
|
|
3867
4051
|
nullable: false,
|
|
3868
4052
|
unique: true
|
|
3869
4053
|
}),
|
|
3870
|
-
|
|
4054
|
+
_ts_metadata32("design:type", String)
|
|
3871
4055
|
], DigitalCredentialEntity.prototype, "hash", void 0);
|
|
3872
|
-
|
|
3873
|
-
(0,
|
|
4056
|
+
_ts_decorate33([
|
|
4057
|
+
(0, import_typeorm32.Column)("text", {
|
|
3874
4058
|
name: "kms_key_ref",
|
|
3875
4059
|
nullable: true
|
|
3876
4060
|
}),
|
|
3877
|
-
|
|
4061
|
+
_ts_metadata32("design:type", String)
|
|
3878
4062
|
], DigitalCredentialEntity.prototype, "kmsKeyRef", void 0);
|
|
3879
|
-
|
|
3880
|
-
(0,
|
|
4063
|
+
_ts_decorate33([
|
|
4064
|
+
(0, import_typeorm32.Column)("text", {
|
|
3881
4065
|
name: "identifier_method",
|
|
3882
4066
|
nullable: true
|
|
3883
4067
|
}),
|
|
3884
|
-
|
|
4068
|
+
_ts_metadata32("design:type", String)
|
|
3885
4069
|
], DigitalCredentialEntity.prototype, "identifierMethod", void 0);
|
|
3886
|
-
|
|
3887
|
-
(0,
|
|
4070
|
+
_ts_decorate33([
|
|
4071
|
+
(0, import_typeorm32.Column)("simple-enum", {
|
|
3888
4072
|
name: "issuer_correlation_type",
|
|
3889
4073
|
enum: CredentialCorrelationType,
|
|
3890
4074
|
nullable: false
|
|
3891
4075
|
}),
|
|
3892
|
-
|
|
4076
|
+
_ts_metadata32("design:type", typeof CredentialCorrelationType === "undefined" ? Object : CredentialCorrelationType)
|
|
3893
4077
|
], DigitalCredentialEntity.prototype, "issuerCorrelationType", void 0);
|
|
3894
|
-
|
|
3895
|
-
(0,
|
|
4078
|
+
_ts_decorate33([
|
|
4079
|
+
(0, import_typeorm32.Column)("simple-enum", {
|
|
3896
4080
|
name: "subject_correlation_type",
|
|
3897
4081
|
enum: CredentialCorrelationType,
|
|
3898
4082
|
nullable: true
|
|
3899
4083
|
}),
|
|
3900
|
-
|
|
4084
|
+
_ts_metadata32("design:type", typeof CredentialCorrelationType === "undefined" ? Object : CredentialCorrelationType)
|
|
3901
4085
|
], DigitalCredentialEntity.prototype, "subjectCorrelationType", void 0);
|
|
3902
|
-
|
|
3903
|
-
(0,
|
|
4086
|
+
_ts_decorate33([
|
|
4087
|
+
(0, import_typeorm32.Column)("simple-enum", {
|
|
3904
4088
|
name: "rp_correlation_type",
|
|
3905
4089
|
enum: CredentialCorrelationType,
|
|
3906
4090
|
nullable: true
|
|
3907
4091
|
}),
|
|
3908
|
-
|
|
4092
|
+
_ts_metadata32("design:type", typeof CredentialCorrelationType === "undefined" ? Object : CredentialCorrelationType)
|
|
3909
4093
|
], DigitalCredentialEntity.prototype, "rpCorrelationType", void 0);
|
|
3910
|
-
|
|
3911
|
-
(0,
|
|
4094
|
+
_ts_decorate33([
|
|
4095
|
+
(0, import_typeorm32.Column)("boolean", {
|
|
3912
4096
|
name: "issuer_signed",
|
|
3913
4097
|
nullable: true
|
|
3914
4098
|
}),
|
|
3915
|
-
|
|
4099
|
+
_ts_metadata32("design:type", Boolean)
|
|
3916
4100
|
], DigitalCredentialEntity.prototype, "isIssuerSigned", void 0);
|
|
3917
|
-
|
|
3918
|
-
(0,
|
|
4101
|
+
_ts_decorate33([
|
|
4102
|
+
(0, import_typeorm32.Column)("text", {
|
|
3919
4103
|
name: "issuer_correlation_id",
|
|
3920
4104
|
nullable: false
|
|
3921
4105
|
}),
|
|
3922
|
-
|
|
4106
|
+
_ts_metadata32("design:type", String)
|
|
3923
4107
|
], DigitalCredentialEntity.prototype, "issuerCorrelationId", void 0);
|
|
3924
|
-
|
|
3925
|
-
(0,
|
|
4108
|
+
_ts_decorate33([
|
|
4109
|
+
(0, import_typeorm32.Column)("text", {
|
|
3926
4110
|
name: "subject_correlation_id",
|
|
3927
4111
|
nullable: true
|
|
3928
4112
|
}),
|
|
3929
|
-
|
|
4113
|
+
_ts_metadata32("design:type", String)
|
|
3930
4114
|
], DigitalCredentialEntity.prototype, "subjectCorrelationId", void 0);
|
|
3931
|
-
|
|
3932
|
-
(0,
|
|
4115
|
+
_ts_decorate33([
|
|
4116
|
+
(0, import_typeorm32.Column)("text", {
|
|
3933
4117
|
name: "rp_correlation_id",
|
|
3934
4118
|
nullable: true
|
|
3935
4119
|
}),
|
|
3936
|
-
|
|
4120
|
+
_ts_metadata32("design:type", String)
|
|
3937
4121
|
], DigitalCredentialEntity.prototype, "rpCorrelationId", void 0);
|
|
3938
|
-
|
|
3939
|
-
(0,
|
|
4122
|
+
_ts_decorate33([
|
|
4123
|
+
(0, import_typeorm32.Column)("simple-enum", {
|
|
3940
4124
|
name: "verified_state",
|
|
3941
4125
|
enum: CredentialStateType,
|
|
3942
4126
|
nullable: true
|
|
3943
4127
|
}),
|
|
3944
|
-
|
|
4128
|
+
_ts_metadata32("design:type", typeof CredentialStateType === "undefined" ? Object : CredentialStateType)
|
|
3945
4129
|
], DigitalCredentialEntity.prototype, "verifiedState", void 0);
|
|
3946
|
-
|
|
3947
|
-
(0,
|
|
4130
|
+
_ts_decorate33([
|
|
4131
|
+
(0, import_typeorm32.Column)("text", {
|
|
3948
4132
|
name: "tenant_id",
|
|
3949
4133
|
nullable: true
|
|
3950
4134
|
}),
|
|
3951
|
-
|
|
4135
|
+
_ts_metadata32("design:type", String)
|
|
3952
4136
|
], DigitalCredentialEntity.prototype, "tenantId", void 0);
|
|
3953
|
-
|
|
3954
|
-
(0,
|
|
4137
|
+
_ts_decorate33([
|
|
4138
|
+
(0, import_typeorm32.CreateDateColumn)({
|
|
3955
4139
|
name: "created_at",
|
|
3956
4140
|
nullable: false,
|
|
3957
4141
|
type: (0, import_ssi_sdk17.typeOrmDateTime)()
|
|
3958
4142
|
}),
|
|
3959
|
-
|
|
4143
|
+
_ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3960
4144
|
], DigitalCredentialEntity.prototype, "createdAt", void 0);
|
|
3961
|
-
|
|
3962
|
-
(0,
|
|
4145
|
+
_ts_decorate33([
|
|
4146
|
+
(0, import_typeorm32.Column)({
|
|
3963
4147
|
name: "presented_at",
|
|
3964
4148
|
nullable: true,
|
|
3965
4149
|
type: (0, import_ssi_sdk17.typeormDate)()
|
|
3966
4150
|
}),
|
|
3967
|
-
|
|
4151
|
+
_ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3968
4152
|
], DigitalCredentialEntity.prototype, "presentedAt", void 0);
|
|
3969
|
-
|
|
3970
|
-
(0,
|
|
4153
|
+
_ts_decorate33([
|
|
4154
|
+
(0, import_typeorm32.UpdateDateColumn)({
|
|
3971
4155
|
name: "last_updated_at",
|
|
3972
4156
|
nullable: false,
|
|
3973
4157
|
type: (0, import_ssi_sdk17.typeOrmDateTime)()
|
|
3974
4158
|
}),
|
|
3975
|
-
|
|
4159
|
+
_ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3976
4160
|
], DigitalCredentialEntity.prototype, "lastUpdatedAt", void 0);
|
|
3977
|
-
|
|
3978
|
-
(0,
|
|
4161
|
+
_ts_decorate33([
|
|
4162
|
+
(0, import_typeorm32.Column)({
|
|
3979
4163
|
name: "valid_until",
|
|
3980
4164
|
nullable: true,
|
|
3981
4165
|
type: (0, import_ssi_sdk17.typeormDate)()
|
|
3982
4166
|
}),
|
|
3983
|
-
|
|
4167
|
+
_ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3984
4168
|
], DigitalCredentialEntity.prototype, "validUntil", void 0);
|
|
3985
|
-
|
|
3986
|
-
(0,
|
|
4169
|
+
_ts_decorate33([
|
|
4170
|
+
(0, import_typeorm32.Column)({
|
|
3987
4171
|
name: "valid_from",
|
|
3988
4172
|
nullable: true,
|
|
3989
4173
|
type: (0, import_ssi_sdk17.typeormDate)()
|
|
3990
4174
|
}),
|
|
3991
|
-
|
|
4175
|
+
_ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
|
|
3992
4176
|
], DigitalCredentialEntity.prototype, "validFrom", void 0);
|
|
3993
|
-
|
|
3994
|
-
(0,
|
|
4177
|
+
_ts_decorate33([
|
|
4178
|
+
(0, import_typeorm32.Column)({
|
|
3995
4179
|
name: "verified_at",
|
|
3996
4180
|
nullable: true,
|
|
3997
4181
|
type: (0, import_ssi_sdk17.typeOrmDateTime)()
|
|
3998
4182
|
}),
|
|
3999
|
-
|
|
4183
|
+
_ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
|
|
4000
4184
|
], DigitalCredentialEntity.prototype, "verifiedAt", void 0);
|
|
4001
|
-
|
|
4002
|
-
(0,
|
|
4185
|
+
_ts_decorate33([
|
|
4186
|
+
(0, import_typeorm32.Column)({
|
|
4003
4187
|
name: "revoked_at",
|
|
4004
4188
|
nullable: true,
|
|
4005
4189
|
type: (0, import_ssi_sdk17.typeOrmDateTime)()
|
|
4006
4190
|
}),
|
|
4007
|
-
|
|
4191
|
+
_ts_metadata32("design:type", typeof Date === "undefined" ? Object : Date)
|
|
4008
4192
|
], DigitalCredentialEntity.prototype, "revokedAt", void 0);
|
|
4009
|
-
DigitalCredentialEntity =
|
|
4010
|
-
(0,
|
|
4193
|
+
DigitalCredentialEntity = _ts_decorate33([
|
|
4194
|
+
(0, import_typeorm32.Entity)("DigitalCredential")
|
|
4011
4195
|
], DigitalCredentialEntity);
|
|
4012
4196
|
|
|
4013
4197
|
// src/entities/presentationDefinition/PresentationDefinitionItemEntity.ts
|
|
4014
|
-
var
|
|
4198
|
+
var import_typeorm33 = require("typeorm");
|
|
4015
4199
|
var import_class_validator21 = require("class-validator");
|
|
4016
4200
|
var import_ssi_sdk18 = require("@sphereon/ssi-sdk.agent-config");
|
|
4017
|
-
function
|
|
4201
|
+
function _ts_decorate34(decorators, target, key, desc) {
|
|
4018
4202
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4019
4203
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4020
4204
|
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;
|
|
4021
4205
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4022
4206
|
}
|
|
4023
|
-
__name(
|
|
4024
|
-
function
|
|
4207
|
+
__name(_ts_decorate34, "_ts_decorate");
|
|
4208
|
+
function _ts_metadata33(k, v) {
|
|
4025
4209
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4026
4210
|
}
|
|
4027
|
-
__name(
|
|
4028
|
-
var PresentationDefinitionItemEntity = class extends
|
|
4211
|
+
__name(_ts_metadata33, "_ts_metadata");
|
|
4212
|
+
var PresentationDefinitionItemEntity = class extends import_typeorm33.BaseEntity {
|
|
4029
4213
|
static {
|
|
4030
4214
|
__name(this, "PresentationDefinitionItemEntity");
|
|
4031
4215
|
}
|
|
@@ -4044,12 +4228,12 @@ var PresentationDefinitionItemEntity = class extends import_typeorm32.BaseEntity
|
|
|
4044
4228
|
this.lastUpdatedAt = /* @__PURE__ */ new Date();
|
|
4045
4229
|
}
|
|
4046
4230
|
};
|
|
4047
|
-
|
|
4048
|
-
(0,
|
|
4049
|
-
|
|
4231
|
+
_ts_decorate34([
|
|
4232
|
+
(0, import_typeorm33.PrimaryGeneratedColumn)("uuid"),
|
|
4233
|
+
_ts_metadata33("design:type", String)
|
|
4050
4234
|
], PresentationDefinitionItemEntity.prototype, "id", void 0);
|
|
4051
|
-
|
|
4052
|
-
(0,
|
|
4235
|
+
_ts_decorate34([
|
|
4236
|
+
(0, import_typeorm33.Column)({
|
|
4053
4237
|
name: "definition_id",
|
|
4054
4238
|
length: 255,
|
|
4055
4239
|
type: "varchar",
|
|
@@ -4059,10 +4243,10 @@ _ts_decorate33([
|
|
|
4059
4243
|
(0, import_class_validator21.IsNotEmpty)({
|
|
4060
4244
|
message: "A blank definition id field is not allowed"
|
|
4061
4245
|
}),
|
|
4062
|
-
|
|
4246
|
+
_ts_metadata33("design:type", String)
|
|
4063
4247
|
], PresentationDefinitionItemEntity.prototype, "definitionId", void 0);
|
|
4064
|
-
|
|
4065
|
-
(0,
|
|
4248
|
+
_ts_decorate34([
|
|
4249
|
+
(0, import_typeorm33.Column)({
|
|
4066
4250
|
name: "version",
|
|
4067
4251
|
length: 255,
|
|
4068
4252
|
type: "varchar",
|
|
@@ -4072,40 +4256,40 @@ _ts_decorate33([
|
|
|
4072
4256
|
(0, import_class_validator21.IsNotEmpty)({
|
|
4073
4257
|
message: "A blank version field is not allowed"
|
|
4074
4258
|
}),
|
|
4075
|
-
|
|
4259
|
+
_ts_metadata33("design:type", String)
|
|
4076
4260
|
], PresentationDefinitionItemEntity.prototype, "version", void 0);
|
|
4077
|
-
|
|
4078
|
-
(0,
|
|
4261
|
+
_ts_decorate34([
|
|
4262
|
+
(0, import_typeorm33.Column)({
|
|
4079
4263
|
name: "tenant_id",
|
|
4080
4264
|
length: 255,
|
|
4081
4265
|
type: "varchar",
|
|
4082
4266
|
nullable: true,
|
|
4083
4267
|
unique: false
|
|
4084
4268
|
}),
|
|
4085
|
-
|
|
4269
|
+
_ts_metadata33("design:type", String)
|
|
4086
4270
|
], PresentationDefinitionItemEntity.prototype, "tenantId", void 0);
|
|
4087
|
-
|
|
4088
|
-
(0,
|
|
4271
|
+
_ts_decorate34([
|
|
4272
|
+
(0, import_typeorm33.Column)({
|
|
4089
4273
|
name: "purpose",
|
|
4090
4274
|
length: 255,
|
|
4091
4275
|
type: "varchar",
|
|
4092
4276
|
nullable: true,
|
|
4093
4277
|
unique: false
|
|
4094
4278
|
}),
|
|
4095
|
-
|
|
4279
|
+
_ts_metadata33("design:type", String)
|
|
4096
4280
|
], PresentationDefinitionItemEntity.prototype, "purpose", void 0);
|
|
4097
|
-
|
|
4098
|
-
(0,
|
|
4281
|
+
_ts_decorate34([
|
|
4282
|
+
(0, import_typeorm33.Column)({
|
|
4099
4283
|
name: "name",
|
|
4100
4284
|
length: 255,
|
|
4101
4285
|
type: "varchar",
|
|
4102
4286
|
nullable: true,
|
|
4103
4287
|
unique: false
|
|
4104
4288
|
}),
|
|
4105
|
-
|
|
4289
|
+
_ts_metadata33("design:type", String)
|
|
4106
4290
|
], PresentationDefinitionItemEntity.prototype, "name", void 0);
|
|
4107
|
-
|
|
4108
|
-
(0,
|
|
4291
|
+
_ts_decorate34([
|
|
4292
|
+
(0, import_typeorm33.Column)({
|
|
4109
4293
|
name: "definition_payload",
|
|
4110
4294
|
type: "text",
|
|
4111
4295
|
nullable: false,
|
|
@@ -4114,10 +4298,10 @@ _ts_decorate33([
|
|
|
4114
4298
|
(0, import_class_validator21.IsNotEmpty)({
|
|
4115
4299
|
message: "A blank PD definition payload field is not allowed"
|
|
4116
4300
|
}),
|
|
4117
|
-
|
|
4301
|
+
_ts_metadata33("design:type", String)
|
|
4118
4302
|
], PresentationDefinitionItemEntity.prototype, "definitionPayload", void 0);
|
|
4119
|
-
|
|
4120
|
-
(0,
|
|
4303
|
+
_ts_decorate34([
|
|
4304
|
+
(0, import_typeorm33.Column)({
|
|
4121
4305
|
name: "dcql_payload",
|
|
4122
4306
|
type: "text",
|
|
4123
4307
|
nullable: true,
|
|
@@ -4126,34 +4310,34 @@ _ts_decorate33([
|
|
|
4126
4310
|
(0, import_class_validator21.IsNotEmpty)({
|
|
4127
4311
|
message: "A blank dcql definition payload field is not allowed"
|
|
4128
4312
|
}),
|
|
4129
|
-
|
|
4313
|
+
_ts_metadata33("design:type", String)
|
|
4130
4314
|
], PresentationDefinitionItemEntity.prototype, "dcqlPayload", void 0);
|
|
4131
|
-
|
|
4132
|
-
(0,
|
|
4315
|
+
_ts_decorate34([
|
|
4316
|
+
(0, import_typeorm33.CreateDateColumn)({
|
|
4133
4317
|
name: "created_at",
|
|
4134
4318
|
nullable: false,
|
|
4135
4319
|
type: (0, import_ssi_sdk18.typeOrmDateTime)()
|
|
4136
4320
|
}),
|
|
4137
|
-
|
|
4321
|
+
_ts_metadata33("design:type", typeof Date === "undefined" ? Object : Date)
|
|
4138
4322
|
], PresentationDefinitionItemEntity.prototype, "createdAt", void 0);
|
|
4139
|
-
|
|
4140
|
-
(0,
|
|
4323
|
+
_ts_decorate34([
|
|
4324
|
+
(0, import_typeorm33.UpdateDateColumn)({
|
|
4141
4325
|
name: "last_updated_at",
|
|
4142
4326
|
nullable: false,
|
|
4143
4327
|
type: (0, import_ssi_sdk18.typeOrmDateTime)()
|
|
4144
4328
|
}),
|
|
4145
|
-
|
|
4329
|
+
_ts_metadata33("design:type", typeof Date === "undefined" ? Object : Date)
|
|
4146
4330
|
], PresentationDefinitionItemEntity.prototype, "lastUpdatedAt", void 0);
|
|
4147
|
-
|
|
4148
|
-
(0,
|
|
4149
|
-
(0,
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4331
|
+
_ts_decorate34([
|
|
4332
|
+
(0, import_typeorm33.BeforeInsert)(),
|
|
4333
|
+
(0, import_typeorm33.BeforeUpdate)(),
|
|
4334
|
+
_ts_metadata33("design:type", Function),
|
|
4335
|
+
_ts_metadata33("design:paramtypes", []),
|
|
4336
|
+
_ts_metadata33("design:returntype", void 0)
|
|
4153
4337
|
], PresentationDefinitionItemEntity.prototype, "updateUpdatedDate", null);
|
|
4154
|
-
PresentationDefinitionItemEntity =
|
|
4155
|
-
(0,
|
|
4156
|
-
(0,
|
|
4338
|
+
PresentationDefinitionItemEntity = _ts_decorate34([
|
|
4339
|
+
(0, import_typeorm33.Entity)("PresentationDefinitionItem"),
|
|
4340
|
+
(0, import_typeorm33.Index)([
|
|
4157
4341
|
"version"
|
|
4158
4342
|
], {
|
|
4159
4343
|
unique: false
|
|
@@ -4162,19 +4346,19 @@ PresentationDefinitionItemEntity = _ts_decorate33([
|
|
|
4162
4346
|
|
|
4163
4347
|
// src/entities/oid4vcState/Oid4vcStateEntity.ts
|
|
4164
4348
|
var import_ssi_sdk19 = require("@sphereon/ssi-sdk.agent-config");
|
|
4165
|
-
var
|
|
4166
|
-
function
|
|
4349
|
+
var import_typeorm34 = require("typeorm");
|
|
4350
|
+
function _ts_decorate35(decorators, target, key, desc) {
|
|
4167
4351
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4168
4352
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4169
4353
|
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;
|
|
4170
4354
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4171
4355
|
}
|
|
4172
|
-
__name(
|
|
4173
|
-
function
|
|
4356
|
+
__name(_ts_decorate35, "_ts_decorate");
|
|
4357
|
+
function _ts_metadata34(k, v) {
|
|
4174
4358
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4175
4359
|
}
|
|
4176
|
-
__name(
|
|
4177
|
-
var Oid4vcStateEntity = class extends
|
|
4360
|
+
__name(_ts_metadata34, "_ts_metadata");
|
|
4361
|
+
var Oid4vcStateEntity = class extends import_typeorm34.BaseEntity {
|
|
4178
4362
|
static {
|
|
4179
4363
|
__name(this, "Oid4vcStateEntity");
|
|
4180
4364
|
}
|
|
@@ -4188,84 +4372,84 @@ var Oid4vcStateEntity = class extends import_typeorm33.BaseEntity {
|
|
|
4188
4372
|
expiresAt;
|
|
4189
4373
|
tenantId;
|
|
4190
4374
|
};
|
|
4191
|
-
|
|
4192
|
-
(0,
|
|
4375
|
+
_ts_decorate35([
|
|
4376
|
+
(0, import_typeorm34.PrimaryColumn)({
|
|
4193
4377
|
name: "id",
|
|
4194
4378
|
type: "varchar",
|
|
4195
4379
|
nullable: false
|
|
4196
4380
|
}),
|
|
4197
|
-
|
|
4381
|
+
_ts_metadata34("design:type", String)
|
|
4198
4382
|
], Oid4vcStateEntity.prototype, "id", void 0);
|
|
4199
|
-
|
|
4200
|
-
(0,
|
|
4383
|
+
_ts_decorate35([
|
|
4384
|
+
(0, import_typeorm34.Column)({
|
|
4201
4385
|
name: "lookup_ids",
|
|
4202
4386
|
type: "array",
|
|
4203
4387
|
nullable: true
|
|
4204
4388
|
}),
|
|
4205
|
-
|
|
4389
|
+
_ts_metadata34("design:type", typeof Array === "undefined" ? Object : Array)
|
|
4206
4390
|
], Oid4vcStateEntity.prototype, "lookups", void 0);
|
|
4207
|
-
|
|
4208
|
-
(0,
|
|
4391
|
+
_ts_decorate35([
|
|
4392
|
+
(0, import_typeorm34.Column)({
|
|
4209
4393
|
name: "state_id",
|
|
4210
4394
|
type: "varchar",
|
|
4211
4395
|
nullable: true
|
|
4212
4396
|
}),
|
|
4213
|
-
|
|
4397
|
+
_ts_metadata34("design:type", String)
|
|
4214
4398
|
], Oid4vcStateEntity.prototype, "stateId", void 0);
|
|
4215
|
-
|
|
4216
|
-
(0,
|
|
4399
|
+
_ts_decorate35([
|
|
4400
|
+
(0, import_typeorm34.Column)({
|
|
4217
4401
|
name: "correlation_id",
|
|
4218
4402
|
type: "varchar",
|
|
4219
4403
|
nullable: true
|
|
4220
4404
|
}),
|
|
4221
|
-
|
|
4405
|
+
_ts_metadata34("design:type", String)
|
|
4222
4406
|
], Oid4vcStateEntity.prototype, "correlationId", void 0);
|
|
4223
|
-
|
|
4224
|
-
(0,
|
|
4407
|
+
_ts_decorate35([
|
|
4408
|
+
(0, import_typeorm34.Column)({
|
|
4225
4409
|
name: "state",
|
|
4226
4410
|
type: "json",
|
|
4227
4411
|
nullable: false
|
|
4228
4412
|
}),
|
|
4229
|
-
|
|
4413
|
+
_ts_metadata34("design:type", typeof StateType === "undefined" ? Object : StateType)
|
|
4230
4414
|
], Oid4vcStateEntity.prototype, "state", void 0);
|
|
4231
|
-
|
|
4232
|
-
(0,
|
|
4415
|
+
_ts_decorate35([
|
|
4416
|
+
(0, import_typeorm34.CreateDateColumn)({
|
|
4233
4417
|
name: "created_at",
|
|
4234
4418
|
nullable: false,
|
|
4235
4419
|
type: (0, import_ssi_sdk19.typeOrmDateTime)()
|
|
4236
4420
|
}),
|
|
4237
|
-
|
|
4421
|
+
_ts_metadata34("design:type", typeof Date === "undefined" ? Object : Date)
|
|
4238
4422
|
], Oid4vcStateEntity.prototype, "createdAt", void 0);
|
|
4239
|
-
|
|
4240
|
-
(0,
|
|
4423
|
+
_ts_decorate35([
|
|
4424
|
+
(0, import_typeorm34.UpdateDateColumn)({
|
|
4241
4425
|
name: "updated_at",
|
|
4242
4426
|
nullable: false,
|
|
4243
4427
|
type: (0, import_ssi_sdk19.typeOrmDateTime)()
|
|
4244
4428
|
}),
|
|
4245
|
-
|
|
4429
|
+
_ts_metadata34("design:type", typeof Date === "undefined" ? Object : Date)
|
|
4246
4430
|
], Oid4vcStateEntity.prototype, "updatedAt", void 0);
|
|
4247
|
-
|
|
4248
|
-
(0,
|
|
4431
|
+
_ts_decorate35([
|
|
4432
|
+
(0, import_typeorm34.Column)({
|
|
4249
4433
|
name: "expires_at",
|
|
4250
4434
|
nullable: true,
|
|
4251
4435
|
type: (0, import_ssi_sdk19.typeOrmDateTime)()
|
|
4252
4436
|
}),
|
|
4253
|
-
|
|
4437
|
+
_ts_metadata34("design:type", typeof Date === "undefined" ? Object : Date)
|
|
4254
4438
|
], Oid4vcStateEntity.prototype, "expiresAt", void 0);
|
|
4255
|
-
|
|
4256
|
-
(0,
|
|
4439
|
+
_ts_decorate35([
|
|
4440
|
+
(0, import_typeorm34.Column)({
|
|
4257
4441
|
name: "tenant_id",
|
|
4258
4442
|
type: "varchar",
|
|
4259
4443
|
nullable: true
|
|
4260
4444
|
}),
|
|
4261
|
-
|
|
4445
|
+
_ts_metadata34("design:type", String)
|
|
4262
4446
|
], Oid4vcStateEntity.prototype, "tenantId", void 0);
|
|
4263
|
-
Oid4vcStateEntity =
|
|
4264
|
-
(0,
|
|
4447
|
+
Oid4vcStateEntity = _ts_decorate35([
|
|
4448
|
+
(0, import_typeorm34.Entity)("Oid4vcStateEntity")
|
|
4265
4449
|
], Oid4vcStateEntity);
|
|
4266
4450
|
|
|
4267
4451
|
// src/contact/ContactStore.ts
|
|
4268
|
-
var
|
|
4452
|
+
var import_typeorm35 = require("typeorm");
|
|
4269
4453
|
var import_debug = __toESM(require("debug"), 1);
|
|
4270
4454
|
|
|
4271
4455
|
// src/contact/AbstractContactStore.ts
|
|
@@ -4734,7 +4918,7 @@ var ContactStore = class extends AbstractContactStore {
|
|
|
4734
4918
|
});
|
|
4735
4919
|
const result = await partyRepository.find({
|
|
4736
4920
|
where: {
|
|
4737
|
-
id: (0,
|
|
4921
|
+
id: (0, import_typeorm35.In)(initialResult.map((party) => party.id))
|
|
4738
4922
|
}
|
|
4739
4923
|
});
|
|
4740
4924
|
debug(`getParties() resulted in ${result.length} parties`);
|
|
@@ -4830,7 +5014,7 @@ var ContactStore = class extends AbstractContactStore {
|
|
|
4830
5014
|
});
|
|
4831
5015
|
const result = await identityRepository.find({
|
|
4832
5016
|
where: {
|
|
4833
|
-
id: (0,
|
|
5017
|
+
id: (0, import_typeorm35.In)(initialResult.map((identity) => identity.id))
|
|
4834
5018
|
}
|
|
4835
5019
|
});
|
|
4836
5020
|
return result.map(identityFrom);
|
|
@@ -4935,7 +5119,7 @@ var ContactStore = class extends AbstractContactStore {
|
|
|
4935
5119
|
});
|
|
4936
5120
|
const result = await partyRelationshipRepository.find({
|
|
4937
5121
|
where: {
|
|
4938
|
-
id: (0,
|
|
5122
|
+
id: (0, import_typeorm35.In)(initialResult.map((partyRelationship) => partyRelationship.id))
|
|
4939
5123
|
}
|
|
4940
5124
|
});
|
|
4941
5125
|
return result.map((partyRelationship) => partyRelationshipFrom(partyRelationship));
|
|
@@ -5001,7 +5185,7 @@ var ContactStore = class extends AbstractContactStore {
|
|
|
5001
5185
|
});
|
|
5002
5186
|
const result = await partyTypeRepository.find({
|
|
5003
5187
|
where: {
|
|
5004
|
-
id: (0,
|
|
5188
|
+
id: (0, import_typeorm35.In)(initialResult.map((partyType) => partyType.id))
|
|
5005
5189
|
}
|
|
5006
5190
|
});
|
|
5007
5191
|
return result.map((partyType) => partyTypeFrom(partyType));
|
|
@@ -5069,7 +5253,7 @@ var ContactStore = class extends AbstractContactStore {
|
|
|
5069
5253
|
});
|
|
5070
5254
|
const result = await electronicAddressRepository.find({
|
|
5071
5255
|
where: {
|
|
5072
|
-
id: (0,
|
|
5256
|
+
id: (0, import_typeorm35.In)(initialResult.map((electronicAddress) => electronicAddress.id))
|
|
5073
5257
|
}
|
|
5074
5258
|
});
|
|
5075
5259
|
return result.map((electronicAddress) => electronicAddressFrom(electronicAddress));
|
|
@@ -5145,7 +5329,7 @@ var ContactStore = class extends AbstractContactStore {
|
|
|
5145
5329
|
});
|
|
5146
5330
|
const result = await physicalAddressRepository.find({
|
|
5147
5331
|
where: {
|
|
5148
|
-
id: (0,
|
|
5332
|
+
id: (0, import_typeorm35.In)(initialResult.map((physicalAddress) => physicalAddress.id))
|
|
5149
5333
|
}
|
|
5150
5334
|
});
|
|
5151
5335
|
return result.map((physicalAddress) => physicalAddressFrom(physicalAddress));
|
|
@@ -5504,7 +5688,7 @@ var AbstractIssuanceBrandingStore = class {
|
|
|
5504
5688
|
|
|
5505
5689
|
// src/issuanceBranding/IssuanceBrandingStore.ts
|
|
5506
5690
|
var import_debug3 = __toESM(require("debug"), 1);
|
|
5507
|
-
var
|
|
5691
|
+
var import_typeorm36 = require("typeorm");
|
|
5508
5692
|
|
|
5509
5693
|
// src/utils/issuanceBranding/MappingUtils.ts
|
|
5510
5694
|
var credentialBrandingFrom = /* @__PURE__ */ __name((credentialBranding) => {
|
|
@@ -5698,7 +5882,7 @@ var IssuanceBrandingStore = class extends AbstractIssuanceBrandingStore {
|
|
|
5698
5882
|
credentialBranding: {
|
|
5699
5883
|
id: credentialBrandingId
|
|
5700
5884
|
},
|
|
5701
|
-
locale: (0,
|
|
5885
|
+
locale: (0, import_typeorm36.In)(localeBranding.map((localeBranding2) => localeBranding2.locale))
|
|
5702
5886
|
}
|
|
5703
5887
|
});
|
|
5704
5888
|
if (locales && locales.length > 0) {
|
|
@@ -5766,7 +5950,7 @@ var IssuanceBrandingStore = class extends AbstractIssuanceBrandingStore {
|
|
|
5766
5950
|
credentialBranding: {
|
|
5767
5951
|
id: result.credentialBrandingId
|
|
5768
5952
|
},
|
|
5769
|
-
id: (0,
|
|
5953
|
+
id: (0, import_typeorm36.Not)((0, import_typeorm36.In)([
|
|
5770
5954
|
localeBranding.id
|
|
5771
5955
|
])),
|
|
5772
5956
|
locale: localeBranding.locale
|
|
@@ -5869,7 +6053,7 @@ var IssuanceBrandingStore = class extends AbstractIssuanceBrandingStore {
|
|
|
5869
6053
|
issuerBranding: {
|
|
5870
6054
|
id: issuerBrandingId
|
|
5871
6055
|
},
|
|
5872
|
-
locale: (0,
|
|
6056
|
+
locale: (0, import_typeorm36.In)(localeBranding.map((localeBranding2) => localeBranding2.locale))
|
|
5873
6057
|
}
|
|
5874
6058
|
});
|
|
5875
6059
|
if (locales && locales.length > 0) {
|
|
@@ -5937,7 +6121,7 @@ var IssuanceBrandingStore = class extends AbstractIssuanceBrandingStore {
|
|
|
5937
6121
|
issuerBranding: {
|
|
5938
6122
|
id: result.issuerBrandingId
|
|
5939
6123
|
},
|
|
5940
|
-
id: (0,
|
|
6124
|
+
id: (0, import_typeorm36.Not)((0, import_typeorm36.In)([
|
|
5941
6125
|
localeBranding.id
|
|
5942
6126
|
])),
|
|
5943
6127
|
locale: localeBranding.locale
|
|
@@ -5999,38 +6183,60 @@ var IssuanceBrandingStore = class extends AbstractIssuanceBrandingStore {
|
|
|
5999
6183
|
// src/statusList/StatusListStore.ts
|
|
6000
6184
|
var import_ssi_types4 = require("@sphereon/ssi-types");
|
|
6001
6185
|
var import_debug4 = __toESM(require("debug"), 1);
|
|
6002
|
-
var
|
|
6186
|
+
var import_typeorm37 = require("typeorm");
|
|
6003
6187
|
|
|
6004
6188
|
// src/utils/statusList/MappingUtils.ts
|
|
6005
6189
|
var import_ssi_types3 = require("@sphereon/ssi-types");
|
|
6006
6190
|
var statusListEntityFrom = /* @__PURE__ */ __name((args) => {
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6191
|
+
switch (args.type) {
|
|
6192
|
+
case import_ssi_types3.StatusListType.StatusList2021: {
|
|
6193
|
+
const entity = new StatusList2021Entity();
|
|
6194
|
+
const sl2021 = args;
|
|
6195
|
+
entity.indexingDirection = sl2021.indexingDirection;
|
|
6196
|
+
entity.statusPurpose = sl2021.statusPurpose;
|
|
6197
|
+
setBaseFields(entity, args);
|
|
6198
|
+
Object.defineProperty(entity, "type", {
|
|
6199
|
+
value: import_ssi_types3.StatusListType.StatusList2021,
|
|
6200
|
+
enumerable: true,
|
|
6201
|
+
configurable: true
|
|
6202
|
+
});
|
|
6203
|
+
return entity;
|
|
6204
|
+
}
|
|
6205
|
+
case import_ssi_types3.StatusListType.OAuthStatusList: {
|
|
6206
|
+
const entity = new OAuthStatusListEntity();
|
|
6207
|
+
const oauthSl = args;
|
|
6208
|
+
entity.bitsPerStatus = oauthSl.bitsPerStatus;
|
|
6209
|
+
entity.expiresAt = oauthSl.expiresAt;
|
|
6210
|
+
setBaseFields(entity, args);
|
|
6211
|
+
Object.defineProperty(entity, "type", {
|
|
6212
|
+
value: import_ssi_types3.StatusListType.OAuthStatusList,
|
|
6213
|
+
enumerable: true,
|
|
6214
|
+
configurable: true
|
|
6215
|
+
});
|
|
6216
|
+
return entity;
|
|
6217
|
+
}
|
|
6218
|
+
case import_ssi_types3.StatusListType.BitstringStatusList: {
|
|
6219
|
+
const entity = new BitstringStatusListEntity();
|
|
6220
|
+
const bitstringsl = args;
|
|
6221
|
+
if (!bitstringsl.bitsPerStatus) {
|
|
6222
|
+
throw Error("bitsPerStatus must be set for BitstringStatusList");
|
|
6223
|
+
}
|
|
6224
|
+
entity.statusPurpose = bitstringsl.statusPurpose;
|
|
6225
|
+
entity.bitsPerStatus = bitstringsl.bitsPerStatus;
|
|
6226
|
+
entity.validFrom = bitstringsl.validFrom;
|
|
6227
|
+
entity.validUntil = bitstringsl.validUntil;
|
|
6228
|
+
entity.ttl = bitstringsl.ttl;
|
|
6229
|
+
setBaseFields(entity, args);
|
|
6230
|
+
Object.defineProperty(entity, "type", {
|
|
6231
|
+
value: import_ssi_types3.StatusListType.BitstringStatusList,
|
|
6232
|
+
enumerable: true,
|
|
6233
|
+
configurable: true
|
|
6234
|
+
});
|
|
6235
|
+
return entity;
|
|
6236
|
+
}
|
|
6237
|
+
default:
|
|
6238
|
+
throw new Error(`Invalid status list type ${args.type}`);
|
|
6032
6239
|
}
|
|
6033
|
-
throw new Error(`Invalid status list type ${args.type}`);
|
|
6034
6240
|
}, "statusListEntityFrom");
|
|
6035
6241
|
var statusListFrom = /* @__PURE__ */ __name((entity) => {
|
|
6036
6242
|
if (entity instanceof StatusList2021Entity) {
|
|
@@ -6051,6 +6257,18 @@ var statusListFrom = /* @__PURE__ */ __name((entity) => {
|
|
|
6051
6257
|
};
|
|
6052
6258
|
return replaceNullWithUndefined(result);
|
|
6053
6259
|
}
|
|
6260
|
+
if (entity instanceof BitstringStatusListEntity) {
|
|
6261
|
+
const result = {
|
|
6262
|
+
...getBaseFields(entity),
|
|
6263
|
+
type: import_ssi_types3.StatusListType.BitstringStatusList,
|
|
6264
|
+
statusPurpose: entity.statusPurpose,
|
|
6265
|
+
bitsPerStatus: entity.bitsPerStatus,
|
|
6266
|
+
validFrom: entity.validFrom,
|
|
6267
|
+
validUntil: entity.validUntil,
|
|
6268
|
+
ttl: entity.ttl
|
|
6269
|
+
};
|
|
6270
|
+
return replaceNullWithUndefined(result);
|
|
6271
|
+
}
|
|
6054
6272
|
throw new Error(`Invalid status list type ${typeof entity}`);
|
|
6055
6273
|
}, "statusListFrom");
|
|
6056
6274
|
var setBaseFields = /* @__PURE__ */ __name((entity, args) => {
|
|
@@ -6101,33 +6319,44 @@ var StatusListStore = class {
|
|
|
6101
6319
|
...args,
|
|
6102
6320
|
id: args.statusListId
|
|
6103
6321
|
});
|
|
6104
|
-
const repo = await this.getStatusListEntryRepo();
|
|
6322
|
+
const repo = await this.getStatusListEntryRepo(statusList.type);
|
|
6105
6323
|
const results = (await repo.find({
|
|
6106
6324
|
where: {
|
|
6107
|
-
statusList,
|
|
6108
|
-
statusListIndex: (0,
|
|
6325
|
+
statusListId: statusList.id,
|
|
6326
|
+
statusListIndex: (0, import_typeorm37.In)(statusListIndex)
|
|
6109
6327
|
}
|
|
6110
6328
|
})).map((index) => index.statusListIndex);
|
|
6111
6329
|
return statusListIndex.filter((index) => !results.includes(index));
|
|
6112
6330
|
}
|
|
6113
6331
|
async addStatusListEntry(args) {
|
|
6114
|
-
|
|
6332
|
+
if (!args.statusListId) {
|
|
6333
|
+
throw new Error("statusListId is required");
|
|
6334
|
+
}
|
|
6335
|
+
const statusList = await this.getStatusList({
|
|
6336
|
+
id: args.statusListId
|
|
6337
|
+
});
|
|
6338
|
+
return await (await this.getStatusListEntryRepo(statusList.type)).save(args);
|
|
6115
6339
|
}
|
|
6116
6340
|
async updateStatusListEntry(args) {
|
|
6117
|
-
const statusListId = args.statusListId
|
|
6341
|
+
const statusListId = args.statusListId;
|
|
6342
|
+
if (!statusListId) {
|
|
6343
|
+
throw new Error("statusListId is required");
|
|
6344
|
+
}
|
|
6345
|
+
const statusList = await this.getStatusList({
|
|
6346
|
+
id: statusListId
|
|
6347
|
+
});
|
|
6118
6348
|
const result = await this.getStatusListEntryByIndex({
|
|
6119
6349
|
...args,
|
|
6120
6350
|
statusListId,
|
|
6121
6351
|
errorOnNotFound: false
|
|
6122
6352
|
});
|
|
6123
6353
|
const updatedEntry = {
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
credentialId: args.credentialId
|
|
6354
|
+
...result,
|
|
6355
|
+
...args,
|
|
6356
|
+
statusListId
|
|
6128
6357
|
};
|
|
6129
6358
|
const updStatusListId = result?.statusListId ?? statusListId;
|
|
6130
|
-
const updateResult = await (await this.getStatusListEntryRepo()).upsert({
|
|
6359
|
+
const updateResult = await (await this.getStatusListEntryRepo(statusList.type)).upsert({
|
|
6131
6360
|
...result ?? {
|
|
6132
6361
|
statusListId: updStatusListId,
|
|
6133
6362
|
statusListIndex: args.statusListIndex
|
|
@@ -6139,7 +6368,7 @@ var StatusListStore = class {
|
|
|
6139
6368
|
"statusListIndex"
|
|
6140
6369
|
]
|
|
6141
6370
|
});
|
|
6142
|
-
|
|
6371
|
+
debug4(updateResult);
|
|
6143
6372
|
return await this.getStatusListEntryByIndex({
|
|
6144
6373
|
...args,
|
|
6145
6374
|
statusListId: updStatusListId,
|
|
@@ -6153,7 +6382,12 @@ var StatusListStore = class {
|
|
|
6153
6382
|
if (!statusListIndex && !entryCorrelationId) {
|
|
6154
6383
|
throw Error(`Cannot get statusList entry without either a statusListIndex or entryCorrelationId`);
|
|
6155
6384
|
}
|
|
6156
|
-
const
|
|
6385
|
+
const statusList = statusListId ? await this.getStatusList({
|
|
6386
|
+
id: statusListId
|
|
6387
|
+
}) : await this.getStatusList({
|
|
6388
|
+
correlationId: statusListCorrelationId
|
|
6389
|
+
});
|
|
6390
|
+
const result = await (await this.getStatusListEntryRepo(statusList.type)).findOne({
|
|
6157
6391
|
where: {
|
|
6158
6392
|
...statusListId && {
|
|
6159
6393
|
statusListId
|
|
@@ -6197,8 +6431,8 @@ var StatusListStore = class {
|
|
|
6197
6431
|
},
|
|
6198
6432
|
credentialId
|
|
6199
6433
|
};
|
|
6200
|
-
|
|
6201
|
-
const result = await (await this.getStatusListEntryRepo()).findOne({
|
|
6434
|
+
debug4(`Entries: ${JSON.stringify(await (await this.getStatusListEntryRepo(statusList.type)).find(), null, 2)}`);
|
|
6435
|
+
const result = await (await this.getStatusListEntryRepo(statusList.type)).findOne({
|
|
6202
6436
|
where
|
|
6203
6437
|
});
|
|
6204
6438
|
if (!result && args.errorOnNotFound) {
|
|
@@ -6214,7 +6448,11 @@ var StatusListStore = class {
|
|
|
6214
6448
|
error2 = true;
|
|
6215
6449
|
}
|
|
6216
6450
|
if (!error) {
|
|
6217
|
-
const
|
|
6451
|
+
const statusList = await this.getStatusList({
|
|
6452
|
+
id: args.statusListId,
|
|
6453
|
+
correlationId: args.statusListCorrelationId
|
|
6454
|
+
});
|
|
6455
|
+
const result = await (await this.getStatusListEntryRepo(statusList.type)).delete({
|
|
6218
6456
|
...args.statusListId && {
|
|
6219
6457
|
statusList: args.statusListId
|
|
6220
6458
|
},
|
|
@@ -6235,9 +6473,12 @@ var StatusListStore = class {
|
|
|
6235
6473
|
error2 = true;
|
|
6236
6474
|
}
|
|
6237
6475
|
if (error) {
|
|
6238
|
-
console.
|
|
6476
|
+
console.error(`Could not delete statusList ${args.statusListId} entry by index ${args.statusListIndex}`);
|
|
6239
6477
|
} else {
|
|
6240
|
-
const
|
|
6478
|
+
const statusList = await this.getStatusList({
|
|
6479
|
+
id: args.statusListId
|
|
6480
|
+
});
|
|
6481
|
+
const result = await (await this.getStatusListEntryRepo(statusList.type)).delete({
|
|
6241
6482
|
...args.statusListId && {
|
|
6242
6483
|
statusList: args.statusListId
|
|
6243
6484
|
},
|
|
@@ -6251,15 +6492,16 @@ var StatusListStore = class {
|
|
|
6251
6492
|
return !error;
|
|
6252
6493
|
}
|
|
6253
6494
|
async getStatusListEntries(args) {
|
|
6254
|
-
|
|
6495
|
+
const statusList = await this.getStatusList({
|
|
6496
|
+
id: args.statusListId
|
|
6497
|
+
});
|
|
6498
|
+
const results = await (await this.getStatusListEntryRepo(statusList.type)).find({
|
|
6255
6499
|
where: {
|
|
6256
6500
|
...args?.filter,
|
|
6257
6501
|
statusList: args.statusListId
|
|
6258
6502
|
}
|
|
6259
6503
|
});
|
|
6260
|
-
|
|
6261
|
-
async getStatusList(args) {
|
|
6262
|
-
return statusListFrom(await this.getStatusListEntity(args));
|
|
6504
|
+
return results;
|
|
6263
6505
|
}
|
|
6264
6506
|
async getStatusListEntity(args) {
|
|
6265
6507
|
if (!args.id && !args.correlationId) {
|
|
@@ -6283,6 +6525,10 @@ var StatusListStore = class {
|
|
|
6283
6525
|
}
|
|
6284
6526
|
return result;
|
|
6285
6527
|
}
|
|
6528
|
+
async getStatusList(args) {
|
|
6529
|
+
const entity = await this.getStatusListEntity(args);
|
|
6530
|
+
return statusListFrom(entity);
|
|
6531
|
+
}
|
|
6286
6532
|
async getStatusLists(args) {
|
|
6287
6533
|
const result = await (await this.getStatusListRepo()).find({
|
|
6288
6534
|
where: args.filter
|
|
@@ -6323,7 +6569,7 @@ var StatusListStore = class {
|
|
|
6323
6569
|
}
|
|
6324
6570
|
async removeStatusList(args) {
|
|
6325
6571
|
const result = await this.getStatusListEntity(args);
|
|
6326
|
-
await (await this.getStatusListEntryRepo()).delete({
|
|
6572
|
+
await (await this.getStatusListEntryRepo(result.type)).delete({
|
|
6327
6573
|
statusListId: result.id
|
|
6328
6574
|
});
|
|
6329
6575
|
const deletedEntity = await (await this.getStatusListRepo()).remove(result);
|
|
@@ -6339,12 +6585,20 @@ var StatusListStore = class {
|
|
|
6339
6585
|
return dataSource.getRepository(StatusList2021Entity);
|
|
6340
6586
|
case import_ssi_types4.StatusListType.OAuthStatusList:
|
|
6341
6587
|
return dataSource.getRepository(OAuthStatusListEntity);
|
|
6588
|
+
case import_ssi_types4.StatusListType.BitstringStatusList:
|
|
6589
|
+
return dataSource.getRepository(BitstringStatusListEntity);
|
|
6342
6590
|
default:
|
|
6343
6591
|
return dataSource.getRepository(StatusListEntity);
|
|
6344
6592
|
}
|
|
6345
6593
|
}
|
|
6346
|
-
async getStatusListEntryRepo() {
|
|
6347
|
-
|
|
6594
|
+
async getStatusListEntryRepo(type) {
|
|
6595
|
+
const dataSource = await this.getDS();
|
|
6596
|
+
switch (type) {
|
|
6597
|
+
case import_ssi_types4.StatusListType.BitstringStatusList:
|
|
6598
|
+
return dataSource.getRepository(BitstringStatusListEntryEntity);
|
|
6599
|
+
default:
|
|
6600
|
+
return dataSource.getRepository(StatusListEntryEntity);
|
|
6601
|
+
}
|
|
6348
6602
|
}
|
|
6349
6603
|
};
|
|
6350
6604
|
|
|
@@ -6548,7 +6802,7 @@ var IAbstractMachineStateStore = class {
|
|
|
6548
6802
|
|
|
6549
6803
|
// src/machineState/MachineStateStore.ts
|
|
6550
6804
|
var import_debug6 = __toESM(require("debug"), 1);
|
|
6551
|
-
var
|
|
6805
|
+
var import_typeorm38 = require("typeorm");
|
|
6552
6806
|
var debug6 = (0, import_debug6.default)("sphereon:ssi-sdk:machine-state:store");
|
|
6553
6807
|
var MachineStateStore = class _MachineStateStore extends IAbstractMachineStateStore {
|
|
6554
6808
|
static {
|
|
@@ -6584,7 +6838,7 @@ var MachineStateStore = class _MachineStateStore extends IAbstractMachineStateSt
|
|
|
6584
6838
|
const { tenantId, machineName, instanceId } = args;
|
|
6585
6839
|
const connection = await this._dbConnection;
|
|
6586
6840
|
debug6(`Executing findActiveMachineStates query with machineName: ${machineName}, tenantId: ${tenantId}`);
|
|
6587
|
-
const queryBuilder = connection.getRepository(MachineStateInfoEntity).createQueryBuilder("state").where("state.completedAt IS NULL").andWhere(new
|
|
6841
|
+
const queryBuilder = connection.getRepository(MachineStateInfoEntity).createQueryBuilder("state").where("state.completedAt IS NULL").andWhere(new import_typeorm38.Brackets((qb) => {
|
|
6588
6842
|
qb.where("state.expiresAt IS NULL").orWhere("state.expiresAt > :now", {
|
|
6589
6843
|
now: /* @__PURE__ */ new Date()
|
|
6590
6844
|
});
|
|
@@ -6654,10 +6908,10 @@ var MachineStateStore = class _MachineStateStore extends IAbstractMachineStateSt
|
|
|
6654
6908
|
},
|
|
6655
6909
|
// When deleteOnDone state is set we only look at completedAt, in other cases we compare current time with expiresAt
|
|
6656
6910
|
...!deleteDoneStates && {
|
|
6657
|
-
expiresAt: (0,
|
|
6911
|
+
expiresAt: (0, import_typeorm38.LessThan)(/* @__PURE__ */ new Date())
|
|
6658
6912
|
},
|
|
6659
6913
|
...deleteDoneStates && {
|
|
6660
|
-
completedAt: (0,
|
|
6914
|
+
completedAt: (0, import_typeorm38.Not)((0, import_typeorm38.IsNull)())
|
|
6661
6915
|
}
|
|
6662
6916
|
};
|
|
6663
6917
|
const result = await connection.getRepository(MachineStateInfoEntity).delete(deleteCriteria);
|
|
@@ -6685,7 +6939,7 @@ var AbstractPDStore = class {
|
|
|
6685
6939
|
};
|
|
6686
6940
|
|
|
6687
6941
|
// src/presentationDefinition/PDStore.ts
|
|
6688
|
-
var
|
|
6942
|
+
var import_typeorm39 = require("typeorm");
|
|
6689
6943
|
var import_debug7 = __toESM(require("debug"), 1);
|
|
6690
6944
|
|
|
6691
6945
|
// src/utils/presentationDefinition/MappingUtils.ts
|
|
@@ -6781,7 +7035,7 @@ var PDStore = class extends AbstractPDStore {
|
|
|
6781
7035
|
const initialResult = await this.findIds(pdRepository, filter);
|
|
6782
7036
|
const result = await pdRepository.find({
|
|
6783
7037
|
where: {
|
|
6784
|
-
id: (0,
|
|
7038
|
+
id: (0, import_typeorm39.In)(initialResult.map((entity) => entity.id))
|
|
6785
7039
|
},
|
|
6786
7040
|
order: {
|
|
6787
7041
|
version: "DESC"
|
|
@@ -6843,7 +7097,7 @@ var PDStore = class extends AbstractPDStore {
|
|
|
6843
7097
|
const initialResult = await this.findIds(pdRepository, filter);
|
|
6844
7098
|
const result = await pdRepository.find({
|
|
6845
7099
|
where: {
|
|
6846
|
-
id: (0,
|
|
7100
|
+
id: (0, import_typeorm39.In)(initialResult.map((entity) => entity.id))
|
|
6847
7101
|
}
|
|
6848
7102
|
});
|
|
6849
7103
|
for (const entity of result) {
|
|
@@ -6857,7 +7111,7 @@ var PDStore = class extends AbstractPDStore {
|
|
|
6857
7111
|
if (idFilters && idFilters.length > 0 && idFilters.length === filter?.length) {
|
|
6858
7112
|
return await pdRepository.find({
|
|
6859
7113
|
where: {
|
|
6860
|
-
id: (0,
|
|
7114
|
+
id: (0, import_typeorm39.In)(idFilters)
|
|
6861
7115
|
}
|
|
6862
7116
|
});
|
|
6863
7117
|
} else {
|
|
@@ -7646,7 +7900,7 @@ var UpdateStatusList1737110469001 = class {
|
|
|
7646
7900
|
await queryRunner.query(`ALTER TYPE "StatusList_type_enum" ADD VALUE 'OAuthStatusList'`);
|
|
7647
7901
|
await queryRunner.query(`ALTER TABLE "StatusList" ALTER COLUMN "indexingDirection" DROP NOT NULL`);
|
|
7648
7902
|
await queryRunner.query(`ALTER TABLE "StatusList" ALTER COLUMN "statusPurpose" DROP NOT NULL`);
|
|
7649
|
-
await queryRunner.query(`ALTER TABLE "StatusList" ADD "bitsPerStatus" integer`);
|
|
7903
|
+
await queryRunner.query(`ALTER TABLE "StatusList" ADD "bitsPerStatus" integer DEFAULT 1`);
|
|
7650
7904
|
await queryRunner.query(`ALTER TABLE "StatusList" ADD "expiresAt" timestamp with time zone`);
|
|
7651
7905
|
}
|
|
7652
7906
|
async down(queryRunner) {
|
|
@@ -8812,6 +9066,227 @@ var FixCredentialClaimsReferencesUuid1741895822987 = class {
|
|
|
8812
9066
|
}
|
|
8813
9067
|
};
|
|
8814
9068
|
|
|
9069
|
+
// src/migrations/generic/12-CreateBitstringStatusList.ts
|
|
9070
|
+
var import_debug19 = __toESM(require("debug"), 1);
|
|
9071
|
+
|
|
9072
|
+
// src/migrations/postgres/1741895823000-CreateBitstringStatusList.ts
|
|
9073
|
+
var CreateBitstringStatusListPG1741895823000 = class {
|
|
9074
|
+
static {
|
|
9075
|
+
__name(this, "CreateBitstringStatusListPG1741895823000");
|
|
9076
|
+
}
|
|
9077
|
+
name = "CreateBitstringStatusList1741895823000";
|
|
9078
|
+
async up(queryRunner) {
|
|
9079
|
+
await queryRunner.startTransaction();
|
|
9080
|
+
await queryRunner.query(`ALTER TYPE "StatusList_type_enum" ADD VALUE 'BitstringStatusList'`);
|
|
9081
|
+
await queryRunner.commitTransaction();
|
|
9082
|
+
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "ttl" integer`);
|
|
9083
|
+
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "validFrom" TIMESTAMP`);
|
|
9084
|
+
await queryRunner.query(`ALTER TABLE "StatusList" ADD COLUMN "validUntil" TIMESTAMP`);
|
|
9085
|
+
await queryRunner.query(`ALTER TABLE "StatusList" DROP CONSTRAINT IF EXISTS "CHK_StatusList_type"`);
|
|
9086
|
+
await queryRunner.query(`ALTER TABLE "StatusList" ADD CONSTRAINT "CHK_StatusList_type" CHECK ("type" IN ('StatusList2021', 'OAuthStatusList', 'BitstringStatusList'))`);
|
|
9087
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "type" character varying NOT NULL DEFAULT 'StatusListEntryEntity'`);
|
|
9088
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "statusPurpose" character varying`);
|
|
9089
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "statusMessage" text`);
|
|
9090
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD COLUMN "statusReference" text`);
|
|
9091
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" ADD CONSTRAINT "CHK_StatusListEntry_type" CHECK ("type" IN ('StatusListEntryEntity', 'bitstring'))`);
|
|
9092
|
+
}
|
|
9093
|
+
async down(queryRunner) {
|
|
9094
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP CONSTRAINT "CHK_StatusListEntry_type"`);
|
|
9095
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "statusReference"`);
|
|
9096
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "statusMessage"`);
|
|
9097
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "bitsPerStatus"`);
|
|
9098
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "statusPurpose"`);
|
|
9099
|
+
await queryRunner.query(`ALTER TABLE "StatusListEntry" DROP COLUMN "type"`);
|
|
9100
|
+
await queryRunner.query(`ALTER TABLE "StatusList" DROP CONSTRAINT "CHK_StatusList_type"`);
|
|
9101
|
+
await queryRunner.query(`ALTER TABLE "StatusList" ADD CONSTRAINT "CHK_StatusList_type" CHECK ("type" IN ('StatusList2021', 'OAuthStatusList'))`);
|
|
9102
|
+
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "validUntil"`);
|
|
9103
|
+
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "validFrom"`);
|
|
9104
|
+
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "ttl"`);
|
|
9105
|
+
await queryRunner.query(`ALTER TABLE "StatusList" DROP COLUMN "bitsPerStatus"`);
|
|
9106
|
+
}
|
|
9107
|
+
};
|
|
9108
|
+
|
|
9109
|
+
// src/migrations/sqlite/1741895823001-CreateBitstringStatusList.ts
|
|
9110
|
+
var CreateBitstringStatusListSqlite1741895823001 = class {
|
|
9111
|
+
static {
|
|
9112
|
+
__name(this, "CreateBitstringStatusListSqlite1741895823001");
|
|
9113
|
+
}
|
|
9114
|
+
name = "CreateBitstringStatusList1741895823000";
|
|
9115
|
+
async up(queryRunner) {
|
|
9116
|
+
await queryRunner.query(`
|
|
9117
|
+
CREATE TABLE "temporary_StatusList" (
|
|
9118
|
+
"id" varchar PRIMARY KEY NOT NULL,
|
|
9119
|
+
"correlationId" varchar NOT NULL,
|
|
9120
|
+
"length" integer NOT NULL,
|
|
9121
|
+
"issuer" text NOT NULL,
|
|
9122
|
+
"type" varchar CHECK( "type" IN ('StatusList2021', 'OAuthStatusList', 'BitstringStatusList') ) NOT NULL DEFAULT ('StatusList2021'),
|
|
9123
|
+
"driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'),
|
|
9124
|
+
"credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'),
|
|
9125
|
+
"proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt', 'vc+jwt') ) NOT NULL DEFAULT ('lds'),
|
|
9126
|
+
"indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ),
|
|
9127
|
+
"statusPurpose" varchar,
|
|
9128
|
+
"statusListCredential" text,
|
|
9129
|
+
"expiresAt" datetime,
|
|
9130
|
+
"bitsPerStatus" integer DEFAULT (1),
|
|
9131
|
+
"ttl" integer,
|
|
9132
|
+
"validFrom" datetime,
|
|
9133
|
+
"validUntil" datetime,
|
|
9134
|
+
CONSTRAINT "UQ_correlationId" UNIQUE ("correlationId")
|
|
9135
|
+
)
|
|
9136
|
+
`);
|
|
9137
|
+
await queryRunner.query(`
|
|
9138
|
+
INSERT INTO "temporary_StatusList"(
|
|
9139
|
+
"id", "correlationId", "length", "issuer", "type", "driverType",
|
|
9140
|
+
"credentialIdMode", "proofFormat", "indexingDirection", "statusPurpose",
|
|
9141
|
+
"statusListCredential", "bitsPerStatus", "expiresAt"
|
|
9142
|
+
)
|
|
9143
|
+
SELECT
|
|
9144
|
+
"id", "correlationId", "length", "issuer", "type", "driverType",
|
|
9145
|
+
"credentialIdMode", "proofFormat", "indexingDirection", "statusPurpose",
|
|
9146
|
+
"statusListCredential", "bitsPerStatus", "expiresAt"
|
|
9147
|
+
FROM "StatusList"
|
|
9148
|
+
`);
|
|
9149
|
+
await queryRunner.query(`DROP TABLE "StatusList"`);
|
|
9150
|
+
await queryRunner.query(`ALTER TABLE "temporary_StatusList" RENAME TO "StatusList"`);
|
|
9151
|
+
await queryRunner.query(`
|
|
9152
|
+
CREATE TABLE "temporary_StatusListEntry" (
|
|
9153
|
+
"statusListId" varchar NOT NULL,
|
|
9154
|
+
"statusListIndex" integer NOT NULL,
|
|
9155
|
+
"credentialId" text,
|
|
9156
|
+
"credentialHash" varchar(128),
|
|
9157
|
+
"correlationId" varchar(255),
|
|
9158
|
+
"value" varchar(50),
|
|
9159
|
+
"type" varchar CHECK( "type" IN ('StatusListEntryEntity', 'bitstring') ) NOT NULL DEFAULT ('StatusListEntryEntity'),
|
|
9160
|
+
"statusPurpose" varchar,
|
|
9161
|
+
"bitsPerStatus" integer DEFAULT (1),
|
|
9162
|
+
"statusMessage" text,
|
|
9163
|
+
"statusReference" text,
|
|
9164
|
+
PRIMARY KEY ("statusListId", "statusListIndex")
|
|
9165
|
+
)
|
|
9166
|
+
`);
|
|
9167
|
+
await queryRunner.query(`
|
|
9168
|
+
INSERT INTO "temporary_StatusListEntry"(
|
|
9169
|
+
"statusListId", "statusListIndex", "credentialId", "credentialHash",
|
|
9170
|
+
"correlationId", "value", "type"
|
|
9171
|
+
)
|
|
9172
|
+
SELECT
|
|
9173
|
+
"statusListId", "statusListIndex", "credentialId", "credentialHash",
|
|
9174
|
+
"correlationId", "value", 'StatusListEntryEntity'
|
|
9175
|
+
FROM "StatusListEntry"
|
|
9176
|
+
`);
|
|
9177
|
+
await queryRunner.query(`DROP TABLE "StatusListEntry"`);
|
|
9178
|
+
await queryRunner.query(`ALTER TABLE "temporary_StatusListEntry" RENAME TO "StatusListEntry"`);
|
|
9179
|
+
}
|
|
9180
|
+
async down(queryRunner) {
|
|
9181
|
+
await queryRunner.query(`
|
|
9182
|
+
CREATE TABLE "temporary_StatusListEntry" (
|
|
9183
|
+
"statusListId" varchar NOT NULL,
|
|
9184
|
+
"statusListIndex" integer NOT NULL,
|
|
9185
|
+
"credentialId" text,
|
|
9186
|
+
"credentialHash" varchar(128),
|
|
9187
|
+
"correlationId" varchar(255),
|
|
9188
|
+
"value" varchar(50),
|
|
9189
|
+
PRIMARY KEY ("statusListId", "statusListIndex")
|
|
9190
|
+
)
|
|
9191
|
+
`);
|
|
9192
|
+
await queryRunner.query(`
|
|
9193
|
+
INSERT INTO "temporary_StatusListEntry"(
|
|
9194
|
+
"statusListId", "statusListIndex", "credentialId", "credentialHash",
|
|
9195
|
+
"correlationId", "value"
|
|
9196
|
+
)
|
|
9197
|
+
SELECT
|
|
9198
|
+
"statusListId", "statusListIndex", "credentialId", "credentialHash",
|
|
9199
|
+
"correlationId", "value"
|
|
9200
|
+
FROM "StatusListEntry"
|
|
9201
|
+
WHERE "type" = 'StatusListEntryEntity'
|
|
9202
|
+
`);
|
|
9203
|
+
await queryRunner.query(`DROP TABLE "StatusListEntry"`);
|
|
9204
|
+
await queryRunner.query(`ALTER TABLE "temporary_StatusListEntry" RENAME TO "StatusListEntry"`);
|
|
9205
|
+
await queryRunner.query(`
|
|
9206
|
+
CREATE TABLE "temporary_StatusList" (
|
|
9207
|
+
"id" varchar PRIMARY KEY NOT NULL,
|
|
9208
|
+
"correlationId" varchar NOT NULL,
|
|
9209
|
+
"length" integer NOT NULL,
|
|
9210
|
+
"issuer" text NOT NULL,
|
|
9211
|
+
"type" varchar CHECK( "type" IN ('StatusList2021', 'OAuthStatusList') ) NOT NULL DEFAULT ('StatusList2021'),
|
|
9212
|
+
"driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'),
|
|
9213
|
+
"credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'),
|
|
9214
|
+
"proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt', 'vc+jwt') ) NOT NULL DEFAULT ('lds'),
|
|
9215
|
+
"indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ),
|
|
9216
|
+
"statusPurpose" varchar,
|
|
9217
|
+
"statusListCredential" text,
|
|
9218
|
+
"bitsPerStatus" integer,
|
|
9219
|
+
"expiresAt" datetime,
|
|
9220
|
+
CONSTRAINT "UQ_correlationId" UNIQUE ("correlationId")
|
|
9221
|
+
)
|
|
9222
|
+
`);
|
|
9223
|
+
await queryRunner.query(`
|
|
9224
|
+
INSERT INTO "temporary_StatusList"(
|
|
9225
|
+
"id", "correlationId", "length", "issuer", "type", "driverType",
|
|
9226
|
+
"credentialIdMode", "proofFormat", "indexingDirection", "statusPurpose",
|
|
9227
|
+
"statusListCredential", "bitsPerStatus", "expiresAt"
|
|
9228
|
+
)
|
|
9229
|
+
SELECT
|
|
9230
|
+
"id", "correlationId", "length", "issuer",
|
|
9231
|
+
CASE WHEN "type" = 'BitstringStatusList' THEN 'StatusList2021' ELSE "type" END,
|
|
9232
|
+
"driverType", "credentialIdMode", "proofFormat", "indexingDirection",
|
|
9233
|
+
"statusPurpose", "statusListCredential", "bitsPerStatus", "expiresAt"
|
|
9234
|
+
FROM "StatusList"
|
|
9235
|
+
`);
|
|
9236
|
+
await queryRunner.query(`DROP TABLE "StatusList"`);
|
|
9237
|
+
await queryRunner.query(`ALTER TABLE "temporary_StatusList" RENAME TO "StatusList"`);
|
|
9238
|
+
}
|
|
9239
|
+
};
|
|
9240
|
+
|
|
9241
|
+
// src/migrations/generic/12-CreateBitstringStatusList.ts
|
|
9242
|
+
var debug19 = (0, import_debug19.default)("sphereon:ssi-sdk:migrations");
|
|
9243
|
+
var CreateBitstringStatusList1741895823000 = class {
|
|
9244
|
+
static {
|
|
9245
|
+
__name(this, "CreateBitstringStatusList1741895823000");
|
|
9246
|
+
}
|
|
9247
|
+
name = "CreateBitstringStatusList1741895823000";
|
|
9248
|
+
async up(queryRunner) {
|
|
9249
|
+
debug19("migration: creating bitstring status list tables");
|
|
9250
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
9251
|
+
switch (dbType) {
|
|
9252
|
+
case "postgres": {
|
|
9253
|
+
const mig = new CreateBitstringStatusListPG1741895823000();
|
|
9254
|
+
await mig.up(queryRunner);
|
|
9255
|
+
return;
|
|
9256
|
+
}
|
|
9257
|
+
case "sqlite":
|
|
9258
|
+
case "expo":
|
|
9259
|
+
case "react-native": {
|
|
9260
|
+
const mig = new CreateBitstringStatusListSqlite1741895823001();
|
|
9261
|
+
await mig.up(queryRunner);
|
|
9262
|
+
return;
|
|
9263
|
+
}
|
|
9264
|
+
default:
|
|
9265
|
+
return Promise.reject(`Migrations only supported for sqlite and postgres. Was ${dbType}`);
|
|
9266
|
+
}
|
|
9267
|
+
}
|
|
9268
|
+
async down(queryRunner) {
|
|
9269
|
+
debug19("migration: dropping bitstring status list tables");
|
|
9270
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
9271
|
+
switch (dbType) {
|
|
9272
|
+
case "postgres": {
|
|
9273
|
+
const mig = new CreateBitstringStatusListPG1741895823000();
|
|
9274
|
+
await mig.down(queryRunner);
|
|
9275
|
+
return;
|
|
9276
|
+
}
|
|
9277
|
+
case "sqlite":
|
|
9278
|
+
case "expo":
|
|
9279
|
+
case "react-native": {
|
|
9280
|
+
const mig = new CreateBitstringStatusListSqlite1741895823001();
|
|
9281
|
+
await mig.down(queryRunner);
|
|
9282
|
+
return;
|
|
9283
|
+
}
|
|
9284
|
+
default:
|
|
9285
|
+
return Promise.reject(`Migrations only supported for sqlite and postgres. Was ${dbType}`);
|
|
9286
|
+
}
|
|
9287
|
+
}
|
|
9288
|
+
};
|
|
9289
|
+
|
|
8815
9290
|
// src/migrations/generic/index.ts
|
|
8816
9291
|
var DataStoreContactMigrations = [
|
|
8817
9292
|
CreateContacts1659463079429,
|
|
@@ -8824,7 +9299,8 @@ var DataStoreIssuanceBrandingMigrations = [
|
|
|
8824
9299
|
FixCredentialClaimsReferencesUuid1741895822987
|
|
8825
9300
|
];
|
|
8826
9301
|
var DataStoreStatusListMigrations = [
|
|
8827
|
-
CreateStatusList1693866470000
|
|
9302
|
+
CreateStatusList1693866470000,
|
|
9303
|
+
CreateBitstringStatusList1741895823000
|
|
8828
9304
|
];
|
|
8829
9305
|
var DataStoreEventLoggerMigrations = [
|
|
8830
9306
|
CreateAuditEvents1701635835330
|
|
@@ -9029,6 +9505,8 @@ var DataStoreStatusListEntities = [
|
|
|
9029
9505
|
StatusListEntity,
|
|
9030
9506
|
StatusList2021Entity,
|
|
9031
9507
|
OAuthStatusListEntity,
|
|
9508
|
+
BitstringStatusListEntity,
|
|
9509
|
+
BitstringStatusListEntryEntity,
|
|
9032
9510
|
StatusListEntryEntity
|
|
9033
9511
|
];
|
|
9034
9512
|
var DataStoreEventLoggerEntities = [
|