@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.
- package/data/docs/collections/firestore-paths.md +49 -0
- package/data/docs/decisions/migrations.md +56 -0
- package/data/docs/decisions/summary.md +78 -0
- package/data/docs/enums/booking-status.md +26 -0
- package/data/docs/enums/customer-payment-status.md +26 -0
- package/data/docs/enums/customer-payment-target-type.md +23 -0
- package/data/docs/enums/delivery-type.md +23 -0
- package/data/docs/enums/event-status.md +30 -0
- package/data/docs/enums/fulfillment-status.md +32 -0
- package/data/docs/enums/loyalty-transaction-type.md +32 -0
- package/data/docs/enums/order-status.md +65 -0
- package/data/docs/enums/payment-method.md +36 -0
- package/data/docs/enums/payment-proof-status.md +23 -0
- package/data/docs/enums/payment-status.md +34 -0
- package/data/docs/enums/return-status.md +32 -0
- package/data/docs/enums/session-status.md +32 -0
- package/data/docs/enums/ticket-status.md +29 -0
- package/data/docs/index.md +102 -0
- package/data/docs/models/booking-version.md +295 -0
- package/data/docs/models/booking.md +1754 -0
- package/data/docs/models/customer-payment-allocation.md +336 -0
- package/data/docs/models/customer-payment.md +392 -0
- package/data/docs/models/customer.md +475 -0
- package/data/docs/models/event.md +386 -0
- package/data/docs/models/loyalty-config.md +317 -0
- package/data/docs/models/loyalty-reward.md +236 -0
- package/data/docs/models/loyalty-status.md +328 -0
- package/data/docs/models/loyalty-transaction.md +326 -0
- package/data/docs/models/metrics-current.md +532 -0
- package/data/docs/models/metrics-daily.md +548 -0
- package/data/docs/models/metrics-monthly.md +548 -0
- package/data/docs/models/order-item.md +361 -0
- package/data/docs/models/order.md +1637 -0
- package/data/docs/models/payment-summary.md +123 -0
- package/data/docs/models/sale.md +540 -0
- package/data/docs/models/ticket.md +405 -0
- package/data/docs/triggers/event-ticket-triggers.md +204 -0
- package/data/docs/triggers/loyalty-automation.md +123 -0
- package/data/static/decisions.json +966 -0
- package/data/static/llms.txt +1056 -0
- package/data/static/openapi.yaml +3090 -0
- package/data/static/schemas.json +4055 -0
- package/package.json +1 -1
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "CustomerPaymentAllocation"
|
|
3
|
+
sidebar_label: "CustomerPaymentAllocation"
|
|
4
|
+
sidebar_position: 5
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# CustomerPaymentAllocation
|
|
8
|
+
|
|
9
|
+
<details>
|
|
10
|
+
<summary>Example JSON</summary>
|
|
11
|
+
|
|
12
|
+
```json
|
|
13
|
+
{
|
|
14
|
+
"id": null,
|
|
15
|
+
"companyId": "comp_xyz789",
|
|
16
|
+
"paymentId": "pay_ref123",
|
|
17
|
+
"customerId": "cus_ref123",
|
|
18
|
+
"targetId": "tar_ref123",
|
|
19
|
+
"targetType": "targetType",
|
|
20
|
+
"targetReference": null,
|
|
21
|
+
"allocatedAmount": 30000,
|
|
22
|
+
"transferredToAllocationId": null,
|
|
23
|
+
"transferredFromAllocationId": null,
|
|
24
|
+
"transferredAt": "transferredAt",
|
|
25
|
+
"createdBy": "staff_k0f1",
|
|
26
|
+
"createdByName": null,
|
|
27
|
+
"createdAt": "createdAt"
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
</details>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
- [1. Property `id`](#id)
|
|
35
|
+
- [2. Property `companyId`](#companyId)
|
|
36
|
+
- [3. Property `paymentId`](#paymentId)
|
|
37
|
+
- [4. Property `customerId`](#customerId)
|
|
38
|
+
- [5. Property `targetId`](#targetId)
|
|
39
|
+
- [6. Property `targetType`](#targetType)
|
|
40
|
+
- [7. Property `targetReference`](#targetReference)
|
|
41
|
+
- [8. Property `allocatedAmount`](#allocatedAmount)
|
|
42
|
+
- [9. Property `transferredToAllocationId`](#transferredToAllocationId)
|
|
43
|
+
- [10. Property `transferredFromAllocationId`](#transferredFromAllocationId)
|
|
44
|
+
- [11. Property `transferredAt`](#transferredAt)
|
|
45
|
+
- [11.1. Property `firestore-timestamp`](#transferredAt_anyOf_i0)
|
|
46
|
+
- [11.1.1. Property `_seconds`](#transferredAt_anyOf_i0__seconds)
|
|
47
|
+
- [11.1.2. Property `_nanoseconds`](#transferredAt_anyOf_i0__nanoseconds)
|
|
48
|
+
- [11.2. Property `item 1`](#transferredAt_anyOf_i1)
|
|
49
|
+
- [12. Property `createdBy`](#createdBy)
|
|
50
|
+
- [13. Property `createdByName`](#createdByName)
|
|
51
|
+
- [14. Property `createdAt`](#createdAt)
|
|
52
|
+
- [14.1. Property `_seconds`](#transferredAt_anyOf_i0__seconds)
|
|
53
|
+
- [14.2. Property `_nanoseconds`](#transferredAt_anyOf_i0__nanoseconds)
|
|
54
|
+
|
|
55
|
+
| | |
|
|
56
|
+
| ------------------------- | ----------------------------------------- |
|
|
57
|
+
| **Type** | `object` |
|
|
58
|
+
| **Required** | No |
|
|
59
|
+
| **Additional properties** | Not allowed |
|
|
60
|
+
| **Defined in** | #/definitions/customer-payment-allocation |
|
|
61
|
+
|
|
62
|
+
**Description:** CustomerPaymentAllocation model. Collection: companies/\{companyId\}/customerPaymentAllocations/\{allocId\}. Links customer payments to bookings, orders, or purchases.
|
|
63
|
+
|
|
64
|
+
| Property | Pattern | Type | Deprecated | Definition | Title/Description |
|
|
65
|
+
| -------------------------------------------------------------- | ------- | ---------------- | ---------- | --------------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
|
66
|
+
| - [id](#id ) | No | string or null | No | - | (Read-only) Firestore document ID. Note: optional in current schema. |
|
|
67
|
+
| + [companyId](#companyId ) | No | string | No | - | (Immutable) FK → Company document ID. |
|
|
68
|
+
| + [paymentId](#paymentId ) | No | string | No | - | (Immutable) FK → CustomerPayment.id. Parent payment this allocation draws from. |
|
|
69
|
+
| + [customerId](#customerId ) | No | string | No | - | (Immutable) FK → Customer.id (Firestore doc ID). |
|
|
70
|
+
| + [targetId](#targetId ) | No | string | No | - | (Immutable) FK → Booking.id, Order.id, or Sale.id (polymorphic). See targetType for discriminator. |
|
|
71
|
+
| + [targetType](#targetType ) | No | enum (of string) | No | In #/definitions/customer-payment-target-type | (Immutable) Discriminator for targetId: BOOKING, ORDER, or PURCHASE. |
|
|
72
|
+
| - [targetReference](#targetReference ) | No | string or null | No | - | - |
|
|
73
|
+
| + [allocatedAmount](#allocatedAmount ) | No | number | No | - | (Immutable) Amount allocated in this allocation. Set at creation. |
|
|
74
|
+
| - [transferredToAllocationId](#transferredToAllocationId ) | No | string or null | No | - | FK → CustomerPaymentAllocation.id. Self-reference for transfer chains. |
|
|
75
|
+
| - [transferredFromAllocationId](#transferredFromAllocationId ) | No | string or null | No | - | FK → CustomerPaymentAllocation.id. Self-reference for transfer chains. |
|
|
76
|
+
| - [transferredAt](#transferredAt ) | No | Combination | No | - | Firestore Timestamp serialized representation |
|
|
77
|
+
| + [createdBy](#createdBy ) | No | string | No | - | (Immutable) FK → User/staff UID who created this allocation. |
|
|
78
|
+
| - [createdByName](#createdByName ) | No | string or null | No | - | (Immutable, Denormalized) From User display name at creation time. |
|
|
79
|
+
| + [createdAt](#createdAt ) | No | object | No | In #/definitions/firestore-timestamp | (Read-only) Server-generated creation timestamp. |
|
|
80
|
+
|
|
81
|
+
## <a name="id"></a>1. Property `id`
|
|
82
|
+
|
|
83
|
+
| | |
|
|
84
|
+
| ------------ | ---------------- |
|
|
85
|
+
| **Type** | `string or null` |
|
|
86
|
+
| **Required** | No |
|
|
87
|
+
|
|
88
|
+
**Description:** (Read-only) Firestore document ID. Note: optional in current schema.
|
|
89
|
+
|
|
90
|
+
:::warning Server-set
|
|
91
|
+
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.
|
|
92
|
+
:::
|
|
93
|
+
|
|
94
|
+
## <a name="companyId"></a>2. Property `companyId`
|
|
95
|
+
|
|
96
|
+
| | |
|
|
97
|
+
| ------------ | -------- |
|
|
98
|
+
| **Type** | `string` |
|
|
99
|
+
| **Required** | Yes |
|
|
100
|
+
|
|
101
|
+
**Description:** (Immutable) FK → Company document ID.
|
|
102
|
+
|
|
103
|
+
:::info Immutable
|
|
104
|
+
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.
|
|
105
|
+
:::
|
|
106
|
+
|
|
107
|
+
## <a name="paymentId"></a>3. Property `paymentId`
|
|
108
|
+
|
|
109
|
+
| | |
|
|
110
|
+
| ------------ | -------- |
|
|
111
|
+
| **Type** | `string` |
|
|
112
|
+
| **Required** | Yes |
|
|
113
|
+
|
|
114
|
+
**Description:** (Immutable) FK → CustomerPayment.id. Parent payment this allocation draws from.
|
|
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="customerId"></a>4. Property `customerId`
|
|
121
|
+
|
|
122
|
+
| | |
|
|
123
|
+
| ------------ | -------- |
|
|
124
|
+
| **Type** | `string` |
|
|
125
|
+
| **Required** | Yes |
|
|
126
|
+
|
|
127
|
+
**Description:** (Immutable) FK → Customer.id (Firestore doc ID).
|
|
128
|
+
|
|
129
|
+
:::info Immutable
|
|
130
|
+
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.
|
|
131
|
+
:::
|
|
132
|
+
|
|
133
|
+
## <a name="targetId"></a>5. Property `targetId`
|
|
134
|
+
|
|
135
|
+
| | |
|
|
136
|
+
| ------------ | -------- |
|
|
137
|
+
| **Type** | `string` |
|
|
138
|
+
| **Required** | Yes |
|
|
139
|
+
|
|
140
|
+
**Description:** (Immutable) FK → Booking.id, Order.id, or Sale.id (polymorphic). See targetType for discriminator.
|
|
141
|
+
|
|
142
|
+
:::info Immutable
|
|
143
|
+
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.
|
|
144
|
+
:::
|
|
145
|
+
|
|
146
|
+
## <a name="targetType"></a>6. Property `targetType`
|
|
147
|
+
|
|
148
|
+
| | |
|
|
149
|
+
| -------------- | ------------------------------------------ |
|
|
150
|
+
| **Type** | `enum (of string)` |
|
|
151
|
+
| **Required** | Yes |
|
|
152
|
+
| **Defined in** | #/definitions/customer-payment-target-type |
|
|
153
|
+
|
|
154
|
+
**Description:** (Immutable) Discriminator for targetId: BOOKING, ORDER, or PURCHASE.
|
|
155
|
+
|
|
156
|
+
Must be one of:
|
|
157
|
+
* "BOOKING"
|
|
158
|
+
* "ORDER"
|
|
159
|
+
* "PURCHASE"
|
|
160
|
+
|
|
161
|
+
:::info Immutable
|
|
162
|
+
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.
|
|
163
|
+
:::
|
|
164
|
+
|
|
165
|
+
## <a name="targetReference"></a>7. Property `targetReference`
|
|
166
|
+
|
|
167
|
+
| | |
|
|
168
|
+
| ------------ | ---------------- |
|
|
169
|
+
| **Type** | `string or null` |
|
|
170
|
+
| **Required** | No |
|
|
171
|
+
|
|
172
|
+
## <a name="allocatedAmount"></a>8. Property `allocatedAmount`
|
|
173
|
+
|
|
174
|
+
| | |
|
|
175
|
+
| ------------ | -------- |
|
|
176
|
+
| **Type** | `number` |
|
|
177
|
+
| **Required** | Yes |
|
|
178
|
+
|
|
179
|
+
**Description:** (Immutable) Amount allocated in this allocation. Set at creation.
|
|
180
|
+
|
|
181
|
+
:::info Immutable
|
|
182
|
+
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.
|
|
183
|
+
:::
|
|
184
|
+
|
|
185
|
+
## <a name="transferredToAllocationId"></a>9. Property `transferredToAllocationId`
|
|
186
|
+
|
|
187
|
+
| | |
|
|
188
|
+
| ------------ | ---------------- |
|
|
189
|
+
| **Type** | `string or null` |
|
|
190
|
+
| **Required** | No |
|
|
191
|
+
|
|
192
|
+
**Description:** FK → CustomerPaymentAllocation.id. Self-reference for transfer chains.
|
|
193
|
+
|
|
194
|
+
## <a name="transferredFromAllocationId"></a>10. Property `transferredFromAllocationId`
|
|
195
|
+
|
|
196
|
+
| | |
|
|
197
|
+
| ------------ | ---------------- |
|
|
198
|
+
| **Type** | `string or null` |
|
|
199
|
+
| **Required** | No |
|
|
200
|
+
|
|
201
|
+
**Description:** FK → CustomerPaymentAllocation.id. Self-reference for transfer chains.
|
|
202
|
+
|
|
203
|
+
## <a name="transferredAt"></a>11. Property `transferredAt`
|
|
204
|
+
|
|
205
|
+
| | |
|
|
206
|
+
| ------------------------- | ---------------- |
|
|
207
|
+
| **Type** | `combining` |
|
|
208
|
+
| **Required** | No |
|
|
209
|
+
| **Additional properties** | Any type allowed |
|
|
210
|
+
|
|
211
|
+
**Description:** Firestore Timestamp serialized representation
|
|
212
|
+
|
|
213
|
+
| Any of(Option) |
|
|
214
|
+
| ---------------------------------------------- |
|
|
215
|
+
| [firestore-timestamp](#transferredAt_anyOf_i0) |
|
|
216
|
+
| [item 1](#transferredAt_anyOf_i1) |
|
|
217
|
+
|
|
218
|
+
### <a name="transferredAt_anyOf_i0"></a>11.1. Property `firestore-timestamp`
|
|
219
|
+
|
|
220
|
+
| | |
|
|
221
|
+
| ------------------------- | --------------------------------- |
|
|
222
|
+
| **Type** | `object` |
|
|
223
|
+
| **Required** | No |
|
|
224
|
+
| **Additional properties** | Not allowed |
|
|
225
|
+
| **Defined in** | #/definitions/firestore-timestamp |
|
|
226
|
+
|
|
227
|
+
**Description:** Firestore Timestamp serialized representation
|
|
228
|
+
|
|
229
|
+
| Property | Pattern | Type | Deprecated | Definition | Title/Description |
|
|
230
|
+
| ------------------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- |
|
|
231
|
+
| + [_seconds](#transferredAt_anyOf_i0__seconds ) | No | integer | No | - | - |
|
|
232
|
+
| + [_nanoseconds](#transferredAt_anyOf_i0__nanoseconds ) | No | integer | No | - | - |
|
|
233
|
+
|
|
234
|
+
#### <a name="transferredAt_anyOf_i0__seconds"></a>11.1.1. Property `_seconds`
|
|
235
|
+
|
|
236
|
+
| | |
|
|
237
|
+
| ------------ | --------- |
|
|
238
|
+
| **Type** | `integer` |
|
|
239
|
+
| **Required** | Yes |
|
|
240
|
+
|
|
241
|
+
| Restrictions | |
|
|
242
|
+
| ------------ | ---------------------- |
|
|
243
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
244
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
245
|
+
|
|
246
|
+
#### <a name="transferredAt_anyOf_i0__nanoseconds"></a>11.1.2. Property `_nanoseconds`
|
|
247
|
+
|
|
248
|
+
| | |
|
|
249
|
+
| ------------ | --------- |
|
|
250
|
+
| **Type** | `integer` |
|
|
251
|
+
| **Required** | Yes |
|
|
252
|
+
|
|
253
|
+
| Restrictions | |
|
|
254
|
+
| ------------ | ---------------------- |
|
|
255
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
256
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
257
|
+
|
|
258
|
+
### <a name="transferredAt_anyOf_i1"></a>11.2. Property `item 1`
|
|
259
|
+
|
|
260
|
+
| | |
|
|
261
|
+
| ------------ | ------ |
|
|
262
|
+
| **Type** | `null` |
|
|
263
|
+
| **Required** | No |
|
|
264
|
+
|
|
265
|
+
## <a name="createdBy"></a>12. Property `createdBy`
|
|
266
|
+
|
|
267
|
+
| | |
|
|
268
|
+
| ------------ | -------- |
|
|
269
|
+
| **Type** | `string` |
|
|
270
|
+
| **Required** | Yes |
|
|
271
|
+
|
|
272
|
+
**Description:** (Immutable) FK → User/staff UID who created this allocation.
|
|
273
|
+
|
|
274
|
+
:::info Immutable
|
|
275
|
+
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.
|
|
276
|
+
:::
|
|
277
|
+
|
|
278
|
+
## <a name="createdByName"></a>13. Property `createdByName`
|
|
279
|
+
|
|
280
|
+
| | |
|
|
281
|
+
| ------------ | ---------------- |
|
|
282
|
+
| **Type** | `string or null` |
|
|
283
|
+
| **Required** | No |
|
|
284
|
+
|
|
285
|
+
**Description:** (Immutable, Denormalized) From User display name at creation time.
|
|
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="createdAt"></a>14. Property `createdAt`
|
|
292
|
+
|
|
293
|
+
| | |
|
|
294
|
+
| ------------------------- | --------------------------------- |
|
|
295
|
+
| **Type** | `object` |
|
|
296
|
+
| **Required** | Yes |
|
|
297
|
+
| **Additional properties** | Not allowed |
|
|
298
|
+
| **Defined in** | #/definitions/firestore-timestamp |
|
|
299
|
+
|
|
300
|
+
**Description:** (Read-only) Server-generated creation timestamp.
|
|
301
|
+
|
|
302
|
+
| Property | Pattern | Type | Deprecated | Definition | Title/Description |
|
|
303
|
+
| ------------------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- |
|
|
304
|
+
| + [_seconds](#transferredAt_anyOf_i0__seconds ) | No | integer | No | - | - |
|
|
305
|
+
| + [_nanoseconds](#transferredAt_anyOf_i0__nanoseconds ) | No | integer | No | - | - |
|
|
306
|
+
|
|
307
|
+
### <a name="transferredAt_anyOf_i0__seconds"></a>14.1. Property `_seconds`
|
|
308
|
+
|
|
309
|
+
| | |
|
|
310
|
+
| ------------ | --------- |
|
|
311
|
+
| **Type** | `integer` |
|
|
312
|
+
| **Required** | Yes |
|
|
313
|
+
|
|
314
|
+
| Restrictions | |
|
|
315
|
+
| ------------ | ---------------------- |
|
|
316
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
317
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
318
|
+
|
|
319
|
+
### <a name="transferredAt_anyOf_i0__nanoseconds"></a>14.2. Property `_nanoseconds`
|
|
320
|
+
|
|
321
|
+
| | |
|
|
322
|
+
| ------------ | --------- |
|
|
323
|
+
| **Type** | `integer` |
|
|
324
|
+
| **Required** | Yes |
|
|
325
|
+
|
|
326
|
+
| Restrictions | |
|
|
327
|
+
| ------------ | ---------------------- |
|
|
328
|
+
| **Minimum** | ≥ -9007199254740991 |
|
|
329
|
+
| **Maximum** | ≤ 9007199254740991 |
|
|
330
|
+
|
|
331
|
+
----------------------------------------------------------------------------------------------------------------------------
|
|
332
|
+
Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-06 at 19:27:48 +0000
|
|
333
|
+
|
|
334
|
+
:::warning Server-set
|
|
335
|
+
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.
|
|
336
|
+
:::
|