@ingenx-io/valets-schema-mcp-server 0.1.0 → 0.1.2

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.
Files changed (43) hide show
  1. package/README.md +65 -0
  2. package/data/docs/collections/firestore-paths.md +48 -0
  3. package/data/docs/decisions/migrations.md +56 -0
  4. package/data/docs/decisions/summary.md +78 -0
  5. package/data/docs/enums/booking-status.md +26 -0
  6. package/data/docs/enums/customer-payment-status.md +26 -0
  7. package/data/docs/enums/customer-payment-target-type.md +23 -0
  8. package/data/docs/enums/delivery-type.md +23 -0
  9. package/data/docs/enums/event-status.md +30 -0
  10. package/data/docs/enums/fulfillment-status.md +32 -0
  11. package/data/docs/enums/loyalty-transaction-type.md +32 -0
  12. package/data/docs/enums/order-status.md +65 -0
  13. package/data/docs/enums/payment-method.md +36 -0
  14. package/data/docs/enums/payment-proof-status.md +23 -0
  15. package/data/docs/enums/payment-status.md +34 -0
  16. package/data/docs/enums/return-status.md +32 -0
  17. package/data/docs/enums/session-status.md +32 -0
  18. package/data/docs/enums/ticket-status.md +29 -0
  19. package/data/docs/index.md +95 -0
  20. package/data/docs/models/booking-version.md +295 -0
  21. package/data/docs/models/booking.md +1754 -0
  22. package/data/docs/models/customer-payment-allocation.md +336 -0
  23. package/data/docs/models/customer-payment.md +392 -0
  24. package/data/docs/models/customer.md +475 -0
  25. package/data/docs/models/event.md +386 -0
  26. package/data/docs/models/loyalty-config.md +317 -0
  27. package/data/docs/models/loyalty-reward.md +236 -0
  28. package/data/docs/models/loyalty-status.md +328 -0
  29. package/data/docs/models/loyalty-transaction.md +326 -0
  30. package/data/docs/models/metrics-current.md +532 -0
  31. package/data/docs/models/metrics-daily.md +548 -0
  32. package/data/docs/models/metrics-monthly.md +548 -0
  33. package/data/docs/models/order-item.md +361 -0
  34. package/data/docs/models/order.md +1637 -0
  35. package/data/docs/models/sale.md +540 -0
  36. package/data/docs/models/ticket.md +405 -0
  37. package/data/docs/triggers/event-ticket-triggers.md +204 -0
  38. package/data/docs/triggers/loyalty-automation.md +123 -0
  39. package/data/static/decisions.json +966 -0
  40. package/data/static/llms.txt +1046 -0
  41. package/data/static/openapi.yaml +3090 -0
  42. package/data/static/schemas.json +4012 -0
  43. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # @ingenx-io/valets-schema-mcp-server
