@ingenx-io/valets-schema-mcp-server 0.1.1 → 0.1.3

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/data/docs/collections/firestore-paths.md +49 -0
  2. package/data/docs/decisions/migrations.md +56 -0
  3. package/data/docs/decisions/summary.md +78 -0
  4. package/data/docs/enums/booking-status.md +26 -0
  5. package/data/docs/enums/customer-payment-status.md +26 -0
  6. package/data/docs/enums/customer-payment-target-type.md +23 -0
  7. package/data/docs/enums/delivery-type.md +23 -0
  8. package/data/docs/enums/event-status.md +30 -0
  9. package/data/docs/enums/fulfillment-status.md +32 -0
  10. package/data/docs/enums/loyalty-transaction-type.md +32 -0
  11. package/data/docs/enums/order-status.md +65 -0
  12. package/data/docs/enums/payment-method.md +36 -0
  13. package/data/docs/enums/payment-proof-status.md +23 -0
  14. package/data/docs/enums/payment-status.md +34 -0
  15. package/data/docs/enums/return-status.md +32 -0
  16. package/data/docs/enums/session-status.md +32 -0
  17. package/data/docs/enums/ticket-status.md +29 -0
  18. package/data/docs/index.md +102 -0
  19. package/data/docs/models/booking-version.md +295 -0
  20. package/data/docs/models/booking.md +1754 -0
  21. package/data/docs/models/customer-payment-allocation.md +336 -0
  22. package/data/docs/models/customer-payment.md +392 -0
  23. package/data/docs/models/customer.md +475 -0
  24. package/data/docs/models/event.md +386 -0
  25. package/data/docs/models/loyalty-config.md +317 -0
  26. package/data/docs/models/loyalty-reward.md +236 -0
  27. package/data/docs/models/loyalty-status.md +328 -0
  28. package/data/docs/models/loyalty-transaction.md +326 -0
  29. package/data/docs/models/metrics-current.md +532 -0
  30. package/data/docs/models/metrics-daily.md +548 -0
  31. package/data/docs/models/metrics-monthly.md +548 -0
  32. package/data/docs/models/order-item.md +361 -0
  33. package/data/docs/models/order.md +1637 -0
  34. package/data/docs/models/payment-summary.md +123 -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 +1056 -0
  41. package/data/static/openapi.yaml +3090 -0
  42. package/data/static/schemas.json +4055 -0
  43. package/package.json +1 -1
