@ingenx-io/valets-schema-mcp-server 0.1.4 → 0.1.6
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 +42 -8
- package/data/docs/enums/attention-status.md +1 -1
- package/data/docs/enums/booking-status.md +1 -1
- package/data/docs/enums/customer-payment-status.md +1 -1
- package/data/docs/enums/customer-payment-target-type.md +1 -1
- package/data/docs/enums/delivery-type.md +1 -1
- 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 +2 -2
- 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/stocktake-frequency.md +24 -0
- package/data/docs/enums/stocktake-item-status.md +24 -0
- package/data/docs/enums/stocktake-status.md +24 -0
- package/data/docs/enums/ticket-status.md +2 -2
- package/data/docs/index.md +14 -3
- package/data/docs/models/allowed-user.md +1 -1
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- package/data/docs/models/site.md +561 -0
- package/data/docs/models/stocktake-item.md +500 -0
- package/data/docs/models/stocktake.md +649 -0
- package/data/docs/models/ticket.md +2 -2
- package/data/static/llms.txt +309 -2
- package/data/static/openapi.yaml +972 -0
- package/data/static/schemas.json +1249 -77
- 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. Per **D40**, a `sites/{siteId}/` sub-tenant scope sits below `companies/{companyId}/` for site-specific collections (ING-304).
|
|
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}
|
|
@@ -22,11 +22,14 @@ companies/{companyId}/
|
|
|
22
22
|
├── paymentSummaries/{period}
|
|
23
23
|
├── loyaltyTransactions/{transactionId}
|
|
24
24
|
├── loyaltyConfig (singleton document)
|
|
25
|
-
└── sites/{siteId}
|
|
26
|
-
├── magic_link_requests/{requestId}
|
|
27
|
-
├── allowed_users/{contactId}
|
|
28
|
-
├── payments/{paymentId}
|
|
29
|
-
|
|
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
|
|
30
33
|
```
|
|
31
34
|
|
|
32
35
|
## Path conventions
|
|
@@ -39,7 +42,7 @@ companies/{companyId}/
|
|
|
39
42
|
|
|
40
43
|
## D40 — Site sub-tenant scope
|
|
41
44
|
|
|
42
|
-
Introduced for ING-304 (canonical Firestore models derived from the SR Single site reference). The
|
|
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.
|
|
43
46
|
|
|
44
47
|
| Collection | Purpose | Write pattern |
|
|
45
48
|
|---|---|---|
|
|
@@ -50,6 +53,37 @@ Introduced for ING-304 (canonical Firestore models derived from the SR Single si
|
|
|
50
53
|
|
|
51
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).
|
|
52
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
|
+
|
|
53
87
|
## Security rules pattern
|
|
54
88
|
|
|
55
89
|
```
|
|
@@ -21,4 +21,4 @@ Must be one of:
|
|
|
21
21
|
* "ESCALATED"
|
|
22
22
|
|
|
23
23
|
----------------------------------------------------------------------------------------------------------------------------
|
|
24
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +0000
|
|
@@ -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-
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +0000
|
|
@@ -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-
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +0000
|
|
@@ -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-
|
|
23
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +0000
|
|
@@ -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-
|
|
23
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +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-05-05 at 12:09:28 +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-
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +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-
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +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-
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +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-
|
|
27
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +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-
|
|
30
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +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-
|
|
23
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +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-
|
|
27
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +0000
|
|
28
28
|
|
|
29
29
|
## Related Decisions
|
|
30
30
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "PendingIssue"
|
|
3
3
|
sidebar_label: "PendingIssue"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 14
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# PendingIssue
|
|
@@ -28,4 +28,4 @@ Must be one of:
|
|
|
28
28
|
* "NO_SHOW_UNRESOLVED"
|
|
29
29
|
|
|
30
30
|
----------------------------------------------------------------------------------------------------------------------------
|
|
31
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-
|
|
31
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +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-
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +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-
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +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-05-05 at 12:09:28 +0000
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "StocktakeFrequency"
|
|
3
|
+
sidebar_label: "StocktakeFrequency"
|
|
4
|
+
sidebar_position: 18
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# StocktakeFrequency
|
|
8
|
+
|
|
9
|
+
| | |
|
|
10
|
+
| -------------- | --------------------------------- |
|
|
11
|
+
| **Type** | `enum (of string)` |
|
|
12
|
+
| **Required** | No |
|
|
13
|
+
| **Defined in** | #/definitions/stocktake-frequency |
|
|
14
|
+
|
|
15
|
+
**Description:** Recurrence cadence of a Stocktake session (GH#29 §4).
|
|
16
|
+
|
|
17
|
+
Must be one of:
|
|
18
|
+
* "DAILY"
|
|
19
|
+
* "WEEKLY"
|
|
20
|
+
* "MONTHLY"
|
|
21
|
+
* "AD_HOC"
|
|
22
|
+
|
|
23
|
+
----------------------------------------------------------------------------------------------------------------------------
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +0000
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "StocktakeItemStatus"
|
|
3
|
+
sidebar_label: "StocktakeItemStatus"
|
|
4
|
+
sidebar_position: 19
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# StocktakeItemStatus
|
|
8
|
+
|
|
9
|
+
| | |
|
|
10
|
+
| -------------- | ----------------------------------- |
|
|
11
|
+
| **Type** | `enum (of string)` |
|
|
12
|
+
| **Required** | No |
|
|
13
|
+
| **Defined in** | #/definitions/stocktake-item-status |
|
|
14
|
+
|
|
15
|
+
**Description:** Per-line workflow status inside a Stocktake (GH#29 §4, audit Q21).
|
|
16
|
+
|
|
17
|
+
Must be one of:
|
|
18
|
+
* "PENDING"
|
|
19
|
+
* "COUNTED"
|
|
20
|
+
* "VERIFIED"
|
|
21
|
+
* "ADJUSTED"
|
|
22
|
+
|
|
23
|
+
----------------------------------------------------------------------------------------------------------------------------
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +0000
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "StocktakeStatus"
|
|
3
|
+
sidebar_label: "StocktakeStatus"
|
|
4
|
+
sidebar_position: 20
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# StocktakeStatus
|
|
8
|
+
|
|
9
|
+
| | |
|
|
10
|
+
| -------------- | ------------------------------ |
|
|
11
|
+
| **Type** | `enum (of string)` |
|
|
12
|
+
| **Required** | No |
|
|
13
|
+
| **Defined in** | #/definitions/stocktake-status |
|
|
14
|
+
|
|
15
|
+
**Description:** Lifecycle status of a Stocktake session (GH#29 §3, §4).
|
|
16
|
+
|
|
17
|
+
Must be one of:
|
|
18
|
+
* "PENDING"
|
|
19
|
+
* "IN_PROGRESS"
|
|
20
|
+
* "COMPLETED"
|
|
21
|
+
* "CANCELLED"
|
|
22
|
+
|
|
23
|
+
----------------------------------------------------------------------------------------------------------------------------
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "TicketStatus"
|
|
3
3
|
sidebar_label: "TicketStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 21
|
|
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-
|
|
23
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +0000
|
|
24
24
|
|
|
25
25
|
## Related Decisions
|
|
26
26
|
|
package/data/docs/index.md
CHANGED
|
@@ -19,7 +19,7 @@ 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 (21)
|
|
23
23
|
|
|
24
24
|
Status enums that drive business logic across Order, Booking, Event, and Loyalty domains:
|
|
25
25
|
|
|
@@ -30,6 +30,7 @@ Status enums that drive business logic across Order, Booking, Event, and Loyalty
|
|
|
30
30
|
| [CustomerPaymentStatus](enums/customer-payment-status) | 6 values | Customer payment lifecycle status (D22). Tracks allocation progress of received payments. |
|
|
31
31
|
| [CustomerPaymentTargetType](enums/customer-payment-target-type) | 3 values | Target document type for customer payment allocation. |
|
|
32
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. |
|
|
33
34
|
| [EventStatus](enums/event-status) | 4 values | Ticketed event lifecycle (D32). Mobile-only today; Dashboard in Wave 4. |
|
|
34
35
|
| [FulfillmentStatus](enums/fulfillment-status) | 6 values | Delivery/fulfillment lifecycle (D34). Optional — null for in-person orders. |
|
|
35
36
|
| [LoyaltyTransactionType](enums/loyalty-transaction-type) | 6 values | Loyalty point transaction type (D07). SCREAMING_SNAKE past tense. |
|
|
@@ -40,17 +41,24 @@ Status enums that drive business logic across Order, Booking, Event, and Loyalty
|
|
|
40
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. |
|
|
41
42
|
| [ReturnStatus](enums/return-status) | 6 values | Post-sale return/exchange lifecycle (D34). Optional — null until return or exchange initiated. |
|
|
42
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. |
|
|
45
|
+
| [StocktakeFrequency](enums/stocktake-frequency) | 4 values | Recurrence cadence of a Stocktake session (GH#29 §4). |
|
|
46
|
+
| [StocktakeItemStatus](enums/stocktake-item-status) | 4 values | Per-line workflow status inside a Stocktake (GH#29 §4, audit Q21). |
|
|
47
|
+
| [StocktakeStatus](enums/stocktake-status) | 4 values | Lifecycle status of a Stocktake session (GH#29 §3, §4). |
|
|
43
48
|
| [TicketStatus](enums/ticket-status) | 3 values | Event ticket status (D32). VALID = active and unused. |
|
|
44
49
|
|
|
45
50
|
|
|
46
|
-
### Models (
|
|
51
|
+
### Models (27)
|
|
47
52
|
|
|
48
53
|
Core Firestore document schemas:
|
|
49
54
|
|
|
50
55
|
| Model | Fields | Required | Description |
|
|
51
56
|
|-------|--------|----------|-------------|
|
|
52
57
|
| [AllowedUser](models/allowed-user) | 9 | 8 | — |
|
|
58
|
+
| [AnalyticsBackfill](models/analytics-backfill) | 12 | 10 | — |
|
|
59
|
+
| [AnalyticsDaily](models/analytics-daily) | 16 | 14 | — |
|
|
53
60
|
| [AnalyticsEvent](models/analytics-event) | 12 | 10 | — |
|
|
61
|
+
| [AnalyticsHourly](models/analytics-hourly) | 17 | 15 | — |
|
|
54
62
|
| [Booking](models/booking) | 52 | 7 | — |
|
|
55
63
|
| [BookingVersion](models/booking-version) | 9 | 6 | — |
|
|
56
64
|
| [Customer](models/customer) | 17 | 4 | — |
|
|
@@ -65,10 +73,13 @@ Core Firestore document schemas:
|
|
|
65
73
|
| [MetricsCurrent](models/metrics-current) | 25 | 25 | — |
|
|
66
74
|
| [MetricsDaily](models/metrics-daily) | 26 | 26 | — |
|
|
67
75
|
| [MetricsMonthly](models/metrics-monthly) | 26 | 26 | — |
|
|
68
|
-
| [Order](models/order) |
|
|
76
|
+
| [Order](models/order) | 48 | 8 | — |
|
|
69
77
|
| [OrderItem](models/order-item) | 12 | 3 | — |
|
|
70
78
|
| [Sale](models/sale) | 12 | 1 | — |
|
|
79
|
+
| [Site](models/site) | 14 | 6 | — |
|
|
71
80
|
| [SitePayment](models/site-payment) | 10 | 9 | — |
|
|
81
|
+
| [Stocktake](models/stocktake) | 21 | 11 | — |
|
|
82
|
+
| [StocktakeItem](models/stocktake-item) | 16 | 8 | — |
|
|
72
83
|
| [Ticket](models/ticket) | 16 | 6 | — |
|
|
73
84
|
|
|
74
85
|
|
|
@@ -185,4 +185,4 @@ Set at creation only. This field cannot be modified after the document is create
|
|
|
185
185
|
| **Maximum** | ≤ 9007199254740991 |
|
|
186
186
|
|
|
187
187
|
----------------------------------------------------------------------------------------------------------------------------
|
|
188
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-
|
|
188
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-05 at 12:09:28 +0000
|