zone.stratos.sync.subscribeRecords

lexicon.store View official

Schema Diff

+49 -5

From

CID
bafyreiadu7jj6rn...
Indexed At
2026-03-20 15:55 UTC
View this version

To

CID
bafyreic3s27wqbt...
Indexed At
2026-03-22 09:38 UTC
View this version
1 1
{
2 2
  "id": "zone.stratos.sync.subscribeRecords",
3 3
  "defs": {
4 4
    "info": {
5 5
      "type": "object",
6 6
      "required": [
7 7
        "name"
8 8
      ],
9 9
      "properties": {
10 10
        "name": {
11 11
          "type": "string",
12 12
          "maxLength": 128,
13 13
          "description": "The type of info message.",
14 14
          "knownValues": [
15 15
            "OutdatedCursor"
16 16
          ]
17 17
        },
18 18
        "message": {
19 19
          "type": "string",
20 20
          "maxLength": 1024,
21 21
          "description": "Additional details about the info message."
22 22
        }
23 23
      },
24 24
      "description": "An informational message about the subscription state."
25 25
    },
26 26
    "main": {
27 27
      "type": "subscription",
28 28
      "errors": [
29 29
        {
30 30
          "name": "FutureCursor",
31 31
          "description": "Cursor is in the future."
32 32
        },
33 33
        {
34 34
          "name": "AuthRequired",
35 35
          "description": "Authentication is required."
36 36
        }
37 37
      ],
38 38
      "message": {
39 39
        "schema": {
40 40
          "refs": [
41 41
            "#commit",
42 +
            "#enrollment",
42 43
            "#info"
43 44
          ],
44 45
          "type": "union"
45 46
        }
46 47
      },
47 48
      "parameters": {
48 49
        "type": "params",
49 -
        "required": [
50 -
          "did"
51 -
        ],
52 50
        "properties": {
53 51
          "did": {
54 52
            "type": "string",
55 53
            "format": "did",
56 -
            "description": "The DID of the account to subscribe to."
54 +
            "description": "The DID of the account to subscribe to. If omitted, subscribes to service-level enrollment events."
57 55
          },
58 56
          "cursor": {
59 57
            "type": "integer",
60 58
            "description": "The last known event sequence number to resume from."
61 59
          },
62 60
          "domain": {
63 61
            "type": "string",
64 62
            "maxLength": 253,
65 63
            "description": "Optional domain filter. Only events for records with this domain in their boundary will be emitted."
64 +
          },
65 +
          "syncToken": {
66 +
            "type": "string",
67 +
            "description": "Signed service JWT for AppView authentication. Must include iss, aud, exp, and lxm claims. Required for service callers; owner callers may use the Authorization header instead."
66 68
          }
67 69
        }
68 70
      },
69 -
      "description": "Subscribe to stratos record updates for a specific account. Requires service auth or owner authentication."
71 +
      "description": "Subscribe to stratos events. When 'did' is provided, subscribes to record updates for that account. When omitted, subscribes to service-level events (enrollments). AppViews must provide a signed service JWT via syncToken."
70 72
    },
71 73
    "commit": {
72 74
      "type": "object",
73 75
      "required": [
74 76
        "seq",
75 77
        "did",
76 78
        "time",
77 79
        "rev",
78 80
        "ops"
79 81
      ],
80 82
      "properties": {
81 83
        "did": {
82 84
          "type": "string",
83 85
          "format": "did",
84 86
          "description": "The DID of the account."
85 87
        },
86 88
        "ops": {
87 89
          "type": "array",
88 90
          "items": {
89 91
            "ref": "#recordOp",
90 92
            "type": "ref"
91 93
          },
92 94
          "description": "List of record operations in this commit."
93 95
        },
94 96
        "rev": {
95 97
          "type": "string",
96 98
          "format": "tid",
97 99
          "description": "The repo revision."
98 100
        },
99 101
        "seq": {
100 102
          "type": "integer",
101 103
          "description": "The sequence number of this event."
102 104
        },
103 105
        "time": {
104 106
          "type": "string",
105 107
          "format": "datetime",
106 108
          "description": "Timestamp of when the event was sequenced."
107 109
        }
108 110
      },
109 111
      "description": "A commit event containing record operations."
110 112
    },
111 113
    "recordOp": {
112 114
      "type": "object",
113 115
      "required": [
114 116
        "action",
115 117
        "path"
116 118
      ],
117 119
      "properties": {
118 120
        "cid": {
119 121
          "type": "cid-link",
120 122
          "description": "The CID of the record. Present for create and update operations."
121 123
        },
122 124
        "path": {
123 125
          "type": "string",
124 126
          "maxLength": 512,
125 127
          "description": "The record path (collection/rkey)."
126 128
        },
127 129
        "action": {
128 130
          "type": "string",
129 131
          "maxLength": 32,
130 132
          "description": "The type of operation.",
131 133
          "knownValues": [
132 134
            "create",
133 135
            "update",
134 136
            "delete"
135 137
          ]
136 138
        },
137 139
        "record": {
138 140
          "type": "unknown",
139 141
          "description": "The record content. Present for create and update operations."
140 142
        }
141 143
      },
142 144
      "description": "A single record operation within a commit."
145 +
    },
146 +
    "enrollment": {
147 +
      "type": "object",
148 +
      "required": [
149 +
        "did",
150 +
        "action",
151 +
        "time"
152 +
      ],
153 +
      "properties": {
154 +
        "did": {
155 +
          "type": "string",
156 +
          "format": "did",
157 +
          "description": "The DID of the user."
158 +
        },
159 +
        "time": {
160 +
          "type": "string",
161 +
          "format": "datetime",
162 +
          "description": "Timestamp of the enrollment event."
163 +
        },
164 +
        "action": {
165 +
          "type": "string",
166 +
          "maxLength": 32,
167 +
          "description": "The enrollment action.",
168 +
          "knownValues": [
169 +
            "enroll",
170 +
            "unenroll"
171 +
          ]
172 +
        },
173 +
        "service": {
174 +
          "type": "string",
175 +
          "format": "uri",
176 +
          "description": "The Stratos service endpoint URL."
177 +
        },
178 +
        "boundaries": {
179 +
          "type": "array",
180 +
          "items": {
181 +
            "type": "string"
182 +
          },
183 +
          "description": "The boundaries assigned to the user."
184 +
        }
185 +
      },
186 +
      "description": "An enrollment event indicating a user has enrolled or unenrolled from the service."
143 187
    }
144 188
  },
145 189
  "$type": "com.atproto.lexicon.schema",
146 190
  "lexicon": 1
147 191
}

Compare Other Versions

Lexicon Garden

@