@ingenx-io/valets-schema-mcp-server 0.1.1 → 0.1.2
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 +48 -0
- package/data/docs/decisions/migrations.md +56 -0
- package/data/docs/decisions/summary.md +78 -0
- package/data/docs/enums/booking-status.md +26 -0
- package/data/docs/enums/customer-payment-status.md +26 -0
- package/data/docs/enums/customer-payment-target-type.md +23 -0
- package/data/docs/enums/delivery-type.md +23 -0
- package/data/docs/enums/event-status.md +30 -0
- package/data/docs/enums/fulfillment-status.md +32 -0
- package/data/docs/enums/loyalty-transaction-type.md +32 -0
- package/data/docs/enums/order-status.md +65 -0
- package/data/docs/enums/payment-method.md +36 -0
- package/data/docs/enums/payment-proof-status.md +23 -0
- package/data/docs/enums/payment-status.md +34 -0
- package/data/docs/enums/return-status.md +32 -0
- package/data/docs/enums/session-status.md +32 -0
- package/data/docs/enums/ticket-status.md +29 -0
- package/data/docs/index.md +95 -0
- package/data/docs/models/booking-version.md +295 -0
- package/data/docs/models/booking.md +1754 -0
- package/data/docs/models/customer-payment-allocation.md +336 -0
- package/data/docs/models/customer-payment.md +392 -0
- package/data/docs/models/customer.md +475 -0
- package/data/docs/models/event.md +386 -0
- package/data/docs/models/loyalty-config.md +317 -0
- package/data/docs/models/loyalty-reward.md +236 -0
- package/data/docs/models/loyalty-status.md +328 -0
- package/data/docs/models/loyalty-transaction.md +326 -0
- package/data/docs/models/metrics-current.md +532 -0
- package/data/docs/models/metrics-daily.md +548 -0
- package/data/docs/models/metrics-monthly.md +548 -0
- package/data/docs/models/order-item.md +361 -0
- package/data/docs/models/order.md +1637 -0
- package/data/docs/models/sale.md +540 -0
- package/data/docs/models/ticket.md +405 -0
- package/data/docs/triggers/event-ticket-triggers.md +204 -0
- package/data/docs/triggers/loyalty-automation.md +123 -0
- package/data/static/decisions.json +966 -0
- package/data/static/llms.txt +1046 -0
- package/data/static/openapi.yaml +3090 -0
- package/data/static/schemas.json +4012 -0
- package/package.json +1 -1
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "MetricsDaily"
|
|
3
|
+
sidebar_label: "MetricsDaily"
|
|
4
|
+
sidebar_position: 12
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# MetricsDaily
|
|
8
|
+
|
|
9
|
+
<details>
|
|
10
|
+
<summary>Example JSON</summary>
|
|
11
|
+
|
|
12
|
+
```json
|
|
13
|
+
{
|
|
14
|
+
"todayOrdersCount": 2,
|
|
15
|
+
"pendingOrdersCount": 2,
|
|
16
|
+
"orderCompletionRate30d": 0,
|
|
17
|
+
"todayPurchasesCount": 2,
|
|
18
|
+
"todayPurchasesSum": 0,
|
|
19
|
+
"averagePurchaseAmount": 15000,
|
|
20
|
+
"monthlyRevenue": 0,
|
|
21
|
+
"monthlyPurchasesCount": 2,
|
|
22
|
+
"todayBookingsCount": 2,
|
|
23
|
+
"bookingsCreatedToday": 0,
|
|
24
|
+
"todayBookingsConfirmedAmount": 15000,
|
|
25
|
+
"monthlyBookingsConfirmedAmount": 15000,
|
|
26
|
+
"todayCollectedAmount": 15000,
|
|
27
|
+
"todayRevenue": 0,
|
|
28
|
+
"bookingsPendingPaymentVerification": 0,
|
|
29
|
+
"bookingsPendingValidation": 0,
|
|
30
|
+
"bookingsPendingValidation24h": 0,
|
|
31
|
+
"customersCount": 2,
|
|
32
|
+
"newCustomersThisMonth": 0,
|
|
33
|
+
"averageRating": 0,
|
|
34
|
+
"lowStockItemsCount": 2,
|
|
35
|
+
"activeRecurringPaymentsCount": 2,
|
|
36
|
+
"monthlyRecurringRevenue": 0,
|
|
37
|
+
"computedForDay": "computedForDay",
|
|
38
|
+
"generatedAt": "generatedAt",
|
|
39
|
+
"date": "2026-02-15"
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
</details>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
- [1. Property `todayOrdersCount`](#todayOrdersCount)
|
|
47
|
+
- [2. Property `pendingOrdersCount`](#pendingOrdersCount)
|
|
48
|
+
- [3. Property `orderCompletionRate30d`](#orderCompletionRate30d)
|
|
49
|
+
- [4. Property `todayPurchasesCount`](#todayPurchasesCount)
|
|
50
|
+
- [5. Property `todayPurchasesSum`](#todayPurchasesSum)
|
|
51
|
+
- [6. Property `averagePurchaseAmount`](#averagePurchaseAmount)
|
|
52
|
+
- [7. Property `monthlyRevenue`](#monthlyRevenue)
|
|
53
|
+
- [8. Property `monthlyPurchasesCount`](#monthlyPurchasesCount)
|
|
54
|
+
- [9. Property `todayBookingsCount`](#todayBookingsCount)
|
|
55
|
+
- [10. Property `bookingsCreatedToday`](#bookingsCreatedToday)
|
|
56
|
+
- [11. Property `todayBookingsConfirmedAmount`](#todayBookingsConfirmedAmount)
|
|
57
|
+
- [12. Property `monthlyBookingsConfirmedAmount`](#monthlyBookingsConfirmedAmount)
|
|
58
|
+
- [13. Property `todayCollectedAmount`](#todayCollectedAmount)
|
|
59
|
+
- [14. Property `todayRevenue`](#todayRevenue)
|
|
60
|
+
- [15. Property `bookingsPendingPaymentVerification`](#bookingsPendingPaymentVerification)
|
|
61
|
+
- [16. Property `bookingsPendingValidation`](#bookingsPendingValidation)
|
|
62
|
+
- [17. Property `bookingsPendingValidation24h`](#bookingsPendingValidation24h)
|
|
63
|
+
- [18. Property `customersCount`](#customersCount)
|
|
64
|
+
- [19. Property `newCustomersThisMonth`](#newCustomersThisMonth)
|
|
65
|
+
- [20. Property `averageRating`](#averageRating)
|
|
66
|
+
- [21. Property `lowStockItemsCount`](#lowStockItemsCount)
|
|
67
|
+
- [22. Property `activeRecurringPaymentsCount`](#activeRecurringPaymentsCount)
|
|
68
|
+
- [23. Property `monthlyRecurringRevenue`](#monthlyRecurringRevenue)
|
|
69
|
+
- [24. Property `computedForDay`](#computedForDay)
|
|
70
|
+
- [25. Property `generatedAt`](#generatedAt)
|
|
71
|
+
- [25.1. Property `_seconds`](#generatedAt__seconds)
|
|
72
|
+
- [25.2. Property `_nanoseconds`](#generatedAt__nanoseconds)
|
|
73
|
+
- [26. Property `date`](#date)
|
|
74
|
+
|
|
75
|
+
| | |
|
|
76
|
+
| ------------------------- | --------------------------- |
|
|
77
|
+
| **Type** | `object` |
|
|
78
|
+
| **Required** | No |
|
|
79
|
+
| **Additional properties** | Not allowed |
|
|
80
|
+
| **Defined in** | #/definitions/metrics-daily |
|
|
81
|
+
|
|
82
|
+
**Description:** Daily metrics snapshot. Collection: companies/\{companyId\}/metrics_daily/\{YYYY-MM-DD\}. Same fields as MetricsCurrent plus `date`. Written by computeDailyCompanyMetrics cron (02:00 UTC) and inline after full recalcs.
|
|
83
|
+
|
|
84
|
+
| Property | Pattern | Type | Deprecated | Definition | Title/Description |
|
|
85
|
+
| ---------------------------------------------------------------------------- | ------- | ------- | ---------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
86
|
+
| + [todayOrdersCount](#todayOrdersCount ) | No | integer | No | - | (Read-only) Orders created today (UTC). Resets at midnight. |
|
|
87
|
+
| + [pendingOrdersCount](#pendingOrdersCount ) | No | integer | No | - | (Read-only) Orders currently in PENDING status (all-time cumulative). Corrected by full recalc on order updates. |
|
|
88
|
+
| + [orderCompletionRate30d](#orderCompletionRate30d ) | No | number | No | - | (Read-only) Percentage of orders completed or delivered in the last 30 days. Always full recalc. |
|
|
89
|
+
| + [todayPurchasesCount](#todayPurchasesCount ) | No | integer | No | - | (Read-only) Purchases created today (UTC). Resets at midnight. |
|
|
90
|
+
| + [todayPurchasesSum](#todayPurchasesSum ) | No | number | No | - | (Read-only) Total value of purchases created today (UTC). Resets at midnight. |
|
|
91
|
+
| + [averagePurchaseAmount](#averagePurchaseAmount ) | No | number | No | - | (Read-only) Average purchase value across last 200 purchases (rolling, not time-windowed). |
|
|
92
|
+
| + [monthlyRevenue](#monthlyRevenue ) | No | number | No | - | (Read-only) Total purchase value in the current calendar month (UTC). |
|
|
93
|
+
| + [monthlyPurchasesCount](#monthlyPurchasesCount ) | No | integer | No | - | (Read-only) Number of purchases in the current calendar month (UTC). |
|
|
94
|
+
| + [todayBookingsCount](#todayBookingsCount ) | No | integer | No | - | (Read-only) Bookings with date == today AND status in [PENDING, CONFIRMED]. Resets at midnight. |
|
|
95
|
+
| + [bookingsCreatedToday](#bookingsCreatedToday ) | No | integer | No | - | (Read-only) Bookings with createdAt today (all statuses). Resets at midnight. |
|
|
96
|
+
| + [todayBookingsConfirmedAmount](#todayBookingsConfirmedAmount ) | No | number | No | - | (Read-only) Sum of totalAmount for bookings created today with status CONFIRMED or COMPLETED. Resets at midnight. |
|
|
97
|
+
| + [monthlyBookingsConfirmedAmount](#monthlyBookingsConfirmedAmount ) | No | number | No | - | (Read-only) Sum of totalAmount for bookings created this month with status CONFIRMED or COMPLETED. |
|
|
98
|
+
| + [todayCollectedAmount](#todayCollectedAmount ) | No | number | No | - | (Read-only) Sum of totalAmount for bookings where PAYMENT_PAID_AT is today. Resets at midnight. |
|
|
99
|
+
| + [todayRevenue](#todayRevenue ) | No | number | No | - | (Read-only) Sum of totalAmount for COMPLETED bookings where startDate == endDate == today (numeric YYYYMMDD). Resets at midnight. |
|
|
100
|
+
| + [bookingsPendingPaymentVerification](#bookingsPendingPaymentVerification ) | No | integer | No | - | (Read-only) Bookings with status PENDING/CANCELLATION_REQUESTED and a payment proof uploaded but not yet verified. Current state, always full recalc. |
|
|
101
|
+
| + [bookingsPendingValidation](#bookingsPendingValidation ) | No | integer | No | - | (Read-only) PENDING bookings with startDate within ±30 days of today. Rolling window, always full recalc. |
|
|
102
|
+
| + [bookingsPendingValidation24h](#bookingsPendingValidation24h ) | No | integer | No | - | (Read-only) PENDING bookings created in the last 24h with startDate >= tomorrow. Always full recalc. |
|
|
103
|
+
| + [customersCount](#customersCount ) | No | integer | No | - | (Read-only) Total customer count (all-time cumulative). |
|
|
104
|
+
| + [newCustomersThisMonth](#newCustomersThisMonth ) | No | integer | No | - | (Read-only) Customers with createdAt in the current calendar month (UTC). |
|
|
105
|
+
| + [averageRating](#averageRating ) | No | number | No | - | (Read-only) Average rating from the last 200 reviews (rolling). Always full recalc. |
|
|
106
|
+
| + [lowStockItemsCount](#lowStockItemsCount ) | No | integer | No | - | (Read-only) Active stock items where currentQuantity <= minimumQuantity. Current state, always full recalc. |
|
|
107
|
+
| + [activeRecurringPaymentsCount](#activeRecurringPaymentsCount ) | No | integer | No | - | (Read-only) Recurring payments with status ACTIVE. Current state, always full recalc. |
|
|
108
|
+
| + [monthlyRecurringRevenue](#monthlyRecurringRevenue ) | No | number | No | - | (Read-only) Sum of amount for ACTIVE + MONTHLY recurring payments. Always full recalc. |
|
|
109
|
+
| + [computedForDay](#computedForDay ) | No | string | No | - | (Read-only) YYYY-MM-DD string indicating which day these metrics reflect. Used to detect day boundaries and trigger midnight resets. |
|
|
110
|
+
| + [generatedAt](#generatedAt ) | No | object | No | In #/definitions/firestore-timestamp | (Read-only) Server timestamp of the last metrics write. |
|
|
111
|
+
| + [date](#date ) | No | string | No | - | (Read-only) YYYY-MM-DD document ID repeated as a field. Identifies the day this snapshot covers. |
|
|
112
|
+
|
|
113
|
+
## <a name="todayOrdersCount"></a>1. Property `todayOrdersCount`
|
|
114
|
+
|
|
115
|
+
| | |
|
|
116
|
+
| ------------ | --------- |
|
|
117
|
+
| **Type** | `integer` |
|
|
118
|
+
| **Required** | Yes |
|
|
119
|
+
|
|
120
|
+
**Description:** (Read-only) Orders created today (UTC). Resets at midnight.
|
|
121
|
+
|
|
122
|
+
| Restrictions | |
|
|
123
|
+
| ------------ | ---------------------- |
|
|
124
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
125
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
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="pendingOrdersCount"></a>2. Property `pendingOrdersCount`
|
|
132
|
+
|
|
133
|
+
| | |
|
|
134
|
+
| ------------ | --------- |
|
|
135
|
+
| **Type** | `integer` |
|
|
136
|
+
| **Required** | Yes |
|
|
137
|
+
|
|
138
|
+
**Description:** (Read-only) Orders currently in PENDING status (all-time cumulative). Corrected by full recalc on order updates.
|
|
139
|
+
|
|
140
|
+
| Restrictions | |
|
|
141
|
+
| ------------ | ---------------------- |
|
|
142
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
143
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
144
|
+
|
|
145
|
+
:::warning Server-set
|
|
146
|
+
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.
|
|
147
|
+
:::
|
|
148
|
+
|
|
149
|
+
## <a name="orderCompletionRate30d"></a>3. Property `orderCompletionRate30d`
|
|
150
|
+
|
|
151
|
+
| | |
|
|
152
|
+
| ------------ | -------- |
|
|
153
|
+
| **Type** | `number` |
|
|
154
|
+
| **Required** | Yes |
|
|
155
|
+
|
|
156
|
+
**Description:** (Read-only) Percentage of orders completed or delivered in the last 30 days. Always full recalc.
|
|
157
|
+
|
|
158
|
+
:::warning Server-set
|
|
159
|
+
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.
|
|
160
|
+
:::
|
|
161
|
+
|
|
162
|
+
## <a name="todayPurchasesCount"></a>4. Property `todayPurchasesCount`
|
|
163
|
+
|
|
164
|
+
| | |
|
|
165
|
+
| ------------ | --------- |
|
|
166
|
+
| **Type** | `integer` |
|
|
167
|
+
| **Required** | Yes |
|
|
168
|
+
|
|
169
|
+
**Description:** (Read-only) Purchases created today (UTC). Resets at midnight.
|
|
170
|
+
|
|
171
|
+
| Restrictions | |
|
|
172
|
+
| ------------ | ---------------------- |
|
|
173
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
174
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
175
|
+
|
|
176
|
+
:::warning Server-set
|
|
177
|
+
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.
|
|
178
|
+
:::
|
|
179
|
+
|
|
180
|
+
## <a name="todayPurchasesSum"></a>5. Property `todayPurchasesSum`
|
|
181
|
+
|
|
182
|
+
| | |
|
|
183
|
+
| ------------ | -------- |
|
|
184
|
+
| **Type** | `number` |
|
|
185
|
+
| **Required** | Yes |
|
|
186
|
+
|
|
187
|
+
**Description:** (Read-only) Total value of purchases created today (UTC). Resets at midnight.
|
|
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
|
+
:::
|
|
192
|
+
|
|
193
|
+
## <a name="averagePurchaseAmount"></a>6. Property `averagePurchaseAmount`
|
|
194
|
+
|
|
195
|
+
| | |
|
|
196
|
+
| ------------ | -------- |
|
|
197
|
+
| **Type** | `number` |
|
|
198
|
+
| **Required** | Yes |
|
|
199
|
+
|
|
200
|
+
**Description:** (Read-only) Average purchase value across last 200 purchases (rolling, not time-windowed).
|
|
201
|
+
|
|
202
|
+
:::warning Server-set
|
|
203
|
+
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.
|
|
204
|
+
:::
|
|
205
|
+
|
|
206
|
+
## <a name="monthlyRevenue"></a>7. Property `monthlyRevenue`
|
|
207
|
+
|
|
208
|
+
| | |
|
|
209
|
+
| ------------ | -------- |
|
|
210
|
+
| **Type** | `number` |
|
|
211
|
+
| **Required** | Yes |
|
|
212
|
+
|
|
213
|
+
**Description:** (Read-only) Total purchase value in the current calendar month (UTC).
|
|
214
|
+
|
|
215
|
+
:::warning Server-set
|
|
216
|
+
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.
|
|
217
|
+
:::
|
|
218
|
+
|
|
219
|
+
## <a name="monthlyPurchasesCount"></a>8. Property `monthlyPurchasesCount`
|
|
220
|
+
|
|
221
|
+
| | |
|
|
222
|
+
| ------------ | --------- |
|
|
223
|
+
| **Type** | `integer` |
|
|
224
|
+
| **Required** | Yes |
|
|
225
|
+
|
|
226
|
+
**Description:** (Read-only) Number of purchases in the current calendar month (UTC).
|
|
227
|
+
|
|
228
|
+
| Restrictions | |
|
|
229
|
+
| ------------ | ---------------------- |
|
|
230
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
231
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
232
|
+
|
|
233
|
+
:::warning Server-set
|
|
234
|
+
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.
|
|
235
|
+
:::
|
|
236
|
+
|
|
237
|
+
## <a name="todayBookingsCount"></a>9. Property `todayBookingsCount`
|
|
238
|
+
|
|
239
|
+
| | |
|
|
240
|
+
| ------------ | --------- |
|
|
241
|
+
| **Type** | `integer` |
|
|
242
|
+
| **Required** | Yes |
|
|
243
|
+
|
|
244
|
+
**Description:** (Read-only) Bookings with date == today AND status in [PENDING, CONFIRMED]. Resets at midnight.
|
|
245
|
+
|
|
246
|
+
| Restrictions | |
|
|
247
|
+
| ------------ | ---------------------- |
|
|
248
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
249
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
250
|
+
|
|
251
|
+
:::warning Server-set
|
|
252
|
+
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.
|
|
253
|
+
:::
|
|
254
|
+
|
|
255
|
+
## <a name="bookingsCreatedToday"></a>10. Property `bookingsCreatedToday`
|
|
256
|
+
|
|
257
|
+
| | |
|
|
258
|
+
| ------------ | --------- |
|
|
259
|
+
| **Type** | `integer` |
|
|
260
|
+
| **Required** | Yes |
|
|
261
|
+
|
|
262
|
+
**Description:** (Read-only) Bookings with createdAt today (all statuses). Resets at midnight.
|
|
263
|
+
|
|
264
|
+
| Restrictions | |
|
|
265
|
+
| ------------ | ---------------------- |
|
|
266
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
267
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
268
|
+
|
|
269
|
+
:::warning Server-set
|
|
270
|
+
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.
|
|
271
|
+
:::
|
|
272
|
+
|
|
273
|
+
## <a name="todayBookingsConfirmedAmount"></a>11. Property `todayBookingsConfirmedAmount`
|
|
274
|
+
|
|
275
|
+
| | |
|
|
276
|
+
| ------------ | -------- |
|
|
277
|
+
| **Type** | `number` |
|
|
278
|
+
| **Required** | Yes |
|
|
279
|
+
|
|
280
|
+
**Description:** (Read-only) Sum of totalAmount for bookings created today with status CONFIRMED or COMPLETED. Resets at midnight.
|
|
281
|
+
|
|
282
|
+
:::warning Server-set
|
|
283
|
+
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.
|
|
284
|
+
:::
|
|
285
|
+
|
|
286
|
+
## <a name="monthlyBookingsConfirmedAmount"></a>12. Property `monthlyBookingsConfirmedAmount`
|
|
287
|
+
|
|
288
|
+
| | |
|
|
289
|
+
| ------------ | -------- |
|
|
290
|
+
| **Type** | `number` |
|
|
291
|
+
| **Required** | Yes |
|
|
292
|
+
|
|
293
|
+
**Description:** (Read-only) Sum of totalAmount for bookings created this month with status CONFIRMED or COMPLETED.
|
|
294
|
+
|
|
295
|
+
:::warning Server-set
|
|
296
|
+
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.
|
|
297
|
+
:::
|
|
298
|
+
|
|
299
|
+
## <a name="todayCollectedAmount"></a>13. Property `todayCollectedAmount`
|
|
300
|
+
|
|
301
|
+
| | |
|
|
302
|
+
| ------------ | -------- |
|
|
303
|
+
| **Type** | `number` |
|
|
304
|
+
| **Required** | Yes |
|
|
305
|
+
|
|
306
|
+
**Description:** (Read-only) Sum of totalAmount for bookings where PAYMENT_PAID_AT is today. Resets at midnight.
|
|
307
|
+
|
|
308
|
+
:::warning Server-set
|
|
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.
|
|
310
|
+
:::
|
|
311
|
+
|
|
312
|
+
## <a name="todayRevenue"></a>14. Property `todayRevenue`
|
|
313
|
+
|
|
314
|
+
| | |
|
|
315
|
+
| ------------ | -------- |
|
|
316
|
+
| **Type** | `number` |
|
|
317
|
+
| **Required** | Yes |
|
|
318
|
+
|
|
319
|
+
**Description:** (Read-only) Sum of totalAmount for COMPLETED bookings where startDate == endDate == today (numeric YYYYMMDD). Resets at midnight.
|
|
320
|
+
|
|
321
|
+
:::warning Server-set
|
|
322
|
+
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.
|
|
323
|
+
:::
|
|
324
|
+
|
|
325
|
+
## <a name="bookingsPendingPaymentVerification"></a>15. Property `bookingsPendingPaymentVerification`
|
|
326
|
+
|
|
327
|
+
| | |
|
|
328
|
+
| ------------ | --------- |
|
|
329
|
+
| **Type** | `integer` |
|
|
330
|
+
| **Required** | Yes |
|
|
331
|
+
|
|
332
|
+
**Description:** (Read-only) Bookings with status PENDING/CANCELLATION_REQUESTED and a payment proof uploaded but not yet verified. Current state, always full recalc.
|
|
333
|
+
|
|
334
|
+
| Restrictions | |
|
|
335
|
+
| ------------ | ---------------------- |
|
|
336
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
337
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
338
|
+
|
|
339
|
+
:::warning Server-set
|
|
340
|
+
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.
|
|
341
|
+
:::
|
|
342
|
+
|
|
343
|
+
## <a name="bookingsPendingValidation"></a>16. Property `bookingsPendingValidation`
|
|
344
|
+
|
|
345
|
+
| | |
|
|
346
|
+
| ------------ | --------- |
|
|
347
|
+
| **Type** | `integer` |
|
|
348
|
+
| **Required** | Yes |
|
|
349
|
+
|
|
350
|
+
**Description:** (Read-only) PENDING bookings with startDate within ±30 days of today. Rolling window, always full recalc.
|
|
351
|
+
|
|
352
|
+
| Restrictions | |
|
|
353
|
+
| ------------ | ---------------------- |
|
|
354
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
355
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
356
|
+
|
|
357
|
+
:::warning Server-set
|
|
358
|
+
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.
|
|
359
|
+
:::
|
|
360
|
+
|
|
361
|
+
## <a name="bookingsPendingValidation24h"></a>17. Property `bookingsPendingValidation24h`
|
|
362
|
+
|
|
363
|
+
| | |
|
|
364
|
+
| ------------ | --------- |
|
|
365
|
+
| **Type** | `integer` |
|
|
366
|
+
| **Required** | Yes |
|
|
367
|
+
|
|
368
|
+
**Description:** (Read-only) PENDING bookings created in the last 24h with startDate >= tomorrow. Always full recalc.
|
|
369
|
+
|
|
370
|
+
| Restrictions | |
|
|
371
|
+
| ------------ | ---------------------- |
|
|
372
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
373
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
374
|
+
|
|
375
|
+
:::warning Server-set
|
|
376
|
+
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.
|
|
377
|
+
:::
|
|
378
|
+
|
|
379
|
+
## <a name="customersCount"></a>18. Property `customersCount`
|
|
380
|
+
|
|
381
|
+
| | |
|
|
382
|
+
| ------------ | --------- |
|
|
383
|
+
| **Type** | `integer` |
|
|
384
|
+
| **Required** | Yes |
|
|
385
|
+
|
|
386
|
+
**Description:** (Read-only) Total customer count (all-time cumulative).
|
|
387
|
+
|
|
388
|
+
| Restrictions | |
|
|
389
|
+
| ------------ | ---------------------- |
|
|
390
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
391
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
392
|
+
|
|
393
|
+
:::warning Server-set
|
|
394
|
+
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.
|
|
395
|
+
:::
|
|
396
|
+
|
|
397
|
+
## <a name="newCustomersThisMonth"></a>19. Property `newCustomersThisMonth`
|
|
398
|
+
|
|
399
|
+
| | |
|
|
400
|
+
| ------------ | --------- |
|
|
401
|
+
| **Type** | `integer` |
|
|
402
|
+
| **Required** | Yes |
|
|
403
|
+
|
|
404
|
+
**Description:** (Read-only) Customers with createdAt in the current calendar month (UTC).
|
|
405
|
+
|
|
406
|
+
| Restrictions | |
|
|
407
|
+
| ------------ | ---------------------- |
|
|
408
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
409
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
410
|
+
|
|
411
|
+
:::warning Server-set
|
|
412
|
+
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.
|
|
413
|
+
:::
|
|
414
|
+
|
|
415
|
+
## <a name="averageRating"></a>20. Property `averageRating`
|
|
416
|
+
|
|
417
|
+
| | |
|
|
418
|
+
| ------------ | -------- |
|
|
419
|
+
| **Type** | `number` |
|
|
420
|
+
| **Required** | Yes |
|
|
421
|
+
|
|
422
|
+
**Description:** (Read-only) Average rating from the last 200 reviews (rolling). Always full recalc.
|
|
423
|
+
|
|
424
|
+
:::warning Server-set
|
|
425
|
+
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.
|
|
426
|
+
:::
|
|
427
|
+
|
|
428
|
+
## <a name="lowStockItemsCount"></a>21. Property `lowStockItemsCount`
|
|
429
|
+
|
|
430
|
+
| | |
|
|
431
|
+
| ------------ | --------- |
|
|
432
|
+
| **Type** | `integer` |
|
|
433
|
+
| **Required** | Yes |
|
|
434
|
+
|
|
435
|
+
**Description:** (Read-only) Active stock items where currentQuantity <= minimumQuantity. Current state, always full recalc.
|
|
436
|
+
|
|
437
|
+
| Restrictions | |
|
|
438
|
+
| ------------ | ---------------------- |
|
|
439
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
440
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
441
|
+
|
|
442
|
+
:::warning Server-set
|
|
443
|
+
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.
|
|
444
|
+
:::
|
|
445
|
+
|
|
446
|
+
## <a name="activeRecurringPaymentsCount"></a>22. Property `activeRecurringPaymentsCount`
|
|
447
|
+
|
|
448
|
+
| | |
|
|
449
|
+
| ------------ | --------- |
|
|
450
|
+
| **Type** | `integer` |
|
|
451
|
+
| **Required** | Yes |
|
|
452
|
+
|
|
453
|
+
**Description:** (Read-only) Recurring payments with status ACTIVE. Current state, always full recalc.
|
|
454
|
+
|
|
455
|
+
| Restrictions | |
|
|
456
|
+
| ------------ | ---------------------- |
|
|
457
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
458
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
459
|
+
|
|
460
|
+
:::warning Server-set
|
|
461
|
+
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.
|
|
462
|
+
:::
|
|
463
|
+
|
|
464
|
+
## <a name="monthlyRecurringRevenue"></a>23. Property `monthlyRecurringRevenue`
|
|
465
|
+
|
|
466
|
+
| | |
|
|
467
|
+
| ------------ | -------- |
|
|
468
|
+
| **Type** | `number` |
|
|
469
|
+
| **Required** | Yes |
|
|
470
|
+
|
|
471
|
+
**Description:** (Read-only) Sum of amount for ACTIVE + MONTHLY recurring payments. Always full recalc.
|
|
472
|
+
|
|
473
|
+
:::warning Server-set
|
|
474
|
+
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.
|
|
475
|
+
:::
|
|
476
|
+
|
|
477
|
+
## <a name="computedForDay"></a>24. Property `computedForDay`
|
|
478
|
+
|
|
479
|
+
| | |
|
|
480
|
+
| ------------ | -------- |
|
|
481
|
+
| **Type** | `string` |
|
|
482
|
+
| **Required** | Yes |
|
|
483
|
+
|
|
484
|
+
**Description:** (Read-only) YYYY-MM-DD string indicating which day these metrics reflect. Used to detect day boundaries and trigger midnight resets.
|
|
485
|
+
|
|
486
|
+
:::warning Server-set
|
|
487
|
+
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.
|
|
488
|
+
:::
|
|
489
|
+
|
|
490
|
+
## <a name="generatedAt"></a>25. Property `generatedAt`
|
|
491
|
+
|
|
492
|
+
| | |
|
|
493
|
+
| ------------------------- | --------------------------------- |
|
|
494
|
+
| **Type** | `object` |
|
|
495
|
+
| **Required** | Yes |
|
|
496
|
+
| **Additional properties** | Not allowed |
|
|
497
|
+
| **Defined in** | #/definitions/firestore-timestamp |
|
|
498
|
+
|
|
499
|
+
**Description:** (Read-only) Server timestamp of the last metrics write.
|
|
500
|
+
|
|
501
|
+
| Property | Pattern | Type | Deprecated | Definition | Title/Description |
|
|
502
|
+
| -------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- |
|
|
503
|
+
| + [_seconds](#generatedAt__seconds ) | No | integer | No | - | - |
|
|
504
|
+
| + [_nanoseconds](#generatedAt__nanoseconds ) | No | integer | No | - | - |
|
|
505
|
+
|
|
506
|
+
### <a name="generatedAt__seconds"></a>25.1. Property `_seconds`
|
|
507
|
+
|
|
508
|
+
| | |
|
|
509
|
+
| ------------ | --------- |
|
|
510
|
+
| **Type** | `integer` |
|
|
511
|
+
| **Required** | Yes |
|
|
512
|
+
|
|
513
|
+
| Restrictions | |
|
|
514
|
+
| ------------ | ---------------------- |
|
|
515
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
516
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
517
|
+
|
|
518
|
+
### <a name="generatedAt__nanoseconds"></a>25.2. Property `_nanoseconds`
|
|
519
|
+
|
|
520
|
+
| | |
|
|
521
|
+
| ------------ | --------- |
|
|
522
|
+
| **Type** | `integer` |
|
|
523
|
+
| **Required** | Yes |
|
|
524
|
+
|
|
525
|
+
| Restrictions | |
|
|
526
|
+
| ------------ | ---------------------- |
|
|
527
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
528
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
529
|
+
|
|
530
|
+
:::warning Server-set
|
|
531
|
+
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.
|
|
532
|
+
:::
|
|
533
|
+
|
|
534
|
+
## <a name="date"></a>26. Property `date`
|
|
535
|
+
|
|
536
|
+
| | |
|
|
537
|
+
| ------------ | -------- |
|
|
538
|
+
| **Type** | `string` |
|
|
539
|
+
| **Required** | Yes |
|
|
540
|
+
|
|
541
|
+
**Description:** (Read-only) YYYY-MM-DD document ID repeated as a field. Identifies the day this snapshot covers.
|
|
542
|
+
|
|
543
|
+
----------------------------------------------------------------------------------------------------------------------------
|
|
544
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-03-09 at 13:15:53 +0000
|
|
545
|
+
|
|
546
|
+
:::warning Server-set
|
|
547
|
+
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.
|
|
548
|
+
:::
|