Coming soon · Contract draft
Time Off & Availability
A privacy-aware availability graph and leave lifecycle contract with explicit approvals and project-impact reads.
Reviewable specification — not callable
Canonical owner
Time-off, holiday, availability, and approval services
Contract posture
P1 · Documentation first · implementation follows approval
Contract metadata
Draft version
0.2 review draft
Review owner
Work/Finance + Developer Platform
Last reviewed
July 14, 2026
Target wave
Wave 3 · Resource Management
Contract dependencies
- • Financial/privacy scope matrix
- • Generic Operation resource
- • Transactional audit and event contracts
What this unlocks
Integrate leave requests
Read a stable domain model for time off & availability without depending on GUI routes or database shapes.
Plan from governed availability
Create a reviewable proposal and apply only the bounded commands the canonical owner permits.
Explain project impact
React to durable lifecycle facts and connect external systems with explicit direction and provenance.
Lifecycle and invariants
Time Off & Availability exposes a bounded lifecycle with explicit commands and named authority at every transition.
draftrequestedapproveddeclinedcancelled| From | To | Command | Authority |
|---|---|---|---|
| draft | requested | Submit request | Time-off service and named approver |
| requested | approved | Approve time off | Time-off service and named approver |
| requested | declined | Decline request | Time-off service and named approver |
| approved | cancelled | Cancel time off | Time-off service and named approver |
Lifecycle invariants
- • Private reasons are field-scoped.
- • Calendar events never become leave authority.
Authority boundaries
The interfaces expose canonical capabilities; they do not become a second owner of domain rules or state.
DigitalStack owns
- • DigitalStack time-off request lifecycle
- • Holiday and availability projection
- • Project impact and acknowledgement
Explicitly not building
- • Exposing private leave reasons broadly
- • Agents approving leave
- • Calendar events as leave authority
Surface decisions
Deliberate additions, retained boundaries, and removals from the proposed external contract.
Request, update, cancel, decide, holiday, availability, and project-impact reads
The API must support both personal lifecycle and planning impact.
Explicit human approval and privacy controls
Leave decisions and reasons are sensitive and attributable.
Agent approvals and calendar-derived automatic leave
Evidence and convenience cannot transfer approval authority.
Interface plan
REST API
PlannedVersioned time off & availability resources, commands, idempotency, and operation status.
Reads + explicit commands
GraphQL
PlannedComposable TimeOffRequest reads with mutations delegated to the same canonical domain service.
Composable reads + bounded delegated mutations
MCP / Agent API
PlannedBounded read, draft, and human-request tools with evidence and audit attribution.
Read + proposal/confirmed commands only
Webhooks
PlannedPast-tense time off lifecycle facts with minimal payloads.
Past-tense durable facts only
Connected Apps
PlannedHRIS / Google / Microsoft Calendar plus consumer clients, with declared direction and authority.
Declared direction and field authority required
Cross-interface parity
Each surface delegates to the named canonical owner; a blank surface is an intentional denial of authority, not missing documentation.
| Capability | REST | GraphQL | MCP | Webhook | Canonical owner |
|---|---|---|---|---|---|
| Primary read | GET /time-off | timeOffRequest(id: ID!): TimeOffRequest | get_time_off_availability | — | Time-off, holiday, availability, and approval services |
| Primary command | POST /time-off | draftTimeOffRequestChange(input: DraftTimeOffRequestChangeInput!): TimeOffRequestChangeProposal! | draft_time_off_availability_change | time_off.created | Time-off, holiday, availability, and approval services |
Proposed scopes
Proposed scopes are not grantable yet.
time-off:readplanned scopetime-off:writeplanned scopetime-off:operateplanned scopeBehavioral contract
Cross-cutting rules every implementation and interface must satisfy.
Canonical delegation
Every interface delegates to Time-off, holiday, availability, and approval services; no resolver, gateway, worker, or connector reimplements domain rules.
Least-privilege principals
Scopes are evaluated with tenant, role, field-visibility, and principal-type constraints before data is read or changed.
Safe writes
Mutations use explicit confirmation where required, optimistic concurrency, idempotency, and durable actor attribution.
Transactional facts
Webhook facts are emitted from the canonical commit path, versioned, minimal, and safe to redeliver.
Declared provider authority
Every Connected App declares direction, field authority, provenance, and conflict behavior before activation.
REST API
Proposed endpoints
/api/v1/time-offList time off & availability
Return an authorized, paginated collection with stable filters and provenance.
time-off:read
/api/v1/time-offconfirmationCreate TimeOffRequest
Create one canonical resource with idempotency and actor attribution.
time-off:write
/api/v1/time-off/{id}Retrieve TimeOffRequest
Return canonical detail, lifecycle state, permissions, and allowed actions.
time-off:read
/api/v1/time-off/{id}confirmationUpdate TimeOffRequest
Update bounded editable fields using optimistic versioning.
time-off:write
/api/v1/time-off/{id}/approveconfirmationapprove TimeOffRequest
Run one explicit domain command after validation and authorization.
time-off:operate
approve a TimeOffRequest
curl --request POST \
+ --url https://www.digitalstack360.com/api/v1/time-off/time_off_123/approve \
+ --header "Authorization: Bearer $DSTACK_API_KEY" \
+ --header "Content-Type: application/json" \
+ --header "Idempotency-Key: time-off-availability-approve-v2" \
+ --data '{
"expected_version": 2,
"reason": "Confirmed through the reviewed integration workflow"
}'{
"data": {
"id": "time_off_123",
"status": "approved",
"version": 3,
"operation_id": "op_01k4..."
}
}GraphQL
Proposed graph
Types
TimeOffRequestTimeOffRequestConnectionTimeOffRequestChangeProposalOperationQueries
timeOffRequest(id: ID!): TimeOffRequesttimeOffRequestList(filter: TimeOffRequestFilter, pagination: PaginationInput): TimeOffRequestConnection!Mutations
draftTimeOffRequestChange(input: DraftTimeOffRequestChangeInput!): TimeOffRequestChangeProposal!query TimeOffRequestDetail($id: ID!) {
timeOffRequest(id: $id) {
id
status
version
updatedAt
allowedActions { id label requiresConfirmation }
source { kind externalId }
}
}MCP / Agent API
Proposed tools
Get Time Off & Availability
get_time_off_availabilityRead the authorized time off & availability state, provenance, and allowed actions.
- Scope
- time-off:read
- Input
- Resource id or a bounded filter.
- Output
- Canonical detail with source provenance and allowed actions.
- Write boundary
- Read only.
Draft Time Off & Availability change
draft_time_off_availability_changeBuild a reviewable proposal from explicit user intent and DigitalStack evidence.
- Scope
- time-off:write
- Input
- Target, requested outcome, expected version, and optional evidence references.
- Output
- A persisted proposal, validation results, and conflicts.
- Write boundary
- Creates a proposal; it does not mutate canonical state.
Request Time Off & Availability action
request_time_off_availability_actionPrepare an authorized human action request without executing the high-risk command.
- Scope
- time-off:operate
- Input
- Proposal id, expected version, named decision maker, and reason.
- Output
- A pending human-action request and audit reference.
- Write boundary
- The agent cannot execute the final command.
User: Review the proposed time off & availability change and help me apply it.
1. Call get_time_off_availability to inspect current state, provenance, and allowed actions.
2. Call draft_time_off_availability_change to create a proposal without changing canonical state.
3. Show validation results, conflicts, and the exact command to the user.
4. Call request_time_off_availability_action so an authorized human can decide.
Never infer authority from access to the MCP client.Webhooks
Proposed event catalog
Event types
time_off.createdplanned eventA canonical TimeOffRequest was created.
payload: time_off_id, status, created_at
time_off.updatedplanned eventGoverned TimeOffRequest fields changed.
payload: time_off_id, changed_fields, version, occurred_at
time_off.approvedplanned eventThe approve command completed.
payload: time_off_id, prior_status, status, occurred_at
{
"event_id": "evt_01k4...",
"type": "time_off.approved",
"event_version": 1,
"occurred_at": "2026-07-16T14:22:04Z",
"workspace_id": "ws_abc123",
"resource": {
"type": "time_off",
"id": "time_off_123"
},
"actor": {
"id": "user_123"
},
"payload": {
"time_off_id": "time_off_123",
"prior_status": "draft",
"status": "approved"
},
"source": null
}Connected Apps
Proposed connection roles
Claude / ChatGPT / IDE clients
Consumer application
Read, explain, and submit bounded time off & availability proposals through MCP.
Authority: Client access never implies domain approval or unrestricted mutation authority.
HRIS / Google / Microsoft Calendar
Source connector
Supply leave facts or reflect approved absences.
Authority: Source direction and privacy fields are explicit; DigitalStack approvals remain attributable.
Open contract decisions
Resolve before implementation approval
- • Which HRIS becomes authoritative when an account enables externally managed leave?
Proof obligations
| Must remain true | Failure indicator |
|---|---|
| Time-off, holiday, availability, and approval services remains the singular canonical owner. | An interface or connector persists a second authoritative lifecycle state. |
| Draft and apply remain separate actions. | An agent or integration silently converts inferred intent into a canonical mutation. |
| Every write is attributable, versioned, and idempotent. | A retry duplicates work or stale state overwrites a newer human decision. |
| Connected App direction and field authority are explicit. | Provider data silently becomes canonical or conflicts are resolved without policy. |