// Code generated by seatgen from the seat definitions; DO NOT EDIT. // The contract of the seat "git", defined whole (seats/git/seat.json): The forge: every read and act a delivery part makes of the mesh's git repositories, and what the forge says happened (design 47 *The seat git*, ADR 0596 §1, §2). A failed read answers an error, never an empty answer. export const seat = "git"; export const verbs = { pull: "pull", branch: "branch", openPulls: "open-pulls", tags: "tags", trees: "trees", file: "file", contains: "contains", statuses: "statuses", status: "status", comment: "comment", view: "view", note: "note", mergePull: "merge-pull", tag: "tag", }; export const events = { pullUpdated: "pull-updated", pullMerged: "pull-merged", pullClosed: "pull-closed", forgePull: "forge-pull", forgeStatus: "forge-status", forgeDelete: "forge-delete", repoWritable: "repo-writable", branchMoved: "branch-moved", mergeCalled: "merge-called", }; export const family = { name: "git.events", maxAgeDays: 7 }; export const pullUpdatedSubject = "mesh.seat.git.event.pull-updated"; export const pullMergedSubject = "mesh.seat.git.event.pull-merged"; export const pullClosedSubject = "mesh.seat.git.event.pull-closed"; export const forgePullSubject = "mesh.seat.git.event.forge-pull"; export const forgeStatusSubject = "mesh.seat.git.event.forge-status"; export const forgeDeleteSubject = "mesh.seat.git.event.forge-delete"; export const repoWritableSubject = "mesh.seat.git.event.repo-writable"; export const branchMovedStream = "SEAT_git_branch-moved"; export const branchMovedSubject = "mesh.seat.git.event.branch-moved"; export const mergeCalledStream = "SEAT_git_merge-called"; export function mergeCalledSubject(call) { return "mesh.seat.git.event.merge-called." + call; } export const mergeCalledSubjectAll = "mesh.seat.git.event.merge-called.*"; export const states = { failedSteps: "failed-steps", calls: "calls", }; /** The key of one value of the state failed-steps under the form "..". */ export function failedStepsByModuleFingerprintStepKey(module, fingerprint, step) { return module + "." + fingerprint + "." + step; } /** The parts of a key of the form "..", or undefined for a key of another form. */ export function parseFailedStepsByModuleFingerprintStepKey(_key) { let _rest = _key; const _at0 = _rest.indexOf("."); if (_at0 <= 0) return undefined; const module = _rest.slice(0, _at0); _rest = _rest.slice(_at0 + 1); const _at2 = _rest.indexOf("."); if (_at2 <= 0) return undefined; const fingerprint = _rest.slice(0, _at2); _rest = _rest.slice(_at2 + 1); if (_rest === "") return undefined; const step = _rest; _rest = ""; if (_rest !== "") return undefined; return { module, fingerprint, step }; } /** The key of one value of the state calls under the form "call.". */ export function callsByCallCallKey(call) { return "call." + call; } /** The parts of a key of the form "call.", or undefined for a key of another form. */ export function parseCallsByCallCallKey(_key) { let _rest = _key; if (!_rest.startsWith("call.")) return undefined; _rest = _rest.slice(5); if (_rest === "") return undefined; const call = _rest; _rest = ""; if (_rest !== "") return undefined; return { call }; }