Hyperlinkv0.8.0-beta.28

QueueHyperlink

QueueHyperlink.makeQueueItemCodecDescriptorconstsrc/internal/queueHyperlink.ts:273
<T>(
  key: string,
  itemSchema: Schema.Codec<T, unknown, never, never>,
  options?: { readonly version?: string }
): QueueItemCodecDescriptor

Build a QueueItemCodecDescriptor from a live Effect Schema value. The descriptor's id (…/item@vN) and version are taken from the schema's withSchemaVersion stamp (default 1), so the descriptor self-describes the schema version for handoff / drift checks.

export const makeQueueItemCodecDescriptor = <T>(
  key: string,
  itemSchema: Schema.Codec<T, unknown, never, never>,
  options?: { readonly version?: string },
): QueueItemCodecDescriptor => {
  const version = schemaVersionOf(itemSchema);
  const wrapped = Schema.toStandardJSONSchemaV1(itemSchema);
  const jsonSchema = wrapped["~standard"].jsonSchema.input({ target: "draft-07" });
  return {
    id: `${key}/item@v${String(version)}`,
    version: options?.version ?? String(version),
    encoding: "json",
    jsonSchema,
  };
};