@ingenx-io/valets-schema-mcp-server 0.1.9 → 0.2.0
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/attention-status.md +1 -1
- package/data/docs/enums/booking-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/fulfillment-status.md +1 -1
- package/data/docs/enums/loyalty-transaction-type.md +1 -1
- package/data/docs/enums/order-status.md +1 -1
- package/data/docs/enums/outbound-message-format.md +22 -0
- package/data/docs/enums/outbound-message-purpose.md +24 -0
- package/data/docs/enums/outbound-message-status.md +4 -4
- package/data/docs/enums/payment-method.md +2 -2
- 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-template-status.md +26 -0
- package/data/docs/index.md +9 -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/booking-version.md +1 -1
- package/data/docs/models/booking.md +1 -1
- package/data/docs/models/customer-payment-allocation.md +1 -1
- package/data/docs/models/customer-payment.md +1 -1
- package/data/docs/models/customer.md +1 -1
- package/data/docs/models/event.md +1 -1
- package/data/docs/models/loyalty-config.md +1 -1
- package/data/docs/models/loyalty-reward.md +1 -1
- package/data/docs/models/loyalty-status.md +1 -1
- package/data/docs/models/loyalty-transaction.md +1 -1
- package/data/docs/models/magic-link-request.md +1 -1
- package/data/docs/models/metrics-current.md +1 -1
- package/data/docs/models/metrics-daily.md +1 -1
- package/data/docs/models/metrics-monthly.md +1 -1
- package/data/docs/models/order-item.md +1 -1
- package/data/docs/models/order.md +1 -1
- package/data/docs/models/sale.md +1 -1
- package/data/docs/models/site-payment.md +1 -1
- package/data/docs/models/site.md +1 -1
- package/data/docs/models/stocktake-item.md +1 -1
- package/data/docs/models/stocktake.md +1 -1
- package/data/docs/models/ticket.md +1 -1
- package/data/docs/models/whatsapp-inbound-message.md +1 -1
- package/data/docs/models/whatsapp-outbound-lifecycle-event.md +310 -0
- package/data/docs/models/whatsapp-outbound-message.md +396 -172
- package/data/docs/models/whatsapp-template.md +177 -0
- package/data/static/llms.txt +110 -32
- package/data/static/openapi.yaml +275 -66
- package/data/static/schemas.json +355 -69
- package/package.json +1 -1
- package/data/docs/enums/outbound-message-kind.md +0 -22
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "WhatsappTemplate"
|
|
3
|
+
sidebar_label: "WhatsappTemplate"
|
|
4
|
+
sidebar_position: 31
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# WhatsappTemplate
|
|
8
|
+
|
|
9
|
+
<details>
|
|
10
|
+
<summary>Example JSON</summary>
|
|
11
|
+
|
|
12
|
+
```json
|
|
13
|
+
{
|
|
14
|
+
"id": null,
|
|
15
|
+
"name": "Amadou Diallo",
|
|
16
|
+
"language": "language",
|
|
17
|
+
"category": "category",
|
|
18
|
+
"status": "status",
|
|
19
|
+
"variables": [
|
|
20
|
+
"example"
|
|
21
|
+
],
|
|
22
|
+
"preview": "preview"
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
</details>
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
- [1. Property `id`](#id)
|
|
30
|
+
- [2. Property `name`](#name)
|
|
31
|
+
- [3. Property `language`](#language)
|
|
32
|
+
- [4. Property `category`](#category)
|
|
33
|
+
- [5. Property `status`](#status)
|
|
34
|
+
- [6. Property `variables`](#variables)
|
|
35
|
+
- [6.1. variables items](#variables_items)
|
|
36
|
+
- [7. Property `preview`](#preview)
|
|
37
|
+
|
|
38
|
+
| | |
|
|
39
|
+
| ------------------------- | ------------------------------- |
|
|
40
|
+
| **Type** | `object` |
|
|
41
|
+
| **Required** | No |
|
|
42
|
+
| **Additional properties** | Not allowed |
|
|
43
|
+
| **Defined in** | #/definitions/whatsapp-template |
|
|
44
|
+
|
|
45
|
+
**Description:** WhatsappTemplate — Meta-approved template synced from the WhatsApp Business API (GH#43). Collection: whatsapp_templates/\{docId\}. Backend-synced; dashboard reads only.
|
|
46
|
+
|
|
47
|
+
| Property | Pattern | Type | Deprecated | Definition | Title/Description |
|
|
48
|
+
| -------------------------- | ------- | ---------------- | ---------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
49
|
+
| - [id](#id ) | No | string or null | No | - | (Read-only) Firestore document ID — composite \`\{name\}__\{language\}\`. |
|
|
50
|
+
| + [name](#name ) | No | string | No | - | (Read-only) Template name as registered with Meta. |
|
|
51
|
+
| + [language](#language ) | No | string | No | - | (Read-only) Template language/locale code (e.g. "en", "fr"). |
|
|
52
|
+
| + [category](#category ) | No | string | No | - | (Read-only) Meta template category (e.g. MARKETING, UTILITY, AUTHENTICATION). |
|
|
53
|
+
| + [status](#status ) | No | enum (of string) | No | In #/definitions/whatsapp-template-status | (Read-only) Meta review status. Only APPROVED templates can be sent. |
|
|
54
|
+
| + [variables](#variables ) | No | array of string | No | - | (Read-only) Declared variable names/placeholders. A message supplies values keyed by these names via WhatsappOutboundMessage.template.variables. |
|
|
55
|
+
| + [preview](#preview ) | No | string | No | - | (Read-only) Rendered preview text for display in the dashboard picker. |
|
|
56
|
+
|
|
57
|
+
## <a name="id"></a>1. Property `id`
|
|
58
|
+
|
|
59
|
+
| | |
|
|
60
|
+
| ------------ | ---------------- |
|
|
61
|
+
| **Type** | `string or null` |
|
|
62
|
+
| **Required** | No |
|
|
63
|
+
|
|
64
|
+
**Description:** (Read-only) Firestore document ID — composite `\{name\}__\{language\}`.
|
|
65
|
+
|
|
66
|
+
:::warning Server-set
|
|
67
|
+
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.
|
|
68
|
+
:::
|
|
69
|
+
|
|
70
|
+
## <a name="name"></a>2. Property `name`
|
|
71
|
+
|
|
72
|
+
| | |
|
|
73
|
+
| ------------ | -------- |
|
|
74
|
+
| **Type** | `string` |
|
|
75
|
+
| **Required** | Yes |
|
|
76
|
+
|
|
77
|
+
**Description:** (Read-only) Template name as registered with Meta.
|
|
78
|
+
|
|
79
|
+
:::warning Server-set
|
|
80
|
+
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.
|
|
81
|
+
:::
|
|
82
|
+
|
|
83
|
+
## <a name="language"></a>3. Property `language`
|
|
84
|
+
|
|
85
|
+
| | |
|
|
86
|
+
| ------------ | -------- |
|
|
87
|
+
| **Type** | `string` |
|
|
88
|
+
| **Required** | Yes |
|
|
89
|
+
|
|
90
|
+
**Description:** (Read-only) Template language/locale code (e.g. "en", "fr").
|
|
91
|
+
|
|
92
|
+
:::warning Server-set
|
|
93
|
+
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.
|
|
94
|
+
:::
|
|
95
|
+
|
|
96
|
+
## <a name="category"></a>4. Property `category`
|
|
97
|
+
|
|
98
|
+
| | |
|
|
99
|
+
| ------------ | -------- |
|
|
100
|
+
| **Type** | `string` |
|
|
101
|
+
| **Required** | Yes |
|
|
102
|
+
|
|
103
|
+
**Description:** (Read-only) Meta template category (e.g. MARKETING, UTILITY, AUTHENTICATION).
|
|
104
|
+
|
|
105
|
+
:::warning Server-set
|
|
106
|
+
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.
|
|
107
|
+
:::
|
|
108
|
+
|
|
109
|
+
## <a name="status"></a>5. Property `status`
|
|
110
|
+
|
|
111
|
+
| | |
|
|
112
|
+
| -------------- | -------------------------------------- |
|
|
113
|
+
| **Type** | `enum (of string)` |
|
|
114
|
+
| **Required** | Yes |
|
|
115
|
+
| **Defined in** | #/definitions/whatsapp-template-status |
|
|
116
|
+
|
|
117
|
+
**Description:** (Read-only) Meta review status. Only APPROVED templates can be sent.
|
|
118
|
+
|
|
119
|
+
Must be one of:
|
|
120
|
+
* "APPROVED"
|
|
121
|
+
* "PENDING"
|
|
122
|
+
* "REJECTED"
|
|
123
|
+
* "PAUSED"
|
|
124
|
+
* "DISABLED"
|
|
125
|
+
* "IN_APPEAL"
|
|
126
|
+
|
|
127
|
+
:::warning Server-set
|
|
128
|
+
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.
|
|
129
|
+
:::
|
|
130
|
+
|
|
131
|
+
## <a name="variables"></a>6. Property `variables`
|
|
132
|
+
|
|
133
|
+
| | |
|
|
134
|
+
| ------------ | ----------------- |
|
|
135
|
+
| **Type** | `array of string` |
|
|
136
|
+
| **Required** | Yes |
|
|
137
|
+
|
|
138
|
+
**Description:** (Read-only) Declared variable names/placeholders. A message supplies values keyed by these names via WhatsappOutboundMessage.template.variables.
|
|
139
|
+
|
|
140
|
+
| | Array restrictions |
|
|
141
|
+
| -------------------- | ------------------ |
|
|
142
|
+
| **Min items** | N/A |
|
|
143
|
+
| **Max items** | N/A |
|
|
144
|
+
| **Items unicity** | False |
|
|
145
|
+
| **Additional items** | False |
|
|
146
|
+
| **Tuple validation** | See below |
|
|
147
|
+
|
|
148
|
+
| Each item of this array must be | Description |
|
|
149
|
+
| ----------------------------------- | ----------- |
|
|
150
|
+
| [variables items](#variables_items) | - |
|
|
151
|
+
|
|
152
|
+
### <a name="variables_items"></a>6.1. variables items
|
|
153
|
+
|
|
154
|
+
| | |
|
|
155
|
+
| ------------ | -------- |
|
|
156
|
+
| **Type** | `string` |
|
|
157
|
+
| **Required** | No |
|
|
158
|
+
|
|
159
|
+
:::warning Server-set
|
|
160
|
+
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.
|
|
161
|
+
:::
|
|
162
|
+
|
|
163
|
+
## <a name="preview"></a>7. Property `preview`
|
|
164
|
+
|
|
165
|
+
| | |
|
|
166
|
+
| ------------ | -------- |
|
|
167
|
+
| **Type** | `string` |
|
|
168
|
+
| **Required** | Yes |
|
|
169
|
+
|
|
170
|
+
**Description:** (Read-only) Rendered preview text for display in the dashboard picker.
|
|
171
|
+
|
|
172
|
+
----------------------------------------------------------------------------------------------------------------------------
|
|
173
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-27 at 01:15:18 +0000
|
|
174
|
+
|
|
175
|
+
:::warning Server-set
|
|
176
|
+
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.
|
|
177
|
+
:::
|
package/data/static/llms.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
> Source of truth: Zod schemas in packages/schema/src/
|
|
5
5
|
> All Firestore documents are scoped under companies/{companyId}/
|
|
6
6
|
|
|
7
|
-
> Generated: 2026-05-
|
|
7
|
+
> Generated: 2026-05-27
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -50,13 +50,17 @@ Values: EARNED, REDEEMED, ADJUSTED, EXPIRED, BONUS, REFUND
|
|
|
50
50
|
Core order lifecycle status (D03, D34). Universal across all business types. Replaces the Dashboard's legacy 20-value flat enum (MIG-11).
|
|
51
51
|
Values: PENDING, CONFIRMED, PROCESSING, READY, COMPLETED, CANCELLED, EXPIRED
|
|
52
52
|
|
|
53
|
-
###
|
|
54
|
-
Outbound WhatsApp message
|
|
55
|
-
Values:
|
|
53
|
+
### OutboundMessageFormat
|
|
54
|
+
Outbound WhatsApp message format. `text` is a free-form body (only valid inside the 24h customer-care window); `template` is a pre-approved WhatsApp template send. The backend is the authority on which is allowed (GH#43).
|
|
55
|
+
Values: text, template
|
|
56
|
+
|
|
57
|
+
### OutboundMessagePurpose
|
|
58
|
+
Business purpose of an outbound WhatsApp message — orthogonal to its format (see OutboundMessageFormat). `otp`/`review_request`/`adhoc` are system-originated; `conversational` is a human agent reply from the dashboard inbox. Optional signal carried for analytics/triggers (GH#43; supersedes the GH#38 OutboundMessageKind).
|
|
59
|
+
Values: otp, review_request, adhoc, conversational
|
|
56
60
|
|
|
57
61
|
### OutboundMessageStatus
|
|
58
|
-
Outbound WhatsApp message delivery status. Lifecycle:
|
|
59
|
-
Values:
|
|
62
|
+
Outbound WhatsApp message delivery status. Lifecycle: queued → sent → delivered → read, or queued → failed. The dashboard creates the message with status `queued`; the whatsapp-server backend owns every transition after, updating in place from Meta delivery callbacks (GH#43).
|
|
63
|
+
Values: queued, sent, delivered, read, failed
|
|
60
64
|
|
|
61
65
|
### PaymentMethod
|
|
62
66
|
Unified payment method set with African + global methods (D02).
|
|
@@ -106,6 +110,10 @@ Values: VALID, USED, CANCELLED
|
|
|
106
110
|
Human-readable WABA label identifying which Meta business number received the message (GH#36).
|
|
107
111
|
Values: cmz, val
|
|
108
112
|
|
|
113
|
+
### WhatsappTemplateStatus
|
|
114
|
+
Meta review status of a WhatsApp message template, synced from the WhatsApp Business API. Only APPROVED templates can be sent. The fuller Meta status set is used deliberately (vs just APPROVED/PENDING/REJECTED) so this enum has a distinct value signature from PaymentProofStatus in the JSON-Schema $ref matcher (GH#43).
|
|
115
|
+
Values: APPROVED, PENDING, REJECTED, PAUSED, DISABLED, IN_APPEAL
|
|
116
|
+
|
|
109
117
|
---
|
|
110
118
|
|
|
111
119
|
## Models
|
|
@@ -1518,47 +1526,117 @@ Example:
|
|
|
1518
1526
|
}
|
|
1519
1527
|
```
|
|
1520
1528
|
|
|
1529
|
+
### WhatsappOutboundLifecycleEvent
|
|
1530
|
+
Fields: 11 (2 required)
|
|
1531
|
+
|
|
1532
|
+
| Field | Type | Required | Description |
|
|
1533
|
+
|-------|------|----------|-------------|
|
|
1534
|
+
| id | ['string', 'null'] | no | (Read-only) Firestore document ID, auto-generated. |
|
|
1535
|
+
| type | any | yes | (Read-only) Event type — send_attempt | status_callback | error | future string. |
|
|
1536
|
+
| at | FirestoreTimestamp | yes | (Read-only) When the event was recorded server-side. |
|
|
1537
|
+
| status | any | no | (Read-only) Resulting/observed status, when this event implies one. |
|
|
1538
|
+
| wamid | ['string', 'null'] | no | (Read-only) WhatsApp message ID, if known at this point in the lifecycle. |
|
|
1539
|
+
| phoneNumberId | ['string', 'null'] | no | (Read-only) Meta phone number ID (the specific line within the WABA) used for the attempt. |
|
|
1540
|
+
| contactWaId | ['string', 'null'] | no | (Read-only) Normalized wa_id returned by Meta. May differ from the recipient `to`. |
|
|
1541
|
+
| metaRequest | any | no | (Read-only) Raw outbound payload sent to the Meta Graph API. |
|
|
1542
|
+
| metaResponse | any | no | (Read-only) Raw Meta Graph API response. |
|
|
1543
|
+
| errorCode | ['integer', 'null'] | no | (Read-only) Meta error code. Present on failed attempts. |
|
|
1544
|
+
| errorDetail | any | no | (Read-only) Raw Meta error object(s). |
|
|
1545
|
+
|
|
1546
|
+
Example:
|
|
1547
|
+
```json
|
|
1548
|
+
{
|
|
1549
|
+
"id": null,
|
|
1550
|
+
"type": "phone",
|
|
1551
|
+
"at": "at",
|
|
1552
|
+
"status": "status",
|
|
1553
|
+
"wamid": null,
|
|
1554
|
+
"phoneNumberId": null,
|
|
1555
|
+
"contactWaId": null,
|
|
1556
|
+
"metaRequest": "metaRequest",
|
|
1557
|
+
"metaResponse": "metaResponse",
|
|
1558
|
+
"errorCode": null,
|
|
1559
|
+
"errorDetail": "errorDetail"
|
|
1560
|
+
}
|
|
1561
|
+
```
|
|
1562
|
+
|
|
1521
1563
|
### WhatsappOutboundMessage
|
|
1522
|
-
Fields:
|
|
1564
|
+
Fields: 18 (7 required)
|
|
1523
1565
|
|
|
1524
1566
|
| Field | Type | Required | Description |
|
|
1525
1567
|
|-------|------|----------|-------------|
|
|
1526
|
-
| id | ['string', 'null'] | no | (Read-only) Firestore document ID —
|
|
1527
|
-
|
|
|
1528
|
-
|
|
|
1529
|
-
| waba | WabaLabel | yes | (Immutable) WABA that sent the message. Mirrors inbound `waba`. |
|
|
1568
|
+
| id | ['string', 'null'] | no | (Read-only) Firestore document ID — auto-generated at enqueue time. |
|
|
1569
|
+
| to | string | yes | (Immutable) Recipient phone number in E.164 format. Must match the inbound `from` for the same conversation. |
|
|
1570
|
+
| waba | WabaLabel | yes | (Immutable) WABA that will send the message. Mirrors inbound `waba`. |
|
|
1530
1571
|
| wabaId | string | yes | (Immutable) Meta WABA ID. Mirrors inbound `wabaId`. |
|
|
1531
|
-
|
|
|
1532
|
-
|
|
|
1533
|
-
|
|
|
1534
|
-
|
|
|
1535
|
-
|
|
|
1536
|
-
|
|
|
1537
|
-
|
|
|
1538
|
-
|
|
|
1539
|
-
|
|
|
1540
|
-
|
|
|
1541
|
-
|
|
|
1572
|
+
| kind | OutboundMessageFormat | yes | (Immutable) Message format: `text` or `template`. Set `text` xor `template` to match. |
|
|
1573
|
+
| text | ['string', 'null'] | no | Free-form message body. Present only when kind=text. |
|
|
1574
|
+
| template | ['object', 'null'] | no | Template send payload. Present only when kind=template. |
|
|
1575
|
+
| purpose | any | no | Business purpose (otp | review_request | adhoc | conversational). Optional. |
|
|
1576
|
+
| orderUuid | ['string', 'null'] | no | Order reference. Present on review_request messages. |
|
|
1577
|
+
| sentBy | object | yes | (Immutable) Dashboard actor who enqueued the message. |
|
|
1578
|
+
| sentBy.uid | string | yes | Firebase Auth UID of the dashboard user who enqueued the message. |
|
|
1579
|
+
| sentBy.email | string | no | Email of the sender, if available. |
|
|
1580
|
+
| createdAt | FirestoreTimestamp | yes | (Immutable) Enqueue timestamp, set by the dashboard at create. |
|
|
1581
|
+
| status | OutboundMessageStatus | yes | Delivery status. Created as `queued` by the dashboard; updated in place by the backend. |
|
|
1582
|
+
| wamid | ['string', 'null'] | no | (Read-only) WhatsApp message ID returned by Meta once the backend sends. Absent while queued or on failure. |
|
|
1583
|
+
| error | ['string', 'null'] | no | (Read-only) Human-readable failure reason. Present on status=failed. Raw Meta error detail lives in the lifecycle_events subcollection. |
|
|
1584
|
+
| sentAt | any | no | (Read-only) When the backend sent the message to Meta. |
|
|
1585
|
+
| deliveredAt | any | no | (Read-only) When Meta reported delivery. |
|
|
1586
|
+
| readAt | any | no | (Read-only) When Meta reported the recipient read the message. |
|
|
1587
|
+
| failedAt | any | no | (Read-only) When the send failed. |
|
|
1542
1588
|
|
|
1543
1589
|
Example:
|
|
1544
1590
|
```json
|
|
1545
1591
|
{
|
|
1546
1592
|
"id": null,
|
|
1547
|
-
"messageId": "mes_ref123",
|
|
1548
1593
|
"to": "to",
|
|
1549
1594
|
"waba": "waba",
|
|
1550
1595
|
"wabaId": "wab_ref123",
|
|
1551
|
-
"sentAt": "sentAt",
|
|
1552
|
-
"phoneNumberId": "pho_ref123",
|
|
1553
1596
|
"kind": "kind",
|
|
1554
|
-
"
|
|
1555
|
-
"
|
|
1556
|
-
"
|
|
1557
|
-
"appId": null,
|
|
1597
|
+
"text": null,
|
|
1598
|
+
"template": null,
|
|
1599
|
+
"purpose": "purpose",
|
|
1558
1600
|
"orderUuid": null,
|
|
1559
|
-
"
|
|
1560
|
-
|
|
1561
|
-
|
|
1601
|
+
"sentBy": {
|
|
1602
|
+
"uid": "user_u8x92kqm"
|
|
1603
|
+
},
|
|
1604
|
+
"createdAt": "createdAt",
|
|
1605
|
+
"status": "status",
|
|
1606
|
+
"wamid": null,
|
|
1607
|
+
"error": null,
|
|
1608
|
+
"sentAt": "sentAt",
|
|
1609
|
+
"deliveredAt": "deliveredAt",
|
|
1610
|
+
"readAt": "readAt",
|
|
1611
|
+
"failedAt": "failedAt"
|
|
1612
|
+
}
|
|
1613
|
+
```
|
|
1614
|
+
|
|
1615
|
+
### WhatsappTemplate
|
|
1616
|
+
Fields: 7 (6 required)
|
|
1617
|
+
|
|
1618
|
+
| Field | Type | Required | Description |
|
|
1619
|
+
|-------|------|----------|-------------|
|
|
1620
|
+
| id | ['string', 'null'] | no | (Read-only) Firestore document ID — composite `{name}__{language}`. |
|
|
1621
|
+
| name | string | yes | (Read-only) Template name as registered with Meta. |
|
|
1622
|
+
| language | string | yes | (Read-only) Template language/locale code (e.g. "en", "fr"). |
|
|
1623
|
+
| category | string | yes | (Read-only) Meta template category (e.g. MARKETING, UTILITY, AUTHENTICATION). |
|
|
1624
|
+
| status | WhatsappTemplateStatus | yes | (Read-only) Meta review status. Only APPROVED templates can be sent. |
|
|
1625
|
+
| variables | array<string> | yes | (Read-only) Declared variable names/placeholders. A message supplies values keyed by these names via WhatsappOutboundMessage.template.variables. |
|
|
1626
|
+
| preview | string | yes | (Read-only) Rendered preview text for display in the dashboard picker. |
|
|
1627
|
+
|
|
1628
|
+
Example:
|
|
1629
|
+
```json
|
|
1630
|
+
{
|
|
1631
|
+
"id": null,
|
|
1632
|
+
"name": "Amadou Diallo",
|
|
1633
|
+
"language": "language",
|
|
1634
|
+
"category": "category",
|
|
1635
|
+
"status": "status",
|
|
1636
|
+
"variables": [
|
|
1637
|
+
"example"
|
|
1638
|
+
],
|
|
1639
|
+
"preview": "preview"
|
|
1562
1640
|
}
|
|
1563
1641
|
```
|
|
1564
1642
|
|