Ticket and pass response projections
Event, ticket definition and purchased pass are distinct records. These reads do not reserve capacity, perform checkout or issue authorization tokens. Monetary units and timestamp timezone remain unspecified.
Event
Use the exact base event: id, slug/title/description, location/timezone, registration_page/url/contact_email, status, start/end dates, active/is_virtual and photo (array of slug/url media records). No tickets, taxonomies or content_types expansion is added by these event reads. An active flag is not a schedule/access decision.
Ticket definition
Use the base event ticket without ti_event expansion: id/ti_event_id, title/slug/description, quantity/min_quantity_order/max_quantity_order, price/currency, status/start_date/end_date, is_private/active/is_applied_vat/vat_percent and decoded extra. No universal normalized flags or closed status enum.
| Added field | Type / presence | Meaning |
|---|---|---|
| available | integer >=0; public event-ticket list only | max(0, integer quantity minus count of all passes), irrespective of pass active/assigned state. Snapshot, not reservation or order guarantee. |
Base pass
| Field | Type / presence | Meaning |
|---|---|---|
| id | stored integer | Purchased pass ID, not ticket-definition ID. |
owner_id, assign_id | stored numeric / null | Purchaser/owner and assigned person; different roles. |
| extra | decoded JSON / nullable stored value | Fetched strings decode only when neither empty nor "0"; both remain unchanged. Other stored values can remain as stored; invalid JSON decodes to null. No fixed property schema. |
| active | stored flag / null | Stored pass activation setting; the read/action may not check it. |
No ticket ID, created/updated dates, authorization_token, auth_link, owner/assign user object or invitation object is added by base asArray. Use the separate wrapper/operation to resolve event/ticket context.
User ticket groups
| Field | Type / presence | Meaning |
|---|---|---|
user_ti_events | array; omitted if no qualifying groups | Events using the event projection, each with user_ti_event_tickets. There is no items/data wrapper. |
user_ti_events[].user_ti_event_tickets | array | Raw ticket-model records plus user_ti_event_ticket_passes. Missing ticket relations are skipped during grouping. |
| ticket fields | raw model attributes | Declared ticket fields match the ticket projection, with created_at/updated_at (stored timestamp strings) also present. Raw model metadata can expose additional deployment columns; not a universal closed schema. |
user_ti_event_ticket_passes | array | Base pass records collected for that ticket. No token/auth_link expansion. |
This collection uses the existing user-resource relationship to select owner-or-assigned passes. It has no active/expiry/public-only filter. Empty result can be {} (aside from optional debug metadata), not user_ti_events:[] or items:[].
Pass-detail wrapper
| Field | Type / presence | Meaning |
|---|---|---|
| items | object | Despite its name, this is a named map, not an array. |
items.ti_event_ticket_pass | base pass | Owned pass record. |
items.ti_event_ticket | base ticket, no available/event expansion | Ticket definition. |
items.ti_event | base event | Parent event, separately serialized. |
Recipient validation and activation context
| Field | Type / presence | Meaning |
|---|---|---|
ti_event_ticket | base ticket, conditional on relation | No available or nested event expansion. Activation requires ticket; validation adds only when resolved. |
ti_event | base event, conditional on relation | Separate parent event. |
No items/result wrapper, invitation/pass object, credential or account membership is added. Shared guard already resolves ticket/event; relation failure can still prevent completion. Activation’s account effects are not serialized as proof of entitlement.