@sphereon/ssi-sdk.event-logger 0.33.1-next.3 → 0.33.1-next.68

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.
@@ -8,7 +8,8 @@
8
8
  "filter": {
9
9
  "$ref": "#/components/schemas/FindActivityLoggingEventArgs"
10
10
  }
11
- }
11
+ },
12
+ "additionalProperties": false
12
13
  },
13
14
  "FindActivityLoggingEventArgs": {
14
15
  "type": "array",
@@ -17,18 +18,19 @@
17
18
  }
18
19
  },
19
20
  "PartialActivityLoggingEvent": {
21
+ "$ref": "#/components/schemas/Partial<ActivityLoggingEvent>"
22
+ },
23
+ "Partial<ActivityLoggingEvent>": {
20
24
  "type": "object",
21
25
  "properties": {
22
26
  "level": {
23
- "type": "object",
24
- "properties": {}
27
+ "$ref": "#/components/schemas/LogLevel"
25
28
  },
26
29
  "correlationId": {
27
30
  "type": "string"
28
31
  },
29
32
  "timestamp": {
30
- "type": "object",
31
- "properties": {},
33
+ "type": "string",
32
34
  "format": "date-time"
33
35
  },
34
36
  "diagnosticData": {},
@@ -36,8 +38,7 @@
36
38
  "type": "string"
37
39
  },
38
40
  "type": {
39
- "type": "object",
40
- "properties": {}
41
+ "$ref": "#/components/schemas/LoggingEventType.ACTIVITY"
41
42
  },
42
43
  "originalCredential": {
43
44
  "type": "string"
@@ -49,42 +50,28 @@
49
50
  "type": "string"
50
51
  },
51
52
  "credentialType": {
52
- "type": "object",
53
- "properties": {}
53
+ "$ref": "#/components/schemas/CredentialType"
54
54
  },
55
55
  "sharePurpose": {
56
56
  "type": "string"
57
57
  },
58
58
  "system": {
59
- "type": "object",
60
- "properties": {}
59
+ "$ref": "#/components/schemas/System"
61
60
  },
62
61
  "subSystemType": {
63
- "type": "object",
64
- "properties": {}
62
+ "$ref": "#/components/schemas/SubSystem"
65
63
  },
66
64
  "actionType": {
67
- "type": "object",
68
- "properties": {}
65
+ "$ref": "#/components/schemas/ActionType"
69
66
  },
70
67
  "actionSubType": {
71
- "anyOf": [
72
- {
73
- "type": "object",
74
- "properties": {}
75
- },
76
- {
77
- "type": "string"
78
- }
79
- ]
68
+ "$ref": "#/components/schemas/ActionSubType"
80
69
  },
81
70
  "initiatorType": {
82
- "type": "object",
83
- "properties": {}
71
+ "$ref": "#/components/schemas/InitiatorType"
84
72
  },
85
73
  "systemCorrelationIdType": {
86
- "type": "object",
87
- "properties": {}
74
+ "$ref": "#/components/schemas/SystemCorrelationIdType"
88
75
  },
89
76
  "systemCorrelationId": {
90
77
  "type": "string"
@@ -93,8 +80,7 @@
93
80
  "type": "string"
94
81
  },
95
82
  "partyCorrelationType": {
96
- "type": "object",
97
- "properties": {}
83
+ "$ref": "#/components/schemas/PartyCorrelationType"
98
84
  },
99
85
  "partyCorrelationId": {
100
86
  "type": "string"
@@ -106,17 +92,96 @@
106
92
  "type": "string"
107
93
  },
108
94
  "data": {}
109
- }
95
+ },
96
+ "additionalProperties": false
97
+ },
98
+ "LogLevel": {
99
+ "type": "number",
100
+ "enum": [0, 1, 2, 3, 4]
101
+ },
102
+ "LoggingEventType.ACTIVITY": {
103
+ "type": "string",
104
+ "const": "activity"
105
+ },
106
+ "CredentialType": {
107
+ "type": "string",
108
+ "enum": ["JSON_LD", "JWT", "SD_JWT", "MSO_MDOC"]
109
+ },
110
+ "System": {
111
+ "type": "string",
112
+ "enum": ["general", "kms", "identity", "oid4vci", "oid4vp", "siopv2", "PE", "credentials", "web3", "profile", "contact"]
113
+ },
114
+ "SubSystem": {
115
+ "type": "string",
116
+ "enum": [
117
+ "key",
118
+ "did_provider",
119
+ "did_resolver",
120
+ "oid4vp_op",
121
+ "oid4vci_client",
122
+ "siopv2_op",
123
+ "contact_manager",
124
+ "vc_issuer",
125
+ "vc_verifier",
126
+ "vc_persistence",
127
+ "transport",
128
+ "profile",
129
+ "api"
130
+ ]
131
+ },
132
+ "ActionType": {
133
+ "type": "string",
134
+ "enum": ["create", "read", "update", "delete", "execute"]
135
+ },
136
+ "ActionSubType": {
137
+ "anyOf": [
138
+ {
139
+ "$ref": "#/components/schemas/DefaultActionSubType"
140
+ },
141
+ {
142
+ "type": "string"
143
+ }
144
+ ]
145
+ },
146
+ "DefaultActionSubType": {
147
+ "type": "string",
148
+ "enum": [
149
+ "Key generation",
150
+ "Key import",
151
+ "Key persistence",
152
+ "Key removal",
153
+ "DID creation",
154
+ "DID resolution",
155
+ "DID service update",
156
+ "VC issue",
157
+ "VC verify",
158
+ "VC share",
159
+ "VC delete",
160
+ "VC issue decline",
161
+ "VC share decline"
162
+ ]
163
+ },
164
+ "InitiatorType": {
165
+ "type": "string",
166
+ "enum": ["user", "system", "external"]
167
+ },
168
+ "SystemCorrelationIdType": {
169
+ "type": "string",
170
+ "enum": ["did", "url", "email", "hostname", "phone", "user"]
171
+ },
172
+ "PartyCorrelationType": {
173
+ "type": "string",
174
+ "enum": ["did", "url", "email", "hostname", "phone"]
110
175
  },
