@ingenx-io/valets-schema-mcp-server 0.2.4 → 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 (79) hide show
  1. package/data/docs/collections/firestore-paths.md +32 -20
  2. package/data/docs/enums/app-status.md +24 -0
  3. package/data/docs/enums/attention-status.md +2 -2
  4. package/data/docs/enums/booking-status.md +2 -2
  5. package/data/docs/enums/contract-status.md +24 -0
  6. package/data/docs/enums/customer-payment-status.md +2 -2
  7. package/data/docs/enums/customer-payment-target-type.md +2 -2
  8. package/data/docs/enums/delivery-type.md +2 -2
  9. package/data/docs/enums/deployment-link-type.md +2 -2
  10. package/data/docs/enums/event-status.md +2 -2
  11. package/data/docs/enums/fulfillment-status.md +2 -2
  12. package/data/docs/enums/loyalty-transaction-type.md +2 -2
  13. package/data/docs/enums/milestone-status.md +23 -0
  14. package/data/docs/enums/notification-channel.md +2 -2
  15. package/data/docs/enums/notification-entity-type.md +2 -2
  16. package/data/docs/enums/notification-status.md +2 -2
  17. package/data/docs/enums/order-status.md +2 -2
  18. package/data/docs/enums/outbound-message-format.md +2 -2
  19. package/data/docs/enums/outbound-message-purpose.md +2 -2
  20. package/data/docs/enums/outbound-message-status.md +2 -2
  21. package/data/docs/enums/payment-method.md +2 -2
  22. package/data/docs/enums/payment-proof-status.md +2 -2
  23. package/data/docs/enums/payment-status.md +2 -2
  24. package/data/docs/enums/pending-issue.md +2 -2
  25. package/data/docs/enums/return-status.md +2 -2
  26. package/data/docs/enums/session-status.md +2 -2
  27. package/data/docs/enums/site-status.md +2 -2
  28. package/data/docs/enums/stocktake-frequency.md +2 -2
  29. package/data/docs/enums/stocktake-item-status.md +2 -2
  30. package/data/docs/enums/stocktake-status.md +2 -2
  31. package/data/docs/enums/ticket-status.md +2 -2
  32. package/data/docs/enums/waba-label.md +3 -3
  33. package/data/docs/enums/whatsapp-button-sub-type.md +2 -2
  34. package/data/docs/enums/whatsapp-template-component.md +2 -2
  35. package/data/docs/enums/whatsapp-template-status.md +2 -2
  36. package/data/docs/index.md +17 -7
  37. package/data/docs/models/allowed-user.md +7 -7
  38. package/data/docs/models/analytics-backfill.md +7 -7
  39. package/data/docs/models/analytics-daily.md +6 -6
  40. package/data/docs/models/analytics-event.md +7 -7
  41. package/data/docs/models/analytics-hourly.md +6 -6
  42. package/data/docs/models/app-payment.md +200 -0
  43. package/data/docs/models/app.md +585 -0
  44. package/data/docs/models/booking-version.md +2 -2
  45. package/data/docs/models/booking.md +127 -127
  46. package/data/docs/models/contract.md +454 -0
  47. package/data/docs/models/customer-payment-allocation.md +20 -20
  48. package/data/docs/models/customer-payment.md +23 -23
  49. package/data/docs/models/customer.md +11 -11
  50. package/data/docs/models/event.md +22 -22
  51. package/data/docs/models/loyalty-config.md +4 -4
  52. package/data/docs/models/loyalty-reward.md +3 -3
  53. package/data/docs/models/loyalty-status.md +6 -6
  54. package/data/docs/models/loyalty-transaction.md +2 -2
  55. package/data/docs/models/magic-link-request.md +9 -9
  56. package/data/docs/models/metrics-current.md +169 -37
  57. package/data/docs/models/metrics-daily.md +172 -40
  58. package/data/docs/models/metrics-monthly.md +172 -40
  59. package/data/docs/models/notification-record.md +3 -3
  60. package/data/docs/models/order-item.md +6 -6
  61. package/data/docs/models/order.md +314 -294
  62. package/data/docs/models/outbound-payment-allocation.md +195 -0
  63. package/data/docs/models/outbound-payment.md +318 -0
  64. package/data/docs/models/payment-webhook-endpoint.md +191 -0
  65. package/data/docs/models/sale.md +18 -18
  66. package/data/docs/models/site-payment.md +2 -2
  67. package/data/docs/models/site.md +2 -2
  68. package/data/docs/models/stocktake-item.md +4 -4
  69. package/data/docs/models/stocktake.md +5 -5
  70. package/data/docs/models/ticket.md +3 -3
  71. package/data/docs/models/user.md +249 -0
  72. package/data/docs/models/whatsapp-inbound-message.md +6 -2
  73. package/data/docs/models/whatsapp-outbound-lifecycle-event.md +2 -2
  74. package/data/docs/models/whatsapp-outbound-message.md +43 -27
  75. package/data/docs/models/whatsapp-template.md +6 -2
  76. package/data/static/llms.txt +322 -36
  77. package/data/static/openapi.yaml +1074 -66
  78. package/data/static/schemas.json +1183 -104
  79. package/package.json +1 -1
