@ingenx-io/valets-schema-mcp-server 0.2.5 → 0.2.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.
Files changed (78) hide show
  1. package/data/docs/enums/app-status.md +1 -1
  2. package/data/docs/enums/attention-status.md +1 -1
  3. package/data/docs/enums/booking-status.md +1 -1
  4. package/data/docs/enums/contract-status.md +24 -0
  5. package/data/docs/enums/customer-payment-status.md +2 -2
  6. package/data/docs/enums/customer-payment-target-type.md +2 -2
  7. package/data/docs/enums/delivery-type.md +2 -2
  8. package/data/docs/enums/deployment-link-type.md +2 -2
  9. package/data/docs/enums/event-status.md +2 -2
  10. package/data/docs/enums/fulfillment-status.md +2 -2
  11. package/data/docs/enums/loyalty-transaction-type.md +2 -2
  12. package/data/docs/enums/milestone-status.md +23 -0
  13. package/data/docs/enums/notification-channel.md +2 -2
  14. package/data/docs/enums/notification-entity-type.md +2 -2
  15. package/data/docs/enums/notification-status.md +2 -2
  16. package/data/docs/enums/order-status.md +2 -2
  17. package/data/docs/enums/outbound-message-format.md +2 -2
  18. package/data/docs/enums/outbound-message-purpose.md +2 -2
  19. package/data/docs/enums/outbound-message-status.md +2 -2
  20. package/data/docs/enums/payment-method.md +2 -2
  21. package/data/docs/enums/payment-proof-status.md +2 -2
  22. package/data/docs/enums/payment-status.md +2 -2
  23. package/data/docs/enums/pending-issue.md +2 -2
  24. package/data/docs/enums/return-status.md +2 -2
  25. package/data/docs/enums/session-status.md +2 -2
  26. package/data/docs/enums/site-status.md +2 -2
  27. package/data/docs/enums/stocktake-frequency.md +2 -2
  28. package/data/docs/enums/stocktake-item-status.md +2 -2
  29. package/data/docs/enums/stocktake-status.md +2 -2
  30. package/data/docs/enums/ticket-status.md +2 -2
  31. package/data/docs/enums/waba-label.md +3 -3
  32. package/data/docs/enums/whatsapp-button-sub-type.md +2 -2
  33. package/data/docs/enums/whatsapp-template-component.md +2 -2
  34. package/data/docs/enums/whatsapp-template-status.md +2 -2
  35. package/data/docs/index.md +11 -5
  36. package/data/docs/models/allowed-user.md +1 -1
  37. package/data/docs/models/analytics-backfill.md +1 -1
  38. package/data/docs/models/analytics-daily.md +1 -1
  39. package/data/docs/models/analytics-event.md +1 -1
  40. package/data/docs/models/analytics-hourly.md +1 -1
  41. package/data/docs/models/app-payment.md +1 -1
  42. package/data/docs/models/app.md +45 -21
  43. package/data/docs/models/booking-version.md +1 -1
  44. package/data/docs/models/booking.md +1 -1
  45. package/data/docs/models/contract.md +454 -0
  46. package/data/docs/models/customer-payment-allocation.md +2 -2
  47. package/data/docs/models/customer-payment.md +2 -2
  48. package/data/docs/models/customer.md +2 -2
  49. package/data/docs/models/event.md +2 -2
  50. package/data/docs/models/loyalty-config.md +2 -2
  51. package/data/docs/models/loyalty-reward.md +2 -2
  52. package/data/docs/models/loyalty-status.md +2 -2
  53. package/data/docs/models/loyalty-transaction.md +2 -2
  54. package/data/docs/models/magic-link-request.md +2 -2
  55. package/data/docs/models/metrics-current.md +2 -2
  56. package/data/docs/models/metrics-daily.md +2 -2
  57. package/data/docs/models/metrics-monthly.md +2 -2
  58. package/data/docs/models/notification-record.md +2 -2
  59. package/data/docs/models/order-item.md +2 -2
  60. package/data/docs/models/order.md +238 -218
  61. package/data/docs/models/outbound-payment-allocation.md +195 -0
  62. package/data/docs/models/outbound-payment.md +318 -0
  63. package/data/docs/models/payment-webhook-endpoint.md +191 -0
  64. package/data/docs/models/sale.md +2 -2
  65. package/data/docs/models/site-payment.md +2 -2
  66. package/data/docs/models/site.md +2 -2
  67. package/data/docs/models/stocktake-item.md +2 -2
  68. package/data/docs/models/stocktake.md +2 -2
  69. package/data/docs/models/ticket.md +2 -2
  70. package/data/docs/models/user.md +2 -2
  71. package/data/docs/models/whatsapp-inbound-message.md +6 -2
  72. package/data/docs/models/whatsapp-outbound-lifecycle-event.md +2 -2
  73. package/data/docs/models/whatsapp-outbound-message.md +39 -23
  74. package/data/docs/models/whatsapp-template.md +6 -2
  75. package/data/static/llms.txt +145 -5
  76. package/data/static/openapi.yaml +456 -14
  77. package/data/static/schemas.json +477 -9
  78. package/package.json +1 -1
