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

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 +21 -2
  2. package/data/docs/enums/attention-status.md +24 -0
  3. package/data/docs/enums/booking-status.md +2 -2
  4. package/data/docs/enums/customer-payment-status.md +2 -2
  5. package/data/docs/enums/customer-payment-target-type.md +2 -2
  6. package/data/docs/enums/delivery-type.md +2 -2
  7. package/data/docs/enums/event-status.md +2 -2
  8. package/data/docs/enums/fulfillment-status.md +2 -2
  9. package/data/docs/enums/loyalty-transaction-type.md +2 -2
  10. package/data/docs/enums/order-status.md +2 -2
  11. package/data/docs/enums/payment-method.md +2 -2
  12. package/data/docs/enums/payment-proof-status.md +2 -2
  13. package/data/docs/enums/payment-status.md +2 -2
  14. package/data/docs/enums/pending-issue.md +31 -0
  15. package/data/docs/enums/return-status.md +2 -2
  16. package/data/docs/enums/session-status.md +2 -2
  17. package/data/docs/enums/ticket-status.md +2 -2
  18. package/data/docs/index.md +8 -2
  19. package/data/docs/models/allowed-user.md +188 -0
  20. package/data/docs/models/analytics-event.md +533 -0
  21. package/data/docs/models/booking-version.md +2 -2
  22. package/data/docs/models/booking.md +2 -2
  23. package/data/docs/models/customer-payment-allocation.md +2 -2
  24. package/data/docs/models/customer-payment.md +2 -2
  25. package/data/docs/models/customer.md +2 -2
  26. package/data/docs/models/event.md +2 -2
  27. package/data/docs/models/loyalty-config.md +2 -2
  28. package/data/docs/models/loyalty-reward.md +2 -2
  29. package/data/docs/models/loyalty-status.md +2 -2
  30. package/data/docs/models/loyalty-transaction.md +2 -2
  31. package/data/docs/models/magic-link-request.md +285 -0
  32. package/data/docs/models/metrics-current.md +2 -2
  33. package/data/docs/models/metrics-daily.md +2 -2
  34. package/data/docs/models/metrics-monthly.md +2 -2
  35. package/data/docs/models/order-item.md +2 -2
  36. package/data/docs/models/order.md +2 -2
  37. package/data/docs/models/sale.md +2 -2
  38. package/data/docs/models/site-payment.md +200 -0
  39. package/data/docs/models/ticket.md +2 -2
  40. package/data/static/llms.txt +164 -1
  41. package/data/static/openapi.yaml +451 -0
  42. package/data/static/schemas.json +511 -44
  43. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "LoyaltyReward"
3
3
  sidebar_label: "LoyaltyReward"
4
- sidebar_position: 8
4
+ sidebar_position: 10
5
5
  ---
6
6
 
7
7
  # LoyaltyReward
