@ingenx-io/valets-schema-mcp-server 0.2.4 → 0.2.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.
Files changed (73) hide show
  1. package/data/docs/collections/firestore-paths.md +32 -20
  2. package/data/docs/enums/app-status.md +24 -0
  3. package/data/docs/enums/attention-status.md +2 -2
  4. package/data/docs/enums/booking-status.md +2 -2
  5. package/data/docs/enums/customer-payment-status.md +2 -2
  6. package/data/docs/enums/customer-payment-target-type.md +2 -2
  7. package/data/docs/enums/delivery-type.md +2 -2
  8. package/data/docs/enums/deployment-link-type.md +2 -2
  9. package/data/docs/enums/event-status.md +2 -2
  10. package/data/docs/enums/fulfillment-status.md +2 -2
  11. package/data/docs/enums/loyalty-transaction-type.md +2 -2
  12. package/data/docs/enums/notification-channel.md +2 -2
  13. package/data/docs/enums/notification-entity-type.md +2 -2
  14. package/data/docs/enums/notification-status.md +2 -2
  15. package/data/docs/enums/order-status.md +2 -2
  16. package/data/docs/enums/outbound-message-format.md +2 -2
  17. package/data/docs/enums/outbound-message-purpose.md +2 -2
  18. package/data/docs/enums/outbound-message-status.md +2 -2
  19. package/data/docs/enums/payment-method.md +2 -2
  20. package/data/docs/enums/payment-proof-status.md +2 -2
  21. package/data/docs/enums/payment-status.md +2 -2
  22. package/data/docs/enums/pending-issue.md +2 -2
  23. package/data/docs/enums/return-status.md +2 -2
  24. package/data/docs/enums/session-status.md +2 -2
  25. package/data/docs/enums/site-status.md +2 -2
  26. package/data/docs/enums/stocktake-frequency.md +2 -2
  27. package/data/docs/enums/stocktake-item-status.md +2 -2
  28. package/data/docs/enums/stocktake-status.md +2 -2
  29. package/data/docs/enums/ticket-status.md +2 -2
  30. package/data/docs/enums/waba-label.md +2 -2
  31. package/data/docs/enums/whatsapp-button-sub-type.md +2 -2
  32. package/data/docs/enums/whatsapp-template-component.md +2 -2
  33. package/data/docs/enums/whatsapp-template-status.md +2 -2
  34. package/data/docs/index.md +9 -5
  35. package/data/docs/models/allowed-user.md +7 -7
  36. package/data/docs/models/analytics-backfill.md +7 -7
  37. package/data/docs/models/analytics-daily.md +6 -6
  38. package/data/docs/models/analytics-event.md +7 -7
  39. package/data/docs/models/analytics-hourly.md +6 -6
  40. package/data/docs/models/app-payment.md +200 -0
  41. package/data/docs/models/app.md +561 -0
  42. package/data/docs/models/booking-version.md +2 -2
  43. package/data/docs/models/booking.md +127 -127
  44. package/data/docs/models/customer-payment-allocation.md +20 -20
  45. package/data/docs/models/customer-payment.md +23 -23
  46. package/data/docs/models/customer.md +11 -11
  47. package/data/docs/models/event.md +22 -22
  48. package/data/docs/models/loyalty-config.md +4 -4
  49. package/data/docs/models/loyalty-reward.md +3 -3
  50. package/data/docs/models/loyalty-status.md +6 -6
  51. package/data/docs/models/loyalty-transaction.md +2 -2
  52. package/data/docs/models/magic-link-request.md +9 -9
  53. package/data/docs/models/metrics-current.md +169 -37
  54. package/data/docs/models/metrics-daily.md +172 -40
  55. package/data/docs/models/metrics-monthly.md +172 -40
  56. package/data/docs/models/notification-record.md +3 -3
  57. package/data/docs/models/order-item.md +6 -6
  58. package/data/docs/models/order.md +78 -78
  59. package/data/docs/models/sale.md +18 -18
  60. package/data/docs/models/site-payment.md +2 -2
  61. package/data/docs/models/site.md +2 -2
  62. package/data/docs/models/stocktake-item.md +4 -4
  63. package/data/docs/models/stocktake.md +5 -5
  64. package/data/docs/models/ticket.md +3 -3
  65. package/data/docs/models/user.md +249 -0
  66. package/data/docs/models/whatsapp-inbound-message.md +2 -2
  67. package/data/docs/models/whatsapp-outbound-lifecycle-event.md +2 -2
  68. package/data/docs/models/whatsapp-outbound-message.md +6 -6
  69. package/data/docs/models/whatsapp-template.md +2 -2
  70. package/data/static/llms.txt +179 -33
  71. package/data/static/openapi.yaml +626 -60
  72. package/data/static/schemas.json +680 -69
  73. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "WhatsappTemplateComponent"