@@ -22,6 +22,10 @@ Values: ACTIVE, STALE, ON_HOLD, ESCALATED
22
22
  Booking lifecycle status. COMPLETED_MIXED = some sessions completed, others cancelled/no-show.
23
23
  Values: PENDING, CONFIRMED, COMPLETED, CANCELLED, CANCELLATION_REQUESTED, COMPLETED_MIXED
24
24
 
25
+ ### ContractStatus
26
+ Lifecycle status of a Contract. DRAFT = not yet signed. ACTIVE = in force. COMPLETED = all milestones paid and obligations met. TERMINATED = ended early by either party.
27
+ Values: DRAFT, ACTIVE, COMPLETED, TERMINATED
28
+
25
29
  ### CustomerPaymentStatus
26
30
  Customer payment lifecycle status (D22). Tracks allocation progress of received payments.
27
31
  Values: PENDING, CONFIRMED, PARTIALLY_APPLIED, FULLY_APPLIED, REFUNDED, CANCELLED
@@ -50,6 +54,10 @@ Values: PREPARING, PARTIALLY_SHIPPED, SHIPPED, IN_TRANSIT, DELIVERED, PICKED_UP
50
54
  Loyalty point transaction type (D07). SCREAMING_SNAKE past tense.
51
55
  Values: EARNED, REDEEMED, ADJUSTED, EXPIRED, BONUS, REFUND
52
56
 