111
176
  "ActivityLoggingEvent": {
112
177
  "type": "object",
178
+ "additionalProperties": false,
113
179
  "properties": {
114
180
  "id": {
115
181
  "type": "string"
116
182
  },
117
183
  "type": {
118
- "type": "string",
119
- "const": "activity"
184
+ "$ref": "#/components/schemas/LoggingEventType.ACTIVITY"
120
185
  },
121
186
  "originalCredential": {
122
187
  "type": "string"
@@ -196,133 +261,14 @@
196
261
  "type"
197
262
  ]
198
263
  },
199
- "CredentialType": {
200
- "type": "string",
201
- "enum": [
202
- "JSON_LD",
203
- "JWT",
204
- "SD_JWT",
205
- "MSO_MDOC"
206
- ]
207
- },
208
- "System": {
209
- "type": "string",
210
- "enum": [
211
- "general",
212
- "kms",
213
- "identity",
214
- "oid4vci",
215
- "oid4vp",
216
- "siopv2",
217
- "PE",
218
- "credentials",
219
- "web3",
220
- "profile",
221
- "contact"
222
- ]
223
- },
224
- "SubSystem": {
225
- "type": "string",
226
- "enum": [
227
- "key",
228
- "did_provider",
229
- "did_resolver",
230
- "oid4vp_op",
231
- "oid4vci_client",
232
- "siopv2_op",
233
- "contact_manager",
234
- "vc_issuer",
235
- "vc_verifier",
236
- "vc_persistence",
237
- "transport",
238
- "profile",
239
- "api"
240
- ]
241
- },
242
- "ActionType": {
243
- "type": "string",
244
- "enum": [
245
- "create",
246
- "read",
247
- "update",
248
- "delete",
249
- "execute"
250
- ]
251
- },
252
- "ActionSubType": {
253
- "anyOf": [
254
- {
255
- "$ref": "#/components/schemas/DefaultActionSubType"
256
- },
257
- {
258
- "type": "string"
259
- }
260
- ]
261
- },
262
- "DefaultActionSubType": {
263
- "type": "string",
264
- "enum": [
265
- "Key generation",
266
- "Key import",
267
- "Key persistence",
268
- "Key removal",
269
- "DID creation",
270
- "DID resolution",
271
- "DID service update",
272
- "VC issue",
273
- "VC verify",
274
- "VC share",
275
- "VC delete",
276
- "VC issue decline",
277
- "VC share decline"
278
- ]
279
- },
280
- "InitiatorType": {
281
- "type": "string",
282
- "enum": [
283
- "user",
284
- "system",
285
- "external"
286
- ]
287
- },
288
- "SystemCorrelationIdType": {
289
- "type": "string",
290
- "enum": [
291
- "did",
292
- "url",
293
- "email",
294
- "hostname",
295
- "phone",
296
- "user"
297
- ]
298
- },
299
- "PartyCorrelationType": {
300
- "type": "string",
301
- "enum": [
302
- "did",
303
- "url",
304
- "email",
305
- "hostname",
306
- "phone"
307
- ]
308
- },
309
- "LogLevel": {
310
- "type": "number",
311
- "enum": [
312
- 0,
313
- 1,
314
- 2,
315
- 3,
316
- 4
317
- ]
318
- },
319
264
  "GetAuditEventsArgs": {
320
265
  "type": "object",
321
266
  "properties": {
322
267
  "filter": {
323
268
  "$ref": "#/components/schemas/FindAuditLoggingEventArgs"
324
269
  }
325
- }
270
+ },
271
+ "additionalProperties": false
326
272
  },
