Kaizen
Browse modulesBookingsbookings/sharedInterfaces

Interface: Transition<Shape, Event *extends* `string` = `string`>

Defined in: shared/bookings/state/transition.ts:8

Type Parameters

Type ParameterDefault type
Shape-
Event extends stringstring

Properties

event

event: Event;

Defined in: shared/bookings/state/transition.ts:10


from

from: 
  | "draft"
  | "held"
  | "pending"
  | "waitlisted"
  | "offered"
  | "confirmed"
  | "completed"
  | "no_show"
  | "cancelled"
  | "rejected"
  | "expired";

Defined in: shared/bookings/state/transition.ts:9


guard?

optional guard?: (host: Shape, ctx: TransitionContext) => boolean;

Defined in: shared/bookings/state/transition.ts:17

STRUCTURAL guard only: decided by the booking's own shape (hold not expired, not terminal, …). POLICY guards (eligibility, blackout, lead-time) are NOT here — they run through the rules engine in the service layer (§8).

Parameters

ParameterType
hostShape
ctxTransitionContext

Returns

boolean


to

to: 
  | "draft"
  | "held"
  | "pending"
  | "waitlisted"
  | "offered"
  | "confirmed"
  | "completed"
  | "no_show"
  | "cancelled"
  | "rejected"
  | "expired";

Defined in: shared/bookings/state/transition.ts:11

On this page