@ingenx-io/valets-schema-mcp-server 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/docs/collections/firestore-paths.md +56 -3
- package/data/docs/enums/attention-status.md +24 -0
- package/data/docs/enums/booking-status.md +2 -2
- package/data/docs/enums/customer-payment-status.md +2 -2
- package/data/docs/enums/customer-payment-target-type.md +2 -2
- package/data/docs/enums/delivery-type.md +2 -2
- package/data/docs/enums/deployment-link-type.md +26 -0
- package/data/docs/enums/event-status.md +2 -2
- package/data/docs/enums/fulfillment-status.md +2 -2
- package/data/docs/enums/loyalty-transaction-type.md +2 -2
- package/data/docs/enums/order-status.md +2 -2
- package/data/docs/enums/payment-method.md +2 -2
- package/data/docs/enums/payment-proof-status.md +2 -2
- package/data/docs/enums/payment-status.md +2 -2
- package/data/docs/enums/pending-issue.md +31 -0
- package/data/docs/enums/return-status.md +2 -2
- package/data/docs/enums/session-status.md +2 -2
- package/data/docs/enums/site-status.md +24 -0
- package/data/docs/enums/ticket-status.md +2 -2
- package/data/docs/index.md +15 -3
- package/data/docs/models/allowed-user.md +188 -0
- package/data/docs/models/analytics-backfill.md +398 -0
- package/data/docs/models/analytics-daily.md +351 -0
- package/data/docs/models/analytics-event.md +533 -0
- package/data/docs/models/analytics-hourly.md +372 -0
- package/data/docs/models/booking-version.md +2 -2
- package/data/docs/models/booking.md +2 -2
- package/data/docs/models/customer-payment-allocation.md +2 -2
- package/data/docs/models/customer-payment.md +2 -2
- package/data/docs/models/customer.md +2 -2
- package/data/docs/models/event.md +2 -2
- package/data/docs/models/loyalty-config.md +2 -2
- package/data/docs/models/loyalty-reward.md +2 -2
- package/data/docs/models/loyalty-status.md +2 -2
- package/data/docs/models/loyalty-transaction.md +2 -2
- package/data/docs/models/magic-link-request.md +285 -0
- package/data/docs/models/metrics-current.md +2 -2
- package/data/docs/models/metrics-daily.md +2 -2
- package/data/docs/models/metrics-monthly.md +2 -2
- package/data/docs/models/order-item.md +2 -2
- package/data/docs/models/order.md +248 -220
- package/data/docs/models/sale.md +2 -2
- package/data/docs/models/site-payment.md +200 -0
- package/data/docs/models/site.md +561 -0
- package/data/docs/models/ticket.md +2 -2
- package/data/static/llms.txt +362 -2
- package/data/static/openapi.yaml +1068 -0
- package/data/static/schemas.json +1229 -44
- package/package.json +1 -1
|
@@ -6,11 +6,11 @@ sidebar_position: 1
|
|
|
6
6
|
|
|
7
7
|
# Firestore Collection Paths
|
|
8
8
|
|
|
9
|
-
All collections are scoped under a company document.
|
|
9
|
+
All collections are scoped under a company document. Per **D40**, a `sites/{siteId}/` sub-tenant scope sits below `companies/{companyId}/` for site-specific collections (ING-304). **D41** canonicalizes the Site document; **D42** adds the analytics rollup collections; **D43** adds optional `Order.siteId` for site attribution (per ADR-003).
|
|
10
10
|
|
|
11
11
|
```
|
|
12
12
|
companies/{companyId}/
|
|
13
|
-
├── orders/{orderId}
|
|
13
|
+
├── orders/{orderId} ← Order.siteId? (D43 / ADR-003) attributes to a site
|
|
14
14
|
├── customers/{customerId}
|
|
15
15
|
├── bookings/{bookingId}
|
|
16
16
|
│ └── sessions/{sessionId}
|
|
@@ -21,16 +21,69 @@ companies/{companyId}/
|
|
|
21
21
|
├── customerPayments/{paymentId}
|
|
22
22
|
├── paymentSummaries/{period}
|
|
23
23
|
├── loyaltyTransactions/{transactionId}
|
|
24
|
-
|
|
24
|
+
├── loyaltyConfig (singleton document)
|
|
25
|
+
└── sites/{siteId} ← D41 Site document (D40 sub-tenant root)
|
|
26
|
+
├── magic_link_requests/{requestId} ← 16-byte hex; auth audit log
|
|
27
|
+
├── allowed_users/{contactId} ← access allowlist; doc ID = email / E.164 phone (URL-escaped)
|
|
28
|
+
├── payments/{paymentId} ← SitePayment — immutable transaction ledger
|
|
29
|
+
├── analytics_events/{eventId} ← append-only product/behavior event stream
|
|
30
|
+
├── analytics_daily/{YYYY-MM-DD} ← D42 — idempotent daily rollup
|
|
31
|
+
├── analytics_hourly/{YYYY-MM-DD-HH} ← D42 — hourly rollup (scheduled CF)
|
|
32
|
+
└── analytics_backfills/{runId} ← D42 — admin-triggered backfill run tracker
|
|
25
33
|
```
|
|
26
34
|
|
|
27
35
|
## Path conventions
|
|
28
36
|
|
|
29
37
|
- All paths are **tenant-scoped** under `companies/{companyId}/`
|
|
38
|
+
- Site-specific collections live under `companies/{companyId}/sites/{siteId}/` (D40)
|
|
30
39
|
- Sub-collections (sessions, tickets) are nested under their parent
|
|
31
40
|
- `loyaltyConfig` is a singleton document, not a collection
|
|
32
41
|
- Document IDs are auto-generated Firestore IDs unless specified
|
|
33
42
|
|
|
43
|
+
## D40 — Site sub-tenant scope
|
|
44
|
+
|
|
45
|
+
Introduced for ING-304 (canonical Firestore models derived from the SR Single site reference). The site-scoped collections share one rationale: they belong to a *site* (a per-company product surface), not to the company as a whole. A company may host many sites.
|
|
46
|
+
|
|
47
|
+
| Collection | Purpose | Write pattern |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| `magic_link_requests` | Authentication audit log — every access request | Two-stage PATCH (request → verify) |
|
|
50
|
+
| `allowed_users` | Authoritative paid-access allowlist; referral-code resolution table | Upsert by contact ID |
|
|
51
|
+
| `payments` | Immutable SitePayment ledger (distinct from `customerPayments`) | Append-only; dual-write (redirect + webhook) |
|
|
52
|
+
| `analytics_events` | Product/behavior event stream (page views, funnel, forms, orders, identity, errors) | Append-only, immutable |
|
|
53
|
+
|
|
54
|
+
Related follow-ups: [ING-340](https://linear.app/ingenx/issue/ING-340) (retention/TTL), [ING-341](https://linear.app/ingenx/issue/ING-341) (PII redaction convention).
|
|
55
|
+
|
|
56
|
+
## D41 — Site document
|
|
57
|
+
|
|
58
|
+
The Site document at `companies/{companyId}/sites/{siteId}` is the root of the site sub-tenant scope. It holds:
|
|
59
|
+
|
|
60
|
+
- `name`, `description`, `status` (`SiteStatus`: ACTIVE / INACTIVE / EXPIRED / ARCHIVED)
|
|
61
|
+
- `deploymentLinks[]` — ordered list of deployment URLs by `DeploymentLinkType` (web, mobile, pwa, app-store, play-store, other)
|
|
62
|
+
- `expiresAt?` and derived `isExpired?`
|
|
63
|
+
- `analyticsEnabled` feature flag; `lastAnalyticsSync` sentinel
|
|
64
|
+
- `cachedMetrics?` — denormalized `SiteMetricsSummary` snapshot (authoritative counts live in `analytics_daily` / `analytics_hourly`)
|
|
65
|
+
- Standard audit fields: `createdAt`, `updatedAt`, `createdBy`
|
|
66
|
+
|
|
67
|
+
## D42 — Analytics rollups
|
|
68
|
+
|
|
69
|
+
Per GH ticket IngenX-IO/valets-dashboard#199, rollups are written by a scheduled Cloud Function (Option B — hourly writer, idempotent set/merge). Admin-triggered backfills use an `onCall` function that records progress in `analytics_backfills/{runId}`.
|
|
70
|
+
|
|
71
|
+
| Collection | Doc ID | Writer | Notes |
|
|
72
|
+
|---|---|---|---|
|
|
73
|
+
| `analytics_daily` | `YYYY-MM-DD` (UTC) | Scheduled CF + backfill | `computeRollup(companyId, siteId, date)` — idempotent set/merge; reruns overwrite |
|
|
74
|
+
| `analytics_hourly` | `YYYY-MM-DD-HH` (UTC) | Scheduled CF (hourly) | Same writer, scoped to a single hour bucket |
|
|
75
|
+
| `analytics_backfills` | auto | Admin `onCall` | Tracks `status`, `from`/`to`, `processedDates`, `errors`, `dryRun`, audit fields |
|
|
76
|
+
|
|
77
|
+
Readers should fall back to the raw `analytics_events` collection for slices not yet covered by a rollup.
|
|
78
|
+
|
|
79
|
+
## D43 — `Order.siteId` attribution (ADR-003)
|
|
80
|
+
|
|
81
|
+
Orders live at the existing company-scoped path `companies/{companyId}/orders/{orderId}`. D43 adds an **optional** `siteId?: string` field — when set, the order is attributed to a specific site (enables site-scoped dashboards, analytics joins, and per-site revenue slices). When null or absent, the order is company-wide (legacy behavior).
|
|
82
|
+
|
|
83
|
+
- **No migration.** Existing orders keep `siteId = null`.
|
|
84
|
+
- **Composite index:** `(companyId, siteId, createdAt)` for per-site recency queries.
|
|
85
|
+
- **Physical relocation** of Order under `sites/{siteId}/orders/` is explicitly deferred (ADR-004, not approved).
|
|
86
|
+
|
|
34
87
|
## Security rules pattern
|
|
35
88
|
|
|
36
89
|
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "AttentionStatus"
|
|
3
|
+
sidebar_label: "AttentionStatus"
|
|
4
|
+
sidebar_position: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# AttentionStatus
|
|
8
|
+
|
|
9
|
+
| | |
|
|
10
|
+
| -------------- | ------------------------------ |
|
|
11
|
+
| **Type** | `enum (of string)` |
|
|
12
|
+
| **Required** | No |
|
|
13
|
+
| **Defined in** | #/definitions/attention-status |
|
|
14
|
+
|
|
15
|
+
**Description:** Operational attention status for Order and Booking (D39). Controls home-page queue assignment. Server-owned — set via triggers or callable fn only.
|
|
16
|
+
|
|
17
|
+
Must be one of:
|
|
18
|
+
* "ACTIVE"
|
|
19
|
+
* "STALE"
|
|
20
|
+
* "ON_HOLD"
|
|
21
|
+
* "ESCALATED"
|
|
22
|
+
|
|
23
|
+
----------------------------------------------------------------------------------------------------------------------------
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:54 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "BookingStatus"
|
|
3
3
|
sidebar_label: "BookingStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 2
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# BookingStatus
|
|
@@ -23,4 +23,4 @@ Must be one of:
|
|
|
23
23
|
* "COMPLETED_MIXED"
|
|
24
24
|
|
|
25
25
|
----------------------------------------------------------------------------------------------------------------------------
|
|
26
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:54 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "CustomerPaymentStatus"
|
|
3
3
|
sidebar_label: "CustomerPaymentStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 3
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# CustomerPaymentStatus
|
|
@@ -23,4 +23,4 @@ Must be one of:
|
|
|
23
23
|
* "CANCELLED"
|
|
24
24
|
|
|
25
25
|
----------------------------------------------------------------------------------------------------------------------------
|
|
26
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:55 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "CustomerPaymentTargetType"
|
|
3
3
|
sidebar_label: "CustomerPaymentTargetType"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 4
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# CustomerPaymentTargetType
|
|
@@ -20,4 +20,4 @@ Must be one of:
|
|
|
20
20
|
* "PURCHASE"
|
|
21
21
|
|
|
22
22
|
----------------------------------------------------------------------------------------------------------------------------
|
|
23
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-
|
|
23
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:55 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "DeliveryType"
|
|
3
3
|
sidebar_label: "DeliveryType"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 5
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# DeliveryType
|
|
@@ -20,4 +20,4 @@ Must be one of:
|
|
|
20
20
|
* "DELIVERY"
|
|
21
21
|
|
|
22
22
|
----------------------------------------------------------------------------------------------------------------------------
|
|
23
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-
|
|
23
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:55 +0000
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "DeploymentLinkType"
|
|
3
|
+
sidebar_label: "DeploymentLinkType"
|
|
4
|
+
sidebar_position: 6
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# DeploymentLinkType
|
|
8
|
+
|
|
9
|
+
| | |
|
|
10
|
+
| -------------- | ---------------------------------- |
|
|
11
|
+
| **Type** | `enum (of string)` |
|
|
12
|
+
| **Required** | No |
|
|
13
|
+
| **Defined in** | #/definitions/deployment-link-type |
|
|
14
|
+
|
|
15
|
+
**Description:** Category of a Site deployment link (D41). Used for UI icon/labelling and deep-link handling.
|
|
16
|
+
|
|
17
|
+
Must be one of:
|
|
18
|
+
* "web"
|
|
19
|
+
* "mobile"
|
|
20
|
+
* "pwa"
|
|
21
|
+
* "app-store"
|
|
22
|
+
* "play-store"
|
|
23
|
+
* "other"
|
|
24
|
+
|
|
25
|
+
----------------------------------------------------------------------------------------------------------------------------
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:55 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "EventStatus"
|
|
3
3
|
sidebar_label: "EventStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 7
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# EventStatus
|
|
@@ -21,7 +21,7 @@ Must be one of:
|
|
|
21
21
|
* "COMPLETED"
|
|
22
22
|
|
|
23
23
|
----------------------------------------------------------------------------------------------------------------------------
|
|
24
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:55 +0000
|
|
25
25
|
|
|
26
26
|
## Related Decisions
|
|
27
27
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "FulfillmentStatus"
|
|
3
3
|
sidebar_label: "FulfillmentStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 8
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# FulfillmentStatus
|
|
@@ -23,7 +23,7 @@ Must be one of:
|
|
|
23
23
|
* "PICKED_UP"
|
|
24
24
|
|
|
25
25
|
----------------------------------------------------------------------------------------------------------------------------
|
|
26
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:55 +0000
|
|
27
27
|
|
|
28
28
|
## Related Decisions
|
|
29
29
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "LoyaltyTransactionType"
|
|
3
3
|
sidebar_label: "LoyaltyTransactionType"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 9
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# LoyaltyTransactionType
|
|
@@ -23,7 +23,7 @@ Must be one of:
|
|
|
23
23
|
* "REFUND"
|
|
24
24
|
|
|
25
25
|
----------------------------------------------------------------------------------------------------------------------------
|
|
26
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:55 +0000
|
|
27
27
|
|
|
28
28
|
## Related Decisions
|
|
29
29
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "OrderStatus"
|
|
3
3
|
sidebar_label: "OrderStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 10
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# OrderStatus
|
|
@@ -24,7 +24,7 @@ Must be one of:
|
|
|
24
24
|
* "EXPIRED"
|
|
25
25
|
|
|
26
26
|
----------------------------------------------------------------------------------------------------------------------------
|
|
27
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-
|
|
27
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:55 +0000
|
|
28
28
|
|
|
29
29
|
## Related Decisions
|
|
30
30
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "PaymentMethod"
|
|
3
3
|
sidebar_label: "PaymentMethod"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 11
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# PaymentMethod
|
|
@@ -27,7 +27,7 @@ Must be one of:
|
|
|
27
27
|
* "OTHER"
|
|
28
28
|
|
|
29
29
|
----------------------------------------------------------------------------------------------------------------------------
|
|
30
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-
|
|
30
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:55 +0000
|
|
31
31
|
|
|
32
32
|
## Related Decisions
|
|
33
33
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "PaymentProofStatus"
|
|
3
3
|
sidebar_label: "PaymentProofStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 12
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# PaymentProofStatus
|
|
@@ -20,4 +20,4 @@ Must be one of:
|
|
|
20
20
|
* "REJECTED"
|
|
21
21
|
|
|
22
22
|
----------------------------------------------------------------------------------------------------------------------------
|
|
23
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-
|
|
23
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:55 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "PaymentStatus"
|
|
3
3
|
sidebar_label: "PaymentStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 13
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# PaymentStatus
|
|
@@ -24,7 +24,7 @@ Must be one of:
|
|
|
24
24
|
* "PARTIALLY_REFUNDED"
|
|
25
25
|
|
|
26
26
|
----------------------------------------------------------------------------------------------------------------------------
|
|
27
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-
|
|
27
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:55 +0000
|
|
28
28
|
|
|
29
29
|
## Related Decisions
|
|
30
30
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "PendingIssue"
|
|
3
|
+
sidebar_label: "PendingIssue"
|
|
4
|
+
sidebar_position: 14
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# PendingIssue
|
|
8
|
+
|
|
9
|
+
| | |
|
|
10
|
+
| -------------- | --------------------------- |
|
|
11
|
+
| **Type** | `enum (of string)` |
|
|
12
|
+
| **Required** | No |
|
|
13
|
+
| **Defined in** | #/definitions/pending-issue |
|
|
14
|
+
|
|
15
|
+
**Description:** Specific detected conditions on an Order or Booking requiring human action (D39). Stored as an array — multiple issues can be active simultaneously. Server-owned.
|
|
16
|
+
|
|
17
|
+
Must be one of:
|
|
18
|
+
* "PAYMENT_PROOF_PENDING"
|
|
19
|
+
* "PAYMENT_PROOF_REJECTED"
|
|
20
|
+
* "AMOUNT_DISCREPANCY"
|
|
21
|
+
* "RETURN_UNRESOLVED"
|
|
22
|
+
* "OVERDUE_DELIVERY"
|
|
23
|
+
* "SESSION_OVERDUE"
|
|
24
|
+
* "PAYMENT_INCOMPLETE"
|
|
25
|
+
* "CANCELLATION_REQUESTED"
|
|
26
|
+
* "UNREFUNDED_CANCELLATION"
|
|
27
|
+
* "UPCOMING_UNPAID"
|
|
28
|
+
* "NO_SHOW_UNRESOLVED"
|
|
29
|
+
|
|
30
|
+
----------------------------------------------------------------------------------------------------------------------------
|
|
31
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:55 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "ReturnStatus"
|
|
3
3
|
sidebar_label: "ReturnStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 15
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# ReturnStatus
|
|
@@ -23,7 +23,7 @@ Must be one of:
|
|
|
23
23
|
* "EXCHANGE_COMPLETED"
|
|
24
24
|
|
|
25
25
|
----------------------------------------------------------------------------------------------------------------------------
|
|
26
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:55 +0000
|
|
27
27
|
|
|
28
28
|
## Related Decisions
|
|
29
29
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "SessionStatus"
|
|
3
3
|
sidebar_label: "SessionStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 16
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# SessionStatus
|
|
@@ -23,7 +23,7 @@ Must be one of:
|
|
|
23
23
|
* "CANCELLED"
|
|
24
24
|
|
|
25
25
|
----------------------------------------------------------------------------------------------------------------------------
|
|
26
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:55 +0000
|
|
27
27
|
|
|
28
28
|
## Related Decisions
|
|
29
29
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "SiteStatus"
|
|
3
|
+
sidebar_label: "SiteStatus"
|
|
4
|
+
sidebar_position: 17
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# SiteStatus
|
|
8
|
+
|
|
9
|
+
| | |
|
|
10
|
+
| -------------- | ------------------------- |
|
|
11
|
+
| **Type** | `enum (of string)` |
|
|
12
|
+
| **Required** | No |
|
|
13
|
+
| **Defined in** | #/definitions/site-status |
|
|
14
|
+
|
|
15
|
+
**Description:** Lifecycle status for a Site (D41). Drives whether the site is reachable and whether analytics/payments flow.
|
|
16
|
+
|
|
17
|
+
Must be one of:
|
|
18
|
+
* "ACTIVE"
|
|
19
|
+
* "INACTIVE"
|
|
20
|
+
* "EXPIRED"
|
|
21
|
+
* "ARCHIVED"
|
|
22
|
+
|
|
23
|
+
----------------------------------------------------------------------------------------------------------------------------
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:55 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "TicketStatus"
|
|
3
3
|
sidebar_label: "TicketStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 18
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# TicketStatus
|
|
@@ -20,7 +20,7 @@ Must be one of:
|
|
|
20
20
|
* "CANCELLED"
|
|
21
21
|
|
|
22
22
|
----------------------------------------------------------------------------------------------------------------------------
|
|
23
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-
|
|
23
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 22:24:55 +0000
|
|
24
24
|
|
|
25
25
|
## Related Decisions
|
|
26
26
|
|
package/data/docs/index.md
CHANGED
|
@@ -19,16 +19,18 @@ Developers own the Zod source in `packages/schema/src/`. When schemas change, th
|
|
|
19
19
|
|
|
20
20
|
## What's documented
|
|
21
21
|
|
|
22
|
-
### Enums (
|
|
22
|
+
### Enums (18)
|
|
23
23
|
|
|
24
24
|
Status enums that drive business logic across Order, Booking, Event, and Loyalty domains:
|
|
25
25
|
|
|
26
26
|
| Enum | Values | Description |
|
|
27
27
|
|------|--------|-------------|
|
|
28
|
+
| [AttentionStatus](enums/attention-status) | 4 values | Operational attention status for Order and Booking (D39). Controls home-page queue assignment. Server-owned — set via triggers or callable fn only. |
|
|
28
29
|
| [BookingStatus](enums/booking-status) | 6 values | Booking lifecycle status. COMPLETED_MIXED = some sessions completed, others cancelled/no-show. |
|
|
29
30
|
| [CustomerPaymentStatus](enums/customer-payment-status) | 6 values | Customer payment lifecycle status (D22). Tracks allocation progress of received payments. |
|
|
30
31
|
| [CustomerPaymentTargetType](enums/customer-payment-target-type) | 3 values | Target document type for customer payment allocation. |
|
|
31
32
|
| [DeliveryType](enums/delivery-type) | 3 values | Fulfillment channel for an order. Determines whether the customer comes to the business (ON_SITE), collects their order themselves (PICK_UP), or receives a physical delivery (DELIVERY). Drives whether fulfillmentStatus is relevant. |
|
|
33
|
+
| [DeploymentLinkType](enums/deployment-link-type) | 6 values | Category of a Site deployment link (D41). Used for UI icon/labelling and deep-link handling. |
|
|
32
34
|
| [EventStatus](enums/event-status) | 4 values | Ticketed event lifecycle (D32). Mobile-only today; Dashboard in Wave 4. |
|
|
33
35
|
| [FulfillmentStatus](enums/fulfillment-status) | 6 values | Delivery/fulfillment lifecycle (D34). Optional — null for in-person orders. |
|
|
34
36
|
| [LoyaltyTransactionType](enums/loyalty-transaction-type) | 6 values | Loyalty point transaction type (D07). SCREAMING_SNAKE past tense. |
|
|
@@ -36,17 +38,24 @@ Status enums that drive business logic across Order, Booking, Event, and Loyalty
|
|
|
36
38
|
| [PaymentMethod](enums/payment-method) | 10 values | Unified payment method set with African + global methods (D02). |
|
|
37
39
|
| [PaymentProofStatus](enums/payment-proof-status) | 3 values | Payment proof review status. Used by Order and Booking payment proof workflows. |
|
|
38
40
|
| [PaymentStatus](enums/payment-status) | 7 values | Payment lifecycle status (D01 amended). Used by Order, Sale/Purchase, Booking. |
|
|
41
|
+
| [PendingIssue](enums/pending-issue) | 11 values | Specific detected conditions on an Order or Booking requiring human action (D39). Stored as an array — multiple issues can be active simultaneously. Server-owned. |
|
|
39
42
|
| [ReturnStatus](enums/return-status) | 6 values | Post-sale return/exchange lifecycle (D34). Optional — null until return or exchange initiated. |
|
|
40
43
|
| [SessionStatus](enums/session-status) | 6 values | Per-date/per-slot booking session status (D19). Dashboard is sole writer; Mobile is read-only. |
|
|
44
|
+
| [SiteStatus](enums/site-status) | 4 values | Lifecycle status for a Site (D41). Drives whether the site is reachable and whether analytics/payments flow. |
|
|
41
45
|
| [TicketStatus](enums/ticket-status) | 3 values | Event ticket status (D32). VALID = active and unused. |
|
|
42
46
|
|
|
43
47
|
|
|
44
|
-
### Models (
|
|
48
|
+
### Models (25)
|
|
45
49
|
|
|
46
50
|
Core Firestore document schemas:
|
|
47
51
|
|
|
48
52
|
| Model | Fields | Required | Description |
|
|
49
53
|
|-------|--------|----------|-------------|
|
|
54
|
+
| [AllowedUser](models/allowed-user) | 9 | 8 | — |
|
|
55
|
+
| [AnalyticsBackfill](models/analytics-backfill) | 12 | 10 | — |
|
|
56
|
+
| [AnalyticsDaily](models/analytics-daily) | 16 | 14 | — |
|
|
57
|
+
| [AnalyticsEvent](models/analytics-event) | 12 | 10 | — |
|
|
58
|
+
| [AnalyticsHourly](models/analytics-hourly) | 17 | 15 | — |
|
|
50
59
|
| [Booking](models/booking) | 52 | 7 | — |
|
|
51
60
|
| [BookingVersion](models/booking-version) | 9 | 6 | — |
|
|
52
61
|
| [Customer](models/customer) | 17 | 4 | — |
|
|
@@ -57,12 +66,15 @@ Core Firestore document schemas:
|
|
|
57
66
|
| [LoyaltyReward](models/loyalty-reward) | 11 | 5 | — |
|
|
58
67
|
| [LoyaltyStatus](models/loyalty-status) | 9 | 2 | — |
|
|
59
68
|
| [LoyaltyTransaction](models/loyalty-transaction) | 16 | 4 | — |
|
|
69
|
+
| [MagicLinkRequest](models/magic-link-request) | 15 | 11 | — |
|
|
60
70
|
| [MetricsCurrent](models/metrics-current) | 25 | 25 | — |
|
|
61
71
|
| [MetricsDaily](models/metrics-daily) | 26 | 26 | — |
|
|
62
72
|
| [MetricsMonthly](models/metrics-monthly) | 26 | 26 | — |
|
|
63
|
-
| [Order](models/order) |
|
|
73
|
+
| [Order](models/order) | 48 | 8 | — |
|
|
64
74
|
| [OrderItem](models/order-item) | 12 | 3 | — |
|
|
65
75
|
| [Sale](models/sale) | 12 | 1 | — |
|
|
76
|
+
| [Site](models/site) | 14 | 6 | — |
|
|
77
|
+
| [SitePayment](models/site-payment) | 10 | 9 | — |
|
|
66
78
|
| [Ticket](models/ticket) | 16 | 6 | — |
|
|
67
79
|
|
|
68
80
|
|