@ingenx-io/valets-schema-mcp-server 0.2.5 → 0.2.7

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 (82) hide show
  1. package/data/docs/collections/firestore-paths.md +20 -0
  2. package/data/docs/enums/app-status.md +1 -1
  3. package/data/docs/enums/attention-status.md +1 -1
  4. package/data/docs/enums/booking-status.md +1 -1
  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/expense-payment-status.md +24 -0
  12. package/data/docs/enums/fulfillment-status.md +2 -2
  13. package/data/docs/enums/loyalty-transaction-type.md +2 -2
  14. package/data/docs/enums/milestone-status.md +23 -0
  15. package/data/docs/enums/notification-channel.md +2 -2
  16. package/data/docs/enums/notification-entity-type.md +2 -2
  17. package/data/docs/enums/notification-status.md +2 -2
  18. package/data/docs/enums/order-status.md +2 -2
  19. package/data/docs/enums/outbound-message-format.md +2 -2
  20. package/data/docs/enums/outbound-message-purpose.md +2 -2
  21. package/data/docs/enums/outbound-message-status.md +2 -2
  22. package/data/docs/enums/payment-method.md +4 -3
  23. package/data/docs/enums/payment-proof-status.md +2 -2
  24. package/data/docs/enums/payment-status.md +2 -2
  25. package/data/docs/enums/pending-issue.md +2 -2
  26. package/data/docs/enums/return-status.md +2 -2
  27. package/data/docs/enums/session-status.md +2 -2
  28. package/data/docs/enums/site-status.md +2 -2
  29. package/data/docs/enums/stocktake-frequency.md +2 -2
  30. package/data/docs/enums/stocktake-item-status.md +2 -2
  31. package/data/docs/enums/stocktake-status.md +2 -2
  32. package/data/docs/enums/ticket-status.md +2 -2
  33. package/data/docs/enums/waba-label.md +3 -3
  34. package/data/docs/enums/whatsapp-button-sub-type.md +2 -2
  35. package/data/docs/enums/whatsapp-template-component.md +2 -2
  36. package/data/docs/enums/whatsapp-template-status.md +2 -2
  37. package/data/docs/index.md +15 -6
  38. package/data/docs/models/allowed-user.md +1 -1
  39. package/data/docs/models/analytics-backfill.md +1 -1
  40. package/data/docs/models/analytics-daily.md +1 -1
  41. package/data/docs/models/analytics-event.md +1 -1
  42. package/data/docs/models/analytics-hourly.md +1 -1
  43. package/data/docs/models/app-payment.md +1 -1
  44. package/data/docs/models/app.md +45 -21
  45. package/data/docs/models/booking-version.md +1 -1
  46. package/data/docs/models/booking.md +1 -1
  47. package/data/docs/models/contract.md +454 -0
  48. package/data/docs/models/customer-payment-allocation.md +2 -2
  49. package/data/docs/models/customer-payment.md +23 -22
  50. package/data/docs/models/customer.md +2 -2
  51. package/data/docs/models/event.md +2 -2
  52. package/data/docs/models/expense.md +434 -0
  53. package/data/docs/models/loyalty-config.md +2 -2
  54. package/data/docs/models/loyalty-reward.md +2 -2
  55. package/data/docs/models/loyalty-status.md +2 -2
  56. package/data/docs/models/loyalty-transaction.md +2 -2
  57. package/data/docs/models/magic-link-request.md +2 -2
  58. package/data/docs/models/metrics-current.md +22 -2
  59. package/data/docs/models/metrics-daily.md +92 -41
  60. package/data/docs/models/metrics-monthly.md +22 -2
  61. package/data/docs/models/notification-record.md +2 -2
  62. package/data/docs/models/order-item.md +2 -2
  63. package/data/docs/models/order.md +291 -270
  64. package/data/docs/models/outbound-payment-allocation.md +195 -0
  65. package/data/docs/models/outbound-payment.md +319 -0
  66. package/data/docs/models/payment-webhook-delivery.md +321 -0
  67. package/data/docs/models/payment-webhook-endpoint.md +191 -0
  68. package/data/docs/models/sale.md +2 -2
  69. package/data/docs/models/site-payment.md +2 -2
  70. package/data/docs/models/site.md +2 -2
  71. package/data/docs/models/stocktake-item.md +2 -2
  72. package/data/docs/models/stocktake.md +2 -2
  73. package/data/docs/models/ticket.md +2 -2
  74. package/data/docs/models/user.md +2 -2
  75. package/data/docs/models/whatsapp-inbound-message.md +6 -2
  76. package/data/docs/models/whatsapp-outbound-lifecycle-event.md +2 -2
  77. package/data/docs/models/whatsapp-outbound-message.md +39 -23
  78. package/data/docs/models/whatsapp-template.md +6 -2
  79. package/data/static/llms.txt +242 -10
  80. package/data/static/openapi.yaml +826 -23
  81. package/data/static/schemas.json +877 -71
  82. package/package.json +1 -1
