@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,392 @@
1
+ ---
2
+ title: "CustomerPayment"
3
+ sidebar_label: "CustomerPayment"
4
+ sidebar_position: 4
5
+ ---
6
+
7
+ # CustomerPayment
8
+
9
+ <details>
10
+ <summary>Example JSON</summary>
11
+
12
+ ```json
13
+ {
14
+ "id": null,
15
+ "companyId": "comp_xyz789",
16
+ "customerId": "cus_ref123",
17
+ "customerName": null,
18
+ "amount": 45000,
19
+ "currency": "XOF",
20
+ "paymentDate": "paymentDate",
21
+ "paymentMethod": "paymentMethod",
22
+ "referenceNumber": "PAY-2026-0099",
23
+ "allocatedAmount": 30000,
24
+ "unappliedAmount": 15000,
25
+ "status": "status",
26
+ "notes": null,
27
+ "recordedBy": "staff_k0f1",
28
+ "recordedByName": null,
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 `customerId`](#customerId)
40
+ - [4. Property `customerName`](#customerName)
41
+ - [5. Property `amount`](#amount)
42
+ - [6. Property `currency`](#currency)
43
+ - [7. Property `paymentDate`](#paymentDate)
44
+ - [7.1. Property `_seconds`](#paymentDate__seconds)
45
+ - [7.2. Property `_nanoseconds`](#paymentDate__nanoseconds)
46
+ - [8. Property `paymentMethod`](#paymentMethod)
47
+ - [9. Property `referenceNumber`](#referenceNumber)
48
+ - [10. Property `allocatedAmount`](#allocatedAmount)
49
+ - [11. Property `unappliedAmount`](#unappliedAmount)
50
+ - [12. Property `status`](#status)
51
+ - [13. Property `notes`](#notes)
52
+ - [14. Property `recordedBy`](#recordedBy)
53
+ - [15. Property `recordedByName`](#recordedByName)
54
+ - [16. Property `createdAt`](#createdAt)
55
+ - [16.1. Property `_seconds`](#paymentDate__seconds)
56
+ - [16.2. Property `_nanoseconds`](#paymentDate__nanoseconds)
57
+ - [17. Property `updatedAt`](#updatedAt)
58
+ - [17.1. Property `firestore-timestamp`](#updatedAt_anyOf_i0)
59
+ - [17.2. Property `item 1`](#updatedAt_anyOf_i1)
60
+
61
+ | | |
62
+ | ------------------------- | ------------------------------ |
63
+ | **Type** | `object` |
64
+ | **Required** | No |
65
+ | **Additional properties** | Not allowed |
66
+ | **Defined in** | #/definitions/customer-payment |
67
+
68
+ **Description:** CustomerPayment model (D22). Collection: companies/\{companyId\}/customerPayments/\{paymentId\}. Dashboard-only today; Mobile read in Wave 2, write in Wave 4 (trusted-party workflow).
69
+
70
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
71
+ | -------------------------------------- | ------- | ---------------- | ---------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
72
+ | - [id](#id ) | No | string or null | No | - | (Read-only) Firestore document ID. Note: optional in current schema — some legacy docs may lack this field. |
73
+ | + [companyId](#companyId ) | No | string | No | - | (Immutable) FK → Company document ID. Scopes all queries. |
74
+ | + [customerId](#customerId ) | No | string | No | - | (Immutable) FK → Customer.id (Firestore doc ID). Links payment to customer. Set at creation. |
75
+ | - [customerName](#customerName ) | No | string or null | No | - | (Denormalized) From Customer.name at write time. |
76
+ | + [amount](#amount ) | No | number | No | - | - |
77
+ | + [currency](#currency ) | No | const | No | - | Currency code. Locked to XOF (West African CFA franc) for now. |
78
+ | + [paymentDate](#paymentDate ) | No | object | No | In #/definitions/firestore-timestamp | Firestore Timestamp serialized representation |
79
+ | + [paymentMethod](#paymentMethod ) | No | enum (of string) | No | In #/definitions/payment-method | Unified payment method set with African + global methods (D02). |
80
+ | + [referenceNumber](#referenceNumber ) | No | string | No | - | Unique payment reference (receipt number, transaction ID, etc.). |
81
+ | + [allocatedAmount](#allocatedAmount ) | No | number | No | - | (Read-only) Total amount allocated to bookings/orders/purchases via allocations. Server-calculated. |
82
+ | + [unappliedAmount](#unappliedAmount ) | No | number | No | - | (Read-only) Remaining unallocated amount (amount - allocatedAmount). Server-calculated. |
83
+ | + [status](#status ) | No | enum (of string) | No | In #/definitions/customer-payment-status | Customer payment lifecycle status (D22). Tracks allocation progress of received payments. |
84
+ | - [notes](#notes ) | No | string or null | No | - | - |
85
+ | + [recordedBy](#recordedBy ) | No | string | No | - | (Immutable) FK → User/staff UID who recorded the payment. Required audit field (D22/IG-7). |
86
+ | - [recordedByName](#recordedByName ) | No | string or null | No | - | (Immutable, Denormalized) From User display name at creation time. |
87
+ | + [createdAt](#createdAt ) | No | object | No | In #/definitions/firestore-timestamp | (Read-only) Server-generated creation timestamp. |
88
+ | - [updatedAt](#updatedAt ) | No | Combination | No | - | (Read-only) Server-generated update timestamp. |
89
+
90
+ ## <a name="id"></a>1. Property `id`
91
+
92
+ | | |
93
+ | ------------ | ---------------- |
94
+ | **Type** | `string or null` |
95
+ | **Required** | No |
96
+
97
+ **Description:** (Read-only) Firestore document ID. Note: optional in current schema — some legacy docs may lack this field.
98
+
99
+ :::warning Server-set
100
+ 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.
101
+ :::
102
+
103
+ ## <a name="companyId"></a>2. Property `companyId`
104
+
105
+ | | |
106
+ | ------------ | -------- |
107
+ | **Type** | `string` |
108
+ | **Required** | Yes |
109
+
110
+ **Description:** (Immutable) FK → Company document ID. Scopes all queries.
111
+
112
+ :::info Immutable
113
+ 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.
114
+ :::
115
+
116
+ ## <a name="customerId"></a>3. Property `customerId`
117
+
118
+ | | |
119
+ | ------------ | -------- |
120
+ | **Type** | `string` |
121
+ | **Required** | Yes |
122
+
123
+ **Description:** (Immutable) FK → Customer.id (Firestore doc ID). Links payment to customer. Set at creation.
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="customerName"></a>4. Property `customerName`
130
+
131
+ | | |
132
+ | ------------ | ---------------- |
133
+ | **Type** | `string or null` |
134
+ | **Required** | No |
135
+
136
+ **Description:** (Denormalized) From Customer.name at write time.
137
+
138
+ ## <a name="amount"></a>5. Property `amount`
139
+
140
+ | | |
141
+ | ------------ | -------- |
142
+ | **Type** | `number` |
143
+ | **Required** | Yes |
144
+
145
+ ## <a name="currency"></a>6. Property `currency`
146
+
147
+ | | |
148
+ | ------------ | ------- |
149
+ | **Type** | `const` |
150
+ | **Required** | Yes |
151
+
152
+ **Description:** Currency code. Locked to XOF (West African CFA franc) for now.
153
+
154
+ Specific value: `"XOF"`
155
+
156
+ ## <a name="paymentDate"></a>7. Property `paymentDate`
157
+
158
+ | | |
159
+ | ------------------------- | --------------------------------- |
160
+ | **Type** | `object` |
161
+ | **Required** | Yes |
162
+ | **Additional properties** | Not allowed |
163
+ | **Defined in** | #/definitions/firestore-timestamp |
164
+
165
+ **Description:** Firestore Timestamp serialized representation
166
+
167
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
168
+ | -------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- |
169
+ | + [_seconds](#paymentDate__seconds ) | No | integer | No | - | - |
170
+ | + [_nanoseconds](#paymentDate__nanoseconds ) | No | integer | No | - | - |
171
+
172
+ ### <a name="paymentDate__seconds"></a>7.1. Property `_seconds`
173
+
174
+ | | |
175
+ | ------------ | --------- |
176
+ | **Type** | `integer` |
177
+ | **Required** | Yes |
178
+
179
+ | Restrictions | |
180
+ | ------------ | ---------------------- |
181
+ | **Minimum** | &ge; -9007199254740991 |
182
+ | **Maximum** | &le; 9007199254740991 |
183
+
184
+ ### <a name="paymentDate__nanoseconds"></a>7.2. Property `_nanoseconds`
185
+
186
+ | | |
187
+ | ------------ | --------- |
188
+ | **Type** | `integer` |
189
+ | **Required** | Yes |
190
+
191
+ | Restrictions | |
192
+ | ------------ | ---------------------- |
193
+ | **Minimum** | &ge; -9007199254740991 |
194
+ | **Maximum** | &le; 9007199254740991 |
195
+
196
+ ## <a name="paymentMethod"></a>8. Property `paymentMethod`
197
+
198
+ | | |
199
+ | -------------- | ---------------------------- |
200
+ | **Type** | `enum (of string)` |
201
+ | **Required** | Yes |
202
+ | **Defined in** | #/definitions/payment-method |
203
+
204
+ **Description:** Unified payment method set with African + global methods (D02).
205
+
206
+ Must be one of:
207
+ * "CASH"
208
+ * "CREDIT_CARD"
209
+ * "ORANGE_MONEY"
210
+ * "WAVE"
211
+ * "MTN_MONEY"
212
+ * "MOOV_MONEY"
213
+ * "BANK_TRANSFER"
214
+ * "PAYPAL"
215
+ * "STRIPE"
216
+ * "OTHER"
217
+
218
+ ## <a name="referenceNumber"></a>9. Property `referenceNumber`
219
+
220
+ | | |
221
+ | ------------ | -------- |
222
+ | **Type** | `string` |
223
+ | **Required** | Yes |
224
+
225
+ **Description:** Unique payment reference (receipt number, transaction ID, etc.).
226
+
227
+ ## <a name="allocatedAmount"></a>10. Property `allocatedAmount`
228
+
229
+ | | |
230
+ | ------------ | -------- |
231
+ | **Type** | `number` |
232
+ | **Required** | Yes |
233
+
234
+ **Description:** (Read-only) Total amount allocated to bookings/orders/purchases via allocations. Server-calculated.
235
+
236
+ :::warning Server-set
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.
238
+ :::
239
+
240
+ ## <a name="unappliedAmount"></a>11. Property `unappliedAmount`
241
+
242
+ | | |
243
+ | ------------ | -------- |
244
+ | **Type** | `number` |
245
+ | **Required** | Yes |
246
+
247
+ **Description:** (Read-only) Remaining unallocated amount (amount - allocatedAmount). Server-calculated.
248
+
249
+ :::warning Server-set
250
+ 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.
251
+ :::
252
+
253
+ ## <a name="status"></a>12. Property `status`
254
+
255
+ | | |
256
+ | -------------- | ------------------------------------- |
257
+ | **Type** | `enum (of string)` |
258
+ | **Required** | Yes |
259
+ | **Defined in** | #/definitions/customer-payment-status |
260
+
261
+ **Description:** Customer payment lifecycle status (D22). Tracks allocation progress of received payments.
262
+
263
+ Must be one of:
264
+ * "PENDING"
265
+ * "CONFIRMED"
266
+ * "PARTIALLY_APPLIED"
267
+ * "FULLY_APPLIED"
268
+ * "REFUNDED"
269
+ * "CANCELLED"
270
+
271
+ ## <a name="notes"></a>13. Property `notes`
272
+
273
+ | | |
274
+ | ------------ | ---------------- |
275
+ | **Type** | `string or null` |
276
+ | **Required** | No |
277
+
278
+ ## <a name="recordedBy"></a>14. Property `recordedBy`
279
+
280
+ | | |
281
+ | ------------ | -------- |
282
+ | **Type** | `string` |
283
+ | **Required** | Yes |
284
+
285
+ **Description:** (Immutable) FK → User/staff UID who recorded the payment. Required audit field (D22/IG-7).
286
+
287
+ :::info Immutable
288
+ 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.
289
+ :::
290
+
291
+ ## <a name="recordedByName"></a>15. Property `recordedByName`
292
+
293
+ | | |
294
+ | ------------ | ---------------- |
295
+ | **Type** | `string or null` |
296
+ | **Required** | No |
297
+
298
+ **Description:** (Immutable, Denormalized) From User display name at creation time.
299
+
300
+ :::info Immutable
301
+ 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.
302
+ :::
303
+
304
+ ## <a name="createdAt"></a>16. Property `createdAt`
305
+
306
+ | | |
307
+ | ------------------------- | --------------------------------- |
308
+ | **Type** | `object` |
309
+ | **Required** | Yes |
310
+ | **Additional properties** | Not allowed |
311
+ | **Defined in** | #/definitions/firestore-timestamp |
312
+
313
+ **Description:** (Read-only) Server-generated creation timestamp.
314
+
315
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
316
+ | -------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- |
317
+ | + [_seconds](#paymentDate__seconds ) | No | integer | No | - | - |
318
+ | + [_nanoseconds](#paymentDate__nanoseconds ) | No | integer | No | - | - |
319
+
320
+ ### <a name="paymentDate__seconds"></a>16.1. Property `_seconds`
321
+
322
+ | | |
323
+ | ------------ | --------- |
324
+ | **Type** | `integer` |
325
+ | **Required** | Yes |
326
+
327
+ | Restrictions | |
328
+ | ------------ | ---------------------- |
329
+ | **Minimum** | &ge; -9007199254740991 |
330
+ | **Maximum** | &le; 9007199254740991 |
331
+
332
+ ### <a name="paymentDate__nanoseconds"></a>16.2. Property `_nanoseconds`
333
+
334
+ | | |
335
+ | ------------ | --------- |
336
+ | **Type** | `integer` |
337
+ | **Required** | Yes |
338
+
339
+ | Restrictions | |
340
+ | ------------ | ---------------------- |
341
+ | **Minimum** | &ge; -9007199254740991 |
342
+ | **Maximum** | &le; 9007199254740991 |
343
+
344
+ :::warning Server-set
345
+ 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.
346
+ :::
347
+
348
+ ## <a name="updatedAt"></a>17. Property `updatedAt`
349
+
350
+ | | |
351
+ | ------------------------- | ---------------- |
352
+ | **Type** | `combining` |
353
+ | **Required** | No |
354
+ | **Additional properties** | Any type allowed |
355
+
356
+ **Description:** (Read-only) Server-generated update timestamp.
357
+
358
+ | Any of(Option) |
359
+ | ------------------------------------------ |
360
+ | [firestore-timestamp](#updatedAt_anyOf_i0) |
361
+ | [item 1](#updatedAt_anyOf_i1) |
362
+
363
+ ### <a name="updatedAt_anyOf_i0"></a>17.1. Property `firestore-timestamp`
364
+
365
+ | | |
366
+ | ------------------------- | --------------------------- |
367
+ | **Type** | `object` |
368
+ | **Required** | No |
369
+ | **Additional properties** | Not allowed |
370
+ | **Same definition as** | [paymentDate](#paymentDate) |
371
+
372
+ **Description:** Firestore Timestamp serialized representation
373
+
374
+ ### <a name="updatedAt_anyOf_i1"></a>17.2. Property `item 1`
375
+
376
+ | | |
377
+ | ------------ | ------ |
378
+ | **Type** | `null` |
379
+ | **Required** | No |
380
+
381
+ ----------------------------------------------------------------------------------------------------------------------------
382
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-06 at 19:27:48 +0000
383
+
384
+ :::warning Server-set
385
+ 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.
386
+ :::
387
+
388
+ ## Related Decisions
389
+
390
+ | Decision | Title |
391
+ |---|---|
392
+ | **D22** | Mobile customer payment feature scope |