Why an assignment needs a record of its own rather than a column on the thing being worked on, which states are lifecycle and which are the clock, why offering work must not hand over the object, how a deadline survives the two days a year its own wall clock does not, and what happens to work whose subject moved underneath it.
Generated from libs/oshun/workbench-kit/src/assignments.ts by
node scripts/v1-workbenches/generate-workbench-kit-api-reference.mjs. Ledger:
S8.5. Do not edit by hand.
Summary#
src/assignments.ts
| Entry point | Runtime class | Authorized by |
|---|---|---|
@oshun/workbench-kit/assignments |
contract |
S8.5 |
Exports#
| Symbol | Kind | Summary |
|---|---|---|
| ACL_BEARING_STATES | enumeration | States that put the holder into the object's access control list. |
| ACTORLESS_CAUSES | enumeration | The causes that are the clock's or the object's, and therefore have no actor. |
| AMBIGUITY_POLICIES | enumeration | Which side to take when a wall clock denotes two instants or none. |
| AmbiguityPolicy | type | — |
| ASSIGNMENT_FAULTS | constant | — |
| ASSIGNMENT_ORIGINS | enumeration | How the holder came to be holding it. |
| ASSIGNMENT_PRIORITIES | enumeration | Strongest first. The index IS the comparison, as in notification-center.ts. |
| ASSIGNMENT_ROLES | enumeration | The role the holder holds the work in. |
| ASSIGNMENT_SCHEMA_FAULTS | enumeration | — |
| ASSIGNMENT_STANDINGS | enumeration | Where an assignment stands against the thing it is about. |
| ASSIGNMENT_STATES | enumeration | The lifecycle states, which are EIGHT of the item's ten. |
| AssignmentFault | type | — |
| AssignmentFinding | interface | — |
| AssignmentOrigin | type | — |
| AssignmentPriority | type | — |
| AssignmentRecord | interface | — |
| AssignmentRole | type | — |
| AssignmentSchemaFault | type | — |
| assignmentSchemaFaults | function | — |
| assignmentStanding | function | Decide where an assignment stands. |
| AssignmentStanding | type | — |
| AssignmentState | type | — |
| AssignmentSubject | interface | What the assignment is ABOUT, which is a target at a revision. |
| CALENDAR_BANDS | enumeration | The bands a queue is grouped into, which is where S8.5.f's LOCALE lives. |
| calendarBand | function | Which band a deadline falls into for a particular reader. |
| CalendarBand | type | — |
| CAUSES_REQUIRING_A_REASON | enumeration | Causes that cannot be recorded without a reason code. |
| CLOCK_FAULTS | enumeration | — |
| ClockFault | type | — |
| ClockSegment | interface | A stretch of the assignment's life, and whether it counts against the SLA. |
| commitDue | function | Build a commitment from a wall clock, resolving it once and pinning it. |
| COUNT_BASES | enumeration | Where the number on the screen came from. |
| CountBasis | type | — |
| countWorkload | function | — |
| derivedAcl | function | Who may touch the object, derived. |
| derivedWorkColumns | function | Whose plate it is on, per role, derived. |
| DUE_POLICIES_ON_REASSIGN | enumeration | What happens to the deadline when work changes hands. |
| DUE_STANDINGS | enumeration | Where the deadline stands against a moment. |
| DueCommitment | interface | A deadline, as the three facts it takes to be one. |
| dueCommitmentFaults | function | Check a commitment against the zone it was made in. |
| DuePolicyOnReassign | type | — |
| dueStanding | function | — |
| DueStanding | type | — |
| duplicateWorkFaults | function | Two people doing one job. |
| elapsedCountedMinutes | function | Counted minutes elapsed, which is the only number an SLA is measured in. |
| EntityAssignmentColumns | interface | What the entity row says about assignment, which is the whole of what the storage model can hold. |
| ESCALATION_CAUSES | enumeration | Why work was escalated. The item's five, and they are not interchangeable. |
| ESCALATION_FAULTS | enumeration | — |
| EscalationCause | type | — |
| EscalationContext | interface | — |
| EscalationFault | type | — |
| escalationFaults | function | — |
| escalationKey | function | The deduplication key. |
| EscalationRecord | interface | — |
| EscalationTarget | interface | What an escalation is aimed at. |
| escalationTargetDependency | function | — |
| everAssigned | function | Everybody who has ever held an assignment on this object. |
| extendByCalendarDays | function | Move a deadline by whole calendar days, keeping the wall clock. |
| extensionFaults | function | Whether an extension was computed on the calendar or on a stopwatch. |
| ExtensionRecord | interface | A deadline moved, which is a renegotiation and not a measurement. |
| formatWallClock | function | — |
| HANDOVER_NOTICE_KEYS | constant | — |
| HandoverGrant | interface | What the outgoing holder keeps, and for how long. |
| handoverNoticeFaults | function | — |
| handoverNotices | function | Build the two notices. |
| HandoverNotices | interface | What each side is told, and they are not the same sentence. |
| HostStateModel | interface | What a host says its own state column holds. |
| hostStateModelFaults | function | — |
| instantOfWallClock | function | Resolve a wall clock in a zone to the instant or instants it denotes. |
| isCrossAssigneeQuery | function | True where the query reads somebody else's plate. |
| isKnownZone | function | Whether the platform knows this zone at all. |
| isTerminal | function | — |
| JUDGING_ROLES | enumeration | Roles whose holder makes a JUDGEMENT, and which S8.1 therefore governs. |
| KINDS_THAT_MAY_NOT_HOLD_WORK | enumeration | Actor kinds that may not hold an obligation, WHICH IS NOT S8.1'S LIST. |
| ledgerHeadline | function | One sentence about a queue. |
| LedgerSummary | interface | — |
| liveAssignments | function | The live assignments in a ledger, in ledger order. |
| NOTICE_FAULTS | enumeration | — |
| NoticeFault | type | — |
| obligationAuthorityOf | function | The authority behind an act, which for a delegated actor is the person whose authority was used. |
| OFFER_DISCLOSURE_FIELDS | enumeration | What somebody may see about work they have been offered and not accepted. |
| OFFER_FAULTS | enumeration | — |
| OfferDisclosure | interface | — |
| offerDisclosureFaults | function | — |
| OfferDisclosureField | type | — |
| OfferFault | type | — |
| pauseFaults | function | Check the measuring clock, and that it did not touch the promise. |
| PauseObservation | interface | What a host says happened when it paused something. |
| priorityAtLeast | function | True when priority is at least as urgent as threshold. |
| priorityRank | function | — |
| PROJECTION_FAULTS | enumeration | — |
| ProjectionFault | type | — |
| projectionFaults | function | Check the entity's columns against the ledger, in both directions. |
| reachableFrom | function | The states reachable from state. |
| Reassignment | interface | — |
| REASSIGNMENT_FAULTS | enumeration | — |
| ReassignmentFault | type | — |
| reassignmentFaults | function | — |
| RECONCILIATION_FAULTS | enumeration | — |
| ReconciliationContext | interface | — |
| ReconciliationFault | type | — |
| reconciliationFaults | function | — |
| ReconciliationObservation | interface | — |
| reminderFaults | function | Check a reminder schedule against the deadline it is for. |
| ReminderRule | type | How a reminder is expressed, and the two are different rules. |
| ROLE_COLUMNS | constant | Roles that occupy a work column on the entity, and which column. |
| ScheduledReminder | interface | — |
| scheduleReminders | function | Resolve a reminder schedule against a commitment. |
| SLA_STANDINGS | enumeration | — |
| SlaClass | interface | — |
| slaStanding | function | — |
| SlaStanding | type | — |
| STATE_MODEL_FAULTS | enumeration | — |
| StateEvent | interface | One state change, with who made it and why. |
| StateModelFault | type | — |
| summarizeLedger | function | — |
| TERMINAL_STATES | enumeration | States after which nothing further may be recorded against this record. |
| TRANSITION_AUTHORITIES | enumeration | Who may make a transition. |
| TRANSITION_CAUSES | enumeration | Why a transition happened. |
| TRANSITION_FAULTS | enumeration | — |
| TransitionAttempt | interface | One proposed transition, with everything the authorization needs. |
| TransitionAuthority | type | — |
| TransitionCause | type | — |
| TransitionFault | type | — |
| transitionFaults | function | Check one transition. |
| transitionRule | function | Whether an edge exists at all. |
| TransitionRule | interface | — |
| TRANSITIONS | constant | The edges, as data. |
| WallClock | interface | A wall clock: what a person means by "five o'clock". |
| WeekShape | interface | Which day a locale's week starts on, and which days it does not work. |
| weekShapeFor | function | The week shape for a locale, or null where the platform does not know it. |
| WORKLOAD_FAULTS | enumeration | — |
| WorkloadCount | interface | A workload count, computed the only way decision 7 permits. |
| WorkloadFault | type | — |
| workloadFaults | function | — |
| WorkloadQuery | interface | A workload query, and the field that decides whether it is an inbox. |
| WorkloadRow | interface | One row a workload view is counting, with what the reader may do with it. |
| WorkloadView | interface | — |
| ZONE_RESOLUTIONS | enumeration | What a wall clock denotes in a zone, which twice a year is not one instant. |
| ZonedInstant | interface | — |
| zonedWallClock | function | The wall clock an instant shows on, in a named zone. |
| zoneOffsetMinutesAt | function | A zone's offset from UTC at a given moment, in whole minutes. |
| ZoneResolution | type | — |
Shapes#
ACL_BEARING_STATES#
States that put the holder into the object's access control list.
Values: accepted, active, blocked
ACTORLESS_CAUSES#
The causes that are the clock's or the object's, and therefore have no actor.
Values: offer-lapsed, target-withdrawn
AMBIGUITY_POLICIES#
Which side to take when a wall clock denotes two instants or none.
Values: earlier, later
AmbiguityPolicy#
(typeof AMBIGUITY_POLICIES)[number];
ASSIGNMENT_FAULTS#
ASSIGNMENT_ORIGINS#
How the holder came to be holding it.
Values: offered, directed, claimed, escalated, reassigned
ASSIGNMENT_PRIORITIES#
Strongest first. The index IS the comparison, as in notification-center.ts.
Values: critical, high, normal, low
ASSIGNMENT_ROLES#
The role the holder holds the work in.
Values: worker, reviewer, approver, publisher, observer
ASSIGNMENT_SCHEMA_FAULTS#
Values: assignment-with-no-identity, assignment-that-names-no-revision,
assignment-to-an-actor-kind-that-cannot-hold-an-obligation,
assignment-with-no-assigner-that-was-not-claimed,
claimed-assignment-carrying-an-assigner,
state-that-the-history-does-not-end-in, history-out-of-order,
history-that-does-not-start-at-creation, blocked-with-no-blocker,
blocker-recorded-on-an-unblocked-assignment,
assignee-who-is-not-in-the-pool-they-were-drawn-from,
assignment-carrying-a-successor-link-it-is-not-terminal-for,
overdue-escalation-on-an-assignment-nobody-ever-accepted,
state-entered-at-that-disagrees-with-the-history
ASSIGNMENT_STANDINGS#
Where an assignment stands against the thing it is about.
Values: current, stale, void, orphaned
ASSIGNMENT_STATES#
The lifecycle states, which are EIGHT of the item's ten.
Values: offered, accepted, active, blocked, completed, declined,
cancelled, reassigned
AssignmentFault#
(typeof ASSIGNMENT_FAULTS)[number];
AssignmentFinding#
| Field | Type | Required | Notes |
|---|---|---|---|
kind |
AssignmentFault | required | — |
subject |
string |
required | The assignment, entity, query or escalation the finding is about. |
detail |
string |
required | — |
AssignmentOrigin#
(typeof ASSIGNMENT_ORIGINS)[number];
AssignmentPriority#
(typeof ASSIGNMENT_PRIORITIES)[number];
AssignmentRecord#
| Field | Type | Required | Notes |
|---|---|---|---|
assignmentId |
string |
required | — |
tenant |
TenantId | required | — |
workspace |
string | null |
required | — |
subject |
AssignmentSubject | required | — |
role |
AssignmentRole | required | — |
origin |
AssignmentOrigin | required | — |
assignee |
ActorRef | required | The person the obligation is on. |
eligiblePool |
readonly ActorId[] — ActorId |
required | The pool the assignee was drawn from, where one was. |
assigner |
ActorRef | null — ActorRef |
required | Who put it there. Null only where the origin is claimed. |
priority |
AssignmentPriority | required | — |
state |
AssignmentState | required | — |
history |
readonly StateEvent[] — StateEvent |
required | Oldest first, and the last entry's to must be . |
createdAt |
Instant | required | — |
stateEnteredAt |
Instant | required | When the current state was entered. |
due |
DueCommitment | null — DueCommitment |
required | — |
slaClassId |
string | null |
required | — |
supersedes |
string | null |
required | The assignment this one replaced, where it replaced one. |
escalations |
readonly EscalationRecord[] — EscalationRecord |
required | The escalations raised against it. Empty is the ordinary case. |
blockedOn |
string | null |
required | What the holder is waiting on, required by the blocked state. |
AssignmentRole#
(typeof ASSIGNMENT_ROLES)[number];
AssignmentSchemaFault#
(typeof ASSIGNMENT_SCHEMA_FAULTS)[number];
assignmentSchemaFaults#
assignmentSchemaFaults(record: AssignmentRecord): readonly AssignmentFinding[]
assignmentStanding#
Decide where an assignment stands.
assignmentStanding(context: ReconciliationContext): AssignmentStanding
AssignmentStanding#
(typeof ASSIGNMENT_STANDINGS)[number];
AssignmentState#
(typeof ASSIGNMENT_STATES)[number];
AssignmentSubject#
What the assignment is ABOUT, which is a target at a revision.
| Field | Type | Required | Notes |
|---|---|---|---|
targetId |
string |
required | — |
revision |
RevisionId | required | — |
askId |
string | null |
required | The specific ask, where the target carries several. |
CALENDAR_BANDS#
The bands a queue is grouped into, which is where S8.5.f's LOCALE lives.
Values: overdue, today, this-week, later
calendarBand#
Which band a deadline falls into for a particular reader.
calendarBand(due: DueCommitment, now: Instant, readerZone: string, week: WeekShape): CalendarBand
CalendarBand#
(typeof CALENDAR_BANDS)[number];
CAUSES_REQUIRING_A_REASON#
Causes that cannot be recorded without a reason code.
Values: target-withdrawn, escalation-reassigned-it
CLOCK_FAULTS#
Values: due-instant-that-no-longer-matches-its-wall-clock,
due-commitment-in-a-zone-the-platform-does-not-know,
deadline-set-for-a-wall-clock-that-does-not-exist,
deadline-set-for-a-wall-clock-that-happens-twice,
extension-computed-as-fixed-hours-across-a-transition,
reminder-that-fires-after-the-deadline, reminder-scheduled-into-a-gap,
open-clock-segment-that-is-not-the-last, overlapping-clock-segments,
pause-with-no-reason, pause-that-moved-the-promise,
deadline-moved-with-no-extension-record, extension-with-no-authority
ClockFault#
(typeof CLOCK_FAULTS)[number];
ClockSegment#
A stretch of the assignment's life, and whether it counts against the SLA.
| Field | Type | Required | Notes |
|---|---|---|---|
from |
Instant | required | — |
to |
Instant | null — Instant |
required | Null for the segment that is still running, which must be the last. |
counted |
boolean |
required | — |
reasonCode |
string | null |
required | Required on an uncounted segment. Why the clock stopped. |
commitDue#
Build a commitment from a wall clock, resolving it once and pinning it.
commitDue(wall: WallClock, zone: string, policy: AmbiguityPolicy): DueCommitment
COUNT_BASES#
Where the number on the screen came from.
Values: after-the-reader-filter, before-the-reader-filter
CountBasis#
(typeof COUNT_BASES)[number];
countWorkload#
countWorkload(rows: readonly WorkloadRow[]): WorkloadCount
derivedAcl#
Who may touch the object, derived.
derivedAcl(ledger: readonly AssignmentRecord[]): readonly ActorId[]
derivedWorkColumns#
Whose plate it is on, per role, derived.
derivedWorkColumns(ledger: readonly AssignmentRecord[]): Readonly<Record<string, ActorId | null>>
DUE_POLICIES_ON_REASSIGN#
What happens to the deadline when work changes hands.
Values: inherit, reset, renegotiate
DUE_STANDINGS#
Where the deadline stands against a moment.
Values: no-deadline, not-due, due-soon, overdue
DueCommitment#
A deadline, as the three facts it takes to be one.
| Field | Type | Required | Notes |
|---|---|---|---|
wall |
WallClock | required | — |
zone |
string |
required | An IANA zone name. The zone the promise was made in, not the reader's. |
instant |
Instant | required | — |
resolution |
ZoneResolution | required | — |
ambiguityPolicy |
AmbiguityPolicy | required | — |
dueCommitmentFaults#
Check a commitment against the zone it was made in.
dueCommitmentFaults(due: DueCommitment): readonly AssignmentFinding[]
DuePolicyOnReassign#
(typeof DUE_POLICIES_ON_REASSIGN)[number];
dueStanding#
dueStanding(due: DueCommitment | null, now: Instant, soonWithinMinutes: number): DueStanding
DueStanding#
(typeof DUE_STANDINGS)[number];
duplicateWorkFaults#
Two people doing one job.
duplicateWorkFaults(ledger: readonly AssignmentRecord[]): readonly AssignmentFinding[]
elapsedCountedMinutes#
Counted minutes elapsed, which is the only number an SLA is measured in.
elapsedCountedMinutes(segments: readonly ClockSegment[], now: Instant): number
EntityAssignmentColumns#
What the entity row says about assignment, which is the whole of what the storage model can hold.
| Field | Type | Required | Notes |
|---|---|---|---|
entityId |
string |
required | — |
assigneeId |
ActorId | null — ActorId |
required | — |
reviewerId |
ActorId | null — ActorId |
required | — |
openState |
'open' | 'closed' |
required | The two-valued flag wbe_assignee_open is partial on. |
assignees |
readonly ActorId[] — ActorId |
required | authorization.ts's plural list: who may touch it. |
ESCALATION_CAUSES#
Why work was escalated. The item's five, and they are not interchangeable.
Values: overdue, declined, blocked, unavailable, policy-triggered
ESCALATION_FAULTS#
Values: escalation-that-granted-access-a-clock-decided,
escalation-to-a-target-with-no-eligibility-answer,
escalation-to-a-derived-target-that-was-not-pinned,
escalation-pinned-to-nobody, duplicate-escalation-under-one-key,
escalation-of-a-terminal-assignment, escalation-that-moved-the-deadline,
escalation-back-to-the-person-who-is-stuck,
overdue-escalation-with-no-deadline,
unavailability-escalation-to-an-unavailable-target,
blocked-escalation-that-does-not-name-the-blocker
EscalationCause#
(typeof ESCALATION_CAUSES)[number];
EscalationContext#
| Field | Type | Required | Notes |
|---|---|---|---|
record |
AssignmentRecord | required | — |
escalation |
EscalationRecord | required | — |
alreadyRaised |
readonly string[] |
required | Keys already raised, so a repeat is visible. |
targetStandings |
Readonly<Record<string, IdentityStanding>> — IdentityStanding |
required | The standing of each pinned person, where the host knows it. |
now |
Instant | required | — |
EscalationFault#
(typeof ESCALATION_FAULTS)[number];
escalationFaults#
escalationFaults(context: EscalationContext): readonly AssignmentFinding[]
escalationKey#
The deduplication key.
escalationKey(record: EscalationRecord): string
EscalationRecord#
| Field | Type | Required | Notes |
|---|---|---|---|
escalationId |
string |
required | — |
assignmentId |
string |
required | — |
cause |
EscalationCause | required | — |
at |
Instant | required | — |
target |
EscalationTarget | required | — |
generation |
number |
required | The generation of the situation this escalation is about. |
targetEligibility |
string | null |
required | S8.1's eligibility answer for the target on this seat, or null. |
dueAtEscalation |
Instant | null — Instant |
required | The due commitment at the moment of escalation. Escalating does not move it. |
EscalationTarget#
What an escalation is aimed at.
| Field | Type | Required | Notes |
|---|---|---|---|
kind |
MentionSubjectKind | required | — |
subjectId |
string |
required | — |
pinned |
readonly PinnedRecipient[] — PinnedRecipient |
required | The people the target resolved to, pinned at the instant it resolved. |
escalationTargetDependency#
escalationTargetDependency(target: EscalationTarget): ResolutionDependency
everAssigned#
Everybody who has ever held an assignment on this object.
everAssigned(ledger: readonly AssignmentRecord[]): readonly ActorId[]
extendByCalendarDays#
Move a deadline by whole calendar days, keeping the wall clock.
extendByCalendarDays(due: DueCommitment, days: number): DueCommitment
extensionFaults#
Whether an extension was computed on the calendar or on a stopwatch.
extensionFaults(before: DueCommitment, after: DueCommitment, intendedCalendarDays: number): readonly AssignmentFinding[]
ExtensionRecord#
A deadline moved, which is a renegotiation and not a measurement.
| Field | Type | Required | Notes |
|---|---|---|---|
at |
Instant | required | — |
by |
ActorRef | required | — |
reasonCode |
string |
required | — |
from |
Instant | required | — |
to |
Instant | required | — |
formatWallClock#
formatWallClock(wall: WallClock): string
HANDOVER_NOTICE_KEYS#
HandoverGrant#
What the outgoing holder keeps, and for how long.
| Field | Type | Required | Notes |
|---|---|---|---|
actor |
ActorId | required | — |
until |
Instant | required | — |
reasonCode |
string |
required | — |
handoverNoticeFaults#
handoverNoticeFaults(notices: HandoverNotices): readonly AssignmentFinding[]
handoverNotices#
Build the two notices.
handoverNotices(): HandoverNotices
HandoverNotices#
What each side is told, and they are not the same sentence.
| Field | Type | Required | Notes |
|---|---|---|---|
toOutgoing |
{ readonly key: string; readonly carriesTheReason: boolean; } |
required | — |
toIncoming |
{ readonly key: string; readonly carriesTheReason: boolean; readonly carriesThePredecessorName: boolean; } |
required | — |
HostStateModel#
What a host says its own state column holds.
| Field | Type | Required | Notes |
|---|---|---|---|
declaredStates |
readonly string[] |
required | — |
overdueIsDerived |
boolean |
required | True where the host derives overdue rather than storing it. |
escalationIsItsOwnRecord |
boolean |
required | True where the host keeps escalations as their own records. |
hostStateModelFaults#
hostStateModelFaults(model: HostStateModel): readonly AssignmentFinding[]
instantOfWallClock#
Resolve a wall clock in a zone to the instant or instants it denotes.
instantOfWallClock(wall: WallClock, zone: string, policy: AmbiguityPolicy): ZonedInstant
isCrossAssigneeQuery#
True where the query reads somebody else's plate.
isCrossAssigneeQuery(query: WorkloadQuery): boolean
isKnownZone#
Whether the platform knows this zone at all.
isKnownZone(zone: string): boolean
isTerminal#
isTerminal(state: AssignmentState): boolean
JUDGING_ROLES#
Roles whose holder makes a JUDGEMENT, and which S8.1 therefore governs.
Values: reviewer, approver, publisher
KINDS_THAT_MAY_NOT_HOLD_WORK#
Actor kinds that may not hold an obligation, WHICH IS NOT S8.1'S LIST.
Values: redacted, delegated
ledgerHeadline#
One sentence about a queue.
ledgerHeadline(summary: LedgerSummary): string
LedgerSummary#
| Field | Type | Required | Notes |
|---|---|---|---|
total |
number |
required | — |
live |
number |
required | — |
terminal |
number |
required | — |
byState |
Readonly<Record<AssignmentState, number>> — AssignmentState |
required | — |
overdue |
number |
required | — |
escalated |
number |
required | — |
peopleHoldingWork |
number |
required | Distinct authorities holding live work. |
liveAssignments#
The live assignments in a ledger, in ledger order.
liveAssignments(ledger: readonly AssignmentRecord[]): readonly AssignmentRecord[]
NOTICE_FAULTS#
Values: handover-that-tells-the-successor-why-the-last-person-lost-it,
handover-that-does-not-tell-the-outgoing-holder-at-all
NoticeFault#
(typeof NOTICE_FAULTS)[number];
obligationAuthorityOf#
The authority behind an act, which for a delegated actor is the person whose authority was used.
obligationAuthorityOf(actor: ActorRef): string
OFFER_DISCLOSURE_FIELDS#
What somebody may see about work they have been offered and not accepted.
Values: target-kind, role, priority, due-standing, estimated-effort,
assigner
OFFER_FAULTS#
Values: offer-that-grants-the-object-before-acceptance,
offer-carrying-a-field-that-is-not-in-the-disclosure-set,
offer-with-nothing-to-decide-on
OfferDisclosure#
| Field | Type | Required | Notes |
|---|---|---|---|
assignmentId |
string |
required | — |
fields |
readonly string[] |
required | — |
grantsObjectRead |
boolean |
required | Whether the offeree can open the object itself before accepting. |
targetIsProtected |
boolean |
required | Whether the object is one only assigned actors may reach. |
offerDisclosureFaults#
offerDisclosureFaults(offer: OfferDisclosure): readonly AssignmentFinding[]
OfferDisclosureField#
(typeof OFFER_DISCLOSURE_FIELDS)[number];
OfferFault#
(typeof OFFER_FAULTS)[number];
pauseFaults#
Check the measuring clock, and that it did not touch the promise.
pauseFaults(observation: PauseObservation): readonly AssignmentFinding[]
PauseObservation#
What a host says happened when it paused something.
| Field | Type | Required | Notes |
|---|---|---|---|
assignmentId |
string |
required | — |
segments |
readonly ClockSegment[] — ClockSegment |
required | — |
dueBefore |
DueCommitment | null — DueCommitment |
required | The commitment before the pause, and after it. |
dueAfter |
DueCommitment | null — DueCommitment |
required | — |
extension |
ExtensionRecord | null — ExtensionRecord |
required | The authorized extension that moved the deadline, where one did. |
priorityAtLeast#
True when priority is at least as urgent as threshold.
priorityAtLeast(priority: AssignmentPriority, threshold: AssignmentPriority): boolean
priorityRank#
priorityRank(priority: AssignmentPriority): number
PROJECTION_FAULTS#
Values: two-live-assignments-in-one-role,
work-column-that-no-live-assignment-supports,
live-assignment-missing-from-its-work-column,
observer-projected-into-a-work-column,
offered-assignment-projected-into-the-acl, acl-that-omits-a-live-holder,
acl-carrying-somebody-with-no-live-assignment,
open-flag-that-disagrees-with-the-ledger
ProjectionFault#
(typeof PROJECTION_FAULTS)[number];
projectionFaults#
Check the entity's columns against the ledger, in both directions.
projectionFaults(ledger: readonly AssignmentRecord[], columns: EntityAssignmentColumns): readonly AssignmentFinding[]
reachableFrom#
The states reachable from state.
reachableFrom(state: AssignmentState): readonly AssignmentState[]
Reassignment#
| Field | Type | Required | Notes |
|---|---|---|---|
from |
AssignmentRecord | required | — |
to |
AssignmentRecord | required | — |
at |
Instant | required | — |
by |
ActorRef | required | — |
reasonCode |
string |
required | — |
duePolicy |
DuePolicyOnReassign | required | — |
handover |
HandoverGrant | null — HandoverGrant |
required | — |
outgoingLeftInAcl |
boolean |
required | Whether the outgoing holder was left in the object's assignee list. |
REASSIGNMENT_FAULTS#
Values: reassignment-that-did-not-terminate-its-predecessor,
successor-that-does-not-name-its-predecessor,
successor-that-changed-the-work, reassignment-with-no-reason,
reassignment-to-the-same-authority,
inherited-deadline-that-was-silently-moved,
reset-deadline-that-kept-the-old-instant,
renegotiated-deadline-that-was-left-as-a-commitment,
outgoing-access-left-as-a-stale-list-entry, handover-grant-with-no-end,
reassignment-that-restarted-the-sla-without-saying-so
ReassignmentFault#
(typeof REASSIGNMENT_FAULTS)[number];
reassignmentFaults#
reassignmentFaults(move: Reassignment): readonly AssignmentFinding[]
RECONCILIATION_FAULTS#
Values: ghost-work-left-live-against-a-target-that-is-gone,
stale-assignment-presented-as-current,
orphaned-assignment-closed-instead-of-reassigned,
duplicate-live-assignments-for-one-ask,
assignment-whose-revision-is-ahead-of-the-target,
reconciliation-that-did-not-look-at-the-change,
void-assignment-whose-holder-was-never-told
ReconciliationContext#
| Field | Type | Required | Notes |
|---|---|---|---|
record |
AssignmentRecord | required | — |
targetRevision |
RevisionId | required | The revision the target is at now. |
changeTouchedTheAsk |
boolean | null |
required | Whether the change since the assignment touched what was asked about. |
askStillExists |
boolean |
required | Whether the ask still exists on the target. |
targetExists |
boolean |
required | Whether the target itself is still there. |
requiringGateOpen |
boolean | null |
required | The gate or stage that required this work, and whether it is still open. |
assigneeStanding |
IdentityStanding | required | — |
repeatOnChange |
boolean | null |
required | S8.1's repeatOnChange for the stage this assignment serves, if any. |
ReconciliationFault#
(typeof RECONCILIATION_FAULTS)[number];
reconciliationFaults#
reconciliationFaults(observation: ReconciliationObservation): readonly AssignmentFinding[]
ReconciliationObservation#
| Field | Type | Required | Notes |
|---|---|---|---|
context |
ReconciliationContext | required | — |
hostStanding |
AssignmentStanding | required | What the host did with it. |
holderWasTold |
boolean |
required | Whether the holder was told, where the standing calls for it. |
reminderFaults#
Check a reminder schedule against the deadline it is for.
reminderFaults(due: DueCommitment, reminders: readonly ScheduledReminder[]): readonly AssignmentFinding[]
ReminderRule#
How a reminder is expressed, and the two are different rules.
| { readonly kind: 'before-by-duration'; readonly minutes: number }
| { readonly kind: 'wall-clock-days-before'; readonly days: number; readonly hour: number; readonly minute: number; }
ROLE_COLUMNS#
Roles that occupy a work column on the entity, and which column.
ScheduledReminder#
| Field | Type | Required | Notes |
|---|---|---|---|
rule |
ReminderRule | required | — |
at |
Instant | required | — |
resolution |
ZoneResolution | required | — |
scheduleReminders#
Resolve a reminder schedule against a commitment.
scheduleReminders(due: DueCommitment, rules: readonly ReminderRule[]): readonly ScheduledReminder[]
SLA_STANDINGS#
Values: within, at-risk, breached
SlaClass#
| Field | Type | Required | Notes |
|---|---|---|---|
slaClassId |
string |
required | — |
budgetMinutes |
number |
required | The budget, in counted minutes. |
warnAtFraction |
number |
required | How much of the budget may be used before the SLA is at risk. |
slaStanding#
slaStanding(sla: SlaClass, segments: readonly ClockSegment[], now: Instant): SlaStanding
SlaStanding#
(typeof SLA_STANDINGS)[number];
STATE_MODEL_FAULTS#
Values: state-column-carrying-a-clock-fact,
state-column-carrying-an-escalation-flag,
state-vocabulary-missing-a-lifecycle-state,
state-model-that-is-a-boolean-flag
StateEvent#
One state change, with who made it and why.
| Field | Type | Required | Notes |
|---|---|---|---|
at |
Instant | required | — |
to |
AssignmentState | required | — |
by |
ActorRef | null — ActorRef |
required | Who made it, or null for a lapse. |
cause |
TransitionCause | required | — |
reasonCode |
string | null |
required | A reason code, never a sentence. Required where the cause demands one. |
StateModelFault#
(typeof STATE_MODEL_FAULTS)[number];
summarizeLedger#
summarizeLedger(ledger: readonly AssignmentRecord[], now: Instant, soonWithinMinutes: number): LedgerSummary
TERMINAL_STATES#
States after which nothing further may be recorded against this record.
Values: completed, declined, cancelled, reassigned
TRANSITION_AUTHORITIES#
Who may make a transition.
Values: the-assignee, the-assigner, an-escalation-authority,
nobody-it-lapsed
TRANSITION_CAUSES#
Why a transition happened.
Values: acted, offer-lapsed, target-withdrawn, escalation-reassigned-it
TRANSITION_FAULTS#
Values: transition-that-is-not-in-the-table,
transition-out-of-a-terminal-state,
transition-by-an-actor-without-the-authority,
acceptance-by-somebody-other-than-the-offeree,
completion-recorded-by-the-assigner, transition-with-no-actor-and-no-lapse,
lapse-carrying-an-invented-actor,
cause-that-requires-a-reason-and-carries-none, decline-with-no-reason,
block-declared-with-no-blocker,
judging-role-seated-without-an-eligibility-answer,
judging-role-seated-against-an-eligibility-refusal,
transition-recorded-before-the-state-it-leaves
TransitionAttempt#
One proposed transition, with everything the authorization needs.
| Field | Type | Required | Notes |
|---|---|---|---|
record |
AssignmentRecord | required | — |
to |
AssignmentState | required | — |
by |
ActorRef | null — ActorRef |
required | — |
cause |
TransitionCause | required | — |
reasonCode |
string | null |
required | — |
at |
Instant | required | — |
blockedOn |
string | null |
required | The blocker being declared, where the target state is blocked. |
heldAuthorities |
readonly TransitionAuthority[] — TransitionAuthority |
required | Authorities the actor holds beyond assignee/assigner, by name. |
eligibility |
string | null |
required | S8.1's answer for a judging role, or null where the role does not judge. |
TransitionAuthority#
(typeof TRANSITION_AUTHORITIES)[number];
TransitionCause#
(typeof TRANSITION_CAUSES)[number];
TransitionFault#
(typeof TRANSITION_FAULTS)[number];
transitionFaults#
Check one transition.
transitionFaults(attempt: TransitionAttempt): readonly AssignmentFinding[]
transitionRule#
Whether an edge exists at all.
transitionRule(from: AssignmentState, to: AssignmentState): TransitionRule | null
TransitionRule#
| Field | Type | Required | Notes |
|---|---|---|---|
from |
AssignmentState | required | — |
to |
AssignmentState | required | — |
by |
readonly TransitionAuthority[] — TransitionAuthority |
required | — |
note |
string |
required | Why this edge exists, or why the missing one next to it does not. |
TRANSITIONS#
The edges, as data.
WallClock#
A wall clock: what a person means by "five o'clock".
| Field | Type | Required | Notes |
|---|---|---|---|
year |
number |
required | — |
month |
number |
required | — |
day |
number |
required | — |
hour |
number |
required | — |
minute |
number |
required | — |
second |
number |
required | — |
WeekShape#
Which day a locale's week starts on, and which days it does not work.
| Field | Type | Required | Notes |
|---|---|---|---|
firstDay |
number |
required | — |
weekend |
readonly number[] |
required | — |
weekShapeFor#
The week shape for a locale, or null where the platform does not know it.
weekShapeFor(locale: string): WeekShape | null
WORKLOAD_FAULTS#
Values: cross-assignee-query-that-kept-the-inbox-widening,
workload-count-taken-before-the-reader-filter,
capacity-derived-from-rows-the-reader-may-not-see,
filtered-count-presented-as-a-total, workload-row-the-reader-may-not-see,
queue-ordered-by-an-instant-rendered-in-the-wrong-zone,
workload-view-counting-observers-as-work,
week-banded-queue-with-no-locale-to-start-the-week,
sla-banded-queue-over-rows-with-no-sla-class
WorkloadCount#
A workload count, computed the only way decision 7 permits.
| Field | Type | Required | Notes |
|---|---|---|---|
total |
number |
required | — |
basis |
CountBasis | required | — |
byState |
Readonly<Record<AssignmentState, number>> — AssignmentState |
required | — |
byPriority |
Readonly<Record<AssignmentPriority, number>> — AssignmentPriority |
required | — |
bySlaStanding |
Readonly<Record<SlaStanding | 'unmeasured', number>> — SlaStanding |
required | Counted by SLA standing, with the unmeasured kept apart from the healthy. |
withheld |
number |
required | — |
WorkloadFault#
(typeof WORKLOAD_FAULTS)[number];
workloadFaults#
workloadFaults(view: WorkloadView): readonly AssignmentFinding[]
WorkloadQuery#
A workload query, and the field that decides whether it is an inbox.
| Field | Type | Required | Notes |
|---|---|---|---|
queryId |
string |
required | — |
reader |
ActorRef | required | — |
subjectAssignee |
ActorId | null — ActorId |
required | — |
byRole |
AssignmentRole | null — AssignmentRole |
required | — |
byPriority |
AssignmentPriority | null — AssignmentPriority |
required | — |
byState |
AssignmentState | null — AssignmentState |
required | — |
byDueStanding |
DueStanding | null — DueStanding |
required | — |
bySlaStanding |
SlaStanding | null — SlaStanding |
required | — |
byCalendarBand |
CalendarBand | null — CalendarBand |
required | The calendar band the queue is grouped into, where it groups by one. |
byDomain |
string | null |
required | — |
boundScopes |
readonly ('tenantId' | 'workspaceId')[] |
required | The scope predicates the query actually carries. |
readerZone |
string | null |
required | The reader's own time zone, for rendering a due instant as a wall clock. |
readerLocale |
string | null |
required | The reader's locale, which is what says when their week begins. |
WorkloadRow#
One row a workload view is counting, with what the reader may do with it.
| Field | Type | Required | Notes |
|---|---|---|---|
assignmentId |
string |
required | — |
assignee |
ActorId | required | — |
role |
AssignmentRole | required | — |
priority |
AssignmentPriority | required | — |
state |
AssignmentState | required | — |
dueStanding |
DueStanding | required | — |
slaStanding |
SlaStanding | null — SlaStanding |
required | Null where the assignment carries no SLA class to measure against. |
domain |
string |
required | — |
readerDisposition |
AuthorizationDisposition |
required | What decideObjectAccess said about the underlying object for THIS reader. |
WorkloadView#
| Field | Type | Required | Notes |
|---|---|---|---|
query |
WorkloadQuery | required | — |
rows |
readonly WorkloadRow[] — WorkloadRow |
required | — |
total |
number |
required | — |
totalBasis |
CountBasis | required | — |
capacity |
{ readonly ceiling: number; readonly usedBasis: CountBasis; } | null — CountBasis |
required | A capacity figure shown beside the count, where one is. |
declaresItIsFiltered |
boolean |
required | Whether the view says out loud that it is showing a filtered count. |
ZONE_RESOLUTIONS#
What a wall clock denotes in a zone, which twice a year is not one instant.
Values: exact, skipped, repeated
ZonedInstant#
| Field | Type | Required | Notes |
|---|---|---|---|
instant |
Instant | required | — |
resolution |
ZoneResolution | required | — |
alternative |
Instant | null — Instant |
required | The other instant the same wall clock denotes, on repeated. Null otherwise. |
offsetMinutes |
number |
required | — |
zonedWallClock#
The wall clock an instant shows on, in a named zone.
zonedWallClock(instant: Instant, zone: string): WallClock
zoneOffsetMinutesAt#
A zone's offset from UTC at a given moment, in whole minutes.
zoneOffsetMinutesAt(epochMillis: number, zone: string): number
ZoneResolution#
(typeof ZONE_RESOLUTIONS)[number];
Valid examples#
No committed fixture corpus covers this page's accepted cases; they are unit-level and live in the module's own spec.
Invalid examples#
No committed fixture corpus covers this page's refused cases; they are unit-level and live in the module's own spec.
Authorization and scope#
| Symbol | Type | Notes |
| ---------------------------------- | --------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------ |
| ACTORLESS_CAUSES | enumeration | The causes that are the clock's or the object's, and therefore have no actor. |
| AssignmentRecord.tenant | TenantId | — |
| HandoverGrant.actor | ActorId | — |
| OfferDisclosure.grantsObjectRead | boolean | Whether the offeree can open the object itself before accepting. |
| WorkloadQuery.boundScopes | readonly ('tenantId' | 'workspaceId')[] | The scope predicates the query actually carries. |
Idempotency and concurrency#
| Symbol | Type | Notes |
|---|---|---|
AssignmentSubject.revision |
RevisionId |
— |
ReconciliationContext.targetRevision |
RevisionId |
The revision the target is at now. |
Pagination#
| Symbol | Type | Notes |
|---|---|---|
PROJECTION_FAULTS |
enumeration |
— |
ProjectionFault |
type |
— |
projectionFaults |
function |
Check the entity's columns against the ledger, in both directions. |
ZonedInstant.offsetMinutes |
number |
— |
zoneOffsetMinutesAt |
function |
A zone's offset from UTC at a given moment, in whole minutes. |
State and failure#
| Symbol | Type | Notes |
| ----------------------------------- | ------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------ |
| ACL_BEARING_STATES | enumeration | States that put the holder into the object's access control list. |
| ASSIGNMENT_STATES | enumeration | The lifecycle states, which are EIGHT of the item's ten. |
| AssignmentRecord.state | AssignmentState | — |
| AssignmentRecord.stateEnteredAt | Instant | When the current state was entered. |
| AssignmentState | type | — |
| EntityAssignmentColumns.openState | 'open' | 'closed' | The two-valued flag wbe_assignee_open is partial on. |
| HostStateModel.declaredStates | readonly string[] | — |
| hostStateModelFaults | function | — |
| LedgerSummary.byState | Readonly<Record<AssignmentState, number>> | — |
| STATE_MODEL_FAULTS | enumeration | — |
| StateModelFault | type | — |
| TERMINAL_STATES | enumeration | States after which nothing further may be recorded against this record. |
| WorkloadCount.byState | Readonly<Record<AssignmentState, number>> | — |
| WorkloadQuery.byState | AssignmentState | null | — |
| WorkloadRow.state | AssignmentState | — |
Compatibility#
Not applicable: nothing on this page is versioned independently of the package.
Deprecation#
Not applicable: nothing on this page can be deprecated on its own; the package version is its lifecycle.
Evidence#
evidence/v1-workbenches/workbench-kit-export-map.jsonlibs/oshun/workbench-kit/src/assignments.ts