@sphereon/ssi-sdk.event-logger 0.33.0 → 0.33.1-feature.jose.vcdm.55

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.js CHANGED
@@ -1,28 +1,827 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropNames = Object.getOwnPropertyNames;
3
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
4
+ var __commonJS = (cb, mod) => function __require() {
5
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
6
+ };
7
+
8
+ // plugin.schema.json
9
+ var require_plugin_schema = __commonJS({
10
+ "plugin.schema.json"(exports, module) {
11
+ module.exports = {
12
+ IEventLogger: {
13
+ components: {
14
+ schemas: {
15
+ GetActivityEventsArgs: {
16
+ type: "object",
17
+ properties: {
18
+ filter: {
19
+ $ref: "#/components/schemas/FindActivityLoggingEventArgs"
20
+ }
21
+ },
22
+ additionalProperties: false
23
+ },
24
+ FindActivityLoggingEventArgs: {
25
+ type: "array",
26
+ items: {
27
+ $ref: "#/components/schemas/PartialActivityLoggingEvent"
28
+ }
29
+ },
30
+ PartialActivityLoggingEvent: {
31
+ $ref: "#/components/schemas/Partial<ActivityLoggingEvent>"
32
+ },
33
+ "Partial<ActivityLoggingEvent>": {
34
+ type: "object",
35
+ properties: {
36
+ level: {
37
+ $ref: "#/components/schemas/LogLevel"
38
+ },
39
+ correlationId: {
40
+ type: "string"
41
+ },
42
+ timestamp: {
43
+ type: "string",
44
+ format: "date-time"
45
+ },
46
+ diagnosticData: {},
47
+ id: {
48
+ type: "string"
49
+ },
50
+ type: {
51
+ $ref: "#/components/schemas/LoggingEventType.ACTIVITY"
52
+ },
53
+ originalCredential: {
54
+ type: "string"
55
+ },
56
+ credentialHash: {
57
+ type: "string"
58
+ },
59
+ parentCredentialHash: {
60
+ type: "string"
61
+ },
62
+ credentialType: {
63
+ $ref: "#/components/schemas/CredentialType"
64
+ },
65
+ sharePurpose: {
66
+ type: "string"
67
+ },
68
+ system: {
69
+ $ref: "#/components/schemas/System"
70
+ },
71
+ subSystemType: {
72
+ $ref: "#/components/schemas/SubSystem"
73
+ },
74
+ actionType: {
75
+ $ref: "#/components/schemas/ActionType"
76
+ },
77
+ actionSubType: {
78
+ $ref: "#/components/schemas/ActionSubType"
79
+ },
80
+ initiatorType: {
81
+ $ref: "#/components/schemas/InitiatorType"
82
+ },
83
+ systemCorrelationIdType: {
84
+ $ref: "#/components/schemas/SystemCorrelationIdType"
85
+ },
86
+ systemCorrelationId: {
87
+ type: "string"
88
+ },
89
+ systemAlias: {
90
+ type: "string"
91
+ },
92
+ partyCorrelationType: {
93
+ $ref: "#/components/schemas/PartyCorrelationType"
94
+ },
95
+ partyCorrelationId: {
96
+ type: "string"
97
+ },
98
+ partyAlias: {
99
+ type: "string"
100
+ },
101
+ description: {
102
+ type: "string"
103
+ },
104
+ data: {}
105
+ },
106
+ additionalProperties: false
107
+ },
108
+ LogLevel: {
109
+ type: "number",
110
+ enum: [
111
+ 0,
112
+ 1,
113
+ 2,
114
+ 3,
115
+ 4
116
+ ]
117
+ },
118
+ "LoggingEventType.ACTIVITY": {
119
+ type: "string",
120
+ const: "activity"
121
+ },
122
+ CredentialType: {
123
+ type: "string",
124
+ enum: [
125
+ "JSON_LD",
126
+ "JWT",
127
+ "SD_JWT",
128
+ "MSO_MDOC"
129
+ ]
130
+ },
131
+ System: {
132
+ type: "string",
133
+ enum: [
134
+ "general",
135
+ "kms",
136
+ "identity",
137
+ "oid4vci",
138
+ "oid4vp",
139
+ "siopv2",
140
+ "PE",
141
+ "credentials",
142
+ "web3",
143
+ "profile",
144
+ "contact"
145
+ ]
146
+ },
147
+ SubSystem: {
148
+ type: "string",
149
+ enum: [
150
+ "key",
151
+ "did_provider",
152
+ "did_resolver",
153
+ "oid4vp_op",
154
+ "oid4vci_client",
155
+ "siopv2_op",
156
+ "contact_manager",
157
+ "vc_issuer",
158
+ "vc_verifier",
159
+ "vc_persistence",
160
+ "transport",
161
+ "profile",
162
+ "api"
163
+ ]
164
+ },
165
+ ActionType: {
166
+ type: "string",
167
+ enum: [
168
+ "create",
169
+ "read",
170
+ "update",
171
+ "delete",
172
+ "execute"
173
+ ]
174
+ },
175
+ ActionSubType: {
176
+ anyOf: [
177
+ {
178
+ $ref: "#/components/schemas/DefaultActionSubType"
179
+ },
180
+ {
181
+ type: "string"
182
+ }
183
+ ]
184
+ },
185
+ DefaultActionSubType: {
186
+ type: "string",
187
+ enum: [
188
+ "Key generation",
189
+ "Key import",
190
+ "Key persistence",
191
+ "Key removal",
192
+ "DID creation",
193
+ "DID resolution",
194
+ "DID service update",
195
+ "VC issue",
196
+ "VC verify",
197
+ "VC share",
198
+ "VC delete",
199
+ "VC issue decline",
200
+ "VC share decline"
201
+ ]
202
+ },
203
+ InitiatorType: {
204
+ type: "string",
205
+ enum: [
206
+ "user",
207
+ "system",
208
+ "external"
209
+ ]
210
+ },
211
+ SystemCorrelationIdType: {
212
+ type: "string",
213
+ enum: [
214
+ "did",
215
+ "url",
216
+ "email",
217
+ "hostname",
218
+ "phone",
219
+ "user"
220
+ ]
221
+ },
222
+ PartyCorrelationType: {
223
+ type: "string",
224
+ enum: [
225
+ "did",
226
+ "url",
227
+ "email",
228
+ "hostname",
229
+ "phone"
230
+ ]
231
+ },
232
+ ActivityLoggingEvent: {
233
+ type: "object",
234
+ additionalProperties: false,
235
+ properties: {
236
+ id: {
237
+ type: "string"
238
+ },
239
+ type: {
240
+ $ref: "#/components/schemas/LoggingEventType.ACTIVITY"
241
+ },
242
+ originalCredential: {
243
+ type: "string"
244
+ },
245
+ credentialHash: {
246
+ type: "string"
247
+ },
248
+ parentCredentialHash: {
249
+ type: "string"
250
+ },
251
+ credentialType: {
252
+ $ref: "#/components/schemas/CredentialType"
253
+ },
254
+ sharePurpose: {
255
+ type: "string"
256
+ },
257
+ correlationId: {
258
+ type: "string"
259
+ },
260
+ system: {
261
+ $ref: "#/components/schemas/System"
262
+ },
263
+ subSystemType: {
264
+ $ref: "#/components/schemas/SubSystem"
265
+ },
266
+ actionType: {
267
+ $ref: "#/components/schemas/ActionType"
268
+ },
269
+ actionSubType: {
270
+ $ref: "#/components/schemas/ActionSubType"
271
+ },
272
+ initiatorType: {
273
+ $ref: "#/components/schemas/InitiatorType"
274
+ },
275
+ systemCorrelationIdType: {
276
+ $ref: "#/components/schemas/SystemCorrelationIdType"
277
+ },
278
+ systemCorrelationId: {
279
+ type: "string"
280
+ },
281
+ systemAlias: {
282
+ type: "string"
283
+ },
284
+ partyCorrelationType: {
285
+ $ref: "#/components/schemas/PartyCorrelationType"
286
+ },
287
+ partyCorrelationId: {
288
+ type: "string"
289
+ },
290
+ partyAlias: {
291
+ type: "string"
292
+ },
293
+ description: {
294
+ type: "string"
295
+ },
296
+ data: {},
297
+ level: {
298
+ $ref: "#/components/schemas/LogLevel"
299
+ },
300
+ timestamp: {
301
+ type: "string",
302
+ format: "date-time"
303
+ },
304
+ diagnosticData: {}
305
+ },
306
+ required: [
307
+ "actionSubType",
308
+ "actionType",
309
+ "correlationId",
310
+ "description",
311
+ "id",
312
+ "initiatorType",
313
+ "level",
314
+ "subSystemType",
315
+ "system",
316
+ "timestamp",
317
+ "type"
318
+ ]
319
+ },
320
+ GetAuditEventsArgs: {
321
+ type: "object",
322
+ properties: {
323
+ filter: {
324
+ $ref: "#/components/schemas/FindAuditLoggingEventArgs"
325
+ }
326
+ },
327
+ additionalProperties: false
328
+ },
329
+ FindAuditLoggingEventArgs: {
330
+ type: "array",
331
+ items: {
332
+ $ref: "#/components/schemas/PartialAuditLoggingEvent"
333
+ }
334
+ },
335
+ PartialAuditLoggingEvent: {
336
+ $ref: "#/components/schemas/Partial<AuditLoggingEvent>"
337
+ },
338
+ "Partial<AuditLoggingEvent>": {
339
+ type: "object",
340
+ properties: {
341
+ level: {
342
+ $ref: "#/components/schemas/LogLevel"
343
+ },
344
+ correlationId: {
345
+ type: "string"
346
+ },
347
+ timestamp: {
348
+ type: "string",
349
+ format: "date-time"
350
+ },
351
+ diagnosticData: {},
352
+ id: {
353
+ type: "string"
354
+ },
355
+ type: {
356
+ $ref: "#/components/schemas/LoggingEventType.AUDIT"
357
+ },
358
+ system: {
359
+ $ref: "#/components/schemas/System"
360
+ },
361
+ subSystemType: {
362
+ $ref: "#/components/schemas/SubSystem"
363
+ },
364
+ actionType: {
365
+ $ref: "#/components/schemas/ActionType"
366
+ },
367
+ actionSubType: {
368
+ $ref: "#/components/schemas/ActionSubType"
369
+ },
370
+ initiatorType: {
371
+ $ref: "#/components/schemas/InitiatorType"
372
+ },
373
+ systemCorrelationIdType: {
374
+ $ref: "#/components/schemas/SystemCorrelationIdType"
375
+ },
376
+ systemCorrelationId: {
377
+ type: "string"
378
+ },
379
+ systemAlias: {
380
+ type: "string"
381
+ },
382
+ partyCorrelationType: {
383
+ $ref: "#/components/schemas/PartyCorrelationType"
384
+ },
385
+ partyCorrelationId: {
386
+ type: "string"
387
+ },
388
+ partyAlias: {
389
+ type: "string"
390
+ },
391
+ description: {
392
+ type: "string"
393
+ },
394
+ data: {}
395
+ },
396
+ additionalProperties: false
397
+ },
398
+ "LoggingEventType.AUDIT": {
399
+ type: "string",
400
+ const: "audit"
401
+ },
402
+ AuditLoggingEvent: {
403
+ type: "object",
404
+ additionalProperties: false,
405
+ properties: {
406
+ id: {
407
+ type: "string"
408
+ },
409
+ type: {
410
+ $ref: "#/components/schemas/LoggingEventType.AUDIT"
411
+ },
412
+ correlationId: {
413
+ type: "string"
414
+ },
415
+ system: {
416
+ $ref: "#/components/schemas/System"
417
+ },
418
+ subSystemType: {
419
+ $ref: "#/components/schemas/SubSystem"
420
+ },
421
+ actionType: {
422
+ $ref: "#/components/schemas/ActionType"
423
+ },
424
+ actionSubType: {
425
+ $ref: "#/components/schemas/ActionSubType"
426
+ },
427
+ initiatorType: {
428
+ $ref: "#/components/schemas/InitiatorType"
429
+ },
430
+ systemCorrelationIdType: {
431
+ $ref: "#/components/schemas/SystemCorrelationIdType"
432
+ },
433
+ systemCorrelationId: {
434
+ type: "string"
435
+ },
436
+ systemAlias: {
437
+ type: "string"
438
+ },
439
+ partyCorrelationType: {
440
+ $ref: "#/components/schemas/PartyCorrelationType"
441
+ },
442
+ partyCorrelationId: {
443
+ type: "string"
444
+ },
445
+ partyAlias: {
446
+ type: "string"
447
+ },
448
+ description: {
449
+ type: "string"
450
+ },
451
+ data: {},
452
+ level: {
453
+ $ref: "#/components/schemas/LogLevel"
454
+ },
455
+ timestamp: {
456
+ type: "string",
457
+ format: "date-time"
458
+ },
459
+ diagnosticData: {}
460
+ },
461
+ required: [
462
+ "actionSubType",
463
+ "actionType",
464
+ "correlationId",
465
+ "description",
466
+ "id",
467
+ "initiatorType",
468
+ "level",
469
+ "subSystemType",
470
+ "system",
471
+ "timestamp",
472
+ "type"
473
+ ]
474
+ },
475
+ LogEventArgs: {
476
+ type: "object",
477
+ properties: {
478
+ event: {
479
+ $ref: "#/components/schemas/LogEventType"
480
+ }
481
+ },
482
+ required: [
483
+ "event"
484
+ ],
485
+ additionalProperties: false
486
+ },
487
+ LogEventType: {
488
+ anyOf: [
489
+ {
490
+ $ref: "#/components/schemas/NonPersistedAuditLoggingEvent"
491
+ },
492
+ {
493
+ $ref: "#/components/schemas/NonPersistedActivityLoggingEvent"
494
+ }
495
+ ]
496
+ },
497
+ NonPersistedAuditLoggingEvent: {
498
+ type: "object",
499
+ additionalProperties: false,
500
+ properties: {
501
+ system: {
502
+ $ref: "#/components/schemas/System"
503
+ },
504
+ subSystemType: {
505
+ $ref: "#/components/schemas/SubSystem"
506
+ },
507
+ initiatorType: {
508
+ $ref: "#/components/schemas/InitiatorType"
509
+ },
510
+ diagnosticData: {},
511
+ actionType: {
512
+ $ref: "#/components/schemas/ActionType"
513
+ },
514
+ actionSubType: {
515
+ $ref: "#/components/schemas/ActionSubType"
516
+ },
517
+ systemCorrelationIdType: {
518
+ $ref: "#/components/schemas/SystemCorrelationIdType"
519
+ },
520
+ systemCorrelationId: {
521
+ type: "string"
522
+ },
523
+ systemAlias: {
524
+ type: "string"
525
+ },
526
+ partyCorrelationType: {
527
+ $ref: "#/components/schemas/PartyCorrelationType"
528
+ },
529
+ partyCorrelationId: {
530
+ type: "string"
531
+ },
532
+ partyAlias: {
533
+ type: "string"
534
+ },
535
+ description: {
536
+ type: "string"
537
+ },
538
+ data: {},
539
+ level: {
540
+ $ref: "#/components/schemas/LogLevel"
541
+ },
542
+ correlationId: {
543
+ type: "string"
544
+ }
545
+ },
546
+ required: [
547
+ "actionSubType",
548
+ "actionType",
549
+ "description",
550
+ "initiatorType",
551
+ "subSystemType",
552
+ "system"
553
+ ]
554
+ },
555
+ NonPersistedActivityLoggingEvent: {
556
+ type: "object",
557
+ additionalProperties: false,
558
+ properties: {
559
+ system: {
560
+ $ref: "#/components/schemas/System"
561
+ },
562
+ subSystemType: {
563
+ $ref: "#/components/schemas/SubSystem"
564
+ },
565
+ initiatorType: {
566
+ $ref: "#/components/schemas/InitiatorType"
567
+ },
568
+ originalCredential: {
569
+ type: "string"
570
+ },
571
+ credentialHash: {
572
+ type: "string"
573
+ },
574
+ parentCredentialHash: {
575
+ type: "string"
576
+ },
577
+ credentialType: {
578
+ $ref: "#/components/schemas/CredentialType"
579
+ },
580
+ sharePurpose: {
581
+ type: "string"
582
+ },
583
+ data: {},
584
+ diagnosticData: {},
585
+ actionType: {
586
+ $ref: "#/components/schemas/ActionType"
587
+ },
588
+ actionSubType: {
589
+ $ref: "#/components/schemas/ActionSubType"
590
+ },
591
+ systemCorrelationIdType: {
592
+ $ref: "#/components/schemas/SystemCorrelationIdType"
593
+ },
594
+ systemCorrelationId: {
595
+ type: "string"
596
+ },
597
+ systemAlias: {
598
+ type: "string"
599
+ },
600
+ partyCorrelationType: {
601
+ $ref: "#/components/schemas/PartyCorrelationType"
602
+ },
603
+ partyCorrelationId: {
604
+ type: "string"
605
+ },
606
+ partyAlias: {
607
+ type: "string"
608
+ },
609
+ description: {
610
+ type: "string"
611
+ },
612
+ level: {
613
+ $ref: "#/components/schemas/LogLevel"
614
+ },
615
+ correlationId: {
616
+ type: "string"
617
+ }
618
+ },
619
+ required: [
620
+ "actionSubType",
621
+ "actionType",
622
+ "description",
623
+ "initiatorType",
624
+ "subSystemType",
625
+ "system"
626
+ ]
627
+ }
628
+ },
629
+ methods: {
630
+ loggerGetActivityEvents: {
631
+ description: "",
632
+ arguments: {
633
+ $ref: "#/components/schemas/GetActivityEventsArgs"
634
+ },
635
+ returnType: {
636
+ type: "array",
637
+ items: {
638
+ $ref: "#/components/schemas/ActivityLoggingEvent"
639
+ }
640
+ }
641
+ },
642
+ loggerGetAuditEvents: {
643
+ description: "",
644
+ arguments: {
645
+ $ref: "#/components/schemas/GetAuditEventsArgs"
646
+ },
647
+ returnType: {
648
+ type: "array",
649
+ items: {
650
+ $ref: "#/components/schemas/AuditLoggingEvent"
651
+ }
652
+ }
653
+ },
654
+ loggerLogActivityEvent: {
655
+ description: "",
656
+ arguments: {
657
+ $ref: "#/components/schemas/LogEventArgs"
658
+ },
659
+ returnType: {
660
+ $ref: "#/components/schemas/ActivityLoggingEvent"
661
+ }
662
+ },
663
+ loggerLogAuditEvent: {
664
+ description: "",
665
+ arguments: {
666
+ $ref: "#/components/schemas/LogEventArgs"
667
+ },
668
+ returnType: {
669
+ $ref: "#/components/schemas/AuditLoggingEvent"
670
+ }
671
+ },
672
+ loggerLogGeneralEvent: {
673
+ description: "",
674
+ arguments: {
675
+ $ref: "#/components/schemas/LogEventArgs"
676
+ },
677
+ returnType: {
678
+ $ref: "#/components/schemas/LogEventType"
679
+ }
680
+ }
681
+ }
682
+ }
683
+ }
684
+ };
685
+ }
686
+ });
687
+
688
+ // src/agent/EventLogger.ts
689
+ import { Loggers, LoggingEventType, LogLevel, LogMethod } from "@sphereon/ssi-types";
690
+ import { v4 as uuidv4 } from "uuid";
691
+ var eventLoggerAuditMethods = [
692
+ "loggerGetAuditEvents",
693
+ "loggerLogAuditEvent",
694
+ "loggerLogGeneralEvent",
695
+ "loggerLogActivityEvent",
696
+ "loggerGetActivityEvents"
697
+ ];
698
+ var eventLoggerMethods = [
699
+ ...eventLoggerAuditMethods
700
+ ];
701
+ var EventLogger = class {
702
+ static {
703
+ __name(this, "EventLogger");
704
+ }
705
+ schema = schema.IEventLogger;
706
+ eventTypes = [];
707
+ store;
708
+ simpleLoggers;
709
+ methods = {
710
+ loggerGetAuditEvents: this.loggerGetAuditEvents.bind(this),
711
+ loggerLogAuditEvent: this.loggerLogAuditEvent.bind(this),
712
+ loggerLogGeneralEvent: this.loggerLogGeneralEvent.bind(this),
713
+ loggerLogActivityEvent: this.loggerLogActivityEvent.bind(this),
714
+ loggerGetActivityEvents: this.loggerGetActivityEvents.bind(this)
715
+ };
716
+ constructor(options) {
717
+ const { store, eventTypes } = options;
718
+ const generalOpts = options.general ?? {
719
+ debugPkg: true
720
+ };
721
+ this.store = store;
722
+ this.eventTypes = eventTypes;
723
+ const methods = [];
724
+ if (generalOpts.debugPkg) {
725
+ methods.push(LogMethod.DEBUG_PKG);
726
+ }
727
+ if (generalOpts.console) {
728
+ methods.push(LogMethod.CONSOLE);
729
+ }
730
+ if (generalOpts.events) {
731
+ methods.push(LogMethod.EVENT);
732
+ }
733
+ this.simpleLoggers = new Loggers({
734
+ methods,
735
+ eventName: generalOpts.eventName,
736
+ defaultLogLevel: generalOpts.defaultLogLevel
737
+ });
738
+ }
739
+ async onEvent(event, context) {
740
+ switch (event.type) {
741
+ case LoggingEventType.AUDIT:
742
+ await context.agent.loggerLogAuditEvent({
743
+ event: event.data
744
+ });
745
+ break;
746
+ case LoggingEventType.GENERAL:
747
+ await context.agent.loggerLogGeneralEvent({
748
+ event: event.data
749
+ });
750
+ break;
751
+ case LoggingEventType.ACTIVITY:
752
+ await context.agent.loggerLogActivityEvent({
753
+ event: event.data
754
+ });
755
+ break;
756
+ default:
757
+ return Promise.reject(Error(`Event type ${event.type} not supported`));
758
+ }
759
+ }
760
+ async loggerGetAuditEvents(args) {
761
+ const { filter } = args ?? {};
762
+ if (!this.store) {
763
+ return Promise.reject(Error("No store available in options"));
764
+ }
765
+ return this.store.getAuditEvents({
766
+ filter
767
+ });
768
+ }
769
+ async loggerGetActivityEvents(args) {
770
+ const { filter } = args ?? {};
771
+ if (!this.store) {
772
+ return Promise.reject(Error("No store available in options"));
773
+ }
774
+ return this.store.getActivityEvents({
775
+ filter
776
+ });
777
+ }
778
+ async loggerLogGeneralEvent(args) {
779
+ const { event } = args;
780
+ this.simpleLoggers.get(event.data.system).logl(event.data.level ?? LogLevel.INFO, event.data.data, event.data);
781
+ return args.event;
782
+ }
783
+ async loggerLogAuditEvent(args) {
784
+ const { event } = args;
785
+ if (!this.store) {
786
+ return Promise.reject(Error("No store available in options"));
787
+ }
788
+ return this.store.storeAuditEvent({
789
+ event: {
790
+ ...event,
791
+ system: event.system,
792
+ subSystemType: event.subSystemType,
793
+ initiatorType: event.initiatorType,
794
+ level: event.level ?? LogLevel.INFO,
795
+ correlationId: event.correlationId ?? uuidv4(),
796
+ timestamp: /* @__PURE__ */ new Date()
797
+ }
798
+ });
799
+ }
800
+ async loggerLogActivityEvent(args) {
801
+ const { event } = args;
802
+ if (!this.store) {
803
+ return Promise.reject(Error("No store available in options"));
804
+ }
805
+ return this.store.storeActivityEvent({
806
+ event: {
807
+ ...event,
808
+ system: event.system,
809
+ subSystemType: event.subSystemType,
810
+ initiatorType: event.initiatorType,
811
+ level: event.level ?? LogLevel.INFO,
812
+ correlationId: event.correlationId ?? uuidv4(),
813
+ timestamp: /* @__PURE__ */ new Date()
814
+ }
815
+ });
816
+ }
817
+ };
818
+
819
+ // src/index.ts
820
+ var schema = require_plugin_schema();
821
+ export {
822
+ EventLogger,
823
+ eventLoggerAuditMethods,
824
+ eventLoggerMethods,
825
+ schema
15
826
  };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.eventLoggerAuditMethods = exports.eventLoggerMethods = exports.EventLogger = exports.schema = void 0;
18
- /**
19
- * @public
20
- */
21
- const schema = require('../plugin.schema.json');
22
- exports.schema = schema;
23
- var EventLogger_1 = require("./agent/EventLogger");
24
- Object.defineProperty(exports, "EventLogger", { enumerable: true, get: function () { return EventLogger_1.EventLogger; } });
25
- Object.defineProperty(exports, "eventLoggerMethods", { enumerable: true, get: function () { return EventLogger_1.eventLoggerMethods; } });
26
- Object.defineProperty(exports, "eventLoggerAuditMethods", { enumerable: true, get: function () { return EventLogger_1.eventLoggerAuditMethods; } });
27
- __exportStar(require("./types/IEventLogger"), exports);
28
827
  //# sourceMappingURL=index.js.map