@ingenx-io/valets-schema-mcp-server 0.2.6 → 0.2.7
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 +20 -0
- package/data/docs/enums/app-status.md +1 -1
- package/data/docs/enums/attention-status.md +1 -1
- package/data/docs/enums/booking-status.md +1 -1
- package/data/docs/enums/contract-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 +1 -1
- package/data/docs/enums/event-status.md +1 -1
- package/data/docs/enums/expense-payment-status.md +24 -0
- package/data/docs/enums/fulfillment-status.md +2 -2
- package/data/docs/enums/loyalty-transaction-type.md +2 -2
- package/data/docs/enums/milestone-status.md +2 -2
- package/data/docs/enums/notification-channel.md +2 -2
- package/data/docs/enums/notification-entity-type.md +2 -2
- package/data/docs/enums/notification-status.md +2 -2
- package/data/docs/enums/order-status.md +2 -2
- package/data/docs/enums/outbound-message-format.md +2 -2
- package/data/docs/enums/outbound-message-purpose.md +2 -2
- package/data/docs/enums/outbound-message-status.md +2 -2
- package/data/docs/enums/payment-method.md +4 -3
- 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 +2 -2
- package/data/docs/enums/stocktake-frequency.md +2 -2
- package/data/docs/enums/stocktake-item-status.md +2 -2
- package/data/docs/enums/stocktake-status.md +2 -2
- package/data/docs/enums/ticket-status.md +2 -2
- package/data/docs/enums/waba-label.md +2 -2
- package/data/docs/enums/whatsapp-button-sub-type.md +2 -2
- package/data/docs/enums/whatsapp-template-component.md +2 -2
- package/data/docs/enums/whatsapp-template-status.md +2 -2
- package/data/docs/index.md +6 -3
- package/data/docs/models/allowed-user.md +1 -1
- package/data/docs/models/analytics-backfill.md +1 -1
- package/data/docs/models/analytics-daily.md +1 -1
- package/data/docs/models/analytics-event.md +1 -1
- package/data/docs/models/analytics-hourly.md +1 -1
- package/data/docs/models/app-payment.md +1 -1
- package/data/docs/models/app.md +1 -1
- package/data/docs/models/booking-version.md +1 -1
- package/data/docs/models/booking.md +1 -1
- package/data/docs/models/contract.md +1 -1
- package/data/docs/models/customer-payment-allocation.md +1 -1
- package/data/docs/models/customer-payment.md +22 -21
- package/data/docs/models/customer.md +1 -1
- package/data/docs/models/event.md +1 -1
- package/data/docs/models/expense.md +434 -0
- 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 +22 -2
- package/data/docs/models/metrics-daily.md +92 -41
- package/data/docs/models/metrics-monthly.md +22 -2
- package/data/docs/models/notification-record.md +2 -2
- package/data/docs/models/order-item.md +2 -2
- package/data/docs/models/order.md +56 -55
- package/data/docs/models/outbound-payment-allocation.md +2 -2
- package/data/docs/models/outbound-payment.md +3 -2
- package/data/docs/models/payment-webhook-delivery.md +321 -0
- package/data/docs/models/payment-webhook-endpoint.md +2 -2
- package/data/docs/models/sale.md +2 -2
- package/data/docs/models/site-payment.md +2 -2
- package/data/docs/models/site.md +2 -2
- package/data/docs/models/stocktake-item.md +2 -2
- package/data/docs/models/stocktake.md +2 -2
- package/data/docs/models/ticket.md +2 -2
- package/data/docs/models/user.md +2 -2
- package/data/docs/models/whatsapp-inbound-message.md +2 -2
- package/data/docs/models/whatsapp-outbound-lifecycle-event.md +2 -2
- package/data/docs/models/whatsapp-outbound-message.md +2 -2
- package/data/docs/models/whatsapp-template.md +2 -2
- package/data/static/llms.txt +97 -5
- package/data/static/openapi.yaml +370 -9
- package/data/static/schemas.json +347 -9
- package/package.json +1 -1
|
@@ -94,6 +94,26 @@ Orders live at the existing company-scoped path `companies/{companyId}/orders/{o
|
|
|
94
94
|
- **Composite index:** `(companyId, appId, createdAt)` for per-site recency queries.
|
|
95
95
|
- **Physical relocation** of Order under `apps/{appId}/orders/` is explicitly deferred (ADR-004, not approved).
|
|
96
96
|
|
|
97
|
+
## Payment webhooks — top-level collections (GH#41 / GH#42)
|
|
98
|
+
|
|
99
|
+
Both collections are **top-level** (not tenant-scoped). The backend resolves an endpoint by the unguessable `token` path segment before the company is known.
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
payment_webhook_endpoints/{token} ← GH#41 — provisioned endpoint; token = base64url 24 random bytes
|
|
103
|
+
payment_webhooks/{deliveryId} ← GH#42 — received delivery log; one doc per provider callback
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
| Collection | Doc ID | Writer | Notes |
|
|
107
|
+
|---|---|---|---|
|
|
108
|
+
| `payment_webhook_endpoints` | `{token}` (base64url 24 bytes) | Superadmin / dashboard provisioning | `x-internal`. Backend caches lookups ~60s. `secret` = provider HMAC signing secret (plaintext today — KMS tracked in #42). |
|
|
109
|
+
| `payment_webhooks` | auto | Backend (webhook receiver) | `x-internal`. Raw payload + verification outcome. `processed` flips when reconciled to AppPayment ledger. PII in `payload`/`rawBody` (customer phone) — retention/TTL TBD (#42). |
|
|
110
|
+
|
|
111
|
+
**Public webhook URL pattern** (handed to operators): `https://backend.valets.app/payments/<provider>/webhook/<token>`
|
|
112
|
+
|
|
113
|
+
:::caution PII and retention (#42)
|
|
114
|
+
`payment_webhooks.payload` stores customer phone numbers (`counterpartIdentifier`, `counterpartLabel`). `payment_webhooks.rawBody` contains the same PII. `payment_webhook_endpoints.secret` is stored as plaintext. A retention/TTL policy and KMS encryption plan for secrets are not yet defined — tracked in [#42](https://github.com/IngenX-IO/valets-data-architecture/issues/42).
|
|
115
|
+
:::
|
|
116
|
+
|
|
97
117
|
## WhatsApp messaging — top-level collections (GH#36 / GH#43)
|
|
98
118
|
|
|
99
119
|
WhatsApp message collections are **top-level**, not under `companies/{companyId}/`: company context is not known at message time (a webhook arrives before the sender is resolved to a company). They form the symmetric inbound/outbound pair the dashboard renders as a conversation thread.
|
|
@@ -21,4 +21,4 @@ Must be one of:
|
|
|
21
21
|
* "ARCHIVED"
|
|
22
22
|
|
|
23
23
|
----------------------------------------------------------------------------------------------------------------------------
|
|
24
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
@@ -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-05-30 at 13:
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57: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-05-30 at 13:
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
@@ -21,4 +21,4 @@ Must be one of:
|
|
|
21
21
|
* "TERMINATED"
|
|
22
22
|
|
|
23
23
|
----------------------------------------------------------------------------------------------------------------------------
|
|
24
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57: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-05-30 at 13:
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57: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-05-30 at 13:
|
|
23
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57: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-05-30 at 13:
|
|
23
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
@@ -23,4 +23,4 @@ Must be one of:
|
|
|
23
23
|
* "other"
|
|
24
24
|
|
|
25
25
|
----------------------------------------------------------------------------------------------------------------------------
|
|
26
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
@@ -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-05-30 at 13:
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
25
25
|
|
|
26
26
|
## Related Decisions
|
|
27
27
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "ExpensePaymentStatus"
|
|
3
|
+
sidebar_label: "ExpensePaymentStatus"
|
|
4
|
+
sidebar_position: 10
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# ExpensePaymentStatus
|
|
8
|
+
|
|
9
|
+
| | |
|
|
10
|
+
| -------------- | ------------------------------------ |
|
|
11
|
+
| **Type** | `enum (of string)` |
|
|
12
|
+
| **Required** | No |
|
|
13
|
+
| **Defined in** | #/definitions/expense-payment-status |
|
|
14
|
+
|
|
15
|
+
**Description:** Payment status of an Expense. Stored enum — OVERDUE is not stored, it is derived at read time from dueDate (#13).
|
|
16
|
+
|
|
17
|
+
Must be one of:
|
|
18
|
+
* "PENDING"
|
|
19
|
+
* "PARTIALLY_PAID"
|
|
20
|
+
* "PAID"
|
|
21
|
+
* "FAILED"
|
|
22
|
+
|
|
23
|
+
----------------------------------------------------------------------------------------------------------------------------
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "FulfillmentStatus"
|
|
3
3
|
sidebar_label: "FulfillmentStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 11
|
|
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-05-30 at 13:
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57: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: 12
|
|
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-05-30 at 13:
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
27
27
|
|
|
28
28
|
## Related Decisions
|
|
29
29
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "MilestoneStatus"
|
|
3
3
|
sidebar_label: "MilestoneStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 13
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# MilestoneStatus
|
|
@@ -20,4 +20,4 @@ Must be one of:
|
|
|
20
20
|
* "PAID"
|
|
21
21
|
|
|
22
22
|
----------------------------------------------------------------------------------------------------------------------------
|
|
23
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
23
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "NotificationChannel"
|
|
3
3
|
sidebar_label: "NotificationChannel"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 14
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# NotificationChannel
|
|
@@ -21,4 +21,4 @@ Must be one of:
|
|
|
21
21
|
* "push"
|
|
22
22
|
|
|
23
23
|
----------------------------------------------------------------------------------------------------------------------------
|
|
24
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "NotificationEntityType"
|
|
3
3
|
sidebar_label: "NotificationEntityType"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 15
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# NotificationEntityType
|
|
@@ -23,4 +23,4 @@ Must be one of:
|
|
|
23
23
|
* "other"
|
|
24
24
|
|
|
25
25
|
----------------------------------------------------------------------------------------------------------------------------
|
|
26
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "NotificationStatus"
|
|
3
3
|
sidebar_label: "NotificationStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 16
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# NotificationStatus
|
|
@@ -20,4 +20,4 @@ Must be one of:
|
|
|
20
20
|
* "pending"
|
|
21
21
|
|
|
22
22
|
----------------------------------------------------------------------------------------------------------------------------
|
|
23
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
23
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "OrderStatus"
|
|
3
3
|
sidebar_label: "OrderStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 17
|
|
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-05-30 at 13:
|
|
27
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
28
28
|
|
|
29
29
|
## Related Decisions
|
|
30
30
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "OutboundMessageFormat"
|
|
3
3
|
sidebar_label: "OutboundMessageFormat"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 18
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# OutboundMessageFormat
|
|
@@ -19,4 +19,4 @@ Must be one of:
|
|
|
19
19
|
* "template"
|
|
20
20
|
|
|
21
21
|
----------------------------------------------------------------------------------------------------------------------------
|
|
22
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
22
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "OutboundMessagePurpose"
|
|
3
3
|
sidebar_label: "OutboundMessagePurpose"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 19
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# OutboundMessagePurpose
|
|
@@ -21,4 +21,4 @@ Must be one of:
|
|
|
21
21
|
* "conversational"
|
|
22
22
|
|
|
23
23
|
----------------------------------------------------------------------------------------------------------------------------
|
|
24
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "OutboundMessageStatus"
|
|
3
3
|
sidebar_label: "OutboundMessageStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 20
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# OutboundMessageStatus
|
|
@@ -22,4 +22,4 @@ Must be one of:
|
|
|
22
22
|
* "failed"
|
|
23
23
|
|
|
24
24
|
----------------------------------------------------------------------------------------------------------------------------
|
|
25
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
25
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "PaymentMethod"
|
|
3
3
|
sidebar_label: "PaymentMethod"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 21
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# PaymentMethod
|
|
@@ -12,7 +12,7 @@ sidebar_position: 20
|
|
|
12
12
|
| **Required** | No |
|
|
13
13
|
| **Defined in** | #/definitions/payment-method |
|
|
14
14
|
|
|
15
|
-
**Description:** Unified payment method set with African + global methods (D02).
|
|
15
|
+
**Description:** Unified payment method set with African + global methods (D02). Note: the metrics writer historically emits "OM" instead of "ORANGE_MONEY" as a paymentsByMethod map key — treat OM as deprecated; canonical value is ORANGE_MONEY (#21).
|
|
16
16
|
|
|
17
17
|
Must be one of:
|
|
18
18
|
* "CASH"
|
|
@@ -25,9 +25,10 @@ Must be one of:
|
|
|
25
25
|
* "PAYPAL"
|
|
26
26
|
* "STRIPE"
|
|
27
27
|
* "OTHER"
|
|
28
|
+
* "OM"
|
|
28
29
|
|
|
29
30
|
----------------------------------------------------------------------------------------------------------------------------
|
|
30
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
31
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
31
32
|
|
|
32
33
|
## Related Decisions
|
|
33
34
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "PaymentProofStatus"
|
|
3
3
|
sidebar_label: "PaymentProofStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 22
|
|
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-05-30 at 13:
|
|
23
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "PaymentStatus"
|
|
3
3
|
sidebar_label: "PaymentStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 23
|
|
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-05-30 at 13:
|
|
27
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +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: 24
|
|
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-05-30 at 13:
|
|
31
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "ReturnStatus"
|
|
3
3
|
sidebar_label: "ReturnStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 25
|
|
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-05-30 at 13:
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +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: 26
|
|
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-05-30 at 13:
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
27
27
|
|
|
28
28
|
## Related Decisions
|
|
29
29
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "SiteStatus"
|
|
3
3
|
sidebar_label: "SiteStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 27
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# SiteStatus
|
|
@@ -21,4 +21,4 @@ Must be one of:
|
|
|
21
21
|
* "ARCHIVED"
|
|
22
22
|
|
|
23
23
|
----------------------------------------------------------------------------------------------------------------------------
|
|
24
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "StocktakeFrequency"
|
|
3
3
|
sidebar_label: "StocktakeFrequency"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 28
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# StocktakeFrequency
|
|
@@ -21,4 +21,4 @@ Must be one of:
|
|
|
21
21
|
* "AD_HOC"
|
|
22
22
|
|
|
23
23
|
----------------------------------------------------------------------------------------------------------------------------
|
|
24
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "StocktakeItemStatus"
|
|
3
3
|
sidebar_label: "StocktakeItemStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 29
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# StocktakeItemStatus
|
|
@@ -21,4 +21,4 @@ Must be one of:
|
|
|
21
21
|
* "ADJUSTED"
|
|
22
22
|
|
|
23
23
|
----------------------------------------------------------------------------------------------------------------------------
|
|
24
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "StocktakeStatus"
|
|
3
3
|
sidebar_label: "StocktakeStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 30
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# StocktakeStatus
|
|
@@ -21,4 +21,4 @@ Must be one of:
|
|
|
21
21
|
* "CANCELLED"
|
|
22
22
|
|
|
23
23
|
----------------------------------------------------------------------------------------------------------------------------
|
|
24
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
24
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "TicketStatus"
|
|
3
3
|
sidebar_label: "TicketStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 31
|
|
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-05-30 at 13:
|
|
23
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
24
24
|
|
|
25
25
|
## Related Decisions
|
|
26
26
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "WabaLabel"
|
|
3
3
|
sidebar_label: "WabaLabel"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 32
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# WabaLabel
|
|
@@ -19,4 +19,4 @@ Must be one of:
|
|
|
19
19
|
* "val"
|
|
20
20
|
|
|
21
21
|
----------------------------------------------------------------------------------------------------------------------------
|
|
22
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
22
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "WhatsappButtonSubType"
|
|
3
3
|
sidebar_label: "WhatsappButtonSubType"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 33
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# WhatsappButtonSubType
|
|
@@ -19,4 +19,4 @@ Must be one of:
|
|
|
19
19
|
* "quick_reply"
|
|
20
20
|
|
|
21
21
|
----------------------------------------------------------------------------------------------------------------------------
|
|
22
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
22
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "WhatsappTemplateComponent"
|
|
3
3
|
sidebar_label: "WhatsappTemplateComponent"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 34
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# WhatsappTemplateComponent
|
|
@@ -20,4 +20,4 @@ Must be one of:
|
|
|
20
20
|
* "button"
|
|
21
21
|
|
|
22
22
|
----------------------------------------------------------------------------------------------------------------------------
|
|
23
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
23
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "WhatsappTemplateStatus"
|
|
3
3
|
sidebar_label: "WhatsappTemplateStatus"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 35
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# WhatsappTemplateStatus
|
|
@@ -23,4 +23,4 @@ Must be one of:
|
|
|
23
23
|
* "IN_APPEAL"
|
|
24
24
|
|
|
25
25
|
----------------------------------------------------------------------------------------------------------------------------
|
|
26
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
26
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
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 (35)
|
|
23
23
|
|
|
24
24
|
Status enums that drive business logic across Order, Booking, Event, and Loyalty domains:
|
|
25
25
|
|
|
@@ -34,6 +34,7 @@ Status enums that drive business logic across Order, Booking, Event, and Loyalty
|
|
|
34
34
|
| [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. |
|
|
35
35
|
| [DeploymentLinkType](enums/deployment-link-type) | 6 values | Category of a Site deployment link (D41). Used for UI icon/labelling and deep-link handling. |
|
|
36
36
|
| [EventStatus](enums/event-status) | 4 values | Ticketed event lifecycle (D32). Mobile-only today; Dashboard in Wave 4. |
|
|
37
|
+
| [ExpensePaymentStatus](enums/expense-payment-status) | 4 values | Payment status of an Expense. Stored enum — OVERDUE is not stored, it is derived at read time from dueDate (#13). |
|
|
37
38
|
| [FulfillmentStatus](enums/fulfillment-status) | 6 values | Delivery/fulfillment lifecycle (D34). Optional — null for in-person orders. |
|
|
38
39
|
| [LoyaltyTransactionType](enums/loyalty-transaction-type) | 6 values | Loyalty point transaction type (D07). SCREAMING_SNAKE past tense. |
|
|
39
40
|
| [MilestoneStatus](enums/milestone-status) | 3 values | Status of a ContractMilestone (#17). PENDING = created, not yet invoiced. INVOICED = invoice issued, awaiting payment. PAID = payment received. |
|
|
@@ -44,7 +45,7 @@ Status enums that drive business logic across Order, Booking, Event, and Loyalty
|
|
|
44
45
|
| [OutboundMessageFormat](enums/outbound-message-format) | 2 values | Outbound WhatsApp message format. `text` is a free-form body (only valid inside the 24h customer-care window); `template` is a pre-approved WhatsApp template send. The backend is the authority on which is allowed (GH#43). |
|
|
45
46
|
| [OutboundMessagePurpose](enums/outbound-message-purpose) | 4 values | Business purpose of an outbound WhatsApp message — orthogonal to its format (see OutboundMessageFormat). `otp`/`review_request`/`adhoc` are system-originated; `conversational` is a human agent reply from the dashboard inbox. Optional signal carried for analytics/triggers (GH#43; supersedes the GH#38 OutboundMessageKind). |
|
|
46
47
|
| [OutboundMessageStatus](enums/outbound-message-status) | 5 values | Outbound WhatsApp message delivery status. Lifecycle: queued → sent → delivered → read, or queued → failed. The dashboard creates the message with status `queued`; the whatsapp-server backend owns every transition after, updating in place from Meta delivery callbacks (GH#43). |
|
|
47
|
-
| [PaymentMethod](enums/payment-method) |
|
|
48
|
+
| [PaymentMethod](enums/payment-method) | 11 values | Unified payment method set with African + global methods (D02). Note: the metrics writer historically emits "OM" instead of "ORANGE_MONEY" as a paymentsByMethod map key — treat OM as deprecated; canonical value is ORANGE_MONEY (#21). |
|
|
48
49
|
| [PaymentProofStatus](enums/payment-proof-status) | 3 values | Payment proof review status. Used by Order and Booking payment proof workflows. |
|
|
49
50
|
| [PaymentStatus](enums/payment-status) | 7 values | Payment lifecycle status (D01 amended). Used by Order, Sale/Purchase, Booking. |
|
|
50
51
|
| [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. |
|
|
@@ -61,7 +62,7 @@ Status enums that drive business logic across Order, Booking, Event, and Loyalty
|
|
|
61
62
|
| [WhatsappTemplateStatus](enums/whatsapp-template-status) | 6 values | Meta review status of a WhatsApp message template, synced from the WhatsApp Business API. Only APPROVED templates can be sent. The fuller Meta status set is used deliberately (vs just APPROVED/PENDING/REJECTED) so this enum has a distinct value signature from PaymentProofStatus in the JSON-Schema $ref matcher (GH#43). |
|
|
62
63
|
|
|
63
64
|
|
|
64
|
-
### Models (
|
|
65
|
+
### Models (41)
|
|
65
66
|
|
|
66
67
|
Core Firestore document schemas:
|
|
67
68
|
|
|
@@ -81,6 +82,7 @@ Core Firestore document schemas:
|
|
|
81
82
|
| [CustomerPayment](models/customer-payment) | 17 | 12 | — |
|
|
82
83
|
| [CustomerPaymentAllocation](models/customer-payment-allocation) | 14 | 8 | — |
|
|
83
84
|
| [Event](models/event) | 15 | 9 | — |
|
|
85
|
+
| [Expense](models/expense) | 17 | 6 | — |
|
|
84
86
|
| [LoyaltyConfig](models/loyalty-config) | 11 | 2 | — |
|
|
85
87
|
| [LoyaltyReward](models/loyalty-reward) | 11 | 5 | — |
|
|
86
88
|
| [LoyaltyStatus](models/loyalty-status) | 9 | 2 | — |
|
|
@@ -94,6 +96,7 @@ Core Firestore document schemas:
|
|
|
94
96
|
| [OrderItem](models/order-item) | 12 | 3 | — |
|
|
95
97
|
| [OutboundPayment](models/outbound-payment) | 13 | 7 | — |
|
|
96
98
|
| [OutboundPaymentAllocation](models/outbound-payment-allocation) | 7 | 4 | — |
|
|
99
|
+
| [PaymentWebhookDelivery](models/payment-webhook-delivery) | 15 | 13 | — |
|
|
97
100
|
| [PaymentWebhookEndpoint](models/payment-webhook-endpoint) | 6 | 5 | — |
|
|
98
101
|
| [Sale](models/sale) | 12 | 1 | — |
|
|
99
102
|
| [Site](models/site) | 14 | 6 | — |
|
|
@@ -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-05-30 at 13:
|
|
188
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
@@ -391,7 +391,7 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
391
391
|
| **Required** | No |
|
|
392
392
|
|
|
393
393
|
----------------------------------------------------------------------------------------------------------------------------
|
|
394
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
394
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
395
395
|
|
|
396
396
|
:::warning Server-set
|
|
397
397
|
Do not include in write requests. This field is set exclusively by the server (Firestore trigger or Admin SDK). Clients that send it will have the value silently ignored or may receive a validation error.
|
|
@@ -344,7 +344,7 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
344
344
|
| **Maximum** | ≤ 9007199254740991 |
|
|
345
345
|
|
|
346
346
|
----------------------------------------------------------------------------------------------------------------------------
|
|
347
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
347
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
|
|
348
348
|
|
|
349
349
|
:::warning Server-set
|
|
350
350
|
Do not include in write requests. This field is set exclusively by the server (Firestore trigger or Admin SDK). Clients that send it will have the value silently ignored or may receive a validation error.
|