@@ -0,0 +1,585 @@
1
+ ---
2
+ title: "App"
3
+ sidebar_label: "App"
4
+ sidebar_position: 6
5
+ ---
6
+
7
+ # App
8
+
9
+ <details>
10
+ <summary>Example JSON</summary>
11
+
12
+ ```json
13
+ {
14
+ "id": null,
15
+ "companyId": "comp_xyz789",
16
+ "name": "Amadou Diallo",
17
+ "description": null,
18
+ "status": "status",
19
+ "deploymentLinks": [
20
+ {
21
+ "label": "label",
22
+ "url": "https://storage.example.com/url.jpg",
23
+ "type": "phone"
24
+ }
25
+ ],
26
+ "expiresAt": "expiresAt",
27
+ "isExpired": null,
28
+ "createdAt": "createdAt",
29
+ "updatedAt": "updatedAt",
30
+ "createdBy": "staff_k0f1",
31
+ "analyticsEnabled": true,
32
+ "lastAnalyticsSync": "lastAnalyticsSync",
33
+ "cachedMetrics": null
34
+ }
35
+ ```
36
+
37
+ </details>
38
+
39
+
40
+ - [1. Property `id`](#id)
41
+ - [2. Property `companyId`](#companyId)
42
+ - [3. Property `name`](#name)
43
+ - [4. Property `description`](#description)
44
+ - [5. Property `status`](#status)
45
+ - [5.1. Property `app-status`](#status_anyOf_i0)
46
+ - [5.2. Property `item 1`](#status_anyOf_i1)
47
+ - [6. Property `deploymentLinks`](#deploymentLinks)
48
+ - [6.1. deploymentLinks items](#deploymentLinks_items)
49
+ - [6.1.1. Property `label`](#deploymentLinks_items_label)
50
+ - [6.1.2. Property `url`](#deploymentLinks_items_url)
51
+ - [6.1.3. Property `type`](#deploymentLinks_items_type)
52
+ - [6.1.4. Property `isPrimary`](#deploymentLinks_items_isPrimary)
53
+ - [7. Property `expiresAt`](#expiresAt)
54
+ - [7.1. Property `firestore-timestamp`](#expiresAt_anyOf_i0)
55
+ - [7.1.1. Property `_seconds`](#expiresAt_anyOf_i0__seconds)
56
+ - [7.1.2. Property `_nanoseconds`](#expiresAt_anyOf_i0__nanoseconds)
57
+ - [7.2. Property `item 1`](#expiresAt_anyOf_i1)
58
+ - [8. Property `isExpired`](#isExpired)
59
+ - [9. Property `createdAt`](#createdAt)
60
+ - [9.1. Property `firestore-timestamp`](#createdAt_anyOf_i0)
61
+ - [9.2. Property `item 1`](#createdAt_anyOf_i1)
62
+ - [10. Property `updatedAt`](#updatedAt)
63
+ - [10.1. Property `firestore-timestamp`](#updatedAt_anyOf_i0)
64
+ - [10.2. Property `item 1`](#updatedAt_anyOf_i1)
65
+ - [11. Property `createdBy`](#createdBy)
66
+ - [12. Property `analyticsEnabled`](#analyticsEnabled)
67
+ - [13. Property `lastAnalyticsSync`](#lastAnalyticsSync)
68
+ - [13.1. Property `firestore-timestamp`](#lastAnalyticsSync_anyOf_i0)
69
+ - [13.2. Property `item 1`](#lastAnalyticsSync_anyOf_i1)
70
+ - [14. Property `cachedMetrics`](#cachedMetrics)
71
+ - [14.1. Property `totalEvents`](#cachedMetrics_totalEvents)
72
+ - [14.2. Property `totalPageViews`](#cachedMetrics_totalPageViews)
73
+ - [14.3. Property `totalSessions`](#cachedMetrics_totalSessions)
74
+ - [14.4. Property `totalOrders`](#cachedMetrics_totalOrders)
75
+ - [14.5. Property `lastEventAt`](#cachedMetrics_lastEventAt)
76
+
77
+ | | |
78
+ | ------------------------- | ----------------- |
79
+ | **Type** | `object` |
80
+ | **Required** | No |
81
+ | **Additional properties** | Not allowed |
82
+ | **Defined in** | #/definitions/app |
83
+
84
+ **Description:** App model (D41 / ING-304). Collection: companies/\{companyId\}/apps/\{appId\}. Per-company product surface. Sub-collections (magic_link_requests, allowed_users, payments, analytics_events, analytics_daily, analytics_hourly, analytics_backfills) live under this document per D40/D42.
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. |
89
+ | + [companyId](#companyId ) | No | string | No | - | (Immutable) FK → Company document ID. Scopes all app sub-collections. |
90
+ | + [name](#name ) | No | string | No | - | Human-readable app name shown in dashboards. |
91
+ | - [description](#description ) | No | string or null | No | - | Optional freeform description. |
92
+ | - [status](#status ) | No | Combination | No | - | Lifecycle status (D41/D44). Optional pending backfill of pre-existing records (#26) — treat absent as ACTIVE. Clients filter by ACTIVE. |
93
+ | + [deploymentLinks](#deploymentLinks ) | No | array of object | No | - | Ordered list of deployment URLs (web, mobile, PWA, store links). |
94
+ | - [expiresAt](#expiresAt ) | No | Combination | No | - | Optional expiration timestamp. When set and elapsed, \`isExpired\` flips true and status typically moves to EXPIRED. |
95
+ | - [isExpired](#isExpired ) | No | boolean or null | No | - | (Read-only) Derived — true when \`expiresAt\` is in the past. Maintained by server trigger. |
96
+ | - [createdAt](#createdAt ) | No | Combination | No | - | (Read-only) Server-generated creation timestamp. |
97
+ | - [updatedAt](#updatedAt ) | No | Combination | No | - | (Read-only) Server-generated update timestamp. |
98
+ | + [createdBy](#createdBy ) | No | string | No | - | (Immutable) FK → User/staff UID who created the app. |
99
+ | + [analyticsEnabled](#analyticsEnabled ) | No | boolean | No | - | Feature flag — when false, clients should not emit analytics events for this app. |
100
+ | - [lastAnalyticsSync](#lastAnalyticsSync ) | No | Combination | No | - | (Read-only) Last time the analytics rollup pipeline refreshed \`cachedMetrics\`. |
101
+ | - [cachedMetrics](#cachedMetrics ) | No | object or null | No | - | (Read-only, Denormalized) Cached metrics snapshot for quick dashboard rendering. |
102
+
103
+ ## <a name="id"></a>1. Property `id`
104
+
105
+ | | |
106
+ | ------------ | ---------------- |
107
+ | **Type** | `string or null` |
108
+ | **Required** | No |
109
+
110
+ **Description:** (Read-only) Firestore document ID, auto-generated.
111
+
112
+ :::warning Server-set
113
+ 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.
114
+ :::
115
+
116
+ ## <a name="companyId"></a>2. Property `companyId`
117
+
118
+ | | |
119
+ | ------------ | -------- |
120
+ | **Type** | `string` |
121
+ | **Required** | Yes |
122
+
123
+ **Description:** (Immutable) FK → Company document ID. Scopes all app sub-collections.
124
+
125
+ :::info Immutable
126
+ 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.
127
+ :::
128
+
129
+ ## <a name="name"></a>3. Property `name`
130
+
131
+ | | |
132
+ | ------------ | -------- |
133
+ | **Type** | `string` |
134
+ | **Required** | Yes |
135
+
136
+ **Description:** Human-readable app name shown in dashboards.
137
+
138
+ ## <a name="description"></a>4. Property `description`
139
+
140
+ | | |
141
+ | ------------ | ---------------- |
142
+ | **Type** | `string or null` |
143
+ | **Required** | No |
144
+
145
+ **Description:** Optional freeform description.
146
+
147
+ ## <a name="status"></a>5. Property `status`
148
+
149
+ | | |
150
+ | ------------------------- | ---------------- |
151
+ | **Type** | `combining` |
152
+ | **Required** | No |
153
+ | **Additional properties** | Any type allowed |
154
+
155
+ **Description:** Lifecycle status (D41/D44). Optional pending backfill of pre-existing records (#26) — treat absent as ACTIVE. Clients filter by ACTIVE.
156
+
157
+ | Any of(Option) |
158
+ | ------------------------------ |
159
+ | [app-status](#status_anyOf_i0) |
160
+ | [item 1](#status_anyOf_i1) |
161
+
162
+ ### <a name="status_anyOf_i0"></a>5.1. Property `app-status`
163
+
164
+ | | |
165
+ | -------------- | ------------------------ |
166
+ | **Type** | `enum (of string)` |
167
+ | **Required** | No |
168
+ | **Defined in** | #/definitions/app-status |
169
+
170
+ **Description:** Lifecycle status for an App (formerly Site — renamed per decision #40 / D44). Drives whether the app is reachable and whether analytics/payments flow.
171
+
172
+ Must be one of:
173
+ * "ACTIVE"
174
+ * "INACTIVE"
175
+ * "EXPIRED"
176
+ * "ARCHIVED"
177
+
178
+ ### <a name="status_anyOf_i1"></a>5.2. Property `item 1`
179
+
180
+ | | |
181
+ | ------------ | ------ |
182
+ | **Type** | `null` |
183
+ | **Required** | No |
184
+
185
+ :::note
186
+ Real Firestore documents may be missing this field on pre-backfill records (#26). Treat absent as ACTIVE. A backfill script will populate status=ACTIVE on all existing documents; once confirmed, this field will be promoted to required.
187
+ :::
188
+
189
+ :::tip When to set
190
+ Written by operators via dashboard or by server triggers (expiration). Clients must not use server-side `where(status == ACTIVE)` until backfill is complete — filter client-side instead, treating absent as ACTIVE.
191
+ :::
192
+
193
+ :::info See also
194
+ **Decisions:** `D41` · `D44`
195
+ :::
196
+
197
+ ## <a name="deploymentLinks"></a>6. Property `deploymentLinks`
198
+
199
+ | | |
200
+ | ------------ | ----------------- |
201
+ | **Type** | `array of object` |
202
+ | **Required** | Yes |
203
+
204
+ **Description:** Ordered list of deployment URLs (web, mobile, PWA, store links).
205
+
206
+ | | Array restrictions |
207
+ | -------------------- | ------------------ |
208
+ | **Min items** | N/A |
209
+ | **Max items** | N/A |
210
+ | **Items unicity** | False |
211
+ | **Additional items** | False |
212
+ | **Tuple validation** | See below |
213
+
214
+ | Each item of this array must be | Description |
215
+ | ----------------------------------------------- | -------------------------------------------------------------- |
216
+ | [deploymentLinks items](#deploymentLinks_items) | Deployment link entry embedded on App.deploymentLinks[] (D41). |
217
+
218
+ ### <a name="deploymentLinks_items"></a>6.1. deploymentLinks items
219
+
220
+ | | |
221
+ | ------------------------- | ----------- |
222
+ | **Type** | `object` |
223
+ | **Required** | No |
224
+ | **Additional properties** | Not allowed |
225
+
226
+ **Description:** Deployment link entry embedded on App.deploymentLinks[] (D41).
227
+
228
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
229
+ | ------------------------------------------------ | ------- | ---------------- | ---------- | ------------------------------------- | ------------------------------------------------------------------------ |
230
+ | + [label](#deploymentLinks_items_label ) | No | string | No | - | Human-readable label shown in dashboards (e.g. "Production", "Staging"). |
231
+ | + [url](#deploymentLinks_items_url ) | No | string | No | - | Absolute URL or store link. |
232
+ | + [type](#deploymentLinks_items_type ) | No | enum (of string) | No | In #/definitions/deployment-link-type | Link category — drives icon/handler selection. |
233
+ | - [isPrimary](#deploymentLinks_items_isPrimary ) | No | boolean | No | - | If true, this link is used as the canonical deployment URL for the App. |
234
+
235
+ #### <a name="deploymentLinks_items_label"></a>6.1.1. Property `label`
236
+
237
+ | | |
238
+ | ------------ | -------- |
239
+ | **Type** | `string` |
240
+ | **Required** | Yes |
241
+
242
+ **Description:** Human-readable label shown in dashboards (e.g. "Production", "Staging").
243
+
244
+ #### <a name="deploymentLinks_items_url"></a>6.1.2. Property `url`
245
+
246
+ | | |
247
+ | ------------ | -------- |
248
+ | **Type** | `string` |
249
+ | **Required** | Yes |
250
+
251
+ **Description:** Absolute URL or store link.
252
+
253
+ #### <a name="deploymentLinks_items_type"></a>6.1.3. Property `type`
254
+
255
+ | | |
256
+ | -------------- | ---------------------------------- |
257
+ | **Type** | `enum (of string)` |
258
+ | **Required** | Yes |
259
+ | **Defined in** | #/definitions/deployment-link-type |
260
+
261
+ **Description:** Link category — drives icon/handler selection.
262
+
263
+ Must be one of:
264
+ * "web"
265
+ * "mobile"
266
+ * "pwa"
267
+ * "app-store"
268
+ * "play-store"
269
+ * "other"
270
+
271
+ #### <a name="deploymentLinks_items_isPrimary"></a>6.1.4. Property `isPrimary`
272
+
273
+ | | |
274
+ | ------------ | --------- |
275
+ | **Type** | `boolean` |
276
+ | **Required** | No |
277
+
278
+ **Description:** If true, this link is used as the canonical deployment URL for the App.
279
+
280
+ ## <a name="expiresAt"></a>7. Property `expiresAt`
281
+
282
+ | | |
283
+ | ------------------------- | ---------------- |
284
+ | **Type** | `combining` |
285
+ | **Required** | No |
286
+ | **Additional properties** | Any type allowed |
287
+
288
+ **Description:** Optional expiration timestamp. When set and elapsed, `isExpired` flips true and status typically moves to EXPIRED.
289
+
290
+ | Any of(Option) |
291
+ | ------------------------------------------ |
292
+ | [firestore-timestamp](#expiresAt_anyOf_i0) |
293
+ | [item 1](#expiresAt_anyOf_i1) |
294
+
295
+ ### <a name="expiresAt_anyOf_i0"></a>7.1. Property `firestore-timestamp`
296
+
297
+ | | |
298
+ | ------------------------- | --------------------------------- |
299
+ | **Type** | `object` |
300
+ | **Required** | No |
301
+ | **Additional properties** | Not allowed |
302
+ | **Defined in** | #/definitions/firestore-timestamp |
303
+
304
+ **Description:** Firestore Timestamp — Admin SDK form: \{ _seconds, _nanoseconds \}. See types/firestore.ts for REST API v1 and client SDK serialization notes (#10).
305
+
306
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
307
+ | --------------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- |
308
+ | + [_seconds](#expiresAt_anyOf_i0__seconds ) | No | integer | No | - | - |
309
+ | + [_nanoseconds](#expiresAt_anyOf_i0__nanoseconds ) | No | integer | No | - | - |
310
+
311
+ #### <a name="expiresAt_anyOf_i0__seconds"></a>7.1.1. Property `_seconds`
312
+
313
+ | | |
314
+ | ------------ | --------- |
315
+ | **Type** | `integer` |
316
+ | **Required** | Yes |
317
+
318
+ | Restrictions | |
319
+ | ------------ | ---------------------- |
320
+ | **Minimum** | &ge; -9007199254740991 |
321
+ | **Maximum** | &le; 9007199254740991 |
322
+
323
+ #### <a name="expiresAt_anyOf_i0__nanoseconds"></a>7.1.2. Property `_nanoseconds`
324
+
325
+ | | |
326
+ | ------------ | --------- |
327
+ | **Type** | `integer` |
328
+ | **Required** | Yes |
329
+
330
+ | Restrictions | |
331
+ | ------------ | ---------------------- |
332
+ | **Minimum** | &ge; -9007199254740991 |
333
+ | **Maximum** | &le; 9007199254740991 |
334
+
335
+ ### <a name="expiresAt_anyOf_i1"></a>7.2. Property `item 1`
336
+
337
+ | | |
338
+ | ------------ | ------ |
339
+ | **Type** | `null` |
340
+ | **Required** | No |
341
+
342
+ ## <a name="isExpired"></a>8. Property `isExpired`
343
+
344
+ | | |
345
+ | ------------ | ----------------- |
346
+ | **Type** | `boolean or null` |
347
+ | **Required** | No |
348
+
349
+ **Description:** (Read-only) Derived — true when `expiresAt` is in the past. Maintained by server trigger.
350
+
351
+ :::warning Server-set
352
+ 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.
353
+ :::
354
+
355
+ ## <a name="createdAt"></a>9. Property `createdAt`
356
+
357
+ | | |
358
+ | ------------------------- | ---------------- |
359
+ | **Type** | `combining` |
360
+ | **Required** | No |
361
+ | **Additional properties** | Any type allowed |
362
+
363
+ **Description:** (Read-only) Server-generated creation timestamp.
364
+
365
+ | Any of(Option) |
366
+ | ------------------------------------------ |
367
+ | [firestore-timestamp](#createdAt_anyOf_i0) |
368
+ | [item 1](#createdAt_anyOf_i1) |
369
+
370
+ ### <a name="createdAt_anyOf_i0"></a>9.1. Property `firestore-timestamp`
371
+
372
+ | | |
373
+ | ------------------------- | ----------------------------------------- |
374
+ | **Type** | `object` |
375
+ | **Required** | No |
376
+ | **Additional properties** | Not allowed |
377
+ | **Same definition as** | [expiresAt_anyOf_i0](#expiresAt_anyOf_i0) |
378
+
379
+ **Description:** Firestore Timestamp — Admin SDK form: \{ _seconds, _nanoseconds \}. See types/firestore.ts for REST API v1 and client SDK serialization notes (#10).
380
+
381
+ ### <a name="createdAt_anyOf_i1"></a>9.2. Property `item 1`
382
+
383
+ | | |
384
+ | ------------ | ------ |
385
+ | **Type** | `null` |
386
+ | **Required** | No |
387
+
388
+ :::warning Server-set
389
+ 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.
390
+ :::
391
+
392
+ ## <a name="updatedAt"></a>10. Property `updatedAt`
393
+
394
+ | | |
395
+ | ------------------------- | ---------------- |
396
+ | **Type** | `combining` |
397
+ | **Required** | No |
398
+ | **Additional properties** | Any type allowed |
399
+
400
+ **Description:** (Read-only) Server-generated update timestamp.
401
+
402
+ | Any of(Option) |
403
+ | ------------------------------------------ |
404
+ | [firestore-timestamp](#updatedAt_anyOf_i0) |
405
+ | [item 1](#updatedAt_anyOf_i1) |
406
+
407
+ ### <a name="updatedAt_anyOf_i0"></a>10.1. Property `firestore-timestamp`
408
+
409
+ | | |
410
+ | ------------------------- | ----------------------------------------- |
411
+ | **Type** | `object` |
412
+ | **Required** | No |
413
+ | **Additional properties** | Not allowed |
414
+ | **Same definition as** | [expiresAt_anyOf_i0](#expiresAt_anyOf_i0) |
415
+
416
+ **Description:** Firestore Timestamp — Admin SDK form: \{ _seconds, _nanoseconds \}. See types/firestore.ts for REST API v1 and client SDK serialization notes (#10).
417
+
418
+ ### <a name="updatedAt_anyOf_i1"></a>10.2. Property `item 1`
419
+
420
+ | | |
421
+ | ------------ | ------ |
422
+ | **Type** | `null` |
423
+ | **Required** | No |
424
+
425
+ :::warning Server-set
426
+ 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.
427
+ :::
428
+
429
+ ## <a name="createdBy"></a>11. Property `createdBy`
430
+
431
+ | | |
432
+ | ------------ | -------- |
433
+ | **Type** | `string` |
434
+ | **Required** | Yes |
435
+
436
+ **Description:** (Immutable) FK → User/staff UID who created the app.
437
+
438
+ :::info Immutable
439
+ 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.
440
+ :::
441
+
442
+ ## <a name="analyticsEnabled"></a>12. Property `analyticsEnabled`
443
+
444
+ | | |
445
+ | ------------ | --------- |
446
+ | **Type** | `boolean` |
447
+ | **Required** | Yes |
448
+
449
+ **Description:** Feature flag — when false, clients should not emit analytics events for this app.
450
+
451
+ ## <a name="lastAnalyticsSync"></a>13. Property `lastAnalyticsSync`
452
+
453
+ | | |
454
+ | ------------------------- | ---------------- |
455
+ | **Type** | `combining` |
456
+ | **Required** | No |
457
+ | **Additional properties** | Any type allowed |
458
+
459
+ **Description:** (Read-only) Last time the analytics rollup pipeline refreshed `cachedMetrics`.
460
+
461
+ | Any of(Option) |
462
+ | -------------------------------------------------- |
463
+ | [firestore-timestamp](#lastAnalyticsSync_anyOf_i0) |
464
+ | [item 1](#lastAnalyticsSync_anyOf_i1) |
465
+
466
+ ### <a name="lastAnalyticsSync_anyOf_i0"></a>13.1. Property `firestore-timestamp`
467
+
468
+ | | |
469
+ | ------------------------- | ----------------------------------------- |
470
+ | **Type** | `object` |
471
+ | **Required** | No |
472
+ | **Additional properties** | Not allowed |
473
+ | **Same definition as** | [expiresAt_anyOf_i0](#expiresAt_anyOf_i0) |
474
+
475
+ **Description:** Firestore Timestamp — Admin SDK form: \{ _seconds, _nanoseconds \}. See types/firestore.ts for REST API v1 and client SDK serialization notes (#10).
476
+
477
+ ### <a name="lastAnalyticsSync_anyOf_i1"></a>13.2. Property `item 1`
478
+
479
+ | | |
480
+ | ------------ | ------ |
481
+ | **Type** | `null` |
482
+ | **Required** | No |
483
+
484
+ :::warning Server-set
485
+ 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.
486
+ :::
487
+
488
+ ## <a name="cachedMetrics"></a>14. Property `cachedMetrics`
489
+
490
+ | | |
491
+ | ------------ | ---------------- |
492
+ | **Type** | `object or null` |
493
+ | **Required** | No |
494
+
495
+ **Description:** (Read-only, Denormalized) Cached metrics snapshot for quick dashboard rendering.
496
+
497
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
498
+ | -------------------------------------------------- | ------- | ------- | ---------- | -------------------------------------------------- | ----------------------------------------------------------------------- |
499
+ | + [totalEvents](#cachedMetrics_totalEvents ) | No | integer | No | - | All-time event count cached on the App. |
500
+ | + [totalPageViews](#cachedMetrics_totalPageViews ) | No | integer | No | - | All-time \`page_view\` + \`screen_view\` count. |
501
+ | + [totalSessions](#cachedMetrics_totalSessions ) | No | integer | No | - | All-time distinct session count. |
502
+ | + [totalOrders](#cachedMetrics_totalOrders ) | No | integer | No | - | All-time order count attributed to this app (via \`Order.appId\`, D43). |
503
+ | - [lastEventAt](#cachedMetrics_lastEventAt ) | No | object | No | Same as [expiresAt_anyOf_i0](#expiresAt_anyOf_i0 ) | Timestamp of the most recent analytics event seen for this app. |
504
+
505
+ ### <a name="cachedMetrics_totalEvents"></a>14.1. Property `totalEvents`
506
+
507
+ | | |
508
+ | ------------ | --------- |
509
+ | **Type** | `integer` |
510
+ | **Required** | Yes |
511
+
512
+ **Description:** All-time event count cached on the App.
513
+
514
+ | Restrictions | |
515
+ | ------------ | ---------------------- |
516
+ | **Minimum** | &ge; -9007199254740991 |
517
+ | **Maximum** | &le; 9007199254740991 |
518
+
519
+ ### <a name="cachedMetrics_totalPageViews"></a>14.2. Property `totalPageViews`
520
+
521
+ | | |
522
+ | ------------ | --------- |
523
+ | **Type** | `integer` |
524
+ | **Required** | Yes |
525
+
526
+ **Description:** All-time `page_view` + `screen_view` count.
527
+
528
+ | Restrictions | |
529
+ | ------------ | ---------------------- |
530
+ | **Minimum** | &ge; -9007199254740991 |
531
+ | **Maximum** | &le; 9007199254740991 |
532
+
533
+ ### <a name="cachedMetrics_totalSessions"></a>14.3. Property `totalSessions`
534
+
535
+ | | |
536
+ | ------------ | --------- |
537
+ | **Type** | `integer` |
538
+ | **Required** | Yes |
539
+
540
+ **Description:** All-time distinct session count.
541
+
542
+ | Restrictions | |
543
+ | ------------ | ---------------------- |
544
+ | **Minimum** | &ge; -9007199254740991 |
545
+ | **Maximum** | &le; 9007199254740991 |
546
+
547
+ ### <a name="cachedMetrics_totalOrders"></a>14.4. Property `totalOrders`
548
+
549
+ | | |
550
+ | ------------ | --------- |
551
+ | **Type** | `integer` |
552
+ | **Required** | Yes |
553
+
554
+ **Description:** All-time order count attributed to this app (via `Order.appId`, D43).
555
+
556
+ | Restrictions | |
557
+ | ------------ | ---------------------- |
558
+ | **Minimum** | &ge; -9007199254740991 |
559
+ | **Maximum** | &le; 9007199254740991 |
560
+
561
+ ### <a name="cachedMetrics_lastEventAt"></a>14.5. Property `lastEventAt`
562
+
563
+ | | |
564
+ | ------------------------- | ----------------------------------------- |
565
+ | **Type** | `object` |
566
+ | **Required** | No |
567
+ | **Additional properties** | Not allowed |
568
+ | **Same definition as** | [expiresAt_anyOf_i0](#expiresAt_anyOf_i0) |
569
+
570
+ **Description:** Timestamp of the most recent analytics event seen for this app.
571
+
572
+ ----------------------------------------------------------------------------------------------------------------------------
573
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:38:44 +0000
574
+
575
+ :::warning Server-set
576
+ 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.
577
+ :::
578
+
579
+ :::note
580
+ Updated by the rollup pipeline (D42). Readers should treat this as a hint; authoritative counts live in analytics_daily/analytics_hourly.
581
+ :::
582
+
583
+ :::info See also
584
+ **Decisions:** `D41` · `D42`
585
+ :::
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "BookingVersion"
3
3
  sidebar_label: "BookingVersion"
4
- sidebar_position: 7
4
+ sidebar_position: 9
5
5
  ---
6
6
 
7
7
  # BookingVersion
@@ -270,7 +270,7 @@ Dot-notation paths for nested fields (e.g. "bookingDates.0.status"). Populated b
270
270
  | **Additional properties** | Any type allowed |
271
271
 
272
272
  ----------------------------------------------------------------------------------------------------------------------------
273
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-27 at 15:51:05 +0000
273
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:38:45 +0000
274
274
 
275
275
  :::warning Server-set
276
276
  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.