2
+
3
+ MCP server that exposes the [Valets](https://github.com/IngenX-IO/valets-data-architecture) data model documentation to AI agents via the [Model Context Protocol](https://modelcontextprotocol.io).
4
+
5
+ ## Usage
6
+
7
+ ### Claude Desktop
8
+
9
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
10
+
11
+ ```json
12
+ {
13
+ "mcpServers": {
14
+ "valets-schema": {
15
+ "command": "npx",
16
+ "args": ["-y", "@ingenx-io/valets-schema-mcp-server"]
17
+ }
18
+ }
19
+ }
20
+ ```
21
+
22
+ ### Claude Code
23
+
24
+ ```bash
25
+ claude mcp add valets-schema -- npx -y @ingenx-io/valets-schema-mcp-server
26
+ ```
27
+
28
+ ### Other MCP clients
29
+
30
+ ```json
31
+ {
32
+ "command": "npx",
33
+ "args": ["-y", "@ingenx-io/valets-schema-mcp-server"]
34
+ }
35
+ ```
36
+
37
+ ## Tools
38
+
39
+ | Tool | Description |
40
+ |------|-------------|
41
+ | `schema_overview` | High-level summary of all models and enums — start here |
42
+ | `get_schema` | JSON Schema for a specific model or enum (kebab-case, e.g. `order`, `payment-status`) |
43
+ | `get_doc` | Raw Markdown documentation for a schema page (e.g. `models/order`, `enums/payment-method`) |
44
+ | `search_docs` | Keyword search across all documentation pages |
45
+ | `list_decisions` | All data model decisions (D00–D37+) with status and summary |
46
+ | `get_decision` | Full details for a specific decision by ID (e.g. `D12`) |
47
+ | `get_openapi` | OpenAPI 3.1 spec — full or filtered to a single component (e.g. `Order`, `OrderCreate`) |
48
+
49
+ ## Resources
50
+
51
+ | URI | Description |
52
+ |-----|-------------|
53
+ | `valets://schemas.json` | Consolidated JSON Schema bundle for all models and enums |
54
+ | `valets://llms.txt` | LLM-optimized summary of the Valets data model |
55
+ | `valets://openapi.yaml` | OpenAPI 3.1 specification |
56
+ | `valets://decisions.json` | Data model decisions metadata |
57
+
58
+ ## Configuration
59
+
60
+ | Variable | Default | Description |
61
+ |----------|---------|-------------|
62
+ | `VALETS_SCHEMA_URL` | _(unset)_ | Base URL of a deployed Valets Docusaurus site. When set, the server fetches live data from this URL and falls back to bundled data on failure. |
63
+ | `VALETS_CACHE_TTL` | `300000` | Cache TTL in milliseconds for remotely fetched data (default: 5 minutes). |
64
+
65
+ When `VALETS_SCHEMA_URL` is not set, the server uses the bundled schema snapshot included in the package.
@@ -0,0 +1,48 @@
1
+ ---
2
+ title: "Firestore Paths"
3
+ sidebar_label: "Firestore Paths"
4
+ sidebar_position: 1
5
+ ---
6
+
7
+ # Firestore Collection Paths
8
+
9
+ All collections are scoped under a company document.
10
+
11
+ ```
12
+ companies/{companyId}/
13
+ ├── orders/{orderId}
14
+ ├── customers/{customerId}
15
+ ├── bookings/{bookingId}
16
+ │ └── sessions/{sessionId}
17
+ ├── events/{eventId}
18
+ │ └── tickets/{ticketId}
19
+ ├── sales/{saleId}
20
+ ├── purchases/{purchaseId}
21
+ ├── customerPayments/{paymentId}
22
+ ├── loyaltyTransactions/{transactionId}
23
+ └── loyaltyConfig (singleton document)
24
+ ```
25
+
26
+ ## Path conventions
27
+
28
+ - All paths are **tenant-scoped** under `companies/{companyId}/`
29
+ - Sub-collections (sessions, tickets) are nested under their parent
30
+ - `loyaltyConfig` is a singleton document, not a collection
31
+ - Document IDs are auto-generated Firestore IDs unless specified
32
+
33
+ ## Security rules pattern
34
+
35
+ ```
36
+ rules_version = '2';
37
+ service cloud.firestore {
38
+ match /databases/{database}/documents {
39
+ match /companies/{companyId}/{document=**} {
40
+ // All access requires authenticated user with matching companyId
41
+ allow read, write: if request.auth != null
42
+ && request.auth.token.companyId == companyId;
43
+ }
44
+ }
45
+ }
46
+ ```
47
+
48
+ > See the Decision Workbook (section 16) for the full path rationale and access patterns.
@@ -0,0 +1,56 @@
1
+ ---
2
+ title: "Migration Inventory"
3
+ sidebar_label: "Migration Inventory"
4
+ sidebar_position: 2
5
+ ---
6
+
7
+ # Migration Inventory
8
+
9
+ > Concrete data migrations. All Firestore paths are under `companies/\{companyId\}/`.
10
+
11
+ ## Wave 1 — Foundation (Data Migrations)
12
+
13
+ | ID | Migration | Collection | Decision | Description |
14
+ |---|---|---|---|---|
15
+ | **MIG-01** | Timestamp field casing | `orders` | `D04` | Rename processingOn → PROCESSING_ON, completedOn → COMPLETED_ON, cancelledOn → CANCELLED_ON, etc. |
16
+ | **MIG-02** | Payment method normalization | `purchases` | `D02` | In payments[] array: CARD → CREDIT_CARD, OM → ORANGE_MONEY, MTN → MTN_MONEY, MOOV → MOOV_MONEY |
17
+ | **MIG-03** | PaymentStatus consolidation | `orders, purchases, bookings` | `D01` | UNPAID → PENDING, PARTIAL → PARTIALLY_PAID (Dashboard's conflicting enum). Bookings also carry payment status. |
18
+ | **MIG-04** | Purchases path consolidation | `customers/*/purchases → purchases` | `D06` | Move customer-scoped purchase docs to company-wide path. Deduplicate. Rewrite references. See IG-5 (§15) for acceptance criteria. |
19
+ | **MIG-05** | Loyalty transaction type normalization | `loyaltyTransactions` | `D07` | earn/earned → EARNED, redeem/redeemed → REDEEMED, adjust/adjusted → ADJUSTED, expire/expired → EXPIRED, bonus → BONUS, refund → REFUND |
20
+ | **MIG-06** | Loyalty config field renaming | `loyaltySettings/config` | `D21` | pointsPerCurrencyUnit → pointsPerCurrency, pointsExpiryMonths → pointsExpirationDays (convert months×30) |
21
+ | **MIG-07** | Booking add-on ID normalization | `bookings (nested slots)` | `D10` | Numeric IDs ('1', '2') → descriptive ('recording', 'photo'). Additive with legacy compat. |
22
+ | **MIG-08** | Booking price field renaming | `bookings (nested slots)` | `D11` | standardPrice → price, fullPrice → notMainPurposePrice |
23
+ | **MIG-09** | Event status casing | `events` | `D32` | draft → DRAFT, active → ACTIVE, cancelled → CANCELLED, completed → COMPLETED |
24
+ | **MIG-10** | Ticket status casing | `events/*/tickets` | `D32` | valid → VALID, used → USED, cancelled → CANCELLED |
25
+ | **MIG-11** | Order status decomposition | `orders` | `D34` | Split extended statuses into orderStatus + paymentStatus + fulfillmentStatus + returnStatus per §10 mapping table |
26
+ | **MIG-12** | Customer points source of truth | `customers, loyalty/status` | `D08` | Verify loyalty/status populated for all customers; flag discrepancies with denormalized customer doc fields |
27
+
28
+ ## Wave 1 — Foundation (Code-Only)
29
+
30
+ | ID | Change | Platform | Decision | Description |
31
+ |---|---|---|---|---|
32
+ | **COD-01** | Stop writing total | Mobile | `D05` | Mobile stops writing total field on purchases. total becomes read-only getter. |
33
+ | **COD-02** | SalesService alias | All | `D06` | Code-level alias wrapping purchases collection. No Firestore rename. |
34
+ | **COD-03** | Add missing BookingStatus values | Mobile | `—` | Add CANCELLATION_REQUESTED, COMPLETED_MIXED to Mobile enum |
35
+ | **COD-04** | Add SessionStatus awareness | Mobile, Firebase | `D19` | Mobile reads and displays SessionStatus. Read-only first. |
36
+
37
+ ## Wave 5 — Cleanup
38
+
39
+ | ID | Migration | Collection | Decision | Description |
40
+ |---|---|---|---|---|
41
+ | **MIG-13** | Legacy ticket format migration | `events/*/tickets` | `D31` | Migrate userName/userEmail/userPhone/ticketStatus variants to canonical field names. Run only after audit confirms scope. |
42
+ | **MIG-14** | Remove fallback read paths | `All platforms` | `Various` | Remove old field name readers after fallback removal gate is met (see §1 Transition Protocol). |
43
+
44
+ ---
45
+
46
+ ### Migration Dependencies
47
+
48
+ ```
49
+ MIG-04 (purchases path) → must complete before MIG-02 (payment method normalization)
50
+ MIG-03 (PaymentStatus) → must complete before MIG-11 (order decomposition)
51
+ MIG-11 (order decomposition) → depends on MIG-01 (timestamp casing)
52
+ MIG-05 + MIG-06 (loyalty) → can run independently
53
+ MIG-09 + MIG-10 (event/ticket casing) → can run independently
54
+ MIG-12 (customer points) → should run after MIG-05 (loyalty types)
55
+ ```
56
+
@@ -0,0 +1,78 @@
1
+ ---
2
+ title: "Decision Summary"
3
+ sidebar_label: "Decision Summary"
4
+ sidebar_position: 1
5
+ ---
6
+
7
+ # Decision Summary
8
+
9
+ > **Status**: 37 of 38 decisions locked; 1 deferred.
10
+ > Source: `DATA_MODEL_DECISION_WORKBOOK.md`.
11
+
12
+ ## All Decisions
13
+
14
+ | ID | Title | Status | Wave | Schema |
15
+ |---|---|---|---|---|
16
+ | **D00** | Shared schema package approach | 🔒 Locked | 1 | — |
17
+ | **D01** | Canonical PaymentStatus enum set | 🔒 Locked | 1 | `payment-status` |
18
+ | **D02** | Canonical PaymentMethod enum set | 🔒 Locked | 1 | `payment-method` |
19
+ | **D03** | CONFIRMED vs PROCESSING for order lifecycle | 🔒 Locked | 1 | `order-status` |
20
+ | **D04** | Canonical timestamp/status field casing | 🔒 Locked | 1 | `order` |
21
+ | **D05** | Canonical purchase amount field | 🔒 Locked | 1 | `sale` |
22
+ | **D06** | Canonical sales collection path | 🔒 Locked | 1 | `sale` |
23
+ | **D07** | Canonical loyalty transaction type values | 🔒 Locked | 1 | `loyalty-transaction-type` |
24
+ | **D08** | Canonical location for customer points | 🔒 Locked | 1 | `customer`, `loyalty-status` |
25
+ | **D09** | Canonical startDate/endDate type for bookings | 🔒 Locked | 1 | `booking` |
26
+ | **D10** | Canonical booking add-on IDs | 🔒 Locked | 1 | `booking` |
27
+ | **D11** | Canonical price field names in booking slots | 🔒 Locked | 1 | `booking` |
28
+ | **D12** | Payments canonical location model | 🔒 Locked | 2 | `order`, `sale` |
29
+ | **D13** | Mobile order status support breadth | 🔒 Locked | 2 | `order-status` |
30
+ | **D14** | Keep Mobile order override fields (calculatedTotal, manualTotal, totalOverridden) | 🔒 Locked | 2 | `order` |
31
+ | **D15** | Should SaleMargin be server-side | 🔒 Locked | 3 | `sale` |
32
+ | **D16** | Mobile CRM scope | 🔒 Locked | 2 | `customer` |
33
+ | **D17** | Mobile CRDT write behavior for bookings | 🔒 Locked | 2 | `booking` |
34
+ | **D18** | Firebase BookingVersion ownership | 🔒 Locked | 3 | `booking`, `booking-version` |
35
+ | **D19** | Mobile session status transitions | 🔒 Locked | 2 | `session-status` |
36
+ | **D20** | createdFromBackend behavior for dashboard-created bookings | 🔒 Locked | 3 | `booking` |
37
+ | **D21** | Loyalty config canonical field names | 🔒 Locked | 2 | `loyalty-config` |
38
+ | **D22** | Mobile customer payment feature scope | 🔒 Locked | 4 | `customer-payment` |
39
+ | **D23** | Firebase loyalty automation | 🔒 Locked | 3 | `loyalty-transaction` |
40
+ | **D24** | Customer reference naming standardization | 🔒 Locked | 2 | `customer`, `booking`, `order` |
41
+ | **D25** | communicationEntries storage shape | 🔒 Locked | 1 | `customer` |
42
+ | **D26** | Event/Ticket support in dashboard | 🔒 Locked | 4 | `event` |
43
+ | **D27** | Dashboard ticket scanning | 🔒 Locked | 4 | `ticket` |
44
+ | **D28** | Firebase Event/Ticket triggers | 🔒 Locked | 4 | `event`, `ticket` |
45
+ | **D29** | Ticket-to-customer linkage model | 🔒 Locked | 2 | `ticket` |
46
+ | **D30** | Ticket tiers/types support timing | 🔒 Locked | — | `ticket` |
47
+ | **D31** | LegacyTicketMapper deprecation gate | 🔒 Locked | 5 | `ticket` |
48
+ | **D32** | Event/Ticket status casing | 🔒 Locked | 1 | `event-status`, `ticket-status` |
49
+ | **D33** | Deterministic IV in QR encryption | ⏸ Deferred | — | — |
50
+ | **D34** | Order status decomposition into orthogonal fields | 🔒 Locked | 1 | `order`, `order-status`, `payment-status`, `fulfillment-status`, `return-status` |
51
+ | **D35** | Migration framework approach | 🔒 Locked | 1 | — |
52
+ | **D36** | Firebase architectural role: relay vs enforcer | 🔒 Locked | 1 | — |
53
+ | **D37** | Execution wave plan approval | 🔒 Locked | 1 | — |
54
+
55
+ ## Implementation Guidance Gaps
56
+
57
+ > Identified implementation work items — not decisions, but concrete gaps to address per wave.
58
+
59
+ | ID | Summary | Wave | Acceptance Criteria |
60
+ |---|---|---|---|
61
+ | **IG-1** | Cross-Platform Contract Testing | 1 | Shared JSON fixtures exist for all models; read/write round-trip tests pass across all 3 platforms |
62
+ | **IG-2** | Firestore Security Rules Generation | 3 | Security rules enforce basic type checks for critical collections; generated or manually aligned with @valets/schema |
63
+ | **IG-3** | Booking Model Convergence (Mobile) | 2 | Single canonical Booking class on Mobile generated from @valets/schema; BookingData page class removed or reduced to UI-only state |
64
+ | **IG-4** | Order Payments Model Ownership | 2 | OrderPayment → PaymentTransaction field mapping documented; sync rules for Sale↔Order denormalized snapshot implemented |
65
+ | **IG-5** | Purchases Collection Path Consolidation | 1 | All purchase documents exist in single purchases/ path; customer-scoped duplicates removed; references rewritten |
66
+ | **IG-6** | Booking CRDT Interoperability | 2 | Mobile fromMap filters _deleted items; conflict resolution documented; timeline for soft-delete parity set |
67
+ | **IG-7** | Customer Payments Rollout Spec | 4 | Trusted roles defined; audit field requirements in @valets/schema; server-side validation rules deployed |
68
+ | **IG-8** | Notification Behavior Policy | 3 | createdFromBackend behavior documented and consistently applied; notification regression tests in CI |
69
+ | **IG-9** | Event/Ticket Crypto + Legacy Cutover | 5 | LegacyTicketMapper removal gate query exists; key rotation policy documented; IV migration plan ready when triggered |
70
+ | **IG-10** | LoyaltyReward / LoyaltyConfig Parity | 2 | Mobile-only loyalty fields catalogued; canonical set defined in @valets/schema; Dashboard config UI spec created |
71
+ | **IG-11** | slotKitTypes Firebase Type Parity | 2 | slotKitTypes field added to Firebase Booking type definition; validated in contract tests |
72
+ | **IG-12** | bookingId Mobile Purchase Parity | 2 | bookingId field added to Mobile Purchase model; links sales to bookings across platforms |
73
+ | **IG-13** | companyId Firebase Quote/Opportunity Parity | 2 | companyId field added to Firebase Quote and Opportunity type definitions; multi-tenant queries work |
74
+
75
+ ---
76
+
77
+ > For full rationale and context see `DATA_MODEL_DECISION_WORKBOOK.md` in the valets-data-architecture repo.
78
+
@@ -0,0 +1,26 @@
1
+ ---
2
+ title: "BookingStatus"
3
+ sidebar_label: "BookingStatus"
4
+ sidebar_position: 1
5
+ ---
6
+
7
+ # BookingStatus
8
+
9
+ | | |
10
+ | -------------- | ---------------------------- |
11
+ | **Type** | `enum (of string)` |
12
+ | **Required** | No |
13
+ | **Defined in** | #/definitions/booking-status |
14
+
15
+ **Description:** Booking lifecycle status. COMPLETED_MIXED = some sessions completed, others cancelled/no-show.
16
+
17
+ Must be one of:
18
+ * "PENDING"
19
+ * "CONFIRMED"
20
+ * "COMPLETED"
21
+ * "CANCELLED"
22
+ * "CANCELLATION_REQUESTED"
23
+ * "COMPLETED_MIXED"
24
+
25
+ ----------------------------------------------------------------------------------------------------------------------------
26
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-03-09 at 13:15:53 +0000
@@ -0,0 +1,26 @@
1
+ ---
2
+ title: "CustomerPaymentStatus"
3
+ sidebar_label: "CustomerPaymentStatus"
4
+ sidebar_position: 2
5
+ ---
6
+
7
+ # CustomerPaymentStatus
8
+
9
+ | | |
10
+ | -------------- | ------------------------------------- |
11
+ | **Type** | `enum (of string)` |
12
+ | **Required** | No |
13
+ | **Defined in** | #/definitions/customer-payment-status |
14
+
15
+ **Description:** Customer payment lifecycle status (D22). Tracks allocation progress of received payments.
16
+
17
+ Must be one of:
18
+ * "PENDING"
19
+ * "CONFIRMED"
20
+ * "PARTIALLY_APPLIED"
21
+ * "FULLY_APPLIED"
22
+ * "REFUNDED"
23
+ * "CANCELLED"
24
+
25
+ ----------------------------------------------------------------------------------------------------------------------------
26
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-03-09 at 13:15:53 +0000
@@ -0,0 +1,23 @@
1
+ ---
2
+ title: "CustomerPaymentTargetType"
3
+ sidebar_label: "CustomerPaymentTargetType"
4
+ sidebar_position: 3
5
+ ---
6
+
7
+ # CustomerPaymentTargetType
8
+
9
+ | | |
10
+ | -------------- | ------------------------------------------ |
11
+ | **Type** | `enum (of string)` |
12
+ | **Required** | No |
13
+ | **Defined in** | #/definitions/customer-payment-target-type |
14
+
15
+ **Description:** Target document type for customer payment allocation.
16
+
17
+ Must be one of:
18
+ * "BOOKING"
19
+ * "ORDER"
20
+ * "PURCHASE"
21
+
22
+ ----------------------------------------------------------------------------------------------------------------------------
23
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-03-09 at 13:15:53 +0000
@@ -0,0 +1,23 @@
1
+ ---
2
+ title: "DeliveryType"
3
+ sidebar_label: "DeliveryType"
4
+ sidebar_position: 4
5
+ ---
6
+
7
+ # DeliveryType
8
+
9
+ | | |
10
+ | -------------- | --------------------------- |
11
+ | **Type** | `enum (of string)` |
12
+ | **Required** | No |
13
+ | **Defined in** | #/definitions/delivery-type |
14
+
15
+ **Description:** 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.
16
+
17
+ Must be one of:
18
+ * "ON_SITE"
19
+ * "PICK_UP"
20
+ * "DELIVERY"
21
+
22
+ ----------------------------------------------------------------------------------------------------------------------------
23
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-03-09 at 13:15:53 +0000
@@ -0,0 +1,30 @@
1
+ ---
2
+ title: "EventStatus"
3
+ sidebar_label: "EventStatus"
4
+ sidebar_position: 5
5
+ ---
6
+
7
+ # EventStatus
8
+
9
+ | | |
10
+ | -------------- | -------------------------- |
11
+ | **Type** | `enum (of string)` |
12
+ | **Required** | No |
13
+ | **Defined in** | #/definitions/event-status |
14
+
15
+ **Description:** Ticketed event lifecycle (D32). Mobile-only today; Dashboard in Wave 4.
16
+
17
+ Must be one of:
18
+ * "DRAFT"
19
+ * "ACTIVE"
20
+ * "CANCELLED"
21
+ * "COMPLETED"
22
+
23
+ ----------------------------------------------------------------------------------------------------------------------------
24
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-03-09 at 13:15:53 +0000
25
+
26
+ ## Related Decisions
27
+
28
+ | Decision | Title |
29
+ |---|---|
30
+ | **D32** | Event/Ticket status casing |
@@ -0,0 +1,32 @@
1
+ ---
2
+ title: "FulfillmentStatus"
3
+ sidebar_label: "FulfillmentStatus"
4
+ sidebar_position: 6
5
+ ---
6
+
7
+ # FulfillmentStatus
8
+
9
+ | | |
10
+ | -------------- | -------------------------------- |
11
+ | **Type** | `enum (of string)` |
12
+ | **Required** | No |
13
+ | **Defined in** | #/definitions/fulfillment-status |
14
+
15
+ **Description:** Delivery/fulfillment lifecycle (D34). Optional — null for in-person orders.
16
+
17
+ Must be one of:
18
+ * "PREPARING"
19
+ * "PARTIALLY_SHIPPED"
20
+ * "SHIPPED"
21
+ * "IN_TRANSIT"
22
+ * "DELIVERED"
23
+ * "PICKED_UP"
24
+
25
+ ----------------------------------------------------------------------------------------------------------------------------
26
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-03-09 at 13:15:53 +0000
27
+
28
+ ## Related Decisions
29
+
30
+ | Decision | Title |
31
+ |---|---|
32
+ | **D34** | Order status decomposition into orthogonal fields |
@@ -0,0 +1,32 @@
1
+ ---
2
+ title: "LoyaltyTransactionType"
3
+ sidebar_label: "LoyaltyTransactionType"
4
+ sidebar_position: 7
5
+ ---
6
+
7
+ # LoyaltyTransactionType
8
+
9
+ | | |
10
+ | -------------- | -------------------------------------- |
11
+ | **Type** | `enum (of string)` |
12
+ | **Required** | No |
13
+ | **Defined in** | #/definitions/loyalty-transaction-type |
14
+
15
+ **Description:** Loyalty point transaction type (D07). SCREAMING_SNAKE past tense.
16
+
17
+ Must be one of:
18
+ * "EARNED"
19
+ * "REDEEMED"
20
+ * "ADJUSTED"
21
+ * "EXPIRED"
22
+ * "BONUS"
23
+ * "REFUND"
24
+
25
+ ----------------------------------------------------------------------------------------------------------------------------
26
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-03-09 at 13:15:53 +0000
27
+
28
+ ## Related Decisions
29
+
30
+ | Decision | Title |
31
+ |---|---|
32
+ | **D07** | Canonical loyalty transaction type values |
@@ -0,0 +1,65 @@
1
+ ---
2
+ title: "OrderStatus"
3
+ sidebar_label: "OrderStatus"
4
+ sidebar_position: 8
5
+ ---
6
+
7
+ # OrderStatus
8
+
9
+ | | |
10
+ | -------------- | -------------------------- |
11
+ | **Type** | `enum (of string)` |
12
+ | **Required** | No |
13
+ | **Defined in** | #/definitions/order-status |
14
+
15
+ **Description:** Core order lifecycle status (D03, D34). Universal across all business types. Replaces the Dashboard's legacy 20-value flat enum (MIG-11).
16
+
17
+ Must be one of:
18
+ * "PENDING"
19
+ * "CONFIRMED"
20
+ * "PROCESSING"
21
+ * "READY"
22
+ * "COMPLETED"
23
+ * "CANCELLED"
24
+ * "EXPIRED"
25
+
26
+ ----------------------------------------------------------------------------------------------------------------------------
27
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-03-09 at 13:15:53 +0000
28
+
29
+ ## Related Decisions
30
+
31
+ | Decision | Title |
32
+ |---|---|
33
+ | **D03** | CONFIRMED vs PROCESSING for order lifecycle |
34
+ | **D13** | Mobile order status support breadth |
35
+ | **D34** | Order status decomposition into orthogonal fields |
36
+
37
+ ## Legacy Values — Migration Guide (MIG-11)
38
+
39
+ This enum replaces the **Dashboard flat 20-value OrderStatus**. Use the table below when migrating existing Firestore documents.
40
+
41
+ > **Note:** REFUND_PROCESSING and REFUNDED map to paymentStatus, not returnStatus — an order can be refunded without a physical return.
42
+
43
+ | Legacy value | `status` | `paymentStatus` | `fulfillmentStatus` | `returnStatus` |
44
+ |---|---|---|---|---|
45
+ | `PENDING` | `PENDING` | — | — | — |
46
+ | `CONFIRMED` | `CONFIRMED` | — | — | — |
47
+ | `PROCESSING` | `PROCESSING` | — | — | — |
48
+ | `READY` | `READY` | — | — | — |
49
+ | `COMPLETED` | `COMPLETED` | — | — | — |
50
+ | `CANCELLED` | `CANCELLED` | — | — | — |
51
+ | `EXPIRED` | `EXPIRED` | — | — | — |
52
+ | `AWAITING_PAYMENT` | `PENDING` | `PENDING` | — | — |
53
+ | `SHIPPED` | `PROCESSING` | — | `SHIPPED` | — |
54
+ | `PARTIALLY_SHIPPED` | `PROCESSING` | — | `PARTIALLY_SHIPPED` | — |
55
+ | `ON_THE_WAY` | `PROCESSING` | — | `IN_TRANSIT` | — |
56
+ | `DELIVERED` | `COMPLETED` | — | `DELIVERED` | — |
57
+ | `PICKED_UP` | `COMPLETED` | — | `PICKED_UP` | — |
58
+ | `RETURN_REQUESTED` | `COMPLETED` | — | — | `RETURN_REQUESTED` |
59
+ | `RETURN_PROCESSING` | `COMPLETED` | — | — | `RETURN_PROCESSING` |
60
+ | `RETURNED` | `COMPLETED` | — | — | `RETURNED` |
61
+ | `EXCHANGE_REQUESTED` | `COMPLETED` | — | — | `EXCHANGE_REQUESTED` |
62
+ | `EXCHANGE_PROCESSING` | `COMPLETED` | — | — | `EXCHANGE_PROCESSING` |
63
+ | `EXCHANGE_COMPLETED` | `COMPLETED` | — | — | `EXCHANGE_COMPLETED` |
64
+ | `REFUND_PROCESSING` | `COMPLETED` | `REFUND_PROCESSING` | — | — |
65
+ | `REFUNDED` | `COMPLETED` | `REFUNDED` | — | — |
@@ -0,0 +1,36 @@
1
+ ---
2
+ title: "PaymentMethod"
3
+ sidebar_label: "PaymentMethod"
4
+ sidebar_position: 9
5
+ ---
6
+
7
+ # PaymentMethod
8
+
9
+ | | |
10
+ | -------------- | ---------------------------- |
11
+ | **Type** | `enum (of string)` |
12
+ | **Required** | No |
13
+ | **Defined in** | #/definitions/payment-method |
14
+
15
+ **Description:** Unified payment method set with African + global methods (D02).
16
+
17
+ Must be one of:
18
+ * "CASH"
19
+ * "CREDIT_CARD"
20
+ * "ORANGE_MONEY"
21
+ * "WAVE"
22
+ * "MTN_MONEY"
23
+ * "MOOV_MONEY"
24
+ * "BANK_TRANSFER"
25
+ * "PAYPAL"
26
+ * "STRIPE"
27
+ * "OTHER"
28
+
29
+ ----------------------------------------------------------------------------------------------------------------------------
30
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-03-09 at 13:15:53 +0000
31
+
32
+ ## Related Decisions
33
+
34
+ | Decision | Title |
35
+ |---|---|
36
+ | **D02** | Canonical PaymentMethod enum set |
@@ -0,0 +1,23 @@
1
+ ---
2
+ title: "PaymentProofStatus"
3
+ sidebar_label: "PaymentProofStatus"
4
+ sidebar_position: 10
5
+ ---
6
+
7
+ # PaymentProofStatus
8
+
9
+ | | |
10
+ | -------------- | ---------------------------------- |
11
+ | **Type** | `enum (of string)` |
12
+ | **Required** | No |
13
+ | **Defined in** | #/definitions/payment-proof-status |
14
+
15
+ **Description:** Payment proof review status. Used by Order and Booking payment proof workflows.
16
+
17
+ Must be one of:
18
+ * "PENDING"
19
+ * "APPROVED"
20
+ * "REJECTED"
21
+
22
+ ----------------------------------------------------------------------------------------------------------------------------
23
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-03-09 at 13:15:53 +0000
@@ -0,0 +1,34 @@
1
+ ---
2
+ title: "PaymentStatus"
3
+ sidebar_label: "PaymentStatus"
4
+ sidebar_position: 11
5
+ ---
6
+
7
+ # PaymentStatus
8
+
9
+ | | |
10
+ | -------------- | ---------------------------- |
11
+ | **Type** | `enum (of string)` |
12
+ | **Required** | No |
13
+ | **Defined in** | #/definitions/payment-status |
14
+
15
+ **Description:** Payment lifecycle status (D01 amended). Used by Order, Sale/Purchase, Booking.
16
+
17
+ Must be one of:
18
+ * "PENDING"
19
+ * "PAID"
20
+ * "PARTIALLY_PAID"
21
+ * "FAILED"
22
+ * "REFUND_PROCESSING"
23
+ * "REFUNDED"
24
+ * "PARTIALLY_REFUNDED"
25
+
26
+ ----------------------------------------------------------------------------------------------------------------------------
27
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-03-09 at 13:15:53 +0000
28
+
29
+ ## Related Decisions
30
+
31
+ | Decision | Title |
32
+ |---|---|
33
+ | **D01** | Canonical PaymentStatus enum set |
34
+ | **D34** | Order status decomposition into orthogonal fields |
@@ -0,0 +1,32 @@
1
+ ---
2
+ title: "ReturnStatus"
3
+ sidebar_label: "ReturnStatus"
4
+ sidebar_position: 12
5
+ ---
6
+
7
+ # ReturnStatus
8
+
9
+ | | |
10
+ | -------------- | --------------------------- |
11
+ | **Type** | `enum (of string)` |
12
+ | **Required** | No |
13
+ | **Defined in** | #/definitions/return-status |
14
+
15
+ **Description:** Post-sale return/exchange lifecycle (D34). Optional — null until return or exchange initiated.
16
+
17
+ Must be one of:
18
+ * "RETURN_REQUESTED"
19
+ * "RETURN_PROCESSING"
20
+ * "RETURNED"
21
+ * "EXCHANGE_REQUESTED"
22
+ * "EXCHANGE_PROCESSING"
23
+ * "EXCHANGE_COMPLETED"
24
+
25
+ ----------------------------------------------------------------------------------------------------------------------------
26
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-03-09 at 13:15:53 +0000
27
+
28
+ ## Related Decisions
29
+
30
+ | Decision | Title |
31
+ |---|---|
32
+ | **D34** | Order status decomposition into orthogonal fields |