57
+ ### MilestoneStatus
58
+ Status of a ContractMilestone (#17). PENDING = created, not yet invoiced. INVOICED = invoice issued, awaiting payment. PAID = payment received.
59
+ Values: PENDING, INVOICED, PAID
60
+
53
61
  ### NotificationChannel
54
62
  Delivery channel of a NotificationRecord (GH#48).
55
63
  Values: email, whatsapp, sms, push
@@ -123,7 +131,7 @@ Event ticket status (D32). VALID = active and unused.
123
131
  Values: VALID, USED, CANCELLED
124
132
 
125
133
  ### WabaLabel
126
- Human-readable WABA label identifying which Meta business number received the message (GH#36).
134
+ WABA label identifying which Meta Business Account sent/received the message. cmz = Chez Miss Zahoui sender; val = Valets sender. See WhatsApp platform constraints doc (#50).
127
135
  Values: cmz, val
128
136
 
129
137
  ### WhatsappButtonSubType
@@ -361,7 +369,7 @@ Example:
361
369
  ```
362
370
 
363
371
  ### App
364
- Fields: 14 (6 required)
372
+ Fields: 14 (5 required)
365
373
 
366
374
  | Field | Type | Required | Description |
367
375
  |-------|------|----------|-------------|
@@ -369,7 +377,7 @@ Fields: 14 (6 required)
369
377
  | companyId | string | yes | (Immutable) FK → Company document ID. Scopes all app sub-collections. |
370
378
  | name | string | yes | Human-readable app name shown in dashboards. |
371
379
  | description | ['string', 'null'] | no | Optional freeform description. |
372
- | status | AppStatus | yes | Lifecycle status (D41/D44). Clients filter by ACTIVE. |
380
+ | status | any | no | Lifecycle status (D41/D44). Optional pending backfill of pre-existing records (#26) — treat absent as ACTIVE. Clients filter by ACTIVE. |
373
381
  | deploymentLinks | array<object> | yes | Ordered list of deployment URLs (web, mobile, PWA, store links). |
374
382
  | deploymentLinks[].label | string | yes | Human-readable label shown in dashboards (e.g. "Production", "Staging"). |
375
383
  | deploymentLinks[].url | string | yes | Absolute URL or store link. |
@@ -642,6 +650,48 @@ Example:
642
650
  }
643
651
  ```
644
652
 
653
+ ### Contract
654
+ Fields: 15 (8 required)
655
+
656
+ | Field | Type | Required | Description |
657
+ |-------|------|----------|-------------|
658
+ | id | ['string', 'null'] | no | (Read-only) Firestore document ID, auto-generated. |
659
+ | companyId | string | yes | (Immutable) FK → Company document ID. |
660
+ | payeeId | string | yes | (Immutable) FK → Payee document ID. Full Payee model tracked in #20. |
661
+ | title | string | yes | Contract title or reference name shown in dashboards. |
662
+ | description | ['string', 'null'] | no | Optional freeform description of the contract scope. |
663
+ | status | ContractStatus | yes | Contract lifecycle status (#14). Query by ACTIVE — do not use an isActive boolean. |
664
+ | currency | string | yes | Currency code. Locked to XOF (#18). Multi-currency support requires a deliberate schema version bump. |
665
+ | totalAmount | number | yes | Total contract value (XOF). |
666
+ | startDate | string | yes | Contract start date (ISO 8601 YYYY-MM-DD). |
667
+ | endDate | ['string', 'null'] | no | Contract end date (ISO 8601 YYYY-MM-DD). Absent for open-ended contracts. |
668
+ | milestones | ['array', 'null'] | no | Ordered list of payment milestones. Embedded in the contract document (#17). |
669
+ | notes | ['string', 'null'] | no | Optional internal notes. |
670
+ | createdBy | string | yes | (Immutable) FK → User/staff UID who created the contract. |
671
+ | createdAt | any | no | (Read-only) Server-generated creation timestamp. |
672
+ | updatedAt | any | no | (Read-only) Server-generated update timestamp. |
673
+
674
+ Example:
675
+ ```json
676
+ {
677
+ "id": null,
678
+ "companyId": "comp_xyz789",
679
+ "payeeId": "pay_ref123",
680
+ "title": "title",
681
+ "description": null,
682
+ "status": "status",
683
+ "currency": "XOF",
684
+ "totalAmount": 45000,
685
+ "startDate": "2026-02-15",
686
+ "endDate": null,
687
+ "milestones": null,
688
+ "notes": null,
689
+ "createdBy": "staff_k0f1",
690
+ "createdAt": "createdAt",
691
+ "updatedAt": "updatedAt"
692
+ }
693
+ ```
694
+
645
695
  ### Customer
646
696
  Fields: 17 (4 required)
647
697
 
@@ -1281,7 +1331,7 @@ Example:
1281
1331
  ```
1282
1332
 
1283
1333
  ### Order
1284
- Fields: 48 (8 required)
1334
+ Fields: 49 (8 required)
1285
1335
 
1286
1336
  | Field | Type | Required | Description |
1287
1337
  |-------|------|----------|-------------|
@@ -1290,6 +1340,7 @@ Fields: 48 (8 required)
1290
1340
  | companyId | string | yes | (Immutable) FK → Company document ID. Scopes all queries. |
1291
1341
  | appId | ['string', 'null'] | no | (Immutable, Optional) FK → App document ID (D43 / ADR-003, renamed from siteId per D44). null = company-wide. |
1292
1342
  | orderNumber | string | yes | (Read-only) Server-generated order number. |
1343
+ | followUpUrl | ['string', 'null'] | no | Optional URL for receipt QR code / post-order follow-up. Canonical casing: followUpUrl (#6). |
1293
1344
  | status | OrderStatus | yes | Core lifecycle status (D34, MIG-11). See OrderStatus enum for the legacy value migration mapping. |
1294
1345
  | paymentStatus | any | no | Payment lifecycle (D34). Null until payment is initiated. |
1295
1346
  | fulfillmentStatus | any | no | Delivery/fulfillment lifecycle (D34). |
@@ -1342,6 +1393,7 @@ Example:
1342
1393
  "companyId": "comp_xyz789",
1343
1394
  "appId": null,
1344
1395
  "orderNumber": "ORD-2026-0042",
1396
+ "followUpUrl": null,
1345
1397
  "status": "status",
1346
1398
  "paymentStatus": "paymentStatus",
1347
1399
  "fulfillmentStatus": "fulfillmentStatus",
@@ -1424,6 +1476,94 @@ Example:
1424
1476
  }
1425
1477
  ```
1426
1478
 
1479
+ ### OutboundPayment
1480
+ Fields: 13 (7 required)
1481
+
1482
+ | Field | Type | Required | Description |
1483
+ |-------|------|----------|-------------|
1484
+ | id | ['string', 'null'] | no | (Read-only) Firestore document ID, auto-generated. |
1485
+ | companyId | string | yes | (Immutable) FK → Company document ID. |
1486
+ | payeeId | string | yes | (Immutable) FK → Payee document ID. Full Payee model tracked in #20. |
1487
+ | contractId | ['string', 'null'] | no | (Immutable, Optional) FK → Contract document ID. Absent for ad-hoc payments outside a formal contract. |
1488
+ | amount | number | yes | Amount paid (XOF). |
1489
+ | currency | string | yes | Currency code. Locked to XOF — consistent with Contract and CustomerPayment. |
1490
+ | method | PaymentMethod | yes | Payment method used (e.g. BANK_TRANSFER, MOBILE_MONEY, CHECK). |
1491
+ | reference | ['string', 'null'] | no | Optional payment reference — bank transaction number, check number, Wave ref, etc. |
1492
+ | paidAt | FirestoreTimestamp | yes | When the payment was made. |
1493
+ | notes | ['string', 'null'] | no | Optional internal notes. |
1494
+ | createdBy | string | yes | (Immutable) FK → User/staff UID who recorded the payment. |
1495
+ | createdAt | any | no | (Read-only) Server-generated creation timestamp. |
1496
+ | updatedAt | any | no | (Read-only) Server-generated update timestamp. |
1497
+
1498
+ Example:
1499
+ ```json
1500
+ {
1501
+ "id": null,
1502
+ "companyId": "comp_xyz789",
1503
+ "payeeId": "pay_ref123",
1504
+ "contractId": null,
1505
+ "amount": 45000,
1506
+ "currency": "XOF",
1507
+ "method": "method",
1508
+ "reference": null,
1509
+ "paidAt": "pai_ref123",
1510
+ "notes": null,
1511
+ "createdBy": "staff_k0f1",
1512
+ "createdAt": "createdAt",
1513
+ "updatedAt": "updatedAt"
1514
+ }
1515
+ ```
1516
+
1517
+ ### OutboundPaymentAllocation
1518
+ Fields: 7 (4 required)
1519
+
1520
+ | Field | Type | Required | Description |
1521
+ |-------|------|----------|-------------|
1522
+ | id | ['string', 'null'] | no | (Read-only) Firestore document ID, auto-generated. |
1523
+ | outboundPaymentId | string | yes | (Immutable) FK → OutboundPayment document ID (parent). |
1524
+ | expenseId | string | yes | (Immutable) FK → Expense document ID. Full Expense model tracked in #20. |
1525
+ | companyId | string | yes | (Immutable) FK → Company document ID. Denormalized for collection-group queries. |
1526
+ | amount | number | yes | Amount of this payment allocated to the referenced expense (XOF). |
1527
+ | notes | ['string', 'null'] | no | Optional notes about this allocation. |
1528
+ | allocatedAt | any | no | (Read-only) When this allocation was recorded. |
1529
+
1530
+ Example:
1531
+ ```json
1532
+ {
1533
+ "id": null,
1534
+ "outboundPaymentId": "out_ref123",
1535
+ "expenseId": "exp_ref123",
1536
+ "companyId": "comp_xyz789",
1537
+ "amount": 45000,
1538
+ "notes": null,
1539
+ "allocatedAt": "allocatedAt"
1540
+ }
1541
+ ```
1542
+
1543
+ ### PaymentWebhookEndpoint
1544
+ Fields: 6 (5 required)
1545
+
1546
+ | Field | Type | Required | Description |
1547
+ |-------|------|----------|-------------|
1548
+ | token | string | yes | (Immutable) base64url-encoded 24-byte random token. Also the Firestore document ID and the URL path segment. |
1549
+ | company | string | yes | (Immutable) Company slug (e.g. gerko_studios). Identifies the tenant that owns this endpoint. |
1550
+ | provider | enum(2) | yes | (Immutable) Payment provider whose webhooks this endpoint accepts. |
1551
+ | secret | string | yes | Webhook signing secret for HMAC verification. Backend-only — never returned to dashboard or mobile clients. |
1552
+ | active | boolean | yes | Whether this endpoint is currently active. Inactive endpoints reject incoming webhooks. |
1553
+ | createdAt | any | no | (Read-only) When this endpoint was provisioned. |
1554
+
1555
+ Example:
1556
+ ```json
1557
+ {
1558
+ "token": "token",
1559
+ "company": "company",
1560
+ "provider": "wave",
1561
+ "secret": "secret",
1562
+ "active": true,
1563
+ "createdAt": "createdAt"
1564
+ }
1565
+ ```
1566
+
1427
1567
  ### Sale
1428
1568
  Fields: 12 (1 required)
1429
1569
 
@@ -1792,7 +1932,7 @@ Fields: 18 (7 required)
1792
1932
  | Field | Type | Required | Description |
1793
1933
  |-------|------|----------|-------------|
1794
1934
  | id | ['string', 'null'] | no | (Read-only) Firestore document ID — auto-generated at enqueue time. |
1795
- | to | string | yes | (Immutable) Recipient phone number in E.164 format. Must match the inbound `from` for the same conversation. |
1935
+ | to | string | yes | (Immutable) Recipient Meta wa_id digits only, no leading + (e.g. 22577471485). Equal to the inbound `from` for the same conversation. NOT literal E.164; see x-note (#54). |
1796
1936
  | waba | WabaLabel | yes | (Immutable) WABA that will send the message. Mirrors inbound `waba`. |
1797
1937
  | wabaId | string | yes | (Immutable) Meta WABA ID. Mirrors inbound `wabaId`. |
1798
1938
  | kind | OutboundMessageFormat | yes | (Immutable) Message format: `text` or `template`. Set `text` xor `template` to match. |