@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
@@ -0,0 +1,191 @@
1
+ ---
2
+ title: "PaymentWebhookEndpoint"
3
+ sidebar_label: "PaymentWebhookEndpoint"
4
+ sidebar_position: 28
5
+ ---
6
+
7
+ # PaymentWebhookEndpoint
8
+
9
+ <details>
10
+ <summary>Example JSON</summary>
11
+
12
+ ```json
13
+ {
14
+ "token": "token",
15
+ "company": "company",
16
+ "provider": "wave",
17
+ "secret": "secret",
18
+ "active": true,
19
+ "createdAt": "createdAt"
20
+ }
21
+ ```
22
+
23
+ </details>
24
+
25
+
26
+ - [1. Property `token`](#token)
27
+ - [2. Property `company`](#company)
28
+ - [3. Property `provider`](#provider)
29
+ - [4. Property `secret`](#secret)
30
+ - [5. Property `active`](#active)
31
+ - [6. Property `createdAt`](#createdAt)
32
+ - [6.1. Property `firestore-timestamp`](#createdAt_anyOf_i0)
33
+ - [6.1.1. Property `_seconds`](#createdAt_anyOf_i0__seconds)
34
+ - [6.1.2. Property `_nanoseconds`](#createdAt_anyOf_i0__nanoseconds)
35
+ - [6.2. Property `item 1`](#createdAt_anyOf_i1)
36
+
37
+ | | |
38
+ | ------------------------- | -------------------------------------- |
39
+ | **Type** | `object` |
40
+ | **Required** | No |
41
+ | **Additional properties** | Not allowed |
42
+ | **Defined in** | #/definitions/payment-webhook-endpoint |
43
+
44
+ **Description:** PaymentWebhookEndpoint (GH#41). Collection: payment_webhook_endpoints/\{token\}. Top-level, not tenant-scoped. Provisioned by superadmin; used by the backend to verify inbound payment webhooks from Wave and Jeko. The delivery log collection (raw webhook payloads + verification outcomes) is tracked in GH#41 — shape TBD.
45
+
46
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
47
+ | -------------------------- | ------- | ---------------- | ---------- | ---------- | ------------------------------------------------------------------------------------------------------------ |
48
+ | + [token](#token ) | No | string | No | - | (Immutable) base64url-encoded 24-byte random token. Also the Firestore document ID and the URL path segment. |
49
+ | + [company](#company ) | No | string | No | - | (Immutable) Company slug (e.g. gerko_studios). Identifies the tenant that owns this endpoint. |
50
+ | + [provider](#provider ) | No | enum (of string) | No | - | (Immutable) Payment provider whose webhooks this endpoint accepts. |
51
+ | + [secret](#secret ) | No | string | No | - | Webhook signing secret for HMAC verification. Backend-only — never returned to dashboard or mobile clients. |
52
+ | + [active](#active ) | No | boolean | No | - | Whether this endpoint is currently active. Inactive endpoints reject incoming webhooks. |
53
+ | - [createdAt](#createdAt ) | No | Combination | No | - | (Read-only) When this endpoint was provisioned. |
54
+
55
+ ## <a name="token"></a>1. Property `token`
56
+
57
+ | | |
58
+ | ------------ | -------- |
59
+ | **Type** | `string` |
60
+ | **Required** | Yes |
61
+
62
+ **Description:** (Immutable) base64url-encoded 24-byte random token. Also the Firestore document ID and the URL path segment.
63
+
64
+ :::info Immutable
65
+ 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.
66
+ :::
67
+
68
+ ## <a name="company"></a>2. Property `company`
69
+
70
+ | | |
71
+ | ------------ | -------- |
72
+ | **Type** | `string` |
73
+ | **Required** | Yes |
74
+
75
+ **Description:** (Immutable) Company slug (e.g. gerko_studios). Identifies the tenant that owns this endpoint.
76
+
77
+ :::info Immutable
78
+ 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.
79
+ :::
80
+
81
+ ## <a name="provider"></a>3. Property `provider`
82
+
83
+ | | |
84
+ | ------------ | ------------------ |
85
+ | **Type** | `enum (of string)` |
86
+ | **Required** | Yes |
87
+
88
+ **Description:** (Immutable) Payment provider whose webhooks this endpoint accepts.
89
+
90
+ Must be one of:
91
+ * "wave"
92
+ * "jeko"
93
+
94
+ :::info Immutable
95
+ 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.
96
+ :::
97
+
98
+ ## <a name="secret"></a>4. Property `secret`
99
+
100
+ | | |
101
+ | ------------ | -------- |
102
+ | **Type** | `string` |
103
+ | **Required** | Yes |
104
+
105
+ **Description:** Webhook signing secret for HMAC verification. Backend-only — never returned to dashboard or mobile clients.
106
+
107
+ :::warning Server-set
108
+ 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.
109
+ :::
110
+
111
+ :::note
112
+ Provider-specific webhook signing secret. Used to verify HMAC-SHA256 signatures on inbound payloads. Never expose to clients.
113
+ :::
114
+
115
+ ## <a name="active"></a>5. Property `active`
116
+
117
+ | | |
118
+ | ------------ | --------- |
119
+ | **Type** | `boolean` |
120
+ | **Required** | Yes |
121
+
122
+ **Description:** Whether this endpoint is currently active. Inactive endpoints reject incoming webhooks.
123
+
124
+ ## <a name="createdAt"></a>6. Property `createdAt`
125
+
126
+ | | |
127
+ | ------------------------- | ---------------- |
128
+ | **Type** | `combining` |
129
+ | **Required** | No |
130
+ | **Additional properties** | Any type allowed |
131
+
132
+ **Description:** (Read-only) When this endpoint was provisioned.
133
+
134
+ | Any of(Option) |
135
+ | ------------------------------------------ |
136
+ | [firestore-timestamp](#createdAt_anyOf_i0) |
137
+ | [item 1](#createdAt_anyOf_i1) |
138
+
139
+ ### <a name="createdAt_anyOf_i0"></a>6.1. Property `firestore-timestamp`
140
+
141
+ | | |
142
+ | ------------------------- | --------------------------------- |
143
+ | **Type** | `object` |
144
+ | **Required** | No |
145
+ | **Additional properties** | Not allowed |
146
+ | **Defined in** | #/definitions/firestore-timestamp |
147
+
148
+ **Description:** Firestore Timestamp — Admin SDK form: \{ _seconds, _nanoseconds \}. See types/firestore.ts for REST API v1 and client SDK serialization notes (#10).
149
+
150
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
151
+ | --------------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- |
152
+ | + [_seconds](#createdAt_anyOf_i0__seconds ) | No | integer | No | - | - |
153
+ | + [_nanoseconds](#createdAt_anyOf_i0__nanoseconds ) | No | integer | No | - | - |
154
+
155
+ #### <a name="createdAt_anyOf_i0__seconds"></a>6.1.1. Property `_seconds`
156
+
157
+ | | |
158
+ | ------------ | --------- |
159
+ | **Type** | `integer` |
160
+ | **Required** | Yes |
161
+
162
+ | Restrictions | |
163
+ | ------------ | ---------------------- |
164
+ | **Minimum** | &ge; -9007199254740991 |
165
+ | **Maximum** | &le; 9007199254740991 |
166
+
167
+ #### <a name="createdAt_anyOf_i0__nanoseconds"></a>6.1.2. Property `_nanoseconds`
168
+
169
+ | | |
170
+ | ------------ | --------- |
171
+ | **Type** | `integer` |
172
+ | **Required** | Yes |
173
+
174
+ | Restrictions | |
175
+ | ------------ | ---------------------- |
176
+ | **Minimum** | &ge; -9007199254740991 |
177
+ | **Maximum** | &le; 9007199254740991 |
178
+
179
+ ### <a name="createdAt_anyOf_i1"></a>6.2. Property `item 1`
180
+
181
+ | | |
182
+ | ------------ | ------ |
183
+ | **Type** | `null` |
184
+ | **Required** | No |
185
+
186
+ ----------------------------------------------------------------------------------------------------------------------------
187
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:38:45 +0000
188
+
189
+ :::warning Server-set
190
+ 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.
191
+ :::
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "Sale"
3
3
  sidebar_label: "Sale"
4
- sidebar_position: 25
4
+ sidebar_position: 29
5
5
  ---
6
6
 
7
7
  # Sale
@@ -524,7 +524,7 @@ Set at creation only. This field cannot be modified after the document is create
524
524
  | **Required** | No |
525
525
 
526
526
  ----------------------------------------------------------------------------------------------------------------------------
527
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:51 +0000
527
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:38:45 +0000
528
528
 
529
529
  :::warning Server-set
530
530
  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: "SitePayment"
3
3
  sidebar_label: "SitePayment"
4
- sidebar_position: 27
4
+ sidebar_position: 31
5
5
  ---
6
6
 
7
7
  # SitePayment
@@ -197,4 +197,4 @@ Set at creation only. This field cannot be modified after the document is create
197
197
  | **Maximum** | &le; 9007199254740991 |
198
198
 
199
199
  ----------------------------------------------------------------------------------------------------------------------------
200
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:51 +0000
200
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:38:45 +0000
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "Site"
3
3
  sidebar_label: "Site"
4
- sidebar_position: 26
4
+ sidebar_position: 30
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 12:42:51 +0000
549
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:38:45 +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: 29
4
+ sidebar_position: 33
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 12:42:51 +0000
500
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:38:45 +0000
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "Stocktake"
3
3
  sidebar_label: "Stocktake"
4
- sidebar_position: 28
4
+ sidebar_position: 32
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 12:42:51 +0000
645
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:38:45 +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: 30
4
+ sidebar_position: 34
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 12:42:51 +0000
391
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:38:45 +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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "User"
3
3
  sidebar_label: "User"
4
- sidebar_position: 31
4
+ sidebar_position: 35
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 12:42:51 +0000
245
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:38:45 +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: 32
4
+ sidebar_position: 36
5
5
  ---
6
6
 
7
7
  # WhatsappInboundMessage
@@ -122,6 +122,10 @@ Must be one of:
122
122
  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.
123
123
  :::
124
124
 
125
+ :::note
126
+ cmz = "IngenX - Chez Miss Zahoui", phone number ID 446424085225188, used for chez_miss_zahoui_* companies. val = "IngenX - Valets", phone number ID 425582173979125, used for all other companies. Templates are approved at WABA level — if cmz and val share a WABA ID, all templates are available to both. Routing logic: functions/src/orders/order.ts#isSender2Company. See messaging/whatsapp-platform-constraints (#50).
127
+ :::
128
+
125
129
  ## <a name="messageId"></a>4. Property `messageId`
126
130
 
127
131
  | | |
@@ -366,4 +370,4 @@ Do not include in write requests. This field is set exclusively by the server (F
366
370
  Specific value: `true`
367
371
 
368
372
  ----------------------------------------------------------------------------------------------------------------------------
369
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:51 +0000
373
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:38:45 +0000
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "WhatsappOutboundLifecycleEvent"
3
3
  sidebar_label: "WhatsappOutboundLifecycleEvent"
4
- sidebar_position: 33
4
+ sidebar_position: 37
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 12:42:51 +0000
306
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:38:45 +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: 34
4
+ sidebar_position: 38
5
5
  ---
6
6
 
7
7
  # WhatsappOutboundMessage
@@ -83,26 +83,26 @@ sidebar_position: 34
83
83
 
84
84
  **Description:** WhatsappOutboundMessage — Firestore-as-the-bus outbox doc (GH#43). Collection: whatsapp_outbound_messages/\{docId\}. Top-level scope; mirrors WhatsappInboundMessage. Dashboard enqueues `queued`; backend sends and owns the lifecycle.
85
85
 
86
- | Property | Pattern | Type | Deprecated | Definition | Title/Description |
87
- | ------------------------------ | ------- | ---------------- | ---------- | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
88
- | - [id](#id ) | No | string or null | No | - | (Read-only) Firestore document ID — auto-generated at enqueue time. |
89
- | + [to](#to ) | No | string | No | - | (Immutable) Recipient phone number in E.164 format. Must match the inbound \`from\` for the same conversation. |
90
- | + [waba](#waba ) | No | enum (of string) | No | In #/definitions/waba-label | (Immutable) WABA that will send the message. Mirrors inbound \`waba\`. |
91
- | + [wabaId](#wabaId ) | No | string | No | - | (Immutable) Meta WABA ID. Mirrors inbound \`wabaId\`. |
92
- | + [kind](#kind ) | No | enum (of string) | No | In #/definitions/outbound-message-format | (Immutable) Message format: \`text\` or \`template\`. Set \`text\` xor \`template\` to match. |
93
- | - [text](#text ) | No | string or null | No | - | Free-form message body. Present only when kind=text. |
94
- | - [template](#template ) | No | object or null | No | - | Template send payload. Present only when kind=template. |
95
- | - [purpose](#purpose ) | No | Combination | No | - | Business purpose (otp \| review_request \| adhoc \| conversational). Optional. |
96
- | - [orderUuid](#orderUuid ) | No | string or null | No | - | Order reference. Present on review_request messages. |
97
- | + [sentBy](#sentBy ) | No | object | No | - | (Immutable) Dashboard actor who enqueued the message. |
98
- | + [createdAt](#createdAt ) | No | object | No | In #/definitions/firestore-timestamp | (Immutable) Enqueue timestamp, set by the dashboard at create. |
99
- | + [status](#status ) | No | enum (of string) | No | In #/definitions/outbound-message-status | Delivery status. Created as \`queued\` by the dashboard; updated in place by the backend. |
100
- | - [wamid](#wamid ) | No | string or null | No | - | (Read-only) WhatsApp message ID returned by Meta once the backend sends. Absent while queued or on failure. |
101
- | - [error](#error ) | No | string or null | No | - | (Read-only) Human-readable failure reason. Present on status=failed. Raw Meta error detail lives in the lifecycle_events subcollection. |
102
- | - [sentAt](#sentAt ) | No | Combination | No | - | (Read-only) When the backend sent the message to Meta. |
103
- | - [deliveredAt](#deliveredAt ) | No | Combination | No | - | (Read-only) When Meta reported delivery. |
104
- | - [readAt](#readAt ) | No | Combination | No | - | (Read-only) When Meta reported the recipient read the message. |
105
- | - [failedAt](#failedAt ) | No | Combination | No | - | (Read-only) When the send failed. |
86
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
87
+ | ------------------------------ | ------- | ---------------- | ---------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
88
+ | - [id](#id ) | No | string or null | No | - | (Read-only) Firestore document ID — auto-generated at enqueue time. |
89
+ | + [to](#to ) | No | string | No | - | (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). |
90
+ | + [waba](#waba ) | No | enum (of string) | No | In #/definitions/waba-label | (Immutable) WABA that will send the message. Mirrors inbound \`waba\`. |
91
+ | + [wabaId](#wabaId ) | No | string | No | - | (Immutable) Meta WABA ID. Mirrors inbound \`wabaId\`. |
92
+ | + [kind](#kind ) | No | enum (of string) | No | In #/definitions/outbound-message-format | (Immutable) Message format: \`text\` or \`template\`. Set \`text\` xor \`template\` to match. |
93
+ | - [text](#text ) | No | string or null | No | - | Free-form message body. Present only when kind=text. |
94
+ | - [template](#template ) | No | object or null | No | - | Template send payload. Present only when kind=template. |
95
+ | - [purpose](#purpose ) | No | Combination | No | - | Business purpose (otp \| review_request \| adhoc \| conversational). Optional. |
96
+ | - [orderUuid](#orderUuid ) | No | string or null | No | - | Order reference. Present on review_request messages. |
97
+ | + [sentBy](#sentBy ) | No | object | No | - | (Immutable) Dashboard actor who enqueued the message. |
98
+ | + [createdAt](#createdAt ) | No | object | No | In #/definitions/firestore-timestamp | (Immutable) Enqueue timestamp, set by the dashboard at create. |
99
+ | + [status](#status ) | No | enum (of string) | No | In #/definitions/outbound-message-status | Delivery status. Created as \`queued\` by the dashboard; updated in place by the backend. |
100
+ | - [wamid](#wamid ) | No | string or null | No | - | (Read-only) WhatsApp message ID returned by Meta once the backend sends. Absent while queued or on failure. |
101
+ | - [error](#error ) | No | string or null | No | - | (Read-only) Human-readable failure reason. Present on status=failed. Raw Meta error detail lives in the lifecycle_events subcollection. |
102
+ | - [sentAt](#sentAt ) | No | Combination | No | - | (Read-only) When the backend sent the message to Meta. |
103
+ | - [deliveredAt](#deliveredAt ) | No | Combination | No | - | (Read-only) When Meta reported delivery. |
104
+ | - [readAt](#readAt ) | No | Combination | No | - | (Read-only) When Meta reported the recipient read the message. |
105
+ | - [failedAt](#failedAt ) | No | Combination | No | - | (Read-only) When the send failed. |
106
106
 
107
107
  ## <a name="id"></a>1. Property `id`
108
108
 
@@ -124,12 +124,20 @@ Do not include in write requests. This field is set exclusively by the server (F
124
124
  | **Type** | `string` |
125
125
  | **Required** | Yes |
126
126
 
127
- **Description:** (Immutable) Recipient phone number in E.164 format. Must match the inbound `from` for the same conversation.
127
+ **Description:** (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).
128
128
 
129
129
  :::info Immutable
130
130
  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.
131
131
  :::
132
132
 
133
+ :::note
134
+ This is the Meta wa_id (digits only, no leading +), NOT a literal E.164 string. Meta normalizes phone numbers in non-obvious ways (e.g. +2250777471485 → wa_id 22577471485, dropping the trunk zero). The only reliable source is Meta's contacts[].wa_id from the send response — do not derive from E.164 by stripping + alone. The dashboard conversational sends and the whatsapp-server OTP path both use the wa_id form. Confirmed in prod: ING-368.
135
+ :::
136
+
137
+ :::tip When to set
138
+ Set at enqueue time to the recipient's Meta wa_id. Use inbound WhatsappInboundMessage.from (also wa_id) as the join key for the conversation thread.
139
+ :::
140
+
133
141
  ## <a name="waba"></a>3. Property `waba`
134
142
 
135
143
  | | |
@@ -148,6 +156,10 @@ Must be one of:
148
156
  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.
149
157
  :::
150
158
 
159
+ :::note
160
+ cmz = "IngenX - Chez Miss Zahoui", phone number ID 446424085225188, used for chez_miss_zahoui_* companies. val = "IngenX - Valets", phone number ID 425582173979125, used for all other companies. Templates are approved at WABA level — if cmz and val share a WABA ID, all templates are available to both. Routing logic: functions/src/orders/order.ts#isSender2Company. See messaging/whatsapp-platform-constraints (#50).
161
+ :::
162
+
151
163
  ## <a name="wabaId"></a>4. Property `wabaId`
152
164
 
153
165
  | | |
@@ -424,6 +436,10 @@ Dashboard must create with `queued`. The backend owns every transition after (se
424
436
  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.
425
437
  :::
426
438
 
439
+ :::note
440
+ Useful for audit and dedup. Does NOT enable reply-threading for template messages — Meta silently ignores context.message_id on templates. Threading only works for kind=text within the 24-hour service window (#50).
441
+ :::
442
+
427
443
  ## <a name="error"></a>14. Property `error`
428
444
 
429
445
  | | |
@@ -582,7 +598,7 @@ Do not include in write requests. This field is set exclusively by the server (F
582
598
  | **Required** | No |
583
599
 
584
600
  ----------------------------------------------------------------------------------------------------------------------------
585
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:51 +0000
601
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:38:45 +0000
586
602
 
587
603
  :::warning Server-set
588
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: 35
4
+ sidebar_position: 39
5
5
  ---
6
6
 
7
7
  # WhatsappTemplate
@@ -99,6 +99,10 @@ Must be one of:
99
99
  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.
100
100
  :::
101
101
 
102
+ :::note
103
+ cmz = "IngenX - Chez Miss Zahoui", phone number ID 446424085225188, used for chez_miss_zahoui_* companies. val = "IngenX - Valets", phone number ID 425582173979125, used for all other companies. Templates are approved at WABA level — if cmz and val share a WABA ID, all templates are available to both. Routing logic: functions/src/orders/order.ts#isSender2Company. See messaging/whatsapp-platform-constraints (#50).
104
+ :::
105
+
102
106
  ## <a name="wabaId"></a>3. Property `wabaId`
103
107
 
104
108
  | | |
@@ -287,7 +291,7 @@ Do not include in write requests. This field is set exclusively by the server (F
287
291
  **Description:** (Read-only) Rendered preview text for display in the dashboard picker.
288
292
 
289
293
  ----------------------------------------------------------------------------------------------------------------------------
290
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:51 +0000
294
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:38:45 +0000
291
295
 
292
296
  :::warning Server-set
293
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.