import { StreamSubmitOptions } from "./types.cjs";

//#region src/stream/queue-adapter.d.ts
/** A single queued submission. */
interface SubmissionQueueEntry<StateType extends object = Record<string, unknown>> {
  /** Stable id minted on enqueue (uuidv7) or the server run id for a hydrated entry. */
  readonly id: string;
  /** Server run id, once accepted. Absent while a dispatch is still in flight. */
  readonly runId?: string;
  /** Original submit input, narrowed to the partial state shape. */
  readonly values: Partial<StateType> | null | undefined;
  /** Original submit options, minus the strategy slot which is reset on drain. */
  readonly options?: StreamSubmitOptions<StateType>;
  /** Wall-clock timestamp at enqueue. */
  readonly createdAt: Date;
}
/**
 * Read-only snapshot of the queue. The queue store hands this out
 * directly; consumers must not mutate the array.
 */
type SubmissionQueueSnapshot<StateType extends object = Record<string, unknown>> = ReadonlyArray<SubmissionQueueEntry<StateType>>;
//#endregion
export { SubmissionQueueEntry, SubmissionQueueSnapshot };
//# sourceMappingURL=queue-adapter.d.cts.map