@@ -229,7 +229,7 @@ Do not include in write requests. This field is set exclusively by the server (F
229
229
  | **Required** | No |
230
230
 
231
231
  ----------------------------------------------------------------------------------------------------------------------------
232
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-06 at 19:27:48 +0000
232
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 21:21:09 +0000
233
233
 
234
234
  :::warning Server-set
235
235
  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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "LoyaltyStatus"
3
3
  sidebar_label: "LoyaltyStatus"
4
- sidebar_position: 9
4
+ sidebar_position: 11
5
5
  ---
6
6
 
7
7
  # LoyaltyStatus
@@ -315,7 +315,7 @@ Do not include in write requests. This field is set exclusively by the server (F
315
315
  | **Required** | No |
316
316
 
317
317
  ----------------------------------------------------------------------------------------------------------------------------
318
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-06 at 19:27:48 +0000
318
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 21:21:09 +0000
319
319
 
320
320
  :::warning Server-set
321
321
  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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "LoyaltyTransaction"
3
3
  sidebar_label: "LoyaltyTransaction"
4
- sidebar_position: 10
4
+ sidebar_position: 12
5
5
  ---
6
6
 
7
7
  # LoyaltyTransaction
@@ -313,7 +313,7 @@ Set at creation only. This field cannot be modified after the document is create
313
313
  **Description:** (Immutable, Denormalized) From User display name at creation time.
314
314
 
315
315
  ----------------------------------------------------------------------------------------------------------------------------
316
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-06 at 19:27:48 +0000
316
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 21:21:09 +0000
317
317
 
318
318
  :::info Immutable
319
319
  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.
@@ -0,0 +1,285 @@
1
+ ---
2
+ title: "MagicLinkRequest"
3
+ sidebar_label: "MagicLinkRequest"
4
+ sidebar_position: 13
5
+ ---
6
+
7
+ # MagicLinkRequest
8
+
9
+ <details>
10
+ <summary>Example JSON</summary>
11
+
12
+ ```json
13
+ {
14
+ "id": null,
15
+ "companyId": "comp_xyz789",
16
+ "siteId": "sit_ref123",
17
+ "email": "amadou@example.com",
18
+ "phone": "+225 07 00 11 22",
19
+ "ip": "ip",
20
+ "allowed": true,
21
+ "link": "link",
22
+ "tier": "Gold",
23
+ "authStatusReason": "Customer request",
24
+ "referredBy": "referredBy",
25
+ "requestedAt": "requestedAt",
26
+ "verifyReason": null,
27
+ "verified": null,
28
+ "verifiedAt": "verifiedAt"
29
+ }
30
+ ```
31
+
32
+ </details>
33
+
34
+
35
+ - [1. Property `id`](#id)
36
+ - [2. Property `companyId`](#companyId)
37
+ - [3. Property `siteId`](#siteId)
38
+ - [4. Property `email`](#email)
39
+ - [5. Property `phone`](#phone)
40
+ - [6. Property `ip`](#ip)
41
+ - [7. Property `allowed`](#allowed)
42
+ - [8. Property `link`](#link)
43
+ - [9. Property `tier`](#tier)
44
+ - [10. Property `authStatusReason`](#authStatusReason)
45
+ - [11. Property `referredBy`](#referredBy)
46
+ - [12. Property `requestedAt`](#requestedAt)
47
+ - [12.1. Property `_seconds`](#requestedAt__seconds)
48
+ - [12.2. Property `_nanoseconds`](#requestedAt__nanoseconds)
49
+ - [13. Property `verifyReason`](#verifyReason)
50
+ - [14. Property `verified`](#verified)
51
+ - [15. Property `verifiedAt`](#verifiedAt)
52
+ - [15.1. Property `firestore-timestamp`](#verifiedAt_anyOf_i0)
53
+ - [15.2. Property `item 1`](#verifiedAt_anyOf_i1)
54
+
55
+ | | |
56
+ | ------------------------- | -------------------------------- |
57
+ | **Type** | `object` |
58
+ | **Required** | No |
59
+ | **Additional properties** | Not allowed |
60
+ | **Defined in** | #/definitions/magic-link-request |
61
+
62
+ **Description:** MagicLinkRequest model (D40 / ING-304). Collection: companies/\{companyId\}/sites/\{siteId\}/magic_link_requests/\{requestId\}. Authentication audit log — every request is logged regardless of outcome. Two-stage write: Log() then LogVerify().
63
+
64
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
65
+ | ---------------------------------------- | ------- | --------------- | ---------- | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
66
+ | - [id](#id ) | No | string or null | No | - | (Read-only) Firestore document ID. 16-byte random hex. |
67
+ | + [companyId](#companyId ) | No | string | No | - | (Immutable) FK → Company document ID. |
68
+ | + [siteId](#siteId ) | No | string | No | - | (Immutable) FK → Site document ID (D40 sub-tenant scope). |
69
+ | + [email](#email ) | No | string | No | - | Populated if identifier is email; empty string if phone. Mutually exclusive with phone per document. |
70
+ | + [phone](#phone ) | No | string | No | - | Populated if identifier is E.164 format (starts with +); empty string if email. |
71
+ | + [ip](#ip ) | No | string | No | - | Client IP from X-Forwarded-For or RemoteAddr. |
72
+ | + [allowed](#allowed ) | No | boolean | No | - | Whether the user passed the access control check. |
73
+ | + [link](#link ) | No | string | No | - | Magic-link URL — non-empty only when DEV_MODE=true; empty in production (audit integrity). |
74
+ | + [tier](#tier ) | No | string | No | - | Access tier selected by the user. Free string per site (ING-304 open question — tier values are site-specific today). |
75
+ | + [authStatusReason](#authStatusReason ) | No | string | No | - | Outcome reason code: whitelist \| allowed_users \| payment_redirect \| payment_complete \| not_allowed \| redirected_to_payment. |
76
+ | + [referredBy](#referredBy ) | No | string | No | - | Contact identifier of the referrer, resolved from submitted referral_code; empty if none. |
77
+ | + [requestedAt](#requestedAt ) | No | object | No | In #/definitions/firestore-timestamp | RFC3339Nano UTC at request time. |
78
+ | - [verifyReason](#verifyReason ) | No | string or null | No | - | Verify outcome reason: mirrors authStatusReason on success, or link_expired \| link_invalid \| not_allowed. |
79
+ | - [verified](#verified ) | No | boolean or null | No | - | Whether the verify attempt succeeded. |
80
+ | - [verifiedAt](#verifiedAt ) | No | Combination | No | - | RFC3339Nano UTC at verify time. |
81
+
82
+ ## <a name="id"></a>1. Property `id`
83
+
84
+ | | |
85
+ | ------------ | ---------------- |
86
+ | **Type** | `string or null` |
87
+ | **Required** | No |
88
+
89
+ **Description:** (Read-only) Firestore document ID. 16-byte random hex.
90
+
91
+ :::warning Server-set
92
+ 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.
93
+ :::
94
+
95
+ ## <a name="companyId"></a>2. Property `companyId`
96
+
97
+ | | |
98
+ | ------------ | -------- |
99
+ | **Type** | `string` |
100
+ | **Required** | Yes |
101
+
102
+ **Description:** (Immutable) FK → Company document ID.
103
+
104
+ :::info Immutable
105
+ 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.
106
+ :::
107
+
108
+ ## <a name="siteId"></a>3. Property `siteId`
109
+
110
+ | | |
111
+ | ------------ | -------- |
112
+ | **Type** | `string` |
113
+ | **Required** | Yes |
114
+
115
+ **Description:** (Immutable) FK → Site document ID (D40 sub-tenant scope).
116
+
117
+ :::info Immutable
118
+ 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.
119
+ :::
120
+
121
+ ## <a name="email"></a>4. Property `email`
122
+
123
+ | | |
124
+ | ------------ | -------- |
125
+ | **Type** | `string` |
126
+ | **Required** | Yes |
127
+
128
+ **Description:** Populated if identifier is email; empty string if phone. Mutually exclusive with phone per document.
129
+
130
+ ## <a name="phone"></a>5. Property `phone`
131
+
132
+ | | |
133
+ | ------------ | -------- |
134
+ | **Type** | `string` |
135
+ | **Required** | Yes |
136
+
137
+ **Description:** Populated if identifier is E.164 format (starts with +); empty string if email.
138
+
139
+ ## <a name="ip"></a>6. Property `ip`
140
+
141
+ | | |
142
+ | ------------ | -------- |
143
+ | **Type** | `string` |
144
+ | **Required** | Yes |
145
+
146
+ **Description:** Client IP from X-Forwarded-For or RemoteAddr.
147
+
148
+ ## <a name="allowed"></a>7. Property `allowed`
149
+
150
+ | | |
151
+ | ------------ | --------- |
152
+ | **Type** | `boolean` |
153
+ | **Required** | Yes |
154
+
155
+ **Description:** Whether the user passed the access control check.
156
+
157
+ ## <a name="link"></a>8. Property `link`
158
+
159
+ | | |
160
+ | ------------ | -------- |
161
+ | **Type** | `string` |
162
+ | **Required** | Yes |
163
+
164
+ **Description:** Magic-link URL — non-empty only when DEV_MODE=true; empty in production (audit integrity).
165
+
166
+ ## <a name="tier"></a>9. Property `tier`
167
+
168
+ | | |
169
+ | ------------ | -------- |
170
+ | **Type** | `string` |
171
+ | **Required** | Yes |
172
+
173
+ **Description:** Access tier selected by the user. Free string per site (ING-304 open question — tier values are site-specific today).
174
+
175
+ ## <a name="authStatusReason"></a>10. Property `authStatusReason`
176
+
177
+ | | |
178
+ | ------------ | -------- |
179
+ | **Type** | `string` |
180
+ | **Required** | Yes |
181
+
182
+ **Description:** Outcome reason code: whitelist | allowed_users | payment_redirect | payment_complete | not_allowed | redirected_to_payment.
183
+
184
+ ## <a name="referredBy"></a>11. Property `referredBy`
185
+
186
+ | | |
187
+ | ------------ | -------- |
188
+ | **Type** | `string` |
189
+ | **Required** | Yes |
190
+
191
+ **Description:** Contact identifier of the referrer, resolved from submitted referral_code; empty if none.
192
+
193
+ ## <a name="requestedAt"></a>12. Property `requestedAt`
194
+
195
+ | | |
196
+ | ------------------------- | --------------------------------- |
197
+ | **Type** | `object` |
198
+ | **Required** | Yes |
199
+ | **Additional properties** | Not allowed |
200
+ | **Defined in** | #/definitions/firestore-timestamp |
201
+
202
+ **Description:** RFC3339Nano UTC at request time.
203
+
204
+ | Property | Pattern | Type | Deprecated | Definition | Title/Description |
205
+ | -------------------------------------------- | ------- | ------- | ---------- | ---------- | ----------------- |
206
+ | + [_seconds](#requestedAt__seconds ) | No | integer | No | - | - |
207
+ | + [_nanoseconds](#requestedAt__nanoseconds ) | No | integer | No | - | - |
208
+
209
+ ### <a name="requestedAt__seconds"></a>12.1. Property `_seconds`
210
+
211
+ | | |
212
+ | ------------ | --------- |
213
+ | **Type** | `integer` |
214
+ | **Required** | Yes |
215
+
216
+ | Restrictions | |
217
+ | ------------ | ---------------------- |
218
+ | **Minimum** | &ge; -9007199254740991 |
219
+ | **Maximum** | &le; 9007199254740991 |
220
+
221
+ ### <a name="requestedAt__nanoseconds"></a>12.2. Property `_nanoseconds`
222
+
223
+ | | |
224
+ | ------------ | --------- |
225
+ | **Type** | `integer` |
226
+ | **Required** | Yes |
227
+
228
+ | Restrictions | |
229
+ | ------------ | ---------------------- |
230
+ | **Minimum** | &ge; -9007199254740991 |
231
+ | **Maximum** | &le; 9007199254740991 |
232
+
233
+ ## <a name="verifyReason"></a>13. Property `verifyReason`
234
+
235
+ | | |
236
+ | ------------ | ---------------- |
237
+ | **Type** | `string or null` |
238
+ | **Required** | No |
239
+
240
+ **Description:** Verify outcome reason: mirrors authStatusReason on success, or link_expired | link_invalid | not_allowed.
241
+
242
+ ## <a name="verified"></a>14. Property `verified`
243
+
244
+ | | |
245
+ | ------------ | ----------------- |
246
+ | **Type** | `boolean or null` |
247
+ | **Required** | No |
248
+
249
+ **Description:** Whether the verify attempt succeeded.
250
+
251
+ ## <a name="verifiedAt"></a>15. Property `verifiedAt`
252
+
253
+ | | |
254
+ | ------------------------- | ---------------- |
255
+ | **Type** | `combining` |
256
+ | **Required** | No |
257
+ | **Additional properties** | Any type allowed |
258
+
259
+ **Description:** RFC3339Nano UTC at verify time.
260
+
261
+ | Any of(Option) |
262
+ | ------------------------------------------- |
263
+ | [firestore-timestamp](#verifiedAt_anyOf_i0) |
264
+ | [item 1](#verifiedAt_anyOf_i1) |
265
+
266
+ ### <a name="verifiedAt_anyOf_i0"></a>15.1. Property `firestore-timestamp`
267
+
268
+ | | |
269
+ | ------------------------- | --------------------------- |
270
+ | **Type** | `object` |
271
+ | **Required** | No |
272
+ | **Additional properties** | Not allowed |
273
+ | **Same definition as** | [requestedAt](#requestedAt) |
274
+
275
+ **Description:** Firestore Timestamp serialized representation
276
+
277
+ ### <a name="verifiedAt_anyOf_i1"></a>15.2. Property `item 1`
278
+
279
+ | | |
280
+ | ------------ | ------ |
281
+ | **Type** | `null` |
282
+ | **Required** | No |
283
+
284
+ ----------------------------------------------------------------------------------------------------------------------------
285
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 21:21:09 +0000
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "MetricsCurrent"
3
3
  sidebar_label: "MetricsCurrent"
4
- sidebar_position: 11
4
+ sidebar_position: 14
5
5
  ---
6
6
 
7
7
  # MetricsCurrent
@@ -525,7 +525,7 @@ Do not include in write requests. This field is set exclusively by the server (F
525
525
  | **Maximum** | &le; 9007199254740991 |
526
526
 
527
527
  ----------------------------------------------------------------------------------------------------------------------------
528
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-06 at 19:27:48 +0000
528
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 21:21:09 +0000
529
529
 
530
530
  :::warning Server-set
531
531
  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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "MetricsDaily"
3
3
  sidebar_label: "MetricsDaily"
4
- sidebar_position: 12
4
+ sidebar_position: 15
5
5
  ---
6
6
 
7
7
  # MetricsDaily
@@ -541,7 +541,7 @@ Do not include in write requests. This field is set exclusively by the server (F
541
541
  **Description:** (Read-only) YYYY-MM-DD document ID repeated as a field. Identifies the day this snapshot covers.
542
542
 
543
543
  ----------------------------------------------------------------------------------------------------------------------------
544
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-06 at 19:27:48 +0000
544
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 21:21:09 +0000
545
545
 
546
546
  :::warning Server-set
547
547
  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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "MetricsMonthly"
3
3
  sidebar_label: "MetricsMonthly"
4
- sidebar_position: 13
4
+ sidebar_position: 16
5
5
  ---
6
6
 
7
7
  # MetricsMonthly
@@ -541,7 +541,7 @@ Do not include in write requests. This field is set exclusively by the server (F
541
541
  **Description:** (Read-only) YYYY-MM document ID repeated as a field. Identifies the month this rollup covers.
542
542
 
543
543
  ----------------------------------------------------------------------------------------------------------------------------
544
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-06 at 19:27:48 +0000
544
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 21:21:09 +0000
545
545
 
546
546
  :::warning Server-set
547
547
  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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "OrderItem"
3
3
  sidebar_label: "OrderItem"
4
- sidebar_position: 15
4
+ sidebar_position: 18
5
5
  ---
6
6
 
7
7
  # OrderItem
@@ -350,7 +350,7 @@ TBD/WIP — Originally from the archived Couchbase Lite (CBL) restaurant flow. C
350
350
  | **Required** | No |
351
351
 
352
352
  ----------------------------------------------------------------------------------------------------------------------------
353
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-06 at 19:27:48 +0000
353
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 21:21:09 +0000
354
354
 
355
355
  :::warning Server-set
356
356
  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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "Order"
3
3
  sidebar_label: "Order"
4
- sidebar_position: 14
4
+ sidebar_position: 17
5
5
  ---
6
6
 
7
7
  # Order
@@ -1624,7 +1624,7 @@ Set only by the mobile app when the user manually edits the order total. Dashboa
1624
1624
  **Description:** FK → Sale.id. Link to associated Sale document.
1625
1625
 
1626
1626
  ----------------------------------------------------------------------------------------------------------------------------
1627
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-06 at 19:27:48 +0000
1627
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 21:21:09 +0000
1628
1628
 
1629
1629
  ## Related Decisions
1630
1630
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: "Sale"
3
3
  sidebar_label: "Sale"
4
- sidebar_position: 16
4
+ sidebar_position: 19
5
5
  ---
6
6
 
7
7
  # Sale
@@ -524,7 +524,7 @@ Set at creation only. This field cannot be modified after the document is create
524
524
  | **Required** | No |
525
525
 
526
526
  ----------------------------------------------------------------------------------------------------------------------------
527
- Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-06 at 19:27:48 +0000
527
+ Generated using [json-schema-for-humans](https://github.com/coveooss/json-schema-for-humans) on 2026-04-18 at 21:21:09 +0000
528
528
 
529
529
  :::warning Server-set
530
530
  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: "SitePayment"
3
+ sidebar_label: "SitePayment"
4
+ sidebar_position: 20
5
+ ---
6
+
7
+ # SitePayment
8
+
9
+ <details>
10
+ <summary>Example JSON</summary>
11
+
12
+ ```json
13
+ {
14
+ "id": null,
15
+ "companyId": "comp_xyz789",
16
+ "siteId": "sit_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 `siteId`](#siteId)
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/site-payment |
49
+
50
+ **Description:** SitePayment model (D40 / ING-304). Collection: companies/\{companyId\}/sites/\{siteId\}/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
+ | + [siteId](#siteId ) | No | string | No | - | (Immutable) FK → Site document ID (D40 sub-tenant scope). |
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 site (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="siteId"></a>3. Property `siteId`
92
+
93
+ | | |
94
+ | ------------ | -------- |
95
+ | **Type** | `string` |
96
+ | **Required** | Yes |
97
+
98
+ **Description:** (Immutable) FK → Site document ID (D40 sub-tenant scope).
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 site (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-04-18 at 21:21:09 +0000