3
3
  sidebar_label: "WhatsappTemplateComponent"
4
- sidebar_position: 30
4
+ sidebar_position: 31
5
5
  ---
6
6
 
7
7
  # WhatsappTemplateComponent
@@ -20,4 +20,4 @@ Must be one of:
20
20
  * "button"
21
21
 
22
22
  ----------------------------------------------------------------------------------------------------------------------------
23
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-27 at 15:51:06 +0000
23
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:51 +0000
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "WhatsappTemplateStatus"
3
3
  sidebar_label: "WhatsappTemplateStatus"
4
- sidebar_position: 31
4
+ sidebar_position: 32
5
5
  ---
6
6
 
7
7
  # WhatsappTemplateStatus
@@ -23,4 +23,4 @@ Must be one of:
23
23
  * "IN_APPEAL"
24
24
 
25
25
  ----------------------------------------------------------------------------------------------------------------------------
26
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-27 at 15:51:06 +0000
26
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:51 +0000
@@ -19,12 +19,13 @@ Developers own the Zod source in `packages/schema/src/`. When schemas change, th
19
19
 
20
20
  ## What's documented
21
21
 
22
- ### Enums (31)
22
+ ### Enums (32)
23
23
 
24
24
  Status enums that drive business logic across Order, Booking, Event, and Loyalty domains:
25
25
 
26
26
  | Enum | Values | Description |
27
27
  |------|--------|-------------|
