Hyperlinkv0.8.0-beta.28

QueueHyperlink

QueueHyperlink.queueEntryconstsrc/QueueHyperlink.ts:234
<Sch extends Schema.Top>(itemSchema: Sch): Schema.Struct<{
  readonly item: Sch
  readonly entryId: Schema.String
  readonly key: Schema.optional<Schema.String>
  readonly priority: Schema.Literals<readonly ["high", "normal", "low"]>
  readonly attempts: Schema.Number
  readonly timestamps: Schema.Struct<{
    readonly enqueuedAt: Schema.DateTimeUtc
    readonly startedAt: Schema.optionalKey<Schema.DateTimeUtc>
    readonly completedAt: Schema.optionalKey<Schema.DateTimeUtc>
    readonly interruptedAt: Schema.optionalKey<Schema.DateTimeUtc>
  }>
  readonly batchId: Schema.optional<Schema.String>
  readonly releaseId: Schema.optional<Schema.String>
  readonly sourceHyperlinkId: Schema.optional<Schema.String>
  readonly attributes: Schema.optional<
    Schema.$Record<Schema.String, Schema.Unknown>
  >
}>

A queue entry on the wire, parameterized by the per-instance itemSchema. Mirrors the engine's QueueEntry<T>; used inside queueEvent.

wire schemasqueueEvent
export const queueEntry = <Sch extends Schema.Top>(itemSchema: Sch) =>
  Schema.Struct({
    item: itemSchema,
    entryId: Schema.String,
    // `optional` (not `optionalKey`): the engine emits `key: undefined` explicitly when no dedup
    // key, so the wire schema must accept a present-but-undefined value (else encode fails on RPC).
    key: Schema.optional(Schema.String),
    priority: queuePriority,
    attempts: Schema.Number,
    timestamps: queueEntryTimestamps,
    // `optional` (not `optionalKey`): the engine's `release`/route paths spread metadata that may
    // hold present-but-`undefined` values, so the wire schema must accept them (else encode fails).
    batchId: Schema.optional(Schema.String),
    releaseId: Schema.optional(Schema.String),
    sourceHyperlinkId: Schema.optional(Schema.String),
    attributes: Schema.optional(queueEntryAttributes),
  });
Referenced by 1 symbols