327
273
  "FindAuditLoggingEventArgs": {
328
274
  "type": "array",
@@ -331,18 +277,19 @@
331
277
  }
332
278
  },
333
279
  "PartialAuditLoggingEvent": {
280
+ "$ref": "#/components/schemas/Partial<AuditLoggingEvent>"
281
+ },
282
+ "Partial<AuditLoggingEvent>": {
334
283
  "type": "object",
335
284
  "properties": {
336
285
  "level": {
337
- "type": "object",
338
- "properties": {}
286
+ "$ref": "#/components/schemas/LogLevel"
339
287
  },
340
288
  "correlationId": {
341
289
  "type": "string"
342
290
  },
343
291
  "timestamp": {
344
- "type": "object",
345
- "properties": {},
292
+ "type": "string",
346
293
  "format": "date-time"
347
294
  },
348
295
  "diagnosticData": {},
@@ -350,39 +297,25 @@
350
297
  "type": "string"
351
298
  },
352
299
  "type": {
353
- "type": "object",
354
- "properties": {}
300
+ "$ref": "#/components/schemas/LoggingEventType.AUDIT"
355
301
  },
356
302
  "system": {
357
- "type": "object",
358
- "properties": {}
303
+ "$ref": "#/components/schemas/System"
359
304
  },
360
305
  "subSystemType": {
361
- "type": "object",
362
- "properties": {}
306
+ "$ref": "#/components/schemas/SubSystem"
363
307
  },
364
308
  "actionType": {
365
- "type": "object",
366
- "properties": {}
309
+ "$ref": "#/components/schemas/ActionType"
367
310
  },
368
311
  "actionSubType": {
369
- "anyOf": [
370
- {
371
- "type": "object",
372
- "properties": {}
373
- },
374
- {
375
- "type": "string"
376
- }
377
- ]
312
+ "$ref": "#/components/schemas/ActionSubType"
378
313
  },
379
314
  "initiatorType": {
380
- "type": "object",
381
- "properties": {}
315
+ "$ref": "#/components/schemas/InitiatorType"
382
316
  },
383
317
  "systemCorrelationIdType": {
384
- "type": "object",
385
- "properties": {}
318
+ "$ref": "#/components/schemas/SystemCorrelationIdType"
386
319
  },
387
320
  "systemCorrelationId": {
388
321
  "type": "string"
@@ -391,8 +324,7 @@
391
324
  "type": "string"
392
325
  },
393
326
  "partyCorrelationType": {
394
- "type": "object",
395
- "properties": {}
327
+ "$ref": "#/components/schemas/PartyCorrelationType"
396
328
  },
397
329
  "partyCorrelationId": {
398
330
  "type": "string"
@@ -404,17 +336,22 @@
404
336
  "type": "string"
405
337
  },
406
338
  "data": {}
407
- }
339
+ },
340
+ "additionalProperties": false
341
+ },
342
+ "LoggingEventType.AUDIT": {
343
+ "type": "string",
344
+ "const": "audit"
408
345
  },