@@ -0,0 +1,475 @@
1
+ ---
2
+ title: "Customer"
3
+ sidebar_label: "Customer"
4
+ sidebar_position: 3
5
+ ---
6
+
7
+ # Customer
8
+
9
+ <details>
10
+ <summary>Example JSON</summary>
11
+
12
+ ```json
13
+ {
14
+ "id": "bk_abc123def456",
15
+ "uid": "user_u8x92kqm",
16
+ "name": "Amadou Diallo",
17
+ "email": null,
18
+ "phone": null,
19
+ "address": null,
20
+ "notes": null,
21
+ "tags": null,
22
+ "communicationEntries": null,
23
+ "createdAt": "createdAt",
24
+ "lastOrderDate": "lastOrderDate",
25
+ "balance": null,
26
+ "creditLimit": null,
27
+ "lastPaymentDate": "lastPaymentDate",
28
+ "totalPaid": null,
29
+ "totalOwed": null,
30
+ "loyaltyPoints": null
31
+ }
32
+ ```
33
+
34
+ </details>
35
+
36
+
37
+ - [1. Property `id`](#id)
38
+ - [2. Property `uid`](#uid)
39
+ - [3. Property `name`](#name)
40
+ - [4. Property `email`](#email)
41
+ - [5. Property `phone`](#phone)
42
+ - [6. Property `address`](#address)
43
+ - [7. Property `notes`](#notes)
44
+ - [8. Property `tags`](#tags)
45
+ - [8.1. tags items](#tags_items)
46
+ - [9. Property `communicationEntries`](#communicationEntries)
47
+ - [9.1. communicationEntries items](#communicationEntries_items)
48
+ - [9.1.1. Property `timestamp`](#communicationEntries_items_timestamp)
49
+ - [9.1.1.1. Property `_seconds`](#communicationEntries_items_timestamp__seconds)
50
+ - [9.1.1.2. Property `_nanoseconds`](#communicationEntries_items_timestamp__nanoseconds)
51
+ - [9.1.2. Property `type`](#communicationEntries_items_type)
52
+ - [9.1.3. Property `summary`](#communicationEntries_items_summary)
53
+ - [9.1.4. Property `staffMember`](#communicationEntries_items_staffMember)
54
+ - [10. Property `createdAt`](#createdAt)
55
+ - [10.1. Property `_seconds`](#communicationEntries_items_timestamp__seconds)
56
+ - [10.2. Property `_nanoseconds`](#communicationEntries_items_timestamp__nanoseconds)
57
+ - [11. Property `lastOrderDate`](#lastOrderDate)
58
+ - [11.1. Property `firestore-timestamp`](#lastOrderDate_anyOf_i0)
59
+ - [11.2. Property `item 1`](#lastOrderDate_anyOf_i1)
60
+ - [12. Property `balance`](#balance)
61
+ - [13. Property `creditLimit`](#creditLimit)
62
+ - [14. Property `lastPaymentDate`](#lastPaymentDate)
63
+ - [14.1. Property `firestore-timestamp`](#lastPaymentDate_anyOf_i0)
64
+ - [14.2. Property `item 1`](#lastPaymentDate_anyOf_i1)
65
+ - [15. Property `totalPaid`](#totalPaid)
66
+ - [16. Property `totalOwed`](#totalOwed)
67
+ - [17. Property `loyaltyPoints`](#loyaltyPoints)
68
+
69
+ | | |
70
+ | ------------------------- | ---------------------- |
71
+ | **Type** | `object` |
72
+ | **Required** | No |
73
+ | **Additional properties** | Not allowed |
74
+ | **Defined in** | #/definitions/customer |
75
+
76
+ **Description:** Customer model. Collection: companies/\{companyId\}/customers/\{customerId\}. Canonical across all platforms.
77
+
78
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
79
+ | ------------------------------------------------ | ------- | ----------------------- | ---------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
80
+ | + [id](#id ) | No | string | No | - | (Read-only) Firestore document ID. This is the canonical FK target — other models reference Customer via this field. |
81
+ | + [uid](#uid ) | No | string | No | - | (Read-only) Entity UID. Often mirrors id. |
82
+ | + [name](#name ) | No | string | No | - | - |
83
+ | - [email](#email ) | No | string or null | No | - | - |
84
+ | - [phone](#phone ) | No | string or null | No | - | - |
85
+ | - [address](#address ) | No | string or null | No | - | - |
86
+ | - [notes](#notes ) | No | string or null | No | - | - |
87
+ | - [tags](#tags ) | No | array of string or null | No | - | - |
88
+ | - [communicationEntries](#communicationEntries ) | No | array of object or null | No | - | Embedded CRM log (D25). Stays as array, not subcollection. |
89
+ | + [createdAt](#createdAt ) | No | object | No | In #/definitions/firestore-timestamp | (Read-only) Server-generated creation timestamp. |
90
+ | - [lastOrderDate](#lastOrderDate ) | No | Combination | No | - | (Read-only) Updated by server when orders are placed. |
91
+ | - [balance](#balance ) | No | number or null | No | - | (Read-only) Outstanding balance. Dashboard-originated, server-calculated. |
92
+ | - [creditLimit](#creditLimit ) | No | number or null | No | - | - |
93
+ | - [lastPaymentDate](#lastPaymentDate ) | No | Combination | No | - | (Read-only) Updated by server when payments are recorded. |
94
+ | - [totalPaid](#totalPaid ) | No | number or null | No | - | (Read-only) Server-calculated total paid amount. |
95
+ | - [totalOwed](#totalOwed ) | No | number or null | No | - | (Read-only) Server-calculated total owed amount. |
96
+ | - [loyaltyPoints](#loyaltyPoints ) | No | number or null | No | - | (Read-only, Denormalized) Derived summary from loyalty/status subcollection (D08). Source of truth is LoyaltyStatus.pointsBalance. |
97
+
98
+ ## <a name="id"></a>1. Property `id`
99
+
100
+ | | |
101
+ | ------------ | -------- |
102
+ | **Type** | `string` |
103
+ | **Required** | Yes |
104
+
105
+ **Description:** (Read-only) Firestore document ID. This is the canonical FK target — other models reference Customer via this field.
106
+
107
+ :::warning Server-set
108
+ 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.
109
+ :::
110
+
111
+ ## <a name="uid"></a>2. Property `uid`
112
+
113
+ | | |
114
+ | ------------ | -------- |
115
+ | **Type** | `string` |
116
+ | **Required** | Yes |
117
+
118
+ **Description:** (Read-only) Entity UID. Often mirrors id.
119
+
120
+ :::warning Server-set
121
+ 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.
122
+ :::
123
+
124
+ ## <a name="name"></a>3. Property `name`
125
+
126
+ | | |
127
+ | ------------ | -------- |
128
+ | **Type** | `string` |
129
+ | **Required** | Yes |
130
+
131
+ ## <a name="email"></a>4. Property `email`
132
+
133
+ | | |
134
+ | ------------ | ---------------- |
135
+ | **Type** | `string or null` |
136
+ | **Required** | No |
137
+
138
+ ## <a name="phone"></a>5. Property `phone`
139
+
140
+ | | |
141
+ | ------------ | ---------------- |
142
+ | **Type** | `string or null` |
143
+ | **Required** | No |
144
+
145
+ ## <a name="address"></a>6. Property `address`
146
+
147
+ | | |
148
+ | ------------ | ---------------- |
149
+ | **Type** | `string or null` |
150
+ | **Required** | No |
151
+
152
+ ## <a name="notes"></a>7. Property `notes`
153
+
154
+ | | |
155
+ | ------------ | ---------------- |
156
+ | **Type** | `string or null` |
157
+ | **Required** | No |
158
+
159
+ ## <a name="tags"></a>8. Property `tags`
160
+
161
+ | | |
162
+ | ------------ | ------------------------- |
163
+ | **Type** | `array of string or null` |
164
+ | **Required** | No |
165
+
166
+ | | Array restrictions |
167
+ | -------------------- | ------------------ |
168
+ | **Min items** | N/A |
169
+ | **Max items** | N/A |
170
+ | **Items unicity** | False |
171
+ | **Additional items** | False |
172
+ | **Tuple validation** | See below |
173
+
174
+ | Each item of this array must be | Description |
175
+ | ------------------------------- | ----------- |
176
+ | [tags items](#tags_items) | - |
177
+
178
+ ### <a name="tags_items"></a>8.1. tags items
179
+
180
+ | | |
181
+ | ------------ | -------- |
182
+ | **Type** | `string` |
183
+ | **Required** | No |
184
+
185
+ ## <a name="communicationEntries"></a>9. Property `communicationEntries`
186
+
187
+ | | |
188
+ | ------------ | ------------------------- |
189
+ | **Type** | `array of object or null` |
190
+ | **Required** | No |
191
+
192
+ **Description:** Embedded CRM log (D25). Stays as array, not subcollection.
193
+
194
+ | | Array restrictions |
195
+ | -------------------- | ------------------ |
196
+ | **Min items** | N/A |
197
+ | **Max items** | N/A |
198
+ | **Items unicity** | False |
199
+ | **Additional items** | False |
200
+ | **Tuple validation** | See below |
201
+
202
+ | Each item of this array must be | Description |
203
+ | --------------------------------------------------------- | ----------------------------------------------------------------------- |
204
+ | [communicationEntries items](#communicationEntries_items) | CRM communication log entry (D25). Embedded array on Customer document. |
205
+
206
+ ### <a name="communicationEntries_items"></a>9.1. communicationEntries items
207
+
208
+ | | |
209
+ | ------------------------- | ----------- |
210
+ | **Type** | `object` |
211
+ | **Required** | No |
212
+ | **Additional properties** | Not allowed |
213
+
214
+ **Description:** CRM communication log entry (D25). Embedded array on Customer document.
215
+
216
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
217
+ | --------------------------------------------------------- | ------- | ------ | ---------- | ------------------------------------ | --------------------------------------------------- |
218
+ | + [timestamp](#communicationEntries_items_timestamp ) | No | object | No | In #/definitions/firestore-timestamp | Firestore Timestamp serialized representation |
219
+ | + [type](#communicationEntries_items_type ) | No | string | No | - | Communication channel (e.g. phone, email, meeting). |
220
+ | + [summary](#communicationEntries_items_summary ) | No | string | No | - | - |
221
+ | - [staffMember](#communicationEntries_items_staffMember ) | No | string | No | - | Staff member name involved in this communication. |
222
+
223
+ #### <a name="communicationEntries_items_timestamp"></a>9.1.1. Property `timestamp`
224
+
225
+ | | |
226
+ | ------------------------- | --------------------------------- |
227
+ | **Type** | `object` |
228
+ | **Required** | Yes |
229
+ | **Additional properties** | Not allowed |
230
+ | **Defined in** | #/definitions/firestore-timestamp |
231
+
232
+ **Description:** Firestore Timestamp serialized representation
233
+
234
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
235
+ | --------------------------------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- |
236
+ | + [_seconds](#communicationEntries_items_timestamp__seconds ) | No | integer | No | - | - |
237
+ | + [_nanoseconds](#communicationEntries_items_timestamp__nanoseconds ) | No | integer | No | - | - |
238
+
239
+ ##### <a name="communicationEntries_items_timestamp__seconds"></a>9.1.1.1. Property `_seconds`
240
+
241
+ | | |
242
+ | ------------ | --------- |
243
+ | **Type** | `integer` |
244
+ | **Required** | Yes |
245
+
246
+ | Restrictions | |
247
+ | ------------ | ---------------------- |
248
+ | **Minimum** | &ge; -9007199254740991 |
249
+ | **Maximum** | &le; 9007199254740991 |
250
+
251
+ ##### <a name="communicationEntries_items_timestamp__nanoseconds"></a>9.1.1.2. Property `_nanoseconds`
252
+
253
+ | | |
254
+ | ------------ | --------- |
255
+ | **Type** | `integer` |
256
+ | **Required** | Yes |
257
+
258
+ | Restrictions | |
259
+ | ------------ | ---------------------- |
260
+ | **Minimum** | &ge; -9007199254740991 |
261
+ | **Maximum** | &le; 9007199254740991 |
262
+
263
+ #### <a name="communicationEntries_items_type"></a>9.1.2. Property `type`
264
+
265
+ | | |
266
+ | ------------ | -------- |
267
+ | **Type** | `string` |
268
+ | **Required** | Yes |
269
+
270
+ **Description:** Communication channel (e.g. phone, email, meeting).
271
+
272
+ #### <a name="communicationEntries_items_summary"></a>9.1.3. Property `summary`
273
+
274
+ | | |
275
+ | ------------ | -------- |
276
+ | **Type** | `string` |
277
+ | **Required** | Yes |
278
+
279
+ #### <a name="communicationEntries_items_staffMember"></a>9.1.4. Property `staffMember`
280
+
281
+ | | |
282
+ | ------------ | -------- |
283
+ | **Type** | `string` |
284
+ | **Required** | No |
285
+
286
+ **Description:** Staff member name involved in this communication.
287
+
288
+ ## <a name="createdAt"></a>10. Property `createdAt`
289
+
290
+ | | |
291
+ | ------------------------- | --------------------------------- |
292
+ | **Type** | `object` |
293
+ | **Required** | Yes |
294
+ | **Additional properties** | Not allowed |
295
+ | **Defined in** | #/definitions/firestore-timestamp |
296
+
297
+ **Description:** (Read-only) Server-generated creation timestamp.
298
+
299
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
300
+ | --------------------------------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- |
301
+ | + [_seconds](#communicationEntries_items_timestamp__seconds ) | No | integer | No | - | - |
302
+ | + [_nanoseconds](#communicationEntries_items_timestamp__nanoseconds ) | No | integer | No | - | - |
303
+
304
+ ### <a name="communicationEntries_items_timestamp__seconds"></a>10.1. Property `_seconds`
305
+
306
+ | | |
307
+ | ------------ | --------- |
308
+ | **Type** | `integer` |
309
+ | **Required** | Yes |
310
+
311
+ | Restrictions | |
312
+ | ------------ | ---------------------- |
313
+ | **Minimum** | &ge; -9007199254740991 |
314
+ | **Maximum** | &le; 9007199254740991 |
315
+
316
+ ### <a name="communicationEntries_items_timestamp__nanoseconds"></a>10.2. Property `_nanoseconds`
317
+
318
+ | | |
319
+ | ------------ | --------- |
320
+ | **Type** | `integer` |
321
+ | **Required** | Yes |
322
+
323
+ | Restrictions | |
324
+ | ------------ | ---------------------- |
325
+ | **Minimum** | &ge; -9007199254740991 |
326
+ | **Maximum** | &le; 9007199254740991 |
327
+
328
+ :::warning Server-set
329
+ 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.
330
+ :::
331
+
332
+ ## <a name="lastOrderDate"></a>11. Property `lastOrderDate`
333
+
334
+ | | |
335
+ | ------------------------- | ---------------- |
336
+ | **Type** | `combining` |
337
+ | **Required** | No |
338
+ | **Additional properties** | Any type allowed |
339
+
340
+ **Description:** (Read-only) Updated by server when orders are placed.
341
+
342
+ | Any of(Option) |
343
+ | ---------------------------------------------- |
344
+ | [firestore-timestamp](#lastOrderDate_anyOf_i0) |
345
+ | [item 1](#lastOrderDate_anyOf_i1) |
346
+
347
+ ### <a name="lastOrderDate_anyOf_i0"></a>11.1. Property `firestore-timestamp`
348
+
349
+ | | |
350
+ | ------------------------- | -------------------------------------------------- |
351
+ | **Type** | `object` |
352
+ | **Required** | No |
353
+ | **Additional properties** | Not allowed |
354
+ | **Same definition as** | [timestamp](#communicationEntries_items_timestamp) |
355
+
356
+ **Description:** Firestore Timestamp serialized representation
357
+
358
+ ### <a name="lastOrderDate_anyOf_i1"></a>11.2. Property `item 1`
359
+
360
+ | | |
361
+ | ------------ | ------ |
362
+ | **Type** | `null` |
363
+ | **Required** | No |
364
+
365
+ :::warning Server-set
366
+ 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.
367
+ :::
368
+
369
+ ## <a name="balance"></a>12. Property `balance`
370
+
371
+ | | |
372
+ | ------------ | ---------------- |
373
+ | **Type** | `number or null` |
374
+ | **Required** | No |
375
+
376
+ **Description:** (Read-only) Outstanding balance. Dashboard-originated, server-calculated.
377
+
378
+ :::warning Server-set
379
+ 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.
380
+ :::
381
+
382
+ ## <a name="creditLimit"></a>13. Property `creditLimit`
383
+
384
+ | | |
385
+ | ------------ | ---------------- |
386
+ | **Type** | `number or null` |
387
+ | **Required** | No |
388
+
389
+ ## <a name="lastPaymentDate"></a>14. Property `lastPaymentDate`
390
+
391
+ | | |
392
+ | ------------------------- | ---------------- |
393
+ | **Type** | `combining` |
394
+ | **Required** | No |
395
+ | **Additional properties** | Any type allowed |
396
+
397
+ **Description:** (Read-only) Updated by server when payments are recorded.
398
+
399
+ | Any of(Option) |
400
+ | ------------------------------------------------ |
401
+ | [firestore-timestamp](#lastPaymentDate_anyOf_i0) |
402
+ | [item 1](#lastPaymentDate_anyOf_i1) |
403
+
404
+ ### <a name="lastPaymentDate_anyOf_i0"></a>14.1. Property `firestore-timestamp`
405
+
406
+ | | |
407
+ | ------------------------- | -------------------------------------------------- |
408
+ | **Type** | `object` |
409
+ | **Required** | No |
410
+ | **Additional properties** | Not allowed |
411
+ | **Same definition as** | [timestamp](#communicationEntries_items_timestamp) |
412
+
413
+ **Description:** Firestore Timestamp serialized representation
414
+
415
+ ### <a name="lastPaymentDate_anyOf_i1"></a>14.2. Property `item 1`
416
+
417
+ | | |
418
+ | ------------ | ------ |
419
+ | **Type** | `null` |
420
+ | **Required** | No |
421
+
422
+ :::warning Server-set
423
+ 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.
424
+ :::
425
+
426
+ ## <a name="totalPaid"></a>15. Property `totalPaid`
427
+
428
+ | | |
429
+ | ------------ | ---------------- |
430
+ | **Type** | `number or null` |
431
+ | **Required** | No |
432
+
433
+ **Description:** (Read-only) Server-calculated total paid amount.
434
+
435
+ :::warning Server-set
436
+ 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.
437
+ :::
438
+
439
+ ## <a name="totalOwed"></a>16. Property `totalOwed`
440
+
441
+ | | |
442
+ | ------------ | ---------------- |
443
+ | **Type** | `number or null` |
444
+ | **Required** | No |
445
+
446
+ **Description:** (Read-only) Server-calculated total owed amount.
447
+
448
+ :::warning Server-set
449
+ 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.
450
+ :::
451
+
452
+ ## <a name="loyaltyPoints"></a>17. Property `loyaltyPoints`
453
+
454
+ | | |
455
+ | ------------ | ---------------- |
456
+ | **Type** | `number or null` |
457
+ | **Required** | No |
458
+
459
+ **Description:** (Read-only, Denormalized) Derived summary from loyalty/status subcollection (D08). Source of truth is LoyaltyStatus.pointsBalance.
460
+
461
+ ----------------------------------------------------------------------------------------------------------------------------
462
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-06 at 19:27:48 +0000
463
+
464
+ :::warning Server-set
465
+ 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.
466
+ :::
467
+
468
+ ## Related Decisions
469
+
470
+ | Decision | Title |
471
+ |---|---|
472
+ | **D08** | Canonical location for customer points |
473
+ | **D16** | Mobile CRM scope |
474
+ | **D24** | Customer reference naming standardization |
475
+ | **D25** | communicationEntries storage shape |