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