Skip to content

Commit d5023c2

Browse files
committed
docs(references): regenerate the device schema references without the PLANNED markers
Claude-Session: https://claude.ai/code/session_01ADHkmRD9KKqvTU3THnute6 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 9423498 commit d5023c2

2 files changed

Lines changed: 6 additions & 45 deletions

File tree

‎content/docs/references/api/protocol.mdx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2761,7 +2761,7 @@ The authoring surface of a metadata write. Closed: `copilot` is an AI assistant'
27612761

27622762
## RegisterDeviceRequest
27632763

2764-
[PLANNED — not yet served] Register or refresh a push device for the signed-in user. No route serves it yet; the device routes land together with their handlers
2764+
Register or refresh a push device for the signed-in user
27652765

27662766
### Properties
27672767

@@ -2780,7 +2780,7 @@ The authoring surface of a metadata write. Closed: `copilot` is an AI assistant'
27802780

27812781
## RegisterDeviceResponse
27822782

2783-
[PLANNED — not yet served] Answer to a device registration: the device id the client keeps
2783+
Answer to a device registration: the device id the client keeps
27842784

27852785
### Properties
27862786

@@ -3026,7 +3026,7 @@ Uninstall package response
30263026

30273027
## UnregisterDeviceRequest
30283028

3029-
[PLANNED — not yet served] Unregister one of the signed-in user's push devices
3029+
Unregister one of the signed-in user's push devices
30303030

30313031
### Properties
30323032

@@ -3039,7 +3039,7 @@ Uninstall package response
30393039

30403040
## UnregisterDeviceResponse
30413041

3042-
[PLANNED — not yet served] Answer to a device unregistration
3042+
Answer to a device unregistration
30433043

30443044
### Properties
30453045

‎content/docs/references/system/push-device.mdx‎

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,11 @@
11
---
22
title: Push Device schema — System Protocol reference
33
navTitle: Push Device
4-
description: "Push Device Protocol — the stored device shape of the push device registry."
4+
description: "Push Device schemas of the ObjectStack System Protocol: UserDevice — each property with its type, default and a TypeScript example."
55
---
66

77
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
88

9-
Push Device Protocol — the stored device shape of the push device registry
10-
(ADR-0012 §6, narrowed to what core ships).
11-
12-
One row per (user, app install): what a device registration
13-
(`RegisterDeviceRequestSchema`, `api/protocol.zod.ts`) produces, what the
14-
push channel reads to address a phone, and what the registry's listing
15-
answers (`INotificationService.listDevices`).
16-
17-
**Declared ahead of its producer.** No table stores it and no route serves
18-
it yet; the schema carries a `[PLANNED — not yet served]` marker in its
19-
`.describe()` until the device registry lands (in the push channel plugin's
20-
`sys_user_device`, ADR-0012 §11).
21-
22-
Three rules the registry owes, stated here because they decide the shape:
23-
24-
- **(a) A device belongs to a user, not to an organization.** The row has no
25-
organization member. A phone signed in to one person receives that
26-
person's notifications whichever organization they come from; the
27-
organization travels on the notification, never on the device. The
28-
identity of a row is (`userId`, `deviceId`).
29-
- **(b) One live row per token.** A vendor token is delivered to one row
30-
only. A token this user already holds under another `deviceId` (the app's
31-
storage was cleared, so the registration carries no `deviceId`) refreshes
32-
that row and answers its `deviceId`; it never makes a second live row.
33-
When a second user registers a token another user's device holds, the
34-
token moves to the second user and the first user's row for it is
35-
removed, so a push meant for the phone's previous user never reaches its
36-
new one.
37-
- **(c) A dead token keeps its row.** When the vendor reports a token dead
38-
(APNs `BadDeviceToken` / `Unregistered`, FCM `UNREGISTERED`), the row is
39-
kept with `enabled: false` and `invalidatedAt` set, so "why did this phone
40-
stop getting pushes" stays answerable. Nothing is delivered to a disabled
41-
row, and a later registration of the same device re-enables it and clears
42-
`invalidatedAt`.
43-
44-
Narrowed from ADR-0012 §6: `vendor` is the core pair (`apns` | `fcm`; the
45-
domestic Android vendors plug in as alternate channel implementations) and
46-
`platform` is the registration's own three (`ios` | `android` | `web`).
47-
489
<Callout type="info">
4910
**Source:** `packages/spec/src/system/push-device.zod.ts`
5011
</Callout>
@@ -63,7 +24,7 @@ const result = UserDeviceSchema.parse(data);
6324

6425
## UserDevice
6526

66-
[PLANNED — not yet served] A push device of one user: one row per app install. No table stores it yet; the device registry lands with the push channel
27+
A push device of one user: one row per app install
6728

6829
### Properties
6930

0 commit comments

Comments
 (0)