@ingenx-io/valets-schema-mcp-server 0.2.6 → 0.2.8
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 +8 -5
- 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 +68 -35
- 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 +42 -18
- package/data/docs/models/whatsapp-outbound-lifecycle-event.md +2 -2
- package/data/docs/models/whatsapp-outbound-message.md +56 -32
- package/data/docs/models/whatsapp-template.md +2 -2
- package/data/static/llms.txt +110 -11
- package/data/static/openapi.yaml +444 -15
- package/data/static/schemas.json +394 -13
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "NotificationRecord"
|
|
3
3
|
sidebar_label: "NotificationRecord"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 24
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# NotificationRecord
|
|
@@ -45,20 +45,23 @@ sidebar_position: 23
|
|
|
45
45
|
- [5.1.1. to items](#recipients_to_items)
|
|
46
46
|
- [5.1.1.1. Property `email`](#recipients_to_items_email)
|
|
47
47
|
- [5.1.1.2. Property `phone`](#recipients_to_items_phone)
|
|
48
|
-
- [5.1.1.3. Property `
|
|
49
|
-
- [5.1.1.4. Property `
|
|
48
|
+
- [5.1.1.3. Property `contactE164`](#recipients_to_items_contactE164)
|
|
49
|
+
- [5.1.1.4. Property `name`](#recipients_to_items_name)
|
|
50
|
+
- [5.1.1.5. Property `role`](#recipients_to_items_role)
|
|
50
51
|
- [5.2. Property `cc`](#recipients_cc)
|
|
51
52
|
- [5.2.1. cc items](#recipients_cc_items)
|
|
52
53
|
- [5.2.1.1. Property `email`](#recipients_cc_items_email)
|
|
53
54
|
- [5.2.1.2. Property `phone`](#recipients_cc_items_phone)
|
|
54
|
-
- [5.2.1.3. Property `
|
|
55
|
-
- [5.2.1.4. Property `
|
|
55
|
+
- [5.2.1.3. Property `contactE164`](#recipients_cc_items_contactE164)
|
|
56
|
+
- [5.2.1.4. Property `name`](#recipients_cc_items_name)
|
|
57
|
+
- [5.2.1.5. Property `role`](#recipients_cc_items_role)
|
|
56
58
|
- [5.3. Property `bcc`](#recipients_bcc)
|
|
57
59
|
- [5.3.1. bcc items](#recipients_bcc_items)
|
|
58
60
|
- [5.3.1.1. Property `email`](#recipients_bcc_items_email)
|
|
59
61
|
- [5.3.1.2. Property `phone`](#recipients_bcc_items_phone)
|
|
60
|
-
- [5.3.1.3. Property `
|
|
61
|
-
- [5.3.1.4. Property `
|
|
62
|
+
- [5.3.1.3. Property `contactE164`](#recipients_bcc_items_contactE164)
|
|
63
|
+
- [5.3.1.4. Property `name`](#recipients_bcc_items_name)
|
|
64
|
+
- [5.3.1.5. Property `role`](#recipients_bcc_items_role)
|
|
62
65
|
- [6. Property `relatedEntity`](#relatedEntity)
|
|
63
66
|
- [6.1. Property `type`](#relatedEntity_type)
|
|
64
67
|
- [6.2. Property `id`](#relatedEntity_id)
|
|
@@ -211,12 +214,13 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
211
214
|
|
|
212
215
|
**Description:** A notification recipient (GH#48).
|
|
213
216
|
|
|
214
|
-
| Property
|
|
215
|
-
|
|
|
216
|
-
| - [email](#recipients_to_items_email )
|
|
217
|
-
| - [phone](#recipients_to_items_phone )
|
|
218
|
-
| - [
|
|
219
|
-
| - [
|
|
217
|
+
| Property | Pattern | Type | Deprecated | Definition | Title/Description |
|
|
218
|
+
| -------------------------------------------------- | ------- | ------ | ---------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
219
|
+
| - [email](#recipients_to_items_email ) | No | string | No | - | Recipient email address. Present for email notifications. |
|
|
220
|
+
| - [phone](#recipients_to_items_phone ) | No | string | No | - | Recipient phone number as passed by the sender (may be raw wa_id or E.164). Present for whatsapp/sms notifications. |
|
|
221
|
+
| - [contactE164](#recipients_to_items_contactE164 ) | No | string | No | - | (Read-only) E.164-normalized phone (e.g. +2250777471485). Canonical join key across WhatsApp and notification collections (#56). |
|
|
222
|
+
| - [name](#recipients_to_items_name ) | No | string | No | - | Recipient display name. |
|
|
223
|
+
| - [role](#recipients_to_items_role ) | No | string | No | - | Recipient role (e.g. organizer, customer). |
|
|
220
224
|
|
|
221
225
|
##### <a name="recipients_to_items_email"></a>5.1.1.1. Property `email`
|
|
222
226
|
|
|
@@ -234,9 +238,18 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
234
238
|
| **Type** | `string` |
|
|
235
239
|
| **Required** | No |
|
|
236
240
|
|
|
237
|
-
**Description:** Recipient phone number (E.164). Present for whatsapp/sms notifications.
|
|
241
|
+
**Description:** Recipient phone number as passed by the sender (may be raw wa_id or E.164). Present for whatsapp/sms notifications.
|
|
238
242
|
|
|
239
|
-
##### <a name="
|
|
243
|
+
##### <a name="recipients_to_items_contactE164"></a>5.1.1.3. Property `contactE164`
|
|
244
|
+
|
|
245
|
+
| | |
|
|
246
|
+
| ------------ | -------- |
|
|
247
|
+
| **Type** | `string` |
|
|
248
|
+
| **Required** | No |
|
|
249
|
+
|
|
250
|
+
**Description:** (Read-only) E.164-normalized phone (e.g. +2250777471485). Canonical join key across WhatsApp and notification collections (#56).
|
|
251
|
+
|
|
252
|
+
##### <a name="recipients_to_items_name"></a>5.1.1.4. Property `name`
|
|
240
253
|
|
|
241
254
|
| | |
|
|
242
255
|
| ------------ | -------- |
|
|
@@ -245,7 +258,7 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
245
258
|
|
|
246
259
|
**Description:** Recipient display name.
|
|
247
260
|
|
|
248
|
-
##### <a name="recipients_to_items_role"></a>5.1.1.
|
|
261
|
+
##### <a name="recipients_to_items_role"></a>5.1.1.5. Property `role`
|
|
249
262
|
|
|
250
263
|
| | |
|
|
251
264
|
| ------------ | -------- |
|
|
@@ -285,12 +298,13 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
285
298
|
|
|
286
299
|
**Description:** A notification recipient (GH#48).
|
|
287
300
|
|
|
288
|
-
| Property
|
|
289
|
-
|
|
|
290
|
-
| - [email](#recipients_cc_items_email )
|
|
291
|
-
| - [phone](#recipients_cc_items_phone )
|
|
292
|
-
| - [
|
|
293
|
-
| - [
|
|
301
|
+
| Property | Pattern | Type | Deprecated | Definition | Title/Description |
|
|
302
|
+
| -------------------------------------------------- | ------- | ------ | ---------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
303
|
+
| - [email](#recipients_cc_items_email ) | No | string | No | - | Recipient email address. Present for email notifications. |
|
|
304
|
+
| - [phone](#recipients_cc_items_phone ) | No | string | No | - | Recipient phone number as passed by the sender (may be raw wa_id or E.164). Present for whatsapp/sms notifications. |
|
|
305
|
+
| - [contactE164](#recipients_cc_items_contactE164 ) | No | string | No | - | (Read-only) E.164-normalized phone (e.g. +2250777471485). Canonical join key across WhatsApp and notification collections (#56). |
|
|
306
|
+
| - [name](#recipients_cc_items_name ) | No | string | No | - | Recipient display name. |
|
|
307
|
+
| - [role](#recipients_cc_items_role ) | No | string | No | - | Recipient role (e.g. organizer, customer). |
|
|
294
308
|
|
|
295
309
|
##### <a name="recipients_cc_items_email"></a>5.2.1.1. Property `email`
|
|
296
310
|
|
|
@@ -308,9 +322,18 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
308
322
|
| **Type** | `string` |
|
|
309
323
|
| **Required** | No |
|
|
310
324
|
|
|
311
|
-
**Description:** Recipient phone number (E.164). Present for whatsapp/sms notifications.
|
|
325
|
+
**Description:** Recipient phone number as passed by the sender (may be raw wa_id or E.164). Present for whatsapp/sms notifications.
|
|
312
326
|
|
|
313
|
-
##### <a name="
|
|
327
|
+
##### <a name="recipients_cc_items_contactE164"></a>5.2.1.3. Property `contactE164`
|
|
328
|
+
|
|
329
|
+
| | |
|
|
330
|
+
| ------------ | -------- |
|
|
331
|
+
| **Type** | `string` |
|
|
332
|
+
| **Required** | No |
|
|
333
|
+
|
|
334
|
+
**Description:** (Read-only) E.164-normalized phone (e.g. +2250777471485). Canonical join key across WhatsApp and notification collections (#56).
|
|
335
|
+
|
|
336
|
+
##### <a name="recipients_cc_items_name"></a>5.2.1.4. Property `name`
|
|
314
337
|
|
|
315
338
|
| | |
|
|
316
339
|
| ------------ | -------- |
|
|
@@ -319,7 +342,7 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
319
342
|
|
|
320
343
|
**Description:** Recipient display name.
|
|
321
344
|
|
|
322
|
-
##### <a name="recipients_cc_items_role"></a>5.2.1.
|
|
345
|
+
##### <a name="recipients_cc_items_role"></a>5.2.1.5. Property `role`
|
|
323
346
|
|
|
324
347
|
| | |
|
|
325
348
|
| ------------ | -------- |
|
|
@@ -359,12 +382,13 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
359
382
|
|
|
360
383
|
**Description:** A notification recipient (GH#48).
|
|
361
384
|
|
|
362
|
-
| Property
|
|
363
|
-
|
|
|
364
|
-
| - [email](#recipients_bcc_items_email )
|
|
365
|
-
| - [phone](#recipients_bcc_items_phone )
|
|
366
|
-
| - [
|
|
367
|
-
| - [
|
|
385
|
+
| Property | Pattern | Type | Deprecated | Definition | Title/Description |
|
|
386
|
+
| --------------------------------------------------- | ------- | ------ | ---------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
387
|
+
| - [email](#recipients_bcc_items_email ) | No | string | No | - | Recipient email address. Present for email notifications. |
|
|
388
|
+
| - [phone](#recipients_bcc_items_phone ) | No | string | No | - | Recipient phone number as passed by the sender (may be raw wa_id or E.164). Present for whatsapp/sms notifications. |
|
|
389
|
+
| - [contactE164](#recipients_bcc_items_contactE164 ) | No | string | No | - | (Read-only) E.164-normalized phone (e.g. +2250777471485). Canonical join key across WhatsApp and notification collections (#56). |
|
|
390
|
+
| - [name](#recipients_bcc_items_name ) | No | string | No | - | Recipient display name. |
|
|
391
|
+
| - [role](#recipients_bcc_items_role ) | No | string | No | - | Recipient role (e.g. organizer, customer). |
|
|
368
392
|
|
|
369
393
|
##### <a name="recipients_bcc_items_email"></a>5.3.1.1. Property `email`
|
|
370
394
|
|
|
@@ -382,9 +406,18 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
382
406
|
| **Type** | `string` |
|
|
383
407
|
| **Required** | No |
|
|
384
408
|
|
|
385
|
-
**Description:** Recipient phone number (E.164). Present for whatsapp/sms notifications.
|
|
409
|
+
**Description:** Recipient phone number as passed by the sender (may be raw wa_id or E.164). Present for whatsapp/sms notifications.
|
|
410
|
+
|
|
411
|
+
##### <a name="recipients_bcc_items_contactE164"></a>5.3.1.3. Property `contactE164`
|
|
412
|
+
|
|
413
|
+
| | |
|
|
414
|
+
| ------------ | -------- |
|
|
415
|
+
| **Type** | `string` |
|
|
416
|
+
| **Required** | No |
|
|
417
|
+
|
|
418
|
+
**Description:** (Read-only) E.164-normalized phone (e.g. +2250777471485). Canonical join key across WhatsApp and notification collections (#56).
|
|
386
419
|
|
|
387
|
-
##### <a name="recipients_bcc_items_name"></a>5.3.1.
|
|
420
|
+
##### <a name="recipients_bcc_items_name"></a>5.3.1.4. Property `name`
|
|
388
421
|
|
|
389
422
|
| | |
|
|
390
423
|
| ------------ | -------- |
|
|
@@ -393,7 +426,7 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
393
426
|
|
|
394
427
|
**Description:** Recipient display name.
|
|
395
428
|
|
|
396
|
-
##### <a name="recipients_bcc_items_role"></a>5.3.1.
|
|
429
|
+
##### <a name="recipients_bcc_items_role"></a>5.3.1.5. Property `role`
|
|
397
430
|
|
|
398
431
|
| | |
|
|
399
432
|
| ------------ | -------- |
|
|
@@ -612,7 +645,7 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
612
645
|
| **Maximum** | ≤ 9007199254740991 |
|
|
613
646
|
|
|
614
647
|
----------------------------------------------------------------------------------------------------------------------------
|
|
615
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at
|
|
648
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 14:38:10 +0000
|
|
616
649
|
|
|
617
650
|
:::warning Server-set
|
|
618
651
|
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: "OrderItem"
|
|
3
3
|
sidebar_label: "OrderItem"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 26
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# OrderItem
|
|
@@ -350,7 +350,7 @@ TBD/WIP — Originally from the archived Couchbase Lite (CBL) restaurant flow. C
|
|
|
350
350
|
| **Required** | No |
|
|
351
351
|
|
|
352
352
|
----------------------------------------------------------------------------------------------------------------------------
|
|
353
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at
|
|
353
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 14:38:10 +0000
|
|
354
354
|
|
|
355
355
|
:::warning Server-set
|
|
356
356
|
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: "Order"
|
|
3
3
|
sidebar_label: "Order"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 25
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Order
|
|
@@ -190,57 +190,57 @@ sidebar_position: 24
|
|
|
190
190
|
|
|
191
191
|
**Description:** Order model (D34). Collection: companies/\{companyId\}/orders/\{orderId\}. Status decomposed into 4 orthogonal fields per D34: status (OrderStatus), paymentStatus, fulfillmentStatus, returnStatus. deliveryType determines the fulfillment channel. MIG-11 migrates the old flat 20-value enum.
|
|
192
192
|
|
|
193
|
-
| Property | Pattern | Type | Deprecated | Definition | Title/Description
|
|
194
|
-
| -------------------------------------------------------------- | ------- | ----------------------- | ---------- | ------------------------------------ |
|
|
195
|
-
| + [id](#id ) | No | string | No | - | (Read-only) Firestore document ID. Note: some models also have uid; see ID conventions.
|
|
196
|
-
| + [uid](#uid ) | No | string | No | - | (Read-only) Entity UID. Often mirrors id.
|
|
197
|
-
| + [companyId](#companyId ) | No | string | No | - | (Immutable) FK → Company document ID. Scopes all queries.
|
|
198
|
-
| - [appId](#appId ) | No | string or null | No | - | (Immutable, Optional) FK → App document ID (D43 / ADR-003, renamed from siteId per D44). null = company-wide.
|
|
199
|
-
| + [orderNumber](#orderNumber ) | No | string | No | - | (Read-only) Server-generated order number.
|
|
200
|
-
| - [followUpUrl](#followUpUrl ) | No | string or null | No | - | Optional URL for receipt QR code / post-order follow-up. Canonical casing: followUpUrl (#6).
|
|
201
|
-
| + [status](#status ) | No | enum (of string) | No | In #/definitions/order-status | Core lifecycle status (D34, MIG-11). See OrderStatus enum for the legacy value migration mapping.
|
|
202
|
-
| - [paymentStatus](#paymentStatus ) | No | Combination | No | - | Payment lifecycle (D34). Null until payment is initiated.
|
|
203
|
-
| - [fulfillmentStatus](#fulfillmentStatus ) | No | Combination | No | - | Delivery/fulfillment lifecycle (D34).
|
|
204
|
-
| - [returnStatus](#returnStatus ) | No | Combination | No | - | Return/exchange lifecycle (D34). Null until a return or exchange is initiated.
|
|
205
|
-
| - [deliveryType](#deliveryType ) | No | Combination | No | - | Fulfillment channel for this order (ON_SITE, PICK_UP, DELIVERY).
|
|
206
|
-
| - [paymentMethod](#paymentMethod ) | No | Combination | No | - | Unified payment method set with African + global methods (D02).
|
|
207
|
-
| - [invoiceId](#invoiceId ) | No | string or null | No | - | FK → Invoice document ID.
|
|
208
|
-
| - [customerId](#customerId ) | No | string or null | No | - | FK → Customer.id (Firestore doc ID). Used to resolve customer details.
|
|
209
|
-
| - [customerName](#customerName ) | No | string or null | No | - | (Denormalized) From Customer.name at write time.
|
|
210
|
-
| - [customerEmail](#customerEmail ) | No | string or null | No | - | (Denormalized) From Customer.email at write time. Canonical field per D24.
|
|
211
|
-
| - [customerPhone](#customerPhone ) | No | string or null | No | - | (Denormalized) From Customer.phone at write time. Canonical field per D24.
|
|
212
|
-
| - [clientEmail](#clientEmail ) | No | string or null | No | - | (Denormalized) Legacy — use \`customerEmail\`. D24 standardized to customer* prefix.
|
|
213
|
-
| - [clientPhoneNumber](#clientPhoneNumber ) | No | string or null | No | - | (Denormalized) Legacy — use \`customerPhone\`. D24 standardized to customer* prefix.
|
|
214
|
-
| - [items](#items ) | No | array or null | No | - | -
|
|
215
|
-
| + [amount](#amount ) | No | number | No | - | Total order amount. Canonical field for the order total.
|
|
216
|
-
| - [amountPaid](#amountPaid ) | No | number or null | No | - | Amount of \`amount\` paid to date. Derived from payment allocations.
|
|
217
|
-
| - [total](#total ) | No | number or null | No | - | Mobile-only legacy total field. Deprecated — use \`amount\`.
|
|
218
|
-
| + [createdAt](#createdAt ) | No | object | No | In #/definitions/firestore-timestamp | (Read-only) Server-generated creation timestamp.
|
|
219
|
-
| + [orderDate](#orderDate ) | No | object | No | Same as [createdAt](#createdAt ) | Firestore Timestamp — Admin SDK form: \{ _seconds, _nanoseconds \}. See types/firestore.ts for REST API v1 and client SDK serialization notes (#10).
|
|
220
|
-
| - [PROCESSING_ON](#PROCESSING_ON ) | No | Combination | No | - | (Read-only) Timestamp when order entered PROCESSING (D04 SCREAMING_SNAKE). MIG-01 renames from camelCase.
|
|
221
|
-
| - [COMPLETED_ON](#COMPLETED_ON ) | No | Combination | No | - | (Read-only) Timestamp when order completed (D04 SCREAMING_SNAKE). MIG-01 renames from camelCase.
|
|
222
|
-
| - [CANCELLED_ON](#CANCELLED_ON ) | No | Combination | No | - | (Read-only) Timestamp when order cancelled (D04 SCREAMING_SNAKE). MIG-01 renames from camelCase.
|
|
223
|
-
| - [cancellationReason](#cancellationReason ) | No | string or null | No | - | -
|
|
224
|
-
| - [shippingCarrier](#shippingCarrier ) | No | string or null | No | - | -
|
|
225
|
-
| - [trackingNumber](#trackingNumber ) | No | string or null | No | - | -
|
|
226
|
-
| - [estimatedDeliveryDate](#estimatedDeliveryDate ) | No | Combination | No | - | Firestore Timestamp — Admin SDK form: \{ _seconds, _nanoseconds \}. See types/firestore.ts for REST API v1 and client SDK serialization notes (#10).
|
|
227
|
-
| - [shippingCost](#shippingCost ) | No | number or null | No | - | -
|
|
228
|
-
| - [paymentProofUrl](#paymentProofUrl ) | No | string or null | No | - | URL to uploaded payment proof image/document.
|
|
229
|
-
| - [paymentProofStatus](#paymentProofStatus ) | No | Combination | No | - | Payment proof review status.
|
|
230
|
-
| - [paymentProofAddedAt](#paymentProofAddedAt ) | No | Combination | No | - | (Read-only) Timestamp when proof was uploaded.
|
|
231
|
-
| - [paymentProofAddedBy](#paymentProofAddedBy ) | No | string or null | No | - | FK → User/staff UID who uploaded the payment proof.
|
|
232
|
-
| - [paymentProofReviewedAt](#paymentProofReviewedAt ) | No | Combination | No | - | (Read-only) Timestamp when proof was reviewed.
|
|
233
|
-
| - [paymentProofReviewedBy](#paymentProofReviewedBy ) | No | string or null | No | - | FK → User/staff UID who reviewed the payment proof.
|
|
234
|
-
| - [paymentProofRejectionReason](#paymentProofRejectionReason ) | No | string or null | No | - | -
|
|
235
|
-
| - [paymentStatusChangeReason](#paymentStatusChangeReason ) | No | string or null | No | - | -
|
|
236
|
-
| - [paymentStatusChangedBy](#paymentStatusChangedBy ) | No | string or null | No | - | FK → User/staff UID who changed payment status.
|
|
237
|
-
| - [paymentStatusChangedAt](#paymentStatusChangedAt ) | No | Combination | No | - | (Read-only) Timestamp of last payment status change.
|
|
238
|
-
| - [payments](#payments ) | No | array of object or null | No | - | [TBD/WIP — IG-4] Denormalized snapshots of CustomerPayments allocated to this order. Sync rules pending IG-4 resolution.
|
|
239
|
-
| - [totalOverridden](#totalOverridden ) | No | boolean or null | No | - | Mobile-only. When true, total was manually overridden by user (D14).
|
|
240
|
-
| - [notes](#notes ) | No | array of object or null | No | - | -
|
|
241
|
-
| - [additionalInfo](#additionalInfo ) | No | string or null | No | - | -
|
|
242
|
-
| - [appliedDiscountCode](#appliedDiscountCode ) | No | string or null | No | - | -
|
|
243
|
-
| - [purchaseId](#purchaseId ) | No | string or null | No | - | FK → Sale.id. Link to associated Sale document.
|
|
193
|
+
| Property | Pattern | Type | Deprecated | Definition | Title/Description |
|
|
194
|
+
| -------------------------------------------------------------- | ------- | ----------------------- | ---------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
195
|
+
| + [id](#id ) | No | string | No | - | (Read-only) Firestore document ID. Note: some models also have uid; see ID conventions. |
|
|
196
|
+
| + [uid](#uid ) | No | string | No | - | (Read-only) Entity UID. Often mirrors id. |
|
|
197
|
+
| + [companyId](#companyId ) | No | string | No | - | (Immutable) FK → Company document ID. Scopes all queries. |
|
|
198
|
+
| - [appId](#appId ) | No | string or null | No | - | (Immutable, Optional) FK → App document ID (D43 / ADR-003, renamed from siteId per D44). null = company-wide. |
|
|
199
|
+
| + [orderNumber](#orderNumber ) | No | string | No | - | (Read-only) Server-generated order number. |
|
|
200
|
+
| - [followUpUrl](#followUpUrl ) | No | string or null | No | - | Optional URL for receipt QR code / post-order follow-up. Canonical casing: followUpUrl (#6). |
|
|
201
|
+
| + [status](#status ) | No | enum (of string) | No | In #/definitions/order-status | Core lifecycle status (D34, MIG-11). See OrderStatus enum for the legacy value migration mapping. |
|
|
202
|
+
| - [paymentStatus](#paymentStatus ) | No | Combination | No | - | Payment lifecycle (D34). Null until payment is initiated. |
|
|
203
|
+
| - [fulfillmentStatus](#fulfillmentStatus ) | No | Combination | No | - | Delivery/fulfillment lifecycle (D34). |
|
|
204
|
+
| - [returnStatus](#returnStatus ) | No | Combination | No | - | Return/exchange lifecycle (D34). Null until a return or exchange is initiated. |
|
|
205
|
+
| - [deliveryType](#deliveryType ) | No | Combination | No | - | Fulfillment channel for this order (ON_SITE, PICK_UP, DELIVERY). |
|
|
206
|
+
| - [paymentMethod](#paymentMethod ) | No | Combination | 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). |
|
|
207
|
+
| - [invoiceId](#invoiceId ) | No | string or null | No | - | FK → Invoice document ID. |
|
|
208
|
+
| - [customerId](#customerId ) | No | string or null | No | - | FK → Customer.id (Firestore doc ID). Used to resolve customer details. |
|
|
209
|
+
| - [customerName](#customerName ) | No | string or null | No | - | (Denormalized) From Customer.name at write time. |
|
|
210
|
+
| - [customerEmail](#customerEmail ) | No | string or null | No | - | (Denormalized) From Customer.email at write time. Canonical field per D24. |
|
|
211
|
+
| - [customerPhone](#customerPhone ) | No | string or null | No | - | (Denormalized) From Customer.phone at write time. Canonical field per D24. |
|
|
212
|
+
| - [clientEmail](#clientEmail ) | No | string or null | No | - | (Denormalized) Legacy — use \`customerEmail\`. D24 standardized to customer* prefix. |
|
|
213
|
+
| - [clientPhoneNumber](#clientPhoneNumber ) | No | string or null | No | - | (Denormalized) Legacy — use \`customerPhone\`. D24 standardized to customer* prefix. |
|
|
214
|
+
| - [items](#items ) | No | array or null | No | - | - |
|
|
215
|
+
| + [amount](#amount ) | No | number | No | - | Total order amount. Canonical field for the order total. |
|
|
216
|
+
| - [amountPaid](#amountPaid ) | No | number or null | No | - | Amount of \`amount\` paid to date. Derived from payment allocations. |
|
|
217
|
+
| - [total](#total ) | No | number or null | No | - | Mobile-only legacy total field. Deprecated — use \`amount\`. |
|
|
218
|
+
| + [createdAt](#createdAt ) | No | object | No | In #/definitions/firestore-timestamp | (Read-only) Server-generated creation timestamp. |
|
|
219
|
+
| + [orderDate](#orderDate ) | No | object | No | Same as [createdAt](#createdAt ) | Firestore Timestamp — Admin SDK form: \{ _seconds, _nanoseconds \}. See types/firestore.ts for REST API v1 and client SDK serialization notes (#10). |
|
|
220
|
+
| - [PROCESSING_ON](#PROCESSING_ON ) | No | Combination | No | - | (Read-only) Timestamp when order entered PROCESSING (D04 SCREAMING_SNAKE). MIG-01 renames from camelCase. |
|
|
221
|
+
| - [COMPLETED_ON](#COMPLETED_ON ) | No | Combination | No | - | (Read-only) Timestamp when order completed (D04 SCREAMING_SNAKE). MIG-01 renames from camelCase. |
|
|
222
|
+
| - [CANCELLED_ON](#CANCELLED_ON ) | No | Combination | No | - | (Read-only) Timestamp when order cancelled (D04 SCREAMING_SNAKE). MIG-01 renames from camelCase. |
|
|
223
|
+
| - [cancellationReason](#cancellationReason ) | No | string or null | No | - | - |
|
|
224
|
+
| - [shippingCarrier](#shippingCarrier ) | No | string or null | No | - | - |
|
|
225
|
+
| - [trackingNumber](#trackingNumber ) | No | string or null | No | - | - |
|
|
226
|
+
| - [estimatedDeliveryDate](#estimatedDeliveryDate ) | No | Combination | No | - | Firestore Timestamp — Admin SDK form: \{ _seconds, _nanoseconds \}. See types/firestore.ts for REST API v1 and client SDK serialization notes (#10). |
|
|
227
|
+
| - [shippingCost](#shippingCost ) | No | number or null | No | - | - |
|
|
228
|
+
| - [paymentProofUrl](#paymentProofUrl ) | No | string or null | No | - | URL to uploaded payment proof image/document. |
|
|
229
|
+
| - [paymentProofStatus](#paymentProofStatus ) | No | Combination | No | - | Payment proof review status. |
|
|
230
|
+
| - [paymentProofAddedAt](#paymentProofAddedAt ) | No | Combination | No | - | (Read-only) Timestamp when proof was uploaded. |
|
|
231
|
+
| - [paymentProofAddedBy](#paymentProofAddedBy ) | No | string or null | No | - | FK → User/staff UID who uploaded the payment proof. |
|
|
232
|
+
| - [paymentProofReviewedAt](#paymentProofReviewedAt ) | No | Combination | No | - | (Read-only) Timestamp when proof was reviewed. |
|
|
233
|
+
| - [paymentProofReviewedBy](#paymentProofReviewedBy ) | No | string or null | No | - | FK → User/staff UID who reviewed the payment proof. |
|
|
234
|
+
| - [paymentProofRejectionReason](#paymentProofRejectionReason ) | No | string or null | No | - | - |
|
|
235
|
+
| - [paymentStatusChangeReason](#paymentStatusChangeReason ) | No | string or null | No | - | - |
|
|
236
|
+
| - [paymentStatusChangedBy](#paymentStatusChangedBy ) | No | string or null | No | - | FK → User/staff UID who changed payment status. |
|
|
237
|
+
| - [paymentStatusChangedAt](#paymentStatusChangedAt ) | No | Combination | No | - | (Read-only) Timestamp of last payment status change. |
|
|
238
|
+
| - [payments](#payments ) | No | array of object or null | No | - | [TBD/WIP — IG-4] Denormalized snapshots of CustomerPayments allocated to this order. Sync rules pending IG-4 resolution. |
|
|
239
|
+
| - [totalOverridden](#totalOverridden ) | No | boolean or null | No | - | Mobile-only. When true, total was manually overridden by user (D14). |
|
|
240
|
+
| - [notes](#notes ) | No | array of object or null | No | - | - |
|
|
241
|
+
| - [additionalInfo](#additionalInfo ) | No | string or null | No | - | - |
|
|
242
|
+
| - [appliedDiscountCode](#appliedDiscountCode ) | No | string or null | No | - | - |
|
|
243
|
+
| - [purchaseId](#purchaseId ) | No | string or null | No | - | FK → Sale.id. Link to associated Sale document. |
|
|
244
244
|
|
|
245
245
|
## <a name="id"></a>1. Property `id`
|
|
246
246
|
|
|
@@ -533,7 +533,7 @@ Drives whether fulfillmentStatus is relevant. ON_SITE and PICK_UP orders typical
|
|
|
533
533
|
| **Required** | No |
|
|
534
534
|
| **Additional properties** | Any type allowed |
|
|
535
535
|
|
|
536
|
-
**Description:** Unified payment method set with African + global methods (D02).
|
|
536
|
+
**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).
|
|
537
537
|
|
|
538
538
|
| Any of(Option) |
|
|
539
539
|
| ----------------------------------------- |
|
|
@@ -548,7 +548,7 @@ Drives whether fulfillmentStatus is relevant. ON_SITE and PICK_UP orders typical
|
|
|
548
548
|
| **Required** | No |
|
|
549
549
|
| **Defined in** | #/definitions/payment-method |
|
|
550
550
|
|
|
551
|
-
**Description:** Unified payment method set with African + global methods (D02).
|
|
551
|
+
**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).
|
|
552
552
|
|
|
553
553
|
Must be one of:
|
|
554
554
|
* "CASH"
|
|
@@ -561,6 +561,7 @@ Must be one of:
|
|
|
561
561
|
* "PAYPAL"
|
|
562
562
|
* "STRIPE"
|
|
563
563
|
* "OTHER"
|
|
564
|
+
* "OM"
|
|
564
565
|
|
|
565
566
|
### <a name="paymentMethod_anyOf_i1"></a>12.2. Property `item 1`
|
|
566
567
|
|
|
@@ -1672,7 +1673,7 @@ Set only by the mobile app when the user manually edits the order total. Dashboa
|
|
|
1672
1673
|
**Description:** FK → Sale.id. Link to associated Sale document.
|
|
1673
1674
|
|
|
1674
1675
|
----------------------------------------------------------------------------------------------------------------------------
|
|
1675
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at
|
|
1676
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 14:38:10 +0000
|
|
1676
1677
|
|
|
1677
1678
|
## Related Decisions
|
|
1678
1679
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "OutboundPaymentAllocation"
|
|
3
3
|
sidebar_label: "OutboundPaymentAllocation"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 28
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# OutboundPaymentAllocation
|
|
@@ -188,7 +188,7 @@ Set at creation only. This field cannot be modified after the document is create
|
|
|
188
188
|
| **Required** | No |
|
|
189
189
|
|
|
190
190
|
----------------------------------------------------------------------------------------------------------------------------
|
|
191
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at
|
|
191
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 14:38:10 +0000
|
|
192
192
|
|
|
193
193
|
:::warning Server-set
|
|
194
194
|
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: "OutboundPayment"
|
|
3
3
|
sidebar_label: "OutboundPayment"
|
|
4
|
-
sidebar_position:
|
|
4
|
+
sidebar_position: 27
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# OutboundPayment
|
|
@@ -168,6 +168,7 @@ Must be one of:
|
|
|
168
168
|
* "PAYPAL"
|
|
169
169
|
* "STRIPE"
|
|
170
170
|
* "OTHER"
|
|
171
|
+
* "OM"
|
|
171
172
|
|
|
172
173
|
## <a name="reference"></a>8. Property `reference`
|
|
173
174
|
|
|
@@ -311,7 +312,7 @@ Do not include in write requests. This field is set exclusively by the server (F
|
|
|
311
312
|
| **Required** | No |
|
|
312
313
|
|
|
313
314
|
----------------------------------------------------------------------------------------------------------------------------
|
|
314
|
-
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at
|
|
315
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 14:38:10 +0000
|
|
315
316
|
|
|
316
317
|
:::warning Server-set
|
|
317
318
|
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.
|