arvo-event-handler 3.0.6 → 3.0.8

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.
Files changed (46) hide show
  1. package/dist/ArvoEventHandler/helpers.d.ts +2 -2
  2. package/dist/ArvoEventHandler/index.d.ts +4 -4
  3. package/dist/ArvoEventHandler/index.js +13 -34
  4. package/dist/ArvoEventHandler/types.d.ts +5 -3
  5. package/dist/ArvoMachine/createMachine.d.ts +4 -2
  6. package/dist/ArvoMachine/createMachine.js +1 -1
  7. package/dist/ArvoMachine/types.d.ts +5 -1
  8. package/dist/ArvoOrchestrationUtils/createEmitableEvent.d.ts +30 -0
  9. package/dist/ArvoOrchestrationUtils/createEmitableEvent.js +160 -0
  10. package/dist/ArvoOrchestrationUtils/error.d.ts +18 -0
  11. package/dist/{ArvoOrchestrator → ArvoOrchestrationUtils}/error.js +14 -9
  12. package/dist/ArvoOrchestrationUtils/handlerErrors.d.ts +35 -0
  13. package/dist/ArvoOrchestrationUtils/handlerErrors.js +184 -0
  14. package/dist/ArvoOrchestrationUtils/orchestrationExecutionState.d.ts +11 -0
  15. package/dist/ArvoOrchestrationUtils/orchestrationExecutionState.js +7 -0
  16. package/dist/ArvoOrchestrationUtils/orchestrationExecutionWrapper/acquireLockWithValidation.d.ts +8 -0
  17. package/dist/ArvoOrchestrationUtils/orchestrationExecutionWrapper/acquireLockWithValidation.js +69 -0
  18. package/dist/ArvoOrchestrationUtils/orchestrationExecutionWrapper/index.d.ts +40 -0
  19. package/dist/ArvoOrchestrationUtils/orchestrationExecutionWrapper/index.js +228 -0
  20. package/dist/ArvoOrchestrationUtils/orchestrationExecutionWrapper/validateAndParseSubject.d.ts +7 -0
  21. package/dist/ArvoOrchestrationUtils/orchestrationExecutionWrapper/validateAndParseSubject.js +25 -0
  22. package/dist/ArvoOrchestrationUtils/types.d.ts +1 -0
  23. package/dist/ArvoOrchestrationUtils/types.js +2 -0
  24. package/dist/ArvoOrchestrator/factory.js +13 -0
  25. package/dist/ArvoOrchestrator/index.d.ts +5 -21
  26. package/dist/ArvoOrchestrator/index.js +93 -505
  27. package/dist/ArvoOrchestrator/types.d.ts +5 -4
  28. package/dist/ArvoResumable/factory.d.ts +2 -2
  29. package/dist/ArvoResumable/factory.js +1 -1
  30. package/dist/ArvoResumable/index.d.ts +6 -20
  31. package/dist/ArvoResumable/index.js +85 -462
  32. package/dist/ArvoResumable/types.d.ts +8 -5
  33. package/dist/IArvoEventHandler/index.d.ts +36 -0
  34. package/dist/IArvoEventHandler/index.js +2 -0
  35. package/dist/MachineExecutionEngine/index.d.ts +1 -1
  36. package/dist/MachineRegistry/index.d.ts +1 -1
  37. package/dist/SyncEventResource/index.d.ts +1 -1
  38. package/dist/SyncEventResource/index.js +1 -1
  39. package/dist/index.d.ts +14 -13
  40. package/dist/index.js +24 -23
  41. package/dist/types.d.ts +2 -2
  42. package/dist/utils/SimpleEventBroker/helper.d.ts +2 -2
  43. package/package.json +5 -4
  44. package/dist/AbstractArvoEventHandler/index.d.ts +0 -91
  45. package/dist/AbstractArvoEventHandler/index.js +0 -18
  46. package/dist/ArvoOrchestrator/error.d.ts +0 -16
@@ -1,18 +1,16 @@
1
- import { type ArvoContractRecord, type ArvoEvent, type OpenTelemetryHeaders } from 'arvo-core';
2
- import type ArvoMachine from '../ArvoMachine';
3
- import type { EnqueueArvoEventActionParam } from '../ArvoMachine/types';
1
+ import { type ArvoContractRecord, type ArvoEvent } from 'arvo-core';
2
+ import type IArvoEventHandler from '../IArvoEventHandler';
4
3
  import type { IMachineExectionEngine } from '../MachineExecutionEngine/interface';
5
4
  import type { IMachineMemory } from '../MachineMemory/interface';
6
5
  import type { IMachineRegistry } from '../MachineRegistry/interface';
7
- import type { IArvoOrchestrator, MachineMemoryRecord } from './types';
8
6
  import { SyncEventResource } from '../SyncEventResource';
9
- import AbstractArvoEventHandler from '../AbstractArvoEventHandler';
10
7
  import type { ArvoEventHandlerOpenTelemetryOptions } from '../types';
8
+ import type { ArvoOrchestratorParam, MachineMemoryRecord } from './types';
11
9
  /**
12
10
  * Orchestrates state machine execution and lifecycle management.
13
11
  * Handles machine resolution, state management, event processing and error handling.
14
12
  */
15
- export declare class ArvoOrchestrator extends AbstractArvoEventHandler {
13
+ export declare class ArvoOrchestrator implements IArvoEventHandler {
16
14
  readonly executionunits: number;
17
15
  readonly registry: IMachineRegistry;
18
16
  readonly executionEngine: IMachineExectionEngine;
@@ -27,21 +25,7 @@ export declare class ArvoOrchestrator extends AbstractArvoEventHandler {
27
25
  * @param params - Configuration parameters
28
26
  * @throws Error if machines in registry have different sources
29
27
  */
30
- constructor({ executionunits, memory, registry, executionEngine, requiresResourceLocking, systemErrorDomain, }: IArvoOrchestrator);
31
- /**
32
- * Creates emittable event from execution result
33
- * @param event - Source event to emit
34
- * @param machine - Machine that generated event
35
- * @param otelHeaders - OpenTelemetry headers
36
- * @param orchestrationParentSubject - Parent orchestration subject
37
- * @param sourceEvent - Original triggering event
38
- * @param initEventId - The id of the event which initiated the orchestration in the first place
39
- * @param _domain - The domain of the event.
40
- *
41
- * @throws {ContractViolation} On schema/contract mismatch
42
- * @throws {ExecutionViolation} On invalid parentSubject$$ format
43
- */
44
- protected createEmittableEvent(event: EnqueueArvoEventActionParam, machine: ArvoMachine<any, any, any, any, any>, otelHeaders: OpenTelemetryHeaders, orchestrationParentSubject: string | null, sourceEvent: ArvoEvent, initEventId: string, _domain: string | null): ArvoEvent;
28
+ constructor({ executionunits, memory, registry, executionEngine, requiresResourceLocking, systemErrorDomain, }: ArvoOrchestratorParam);
45
29
  /**
46
30
  * Core orchestration method that executes state machines in response to events.
47
31
  *