409
346
  "AuditLoggingEvent": {
410
347
  "type": "object",
348
+ "additionalProperties": false,
411
349
  "properties": {
412
350
  "id": {
413
351
  "type": "string"
414
352
  },
415
353
  "type": {
416
- "type": "string",
417
- "const": "audit"
354
+ "$ref": "#/components/schemas/LoggingEventType.AUDIT"
418
355
  },
419
356
  "correlationId": {
420
357
  "type": "string"
@@ -486,9 +423,8 @@
486
423
  "$ref": "#/components/schemas/LogEventType"
487
424
  }
488
425
  },
489
- "required": [
490
- "event"
491
- ]
426
+ "required": ["event"],
427
+ "additionalProperties": false
492
428
  },
493
429
  "LogEventType": {
494
430
  "anyOf": [
@@ -502,6 +438,7 @@
502
438
  },
503
439
  "NonPersistedAuditLoggingEvent": {
504
440
  "type": "object",
441
+ "additionalProperties": false,
505
442
  "properties": {
506
443
  "system": {
507
444
  "$ref": "#/components/schemas/System"
@@ -514,23 +451,13 @@
514
451
  },
515
452
  "diagnosticData": {},
516
453
  "actionType": {
517
- "type": "object",
518
- "properties": {}
454
+ "$ref": "#/components/schemas/ActionType"
519
455
  },
520
456
  "actionSubType": {
521
- "anyOf": [
522
- {
523
- "type": "object",
524
- "properties": {}
525
- },
526
- {
527
- "type": "string"
528
- }
529
- ]
457
+ "$ref": "#/components/schemas/ActionSubType"
530
458
  },
531
459
  "systemCorrelationIdType": {
532
- "type": "object",
533
- "properties": {}
460
+ "$ref": "#/components/schemas/SystemCorrelationIdType"
534
461
  },
535
462
  "systemCorrelationId": {
536
463
  "type": "string"
@@ -539,8 +466,7 @@
539
466
  "type": "string"
540
467
  },
541
468
  "partyCorrelationType": {
542
- "type": "object",
543
- "properties": {}
469
+ "$ref": "#/components/schemas/PartyCorrelationType"
544
470
  },
545
471
  "partyCorrelationId": {
546
472
  "type": "string"
@@ -553,24 +479,17 @@
553
479
  },
554
480
  "data": {},
555
481
  "level": {
556
- "type": "object",
557
- "properties": {}
482
+ "$ref": "#/components/schemas/LogLevel"
558
483
  },
559
484
  "correlationId": {
560
485
  "type": "string"
561
486
  }
562
487
  },
563
- "required": [
564
- "actionSubType",
565
- "actionType",
566
- "description",
567
- "initiatorType",
568
- "subSystemType",
569
- "system"
570
- ]
488
+ "required": ["actionSubType", "actionType", "description", "initiatorType", "subSystemType", "system"]
571
489
  },
572
490
  "NonPersistedActivityLoggingEvent": {
573
491
  "type": "object",
492
+ "additionalProperties": false,
574
493
  "properties": {
575
494
  "system": {
576
495
  "$ref": "#/components/schemas/System"
@@ -591,8 +510,7 @@
591
510
  "type": "string"
592
511
  },
593
512
  "credentialType": {
594
- "type": "object",
595
- "properties": {}
513
+ "$ref": "#/components/schemas/CredentialType"
596
514
  },
597
515
  "sharePurpose": {
598
516
  "type": "string"
@@ -600,23 +518,13 @@
600
518
  "data": {},
601
519
  "diagnosticData": {},
602
520
  "actionType": {
603
- "type": "object",
604
- "properties": {}
521
+ "$ref": "#/components/schemas/ActionType"
605
522
  },
606
523
  "actionSubType": {
607
- "anyOf": [
608
- {
609
- "type": "object",
610
- "properties": {}
611
- },
612
- {
613
- "type": "string"
614
- }
615
- ]
524
+ "$ref": "#/components/schemas/ActionSubType"
616
525
  },
617
526
  "systemCorrelationIdType": {
618
- "type": "object",
619
- "properties": {}
527
+ "$ref": "#/components/schemas/SystemCorrelationIdType"
620
528
  },
621
529
  "systemCorrelationId": {
622
530
  "type": "string"
@@ -625,8 +533,7 @@
625
533
  "type": "string"
626
534
  },
627
535
  "partyCorrelationType": {
628
- "type": "object",
629
- "properties": {}
536
+ "$ref": "#/components/schemas/PartyCorrelationType"
630
537
  },
631
538
  "partyCorrelationId": {
632
539
  "type": "string"
@@ -638,21 +545,13 @@
638
545
  "type": "string"
639
546
  },
640
547
  "level": {
641
- "type": "object",
642
- "properties": {}
548
+ "$ref": "#/components/schemas/LogLevel"
643
549
  },
644
550
  "correlationId": {
645
551
  "type": "string"
646
552
  }
647
553
  },
648
- "required": [
649
- "actionSubType",
650
- "actionType",
651
- "description",
652
- "initiatorType",
653
- "subSystemType",
654
- "system"
655
- ]
554
+ "required": ["actionSubType", "actionType", "description", "initiatorType", "subSystemType", "system"]
656
555
  }
657
556
  },
658
557
  "methods": {
@@ -710,4 +609,4 @@
710
609
  }
711
610
  }