28
+ | [AppStatus](enums/app-status) | 4 values | Lifecycle status for an App (formerly Site — renamed per decision #40 / D44). Drives whether the app is reachable and whether analytics/payments flow. |
28
29
  | [AttentionStatus](enums/attention-status) | 4 values | Operational attention status for Order and Booking (D39). Controls home-page queue assignment. Server-owned — set via triggers or callable fn only. |
29
30
  | [BookingStatus](enums/booking-status) | 6 values | Booking lifecycle status. COMPLETED_MIXED = some sessions completed, others cancelled/no-show. |
30
31
  | [CustomerPaymentStatus](enums/customer-payment-status) | 6 values | Customer payment lifecycle status (D22). Tracks allocation progress of received payments. |
@@ -58,7 +59,7 @@ Status enums that drive business logic across Order, Booking, Event, and Loyalty
58
59
  | [WhatsappTemplateStatus](enums/whatsapp-template-status) | 6 values | Meta review status of a WhatsApp message template, synced from the WhatsApp Business API. Only APPROVED templates can be sent. The fuller Meta status set is used deliberately (vs just APPROVED/PENDING/REJECTED) so this enum has a distinct value signature from PaymentProofStatus in the JSON-Schema $ref matcher (GH#43). |
59
60
 
60
61
 
61
- ### Models (32)
62
+ ### Models (35)
62
63
 
63
64
  Core Firestore document schemas:
64
65
 
@@ -69,6 +70,8 @@ Core Firestore document schemas:
69
70
  | [AnalyticsDaily](models/analytics-daily) | 16 | 14 | — |
70
71
  | [AnalyticsEvent](models/analytics-event) | 12 | 10 | — |
71
72
  | [AnalyticsHourly](models/analytics-hourly) | 17 | 15 | — |
73
+ | [App](models/app) | 14 | 6 | — |
74
+ | [AppPayment](models/app-payment) | 10 | 9 | — |
72
75
  | [Booking](models/booking) | 52 | 7 | — |
73
76
  | [BookingVersion](models/booking-version) | 9 | 6 | — |
74
77
  | [Customer](models/customer) | 17 | 4 | — |
@@ -80,9 +83,9 @@ Core Firestore document schemas:
80
83
  | [LoyaltyStatus](models/loyalty-status) | 9 | 2 | — |
81
84
  | [LoyaltyTransaction](models/loyalty-transaction) | 16 | 4 | — |
82
85
  | [MagicLinkRequest](models/magic-link-request) | 15 | 11 | — |
83
- | [MetricsCurrent](models/metrics-current) | 25 | 25 | — |
84
- | [MetricsDaily](models/metrics-daily) | 26 | 26 | — |
85
- | [MetricsMonthly](models/metrics-monthly) | 26 | 26 | — |
86
+ | [MetricsCurrent](models/metrics-current) | 30 | 25 | — |
87
+ | [MetricsDaily](models/metrics-daily) | 31 | 26 | — |
88
+ | [MetricsMonthly](models/metrics-monthly) | 31 | 26 | — |
86
89
  | [NotificationRecord](models/notification-record) | 12 | 6 | — |
87
90
  | [Order](models/order) | 48 | 8 | — |
88
91
  | [OrderItem](models/order-item) | 12 | 3 | — |
@@ -92,6 +95,7 @@ Core Firestore document schemas:
92
95
  | [Stocktake](models/stocktake) | 21 | 11 | — |
93
96
  | [StocktakeItem](models/stocktake-item) | 16 | 8 | — |
94
97
  | [Ticket](models/ticket) | 16 | 6 | — |
98
+ | [User](models/user) | 9 | 0 | — |
95
99
  | [WhatsappInboundMessage](models/whatsapp-inbound-message) | 13 | 7 | — |
96
100
  | [WhatsappOutboundLifecycleEvent](models/whatsapp-outbound-lifecycle-event) | 11 | 2 | — |
97
101
  | [WhatsappOutboundMessage](models/whatsapp-outbound-message) | 18 | 7 | — |
@@ -13,7 +13,7 @@ sidebar_position: 1
13
13
  {
14
14
  "id": null,
15
15
  "companyId": "comp_xyz789",
16
- "siteId": "sit_ref123",
16
+ "appId": "app_ref123",
17
17
  "contact": "contact",
18
18
  "tier": "Gold",
19
19
  "amount": 45000,
@@ -28,7 +28,7 @@ sidebar_position: 1
28
28
 
29
29
  - [1. Property `id`](#id)
30
30
  - [2. Property `companyId`](#companyId)
31
- - [3. Property `siteId`](#siteId)
31
+ - [3. Property `appId`](#appId)
32
32
  - [4. Property `contact`](#contact)
33
33
  - [5. Property `tier`](#tier)
34
34
  - [6. Property `amount`](#amount)
@@ -45,13 +45,13 @@ sidebar_position: 1
45
45
  | **Additional properties** | Not allowed |
46
46
  | **Defined in** | #/definitions/allowed-user |
47
47
 
48
- **Description:** AllowedUser model (D40 / ING-304). Collection: companies/\{companyId\}/sites/\{siteId\}/allowed_users/\{contactId\}. Authoritative paid-access allowlist. Upsert semantics — tier upgrades overwrite. Source of truth for access checks and referral code resolution.
48
+ **Description:** AllowedUser model (D40 / ING-304). Collection: companies/\{companyId\}/apps/\{appId\}/allowed_users/\{contactId\}. Authoritative paid-access allowlist. Upsert semantics — tier upgrades overwrite. Source of truth for access checks and referral code resolution.
49
49
 
50
50
  | Property | Pattern | Type | Deprecated | Definition | Title/Description |
51
51
  | ---------------------------------- | ------- | -------------- | ---------- | ------------------------------------ | ------------------------------------------------------------------------------------------------ |
52
52
  | - [id](#id ) | No | string or null | No | - | (Read-only) Firestore document ID = contact identifier (email or E.164 phone), URL-escaped. |
53
53
  | + [companyId](#companyId ) | No | string | No | - | (Immutable) FK → Company document ID. |
54
- | + [siteId](#siteId ) | No | string | No | - | (Immutable) FK → Site document ID (D40 sub-tenant scope). |
54
+ | + [appId](#appId ) | No | string | No | - | (Immutable) FK → App document ID (D40 sub-tenant scope, renamed per D44). |
55
55
  | + [contact](#contact ) | No | string | No | - | Email or E.164 phone number. Canonical identifier for this user within the site. |
56
56
  | + [tier](#tier ) | No | string | No | - | Access tier. Free string per site (ING-304 open question — tier values are site-specific today). |
57
57
  | + [amount](#amount ) | No | number | No | - | Amount paid. Generalized from amount_xof per D40 decision. |
@@ -85,14 +85,14 @@ Do not include in write requests. This field is set exclusively by the server (F
85
85
  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.
86
86
  :::
87
87
 
88
- ## <a name="siteId"></a>3. Property `siteId`
88
+ ## <a name="appId"></a>3. Property `appId`
89
89
 
90
90
  | | |
91
91
  | ------------ | -------- |
92
92
  | **Type** | `string` |
93
93
  | **Required** | Yes |
94
94
 
95
- **Description:** (Immutable) FK → Site document ID (D40 sub-tenant scope).
95
+ **Description:** (Immutable) FK → App document ID (D40 sub-tenant scope, renamed per D44).
96
96
 
97
97
  :::info Immutable
98
98
  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.
@@ -185,4 +185,4 @@ Set at creation only. This field cannot be modified after the document is create
185
185
  | **Maximum** | &le; 9007199254740991 |
186
186
 
187
187
  ----------------------------------------------------------------------------------------------------------------------------
188
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-27 at 15:51:05 +0000
188
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:50 +0000
@@ -13,7 +13,7 @@ sidebar_position: 2
13
13
  {
14
14
  "id": null,
15
15
  "companyId": "comp_xyz789",
16
- "siteId": "sit_ref123",
16
+ "appId": "app_ref123",
17
17
  "status": "pending",
18
18
  "from": "from",
19
19
  "to": "to",
@@ -39,7 +39,7 @@ sidebar_position: 2
39
39
 
40
40
  - [1. Property `id`](#id)
41
41
  - [2. Property `companyId`](#companyId)
42
- - [3. Property `siteId`](#siteId)
42
+ - [3. Property `appId`](#appId)
43
43
  - [4. Property `status`](#status)
44
44
  - [5. Property `from`](#from)
45
45
  - [6. Property `to`](#to)
@@ -68,13 +68,13 @@ sidebar_position: 2
68
68
  | **Additional properties** | Not allowed |
69
69
  | **Defined in** | #/definitions/analytics-backfill |
70
70
 
71
- **Description:** AnalyticsBackfill run (D42 / ING-304). Collection: companies/\{companyId\}/sites/\{siteId\}/analytics_backfills/\{runId\}. Tracks admin-triggered rollup backfill jobs; supports dry-run.
71
+ **Description:** AnalyticsBackfill run (D42 / ING-304). Collection: companies/\{companyId\}/apps/\{appId\}/analytics_backfills/\{runId\}. Tracks admin-triggered rollup backfill jobs; supports dry-run.
72
72
 
73
73
  | Property | Pattern | Type | Deprecated | Definition | Title/Description |
74
74
  | ------------------------------------ | ------- | ---------------- | ---------- | ------------------------------------ | ----------------------------------------------------------------------------------------------- |
75
75
  | - [id](#id ) | No | string or null | No | - | (Read-only) Firestore document ID, auto-generated. |
76
76
  | + [companyId](#companyId ) | No | string | No | - | (Immutable) FK → Company document ID. |
77
- | + [siteId](#siteId ) | No | string | No | - | (Immutable) FK → Site document ID (D40). |
77
+ | + [appId](#appId ) | No | string | No | - | (Immutable) FK → Site document ID (D40). |
78
78
  | + [status](#status ) | No | enum (of string) | No | - | Run status. |
79
79
  | + [from](#from ) | No | string | No | - | (Immutable) Inclusive start date (\`YYYY-MM-DD\`, UTC). |
80
80
  | + [to](#to ) | No | string | No | - | (Immutable) Inclusive end date (\`YYYY-MM-DD\`, UTC). |
@@ -111,7 +111,7 @@ Do not include in write requests. This field is set exclusively by the server (F
111
111
  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.
112
112
  :::
113
113
 
114
- ## <a name="siteId"></a>3. Property `siteId`
114
+ ## <a name="appId"></a>3. Property `appId`
115
115
 
116
116
  | | |
117
117
  | ------------ | -------- |
@@ -381,7 +381,7 @@ Do not include in write requests. This field is set exclusively by the server (F
381
381
  | **Additional properties** | Not allowed |
382
382
  | **Same definition as** | [at](#errors_items_at) |
383
383
 
384
- **Description:** Firestore Timestamp serialized representation
384
+ **Description:** Firestore Timestamp Admin SDK form: \{ _seconds, _nanoseconds \}. See types/firestore.ts for REST API v1 and client SDK serialization notes (#10).
385
385
 
386
386
  ### <a name="completedAt_anyOf_i1"></a>12.2. Property `item 1`
387
387
 
@@ -391,7 +391,7 @@ Do not include in write requests. This field is set exclusively by the server (F
391
391
  | **Required** | No |
392
392
 
393
393
  ----------------------------------------------------------------------------------------------------------------------------
394
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-27 at 15:51:05 +0000
394
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:50 +0000
395
395
 
396
396
  :::warning Server-set
397
397
  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.
@@ -23,7 +23,7 @@ sidebar_position: 3
23
23
  "eventCounts": {},
24
24
  "id": null,
25
25
  "companyId": "comp_xyz789",
26
- "siteId": "sit_ref123",
26
+ "appId": "app_ref123",
27
27
  "date": "2026-02-15",
28
28
  "computedAt": "computedAt",
29
29
  "sourceEventCount": null
@@ -46,7 +46,7 @@ sidebar_position: 3
46
46
  - [10.1. Property `additionalProperties`](#eventCounts_additionalProperties)
47
47
  - [11. Property `id`](#id)
48
48
  - [12. Property `companyId`](#companyId)
49
- - [13. Property `siteId`](#siteId)
49
+ - [13. Property `appId`](#appId)
50
50
  - [14. Property `date`](#date)
51
51
  - [15. Property `computedAt`](#computedAt)
52
52
  - [15.1. Property `_seconds`](#computedAt__seconds)
@@ -60,7 +60,7 @@ sidebar_position: 3
60
60
  | **Additional properties** | Not allowed |
61
61
  | **Defined in** | #/definitions/analytics-daily |
62
62
 
63
- **Description:** AnalyticsDaily rollup (D42 / ING-304). Collection: companies/\{companyId\}/sites/\{siteId\}/analytics_daily/\{YYYY-MM-DD\}. Idempotent set/merge — reruns overwrite. Fall back to raw analytics_events for uncovered slices.
63
+ **Description:** AnalyticsDaily rollup (D42 / ING-304). Collection: companies/\{companyId\}/apps/\{appId\}/analytics_daily/\{YYYY-MM-DD\}. Idempotent set/merge — reruns overwrite. Fall back to raw analytics_events for uncovered slices.
64
64
 
65
65
  | Property | Pattern | Type | Deprecated | Definition | Title/Description |
66
66
  | ------------------------------------------ | ------- | --------------- | ---------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
@@ -76,7 +76,7 @@ sidebar_position: 3
76
76
  | + [eventCounts](#eventCounts ) | No | object | No | - | Per-event-name counts — key is the event name (canonical or custom), value is the count within the bucket. |
77
77
  | - [id](#id ) | No | string or null | No | - | (Read-only) Firestore document ID = \`YYYY-MM-DD\`. |
78
78
  | + [companyId](#companyId ) | No | string | No | - | (Immutable) FK → Company document ID. |
79
- | + [siteId](#siteId ) | No | string | No | - | (Immutable) FK → Site document ID (D40). |
79
+ | + [appId](#appId ) | No | string | No | - | (Immutable) FK → Site document ID (D40). |
80
80
  | + [date](#date ) | No | string | No | - | (Immutable) \`YYYY-MM-DD\` UTC — matches document ID. |
81
81
  | + [computedAt](#computedAt ) | No | object | No | In #/definitions/firestore-timestamp | (Read-only) When this rollup was last (re)computed. Updated on every set/merge. |
82
82
  | - [sourceEventCount](#sourceEventCount ) | No | integer or null | No | - | (Read-only, Optional) Total source events scanned when producing this rollup. Useful for dry-run diffing. |
@@ -259,7 +259,7 @@ Do not include in write requests. This field is set exclusively by the server (F
259
259
  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.
260
260
  :::
261
261
 
262
- ## <a name="siteId"></a>13. Property `siteId`
262
+ ## <a name="appId"></a>13. Property `appId`
263
263
 
264
264
  | | |
265
265
  | ------------ | -------- |
@@ -344,7 +344,7 @@ Do not include in write requests. This field is set exclusively by the server (F
344
344
  | **Maximum** | &le; 9007199254740991 |
345
345
 
346
346
  ----------------------------------------------------------------------------------------------------------------------------
347
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-27 at 15:51:05 +0000
347
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:50 +0000
348
348
 
349
349
  :::warning Server-set
350
350
  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.
@@ -13,7 +13,7 @@ sidebar_position: 4
13
13
  {
14
14
  "id": null,
15
15
  "companyId": "comp_xyz789",
16
- "siteId": "sit_ref123",
16
+ "appId": "app_ref123",
17
17
  "eventId": "eve_ref123",
18
18
  "eventName": "eventName",
19
19
  "timestamp": "timestamp",
@@ -31,7 +31,7 @@ sidebar_position: 4
31
31
 
32
32
  - [1. Property `id`](#id)
33
33
  - [2. Property `companyId`](#companyId)
34
- - [3. Property `siteId`](#siteId)
34
+ - [3. Property `appId`](#appId)
35
35
  - [4. Property `eventId`](#eventId)
36
36
  - [5. Property `eventName`](#eventName)
37
37
  - [6. Property `timestamp`](#timestamp)
@@ -77,13 +77,13 @@ sidebar_position: 4
77
77
  | **Additional properties** | Not allowed |
78
78
  | **Defined in** | #/definitions/analytics-event |
79
79
 
80
- **Description:** AnalyticsEvent model (D40 / ING-304). Collection: companies/\{companyId\}/sites/\{siteId\}/analytics_events/\{eventId\}. Append-only, immutable product/behavior event stream. Event names are free strings; canonical vocabulary in CANONICAL_ANALYTICS_EVENT_NAMES.
80
+ **Description:** AnalyticsEvent model (D40 / ING-304). Collection: companies/\{companyId\}/apps/\{appId\}/analytics_events/\{eventId\}. Append-only, immutable product/behavior event stream. Event names are free strings; canonical vocabulary in CANONICAL_ANALYTICS_EVENT_NAMES.
81
81
 
82
82
  | Property | Pattern | Type | Deprecated | Definition | Title/Description |
83
83
  | -------------------------------------- | ------- | -------------- | ---------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------- |
84
84
  | - [id](#id ) | No | string or null | No | - | (Read-only) Firestore document ID. Equal to eventId. |
85
85
  | + [companyId](#companyId ) | No | string | No | - | (Immutable) FK → Company document ID. |
86
- | + [siteId](#siteId ) | No | string | No | - | (Immutable) FK → Site document ID (D40 sub-tenant scope). |
86
+ | + [appId](#appId ) | No | string | No | - | (Immutable) FK → App document ID (D40 sub-tenant scope, renamed per D44). |
87
87
  | + [eventId](#eventId ) | No | string | No | - | (Immutable) Client-generated UUID. Matches document ID. |
88
88
  | + [eventName](#eventName ) | No | string | No | - | Event name. Free string; canonical vocabulary is encouraged (see CANONICAL_ANALYTICS_EVENT_NAMES). |
89
89
  | + [timestamp](#timestamp ) | No | string | No | - | Client-side ISO 8601 — "when it happened on device". Can diverge from serverTimestamp for queued offline events. |
@@ -120,14 +120,14 @@ Do not include in write requests. This field is set exclusively by the server (F
120
120
  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.
121
121
  :::
122
122
 
123
- ## <a name="siteId"></a>3. Property `siteId`
123
+ ## <a name="appId"></a>3. Property `appId`
124
124
 
125
125
  | | |
126
126
  | ------------ | -------- |
127
127
  | **Type** | `string` |
128
128
  | **Required** | Yes |
129
129
 
130
- **Description:** (Immutable) FK → Site document ID (D40 sub-tenant scope).
130
+ **Description:** (Immutable) FK → App document ID (D40 sub-tenant scope, renamed per D44).
131
131
 
132
132
  :::info Immutable
133
133
  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.
@@ -530,4 +530,4 @@ Must be one of:
530
530
  | **Additional properties** | Any type allowed |
531
531
 
532
532
  ----------------------------------------------------------------------------------------------------------------------------
533
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-27 at 15:51:05 +0000
533
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:50 +0000
@@ -23,7 +23,7 @@ sidebar_position: 5
23
23
  "eventCounts": {},
24
24
  "id": null,
25
25
  "companyId": "comp_xyz789",
26
- "siteId": "sit_ref123",
26
+ "appId": "app_ref123",
27
27
  "date": "2026-02-15",
28
28
  "hour": 0,
29
29
  "computedAt": "computedAt",
@@ -47,7 +47,7 @@ sidebar_position: 5
47
47
  - [10.1. Property `additionalProperties`](#eventCounts_additionalProperties)
48
48
  - [11. Property `id`](#id)
49
49
  - [12. Property `companyId`](#companyId)
50
- - [13. Property `siteId`](#siteId)
50
+ - [13. Property `appId`](#appId)
51
51
  - [14. Property `date`](#date)
52
52
  - [15. Property `hour`](#hour)
53
53
  - [16. Property `computedAt`](#computedAt)
@@ -62,7 +62,7 @@ sidebar_position: 5
62
62
  | **Additional properties** | Not allowed |
63
63
  | **Defined in** | #/definitions/analytics-hourly |
64
64
 
65
- **Description:** AnalyticsHourly rollup (D42 / ING-304). Collection: companies/\{companyId\}/sites/\{siteId\}/analytics_hourly/\{YYYY-MM-DD-HH\}. Scheduled-CF writer; idempotent set/merge.
65
+ **Description:** AnalyticsHourly rollup (D42 / ING-304). Collection: companies/\{companyId\}/apps/\{appId\}/analytics_hourly/\{YYYY-MM-DD-HH\}. Scheduled-CF writer; idempotent set/merge.
66
66
 
67
67
  | Property | Pattern | Type | Deprecated | Definition | Title/Description |
68
68
  | ------------------------------------------ | ------- | --------------- | ---------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
@@ -78,7 +78,7 @@ sidebar_position: 5
78
78
  | + [eventCounts](#eventCounts ) | No | object | No | - | Per-event-name counts — key is the event name (canonical or custom), value is the count within the bucket. |
79
79
  | - [id](#id ) | No | string or null | No | - | (Read-only) Firestore document ID = \`YYYY-MM-DD-HH\`. |
80
80
  | + [companyId](#companyId ) | No | string | No | - | (Immutable) FK → Company document ID. |
81
- | + [siteId](#siteId ) | No | string | No | - | (Immutable) FK → Site document ID (D40). |
81
+ | + [appId](#appId ) | No | string | No | - | (Immutable) FK → Site document ID (D40). |
82
82
  | + [date](#date ) | No | string | No | - | (Immutable) \`YYYY-MM-DD\` UTC for the bucket day. |
83
83
  | + [hour](#hour ) | No | integer | No | - | (Immutable) UTC hour of day, 0–23. |
84
84
  | + [computedAt](#computedAt ) | No | object | No | In #/definitions/firestore-timestamp | (Read-only) When this rollup was last (re)computed. |
@@ -262,7 +262,7 @@ Do not include in write requests. This field is set exclusively by the server (F
262
262
  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.
263
263
  :::
264
264
 
265
- ## <a name="siteId"></a>13. Property `siteId`
265
+ ## <a name="appId"></a>13. Property `appId`
266
266
 
267
267
  | | |
268
268
  | ------------ | -------- |
@@ -365,7 +365,7 @@ Do not include in write requests. This field is set exclusively by the server (F
365
365
  | **Maximum** | &le; 9007199254740991 |
366
366
 
367
367
  ----------------------------------------------------------------------------------------------------------------------------
368
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-27 at 15:51:05 +0000
368
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:50 +0000
369
369
 
370
370
  :::warning Server-set
371
371
  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.
@@ -0,0 +1,200 @@
1
+ ---
2
+ title: "AppPayment"
3
+ sidebar_label: "AppPayment"
4
+ sidebar_position: 7
5
+ ---
6
+
7
+ # AppPayment
8
+
9
+ <details>
10
+ <summary>Example JSON</summary>
11
+
12
+ ```json
13
+ {
14
+ "id": null,
15
+ "companyId": "comp_xyz789",
16
+ "appId": "app_ref123",
17
+ "contact": "contact",
18
+ "sessionId": "ses_ref123",
19
+ "transactionId": "tra_ref123",
20
+ "tier": "Gold",
21
+ "amount": 45000,
22
+ "currency": "XOF",
23
+ "paidAt": "pai_ref123"
24
+ }
25
+ ```
26
+
27
+ </details>
28
+
29
+
30
+ - [1. Property `id`](#id)
31
+ - [2. Property `companyId`](#companyId)
32
+ - [3. Property `appId`](#appId)
33
+ - [4. Property `contact`](#contact)
34
+ - [5. Property `sessionId`](#sessionId)
35
+ - [6. Property `transactionId`](#transactionId)
36
+ - [7. Property `tier`](#tier)
37
+ - [8. Property `amount`](#amount)
38
+ - [9. Property `currency`](#currency)
39
+ - [10. Property `paidAt`](#paidAt)
40
+ - [10.1. Property `_seconds`](#paidAt__seconds)
41
+ - [10.2. Property `_nanoseconds`](#paidAt__nanoseconds)
42
+
43
+ | | |
44
+ | ------------------------- | ------------------------- |
45
+ | **Type** | `object` |
46
+ | **Required** | No |
47
+ | **Additional properties** | Not allowed |
48
+ | **Defined in** | #/definitions/app-payment |
49
+
50
+ **Description:** AppPayment model (D40 / ING-304). Collection: companies/\{companyId\}/apps/\{appId\}/payments/\{paymentId\}. Immutable append-only transaction ledger. Distinct from AllowedUser (access state) and CustomerPayment (D22 — customer-level billing).
51
+
52
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
53
+ | ---------------------------------- | ------- | -------------- | ---------- | ------------------------------------ | -------------------------------------------------------------------------------------- |
54
+ | - [id](#id ) | No | string or null | No | - | (Read-only) Firestore document ID, auto-generated. |
55
+ | + [companyId](#companyId ) | No | string | No | - | (Immutable) FK → Company document ID. |
56
+ | + [appId](#appId ) | No | string | No | - | (Immutable) FK → App document ID (D40 sub-tenant scope, renamed from siteId per D44). |
57
+ | + [contact](#contact ) | No | string | No | - | Email or E.164 phone number. Matches AllowedUser.contact. |
58
+ | + [sessionId](#sessionId ) | No | string | No | - | Payment provider checkout session ID (e.g. Wave). Usable for dedup across dual writes. |
59
+ | + [transactionId](#transactionId ) | No | string | No | - | Payment provider transaction ID. |
60
+ | + [tier](#tier ) | No | string | No | - | Access tier. Free string per app (ING-304 open question). |
61
+ | + [amount](#amount ) | No | number | No | - | Amount paid. Generalized from amount_xof per D40 decision. |
62
+ | + [currency](#currency ) | No | string | No | - | Currency code (ISO 4217). Defaults to XOF for legacy SR-Single parity. |
63
+ | + [paidAt](#paidAt ) | No | object | No | In #/definitions/firestore-timestamp | RFC3339Nano UTC when payment was completed. |
64
+
65
+ ## <a name="id"></a>1. Property `id`
66
+
67
+ | | |
68
+ | ------------ | ---------------- |
69
+ | **Type** | `string or null` |
70
+ | **Required** | No |
71
+
72
+ **Description:** (Read-only) Firestore document ID, auto-generated.
73
+
74
+ :::warning Server-set
75
+ 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.
76
+ :::
77
+
78
+ ## <a name="companyId"></a>2. Property `companyId`
79
+
80
+ | | |
81
+ | ------------ | -------- |
82
+ | **Type** | `string` |
83
+ | **Required** | Yes |
84
+
85
+ **Description:** (Immutable) FK → Company document ID.
86
+
87
+ :::info Immutable
88
+ 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.
89
+ :::
90
+
91
+ ## <a name="appId"></a>3. Property `appId`
92
+
93
+ | | |
94
+ | ------------ | -------- |
95
+ | **Type** | `string` |
96
+ | **Required** | Yes |
97
+
98
+ **Description:** (Immutable) FK → App document ID (D40 sub-tenant scope, renamed from siteId per D44).
99
+
100
+ :::info Immutable
101
+ 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.
102
+ :::
103
+
104
+ ## <a name="contact"></a>4. Property `contact`
105
+
106
+ | | |
107
+ | ------------ | -------- |
108
+ | **Type** | `string` |
109
+ | **Required** | Yes |
110
+
111
+ **Description:** Email or E.164 phone number. Matches AllowedUser.contact.
112
+
113
+ ## <a name="sessionId"></a>5. Property `sessionId`
114
+
115
+ | | |
116
+ | ------------ | -------- |
117
+ | **Type** | `string` |
118
+ | **Required** | Yes |
119
+
120
+ **Description:** Payment provider checkout session ID (e.g. Wave). Usable for dedup across dual writes.
121
+
122
+ ## <a name="transactionId"></a>6. Property `transactionId`
123
+
124
+ | | |
125
+ | ------------ | -------- |
126
+ | **Type** | `string` |
127
+ | **Required** | Yes |
128
+
129
+ **Description:** Payment provider transaction ID.
130
+
131
+ ## <a name="tier"></a>7. Property `tier`
132
+
133
+ | | |
134
+ | ------------ | -------- |
135
+ | **Type** | `string` |
136
+ | **Required** | Yes |
137
+
138
+ **Description:** Access tier. Free string per app (ING-304 open question).
139
+
140
+ ## <a name="amount"></a>8. Property `amount`
141
+
142
+ | | |
143
+ | ------------ | -------- |
144
+ | **Type** | `number` |
145
+ | **Required** | Yes |
146
+
147
+ **Description:** Amount paid. Generalized from amount_xof per D40 decision.
148
+
149
+ ## <a name="currency"></a>9. Property `currency`
150
+
151
+ | | |
152
+ | ------------ | -------- |
153
+ | **Type** | `string` |
154
+ | **Required** | Yes |
155
+ | **Default** | `"XOF"` |
156
+
157
+ **Description:** Currency code (ISO 4217). Defaults to XOF for legacy SR-Single parity.
158
+
159
+ ## <a name="paidAt"></a>10. Property `paidAt`
160
+
161
+ | | |
162
+ | ------------------------- | --------------------------------- |
163
+ | **Type** | `object` |
164
+ | **Required** | Yes |
165
+ | **Additional properties** | Not allowed |
166
+ | **Defined in** | #/definitions/firestore-timestamp |
167
+
168
+ **Description:** RFC3339Nano UTC when payment was completed.
169
+
170
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
171
+ | --------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- |
172
+ | + [_seconds](#paidAt__seconds ) | No | integer | No | - | - |
173
+ | + [_nanoseconds](#paidAt__nanoseconds ) | No | integer | No | - | - |
174
+
175
+ ### <a name="paidAt__seconds"></a>10.1. Property `_seconds`
176
+
177
+ | | |
178
+ | ------------ | --------- |
179
+ | **Type** | `integer` |
180
+ | **Required** | Yes |
181
+
182
+ | Restrictions | |
183
+ | ------------ | ---------------------- |
184
+ | **Minimum** | &ge; -9007199254740991 |
185
+ | **Maximum** | &le; 9007199254740991 |
186
+
187
+ ### <a name="paidAt__nanoseconds"></a>10.2. Property `_nanoseconds`
188
+
189
+ | | |
190
+ | ------------ | --------- |
191
+ | **Type** | `integer` |
192
+ | **Required** | Yes |
193
+
194
+ | Restrictions | |
195
+ | ------------ | ---------------------- |
196
+ | **Minimum** | &ge; -9007199254740991 |
197
+ | **Maximum** | &le; 9007199254740991 |
198
+
199
+ ----------------------------------------------------------------------------------------------------------------------------
200
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-05-30 at 12:42:50 +0000