dispatch
此内容尚不支持你的语言。
const dispatch: (...args: [service: { apply: (request: { expected: string; overrideRevocations?: boolean; target: string; }) => Effect<Applied, ReleaseError>; approvals: Effect<readonly { assignment: { artifact: { digest: string; package: string; }; contractEntry?: string; entry: string; grants: readonly ( | { _tag: "Http"; credential?: ... | ...; id: string; origin: string; } | { _tag: "Files"; directory: string; id: string; })[]; tier: "own" | "trusted" | "untrusted"; }; policyVersion: string; projections: readonly { operation: string; projection: string; service: string; value: Json; view: string; }[]; }[]>; approve: (request: { expected: { assignment: { artifact: { digest: string; package: string; }; contractEntry?: string; entry: string; grants: readonly ( | { _tag: "Http"; credential?: ... | ...; id: string; origin: string; } | { _tag: "Files"; directory: string; id: string; })[]; tier: "own" | "trusted" | "untrusted"; }; policyVersion: string; projections: readonly { operation: string; projection: string; service: string; value: Json; view: string; }[]; }; overrideRevocations?: boolean; who: string; }) => Effect<{ at: number; overrideRevocations: boolean; statement: { assignment: { artifact: { digest: string; package: string; }; contractEntry?: string; entry: string; grants: readonly ( | { _tag: ...; credential?: ...; id: ...; origin: ...; } | { _tag: ...; directory: ...; id: ...; })[]; tier: "own" | "trusted" | "untrusted"; }; policyVersion: string; projections: readonly { operation: string; projection: string; service: string; value: Json; view: string; }[]; }; who: string; }, ReleaseError>; build: (request: { file: string; metadataOnly?: boolean; references: readonly string[]; revocations: readonly string[]; }) => Effect<string, ReleaseError>; history: Effect<readonly { approval?: { at: number; overrideRevocations: boolean; statement: { assignment: { artifact: { digest: ...; package: ...; }; contractEntry?: ... | ...; entry: string; grants: readonly ...[]; tier: ... | ... | ...; }; policyVersion: string; projections: readonly { operation: ...; projection: ...; service: ...; value: ...; view: ...; }[]; }; who: string; }; at?: number; current: string; entries?: readonly string[]; entry?: string; kind: | "Bootstrap" | "Startup" | "Approval" | "Projection" | "Revocation" | "Intent" | "Outcome" | "Compensation" | "Commit" | "Rejected"; outcome?: { _tag: "Accepted" | "Aborted" | "Recovered" | "RecoveryFailed" | "Stuck"; evidence: readonly { attempt: number; hasCause: boolean; phase: string; termination?: ... | ...; }[]; phase: string; reason?: string; }; overrideRevocations?: boolean; projection?: { after: { projection: string; values: readonly { operation: ...; service: ...; value: ...; }[]; view: string; }; before: { projection: string; values: readonly { operation: ...; service: ...; value: ...; }[]; view: string; }; }; revocations?: readonly string[]; target: string; who?: string; }[]>; observe: Effect<{ current: string; previous: string | null; revocations: readonly string[]; state: "Ready" | "Applying" | "Degraded"; }>; plan: (target: string) => Effect<{ changes: readonly { entry: string; reasons: readonly ("config" | "code" | "added" | "removed")[]; }[]; current: string; diagnostics: readonly { cause?: Cause<unknown>; code: string; entry: string; message: string; reference?: string; }[]; target: string; }, ReleaseError>; revoke: (references: readonly string[], who: string) => Effect<void, ReleaseError>; rollback: (expected: string, overrideRevocations?: boolean) => Effect<Applied, ReleaseError>;}, request: | { _tag: "approvals";} | { _tag: "approve"; request: { expected: { assignment: { artifact: { digest: string; package: string; }; contractEntry?: string; entry: string; grants: readonly ( | { _tag: "Http"; credential?: ... | ...; id: string; origin: string; } | { _tag: "Files"; directory: string; id: string; })[]; tier: "own" | "trusted" | "untrusted"; }; policyVersion: string; projections: readonly { operation: string; projection: string; service: string; value: Json; view: string; }[]; }; overrideRevocations?: boolean; who: string; };} | { _tag: "revoke"; references: readonly string[]; who: string;} | { _tag: "build"; request: { file: string; metadataOnly?: boolean; references: readonly string[]; revocations: readonly string[]; };} | { _tag: "plan"; target: string;} | { _tag: "apply"; request: { expected: string; overrideRevocations?: boolean; target: string; };} | { _tag: "rollback"; expected: string; overrideRevocations: boolean;} | { _tag: "history";} | { _tag: "status";}]) => Effect<{ ok: boolean; value: Json;}, ReleaseError, never>;Defined in: Control.ts:90
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args |
[service: { apply: (request: { expected: string; overrideRevocations?: boolean; target: string; }) => Effect<Applied, ReleaseError>; approvals: Effect<readonly { assignment: { artifact: { digest: string; package: string; }; contractEntry?: string; entry: string; grants: readonly ( | { _tag: "Http"; credential?: … | …; id: string; origin: string; } | { _tag: "Files"; directory: string; id: string; })[]; tier: "own" | "trusted" | "untrusted"; }; policyVersion: string; projections: readonly { operation: string; projection: string; service: string; value: Json; view: string; }[]; }[]>; approve: (request: { expected: { assignment: { artifact: { digest: string; package: string; }; contractEntry?: string; entry: string; grants: readonly ( | { _tag: "Http"; credential?: … | …; id: string; origin: string; } | { _tag: "Files"; directory: string; id: string; })[]; tier: "own" | "trusted" | "untrusted"; }; policyVersion: string; projections: readonly { operation: string; projection: string; service: string; value: Json; view: string; }[]; }; overrideRevocations?: boolean; who: string; }) => Effect<{ at: number; overrideRevocations: boolean; statement: { assignment: { artifact: { digest: string; package: string; }; contractEntry?: string; entry: string; grants: readonly ( | { _tag: …; credential?: …; id: …; origin: …; } | { _tag: …; directory: …; id: …; })[]; tier: "own" | "trusted" | "untrusted"; }; policyVersion: string; projections: readonly { operation: string; projection: string; service: string; value: Json; view: string; }[]; }; who: string; }, ReleaseError>; build: (request: { file: string; metadataOnly?: boolean; references: readonly string[]; revocations: readonly string[]; }) => Effect<string, ReleaseError>; history: Effect<readonly { approval?: { at: number; overrideRevocations: boolean; statement: { assignment: { artifact: { digest: …; package: …; }; contractEntry?: … | …; entry: string; grants: readonly …[]; tier: … | … | …; }; policyVersion: string; projections: readonly { operation: …; projection: …; service: …; value: …; view: …; }[]; }; who: string; }; at?: number; current: string; entries?: readonly string[]; entry?: string; kind: | "Bootstrap" | "Startup" | "Approval" | "Projection" | "Revocation" | "Intent" | "Outcome" | "Compensation" | "Commit" | "Rejected"; outcome?: { _tag: "Accepted" | "Aborted" | "Recovered" | "RecoveryFailed" | "Stuck"; evidence: readonly { attempt: number; hasCause: boolean; phase: string; termination?: … | …; }[]; phase: string; reason?: string; }; overrideRevocations?: boolean; projection?: { after: { projection: string; values: readonly { operation: …; service: …; value: …; }[]; view: string; }; before: { projection: string; values: readonly { operation: …; service: …; value: …; }[]; view: string; }; }; revocations?: readonly string[]; target: string; who?: string; }[]>; observe: Effect<{ current: string; previous: string | null; revocations: readonly string[]; state: "Ready" | "Applying" | "Degraded"; }>; plan: (target: string) => Effect<{ changes: readonly { entry: string; reasons: readonly ("config" | "code" | "added" | "removed")[]; }[]; current: string; diagnostics: readonly { cause?: Cause<unknown>; code: string; entry: string; message: string; reference?: string; }[]; target: string; }, ReleaseError>; revoke: (references: readonly string[], who: string) => Effect<void, ReleaseError>; rollback: (expected: string, overrideRevocations?: boolean) => Effect<Applied, ReleaseError>; }, request: | { _tag: "approvals"; } | { _tag: "approve"; request: { expected: { assignment: { artifact: { digest: string; package: string; }; contractEntry?: string; entry: string; grants: readonly ( | { _tag: "Http"; credential?: … | …; id: string; origin: string; } | { _tag: "Files"; directory: string; id: string; })[]; tier: "own" | "trusted" | "untrusted"; }; policyVersion: string; projections: readonly { operation: string; projection: string; service: string; value: Json; view: string; }[]; }; overrideRevocations?: boolean; who: string; }; } | { _tag: "revoke"; references: readonly string[]; who: string; } | { _tag: "build"; request: { file: string; metadataOnly?: boolean; references: readonly string[]; revocations: readonly string[]; }; } | { _tag: "plan"; target: string; } | { _tag: "apply"; request: { expected: string; overrideRevocations?: boolean; target: string; }; } | { _tag: "rollback"; expected: string; overrideRevocations: boolean; } | { _tag: "history"; } | { _tag: "status"; }] |
Returns
Section titled “Returns”Effect<{ ok: boolean; value: Json; },
ReleaseError,
never>