712
611
  }
713
- }
612
+ }
@@ -1,23 +0,0 @@
1
- import { Loggers, LoggingEventType } from '@sphereon/ssi-types';
2
- import { IAgentPlugin } from '@veramo/core';
3
- import { EventLoggerOptions, IEventLogger, LoggingEvent, RequiredContext } from '../types/IEventLogger';
4
- /**
5
- * {@inheritDoc IEventLogger}
6
- */
7
- export declare const eventLoggerAuditMethods: Array<string>;
8
- export declare const eventLoggerMethods: Array<string>;
9
- export declare class EventLogger implements IAgentPlugin {
10
- readonly schema: any;
11
- readonly eventTypes: Array<LoggingEventType>;
12
- private readonly store?;
13
- readonly simpleLoggers: Loggers;
14
- readonly methods: IEventLogger;
15
- constructor(options: EventLoggerOptions);
16
- onEvent(event: LoggingEvent, context: RequiredContext): Promise<void>;
17
- private loggerGetAuditEvents;
18
- private loggerGetActivityEvents;
19
- private loggerLogGeneralEvent;
20
- private loggerLogAuditEvent;
21
- private loggerLogActivityEvent;
22
- }
23
- //# sourceMappingURL=EventLogger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EventLogger.d.ts","sourceRoot":"","sources":["../../src/agent/EventLogger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAuB,MAAM,qBAAqB,CAAA;AAEpF,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAG3C,OAAO,EACL,kBAAkB,EAGlB,YAAY,EAIZ,YAAY,EAEZ,eAAe,EAChB,MAAM,uBAAuB,CAAA;AAE9B;;GAEG;AAGH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,MAAM,CAMjD,CAAA;AACD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAgC,CAAA;AAE7E,qBAAa,WAAY,YAAW,YAAY;IAC9C,QAAQ,CAAC,MAAM,MAAsB;IACrC,QAAQ,CAAC,UAAU,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAK;IACjD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAA0B;IACjD,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;IAE/B,QAAQ,CAAC,OAAO,EAAE,YAAY,CAM7B;gBAEW,OAAO,EAAE,kBAAkB;IAuB1B,OAAO,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;YAoBpE,oBAAoB;YAUpB,uBAAuB;YAUvB,qBAAqB;YAOrB,mBAAmB;YAoBnB,sBAAsB;CAmBrC"}