Coming soon · Contract draft

Time Off & Availability

Planned

A privacy-aware availability graph and leave lifecycle contract with explicit approvals and project-impact reads.

Reviewable specification — not callable

Documentation-first contract draft. The proposed additions on this page are not callable or available yet. Paths, payloads, scopes, names, and examples are intentionally concrete so customers can review the intended contract before and during implementation.

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
FromToCommandAuthority
draftrequestedSubmit requestTime-off service and named approver
requestedapprovedApprove time offTime-off service and named approver
requesteddeclinedDecline requestTime-off service and named approver
approvedcancelledCancel time offTime-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.

add

Request, update, cancel, decide, holiday, availability, and project-impact reads

The API must support both personal lifecycle and planning impact.

keep

Explicit human approval and privacy controls

Leave decisions and reasons are sensitive and attributable.

remove

Agent approvals and calendar-derived automatic leave

Evidence and convenience cannot transfer approval authority.

Interface plan

REST API

Planned

Versioned time off & availability resources, commands, idempotency, and operation status.

Reads + explicit commands

GraphQL

Planned

Composable TimeOffRequest reads with mutations delegated to the same canonical domain service.

Composable reads + bounded delegated mutations

MCP / Agent API

Planned

Bounded read, draft, and human-request tools with evidence and audit attribution.

Read + proposal/confirmed commands only

Webhooks

Planned

Past-tense time off lifecycle facts with minimal payloads.

Past-tense durable facts only

Connected Apps

Planned

HRIS / 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.

CapabilityRESTGraphQLMCPWebhookCanonical owner
Primary readGET /time-offtimeOffRequest(id: ID!): TimeOffRequestget_time_off_availabilityTime-off, holiday, availability, and approval services
Primary commandPOST /time-offdraftTimeOffRequestChange(input: DraftTimeOffRequestChangeInput!): TimeOffRequestChangeProposal!draft_time_off_availability_changetime_off.createdTime-off, holiday, availability, and approval services

Proposed scopes

Proposed scopes are not grantable yet.

time-off:readplanned scope
Read governed time off & availability resources.
time-off:writeplanned scope
Create and edit bounded time off & availability fields.
time-off:operateplanned scope
Run explicit time off & availability lifecycle commands.

Behavioral 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

Planned
GET/api/v1/time-off

List time off & availability

Return an authorized, paginated collection with stable filters and provenance.

time-off:read

POST/api/v1/time-offconfirmation

Create TimeOffRequest

Create one canonical resource with idempotency and actor attribution.

time-off:write

GET/api/v1/time-off/{id}

Retrieve TimeOffRequest

Return canonical detail, lifecycle state, permissions, and allowed actions.

time-off:read

PATCH/api/v1/time-off/{id}confirmation

Update TimeOffRequest

Update bounded editable fields using optimistic versioning.

time-off:write

POST/api/v1/time-off/{id}/approveconfirmation

approve 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"
  }'
Planned response
{
  "data": {
    "id": "time_off_123",
    "status": "approved",
    "version": 3,
    "operation_id": "op_01k4..."
  }
}

GraphQL

Proposed graph

Planned

Types

TimeOffRequest
TimeOffRequestConnection
TimeOffRequestChangeProposal
Operation

Queries

timeOffRequest(id: ID!): TimeOffRequest
timeOffRequestList(filter: TimeOffRequestFilter, pagination: PaginationInput): TimeOffRequestConnection!

Mutations

draftTimeOffRequestChange(input: DraftTimeOffRequestChangeInput!): TimeOffRequestChangeProposal!
Planned GraphQL query
query TimeOffRequestDetail($id: ID!) {
  timeOffRequest(id: $id) {
    id
    status
    version
    updatedAt
    allowedActions { id label requiresConfirmation }
    source { kind externalId }
  }
}

MCP / Agent API

Proposed tools

Planned

Get Time Off & Availability

get_time_off_availability
Planned

Read 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_change
Planned

Build 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_action
Planned

Prepare 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.
Planned agent workflow
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

Planned

Event types

time_off.createdplanned event

A canonical TimeOffRequest was created.

payload: time_off_id, status, created_at

time_off.updatedplanned event

Governed TimeOffRequest fields changed.

payload: time_off_id, changed_fields, version, occurred_at

time_off.approvedplanned event

The approve command completed.

payload: time_off_id, prior_status, status, occurred_at

Planned event example
{
  "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

Planned

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 trueFailure 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.