@@ -0,0 +1,434 @@
1
+ ---
2
+ title: "Expense"
3
+ sidebar_label: "Expense"
4
+ sidebar_position: 15
5
+ ---
6
+
7
+ # Expense
8
+
9
+ <details>
10
+ <summary>Example JSON</summary>
11
+
12
+ ```json
13
+ {
14
+ "id": null,
15
+ "companyId": "comp_xyz789",
16
+ "title": "title",
17
+ "description": null,
18
+ "amount": 45000,
19
+ "currency": "XOF",
20
+ "dueDate": "dueDate",
21
+ "paymentStatus": "paymentStatus",
22
+ "amountDue": null,
23
+ "amountPaid": null,
24
+ "allocatedAmount": null,
25
+ "balance": null,
26
+ "paidDate": "pai_ref123",
27
+ "paymentReference": null,
28
+ "createdBy": "staff_k0f1",
29
+ "createdAt": "createdAt",
30
+ "updatedAt": "updatedAt"
31
+ }
32
+ ```
33
+
34
+ </details>
35
+
36
+
37
+ - [1. Property `id`](#id)
38
+ - [2. Property `companyId`](#companyId)
39
+ - [3. Property `title`](#title)
40
+ - [4. Property `description`](#description)
41
+ - [5. Property `amount`](#amount)
42
+ - [6. Property `currency`](#currency)
43
+ - [7. Property `dueDate`](#dueDate)
44
+ - [7.1. Property `firestore-timestamp`](#dueDate_anyOf_i0)
45
+ - [7.1.1. Property `_seconds`](#dueDate_anyOf_i0__seconds)
46
+ - [7.1.2. Property `_nanoseconds`](#dueDate_anyOf_i0__nanoseconds)
47
+ - [7.2. Property `item 1`](#dueDate_anyOf_i1)
48
+ - [8. Property `paymentStatus`](#paymentStatus)
49
+ - [9. Property `amountDue`](#amountDue)
50
+ - [10. Property `amountPaid`](#amountPaid)
51
+ - [11. Property `allocatedAmount`](#allocatedAmount)
52
+ - [12. Property `balance`](#balance)
53
+ - [13. Property `paidDate`](#paidDate)
54
+ - [13.1. Property `firestore-timestamp`](#paidDate_anyOf_i0)
55
+ - [13.2. Property `item 1`](#paidDate_anyOf_i1)
56
+ - [14. Property `paymentReference`](#paymentReference)
57
+ - [15. Property `createdBy`](#createdBy)
58
+ - [16. Property `createdAt`](#createdAt)
59
+ - [16.1. Property `firestore-timestamp`](#createdAt_anyOf_i0)
60
+ - [16.2. Property `item 1`](#createdAt_anyOf_i1)
61
+ - [17. Property `updatedAt`](#updatedAt)
62
+ - [17.1. Property `firestore-timestamp`](#updatedAt_anyOf_i0)
63
+ - [17.2. Property `item 1`](#updatedAt_anyOf_i1)
64
+
65
+ | | |
66
+ | ------------------------- | --------------------- |
67
+ | **Type** | `object` |
68
+ | **Required** | No |
69
+ | **Additional properties** | Not allowed |
70
+ | **Defined in** | #/definitions/expense |
71
+
72
+ **Description:** Expense (GH#12/#13/#19 partial). Collection: companies/\{companyId\}/expenses/\{expenseId\}. Dual balance tracking: amountPaid/amountDue for simple expenses; allocatedAmount/balance (server-set) for allocation-settled expenses. OVERDUE excluded from stored enum — derive at read time. Full domain (Payee FK, Contract FK) in #20.
73
+
74
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
75
+ | ---------------------------------------- | ------- | ---------------- | ---------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
76
+ | - [id](#id ) | No | string or null | No | - | (Read-only) Firestore document ID, auto-generated. |
77
+ | + [companyId](#companyId ) | No | string | No | - | (Immutable) FK → Company document ID. |
78
+ | + [title](#title ) | No | string | No | - | Human-readable expense title (e.g. "Loyer mars 2026", "Facture EAU"). |
79
+ | - [description](#description ) | No | string or null | No | - | Optional longer description or notes. |
80
+ | + [amount](#amount ) | No | number | No | - | Total expense amount (XOF). |
81
+ | + [currency](#currency ) | No | const | No | - | Currency code. Locked to XOF. |
82
+ | - [dueDate](#dueDate ) | No | Combination | No | - | When the expense is due. Used to compute OVERDUE state at read time (not stored in paymentStatus). |
83
+ | + [paymentStatus](#paymentStatus ) | No | enum (of string) | No | In #/definitions/expense-payment-status | Current payment status. OVERDUE is never stored — derive from dueDate at read time (#13). |
84
+ | - [amountDue](#amountDue ) | No | number or null | No | - | Amount still owed. Authoritative when no OutboundPaymentAllocation records exist for this expense. |
85
+ | - [amountPaid](#amountPaid ) | No | number or null | No | - | Amount paid to date (simple tracking, no allocations). |
86
+ | - [allocatedAmount](#allocatedAmount ) | No | number or null | No | - | (Read-only) Total amount allocated via OutboundPaymentAllocation records. Authoritative when allocations exist. |
87
+ | - [balance](#balance ) | No | number or null | No | - | (Read-only) Remaining balance: amount minus allocatedAmount. Authoritative when OutboundPaymentAllocation records exist. |
88
+ | - [paidDate](#paidDate ) | No | Combination | No | - | When the expense was fully settled (paymentStatus = PAID). Null otherwise. |
89
+ | - [paymentReference](#paymentReference ) | No | string or null | No | - | Most recent payment transaction reference. Overwritten on each payment; not a full history. |
90
+ | + [createdBy](#createdBy ) | No | string | No | - | (Immutable) FK → User/staff UID who created this expense record. |
91
+ | - [createdAt](#createdAt ) | No | Combination | No | - | (Read-only) Server-generated creation timestamp. |
92
+ | - [updatedAt](#updatedAt ) | No | Combination | No | - | (Read-only) Server-generated last-update timestamp. |
93
+
94
+ ## <a name="id"></a>1. Property `id`
95
+
96
+ | | |
97
+ | ------------ | ---------------- |
98
+ | **Type** | `string or null` |
99
+ | **Required** | No |
100
+
101
+ **Description:** (Read-only) Firestore document ID, auto-generated.
102
+
103
+ :::warning Server-set
104
+ 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.
105
+ :::
106
+
107
+ ## <a name="companyId"></a>2. Property `companyId`
108
+
109
+ | | |
110
+ | ------------ | -------- |
111
+ | **Type** | `string` |
112
+ | **Required** | Yes |
113
+
114
+ **Description:** (Immutable) FK → Company document ID.
115
+
116
+ :::info Immutable
117
+ 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.
118
+ :::
119
+
120
+ ## <a name="title"></a>3. Property `title`
121
+
122
+ | | |
123
+ | ------------ | -------- |
124
+ | **Type** | `string` |
125
+ | **Required** | Yes |
126
+
127
+ **Description:** Human-readable expense title (e.g. "Loyer mars 2026", "Facture EAU").
128
+
129
+ ## <a name="description"></a>4. Property `description`
130
+
131
+ | | |
132
+ | ------------ | ---------------- |
133
+ | **Type** | `string or null` |
134
+ | **Required** | No |
135
+
136
+ **Description:** Optional longer description or notes.
137
+
138
+ ## <a name="amount"></a>5. Property `amount`
139
+
140
+ | | |
141
+ | ------------ | -------- |
142
+ | **Type** | `number` |
143
+ | **Required** | Yes |
144
+
145
+ **Description:** Total expense amount (XOF).
146
+
147
+ ## <a name="currency"></a>6. Property `currency`
148
+
149
+ | | |
150
+ | ------------ | ------- |
151
+ | **Type** | `const` |
152
+ | **Required** | Yes |
153
+
154
+ **Description:** Currency code. Locked to XOF.
155
+
156
+ Specific value: `"XOF"`
157
+
158
+ ## <a name="dueDate"></a>7. Property `dueDate`
159
+
160
+ | | |
161
+ | ------------------------- | ---------------- |
162
+ | **Type** | `combining` |
163
+ | **Required** | No |
164
+ | **Additional properties** | Any type allowed |
165
+
166
+ **Description:** When the expense is due. Used to compute OVERDUE state at read time (not stored in paymentStatus).
167
+
168
+ | Any of(Option) |
169
+ | ---------------------------------------- |
170
+ | [firestore-timestamp](#dueDate_anyOf_i0) |
171
+ | [item 1](#dueDate_anyOf_i1) |
172
+
173
+ ### <a name="dueDate_anyOf_i0"></a>7.1. Property `firestore-timestamp`
174
+
175
+ | | |
176
+ | ------------------------- | --------------------------------- |
177
+ | **Type** | `object` |
178
+ | **Required** | No |
179
+ | **Additional properties** | Not allowed |
180
+ | **Defined in** | #/definitions/firestore-timestamp |
181
+
182
+ **Description:** Firestore Timestamp — Admin SDK form: \{ _seconds, _nanoseconds \}. See types/firestore.ts for REST API v1 and client SDK serialization notes (#10).
183
+
184
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
185
+ | ------------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- |
186
+ | + [_seconds](#dueDate_anyOf_i0__seconds ) | No | integer | No | - | - |
187
+ | + [_nanoseconds](#dueDate_anyOf_i0__nanoseconds ) | No | integer | No | - | - |
188
+
189
+ #### <a name="dueDate_anyOf_i0__seconds"></a>7.1.1. Property `_seconds`
190
+
191
+ | | |
192
+ | ------------ | --------- |
193
+ | **Type** | `integer` |
194
+ | **Required** | Yes |
195
+
196
+ | Restrictions | |
197
+ | ------------ | ---------------------- |
198
+ | **Minimum** | &ge; -9007199254740991 |
199
+ | **Maximum** | &le; 9007199254740991 |
200
+
201
+ #### <a name="dueDate_anyOf_i0__nanoseconds"></a>7.1.2. Property `_nanoseconds`
202
+
203
+ | | |
204
+ | ------------ | --------- |
205
+ | **Type** | `integer` |
206
+ | **Required** | Yes |
207
+
208
+ | Restrictions | |
209
+ | ------------ | ---------------------- |
210
+ | **Minimum** | &ge; -9007199254740991 |
211
+ | **Maximum** | &le; 9007199254740991 |
212
+
213
+ ### <a name="dueDate_anyOf_i1"></a>7.2. Property `item 1`
214
+
215
+ | | |
216
+ | ------------ | ------ |
217
+ | **Type** | `null` |
218
+ | **Required** | No |
219
+
220
+ ## <a name="paymentStatus"></a>8. Property `paymentStatus`
221
+
222
+ | | |
223
+ | -------------- | ------------------------------------ |
224
+ | **Type** | `enum (of string)` |
225
+ | **Required** | Yes |
226
+ | **Defined in** | #/definitions/expense-payment-status |
227
+
228
+ **Description:** Current payment status. OVERDUE is never stored — derive from dueDate at read time (#13).
229
+
230
+ Must be one of:
231
+ * "PENDING"
232
+ * "PARTIALLY_PAID"
233
+ * "PAID"
234
+ * "FAILED"
235
+
236
+ :::note
237
+ OVERDUE is intentionally excluded — it is never stored in Firestore. Compute it at read time: expense.paymentStatus !== PAID && expense.dueDate < now() (#13). Helper: isExpenseOverdue(expense: Expense): boolean.
238
+ :::
239
+
240
+ ## <a name="amountDue"></a>9. Property `amountDue`
241
+
242
+ | | |
243
+ | ------------ | ---------------- |
244
+ | **Type** | `number or null` |
245
+ | **Required** | No |
246
+
247
+ **Description:** Amount still owed. Authoritative when no OutboundPaymentAllocation records exist for this expense.
248
+
249
+ :::note
250
+ Authoritative for simple (non-allocation) expenses. Legacy field maintained for backward compatibility when no OutboundPaymentAllocation records exist (#12).
251
+ :::
252
+
253
+ ## <a name="amountPaid"></a>10. Property `amountPaid`
254
+
255
+ | | |
256
+ | ------------ | ---------------- |
257
+ | **Type** | `number or null` |
258
+ | **Required** | No |
259
+
260
+ **Description:** Amount paid to date (simple tracking, no allocations).
261
+
262
+ ## <a name="allocatedAmount"></a>11. Property `allocatedAmount`
263
+
264
+ | | |
265
+ | ------------ | ---------------- |
266
+ | **Type** | `number or null` |
267
+ | **Required** | No |
268
+
269
+ **Description:** (Read-only) Total amount allocated via OutboundPaymentAllocation records. Authoritative when allocations exist.
270
+
271
+ :::warning Server-set
272
+ 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.
273
+ :::
274
+
275
+ :::note
276
+ Server-set — computed from OutboundPaymentAllocation records. Clients must never write this field (#12).
277
+ :::
278
+
279
+ ## <a name="balance"></a>12. Property `balance`
280
+
281
+ | | |
282
+ | ------------ | ---------------- |
283
+ | **Type** | `number or null` |
284
+ | **Required** | No |
285
+
286
+ **Description:** (Read-only) Remaining balance: amount minus allocatedAmount. Authoritative when OutboundPaymentAllocation records exist.
287
+
288
+ :::warning Server-set
289
+ 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.
290
+ :::
291
+
292
+ :::note
293
+ Server-set — computed as amount - allocatedAmount. Authoritative remaining amount when allocations exist. Prefer this over amountDue when OutboundPaymentAllocation records are present (#12).
294
+ :::
295
+
296
+ ## <a name="paidDate"></a>13. Property `paidDate`
297
+
298
+ | | |
299
+ | ------------------------- | ---------------- |
300
+ | **Type** | `combining` |
301
+ | **Required** | No |
302
+ | **Additional properties** | Any type allowed |
303
+
304
+ **Description:** When the expense was fully settled (paymentStatus = PAID). Null otherwise.
305
+
306
+ | Any of(Option) |
307
+ | ----------------------------------------- |
308
+ | [firestore-timestamp](#paidDate_anyOf_i0) |
309
+ | [item 1](#paidDate_anyOf_i1) |
310
+
311
+ ### <a name="paidDate_anyOf_i0"></a>13.1. Property `firestore-timestamp`
312
+
313
+ | | |
314
+ | ------------------------- | ------------------------------------- |
315
+ | **Type** | `object` |
316
+ | **Required** | No |
317
+ | **Additional properties** | Not allowed |
318
+ | **Same definition as** | [dueDate_anyOf_i0](#dueDate_anyOf_i0) |
319
+
320
+ **Description:** Firestore Timestamp — Admin SDK form: \{ _seconds, _nanoseconds \}. See types/firestore.ts for REST API v1 and client SDK serialization notes (#10).
321
+
322
+ ### <a name="paidDate_anyOf_i1"></a>13.2. Property `item 1`
323
+
324
+ | | |
325
+ | ------------ | ------ |
326
+ | **Type** | `null` |
327
+ | **Required** | No |
328
+
329
+ :::tip When to set
330
+ Set when paymentStatus transitions to PAID (fully settled). Null for partially paid or unpaid expenses. For multi-payment history, read OutboundPaymentAllocation records (#19).
331
+ :::
332
+
333
+ ## <a name="paymentReference"></a>14. Property `paymentReference`
334
+
335
+ | | |
336
+ | ------------ | ---------------- |
337
+ | **Type** | `string or null` |
338
+ | **Required** | No |
339
+
340
+ **Description:** Most recent payment transaction reference. Overwritten on each payment; not a full history.
341
+
342
+ :::note
343
+ Reference for the most recent payment transaction (check number, wire ID, Wave ref, etc.). Overwritten on each payment. For full payment history read OutboundPaymentAllocation records (#19).
344
+ :::
345
+
346
+ ## <a name="createdBy"></a>15. Property `createdBy`
347
+
348
+ | | |
349
+ | ------------ | -------- |
350
+ | **Type** | `string` |
351
+ | **Required** | Yes |
352
+
353
+ **Description:** (Immutable) FK → User/staff UID who created this expense record.
354
+
355
+ :::info Immutable
356
+ 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.
357
+ :::
358
+
359
+ ## <a name="createdAt"></a>16. Property `createdAt`
360
+
361
+ | | |
362
+ | ------------------------- | ---------------- |
363
+ | **Type** | `combining` |
364
+ | **Required** | No |
365
+ | **Additional properties** | Any type allowed |
366
+
367
+ **Description:** (Read-only) Server-generated creation timestamp.
368
+
369
+ | Any of(Option) |
370
+ | ------------------------------------------ |
371
+ | [firestore-timestamp](#createdAt_anyOf_i0) |
372
+ | [item 1](#createdAt_anyOf_i1) |
373
+
374
+ ### <a name="createdAt_anyOf_i0"></a>16.1. Property `firestore-timestamp`
375
+
376
+ | | |
377
+ | ------------------------- | ------------------------------------- |
378
+ | **Type** | `object` |
379
+ | **Required** | No |
380
+ | **Additional properties** | Not allowed |
381
+ | **Same definition as** | [dueDate_anyOf_i0](#dueDate_anyOf_i0) |
382
+
383
+ **Description:** Firestore Timestamp — Admin SDK form: \{ _seconds, _nanoseconds \}. See types/firestore.ts for REST API v1 and client SDK serialization notes (#10).
384
+
385
+ ### <a name="createdAt_anyOf_i1"></a>16.2. Property `item 1`
386
+
387
+ | | |
388
+ | ------------ | ------ |
389
+ | **Type** | `null` |
390
+ | **Required** | No |
391
+
392
+ :::warning Server-set
393
+ 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.
394
+ :::
395
+
396
+ ## <a name="updatedAt"></a>17. Property `updatedAt`
397
+
398
+ | | |
399
+ | ------------------------- | ---------------- |
400
+ | **Type** | `combining` |
401
+ | **Required** | No |
402
+ | **Additional properties** | Any type allowed |
403
+
404
+ **Description:** (Read-only) Server-generated last-update timestamp.
405
+
406
+ | Any of(Option) |
407
+ | ------------------------------------------ |
408
+ | [firestore-timestamp](#updatedAt_anyOf_i0) |
409
+ | [item 1](#updatedAt_anyOf_i1) |
410
+
411
+ ### <a name="updatedAt_anyOf_i0"></a>17.1. Property `firestore-timestamp`
412
+
413
+ | | |
414
+ | ------------------------- | ------------------------------------- |
415
+ | **Type** | `object` |
416
+ | **Required** | No |
417
+ | **Additional properties** | Not allowed |
418
+ | **Same definition as** | [dueDate_anyOf_i0](#dueDate_anyOf_i0) |
419
+
420
+ **Description:** Firestore Timestamp — Admin SDK form: \{ _seconds, _nanoseconds \}. See types/firestore.ts for REST API v1 and client SDK serialization notes (#10).
421
+
422
+ ### <a name="updatedAt_anyOf_i1"></a>17.2. Property `item 1`
423
+
424
+ | | |
425
+ | ------------ | ------ |
426
+ | **Type** | `null` |
427
+ | **Required** | No |
428
+
429
+ ----------------------------------------------------------------------------------------------------------------------------
430
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
431
+
432
+ :::warning Server-set
433
+ 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.
434
+ :::
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "LoyaltyConfig"
3
3
  sidebar_label: "LoyaltyConfig"
4
- sidebar_position: 14
4
+ sidebar_position: 16
5
5
  ---
6
6
 
7
7
  # LoyaltyConfig
@@ -304,7 +304,7 @@ Do not include in write requests. This field is set exclusively by the server (F
304
304
  | **Required** | No |
305
305
 
306
306
  ----------------------------------------------------------------------------------------------------------------------------
307
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:51 +0000
307
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
308
308
 
309
309
  :::warning Server-set
310
310
  Do not include in write requests. This field is set exclusively by the server (Firestore trigger or Admin SDK). Clients that send it will have the value silently ignored or may receive a validation error.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "LoyaltyReward"
3
3
  sidebar_label: "LoyaltyReward"
4
- sidebar_position: 15
4
+ sidebar_position: 17
5
5
  ---
6
6
 
7
7
  # LoyaltyReward
@@ -229,7 +229,7 @@ Do not include in write requests. This field is set exclusively by the server (F
229
229
  | **Required** | No |
230
230
 
231
231
  ----------------------------------------------------------------------------------------------------------------------------
232
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:51 +0000
232
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
233
233
 
234
234
  :::warning Server-set
235
235
  Do not include in write requests. This field is set exclusively by the server (Firestore trigger or Admin SDK). Clients that send it will have the value silently ignored or may receive a validation error.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "LoyaltyStatus"
3
3
  sidebar_label: "LoyaltyStatus"
4
- sidebar_position: 16
4
+ sidebar_position: 18
5
5
  ---
6
6
 
7
7
  # LoyaltyStatus
@@ -315,7 +315,7 @@ Do not include in write requests. This field is set exclusively by the server (F
315
315
  | **Required** | No |
316
316
 
317
317
  ----------------------------------------------------------------------------------------------------------------------------
318
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:51 +0000
318
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
319
319
 
320
320
  :::warning Server-set
321
321
  Do not include in write requests. This field is set exclusively by the server (Firestore trigger or Admin SDK). Clients that send it will have the value silently ignored or may receive a validation error.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "LoyaltyTransaction"
3
3
  sidebar_label: "LoyaltyTransaction"
4
- sidebar_position: 17
4
+ sidebar_position: 19
5
5
  ---
6
6
 
7
7
  # LoyaltyTransaction
@@ -313,7 +313,7 @@ Set at creation only. This field cannot be modified after the document is create
313
313
  **Description:** (Immutable, Denormalized) From User display name at creation time.
314
314
 
315
315
  ----------------------------------------------------------------------------------------------------------------------------
316
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:51 +0000
316
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
317
317
 
318
318
  :::info Immutable
319
319
  Set at creation only. This field cannot be modified after the document is created. Include it in CREATE payloads; omit it (or leave unchanged) in UPDATE payloads.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "MagicLinkRequest"
3
3
  sidebar_label: "MagicLinkRequest"
4
- sidebar_position: 18
4
+ sidebar_position: 20
5
5
  ---
6
6
 
7
7
  # MagicLinkRequest
@@ -282,4 +282,4 @@ Set at creation only. This field cannot be modified after the document is create
282
282
  | **Required** | No |
283
283
 
284
284
  ----------------------------------------------------------------------------------------------------------------------------
285
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:51 +0000
285
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "MetricsCurrent"
3
3
  sidebar_label: "MetricsCurrent"
4
- sidebar_position: 19
4
+ sidebar_position: 21
5
5
  ---
6
6
 
7
7
  # MetricsCurrent
@@ -172,6 +172,10 @@ Do not include in write requests. This field is set exclusively by the server (F
172
172
  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.
173
173
  :::
174
174
 
175
+ :::note
176
+ Firestore REST API v1 writes integerValue when the stored value is whole (e.g. 0), doubleValue when fractional (e.g. 82.17). Admin SDK smooths this to a JS number; REST clients must coerce the union (#11).
177
+ :::
178
+
175
179
  ## <a name="todayPurchasesCount"></a>4. Property `todayPurchasesCount`
176
180
 
177
181
  | | |
@@ -216,6 +220,10 @@ Do not include in write requests. This field is set exclusively by the server (F
216
220
  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
221
  :::
218
222
 
223
+ :::note
224
+ Firestore REST API v1 writes integerValue when whole (e.g. 10070), doubleValue when fractional (e.g. 10006.5). Admin SDK smooths this; REST clients must coerce (#11).
225
+ :::
226
+
219
227
  ## <a name="monthlyRevenue"></a>7. Property `monthlyRevenue`
220
228
 
221
229
  | | |
@@ -229,6 +237,10 @@ Do not include in write requests. This field is set exclusively by the server (F
229
237
  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.
230
238
  :::
231
239
 
240
+ :::note
241
+ Observed as integerValue on all sampled tenants (whole XOF amounts). Will be doubleValue if fractional. REST clients must coerce (#11).
242
+ :::
243
+
232
244
  ## <a name="monthlyPurchasesCount"></a>8. Property `monthlyPurchasesCount`
233
245
 
234
246
  | | |
@@ -322,6 +334,10 @@ Do not include in write requests. This field is set exclusively by the server (F
322
334
  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
335
  :::
324
336
 
337
+ :::note
338
+ Observed as integerValue "0" on all sampled tenants. Will be doubleValue if fractional payments occur. REST clients must coerce (#11).
339
+ :::
340
+
325
341
  ## <a name="todayRevenue"></a>14. Property `todayRevenue`
326
342
 
327
343
  | | |
@@ -438,6 +454,10 @@ Do not include in write requests. This field is set exclusively by the server (F
438
454
  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.
439
455
  :::
440
456
 
457
+ :::note
458
+ Observed as integerValue "0" on all tenants (no reviews yet). Will be doubleValue once real ratings exist. REST clients must coerce (#11).
459
+ :::
460
+
441
461
  ## <a name="lowStockItemsCount"></a>21. Property `lowStockItemsCount`
442
462
 
443
463
  | | |
@@ -657,7 +677,7 @@ Do not include in write requests. This field is set exclusively by the server (F
657
677
  | **Maximum** | &le; 9007199254740991 |
658
678
 
659
679
  ----------------------------------------------------------------------------------------------------------------------------
660
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:51 +0000
680
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 13:57:28 +0000
661
681
 
662
682
  :::warning Server-set
663
683
  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.