FileBody
Type, in @jr2/orchestrator/src/http-effect.ts. The signature of an export, or a type that it names, names this type. The Authoring surface page lists each export. This type is not an export of @jr2/orchestrator, so a workflow module does not import it by name.
type FileBody<S extends z.ZodType | undefined = undefined> = {
readonly file: {
readonly path: FromInput<S, string>;
readonly slot?: string;
readonly segments?: FromInput<S, readonly string[]>;
readonly contentType?: string;
};
};file(path, { slot?, segments?, contentType? }): a Worktree file as an http body.
Fields
file:objectpath:FromInput<S, string>The file, relative to the Repo Slot's Worktree, or to
/workin a Workspace with no Repo Slot.slot(optional):stringThe Repo Slot whose Worktree holds it. Write it only when the Workspace has more than one.
segments(optional):FromInput<S, readonly string[]>Path segments that jr2 adds to the end of the url, as
pathofrequestdoes for a json or text body.contentType(optional):stringThe content type of the body. Write it or a
content-typeheader, not both. With neither, it isapplication/octet-stream.