@ingenx-io/valets-schema-mcp-server 0.1.4 → 0.1.5
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 +42 -8
- package/data/docs/enums/attention-status.md +1 -1
- package/data/docs/enums/booking-status.md +1 -1
- package/data/docs/enums/customer-payment-status.md +1 -1
- package/data/docs/enums/customer-payment-target-type.md +1 -1
- package/data/docs/enums/delivery-type.md +1 -1
- package/data/docs/enums/deployment-link-type.md +26 -0
- package/data/docs/enums/event-status.md +2 -2
- package/data/docs/enums/fulfillment-status.md +2 -2
- package/data/docs/enums/loyalty-transaction-type.md +2 -2
- package/data/docs/enums/order-status.md +2 -2
- package/data/docs/enums/payment-method.md +2 -2
- package/data/docs/enums/payment-proof-status.md +2 -2
- package/data/docs/enums/payment-status.md +2 -2
- package/data/docs/enums/pending-issue.md +2 -2
- package/data/docs/enums/return-status.md +2 -2
- package/data/docs/enums/session-status.md +2 -2
- package/data/docs/enums/site-status.md +24 -0
- package/data/docs/enums/ticket-status.md +2 -2
- package/data/docs/index.md +9 -3
- package/data/docs/models/allowed-user.md +1 -1
- package/data/docs/models/analytics-backfill.md +398 -0
- package/data/docs/models/analytics-daily.md +351 -0
- package/data/docs/models/analytics-event.md +2 -2
- package/data/docs/models/analytics-hourly.md +372 -0
- package/data/docs/models/booking-version.md +2 -2
- package/data/docs/models/booking.md +2 -2
- package/data/docs/models/customer-payment-allocation.md +2 -2
- package/data/docs/models/customer-payment.md +2 -2
- package/data/docs/models/customer.md +2 -2
- package/data/docs/models/event.md +2 -2
- package/data/docs/models/loyalty-config.md +2 -2
- package/data/docs/models/loyalty-reward.md +2 -2
- package/data/docs/models/loyalty-status.md +2 -2
- package/data/docs/models/loyalty-transaction.md +2 -2
- package/data/docs/models/magic-link-request.md +2 -2
- package/data/docs/models/metrics-current.md +2 -2
- package/data/docs/models/metrics-daily.md +2 -2
- package/data/docs/models/metrics-monthly.md +2 -2
- package/data/docs/models/order-item.md +2 -2
- package/data/docs/models/order.md +248 -220
- package/data/docs/models/sale.md +2 -2
- package/data/docs/models/site-payment.md +2 -2
- package/data/docs/models/site.md +561 -0
- package/data/docs/models/ticket.md +2 -2
- package/data/static/llms.txt +198 -1
- package/data/static/openapi.yaml +617 -0
- package/data/static/schemas.json +719 -1
- package/package.json +1 -1
package/data/static/llms.txt
CHANGED
|
@@ -30,6 +30,10 @@ Values: BOOKING, ORDER, PURCHASE
|
|
|
30
30
|
Fulfillment channel for an order. Determines whether the customer comes to the business (ON_SITE), collects their order themselves (PICK_UP), or receives a physical delivery (DELIVERY). Drives whether fulfillmentStatus is relevant.
|
|
31
31
|
Values: ON_SITE, PICK_UP, DELIVERY
|
|
32
32
|
|
|
33
|
+
### DeploymentLinkType
|
|
34
|
+
Category of a Site deployment link (D41). Used for UI icon/labelling and deep-link handling.
|
|
35
|
+
Values: web, mobile, pwa, app-store, play-store, other
|
|
36
|
+
|
|
33
37
|
### EventStatus
|
|
34
38
|
Ticketed event lifecycle (D32). Mobile-only today; Dashboard in Wave 4.
|
|
35
39
|
Values: DRAFT, ACTIVE, CANCELLED, COMPLETED
|
|
@@ -70,6 +74,10 @@ Values: RETURN_REQUESTED, RETURN_PROCESSING, RETURNED, EXCHANGE_REQUESTED, EXCHA
|
|
|
70
74
|
Per-date/per-slot booking session status (D19). Dashboard is sole writer; Mobile is read-only.
|
|
71
75
|
Values: PENDING, CONFIRMED, CANCELLATION_REQUESTED, COMPLETED, NO_SHOW, CANCELLED
|
|
72
76
|
|
|
77
|
+
### SiteStatus
|
|
78
|
+
Lifecycle status for a Site (D41). Drives whether the site is reachable and whether analytics/payments flow.
|
|
79
|
+
Values: ACTIVE, INACTIVE, EXPIRED, ARCHIVED
|
|
80
|
+
|
|
73
81
|
### TicketStatus
|
|
74
82
|
Event ticket status (D32). VALID = active and unused.
|
|
75
83
|
Values: VALID, USED, CANCELLED
|
|
@@ -108,6 +116,97 @@ Example:
|
|
|
108
116
|
}
|
|
109
117
|
```
|
|
110
118
|
|
|
119
|
+
### AnalyticsBackfill
|
|
120
|
+
Fields: 12 (10 required)
|
|
121
|
+
|
|
122
|
+
| Field | Type | Required | Description |
|
|
123
|
+
|-------|------|----------|-------------|
|
|
124
|
+
| id | ['string', 'null'] | no | (Read-only) Firestore document ID, auto-generated. |
|
|
125
|
+
| companyId | string | yes | (Immutable) FK → Company document ID. |
|
|
126
|
+
| siteId | string | yes | (Immutable) FK → Site document ID (D40). |
|
|
127
|
+
| status | enum(5) | yes | Run status. |
|
|
128
|
+
| from | string | yes | (Immutable) Inclusive start date (`YYYY-MM-DD`, UTC). |
|
|
129
|
+
| to | string | yes | (Immutable) Inclusive end date (`YYYY-MM-DD`, UTC). |
|
|
130
|
+
| dryRun | boolean | yes | (Immutable) When true, rollup writes are skipped — only source counts are returned for diffing. |
|
|
131
|
+
| processedDates | array<string> | yes | Ordered list of `YYYY-MM-DD` dates already processed by this run. |
|
|
132
|
+
| errors | array<object> | yes | Per-date errors collected during the run. |
|
|
133
|
+
| errors[].date | string | yes | `YYYY-MM-DD` date that failed. |
|
|
134
|
+
| errors[].message | string | yes | Error message captured at failure. |
|
|
135
|
+
| errors[].at | FirestoreTimestamp | yes | When the error occurred. |
|
|
136
|
+
| triggeredBy | string | yes | (Immutable) UID of the admin who triggered the backfill. |
|
|
137
|
+
| startedAt | FirestoreTimestamp | yes | (Read-only) When the run actually started. |
|
|
138
|
+
| completedAt | any | no | (Read-only) When the run reached a terminal status. |
|
|
139
|
+
|
|
140
|
+
Example:
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"id": null,
|
|
144
|
+
"companyId": "comp_xyz789",
|
|
145
|
+
"siteId": "sit_ref123",
|
|
146
|
+
"status": "pending",
|
|
147
|
+
"from": "from",
|
|
148
|
+
"to": "to",
|
|
149
|
+
"dryRun": true,
|
|
150
|
+
"processedDates": [
|
|
151
|
+
"example"
|
|
152
|
+
],
|
|
153
|
+
"errors": [
|
|
154
|
+
{
|
|
155
|
+
"date": "2026-02-15",
|
|
156
|
+
"message": "message",
|
|
157
|
+
"at": "at"
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
"triggeredBy": "triggeredBy",
|
|
161
|
+
"startedAt": "startedAt",
|
|
162
|
+
"completedAt": "completedAt"
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### AnalyticsDaily
|
|
167
|
+
Fields: 16 (14 required)
|
|
168
|
+
|
|
169
|
+
| Field | Type | Required | Description |
|
|
170
|
+
|-------|------|----------|-------------|
|
|
171
|
+
| totalEvents | integer | yes | Total event count within the bucket. |
|
|
172
|
+
| pageViews | integer | yes | Count of `page_view` + `screen_view` events. |
|
|
173
|
+
| sessions | integer | yes | Distinct session count within the bucket (by `sessionId`). |
|
|
174
|
+
| uniqueUsers | integer | yes | Distinct identified `userId` count. Anonymous sessions (userId=null) are excluded. |
|
|
175
|
+
| anonymousSessions | integer | yes | Distinct session count where `userId` was null for the entire session. |
|
|
176
|
+
| orders | integer | yes | Count of `order_submitted` events (or Order documents scoped to this site, D43) within the bucket. |
|
|
177
|
+
| paymentsCompleted | integer | yes | Count of `payment_completed` events within the bucket. |
|
|
178
|
+
| paymentsFailed | integer | yes | Count of `payment_failed` events within the bucket. |
|
|
179
|
+
| errors | integer | yes | Count of `error_occurred` + `exception_caught` events within the bucket. |
|
|
180
|
+
| eventCounts | record<string,integer> | yes | Per-event-name counts — key is the event name (canonical or custom), value is the count within the bucket. |
|
|
181
|
+
| id | ['string', 'null'] | no | (Read-only) Firestore document ID = `YYYY-MM-DD`. |
|
|
182
|
+
| companyId | string | yes | (Immutable) FK → Company document ID. |
|
|
183
|
+
| siteId | string | yes | (Immutable) FK → Site document ID (D40). |
|
|
184
|
+
| date | string | yes | (Immutable) `YYYY-MM-DD` UTC — matches document ID. |
|
|
185
|
+
| computedAt | FirestoreTimestamp | yes | (Read-only) When this rollup was last (re)computed. Updated on every set/merge. |
|
|
186
|
+
| sourceEventCount | ['integer', 'null'] | no | (Read-only, Optional) Total source events scanned when producing this rollup. Useful for dry-run diffing. |
|
|
187
|
+
|
|
188
|
+
Example:
|
|
189
|
+
```json
|
|
190
|
+
{
|
|
191
|
+
"totalEvents": 0,
|
|
192
|
+
"pageViews": 0,
|
|
193
|
+
"sessions": 0,
|
|
194
|
+
"uniqueUsers": 0,
|
|
195
|
+
"anonymousSessions": 0,
|
|
196
|
+
"orders": 0,
|
|
197
|
+
"paymentsCompleted": 0,
|
|
198
|
+
"paymentsFailed": 0,
|
|
199
|
+
"errors": 0,
|
|
200
|
+
"eventCounts": {},
|
|
201
|
+
"id": null,
|
|
202
|
+
"companyId": "comp_xyz789",
|
|
203
|
+
"siteId": "sit_ref123",
|
|
204
|
+
"date": "2026-02-15",
|
|
205
|
+
"computedAt": "computedAt",
|
|
206
|
+
"sourceEventCount": null
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
111
210
|
### AnalyticsEvent
|
|
112
211
|
Fields: 12 (10 required)
|
|
113
212
|
|
|
@@ -159,6 +258,52 @@ Example:
|
|
|
159
258
|
}
|
|
160
259
|
```
|
|
161
260
|
|
|
261
|
+
### AnalyticsHourly
|
|
262
|
+
Fields: 17 (15 required)
|
|
263
|
+
|
|
264
|
+
| Field | Type | Required | Description |
|
|
265
|
+
|-------|------|----------|-------------|
|
|
266
|
+
| totalEvents | integer | yes | Total event count within the bucket. |
|
|
267
|
+
| pageViews | integer | yes | Count of `page_view` + `screen_view` events. |
|
|
268
|
+
| sessions | integer | yes | Distinct session count within the bucket (by `sessionId`). |
|
|
269
|
+
| uniqueUsers | integer | yes | Distinct identified `userId` count. Anonymous sessions (userId=null) are excluded. |
|
|
270
|
+
| anonymousSessions | integer | yes | Distinct session count where `userId` was null for the entire session. |
|
|
271
|
+
| orders | integer | yes | Count of `order_submitted` events (or Order documents scoped to this site, D43) within the bucket. |
|
|
272
|
+
| paymentsCompleted | integer | yes | Count of `payment_completed` events within the bucket. |
|
|
273
|
+
| paymentsFailed | integer | yes | Count of `payment_failed` events within the bucket. |
|
|
274
|
+
| errors | integer | yes | Count of `error_occurred` + `exception_caught` events within the bucket. |
|
|
275
|
+
| eventCounts | record<string,integer> | yes | Per-event-name counts — key is the event name (canonical or custom), value is the count within the bucket. |
|
|
276
|
+
| id | ['string', 'null'] | no | (Read-only) Firestore document ID = `YYYY-MM-DD-HH`. |
|
|
277
|
+
| companyId | string | yes | (Immutable) FK → Company document ID. |
|
|
278
|
+
| siteId | string | yes | (Immutable) FK → Site document ID (D40). |
|
|
279
|
+
| date | string | yes | (Immutable) `YYYY-MM-DD` UTC for the bucket day. |
|
|
280
|
+
| hour | integer | yes | (Immutable) UTC hour of day, 0–23. |
|
|
281
|
+
| computedAt | FirestoreTimestamp | yes | (Read-only) When this rollup was last (re)computed. |
|
|
282
|
+
| sourceEventCount | ['integer', 'null'] | no | (Read-only, Optional) Total source events scanned when producing this rollup. |
|
|
283
|
+
|
|
284
|
+
Example:
|
|
285
|
+
```json
|
|
286
|
+
{
|
|
287
|
+
"totalEvents": 0,
|
|
288
|
+
"pageViews": 0,
|
|
289
|
+
"sessions": 0,
|
|
290
|
+
"uniqueUsers": 0,
|
|
291
|
+
"anonymousSessions": 0,
|
|
292
|
+
"orders": 0,
|
|
293
|
+
"paymentsCompleted": 0,
|
|
294
|
+
"paymentsFailed": 0,
|
|
295
|
+
"errors": 0,
|
|
296
|
+
"eventCounts": {},
|
|
297
|
+
"id": null,
|
|
298
|
+
"companyId": "comp_xyz789",
|
|
299
|
+
"siteId": "sit_ref123",
|
|
300
|
+
"date": "2026-02-15",
|
|
301
|
+
"hour": 0,
|
|
302
|
+
"computedAt": "computedAt",
|
|
303
|
+
"sourceEventCount": null
|
|
304
|
+
}
|
|
305
|
+
```
|
|
306
|
+
|
|
162
307
|
### Booking
|
|
163
308
|
Fields: 52 (7 required)
|
|
164
309
|
|
|
@@ -908,13 +1053,14 @@ Example:
|
|
|
908
1053
|
```
|
|
909
1054
|
|
|
910
1055
|
### Order
|
|
911
|
-
Fields:
|
|
1056
|
+
Fields: 48 (8 required)
|
|
912
1057
|
|
|
913
1058
|
| Field | Type | Required | Description |
|
|
914
1059
|
|-------|------|----------|-------------|
|
|
915
1060
|
| id | string | yes | (Read-only) Firestore document ID. Note: some models also have uid; see ID conventions. |
|
|
916
1061
|
| uid | string | yes | (Read-only) Entity UID. Often mirrors id. |
|
|
917
1062
|
| companyId | string | yes | (Immutable) FK → Company document ID. Scopes all queries. |
|
|
1063
|
+
| siteId | ['string', 'null'] | no | (Immutable, Optional) FK → Site document ID (D43 / ADR-003). null = company-wide. |
|
|
918
1064
|
| orderNumber | string | yes | (Read-only) Server-generated order number. |
|
|
919
1065
|
| status | OrderStatus | yes | Core lifecycle status (D34, MIG-11). See OrderStatus enum for the legacy value migration mapping. |
|
|
920
1066
|
| paymentStatus | any | no | Payment lifecycle (D34). Null until payment is initiated. |
|
|
@@ -966,6 +1112,7 @@ Example:
|
|
|
966
1112
|
"id": "bk_abc123def456",
|
|
967
1113
|
"uid": "user_u8x92kqm",
|
|
968
1114
|
"companyId": "comp_xyz789",
|
|
1115
|
+
"siteId": null,
|
|
969
1116
|
"orderNumber": "ORD-2026-0042",
|
|
970
1117
|
"status": "status",
|
|
971
1118
|
"paymentStatus": "paymentStatus",
|
|
@@ -1085,6 +1232,56 @@ Example:
|
|
|
1085
1232
|
}
|
|
1086
1233
|
```
|
|
1087
1234
|
|
|
1235
|
+
### Site
|
|
1236
|
+
Fields: 14 (6 required)
|
|
1237
|
+
|
|
1238
|
+
| Field | Type | Required | Description |
|
|
1239
|
+
|-------|------|----------|-------------|
|
|
1240
|
+
| id | ['string', 'null'] | no | (Read-only) Firestore document ID, auto-generated. |
|
|
1241
|
+
| companyId | string | yes | (Immutable) FK → Company document ID. Scopes all site sub-collections. |
|
|
1242
|
+
| name | string | yes | Human-readable site name shown in dashboards. |
|
|
1243
|
+
| description | ['string', 'null'] | no | Optional freeform description. |
|
|
1244
|
+
| status | SiteStatus | yes | Lifecycle status (D41). Clients filter by ACTIVE. |
|
|
1245
|
+
| deploymentLinks | array<object> | yes | Ordered list of deployment URLs (web, mobile, PWA, store links). |
|
|
1246
|
+
| deploymentLinks[].label | string | yes | Human-readable label shown in dashboards (e.g. "Production", "Staging"). |
|
|
1247
|
+
| deploymentLinks[].url | string | yes | Absolute URL or store link. |
|
|
1248
|
+
| deploymentLinks[].type | DeploymentLinkType | yes | Link category — drives icon/handler selection. |
|
|
1249
|
+
| deploymentLinks[].isPrimary | boolean | no | If true, this link is used as the canonical deployment URL for the Site. |
|
|
1250
|
+
| expiresAt | any | no | Optional expiration timestamp. When set and elapsed, `isExpired` flips true and status typically moves to EXPIRED. |
|
|
1251
|
+
| isExpired | ['boolean', 'null'] | no | (Read-only) Derived — true when `expiresAt` is in the past. Maintained by server trigger. |
|
|
1252
|
+
| createdAt | any | no | (Read-only) Server-generated creation timestamp. |
|
|
1253
|
+
| updatedAt | any | no | (Read-only) Server-generated update timestamp. |
|
|
1254
|
+
| createdBy | string | yes | (Immutable) FK → User/staff UID who created the site. |
|
|
1255
|
+
| analyticsEnabled | boolean | yes | Feature flag — when false, clients should not emit analytics events for this site. |
|
|
1256
|
+
| lastAnalyticsSync | any | no | (Read-only) Last time the analytics rollup pipeline refreshed `cachedMetrics`. |
|
|
1257
|
+
| cachedMetrics | ['object', 'null'] | no | (Read-only, Denormalized) Cached metrics snapshot for quick dashboard rendering. |
|
|
1258
|
+
|
|
1259
|
+
Example:
|
|
1260
|
+
```json
|
|
1261
|
+
{
|
|
1262
|
+
"id": null,
|
|
1263
|
+
"companyId": "comp_xyz789",
|
|
1264
|
+
"name": "Amadou Diallo",
|
|
1265
|
+
"description": null,
|
|
1266
|
+
"status": "status",
|
|
1267
|
+
"deploymentLinks": [
|
|
1268
|
+
{
|
|
1269
|
+
"label": "label",
|
|
1270
|
+
"url": "https://storage.example.com/url.jpg",
|
|
1271
|
+
"type": "phone"
|
|
1272
|
+
}
|
|
1273
|
+
],
|
|
1274
|
+
"expiresAt": "expiresAt",
|
|
1275
|
+
"isExpired": null,
|
|
1276
|
+
"createdAt": "createdAt",
|
|
1277
|
+
"updatedAt": "updatedAt",
|
|
1278
|
+
"createdBy": "staff_k0f1",
|
|
1279
|
+
"analyticsEnabled": true,
|
|
1280
|
+
"lastAnalyticsSync": "lastAnalyticsSync",
|
|
1281
|
+
"cachedMetrics": null
|
|
1282
|
+
}
|
|
1283
|
+
```
|
|
1284
|
+
|
|
1088
1285
|
### SitePayment
|
|
1089
1286
|
Fields: 10 (9 required)
|
|
1090
1287
|
|