@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
package/data/docs/models/site.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Site"
|
|
3
3
|
sidebar_label: "Site"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 32
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Site
|
|
@@ -546,7 +546,7 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
546
546
|
**Description:** Timestamp of the most recent analytics event seen for this site.
|
|
547
547
|
|
|
548
548
|
----------------------------------------------------------------------------------------------------------------------------
|
|
549
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
549
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
550
550
|
|
|
551
551
|
:::warning Server-set
|
|
552
552
|
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.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "StocktakeItem"
|
|
3
3
|
sidebar_label: "StocktakeItem"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 35
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# StocktakeItem
|
|
@@ -497,4 +497,4 @@ Read-time hint snapshot of the verifier's display name (GH#29 §3 / Q10).
|
|
|
497
497
|
| **Required** | No |
|
|
498
498
|
|
|
499
499
|
----------------------------------------------------------------------------------------------------------------------------
|
|
500
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
500
|
+
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: "Stocktake"
|
|
3
3
|
sidebar_label: "Stocktake"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 34
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Stocktake
|
|
@@ -642,7 +642,7 @@ Read-time hint snapshot of the completer's display name (GH#29 §3 / Q10).
|
|
|
642
642
|
| **Required** | No |
|
|
643
643
|
|
|
644
644
|
----------------------------------------------------------------------------------------------------------------------------
|
|
645
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
645
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
646
646
|
|
|
647
647
|
:::warning Server-set
|
|
648
648
|
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.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Ticket"
|
|
3
3
|
sidebar_label: "Ticket"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 36
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Ticket
|
|
@@ -388,7 +388,7 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
388
388
|
**Description:** (Immutable) FK → User/staff UID who created this ticket.
|
|
389
389
|
|
|
390
390
|
----------------------------------------------------------------------------------------------------------------------------
|
|
391
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
391
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
392
392
|
|
|
393
393
|
:::info Immutable
|
|
394
394
|
Set at creation only. This field cannot be modified after the document is created. Include it in CREATE payloads; omit it (or leave unchanged) in UPDATE payloads.
|
package/data/docs/models/user.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "User"
|
|
3
3
|
sidebar_label: "User"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 37
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# User
|
|
@@ -242,7 +242,7 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
242
242
|
| **Required** | No |
|
|
243
243
|
|
|
244
244
|
----------------------------------------------------------------------------------------------------------------------------
|
|
245
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
245
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
246
246
|
|
|
247
247
|
:::warning Server-set
|
|
248
248
|
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.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "WhatsappInboundMessage"
|
|
3
3
|
sidebar_label: "WhatsappInboundMessage"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 38
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# WhatsappInboundMessage
|
|
@@ -370,4 +370,4 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
370
370
|
Specific value: `true`
|
|
371
371
|
|
|
372
372
|
----------------------------------------------------------------------------------------------------------------------------
|
|
373
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
373
|
+
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: "WhatsappOutboundLifecycleEvent"
|
|
3
3
|
sidebar_label: "WhatsappOutboundLifecycleEvent"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 39
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# WhatsappOutboundLifecycleEvent
|
|
@@ -303,7 +303,7 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
303
303
|
**Description:** (Read-only) Raw Meta error object(s).
|
|
304
304
|
|
|
305
305
|
----------------------------------------------------------------------------------------------------------------------------
|
|
306
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
306
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
307
307
|
|
|
308
308
|
:::warning Server-set
|
|
309
309
|
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.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "WhatsappOutboundMessage"
|
|
3
3
|
sidebar_label: "WhatsappOutboundMessage"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 40
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# WhatsappOutboundMessage
|
|
@@ -598,7 +598,7 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
598
598
|
| **Required** | No |
|
|
599
599
|
|
|
600
600
|
----------------------------------------------------------------------------------------------------------------------------
|
|
601
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
601
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
602
602
|
|
|
603
603
|
:::warning Server-set
|
|
604
604
|
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.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "WhatsappTemplate"
|
|
3
3
|
sidebar_label: "WhatsappTemplate"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 41
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# WhatsappTemplate
|
|
@@ -291,7 +291,7 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
291
291
|
**Description:** (Read-only) Rendered preview text for display in the dashboard picker.
|
|
292
292
|
|
|
293
293
|
----------------------------------------------------------------------------------------------------------------------------
|
|
294
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:
|
|
294
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:29 +0000
|
|
295
295
|
|
|
296
296
|
:::warning Server-set
|
|
297
297
|
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.
|
package/data/static/llms.txt
CHANGED
|
@@ -46,6 +46,10 @@ Values: web, mobile, pwa, app-store, play-store, other
|
|
|
46
46
|
Ticketed event lifecycle (D32). Mobile-only today; Dashboard in Wave 4.
|
|
47
47
|
Values: DRAFT, ACTIVE, CANCELLED, COMPLETED
|
|
48
48
|
|
|
49
|
+
### ExpensePaymentStatus
|
|
50
|
+
Payment status of an Expense. Stored enum — OVERDUE is not stored, it is derived at read time from dueDate (#13).
|
|
51
|
+
Values: PENDING, PARTIALLY_PAID, PAID, FAILED
|
|
52
|
+
|
|
49
53
|
### FulfillmentStatus
|
|
50
54
|
Delivery/fulfillment lifecycle (D34). Optional — null for in-person orders.
|
|
51
55
|
Values: PREPARING, PARTIALLY_SHIPPED, SHIPPED, IN_TRANSIT, DELIVERED, PICKED_UP
|
|
@@ -87,8 +91,8 @@ Outbound WhatsApp message delivery status. Lifecycle: queued → sent → delive
|
|
|
87
91
|
Values: queued, sent, delivered, read, failed
|
|
88
92
|
|
|
89
93
|
### PaymentMethod
|
|
90
|
-
Unified payment method set with African + global methods (D02).
|
|
91
|
-
Values: CASH, CREDIT_CARD, ORANGE_MONEY, WAVE, MTN_MONEY, MOOV_MONEY, BANK_TRANSFER, PAYPAL, STRIPE, OTHER
|
|
94
|
+
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).
|
|
95
|
+
Values: CASH, CREDIT_CARD, ORANGE_MONEY, WAVE, MTN_MONEY, MOOV_MONEY, BANK_TRANSFER, PAYPAL, STRIPE, OTHER, OM
|
|
92
96
|
|
|
93
97
|
### PaymentProofStatus
|
|
94
98
|
Payment proof review status. Used by Order and Booking payment proof workflows.
|
|
@@ -750,7 +754,7 @@ Fields: 17 (12 required)
|
|
|
750
754
|
| amount | number | yes | |
|
|
751
755
|
| currency | string | yes | Currency code. Locked to XOF (West African CFA franc) for now. |
|
|
752
756
|
| paymentDate | FirestoreTimestamp | yes | Firestore Timestamp — Admin SDK form: { _seconds, _nanoseconds }. See types/firestore.ts for REST API v1 and client SDK serialization notes (#10). |
|
|
753
|
-
| paymentMethod | PaymentMethod | yes | Unified payment method set with African + global methods (D02). |
|
|
757
|
+
| paymentMethod | PaymentMethod | yes | 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). |
|
|
754
758
|
| referenceNumber | string | yes | Unique payment reference (receipt number, transaction ID, etc.). |
|
|
755
759
|
| allocatedAmount | number | yes | (Read-only) Total amount allocated to bookings/orders/purchases via allocations. Server-calculated. |
|
|
756
760
|
| unappliedAmount | number | yes | (Read-only) Remaining unallocated amount (amount - allocatedAmount). Server-calculated. |
|
|
@@ -866,6 +870,52 @@ Example:
|
|
|
866
870
|
}
|
|
867
871
|
```
|
|
868
872
|
|
|
873
|
+
### Expense
|
|
874
|
+
Fields: 17 (6 required)
|
|
875
|
+
|
|
876
|
+
| Field | Type | Required | Description |
|
|
877
|
+
|-------|------|----------|-------------|
|
|
878
|
+
| id | ['string', 'null'] | no | (Read-only) Firestore document ID, auto-generated. |
|
|
879
|
+
| companyId | string | yes | (Immutable) FK → Company document ID. |
|
|
880
|
+
| title | string | yes | Human-readable expense title (e.g. "Loyer mars 2026", "Facture EAU"). |
|
|
881
|
+
| description | ['string', 'null'] | no | Optional longer description or notes. |
|
|
882
|
+
| amount | number | yes | Total expense amount (XOF). |
|
|
883
|
+
| currency | string | yes | Currency code. Locked to XOF. |
|
|
884
|
+
| dueDate | any | no | When the expense is due. Used to compute OVERDUE state at read time (not stored in paymentStatus). |
|
|
885
|
+
| paymentStatus | ExpensePaymentStatus | yes | Current payment status. OVERDUE is never stored — derive from dueDate at read time (#13). |
|
|
886
|
+
| amountDue | ['number', 'null'] | no | Amount still owed. Authoritative when no OutboundPaymentAllocation records exist for this expense. |
|
|
887
|
+
| amountPaid | ['number', 'null'] | no | Amount paid to date (simple tracking, no allocations). |
|
|
888
|
+
| allocatedAmount | ['number', 'null'] | no | (Read-only) Total amount allocated via OutboundPaymentAllocation records. Authoritative when allocations exist. |
|
|
889
|
+
| balance | ['number', 'null'] | no | (Read-only) Remaining balance: amount minus allocatedAmount. Authoritative when OutboundPaymentAllocation records exist. |
|
|
890
|
+
| paidDate | any | no | When the expense was fully settled (paymentStatus = PAID). Null otherwise. |
|
|
891
|
+
| paymentReference | ['string', 'null'] | no | Most recent payment transaction reference. Overwritten on each payment; not a full history. |
|
|
892
|
+
| createdBy | string | yes | (Immutable) FK → User/staff UID who created this expense record. |
|
|
893
|
+
| createdAt | any | no | (Read-only) Server-generated creation timestamp. |
|
|
894
|
+
| updatedAt | any | no | (Read-only) Server-generated last-update timestamp. |
|
|
895
|
+
|
|
896
|
+
Example:
|
|
897
|
+
```json
|
|
898
|
+
{
|
|
899
|
+
"id": null,
|
|
900
|
+
"companyId": "comp_xyz789",
|
|
901
|
+
"title": "title",
|
|
902
|
+
"description": null,
|
|
903
|
+
"amount": 45000,
|
|
904
|
+
"currency": "XOF",
|
|
905
|
+
"dueDate": "dueDate",
|
|
906
|
+
"paymentStatus": "paymentStatus",
|
|
907
|
+
"amountDue": null,
|
|
908
|
+
"amountPaid": null,
|
|
909
|
+
"allocatedAmount": null,
|
|
910
|
+
"balance": null,
|
|
911
|
+
"paidDate": "pai_ref123",
|
|
912
|
+
"paymentReference": null,
|
|
913
|
+
"createdBy": "staff_k0f1",
|
|
914
|
+
"createdAt": "createdAt",
|
|
915
|
+
"updatedAt": "updatedAt"
|
|
916
|
+
}
|
|
917
|
+
```
|
|
918
|
+
|
|
869
919
|
### LoyaltyConfig
|
|
870
920
|
Fields: 11 (2 required)
|
|
871
921
|
|
|
@@ -1154,7 +1204,7 @@ Fields: 31 (26 required)
|
|
|
1154
1204
|
| staleOrdersCount | ['integer', 'null'] | no | (Read-only, Optional) Orders that have been in an incomplete status beyond the stale threshold. |
|
|
1155
1205
|
| staleBookingsCount | ['integer', 'null'] | no | (Read-only, Optional) Bookings that have been in an incomplete status beyond the stale threshold. |
|
|
1156
1206
|
| onHoldOrdersCount | ['integer', 'null'] | no | (Read-only, Optional) Orders currently in an on-hold state. |
|
|
1157
|
-
| paymentsByMethod | ['object', 'null'] | no | (Read-only, Optional)
|
|
1207
|
+
| paymentsByMethod | ['object', 'null'] | no | (Read-only, Optional) Payment breakdown by method for the day. Keys are PaymentMethod values (or legacy short code OM). Value is { total: XOF amount, count: number of payments }. |
|
|
1158
1208
|
| computedForDay | string | yes | (Read-only) YYYY-MM-DD string indicating which day these metrics reflect. Used to detect day boundaries and trigger midnight resets. |
|
|
1159
1209
|
| generatedAt | FirestoreTimestamp | yes | (Read-only) Server timestamp of the last metrics write. |
|
|
1160
1210
|
| date | string | yes | (Read-only) YYYY-MM-DD document ID repeated as a field. Identifies the day this snapshot covers. |
|
|
@@ -1346,7 +1396,7 @@ Fields: 49 (8 required)
|
|
|
1346
1396
|
| fulfillmentStatus | any | no | Delivery/fulfillment lifecycle (D34). |
|
|
1347
1397
|
| returnStatus | any | no | Return/exchange lifecycle (D34). Null until a return or exchange is initiated. |
|
|
1348
1398
|
| deliveryType | any | no | Fulfillment channel for this order (ON_SITE, PICK_UP, DELIVERY). |
|
|
1349
|
-
| paymentMethod | any | no | Unified payment method set with African + global methods (D02). |
|
|
1399
|
+
| paymentMethod | any | no | 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). |
|
|
1350
1400
|
| invoiceId | ['string', 'null'] | no | FK → Invoice document ID. |
|
|
1351
1401
|
| customerId | ['string', 'null'] | no | FK → Customer.id (Firestore doc ID). Used to resolve customer details. |
|
|
1352
1402
|
| customerName | ['string', 'null'] | no | (Denormalized) From Customer.name at write time. |
|
|
@@ -1540,6 +1590,48 @@ Example:
|
|
|
1540
1590
|
}
|
|
1541
1591
|
```
|
|
1542
1592
|
|
|
1593
|
+
### PaymentWebhookDelivery
|
|
1594
|
+
Fields: 15 (13 required)
|
|
1595
|
+
|
|
1596
|
+
| Field | Type | Required | Description |
|
|
1597
|
+
|-------|------|----------|-------------|
|
|
1598
|
+
| id | ['string', 'null'] | no | (Read-only) Firestore document ID, auto-generated. |
|
|
1599
|
+
| company | string | yes | (Immutable) Company document ID (e.g. "gerko_studios"). Resolved from the matched endpoint at delivery time. |
|
|
1600
|
+
| provider | string | yes | Payment provider that sent this webhook (e.g. "jeko", "wave"). |
|
|
1601
|
+
| eventType | string | yes | Provider-defined event type. Observed: "transaction.payment". Full set per provider TBD (#42). |
|
|
1602
|
+
| status | string | yes | Processing outcome. Observed values: "success" | "error". |
|
|
1603
|
+
| verified | string | yes | Signature verification result. Observed: "verified". Other values (e.g. "unverified", "error") may exist but are unconfirmed. |
|
|
1604
|
+
| endpointStatus | string | yes | Endpoint resolution result. Observed: "matched". Other values unconfirmed (#42). |
|
|
1605
|
+
| processed | boolean | yes | Whether this delivery has been reconciled to the AppPayment ledger. |
|
|
1606
|
+
| reference | string | yes | Provider transaction ID (= payload.id). Canonical dedup key. |
|
|
1607
|
+
| amount | number | yes | Payment amount, denormalized from payload.amount.amount (XOF). |
|
|
1608
|
+
| currency | string | yes | Currency code, denormalized from payload.amount.currency (e.g. "XOF"). |
|
|
1609
|
+
| payload | object | yes | Full parsed provider payload. Shape varies by provider. Contains PII (customer phone). See x-note for retention policy status. |
|
|
1610
|
+
| rawBody | string | yes | Verbatim raw request body — used for HMAC-SHA256 verification. Contains PII. |
|
|
1611
|
+
| headers | ['object', 'null'] | no | Incoming HTTP headers. Includes provider signature header and Sentry trace. Sensitive. |
|
|
1612
|
+
| receivedAt | FirestoreTimestamp | yes | When the webhook delivery was received by the backend. |
|
|
1613
|
+
|
|
1614
|
+
Example:
|
|
1615
|
+
```json
|
|
1616
|
+
{
|
|
1617
|
+
"id": null,
|
|
1618
|
+
"company": "company",
|
|
1619
|
+
"provider": "pro_ref123",
|
|
1620
|
+
"eventType": "eventType",
|
|
1621
|
+
"status": "status",
|
|
1622
|
+
"verified": "verified",
|
|
1623
|
+
"endpointStatus": "endpointStatus",
|
|
1624
|
+
"processed": true,
|
|
1625
|
+
"reference": "reference",
|
|
1626
|
+
"amount": 45000,
|
|
1627
|
+
"currency": "XOF",
|
|
1628
|
+
"payload": {},
|
|
1629
|
+
"rawBody": "rawBody",
|
|
1630
|
+
"headers": null,
|
|
1631
|
+
"receivedAt": "receivedAt"
|
|
1632
|
+
}
|
|
1633
|
+
```
|
|
1634
|
+
|
|
1543
1635
|
### PaymentWebhookEndpoint
|
|
1544
1636
|
Fields: 6 (5 required)
|
|
1545
1637
|
|