@voltro/testing 0.83.1 → 0.85.0

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.d.ts CHANGED
@@ -13,7 +13,6 @@ import { EventPublisher } from '@voltro/runtime';
13
13
  import { InspectedStep } from '@voltro/workflow';
14
14
  import { InspectedWorkflow } from '@voltro/workflow';
15
15
  import { Layer } from 'effect';
16
- import { ParseResult } from 'effect';
17
16
  import { ProcedureDescriptor } from '@voltro/protocol';
18
17
  import { PublicApiDescriptor } from '@voltro/protocol/rest';
19
18
  import { PublicApiProfileConfig } from '@voltro/protocol';
@@ -27,6 +26,7 @@ import { RpcConnection } from '@voltro/runtime';
27
26
  import { RpcInterceptor } from '@voltro/protocol';
28
27
  import { RpcKind } from '@voltro/protocol';
29
28
  import { Schema } from 'effect';
29
+ import { SchemaError } from 'effect/Schema';
30
30
  import { Scope } from 'effect';
31
31
  import { ServiceApi } from '@voltro/protocol';
32
32
  import { Subject } from '@voltro/protocol';
@@ -678,8 +678,6 @@ export declare const nextSequence: () => number;
678
678
  /** Delivery nudges emitted through `ctx.outbox` on this context. */
679
679
  export declare const outboxNudgesOf: (ctx: TestContext) => ReadonlyArray<string>;
680
680
 
681
- export { ParseResult }
682
-
683
681
  /** The plugins a context was built with — for the REST harness, which hands
684
682
  * their cross-cutting errors to the `publicApi` projection the way both boot
685
683
  * paths do. */
@@ -809,6 +807,8 @@ export declare const runAfterCommit: (ctx: TestContext) => Promise<void>;
809
807
  */
810
808
  export declare const runInStoreTransaction: <T>(ctx: TestContext, work: (txCtx: TestContext) => Promise<T>) => Promise<T>;
811
809
 
810
+ export { SchemaError }
811
+
812
812
  /** A machine subject scoped to ONE tenant (a per-tenant integration, a
813
813
  * `storeForTenant` view). NOT the cross-tenant `system()` below. */
814
814
  export declare const serviceAccount: (id: string, options?: TestSubjectOptions) => Subject;
@@ -1020,11 +1020,11 @@ export declare interface TestEventBus {
1020
1020
  * descriptor fails here, which is the point: a harness that skipped validation
1021
1021
  * would let a test pass on a payload production rejects.
1022
1022
  */
1023
- publish<Name extends string, Key extends Schema.Schema.Any, Payload extends Schema.Schema.Any>(descriptor: EventDescriptor<Name, Key, Payload>, key: Schema.Schema.Type<Key>, payload: Schema.Schema.Type<Payload>): Promise<{
1023
+ publish<Name extends string, Key extends Schema.Top, Payload extends Schema.Top>(descriptor: EventDescriptor<Name, Key, Payload>, key: Schema.Schema.Type<Key>, payload: Schema.Schema.Type<Payload>): Promise<{
1024
1024
  readonly n: number;
1025
1025
  }>;
1026
1026
  /** Publish and ASSERT it succeeded — the common case, one line. */
1027
- subscribe<Name extends string, Key extends Schema.Schema.Any, Payload extends Schema.Schema.Any>(descriptor: EventDescriptor<Name, Key, Payload>, key: Schema.Schema.Type<Key>, options?: {
1027
+ subscribe<Name extends string, Key extends Schema.Top, Payload extends Schema.Top>(descriptor: EventDescriptor<Name, Key, Payload>, key: Schema.Schema.Type<Key>, options?: {
1028
1028
  readonly tenantId?: string | null;
1029
1029
  readonly resume?: ReadonlyArray<{
1030
1030
  origin: string;
@@ -1040,7 +1040,7 @@ export declare interface TestEventBus {
1040
1040
  * is owed messages the ring never held — exactly the shape a slow consumer
1041
1041
  * produces, deterministically.
1042
1042
  */
1043
- skipSerials<Name extends string, Key extends Schema.Schema.Any, Payload extends Schema.Schema.Any>(descriptor: EventDescriptor<Name, Key, Payload>, key: Schema.Schema.Type<Key>, count: number, options?: {
1043
+ skipSerials<Name extends string, Key extends Schema.Top, Payload extends Schema.Top>(descriptor: EventDescriptor<Name, Key, Payload>, key: Schema.Schema.Type<Key>, count: number, options?: {
1044
1044
  readonly tenantId?: string | null;
1045
1045
  }): void;
1046
1046
  /** The underlying bus, for a test that needs something not exposed here. */
@@ -1161,7 +1161,7 @@ export declare const withFrozenTime: <A>(at: Date | number | string | MockClock,
1161
1161
  export declare const withRpcConnection: (ctx: TestContext, connection: RpcConnection | undefined) => TestContext;
1162
1162
 
1163
1163
  /** A workflow + its execute function, as the framework pairs them via
1164
- * `workflow.toLayer(execute)`. Structural (no `@effect/workflow` generic
1164
+ * `workflow.toLayer(execute)`. Structural (no `effect/workflow` generic
1165
1165
  * signature) so callers can pass the value from `workflow({ name, ... })`
1166
1166
  * plus its `(payload, executionId) => Effect` execute directly — type-erased
1167
1167
  * over the workflow's payload/success/error/requirement shapes. */