@ascorbic/pds 0.0.1 → 0.1.0

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/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
- import { DurableObject, env } from "cloudflare:workers";
1
+ import { DurableObject, env, waitUntil } from "cloudflare:workers";
2
2
  import { BlockMap, ReadableBlockstore, Repo, WriteOpAction, blocksToCarFile, readCarWithRoot } from "@atproto/repo";
3
- import { Secp256k1Keypair, randomStr } from "@atproto/crypto";
3
+ import { Secp256k1Keypair, randomStr, verifySignature } from "@atproto/crypto";
4
4
  import { CID } from "@atproto/lex-data";
5
- import { TID } from "@atproto/common-web";
5
+ import { TID, check, didDocument, getServiceEndpoint } from "@atproto/common-web";
6
6
  import { AtUri, ensureValidDid, ensureValidHandle } from "@atproto/syntax";
7
7
  import { cidForRawBytes, decode, encode } from "@atproto/lex-cbor";
8
8
  import { Hono } from "hono";
9
9
  import { cors } from "hono/cors";
10
10
  import { SignJWT, jwtVerify } from "jose";
11
11
  import { compare } from "bcryptjs";
12
- import { Lexicons } from "@atproto/lexicon";
12
+ import { Lexicons, jsonToLex } from "@atproto/lexicon";
13
13
 
14
14
  //#region rolldown:runtime
15
15
  var __defProp = Object.defineProperty;
@@ -75,6 +75,15 @@ var SqliteRepoStorage = class extends ReadableBlockstore {
75
75
  );
76
76
 
77
77
  CREATE INDEX IF NOT EXISTS idx_firehose_created_at ON firehose_events(created_at);
78
+
79
+ -- User preferences (single row, stores JSON array)
80
+ CREATE TABLE IF NOT EXISTS preferences (
81
+ id INTEGER PRIMARY KEY CHECK (id = 1),
82
+ data TEXT NOT NULL DEFAULT '[]'
83
+ );
84
+
85
+ -- Initialize with empty preferences array if not exists
86
+ INSERT OR IGNORE INTO preferences (id, data) VALUES (1, '[]');
78
87
  `);
79
88
  }
80
89
  /**
@@ -186,6 +195,26 @@ var SqliteRepoStorage = class extends ReadableBlockstore {
186
195
  const rows = this.sql.exec("SELECT COUNT(*) as count FROM blocks").toArray();
187
196
  return rows.length > 0 ? rows[0].count ?? 0 : 0;
188
197
  }
198
+ /**
199
+ * Get user preferences.
200
+ */
201
+ async getPreferences() {
202
+ const rows = this.sql.exec("SELECT data FROM preferences WHERE id = 1").toArray();
203
+ if (rows.length === 0 || !rows[0]?.data) return [];
204
+ const data = rows[0].data;
205
+ try {
206
+ return JSON.parse(data);
207
+ } catch {
208
+ return [];
209
+ }
210
+ }
211
+ /**
212
+ * Update user preferences.
213
+ */
214
+ async putPreferences(preferences) {
215
+ const data = JSON.stringify(preferences);
216
+ this.sql.exec("UPDATE preferences SET data = ? WHERE id = 1", data);
217
+ }
189
218
  };
190
219
 
191
220
  //#endregion
@@ -878,6 +907,18 @@ var AccountDurableObject = class extends DurableObject {
878
907
  console.error("WebSocket error:", error);
879
908
  }
880
909
  /**
910
+ * RPC method: Get user preferences
911
+ */
912
+ async rpcGetPreferences() {
913
+ return { preferences: await (await this.getStorage()).getPreferences() };
914
+ }
915
+ /**
916
+ * RPC method: Put user preferences
917
+ */
918
+ async rpcPutPreferences(preferences) {
919
+ await (await this.getStorage()).putPreferences(preferences);
920
+ }
921
+ /**
881
922
  * Emit an identity event to notify downstream services to refresh identity cache.
882
923
  */
883
924
  async rpcEmitIdentityEvent(handle) {
@@ -918,6 +959,83 @@ var AccountDurableObject = class extends DurableObject {
918
959
  }
919
960
  };
920
961
 
962
+ //#endregion
963
+ //#region src/service-auth.ts
964
+ const MINUTE = 60 * 1e3;
965
+ /**
966
+ * Shared keypair cache for signing and verification.
967
+ */
968
+ let cachedKeypair = null;
969
+ let cachedSigningKey = null;
970
+ /**
971
+ * Get the signing keypair, with caching.
972
+ * Used for creating service JWTs and verifying them.
973
+ */
974
+ async function getSigningKeypair(signingKey) {
975
+ if (cachedKeypair && cachedSigningKey === signingKey) return cachedKeypair;
976
+ cachedKeypair = await Secp256k1Keypair.import(signingKey);
977
+ cachedSigningKey = signingKey;
978
+ return cachedKeypair;
979
+ }
980
+ function jsonToB64Url(json) {
981
+ return Buffer.from(JSON.stringify(json)).toString("base64url");
982
+ }
983
+ function noUndefinedVals(obj) {
984
+ const result = {};
985
+ for (const [key, val] of Object.entries(obj)) if (val !== void 0) result[key] = val;
986
+ return result;
987
+ }
988
+ /**
989
+ * Create a service JWT for proxied requests to AppView.
990
+ * The JWT asserts that the PDS vouches for the user identified by `iss`.
991
+ */
992
+ async function createServiceJwt(params) {
993
+ const { iss, aud, keypair } = params;
994
+ const iat = Math.floor(Date.now() / 1e3);
995
+ const exp = iat + MINUTE / 1e3;
996
+ const lxm = params.lxm ?? void 0;
997
+ const jti = randomStr(16, "hex");
998
+ const header = {
999
+ typ: "JWT",
1000
+ alg: keypair.jwtAlg
1001
+ };
1002
+ const payload = noUndefinedVals({
1003
+ iat,
1004
+ iss,
1005
+ aud,
1006
+ exp,
1007
+ lxm,
1008
+ jti
1009
+ });
1010
+ const toSignStr = `${jsonToB64Url(header)}.${jsonToB64Url(payload)}`;
1011
+ const toSign = Buffer.from(toSignStr, "utf8");
1012
+ return `${toSignStr}.${Buffer.from(await keypair.sign(toSign)).toString("base64url")}`;
1013
+ }
1014
+ /**
1015
+ * Verify a service JWT signed with our signing key.
1016
+ * These are issued by getServiceAuth and used by external services
1017
+ * (like video.bsky.app) to call back to our PDS.
1018
+ */
1019
+ async function verifyServiceJwt(token, signingKey, expectedAudience, expectedIssuer) {
1020
+ const parts = token.split(".");
1021
+ if (parts.length !== 3) throw new Error("Invalid JWT format");
1022
+ const headerB64 = parts[0];
1023
+ const payloadB64 = parts[1];
1024
+ const signatureB64 = parts[2];
1025
+ const header = JSON.parse(Buffer.from(headerB64, "base64url").toString());
1026
+ if (header.alg !== "ES256K") throw new Error(`Unsupported algorithm: ${header.alg}`);
1027
+ const payload = JSON.parse(Buffer.from(payloadB64, "base64url").toString());
1028
+ const now = Math.floor(Date.now() / 1e3);
1029
+ if (payload.exp && payload.exp < now) throw new Error("Token expired");
1030
+ if (payload.aud !== expectedAudience) throw new Error(`Invalid audience: expected ${expectedAudience}`);
1031
+ if (payload.iss !== expectedIssuer) throw new Error(`Invalid issuer: expected ${expectedIssuer}`);
1032
+ const keypair = await getSigningKeypair(signingKey);
1033
+ const msgBytes = new Uint8Array(Buffer.from(`${headerB64}.${payloadB64}`, "utf8"));
1034
+ const sigBytes = new Uint8Array(Buffer.from(signatureB64, "base64url"));
1035
+ if (!await verifySignature(keypair.did(), msgBytes, sigBytes, { allowMalleableSig: true })) throw new Error("Invalid signature");
1036
+ return payload;
1037
+ }
1038
+
921
1039
  //#endregion
922
1040
  //#region src/session.ts
923
1041
  const ACCESS_TOKEN_LIFETIME = "2h";
@@ -976,12 +1094,6 @@ async function verifyRefreshToken(token, jwtSecret, serviceDid) {
976
1094
  if (!payload.jti) throw new Error("Missing token ID");
977
1095
  return payload;
978
1096
  }
979
- /**
980
- * Verify a password against a bcrypt hash
981
- */
982
- async function verifyPassword(password, hash) {
983
- return compare(password, hash);
984
- }
985
1097
 
986
1098
  //#endregion
987
1099
  //#region src/middleware/auth.ts
@@ -992,7 +1104,13 @@ async function requireAuth(c, next) {
992
1104
  message: "Authorization header required"
993
1105
  }, 401);
994
1106
  const token = auth.slice(7);
995
- if (token === c.env.AUTH_TOKEN) return next();
1107
+ if (token === c.env.AUTH_TOKEN) {
1108
+ c.set("auth", {
1109
+ did: c.env.DID,
1110
+ scope: "atproto"
1111
+ });
1112
+ return next();
1113
+ }
996
1114
  const serviceDid = `did:web:${c.env.PDS_HOSTNAME}`;
997
1115
  try {
998
1116
  const payload = await verifyAccessToken(token, c.env.JWT_SECRET, serviceDid);
@@ -1005,50 +1123,269 @@ async function requireAuth(c, next) {
1005
1123
  scope: payload.scope
1006
1124
  });
1007
1125
  return next();
1008
- } catch {
1009
- return c.json({
1010
- error: "AuthenticationRequired",
1011
- message: "Invalid authentication token"
1012
- }, 401);
1013
- }
1126
+ } catch {}
1127
+ try {
1128
+ const payload = await verifyServiceJwt(token, c.env.SIGNING_KEY, serviceDid, c.env.DID);
1129
+ c.set("auth", {
1130
+ did: payload.iss,
1131
+ scope: payload.lxm || "atproto"
1132
+ });
1133
+ return next();
1134
+ } catch {}
1135
+ return c.json({
1136
+ error: "AuthenticationRequired",
1137
+ message: "Invalid authentication token"
1138
+ }, 401);
1014
1139
  }
1015
1140
 
1016
1141
  //#endregion
1017
- //#region src/service-auth.ts
1018
- const MINUTE = 60 * 1e3;
1019
- function jsonToB64Url(json) {
1020
- return Buffer.from(JSON.stringify(json)).toString("base64url");
1021
- }
1022
- function noUndefinedVals(obj) {
1023
- const result = {};
1024
- for (const [key, val] of Object.entries(obj)) if (val !== void 0) result[key] = val;
1025
- return result;
1142
+ //#region src/did-resolver.ts
1143
+ /**
1144
+ * DID resolution for Cloudflare Workers
1145
+ *
1146
+ * We can't use @atproto/identity directly because it uses `redirect: "error"`
1147
+ * which Cloudflare Workers doesn't support. This is a simple implementation
1148
+ * that's compatible with Workers.
1149
+ */
1150
+ const PLC_DIRECTORY = "https://plc.directory";
1151
+ const TIMEOUT_MS = 3e3;
1152
+ var DidResolver = class {
1153
+ plcUrl;
1154
+ timeout;
1155
+ cache;
1156
+ constructor(opts = {}) {
1157
+ this.plcUrl = opts.plcUrl ?? PLC_DIRECTORY;
1158
+ this.timeout = opts.timeout ?? TIMEOUT_MS;
1159
+ this.cache = opts.didCache;
1160
+ }
1161
+ async resolve(did) {
1162
+ if (this.cache) {
1163
+ const cached = await this.cache.checkCache(did);
1164
+ if (cached && !cached.expired) {
1165
+ if (cached.stale) this.cache.refreshCache(did, () => this.resolveNoCache(did), cached);
1166
+ return cached.doc;
1167
+ }
1168
+ }
1169
+ const doc = await this.resolveNoCache(did);
1170
+ if (doc && this.cache) await this.cache.cacheDid(did, doc);
1171
+ else if (!doc && this.cache) await this.cache.clearEntry(did);
1172
+ return doc;
1173
+ }
1174
+ async resolveNoCache(did) {
1175
+ if (did.startsWith("did:web:")) return this.resolveDidWeb(did);
1176
+ if (did.startsWith("did:plc:")) return this.resolveDidPlc(did);
1177
+ throw new Error(`Unsupported DID method: ${did}`);
1178
+ }
1179
+ async resolveDidWeb(did) {
1180
+ const parts = did.split(":").slice(2);
1181
+ if (parts.length === 0) throw new Error(`Invalid did:web format: ${did}`);
1182
+ if (parts.length > 1) throw new Error(`Unsupported did:web with path: ${did}`);
1183
+ const domain = decodeURIComponent(parts[0]);
1184
+ const url = new URL(`https://${domain}/.well-known/did.json`);
1185
+ if (url.hostname === "localhost") url.protocol = "http:";
1186
+ const controller = new AbortController();
1187
+ const timeoutId = setTimeout(() => controller.abort(), this.timeout);
1188
+ try {
1189
+ const res = await fetch(url.toString(), {
1190
+ signal: controller.signal,
1191
+ redirect: "manual",
1192
+ headers: { accept: "application/did+ld+json,application/json" }
1193
+ });
1194
+ if (res.status >= 300 && res.status < 400) return null;
1195
+ if (!res.ok) return null;
1196
+ const doc = await res.json();
1197
+ return this.validateDidDoc(did, doc);
1198
+ } finally {
1199
+ clearTimeout(timeoutId);
1200
+ }
1201
+ }
1202
+ async resolveDidPlc(did) {
1203
+ const url = new URL(`/${encodeURIComponent(did)}`, this.plcUrl);
1204
+ const controller = new AbortController();
1205
+ const timeoutId = setTimeout(() => controller.abort(), this.timeout);
1206
+ try {
1207
+ const res = await fetch(url.toString(), {
1208
+ signal: controller.signal,
1209
+ redirect: "manual",
1210
+ headers: { accept: "application/did+ld+json,application/json" }
1211
+ });
1212
+ if (res.status >= 300 && res.status < 400) return null;
1213
+ if (res.status === 404) return null;
1214
+ if (!res.ok) throw new Error(`PLC directory error: ${res.status} ${res.statusText}`);
1215
+ const doc = await res.json();
1216
+ return this.validateDidDoc(did, doc);
1217
+ } finally {
1218
+ clearTimeout(timeoutId);
1219
+ }
1220
+ }
1221
+ validateDidDoc(did, doc) {
1222
+ if (!check.is(doc, didDocument)) return null;
1223
+ if (doc.id !== did) return null;
1224
+ return doc;
1225
+ }
1226
+ };
1227
+
1228
+ //#endregion
1229
+ //#region src/did-cache.ts
1230
+ const STALE_TTL = 3600 * 1e3;
1231
+ const MAX_TTL = 1440 * 60 * 1e3;
1232
+ var WorkersDidCache = class {
1233
+ cache;
1234
+ constructor() {
1235
+ this.cache = caches.default;
1236
+ }
1237
+ getCacheKey(did) {
1238
+ return `https://did-cache.internal/${encodeURIComponent(did)}`;
1239
+ }
1240
+ async cacheDid(did, doc, _prevResult) {
1241
+ const cacheKey = this.getCacheKey(did);
1242
+ const response = new Response(JSON.stringify(doc), { headers: {
1243
+ "Content-Type": "application/json",
1244
+ "Cache-Control": "max-age=86400",
1245
+ "X-Cached-At": Date.now().toString()
1246
+ } });
1247
+ await this.cache.put(cacheKey, response);
1248
+ }
1249
+ async checkCache(did) {
1250
+ const cacheKey = this.getCacheKey(did);
1251
+ const response = await this.cache.match(cacheKey);
1252
+ if (!response) return null;
1253
+ const cachedAt = parseInt(response.headers.get("X-Cached-At") || "0", 10);
1254
+ const age = Date.now() - cachedAt;
1255
+ const doc = await response.json();
1256
+ if (!check.is(doc, didDocument) || doc.id !== did) {
1257
+ await this.clearEntry(did);
1258
+ return null;
1259
+ }
1260
+ return {
1261
+ did,
1262
+ doc,
1263
+ updatedAt: cachedAt,
1264
+ stale: age > STALE_TTL,
1265
+ expired: age > MAX_TTL
1266
+ };
1267
+ }
1268
+ async refreshCache(did, getDoc, _prevResult) {
1269
+ waitUntil(getDoc().then((doc) => {
1270
+ if (doc) return this.cacheDid(did, doc);
1271
+ }));
1272
+ }
1273
+ async clearEntry(did) {
1274
+ const cacheKey = this.getCacheKey(did);
1275
+ await this.cache.delete(cacheKey);
1276
+ }
1277
+ async clear() {}
1278
+ };
1279
+
1280
+ //#endregion
1281
+ //#region src/xrpc-proxy.ts
1282
+ /**
1283
+ * Parse atproto-proxy header value
1284
+ * Format: "did:web:example.com#service_id"
1285
+ * Returns: { did: "did:web:example.com", serviceId: "service_id" }
1286
+ */
1287
+ function parseProxyHeader(header) {
1288
+ const parts = header.split("#");
1289
+ if (parts.length !== 2) return null;
1290
+ const [did, serviceId] = parts;
1291
+ if (!did?.startsWith("did:") || !serviceId) return null;
1292
+ return {
1293
+ did,
1294
+ serviceId
1295
+ };
1026
1296
  }
1027
1297
  /**
1028
- * Create a service JWT for proxied requests to AppView.
1029
- * The JWT asserts that the PDS vouches for the user identified by `iss`.
1298
+ * Handle XRPC proxy requests
1299
+ * Routes requests to external services based on atproto-proxy header or lexicon namespace
1030
1300
  */
1031
- async function createServiceJwt(params) {
1032
- const { iss, aud, keypair } = params;
1033
- const iat = Math.floor(Date.now() / 1e3);
1034
- const exp = iat + MINUTE / 1e3;
1035
- const lxm = params.lxm ?? void 0;
1036
- const jti = randomStr(16, "hex");
1037
- const header = {
1038
- typ: "JWT",
1039
- alg: keypair.jwtAlg
1301
+ async function handleXrpcProxy(c, didResolver$1, getKeypair$1) {
1302
+ const url = new URL(c.req.url);
1303
+ const lxm = url.pathname.replace("/xrpc/", "");
1304
+ if (lxm.includes("..") || lxm.includes("//")) return c.json({
1305
+ error: "InvalidRequest",
1306
+ message: "Invalid XRPC method path"
1307
+ }, 400);
1308
+ const proxyHeader = c.req.header("atproto-proxy");
1309
+ let audienceDid;
1310
+ let targetUrl;
1311
+ if (proxyHeader) {
1312
+ const parsed = parseProxyHeader(proxyHeader);
1313
+ if (!parsed) return c.json({
1314
+ error: "InvalidRequest",
1315
+ message: `Invalid atproto-proxy header format: ${proxyHeader}`
1316
+ }, 400);
1317
+ try {
1318
+ const didDoc = await didResolver$1.resolve(parsed.did);
1319
+ if (!didDoc) return c.json({
1320
+ error: "InvalidRequest",
1321
+ message: `DID not found: ${parsed.did}`
1322
+ }, 400);
1323
+ const endpoint = getServiceEndpoint(didDoc, { id: parsed.serviceId.startsWith("#") ? parsed.serviceId : `#${parsed.serviceId}` });
1324
+ if (!endpoint) return c.json({
1325
+ error: "InvalidRequest",
1326
+ message: `Service not found in DID document: ${parsed.serviceId}`
1327
+ }, 400);
1328
+ audienceDid = parsed.did;
1329
+ targetUrl = new URL(endpoint);
1330
+ if (targetUrl.protocol !== "https:") return c.json({
1331
+ error: "InvalidRequest",
1332
+ message: "Proxy target must use HTTPS"
1333
+ }, 400);
1334
+ targetUrl.pathname = url.pathname;
1335
+ targetUrl.search = url.search;
1336
+ } catch (err) {
1337
+ return c.json({
1338
+ error: "InvalidRequest",
1339
+ message: `Failed to resolve service: ${err instanceof Error ? err.message : String(err)}`
1340
+ }, 400);
1341
+ }
1342
+ } else {
1343
+ const isChat = lxm.startsWith("chat.bsky.");
1344
+ audienceDid = isChat ? "did:web:api.bsky.chat" : "did:web:api.bsky.app";
1345
+ const endpoint = isChat ? "https://api.bsky.chat" : "https://api.bsky.app";
1346
+ targetUrl = new URL(`/xrpc/${lxm}${url.search}`, endpoint);
1347
+ }
1348
+ const auth = c.req.header("Authorization");
1349
+ let headers = {};
1350
+ if (auth?.startsWith("Bearer ")) {
1351
+ const token = auth.slice(7);
1352
+ const serviceDid = `did:web:${c.env.PDS_HOSTNAME}`;
1353
+ try {
1354
+ let userDid;
1355
+ if (token === c.env.AUTH_TOKEN) userDid = c.env.DID;
1356
+ else {
1357
+ const payload = await verifyAccessToken(token, c.env.JWT_SECRET, serviceDid);
1358
+ if (!payload.sub) throw new Error("Missing sub claim in token");
1359
+ userDid = payload.sub;
1360
+ }
1361
+ const keypair = await getKeypair$1();
1362
+ headers["Authorization"] = `Bearer ${await createServiceJwt({
1363
+ iss: userDid,
1364
+ aud: audienceDid,
1365
+ lxm,
1366
+ keypair
1367
+ })}`;
1368
+ } catch {}
1369
+ }
1370
+ const forwardHeaders = new Headers(c.req.raw.headers);
1371
+ for (const header of [
1372
+ "authorization",
1373
+ "atproto-proxy",
1374
+ "host",
1375
+ "connection",
1376
+ "cookie",
1377
+ "x-forwarded-for",
1378
+ "x-real-ip",
1379
+ "x-forwarded-proto",
1380
+ "x-forwarded-host"
1381
+ ]) forwardHeaders.delete(header);
1382
+ if (headers["Authorization"]) forwardHeaders.set("Authorization", headers["Authorization"]);
1383
+ const reqInit = {
1384
+ method: c.req.method,
1385
+ headers: forwardHeaders
1040
1386
  };
1041
- const payload = noUndefinedVals({
1042
- iat,
1043
- iss,
1044
- aud,
1045
- exp,
1046
- lxm,
1047
- jti
1048
- });
1049
- const toSignStr = `${jsonToB64Url(header)}.${jsonToB64Url(payload)}`;
1050
- const toSign = Buffer.from(toSignStr, "utf8");
1051
- return `${toSignStr}.${Buffer.from(await keypair.sign(toSign)).toString("base64url")}`;
1387
+ if (c.req.method !== "GET" && c.req.method !== "HEAD") reqInit.body = c.req.raw.body;
1388
+ return fetch(targetUrl.toString(), reqInit);
1052
1389
  }
1053
1390
 
1054
1391
  //#endregion
@@ -1185,469 +1522,1872 @@ async function getBlob(c, _accountDO) {
1185
1522
  }
1186
1523
 
1187
1524
  //#endregion
1188
- //#region src/lexicons/app.bsky.actor.profile.json
1189
- var app_bsky_actor_profile_exports = /* @__PURE__ */ __exportAll({
1190
- default: () => app_bsky_actor_profile_default,
1191
- defs: () => defs$15,
1192
- id: () => id$15,
1193
- lexicon: () => lexicon$15
1525
+ //#region src/lexicons/app.bsky.actor.defs.json
1526
+ var app_bsky_actor_defs_exports = /* @__PURE__ */ __exportAll({
1527
+ default: () => app_bsky_actor_defs_default,
1528
+ defs: () => defs$21,
1529
+ id: () => id$21,
1530
+ lexicon: () => lexicon$21
1194
1531
  });
1195
- var lexicon$15 = 1;
1196
- var id$15 = "app.bsky.actor.profile";
1197
- var defs$15 = { "main": {
1198
- "type": "record",
1199
- "description": "A declaration of a Bluesky account profile.",
1200
- "key": "literal:self",
1201
- "record": {
1532
+ var lexicon$21 = 1;
1533
+ var id$21 = "app.bsky.actor.defs";
1534
+ var defs$21 = {
1535
+ "profileViewBasic": {
1202
1536
  "type": "object",
1537
+ "required": ["did", "handle"],
1203
1538
  "properties": {
1204
- "displayName": {
1539
+ "did": {
1205
1540
  "type": "string",
1206
- "maxGraphemes": 64,
1207
- "maxLength": 640
1541
+ "format": "did"
1208
1542
  },
1209
- "description": {
1543
+ "handle": {
1210
1544
  "type": "string",
1211
- "description": "Free-form profile description text.",
1212
- "maxGraphemes": 256,
1213
- "maxLength": 2560
1545
+ "format": "handle"
1214
1546
  },
1215
- "pronouns": {
1547
+ "displayName": {
1216
1548
  "type": "string",
1217
- "description": "Free-form pronouns text.",
1218
- "maxGraphemes": 20,
1219
- "maxLength": 200
1549
+ "maxGraphemes": 64,
1550
+ "maxLength": 640
1220
1551
  },
1221
- "website": {
1552
+ "pronouns": { "type": "string" },
1553
+ "avatar": {
1222
1554
  "type": "string",
1223
1555
  "format": "uri"
1224
1556
  },
1225
- "avatar": {
1226
- "type": "blob",
1227
- "description": "Small image to be displayed next to posts from account. AKA, 'profile picture'",
1228
- "accept": ["image/png", "image/jpeg"],
1229
- "maxSize": 1e6
1557
+ "associated": {
1558
+ "type": "ref",
1559
+ "ref": "#profileAssociated"
1230
1560
  },
1231
- "banner": {
1232
- "type": "blob",
1233
- "description": "Larger horizontal image to display behind profile view.",
1234
- "accept": ["image/png", "image/jpeg"],
1235
- "maxSize": 1e6
1561
+ "viewer": {
1562
+ "type": "ref",
1563
+ "ref": "#viewerState"
1236
1564
  },
1237
1565
  "labels": {
1238
- "type": "union",
1239
- "description": "Self-label values, specific to the Bluesky application, on the overall account.",
1240
- "refs": ["com.atproto.label.defs#selfLabels"]
1566
+ "type": "array",
1567
+ "items": {
1568
+ "type": "ref",
1569
+ "ref": "com.atproto.label.defs#label"
1570
+ }
1241
1571
  },
1242
- "joinedViaStarterPack": {
1572
+ "createdAt": {
1573
+ "type": "string",
1574
+ "format": "datetime"
1575
+ },
1576
+ "verification": {
1243
1577
  "type": "ref",
1244
- "ref": "com.atproto.repo.strongRef"
1578
+ "ref": "#verificationState"
1245
1579
  },
1246
- "pinnedPost": {
1580
+ "status": {
1247
1581
  "type": "ref",
1248
- "ref": "com.atproto.repo.strongRef"
1582
+ "ref": "#statusView"
1249
1583
  },
1250
- "createdAt": {
1251
- "type": "string",
1252
- "format": "datetime"
1584
+ "debug": {
1585
+ "type": "unknown",
1586
+ "description": "Debug information for internal development"
1253
1587
  }
1254
1588
  }
1255
- }
1256
- } };
1257
- var app_bsky_actor_profile_default = {
1258
- lexicon: lexicon$15,
1259
- id: id$15,
1260
- defs: defs$15
1261
- };
1262
-
1263
- //#endregion
1264
- //#region src/lexicons/app.bsky.embed.external.json
1265
- var app_bsky_embed_external_exports = /* @__PURE__ */ __exportAll({
1266
- default: () => app_bsky_embed_external_default,
1267
- defs: () => defs$14,
1268
- id: () => id$14,
1269
- lexicon: () => lexicon$14
1270
- });
1271
- var lexicon$14 = 1;
1272
- var id$14 = "app.bsky.embed.external";
1273
- var defs$14 = {
1274
- "main": {
1275
- "type": "object",
1276
- "description": "A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post).",
1277
- "required": ["external"],
1278
- "properties": { "external": {
1279
- "type": "ref",
1280
- "ref": "#external"
1281
- } }
1282
1589
  },
1283
- "external": {
1590
+ "profileView": {
1284
1591
  "type": "object",
1285
- "required": [
1286
- "uri",
1287
- "title",
1288
- "description"
1289
- ],
1592
+ "required": ["did", "handle"],
1290
1593
  "properties": {
1291
- "uri": {
1594
+ "did": {
1595
+ "type": "string",
1596
+ "format": "did"
1597
+ },
1598
+ "handle": {
1599
+ "type": "string",
1600
+ "format": "handle"
1601
+ },
1602
+ "displayName": {
1603
+ "type": "string",
1604
+ "maxGraphemes": 64,
1605
+ "maxLength": 640
1606
+ },
1607
+ "pronouns": { "type": "string" },
1608
+ "description": {
1609
+ "type": "string",
1610
+ "maxGraphemes": 256,
1611
+ "maxLength": 2560
1612
+ },
1613
+ "avatar": {
1292
1614
  "type": "string",
1293
1615
  "format": "uri"
1294
1616
  },
1295
- "title": { "type": "string" },
1296
- "description": { "type": "string" },
1297
- "thumb": {
1298
- "type": "blob",
1299
- "accept": ["image/*"],
1300
- "maxSize": 1e6
1617
+ "associated": {
1618
+ "type": "ref",
1619
+ "ref": "#profileAssociated"
1620
+ },
1621
+ "indexedAt": {
1622
+ "type": "string",
1623
+ "format": "datetime"
1624
+ },
1625
+ "createdAt": {
1626
+ "type": "string",
1627
+ "format": "datetime"
1628
+ },
1629
+ "viewer": {
1630
+ "type": "ref",
1631
+ "ref": "#viewerState"
1632
+ },
1633
+ "labels": {
1634
+ "type": "array",
1635
+ "items": {
1636
+ "type": "ref",
1637
+ "ref": "com.atproto.label.defs#label"
1638
+ }
1639
+ },
1640
+ "verification": {
1641
+ "type": "ref",
1642
+ "ref": "#verificationState"
1643
+ },
1644
+ "status": {
1645
+ "type": "ref",
1646
+ "ref": "#statusView"
1647
+ },
1648
+ "debug": {
1649
+ "type": "unknown",
1650
+ "description": "Debug information for internal development"
1301
1651
  }
1302
1652
  }
1303
1653
  },
1304
- "view": {
1305
- "type": "object",
1306
- "required": ["external"],
1307
- "properties": { "external": {
1308
- "type": "ref",
1309
- "ref": "#viewExternal"
1310
- } }
1311
- },
1312
- "viewExternal": {
1654
+ "profileViewDetailed": {
1313
1655
  "type": "object",
1314
- "required": [
1315
- "uri",
1316
- "title",
1317
- "description"
1318
- ],
1656
+ "required": ["did", "handle"],
1319
1657
  "properties": {
1320
- "uri": {
1658
+ "did": {
1659
+ "type": "string",
1660
+ "format": "did"
1661
+ },
1662
+ "handle": {
1663
+ "type": "string",
1664
+ "format": "handle"
1665
+ },
1666
+ "displayName": {
1667
+ "type": "string",
1668
+ "maxGraphemes": 64,
1669
+ "maxLength": 640
1670
+ },
1671
+ "description": {
1672
+ "type": "string",
1673
+ "maxGraphemes": 256,
1674
+ "maxLength": 2560
1675
+ },
1676
+ "pronouns": { "type": "string" },
1677
+ "website": {
1321
1678
  "type": "string",
1322
1679
  "format": "uri"
1323
1680
  },
1324
- "title": { "type": "string" },
1325
- "description": { "type": "string" },
1326
- "thumb": {
1681
+ "avatar": {
1327
1682
  "type": "string",
1328
1683
  "format": "uri"
1329
- }
1330
- }
1331
- }
1332
- };
1333
- var app_bsky_embed_external_default = {
1334
- lexicon: lexicon$14,
1335
- id: id$14,
1336
- defs: defs$14
1337
- };
1338
-
1339
- //#endregion
1340
- //#region src/lexicons/app.bsky.embed.images.json
1341
- var app_bsky_embed_images_exports = /* @__PURE__ */ __exportAll({
1342
- default: () => app_bsky_embed_images_default,
1343
- defs: () => defs$13,
1344
- description: () => description$3,
1345
- id: () => id$13,
1346
- lexicon: () => lexicon$13
1347
- });
1348
- var lexicon$13 = 1;
1349
- var id$13 = "app.bsky.embed.images";
1350
- var description$3 = "A set of images embedded in a Bluesky record (eg, a post).";
1351
- var defs$13 = {
1352
- "main": {
1353
- "type": "object",
1354
- "required": ["images"],
1355
- "properties": { "images": {
1356
- "type": "array",
1357
- "items": {
1684
+ },
1685
+ "banner": {
1686
+ "type": "string",
1687
+ "format": "uri"
1688
+ },
1689
+ "followersCount": { "type": "integer" },
1690
+ "followsCount": { "type": "integer" },
1691
+ "postsCount": { "type": "integer" },
1692
+ "associated": {
1358
1693
  "type": "ref",
1359
- "ref": "#image"
1694
+ "ref": "#profileAssociated"
1360
1695
  },
1361
- "maxLength": 4
1362
- } }
1363
- },
1364
- "image": {
1365
- "type": "object",
1366
- "required": ["image", "alt"],
1367
- "properties": {
1368
- "image": {
1369
- "type": "blob",
1370
- "accept": ["image/*"],
1371
- "maxSize": 1e6
1696
+ "joinedViaStarterPack": {
1697
+ "type": "ref",
1698
+ "ref": "app.bsky.graph.defs#starterPackViewBasic"
1372
1699
  },
1373
- "alt": {
1700
+ "indexedAt": {
1374
1701
  "type": "string",
1375
- "description": "Alt text description of the image, for accessibility."
1702
+ "format": "datetime"
1376
1703
  },
1377
- "aspectRatio": {
1704
+ "createdAt": {
1705
+ "type": "string",
1706
+ "format": "datetime"
1707
+ },
1708
+ "viewer": {
1378
1709
  "type": "ref",
1379
- "ref": "app.bsky.embed.defs#aspectRatio"
1710
+ "ref": "#viewerState"
1711
+ },
1712
+ "labels": {
1713
+ "type": "array",
1714
+ "items": {
1715
+ "type": "ref",
1716
+ "ref": "com.atproto.label.defs#label"
1717
+ }
1718
+ },
1719
+ "pinnedPost": {
1720
+ "type": "ref",
1721
+ "ref": "com.atproto.repo.strongRef"
1722
+ },
1723
+ "verification": {
1724
+ "type": "ref",
1725
+ "ref": "#verificationState"
1726
+ },
1727
+ "status": {
1728
+ "type": "ref",
1729
+ "ref": "#statusView"
1730
+ },
1731
+ "debug": {
1732
+ "type": "unknown",
1733
+ "description": "Debug information for internal development"
1380
1734
  }
1381
1735
  }
1382
1736
  },
1383
- "view": {
1737
+ "profileAssociated": {
1384
1738
  "type": "object",
1385
- "required": ["images"],
1386
- "properties": { "images": {
1387
- "type": "array",
1388
- "items": {
1739
+ "properties": {
1740
+ "lists": { "type": "integer" },
1741
+ "feedgens": { "type": "integer" },
1742
+ "starterPacks": { "type": "integer" },
1743
+ "labeler": { "type": "boolean" },
1744
+ "chat": {
1389
1745
  "type": "ref",
1390
- "ref": "#viewImage"
1746
+ "ref": "#profileAssociatedChat"
1391
1747
  },
1392
- "maxLength": 4
1748
+ "activitySubscription": {
1749
+ "type": "ref",
1750
+ "ref": "#profileAssociatedActivitySubscription"
1751
+ }
1752
+ }
1753
+ },
1754
+ "profileAssociatedChat": {
1755
+ "type": "object",
1756
+ "required": ["allowIncoming"],
1757
+ "properties": { "allowIncoming": {
1758
+ "type": "string",
1759
+ "knownValues": [
1760
+ "all",
1761
+ "none",
1762
+ "following"
1763
+ ]
1393
1764
  } }
1394
1765
  },
1395
- "viewImage": {
1766
+ "profileAssociatedActivitySubscription": {
1396
1767
  "type": "object",
1397
- "required": [
1398
- "thumb",
1399
- "fullsize",
1400
- "alt"
1401
- ],
1768
+ "required": ["allowSubscriptions"],
1769
+ "properties": { "allowSubscriptions": {
1770
+ "type": "string",
1771
+ "knownValues": [
1772
+ "followers",
1773
+ "mutuals",
1774
+ "none"
1775
+ ]
1776
+ } }
1777
+ },
1778
+ "viewerState": {
1779
+ "type": "object",
1780
+ "description": "Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.",
1402
1781
  "properties": {
1403
- "thumb": {
1782
+ "muted": { "type": "boolean" },
1783
+ "mutedByList": {
1784
+ "type": "ref",
1785
+ "ref": "app.bsky.graph.defs#listViewBasic"
1786
+ },
1787
+ "blockedBy": { "type": "boolean" },
1788
+ "blocking": {
1404
1789
  "type": "string",
1405
- "format": "uri",
1406
- "description": "Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View."
1790
+ "format": "at-uri"
1407
1791
  },
1408
- "fullsize": {
1792
+ "blockingByList": {
1793
+ "type": "ref",
1794
+ "ref": "app.bsky.graph.defs#listViewBasic"
1795
+ },
1796
+ "following": {
1409
1797
  "type": "string",
1410
- "format": "uri",
1411
- "description": "Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View."
1798
+ "format": "at-uri"
1412
1799
  },
1413
- "alt": {
1800
+ "followedBy": {
1414
1801
  "type": "string",
1415
- "description": "Alt text description of the image, for accessibility."
1802
+ "format": "at-uri"
1416
1803
  },
1417
- "aspectRatio": {
1804
+ "knownFollowers": {
1805
+ "description": "This property is present only in selected cases, as an optimization.",
1418
1806
  "type": "ref",
1419
- "ref": "app.bsky.embed.defs#aspectRatio"
1807
+ "ref": "#knownFollowers"
1808
+ },
1809
+ "activitySubscription": {
1810
+ "description": "This property is present only in selected cases, as an optimization.",
1811
+ "type": "ref",
1812
+ "ref": "app.bsky.notification.defs#activitySubscription"
1420
1813
  }
1421
1814
  }
1422
- }
1423
- };
1424
- var app_bsky_embed_images_default = {
1425
- lexicon: lexicon$13,
1426
- id: id$13,
1427
- description: description$3,
1428
- defs: defs$13
1429
- };
1430
-
1431
- //#endregion
1432
- //#region src/lexicons/app.bsky.embed.record.json
1433
- var app_bsky_embed_record_exports = /* @__PURE__ */ __exportAll({
1434
- default: () => app_bsky_embed_record_default,
1435
- defs: () => defs$12,
1436
- description: () => description$2,
1437
- id: () => id$12,
1438
- lexicon: () => lexicon$12
1439
- });
1440
- var lexicon$12 = 1;
1441
- var id$12 = "app.bsky.embed.record";
1442
- var description$2 = "A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record.";
1443
- var defs$12 = {
1444
- "main": {
1815
+ },
1816
+ "knownFollowers": {
1445
1817
  "type": "object",
1446
- "required": ["record"],
1447
- "properties": { "record": {
1448
- "type": "ref",
1449
- "ref": "com.atproto.repo.strongRef"
1450
- } }
1818
+ "description": "The subject's followers whom you also follow",
1819
+ "required": ["count", "followers"],
1820
+ "properties": {
1821
+ "count": { "type": "integer" },
1822
+ "followers": {
1823
+ "type": "array",
1824
+ "minLength": 0,
1825
+ "maxLength": 5,
1826
+ "items": {
1827
+ "type": "ref",
1828
+ "ref": "#profileViewBasic"
1829
+ }
1830
+ }
1831
+ }
1451
1832
  },
1452
- "view": {
1833
+ "verificationState": {
1453
1834
  "type": "object",
1454
- "required": ["record"],
1455
- "properties": { "record": {
1456
- "type": "union",
1457
- "refs": [
1458
- "#viewRecord",
1459
- "#viewNotFound",
1460
- "#viewBlocked",
1461
- "#viewDetached",
1462
- "app.bsky.feed.defs#generatorView",
1463
- "app.bsky.graph.defs#listView",
1464
- "app.bsky.labeler.defs#labelerView",
1465
- "app.bsky.graph.defs#starterPackViewBasic"
1466
- ]
1467
- } }
1835
+ "description": "Represents the verification information about the user this object is attached to.",
1836
+ "required": [
1837
+ "verifications",
1838
+ "verifiedStatus",
1839
+ "trustedVerifierStatus"
1840
+ ],
1841
+ "properties": {
1842
+ "verifications": {
1843
+ "type": "array",
1844
+ "description": "All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included.",
1845
+ "items": {
1846
+ "type": "ref",
1847
+ "ref": "#verificationView"
1848
+ }
1849
+ },
1850
+ "verifiedStatus": {
1851
+ "type": "string",
1852
+ "description": "The user's status as a verified account.",
1853
+ "knownValues": [
1854
+ "valid",
1855
+ "invalid",
1856
+ "none"
1857
+ ]
1858
+ },
1859
+ "trustedVerifierStatus": {
1860
+ "type": "string",
1861
+ "description": "The user's status as a trusted verifier.",
1862
+ "knownValues": [
1863
+ "valid",
1864
+ "invalid",
1865
+ "none"
1866
+ ]
1867
+ }
1868
+ }
1468
1869
  },
1469
- "viewRecord": {
1870
+ "verificationView": {
1470
1871
  "type": "object",
1872
+ "description": "An individual verification for an associated subject.",
1471
1873
  "required": [
1874
+ "issuer",
1472
1875
  "uri",
1473
- "cid",
1474
- "author",
1475
- "value",
1476
- "indexedAt"
1876
+ "isValid",
1877
+ "createdAt"
1477
1878
  ],
1478
1879
  "properties": {
1880
+ "issuer": {
1881
+ "type": "string",
1882
+ "description": "The user who issued this verification.",
1883
+ "format": "did"
1884
+ },
1479
1885
  "uri": {
1480
1886
  "type": "string",
1887
+ "description": "The AT-URI of the verification record.",
1481
1888
  "format": "at-uri"
1482
1889
  },
1483
- "cid": {
1484
- "type": "string",
1485
- "format": "cid"
1890
+ "isValid": {
1891
+ "type": "boolean",
1892
+ "description": "True if the verification passes validation, otherwise false."
1486
1893
  },
1487
- "author": {
1488
- "type": "ref",
1489
- "ref": "app.bsky.actor.defs#profileViewBasic"
1894
+ "createdAt": {
1895
+ "type": "string",
1896
+ "description": "Timestamp when the verification was created.",
1897
+ "format": "datetime"
1898
+ }
1899
+ }
1900
+ },
1901
+ "preferences": {
1902
+ "type": "array",
1903
+ "items": {
1904
+ "type": "union",
1905
+ "refs": [
1906
+ "#adultContentPref",
1907
+ "#contentLabelPref",
1908
+ "#savedFeedsPref",
1909
+ "#savedFeedsPrefV2",
1910
+ "#personalDetailsPref",
1911
+ "#declaredAgePref",
1912
+ "#feedViewPref",
1913
+ "#threadViewPref",
1914
+ "#interestsPref",
1915
+ "#mutedWordsPref",
1916
+ "#hiddenPostsPref",
1917
+ "#bskyAppStatePref",
1918
+ "#labelersPref",
1919
+ "#postInteractionSettingsPref",
1920
+ "#verificationPrefs"
1921
+ ]
1922
+ }
1923
+ },
1924
+ "adultContentPref": {
1925
+ "type": "object",
1926
+ "required": ["enabled"],
1927
+ "properties": { "enabled": {
1928
+ "type": "boolean",
1929
+ "default": false
1930
+ } }
1931
+ },
1932
+ "contentLabelPref": {
1933
+ "type": "object",
1934
+ "required": ["label", "visibility"],
1935
+ "properties": {
1936
+ "labelerDid": {
1937
+ "type": "string",
1938
+ "description": "Which labeler does this preference apply to? If undefined, applies globally.",
1939
+ "format": "did"
1490
1940
  },
1491
- "value": {
1492
- "type": "unknown",
1493
- "description": "The record data itself."
1941
+ "label": { "type": "string" },
1942
+ "visibility": {
1943
+ "type": "string",
1944
+ "knownValues": [
1945
+ "ignore",
1946
+ "show",
1947
+ "warn",
1948
+ "hide"
1949
+ ]
1950
+ }
1951
+ }
1952
+ },
1953
+ "savedFeed": {
1954
+ "type": "object",
1955
+ "required": [
1956
+ "id",
1957
+ "type",
1958
+ "value",
1959
+ "pinned"
1960
+ ],
1961
+ "properties": {
1962
+ "id": { "type": "string" },
1963
+ "type": {
1964
+ "type": "string",
1965
+ "knownValues": [
1966
+ "feed",
1967
+ "list",
1968
+ "timeline"
1969
+ ]
1494
1970
  },
1495
- "labels": {
1971
+ "value": { "type": "string" },
1972
+ "pinned": { "type": "boolean" }
1973
+ }
1974
+ },
1975
+ "savedFeedsPrefV2": {
1976
+ "type": "object",
1977
+ "required": ["items"],
1978
+ "properties": { "items": {
1979
+ "type": "array",
1980
+ "items": {
1981
+ "type": "ref",
1982
+ "ref": "app.bsky.actor.defs#savedFeed"
1983
+ }
1984
+ } }
1985
+ },
1986
+ "savedFeedsPref": {
1987
+ "type": "object",
1988
+ "required": ["pinned", "saved"],
1989
+ "properties": {
1990
+ "pinned": {
1496
1991
  "type": "array",
1497
1992
  "items": {
1498
- "type": "ref",
1499
- "ref": "com.atproto.label.defs#label"
1993
+ "type": "string",
1994
+ "format": "at-uri"
1500
1995
  }
1501
1996
  },
1502
- "replyCount": { "type": "integer" },
1503
- "repostCount": { "type": "integer" },
1504
- "likeCount": { "type": "integer" },
1505
- "quoteCount": { "type": "integer" },
1506
- "embeds": {
1997
+ "saved": {
1507
1998
  "type": "array",
1508
1999
  "items": {
1509
- "type": "union",
1510
- "refs": [
1511
- "app.bsky.embed.images#view",
1512
- "app.bsky.embed.video#view",
1513
- "app.bsky.embed.external#view",
1514
- "app.bsky.embed.record#view",
1515
- "app.bsky.embed.recordWithMedia#view"
1516
- ]
2000
+ "type": "string",
2001
+ "format": "at-uri"
1517
2002
  }
1518
2003
  },
1519
- "indexedAt": {
1520
- "type": "string",
1521
- "format": "datetime"
1522
- }
2004
+ "timelineIndex": { "type": "integer" }
1523
2005
  }
1524
2006
  },
1525
- "viewNotFound": {
2007
+ "personalDetailsPref": {
1526
2008
  "type": "object",
1527
- "required": ["uri", "notFound"],
2009
+ "properties": { "birthDate": {
2010
+ "type": "string",
2011
+ "format": "datetime",
2012
+ "description": "The birth date of account owner."
2013
+ } }
2014
+ },
2015
+ "declaredAgePref": {
2016
+ "type": "object",
2017
+ "description": "Read-only preference containing value(s) inferred from the user's declared birthdate. Absence of this preference object in the response indicates that the user has not made a declaration.",
1528
2018
  "properties": {
1529
- "uri": {
1530
- "type": "string",
1531
- "format": "at-uri"
2019
+ "isOverAge13": {
2020
+ "type": "boolean",
2021
+ "description": "Indicates if the user has declared that they are over 13 years of age."
1532
2022
  },
1533
- "notFound": {
2023
+ "isOverAge16": {
1534
2024
  "type": "boolean",
1535
- "const": true
2025
+ "description": "Indicates if the user has declared that they are over 16 years of age."
2026
+ },
2027
+ "isOverAge18": {
2028
+ "type": "boolean",
2029
+ "description": "Indicates if the user has declared that they are over 18 years of age."
1536
2030
  }
1537
2031
  }
1538
2032
  },
1539
- "viewBlocked": {
2033
+ "feedViewPref": {
1540
2034
  "type": "object",
1541
- "required": [
1542
- "uri",
1543
- "blocked",
1544
- "author"
1545
- ],
2035
+ "required": ["feed"],
1546
2036
  "properties": {
1547
- "uri": {
2037
+ "feed": {
1548
2038
  "type": "string",
1549
- "format": "at-uri"
2039
+ "description": "The URI of the feed, or an identifier which describes the feed."
1550
2040
  },
1551
- "blocked": {
2041
+ "hideReplies": {
1552
2042
  "type": "boolean",
1553
- "const": true
2043
+ "description": "Hide replies in the feed."
1554
2044
  },
1555
- "author": {
1556
- "type": "ref",
1557
- "ref": "app.bsky.feed.defs#blockedAuthor"
2045
+ "hideRepliesByUnfollowed": {
2046
+ "type": "boolean",
2047
+ "description": "Hide replies in the feed if they are not by followed users.",
2048
+ "default": true
2049
+ },
2050
+ "hideRepliesByLikeCount": {
2051
+ "type": "integer",
2052
+ "description": "Hide replies in the feed if they do not have this number of likes."
2053
+ },
2054
+ "hideReposts": {
2055
+ "type": "boolean",
2056
+ "description": "Hide reposts in the feed."
2057
+ },
2058
+ "hideQuotePosts": {
2059
+ "type": "boolean",
2060
+ "description": "Hide quote posts in the feed."
1558
2061
  }
1559
2062
  }
1560
2063
  },
1561
- "viewDetached": {
2064
+ "threadViewPref": {
1562
2065
  "type": "object",
1563
- "required": ["uri", "detached"],
2066
+ "properties": { "sort": {
2067
+ "type": "string",
2068
+ "description": "Sorting mode for threads.",
2069
+ "knownValues": [
2070
+ "oldest",
2071
+ "newest",
2072
+ "most-likes",
2073
+ "random",
2074
+ "hotness"
2075
+ ]
2076
+ } }
2077
+ },
2078
+ "interestsPref": {
2079
+ "type": "object",
2080
+ "required": ["tags"],
2081
+ "properties": { "tags": {
2082
+ "type": "array",
2083
+ "maxLength": 100,
2084
+ "items": {
2085
+ "type": "string",
2086
+ "maxLength": 640,
2087
+ "maxGraphemes": 64
2088
+ },
2089
+ "description": "A list of tags which describe the account owner's interests gathered during onboarding."
2090
+ } }
2091
+ },
2092
+ "mutedWordTarget": {
2093
+ "type": "string",
2094
+ "knownValues": ["content", "tag"],
2095
+ "maxLength": 640,
2096
+ "maxGraphemes": 64
2097
+ },
2098
+ "mutedWord": {
2099
+ "type": "object",
2100
+ "description": "A word that the account owner has muted.",
2101
+ "required": ["value", "targets"],
1564
2102
  "properties": {
1565
- "uri": {
2103
+ "id": { "type": "string" },
2104
+ "value": {
1566
2105
  "type": "string",
1567
- "format": "at-uri"
2106
+ "description": "The muted word itself.",
2107
+ "maxLength": 1e4,
2108
+ "maxGraphemes": 1e3
1568
2109
  },
1569
- "detached": {
1570
- "type": "boolean",
1571
- "const": true
2110
+ "targets": {
2111
+ "type": "array",
2112
+ "description": "The intended targets of the muted word.",
2113
+ "items": {
2114
+ "type": "ref",
2115
+ "ref": "app.bsky.actor.defs#mutedWordTarget"
2116
+ }
2117
+ },
2118
+ "actorTarget": {
2119
+ "type": "string",
2120
+ "description": "Groups of users to apply the muted word to. If undefined, applies to all users.",
2121
+ "knownValues": ["all", "exclude-following"],
2122
+ "default": "all"
2123
+ },
2124
+ "expiresAt": {
2125
+ "type": "string",
2126
+ "format": "datetime",
2127
+ "description": "The date and time at which the muted word will expire and no longer be applied."
1572
2128
  }
1573
2129
  }
1574
- }
1575
- };
1576
- var app_bsky_embed_record_default = {
1577
- lexicon: lexicon$12,
1578
- id: id$12,
1579
- description: description$2,
1580
- defs: defs$12
1581
- };
1582
-
1583
- //#endregion
1584
- //#region src/lexicons/app.bsky.embed.recordWithMedia.json
1585
- var app_bsky_embed_recordWithMedia_exports = /* @__PURE__ */ __exportAll({
1586
- default: () => app_bsky_embed_recordWithMedia_default,
1587
- defs: () => defs$11,
1588
- description: () => description$1,
1589
- id: () => id$11,
1590
- lexicon: () => lexicon$11
1591
- });
1592
- var lexicon$11 = 1;
1593
- var id$11 = "app.bsky.embed.recordWithMedia";
1594
- var description$1 = "A representation of a record embedded in a Bluesky record (eg, a post), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card.";
1595
- var defs$11 = {
1596
- "main": {
2130
+ },
2131
+ "mutedWordsPref": {
1597
2132
  "type": "object",
1598
- "required": ["record", "media"],
1599
- "properties": {
1600
- "record": {
2133
+ "required": ["items"],
2134
+ "properties": { "items": {
2135
+ "type": "array",
2136
+ "items": {
1601
2137
  "type": "ref",
1602
- "ref": "app.bsky.embed.record"
2138
+ "ref": "app.bsky.actor.defs#mutedWord"
1603
2139
  },
1604
- "media": {
1605
- "type": "union",
1606
- "refs": [
1607
- "app.bsky.embed.images",
1608
- "app.bsky.embed.video",
1609
- "app.bsky.embed.external"
1610
- ]
2140
+ "description": "A list of words the account owner has muted."
2141
+ } }
2142
+ },
2143
+ "hiddenPostsPref": {
2144
+ "type": "object",
2145
+ "required": ["items"],
2146
+ "properties": { "items": {
2147
+ "type": "array",
2148
+ "items": {
2149
+ "type": "string",
2150
+ "format": "at-uri"
2151
+ },
2152
+ "description": "A list of URIs of posts the account owner has hidden."
2153
+ } }
2154
+ },
2155
+ "labelersPref": {
2156
+ "type": "object",
2157
+ "required": ["labelers"],
2158
+ "properties": { "labelers": {
2159
+ "type": "array",
2160
+ "items": {
2161
+ "type": "ref",
2162
+ "ref": "#labelerPrefItem"
1611
2163
  }
1612
- }
2164
+ } }
1613
2165
  },
1614
- "view": {
2166
+ "labelerPrefItem": {
2167
+ "type": "object",
2168
+ "required": ["did"],
2169
+ "properties": { "did": {
2170
+ "type": "string",
2171
+ "format": "did"
2172
+ } }
2173
+ },
2174
+ "bskyAppStatePref": {
2175
+ "description": "A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.",
1615
2176
  "type": "object",
1616
- "required": ["record", "media"],
1617
2177
  "properties": {
1618
- "record": {
2178
+ "activeProgressGuide": {
1619
2179
  "type": "ref",
1620
- "ref": "app.bsky.embed.record#view"
2180
+ "ref": "#bskyAppProgressGuide"
1621
2181
  },
1622
- "media": {
1623
- "type": "union",
1624
- "refs": [
1625
- "app.bsky.embed.images#view",
1626
- "app.bsky.embed.video#view",
1627
- "app.bsky.embed.external#view"
1628
- ]
1629
- }
2182
+ "queuedNudges": {
2183
+ "description": "An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.",
2184
+ "type": "array",
2185
+ "maxLength": 1e3,
2186
+ "items": {
2187
+ "type": "string",
2188
+ "maxLength": 100
2189
+ }
2190
+ },
2191
+ "nuxs": {
2192
+ "description": "Storage for NUXs the user has encountered.",
2193
+ "type": "array",
2194
+ "maxLength": 100,
2195
+ "items": {
2196
+ "type": "ref",
2197
+ "ref": "app.bsky.actor.defs#nux"
2198
+ }
2199
+ }
2200
+ }
2201
+ },
2202
+ "bskyAppProgressGuide": {
2203
+ "description": "If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.",
2204
+ "type": "object",
2205
+ "required": ["guide"],
2206
+ "properties": { "guide": {
2207
+ "type": "string",
2208
+ "maxLength": 100
2209
+ } }
2210
+ },
2211
+ "nux": {
2212
+ "type": "object",
2213
+ "description": "A new user experiences (NUX) storage object",
2214
+ "required": ["id", "completed"],
2215
+ "properties": {
2216
+ "id": {
2217
+ "type": "string",
2218
+ "maxLength": 100
2219
+ },
2220
+ "completed": {
2221
+ "type": "boolean",
2222
+ "default": false
2223
+ },
2224
+ "data": {
2225
+ "description": "Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.",
2226
+ "type": "string",
2227
+ "maxLength": 3e3,
2228
+ "maxGraphemes": 300
2229
+ },
2230
+ "expiresAt": {
2231
+ "type": "string",
2232
+ "format": "datetime",
2233
+ "description": "The date and time at which the NUX will expire and should be considered completed."
2234
+ }
2235
+ }
2236
+ },
2237
+ "verificationPrefs": {
2238
+ "type": "object",
2239
+ "description": "Preferences for how verified accounts appear in the app.",
2240
+ "required": [],
2241
+ "properties": { "hideBadges": {
2242
+ "description": "Hide the blue check badges for verified accounts and trusted verifiers.",
2243
+ "type": "boolean",
2244
+ "default": false
2245
+ } }
2246
+ },
2247
+ "postInteractionSettingsPref": {
2248
+ "type": "object",
2249
+ "description": "Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.",
2250
+ "required": [],
2251
+ "properties": {
2252
+ "threadgateAllowRules": {
2253
+ "description": "Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply.",
2254
+ "type": "array",
2255
+ "maxLength": 5,
2256
+ "items": {
2257
+ "type": "union",
2258
+ "refs": [
2259
+ "app.bsky.feed.threadgate#mentionRule",
2260
+ "app.bsky.feed.threadgate#followerRule",
2261
+ "app.bsky.feed.threadgate#followingRule",
2262
+ "app.bsky.feed.threadgate#listRule"
2263
+ ]
2264
+ }
2265
+ },
2266
+ "postgateEmbeddingRules": {
2267
+ "description": "Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed.",
2268
+ "type": "array",
2269
+ "maxLength": 5,
2270
+ "items": {
2271
+ "type": "union",
2272
+ "refs": ["app.bsky.feed.postgate#disableRule"]
2273
+ }
2274
+ }
2275
+ }
2276
+ },
2277
+ "statusView": {
2278
+ "type": "object",
2279
+ "required": ["status", "record"],
2280
+ "properties": {
2281
+ "status": {
2282
+ "type": "string",
2283
+ "description": "The status for the account.",
2284
+ "knownValues": ["app.bsky.actor.status#live"]
2285
+ },
2286
+ "record": { "type": "unknown" },
2287
+ "embed": {
2288
+ "type": "union",
2289
+ "description": "An optional embed associated with the status.",
2290
+ "refs": ["app.bsky.embed.external#view"]
2291
+ },
2292
+ "expiresAt": {
2293
+ "type": "string",
2294
+ "description": "The date when this status will expire. The application might choose to no longer return the status after expiration.",
2295
+ "format": "datetime"
2296
+ },
2297
+ "isActive": {
2298
+ "type": "boolean",
2299
+ "description": "True if the status is not expired, false if it is expired. Only present if expiration was set."
2300
+ }
2301
+ }
2302
+ }
2303
+ };
2304
+ var app_bsky_actor_defs_default = {
2305
+ lexicon: lexicon$21,
2306
+ id: id$21,
2307
+ defs: defs$21
2308
+ };
2309
+
2310
+ //#endregion
2311
+ //#region src/lexicons/app.bsky.actor.profile.json
2312
+ var app_bsky_actor_profile_exports = /* @__PURE__ */ __exportAll({
2313
+ default: () => app_bsky_actor_profile_default,
2314
+ defs: () => defs$20,
2315
+ id: () => id$20,
2316
+ lexicon: () => lexicon$20
2317
+ });
2318
+ var lexicon$20 = 1;
2319
+ var id$20 = "app.bsky.actor.profile";
2320
+ var defs$20 = { "main": {
2321
+ "type": "record",
2322
+ "description": "A declaration of a Bluesky account profile.",
2323
+ "key": "literal:self",
2324
+ "record": {
2325
+ "type": "object",
2326
+ "properties": {
2327
+ "displayName": {
2328
+ "type": "string",
2329
+ "maxGraphemes": 64,
2330
+ "maxLength": 640
2331
+ },
2332
+ "description": {
2333
+ "type": "string",
2334
+ "description": "Free-form profile description text.",
2335
+ "maxGraphemes": 256,
2336
+ "maxLength": 2560
2337
+ },
2338
+ "pronouns": {
2339
+ "type": "string",
2340
+ "description": "Free-form pronouns text.",
2341
+ "maxGraphemes": 20,
2342
+ "maxLength": 200
2343
+ },
2344
+ "website": {
2345
+ "type": "string",
2346
+ "format": "uri"
2347
+ },
2348
+ "avatar": {
2349
+ "type": "blob",
2350
+ "description": "Small image to be displayed next to posts from account. AKA, 'profile picture'",
2351
+ "accept": ["image/png", "image/jpeg"],
2352
+ "maxSize": 1e6
2353
+ },
2354
+ "banner": {
2355
+ "type": "blob",
2356
+ "description": "Larger horizontal image to display behind profile view.",
2357
+ "accept": ["image/png", "image/jpeg"],
2358
+ "maxSize": 1e6
2359
+ },
2360
+ "labels": {
2361
+ "type": "union",
2362
+ "description": "Self-label values, specific to the Bluesky application, on the overall account.",
2363
+ "refs": ["com.atproto.label.defs#selfLabels"]
2364
+ },
2365
+ "joinedViaStarterPack": {
2366
+ "type": "ref",
2367
+ "ref": "com.atproto.repo.strongRef"
2368
+ },
2369
+ "pinnedPost": {
2370
+ "type": "ref",
2371
+ "ref": "com.atproto.repo.strongRef"
2372
+ },
2373
+ "createdAt": {
2374
+ "type": "string",
2375
+ "format": "datetime"
2376
+ }
2377
+ }
2378
+ }
2379
+ } };
2380
+ var app_bsky_actor_profile_default = {
2381
+ lexicon: lexicon$20,
2382
+ id: id$20,
2383
+ defs: defs$20
2384
+ };
2385
+
2386
+ //#endregion
2387
+ //#region src/lexicons/app.bsky.embed.defs.json
2388
+ var app_bsky_embed_defs_exports = /* @__PURE__ */ __exportAll({
2389
+ default: () => app_bsky_embed_defs_default,
2390
+ defs: () => defs$19,
2391
+ id: () => id$19,
2392
+ lexicon: () => lexicon$19
2393
+ });
2394
+ var lexicon$19 = 1;
2395
+ var id$19 = "app.bsky.embed.defs";
2396
+ var defs$19 = { "aspectRatio": {
2397
+ "type": "object",
2398
+ "description": "width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.",
2399
+ "required": ["width", "height"],
2400
+ "properties": {
2401
+ "width": {
2402
+ "type": "integer",
2403
+ "minimum": 1
2404
+ },
2405
+ "height": {
2406
+ "type": "integer",
2407
+ "minimum": 1
2408
+ }
2409
+ }
2410
+ } };
2411
+ var app_bsky_embed_defs_default = {
2412
+ lexicon: lexicon$19,
2413
+ id: id$19,
2414
+ defs: defs$19
2415
+ };
2416
+
2417
+ //#endregion
2418
+ //#region src/lexicons/app.bsky.embed.external.json
2419
+ var app_bsky_embed_external_exports = /* @__PURE__ */ __exportAll({
2420
+ default: () => app_bsky_embed_external_default,
2421
+ defs: () => defs$18,
2422
+ id: () => id$18,
2423
+ lexicon: () => lexicon$18
2424
+ });
2425
+ var lexicon$18 = 1;
2426
+ var id$18 = "app.bsky.embed.external";
2427
+ var defs$18 = {
2428
+ "main": {
2429
+ "type": "object",
2430
+ "description": "A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post).",
2431
+ "required": ["external"],
2432
+ "properties": { "external": {
2433
+ "type": "ref",
2434
+ "ref": "#external"
2435
+ } }
2436
+ },
2437
+ "external": {
2438
+ "type": "object",
2439
+ "required": [
2440
+ "uri",
2441
+ "title",
2442
+ "description"
2443
+ ],
2444
+ "properties": {
2445
+ "uri": {
2446
+ "type": "string",
2447
+ "format": "uri"
2448
+ },
2449
+ "title": { "type": "string" },
2450
+ "description": { "type": "string" },
2451
+ "thumb": {
2452
+ "type": "blob",
2453
+ "accept": ["image/*"],
2454
+ "maxSize": 1e6
2455
+ }
2456
+ }
2457
+ },
2458
+ "view": {
2459
+ "type": "object",
2460
+ "required": ["external"],
2461
+ "properties": { "external": {
2462
+ "type": "ref",
2463
+ "ref": "#viewExternal"
2464
+ } }
2465
+ },
2466
+ "viewExternal": {
2467
+ "type": "object",
2468
+ "required": [
2469
+ "uri",
2470
+ "title",
2471
+ "description"
2472
+ ],
2473
+ "properties": {
2474
+ "uri": {
2475
+ "type": "string",
2476
+ "format": "uri"
2477
+ },
2478
+ "title": { "type": "string" },
2479
+ "description": { "type": "string" },
2480
+ "thumb": {
2481
+ "type": "string",
2482
+ "format": "uri"
2483
+ }
2484
+ }
2485
+ }
2486
+ };
2487
+ var app_bsky_embed_external_default = {
2488
+ lexicon: lexicon$18,
2489
+ id: id$18,
2490
+ defs: defs$18
2491
+ };
2492
+
2493
+ //#endregion
2494
+ //#region src/lexicons/app.bsky.embed.images.json
2495
+ var app_bsky_embed_images_exports = /* @__PURE__ */ __exportAll({
2496
+ default: () => app_bsky_embed_images_default,
2497
+ defs: () => defs$17,
2498
+ description: () => description$4,
2499
+ id: () => id$17,
2500
+ lexicon: () => lexicon$17
2501
+ });
2502
+ var lexicon$17 = 1;
2503
+ var id$17 = "app.bsky.embed.images";
2504
+ var description$4 = "A set of images embedded in a Bluesky record (eg, a post).";
2505
+ var defs$17 = {
2506
+ "main": {
2507
+ "type": "object",
2508
+ "required": ["images"],
2509
+ "properties": { "images": {
2510
+ "type": "array",
2511
+ "items": {
2512
+ "type": "ref",
2513
+ "ref": "#image"
2514
+ },
2515
+ "maxLength": 4
2516
+ } }
2517
+ },
2518
+ "image": {
2519
+ "type": "object",
2520
+ "required": ["image", "alt"],
2521
+ "properties": {
2522
+ "image": {
2523
+ "type": "blob",
2524
+ "accept": ["image/*"],
2525
+ "maxSize": 1e6
2526
+ },
2527
+ "alt": {
2528
+ "type": "string",
2529
+ "description": "Alt text description of the image, for accessibility."
2530
+ },
2531
+ "aspectRatio": {
2532
+ "type": "ref",
2533
+ "ref": "app.bsky.embed.defs#aspectRatio"
2534
+ }
2535
+ }
2536
+ },
2537
+ "view": {
2538
+ "type": "object",
2539
+ "required": ["images"],
2540
+ "properties": { "images": {
2541
+ "type": "array",
2542
+ "items": {
2543
+ "type": "ref",
2544
+ "ref": "#viewImage"
2545
+ },
2546
+ "maxLength": 4
2547
+ } }
2548
+ },
2549
+ "viewImage": {
2550
+ "type": "object",
2551
+ "required": [
2552
+ "thumb",
2553
+ "fullsize",
2554
+ "alt"
2555
+ ],
2556
+ "properties": {
2557
+ "thumb": {
2558
+ "type": "string",
2559
+ "format": "uri",
2560
+ "description": "Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View."
2561
+ },
2562
+ "fullsize": {
2563
+ "type": "string",
2564
+ "format": "uri",
2565
+ "description": "Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View."
2566
+ },
2567
+ "alt": {
2568
+ "type": "string",
2569
+ "description": "Alt text description of the image, for accessibility."
2570
+ },
2571
+ "aspectRatio": {
2572
+ "type": "ref",
2573
+ "ref": "app.bsky.embed.defs#aspectRatio"
2574
+ }
2575
+ }
2576
+ }
2577
+ };
2578
+ var app_bsky_embed_images_default = {
2579
+ lexicon: lexicon$17,
2580
+ id: id$17,
2581
+ description: description$4,
2582
+ defs: defs$17
2583
+ };
2584
+
2585
+ //#endregion
2586
+ //#region src/lexicons/app.bsky.embed.record.json
2587
+ var app_bsky_embed_record_exports = /* @__PURE__ */ __exportAll({
2588
+ default: () => app_bsky_embed_record_default,
2589
+ defs: () => defs$16,
2590
+ description: () => description$3,
2591
+ id: () => id$16,
2592
+ lexicon: () => lexicon$16
2593
+ });
2594
+ var lexicon$16 = 1;
2595
+ var id$16 = "app.bsky.embed.record";
2596
+ var description$3 = "A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record.";
2597
+ var defs$16 = {
2598
+ "main": {
2599
+ "type": "object",
2600
+ "required": ["record"],
2601
+ "properties": { "record": {
2602
+ "type": "ref",
2603
+ "ref": "com.atproto.repo.strongRef"
2604
+ } }
2605
+ },
2606
+ "view": {
2607
+ "type": "object",
2608
+ "required": ["record"],
2609
+ "properties": { "record": {
2610
+ "type": "union",
2611
+ "refs": [
2612
+ "#viewRecord",
2613
+ "#viewNotFound",
2614
+ "#viewBlocked",
2615
+ "#viewDetached",
2616
+ "app.bsky.feed.defs#generatorView",
2617
+ "app.bsky.graph.defs#listView",
2618
+ "app.bsky.labeler.defs#labelerView",
2619
+ "app.bsky.graph.defs#starterPackViewBasic"
2620
+ ]
2621
+ } }
2622
+ },
2623
+ "viewRecord": {
2624
+ "type": "object",
2625
+ "required": [
2626
+ "uri",
2627
+ "cid",
2628
+ "author",
2629
+ "value",
2630
+ "indexedAt"
2631
+ ],
2632
+ "properties": {
2633
+ "uri": {
2634
+ "type": "string",
2635
+ "format": "at-uri"
2636
+ },
2637
+ "cid": {
2638
+ "type": "string",
2639
+ "format": "cid"
2640
+ },
2641
+ "author": {
2642
+ "type": "ref",
2643
+ "ref": "app.bsky.actor.defs#profileViewBasic"
2644
+ },
2645
+ "value": {
2646
+ "type": "unknown",
2647
+ "description": "The record data itself."
2648
+ },
2649
+ "labels": {
2650
+ "type": "array",
2651
+ "items": {
2652
+ "type": "ref",
2653
+ "ref": "com.atproto.label.defs#label"
2654
+ }
2655
+ },
2656
+ "replyCount": { "type": "integer" },
2657
+ "repostCount": { "type": "integer" },
2658
+ "likeCount": { "type": "integer" },
2659
+ "quoteCount": { "type": "integer" },
2660
+ "embeds": {
2661
+ "type": "array",
2662
+ "items": {
2663
+ "type": "union",
2664
+ "refs": [
2665
+ "app.bsky.embed.images#view",
2666
+ "app.bsky.embed.video#view",
2667
+ "app.bsky.embed.external#view",
2668
+ "app.bsky.embed.record#view",
2669
+ "app.bsky.embed.recordWithMedia#view"
2670
+ ]
2671
+ }
2672
+ },
2673
+ "indexedAt": {
2674
+ "type": "string",
2675
+ "format": "datetime"
2676
+ }
2677
+ }
2678
+ },
2679
+ "viewNotFound": {
2680
+ "type": "object",
2681
+ "required": ["uri", "notFound"],
2682
+ "properties": {
2683
+ "uri": {
2684
+ "type": "string",
2685
+ "format": "at-uri"
2686
+ },
2687
+ "notFound": {
2688
+ "type": "boolean",
2689
+ "const": true
2690
+ }
2691
+ }
2692
+ },
2693
+ "viewBlocked": {
2694
+ "type": "object",
2695
+ "required": [
2696
+ "uri",
2697
+ "blocked",
2698
+ "author"
2699
+ ],
2700
+ "properties": {
2701
+ "uri": {
2702
+ "type": "string",
2703
+ "format": "at-uri"
2704
+ },
2705
+ "blocked": {
2706
+ "type": "boolean",
2707
+ "const": true
2708
+ },
2709
+ "author": {
2710
+ "type": "ref",
2711
+ "ref": "app.bsky.feed.defs#blockedAuthor"
2712
+ }
2713
+ }
2714
+ },
2715
+ "viewDetached": {
2716
+ "type": "object",
2717
+ "required": ["uri", "detached"],
2718
+ "properties": {
2719
+ "uri": {
2720
+ "type": "string",
2721
+ "format": "at-uri"
2722
+ },
2723
+ "detached": {
2724
+ "type": "boolean",
2725
+ "const": true
2726
+ }
2727
+ }
2728
+ }
2729
+ };
2730
+ var app_bsky_embed_record_default = {
2731
+ lexicon: lexicon$16,
2732
+ id: id$16,
2733
+ description: description$3,
2734
+ defs: defs$16
2735
+ };
2736
+
2737
+ //#endregion
2738
+ //#region src/lexicons/app.bsky.embed.recordWithMedia.json
2739
+ var app_bsky_embed_recordWithMedia_exports = /* @__PURE__ */ __exportAll({
2740
+ default: () => app_bsky_embed_recordWithMedia_default,
2741
+ defs: () => defs$15,
2742
+ description: () => description$2,
2743
+ id: () => id$15,
2744
+ lexicon: () => lexicon$15
2745
+ });
2746
+ var lexicon$15 = 1;
2747
+ var id$15 = "app.bsky.embed.recordWithMedia";
2748
+ var description$2 = "A representation of a record embedded in a Bluesky record (eg, a post), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card.";
2749
+ var defs$15 = {
2750
+ "main": {
2751
+ "type": "object",
2752
+ "required": ["record", "media"],
2753
+ "properties": {
2754
+ "record": {
2755
+ "type": "ref",
2756
+ "ref": "app.bsky.embed.record"
2757
+ },
2758
+ "media": {
2759
+ "type": "union",
2760
+ "refs": [
2761
+ "app.bsky.embed.images",
2762
+ "app.bsky.embed.video",
2763
+ "app.bsky.embed.external"
2764
+ ]
2765
+ }
2766
+ }
2767
+ },
2768
+ "view": {
2769
+ "type": "object",
2770
+ "required": ["record", "media"],
2771
+ "properties": {
2772
+ "record": {
2773
+ "type": "ref",
2774
+ "ref": "app.bsky.embed.record#view"
2775
+ },
2776
+ "media": {
2777
+ "type": "union",
2778
+ "refs": [
2779
+ "app.bsky.embed.images#view",
2780
+ "app.bsky.embed.video#view",
2781
+ "app.bsky.embed.external#view"
2782
+ ]
2783
+ }
2784
+ }
2785
+ }
2786
+ };
2787
+ var app_bsky_embed_recordWithMedia_default = {
2788
+ lexicon: lexicon$15,
2789
+ id: id$15,
2790
+ description: description$2,
2791
+ defs: defs$15
2792
+ };
2793
+
2794
+ //#endregion
2795
+ //#region src/lexicons/app.bsky.embed.video.json
2796
+ var app_bsky_embed_video_exports = /* @__PURE__ */ __exportAll({
2797
+ default: () => app_bsky_embed_video_default,
2798
+ defs: () => defs$14,
2799
+ description: () => description$1,
2800
+ id: () => id$14,
2801
+ lexicon: () => lexicon$14
2802
+ });
2803
+ var lexicon$14 = 1;
2804
+ var id$14 = "app.bsky.embed.video";
2805
+ var description$1 = "A video embedded in a Bluesky record (eg, a post).";
2806
+ var defs$14 = {
2807
+ "main": {
2808
+ "type": "object",
2809
+ "required": ["video"],
2810
+ "properties": {
2811
+ "video": {
2812
+ "type": "blob",
2813
+ "description": "The mp4 video file. May be up to 100mb, formerly limited to 50mb.",
2814
+ "accept": ["video/mp4"],
2815
+ "maxSize": 1e8
2816
+ },
2817
+ "captions": {
2818
+ "type": "array",
2819
+ "items": {
2820
+ "type": "ref",
2821
+ "ref": "#caption"
2822
+ },
2823
+ "maxLength": 20
2824
+ },
2825
+ "alt": {
2826
+ "type": "string",
2827
+ "description": "Alt text description of the video, for accessibility.",
2828
+ "maxGraphemes": 1e3,
2829
+ "maxLength": 1e4
2830
+ },
2831
+ "aspectRatio": {
2832
+ "type": "ref",
2833
+ "ref": "app.bsky.embed.defs#aspectRatio"
2834
+ }
2835
+ }
2836
+ },
2837
+ "caption": {
2838
+ "type": "object",
2839
+ "required": ["lang", "file"],
2840
+ "properties": {
2841
+ "lang": {
2842
+ "type": "string",
2843
+ "format": "language"
2844
+ },
2845
+ "file": {
2846
+ "type": "blob",
2847
+ "accept": ["text/vtt"],
2848
+ "maxSize": 2e4
2849
+ }
2850
+ }
2851
+ },
2852
+ "view": {
2853
+ "type": "object",
2854
+ "required": ["cid", "playlist"],
2855
+ "properties": {
2856
+ "cid": {
2857
+ "type": "string",
2858
+ "format": "cid"
2859
+ },
2860
+ "playlist": {
2861
+ "type": "string",
2862
+ "format": "uri"
2863
+ },
2864
+ "thumbnail": {
2865
+ "type": "string",
2866
+ "format": "uri"
2867
+ },
2868
+ "alt": {
2869
+ "type": "string",
2870
+ "maxGraphemes": 1e3,
2871
+ "maxLength": 1e4
2872
+ },
2873
+ "aspectRatio": {
2874
+ "type": "ref",
2875
+ "ref": "app.bsky.embed.defs#aspectRatio"
2876
+ }
2877
+ }
2878
+ }
2879
+ };
2880
+ var app_bsky_embed_video_default = {
2881
+ lexicon: lexicon$14,
2882
+ id: id$14,
2883
+ description: description$1,
2884
+ defs: defs$14
2885
+ };
2886
+
2887
+ //#endregion
2888
+ //#region src/lexicons/app.bsky.feed.defs.json
2889
+ var app_bsky_feed_defs_exports = /* @__PURE__ */ __exportAll({
2890
+ default: () => app_bsky_feed_defs_default,
2891
+ defs: () => defs$13,
2892
+ id: () => id$13,
2893
+ lexicon: () => lexicon$13
2894
+ });
2895
+ var lexicon$13 = 1;
2896
+ var id$13 = "app.bsky.feed.defs";
2897
+ var defs$13 = {
2898
+ "postView": {
2899
+ "type": "object",
2900
+ "required": [
2901
+ "uri",
2902
+ "cid",
2903
+ "author",
2904
+ "record",
2905
+ "indexedAt"
2906
+ ],
2907
+ "properties": {
2908
+ "uri": {
2909
+ "type": "string",
2910
+ "format": "at-uri"
2911
+ },
2912
+ "cid": {
2913
+ "type": "string",
2914
+ "format": "cid"
2915
+ },
2916
+ "author": {
2917
+ "type": "ref",
2918
+ "ref": "app.bsky.actor.defs#profileViewBasic"
2919
+ },
2920
+ "record": { "type": "unknown" },
2921
+ "embed": {
2922
+ "type": "union",
2923
+ "refs": [
2924
+ "app.bsky.embed.images#view",
2925
+ "app.bsky.embed.video#view",
2926
+ "app.bsky.embed.external#view",
2927
+ "app.bsky.embed.record#view",
2928
+ "app.bsky.embed.recordWithMedia#view"
2929
+ ]
2930
+ },
2931
+ "bookmarkCount": { "type": "integer" },
2932
+ "replyCount": { "type": "integer" },
2933
+ "repostCount": { "type": "integer" },
2934
+ "likeCount": { "type": "integer" },
2935
+ "quoteCount": { "type": "integer" },
2936
+ "indexedAt": {
2937
+ "type": "string",
2938
+ "format": "datetime"
2939
+ },
2940
+ "viewer": {
2941
+ "type": "ref",
2942
+ "ref": "#viewerState"
2943
+ },
2944
+ "labels": {
2945
+ "type": "array",
2946
+ "items": {
2947
+ "type": "ref",
2948
+ "ref": "com.atproto.label.defs#label"
2949
+ }
2950
+ },
2951
+ "threadgate": {
2952
+ "type": "ref",
2953
+ "ref": "#threadgateView"
2954
+ },
2955
+ "debug": {
2956
+ "type": "unknown",
2957
+ "description": "Debug information for internal development"
2958
+ }
2959
+ }
2960
+ },
2961
+ "viewerState": {
2962
+ "type": "object",
2963
+ "description": "Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.",
2964
+ "properties": {
2965
+ "repost": {
2966
+ "type": "string",
2967
+ "format": "at-uri"
2968
+ },
2969
+ "like": {
2970
+ "type": "string",
2971
+ "format": "at-uri"
2972
+ },
2973
+ "bookmarked": { "type": "boolean" },
2974
+ "threadMuted": { "type": "boolean" },
2975
+ "replyDisabled": { "type": "boolean" },
2976
+ "embeddingDisabled": { "type": "boolean" },
2977
+ "pinned": { "type": "boolean" }
2978
+ }
2979
+ },
2980
+ "threadContext": {
2981
+ "type": "object",
2982
+ "description": "Metadata about this post within the context of the thread it is in.",
2983
+ "properties": { "rootAuthorLike": {
2984
+ "type": "string",
2985
+ "format": "at-uri"
2986
+ } }
2987
+ },
2988
+ "feedViewPost": {
2989
+ "type": "object",
2990
+ "required": ["post"],
2991
+ "properties": {
2992
+ "post": {
2993
+ "type": "ref",
2994
+ "ref": "#postView"
2995
+ },
2996
+ "reply": {
2997
+ "type": "ref",
2998
+ "ref": "#replyRef"
2999
+ },
3000
+ "reason": {
3001
+ "type": "union",
3002
+ "refs": ["#reasonRepost", "#reasonPin"]
3003
+ },
3004
+ "feedContext": {
3005
+ "type": "string",
3006
+ "description": "Context provided by feed generator that may be passed back alongside interactions.",
3007
+ "maxLength": 2e3
3008
+ },
3009
+ "reqId": {
3010
+ "type": "string",
3011
+ "description": "Unique identifier per request that may be passed back alongside interactions.",
3012
+ "maxLength": 100
3013
+ }
3014
+ }
3015
+ },
3016
+ "replyRef": {
3017
+ "type": "object",
3018
+ "required": ["root", "parent"],
3019
+ "properties": {
3020
+ "root": {
3021
+ "type": "union",
3022
+ "refs": [
3023
+ "#postView",
3024
+ "#notFoundPost",
3025
+ "#blockedPost"
3026
+ ]
3027
+ },
3028
+ "parent": {
3029
+ "type": "union",
3030
+ "refs": [
3031
+ "#postView",
3032
+ "#notFoundPost",
3033
+ "#blockedPost"
3034
+ ]
3035
+ },
3036
+ "grandparentAuthor": {
3037
+ "type": "ref",
3038
+ "ref": "app.bsky.actor.defs#profileViewBasic",
3039
+ "description": "When parent is a reply to another post, this is the author of that post."
3040
+ }
3041
+ }
3042
+ },
3043
+ "reasonRepost": {
3044
+ "type": "object",
3045
+ "required": ["by", "indexedAt"],
3046
+ "properties": {
3047
+ "by": {
3048
+ "type": "ref",
3049
+ "ref": "app.bsky.actor.defs#profileViewBasic"
3050
+ },
3051
+ "uri": {
3052
+ "type": "string",
3053
+ "format": "at-uri"
3054
+ },
3055
+ "cid": {
3056
+ "type": "string",
3057
+ "format": "cid"
3058
+ },
3059
+ "indexedAt": {
3060
+ "type": "string",
3061
+ "format": "datetime"
3062
+ }
3063
+ }
3064
+ },
3065
+ "reasonPin": {
3066
+ "type": "object",
3067
+ "properties": {}
3068
+ },
3069
+ "threadViewPost": {
3070
+ "type": "object",
3071
+ "required": ["post"],
3072
+ "properties": {
3073
+ "post": {
3074
+ "type": "ref",
3075
+ "ref": "#postView"
3076
+ },
3077
+ "parent": {
3078
+ "type": "union",
3079
+ "refs": [
3080
+ "#threadViewPost",
3081
+ "#notFoundPost",
3082
+ "#blockedPost"
3083
+ ]
3084
+ },
3085
+ "replies": {
3086
+ "type": "array",
3087
+ "items": {
3088
+ "type": "union",
3089
+ "refs": [
3090
+ "#threadViewPost",
3091
+ "#notFoundPost",
3092
+ "#blockedPost"
3093
+ ]
3094
+ }
3095
+ },
3096
+ "threadContext": {
3097
+ "type": "ref",
3098
+ "ref": "#threadContext"
3099
+ }
3100
+ }
3101
+ },
3102
+ "notFoundPost": {
3103
+ "type": "object",
3104
+ "required": ["uri", "notFound"],
3105
+ "properties": {
3106
+ "uri": {
3107
+ "type": "string",
3108
+ "format": "at-uri"
3109
+ },
3110
+ "notFound": {
3111
+ "type": "boolean",
3112
+ "const": true
3113
+ }
3114
+ }
3115
+ },
3116
+ "blockedPost": {
3117
+ "type": "object",
3118
+ "required": [
3119
+ "uri",
3120
+ "blocked",
3121
+ "author"
3122
+ ],
3123
+ "properties": {
3124
+ "uri": {
3125
+ "type": "string",
3126
+ "format": "at-uri"
3127
+ },
3128
+ "blocked": {
3129
+ "type": "boolean",
3130
+ "const": true
3131
+ },
3132
+ "author": {
3133
+ "type": "ref",
3134
+ "ref": "#blockedAuthor"
3135
+ }
3136
+ }
3137
+ },
3138
+ "blockedAuthor": {
3139
+ "type": "object",
3140
+ "required": ["did"],
3141
+ "properties": {
3142
+ "did": {
3143
+ "type": "string",
3144
+ "format": "did"
3145
+ },
3146
+ "viewer": {
3147
+ "type": "ref",
3148
+ "ref": "app.bsky.actor.defs#viewerState"
3149
+ }
3150
+ }
3151
+ },
3152
+ "generatorView": {
3153
+ "type": "object",
3154
+ "required": [
3155
+ "uri",
3156
+ "cid",
3157
+ "did",
3158
+ "creator",
3159
+ "displayName",
3160
+ "indexedAt"
3161
+ ],
3162
+ "properties": {
3163
+ "uri": {
3164
+ "type": "string",
3165
+ "format": "at-uri"
3166
+ },
3167
+ "cid": {
3168
+ "type": "string",
3169
+ "format": "cid"
3170
+ },
3171
+ "did": {
3172
+ "type": "string",
3173
+ "format": "did"
3174
+ },
3175
+ "creator": {
3176
+ "type": "ref",
3177
+ "ref": "app.bsky.actor.defs#profileView"
3178
+ },
3179
+ "displayName": { "type": "string" },
3180
+ "description": {
3181
+ "type": "string",
3182
+ "maxGraphemes": 300,
3183
+ "maxLength": 3e3
3184
+ },
3185
+ "descriptionFacets": {
3186
+ "type": "array",
3187
+ "items": {
3188
+ "type": "ref",
3189
+ "ref": "app.bsky.richtext.facet"
3190
+ }
3191
+ },
3192
+ "avatar": {
3193
+ "type": "string",
3194
+ "format": "uri"
3195
+ },
3196
+ "likeCount": {
3197
+ "type": "integer",
3198
+ "minimum": 0
3199
+ },
3200
+ "acceptsInteractions": { "type": "boolean" },
3201
+ "labels": {
3202
+ "type": "array",
3203
+ "items": {
3204
+ "type": "ref",
3205
+ "ref": "com.atproto.label.defs#label"
3206
+ }
3207
+ },
3208
+ "viewer": {
3209
+ "type": "ref",
3210
+ "ref": "#generatorViewerState"
3211
+ },
3212
+ "contentMode": {
3213
+ "type": "string",
3214
+ "knownValues": ["app.bsky.feed.defs#contentModeUnspecified", "app.bsky.feed.defs#contentModeVideo"]
3215
+ },
3216
+ "indexedAt": {
3217
+ "type": "string",
3218
+ "format": "datetime"
3219
+ }
3220
+ }
3221
+ },
3222
+ "generatorViewerState": {
3223
+ "type": "object",
3224
+ "properties": { "like": {
3225
+ "type": "string",
3226
+ "format": "at-uri"
3227
+ } }
3228
+ },
3229
+ "skeletonFeedPost": {
3230
+ "type": "object",
3231
+ "required": ["post"],
3232
+ "properties": {
3233
+ "post": {
3234
+ "type": "string",
3235
+ "format": "at-uri"
3236
+ },
3237
+ "reason": {
3238
+ "type": "union",
3239
+ "refs": ["#skeletonReasonRepost", "#skeletonReasonPin"]
3240
+ },
3241
+ "feedContext": {
3242
+ "type": "string",
3243
+ "description": "Context that will be passed through to client and may be passed to feed generator back alongside interactions.",
3244
+ "maxLength": 2e3
3245
+ }
3246
+ }
3247
+ },
3248
+ "skeletonReasonRepost": {
3249
+ "type": "object",
3250
+ "required": ["repost"],
3251
+ "properties": { "repost": {
3252
+ "type": "string",
3253
+ "format": "at-uri"
3254
+ } }
3255
+ },
3256
+ "skeletonReasonPin": {
3257
+ "type": "object",
3258
+ "properties": {}
3259
+ },
3260
+ "threadgateView": {
3261
+ "type": "object",
3262
+ "properties": {
3263
+ "uri": {
3264
+ "type": "string",
3265
+ "format": "at-uri"
3266
+ },
3267
+ "cid": {
3268
+ "type": "string",
3269
+ "format": "cid"
3270
+ },
3271
+ "record": { "type": "unknown" },
3272
+ "lists": {
3273
+ "type": "array",
3274
+ "items": {
3275
+ "type": "ref",
3276
+ "ref": "app.bsky.graph.defs#listViewBasic"
3277
+ }
3278
+ }
3279
+ }
3280
+ },
3281
+ "interaction": {
3282
+ "type": "object",
3283
+ "properties": {
3284
+ "item": {
3285
+ "type": "string",
3286
+ "format": "at-uri"
3287
+ },
3288
+ "event": {
3289
+ "type": "string",
3290
+ "knownValues": [
3291
+ "app.bsky.feed.defs#requestLess",
3292
+ "app.bsky.feed.defs#requestMore",
3293
+ "app.bsky.feed.defs#clickthroughItem",
3294
+ "app.bsky.feed.defs#clickthroughAuthor",
3295
+ "app.bsky.feed.defs#clickthroughReposter",
3296
+ "app.bsky.feed.defs#clickthroughEmbed",
3297
+ "app.bsky.feed.defs#interactionSeen",
3298
+ "app.bsky.feed.defs#interactionLike",
3299
+ "app.bsky.feed.defs#interactionRepost",
3300
+ "app.bsky.feed.defs#interactionReply",
3301
+ "app.bsky.feed.defs#interactionQuote",
3302
+ "app.bsky.feed.defs#interactionShare"
3303
+ ]
3304
+ },
3305
+ "feedContext": {
3306
+ "type": "string",
3307
+ "description": "Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.",
3308
+ "maxLength": 2e3
3309
+ },
3310
+ "reqId": {
3311
+ "type": "string",
3312
+ "description": "Unique identifier per request that may be passed back alongside interactions.",
3313
+ "maxLength": 100
3314
+ }
1630
3315
  }
3316
+ },
3317
+ "requestLess": {
3318
+ "type": "token",
3319
+ "description": "Request that less content like the given feed item be shown in the feed"
3320
+ },
3321
+ "requestMore": {
3322
+ "type": "token",
3323
+ "description": "Request that more content like the given feed item be shown in the feed"
3324
+ },
3325
+ "clickthroughItem": {
3326
+ "type": "token",
3327
+ "description": "User clicked through to the feed item"
3328
+ },
3329
+ "clickthroughAuthor": {
3330
+ "type": "token",
3331
+ "description": "User clicked through to the author of the feed item"
3332
+ },
3333
+ "clickthroughReposter": {
3334
+ "type": "token",
3335
+ "description": "User clicked through to the reposter of the feed item"
3336
+ },
3337
+ "clickthroughEmbed": {
3338
+ "type": "token",
3339
+ "description": "User clicked through to the embedded content of the feed item"
3340
+ },
3341
+ "contentModeUnspecified": {
3342
+ "type": "token",
3343
+ "description": "Declares the feed generator returns any types of posts."
3344
+ },
3345
+ "contentModeVideo": {
3346
+ "type": "token",
3347
+ "description": "Declares the feed generator returns posts containing app.bsky.embed.video embeds."
3348
+ },
3349
+ "interactionSeen": {
3350
+ "type": "token",
3351
+ "description": "Feed item was seen by user"
3352
+ },
3353
+ "interactionLike": {
3354
+ "type": "token",
3355
+ "description": "User liked the feed item"
3356
+ },
3357
+ "interactionRepost": {
3358
+ "type": "token",
3359
+ "description": "User reposted the feed item"
3360
+ },
3361
+ "interactionReply": {
3362
+ "type": "token",
3363
+ "description": "User replied to the feed item"
3364
+ },
3365
+ "interactionQuote": {
3366
+ "type": "token",
3367
+ "description": "User quoted the feed item"
3368
+ },
3369
+ "interactionShare": {
3370
+ "type": "token",
3371
+ "description": "User shared the feed item"
1631
3372
  }
1632
3373
  };
1633
- var app_bsky_embed_recordWithMedia_default = {
1634
- lexicon: lexicon$11,
1635
- id: id$11,
1636
- description: description$1,
1637
- defs: defs$11
3374
+ var app_bsky_feed_defs_default = {
3375
+ lexicon: lexicon$13,
3376
+ id: id$13,
3377
+ defs: defs$13
1638
3378
  };
1639
3379
 
1640
3380
  //#endregion
1641
3381
  //#region src/lexicons/app.bsky.feed.like.json
1642
3382
  var app_bsky_feed_like_exports = /* @__PURE__ */ __exportAll({
1643
3383
  default: () => app_bsky_feed_like_default,
1644
- defs: () => defs$10,
1645
- id: () => id$10,
1646
- lexicon: () => lexicon$10
3384
+ defs: () => defs$12,
3385
+ id: () => id$12,
3386
+ lexicon: () => lexicon$12
1647
3387
  });
1648
- var lexicon$10 = 1;
1649
- var id$10 = "app.bsky.feed.like";
1650
- var defs$10 = { "main": {
3388
+ var lexicon$12 = 1;
3389
+ var id$12 = "app.bsky.feed.like";
3390
+ var defs$12 = { "main": {
1651
3391
  "type": "record",
1652
3392
  "description": "Record declaring a 'like' of a piece of subject content.",
1653
3393
  "key": "tid",
@@ -1671,22 +3411,22 @@ var defs$10 = { "main": {
1671
3411
  }
1672
3412
  } };
1673
3413
  var app_bsky_feed_like_default = {
1674
- lexicon: lexicon$10,
1675
- id: id$10,
1676
- defs: defs$10
3414
+ lexicon: lexicon$12,
3415
+ id: id$12,
3416
+ defs: defs$12
1677
3417
  };
1678
3418
 
1679
3419
  //#endregion
1680
3420
  //#region src/lexicons/app.bsky.feed.post.json
1681
3421
  var app_bsky_feed_post_exports = /* @__PURE__ */ __exportAll({
1682
3422
  default: () => app_bsky_feed_post_default,
1683
- defs: () => defs$9,
1684
- id: () => id$9,
1685
- lexicon: () => lexicon$9
3423
+ defs: () => defs$11,
3424
+ id: () => id$11,
3425
+ lexicon: () => lexicon$11
1686
3426
  });
1687
- var lexicon$9 = 1;
1688
- var id$9 = "app.bsky.feed.post";
1689
- var defs$9 = {
3427
+ var lexicon$11 = 1;
3428
+ var id$11 = "app.bsky.feed.post";
3429
+ var defs$11 = {
1690
3430
  "main": {
1691
3431
  "type": "record",
1692
3432
  "description": "Record containing a Bluesky post.",
@@ -1814,182 +3554,532 @@ var defs$9 = {
1814
3554
  }
1815
3555
  };
1816
3556
  var app_bsky_feed_post_default = {
3557
+ lexicon: lexicon$11,
3558
+ id: id$11,
3559
+ defs: defs$11
3560
+ };
3561
+
3562
+ //#endregion
3563
+ //#region src/lexicons/app.bsky.feed.repost.json
3564
+ var app_bsky_feed_repost_exports = /* @__PURE__ */ __exportAll({
3565
+ default: () => app_bsky_feed_repost_default,
3566
+ defs: () => defs$10,
3567
+ id: () => id$10,
3568
+ lexicon: () => lexicon$10
3569
+ });
3570
+ var lexicon$10 = 1;
3571
+ var id$10 = "app.bsky.feed.repost";
3572
+ var defs$10 = { "main": {
3573
+ "description": "Record representing a 'repost' of an existing Bluesky post.",
3574
+ "type": "record",
3575
+ "key": "tid",
3576
+ "record": {
3577
+ "type": "object",
3578
+ "required": ["subject", "createdAt"],
3579
+ "properties": {
3580
+ "subject": {
3581
+ "type": "ref",
3582
+ "ref": "com.atproto.repo.strongRef"
3583
+ },
3584
+ "createdAt": {
3585
+ "type": "string",
3586
+ "format": "datetime"
3587
+ },
3588
+ "via": {
3589
+ "type": "ref",
3590
+ "ref": "com.atproto.repo.strongRef"
3591
+ }
3592
+ }
3593
+ }
3594
+ } };
3595
+ var app_bsky_feed_repost_default = {
3596
+ lexicon: lexicon$10,
3597
+ id: id$10,
3598
+ defs: defs$10
3599
+ };
3600
+
3601
+ //#endregion
3602
+ //#region src/lexicons/app.bsky.feed.threadgate.json
3603
+ var app_bsky_feed_threadgate_exports = /* @__PURE__ */ __exportAll({
3604
+ default: () => app_bsky_feed_threadgate_default,
3605
+ defs: () => defs$9,
3606
+ id: () => id$9,
3607
+ lexicon: () => lexicon$9
3608
+ });
3609
+ var lexicon$9 = 1;
3610
+ var id$9 = "app.bsky.feed.threadgate";
3611
+ var defs$9 = {
3612
+ "main": {
3613
+ "type": "record",
3614
+ "key": "tid",
3615
+ "description": "Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository.",
3616
+ "record": {
3617
+ "type": "object",
3618
+ "required": ["post", "createdAt"],
3619
+ "properties": {
3620
+ "post": {
3621
+ "type": "string",
3622
+ "format": "at-uri",
3623
+ "description": "Reference (AT-URI) to the post record."
3624
+ },
3625
+ "allow": {
3626
+ "description": "List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply.",
3627
+ "type": "array",
3628
+ "maxLength": 5,
3629
+ "items": {
3630
+ "type": "union",
3631
+ "refs": [
3632
+ "#mentionRule",
3633
+ "#followerRule",
3634
+ "#followingRule",
3635
+ "#listRule"
3636
+ ]
3637
+ }
3638
+ },
3639
+ "createdAt": {
3640
+ "type": "string",
3641
+ "format": "datetime"
3642
+ },
3643
+ "hiddenReplies": {
3644
+ "type": "array",
3645
+ "maxLength": 300,
3646
+ "items": {
3647
+ "type": "string",
3648
+ "format": "at-uri"
3649
+ },
3650
+ "description": "List of hidden reply URIs."
3651
+ }
3652
+ }
3653
+ }
3654
+ },
3655
+ "mentionRule": {
3656
+ "type": "object",
3657
+ "description": "Allow replies from actors mentioned in your post.",
3658
+ "properties": {}
3659
+ },
3660
+ "followerRule": {
3661
+ "type": "object",
3662
+ "description": "Allow replies from actors who follow you.",
3663
+ "properties": {}
3664
+ },
3665
+ "followingRule": {
3666
+ "type": "object",
3667
+ "description": "Allow replies from actors you follow.",
3668
+ "properties": {}
3669
+ },
3670
+ "listRule": {
3671
+ "type": "object",
3672
+ "description": "Allow replies from actors on a list.",
3673
+ "required": ["list"],
3674
+ "properties": { "list": {
3675
+ "type": "string",
3676
+ "format": "at-uri"
3677
+ } }
3678
+ }
3679
+ };
3680
+ var app_bsky_feed_threadgate_default = {
1817
3681
  lexicon: lexicon$9,
1818
3682
  id: id$9,
1819
3683
  defs: defs$9
1820
3684
  };
1821
3685
 
1822
3686
  //#endregion
1823
- //#region src/lexicons/app.bsky.feed.repost.json
1824
- var app_bsky_feed_repost_exports = /* @__PURE__ */ __exportAll({
1825
- default: () => app_bsky_feed_repost_default,
3687
+ //#region src/lexicons/app.bsky.graph.block.json
3688
+ var app_bsky_graph_block_exports = /* @__PURE__ */ __exportAll({
3689
+ default: () => app_bsky_graph_block_default,
1826
3690
  defs: () => defs$8,
1827
3691
  id: () => id$8,
1828
3692
  lexicon: () => lexicon$8
1829
3693
  });
1830
3694
  var lexicon$8 = 1;
1831
- var id$8 = "app.bsky.feed.repost";
3695
+ var id$8 = "app.bsky.graph.block";
1832
3696
  var defs$8 = { "main": {
1833
- "description": "Record representing a 'repost' of an existing Bluesky post.",
1834
3697
  "type": "record",
3698
+ "description": "Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details.",
1835
3699
  "key": "tid",
1836
3700
  "record": {
1837
3701
  "type": "object",
1838
3702
  "required": ["subject", "createdAt"],
1839
3703
  "properties": {
1840
3704
  "subject": {
1841
- "type": "ref",
1842
- "ref": "com.atproto.repo.strongRef"
3705
+ "type": "string",
3706
+ "format": "did",
3707
+ "description": "DID of the account to be blocked."
1843
3708
  },
1844
3709
  "createdAt": {
1845
3710
  "type": "string",
1846
3711
  "format": "datetime"
1847
- },
1848
- "via": {
1849
- "type": "ref",
1850
- "ref": "com.atproto.repo.strongRef"
1851
3712
  }
1852
3713
  }
1853
3714
  }
1854
3715
  } };
1855
- var app_bsky_feed_repost_default = {
3716
+ var app_bsky_graph_block_default = {
1856
3717
  lexicon: lexicon$8,
1857
3718
  id: id$8,
1858
3719
  defs: defs$8
1859
3720
  };
1860
3721
 
1861
3722
  //#endregion
1862
- //#region src/lexicons/app.bsky.feed.threadgate.json
1863
- var app_bsky_feed_threadgate_exports = /* @__PURE__ */ __exportAll({
1864
- default: () => app_bsky_feed_threadgate_default,
3723
+ //#region src/lexicons/app.bsky.graph.defs.json
3724
+ var app_bsky_graph_defs_exports = /* @__PURE__ */ __exportAll({
3725
+ default: () => app_bsky_graph_defs_default,
1865
3726
  defs: () => defs$7,
1866
3727
  id: () => id$7,
1867
3728
  lexicon: () => lexicon$7
1868
3729
  });
1869
3730
  var lexicon$7 = 1;
1870
- var id$7 = "app.bsky.feed.threadgate";
3731
+ var id$7 = "app.bsky.graph.defs";
1871
3732
  var defs$7 = {
1872
- "main": {
1873
- "type": "record",
1874
- "key": "tid",
1875
- "description": "Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository.",
1876
- "record": {
1877
- "type": "object",
1878
- "required": ["post", "createdAt"],
1879
- "properties": {
1880
- "post": {
1881
- "type": "string",
1882
- "format": "at-uri",
1883
- "description": "Reference (AT-URI) to the post record."
1884
- },
1885
- "allow": {
1886
- "description": "List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply.",
1887
- "type": "array",
1888
- "maxLength": 5,
1889
- "items": {
1890
- "type": "union",
1891
- "refs": [
1892
- "#mentionRule",
1893
- "#followerRule",
1894
- "#followingRule",
1895
- "#listRule"
1896
- ]
1897
- }
1898
- },
1899
- "createdAt": {
1900
- "type": "string",
1901
- "format": "datetime"
1902
- },
1903
- "hiddenReplies": {
1904
- "type": "array",
1905
- "maxLength": 300,
1906
- "items": {
1907
- "type": "string",
1908
- "format": "at-uri"
1909
- },
1910
- "description": "List of hidden reply URIs."
3733
+ "listViewBasic": {
3734
+ "type": "object",
3735
+ "required": [
3736
+ "uri",
3737
+ "cid",
3738
+ "name",
3739
+ "purpose"
3740
+ ],
3741
+ "properties": {
3742
+ "uri": {
3743
+ "type": "string",
3744
+ "format": "at-uri"
3745
+ },
3746
+ "cid": {
3747
+ "type": "string",
3748
+ "format": "cid"
3749
+ },
3750
+ "name": {
3751
+ "type": "string",
3752
+ "maxLength": 64,
3753
+ "minLength": 1
3754
+ },
3755
+ "purpose": {
3756
+ "type": "ref",
3757
+ "ref": "#listPurpose"
3758
+ },
3759
+ "avatar": {
3760
+ "type": "string",
3761
+ "format": "uri"
3762
+ },
3763
+ "listItemCount": {
3764
+ "type": "integer",
3765
+ "minimum": 0
3766
+ },
3767
+ "labels": {
3768
+ "type": "array",
3769
+ "items": {
3770
+ "type": "ref",
3771
+ "ref": "com.atproto.label.defs#label"
3772
+ }
3773
+ },
3774
+ "viewer": {
3775
+ "type": "ref",
3776
+ "ref": "#listViewerState"
3777
+ },
3778
+ "indexedAt": {
3779
+ "type": "string",
3780
+ "format": "datetime"
3781
+ }
3782
+ }
3783
+ },
3784
+ "listView": {
3785
+ "type": "object",
3786
+ "required": [
3787
+ "uri",
3788
+ "cid",
3789
+ "creator",
3790
+ "name",
3791
+ "purpose",
3792
+ "indexedAt"
3793
+ ],
3794
+ "properties": {
3795
+ "uri": {
3796
+ "type": "string",
3797
+ "format": "at-uri"
3798
+ },
3799
+ "cid": {
3800
+ "type": "string",
3801
+ "format": "cid"
3802
+ },
3803
+ "creator": {
3804
+ "type": "ref",
3805
+ "ref": "app.bsky.actor.defs#profileView"
3806
+ },
3807
+ "name": {
3808
+ "type": "string",
3809
+ "maxLength": 64,
3810
+ "minLength": 1
3811
+ },
3812
+ "purpose": {
3813
+ "type": "ref",
3814
+ "ref": "#listPurpose"
3815
+ },
3816
+ "description": {
3817
+ "type": "string",
3818
+ "maxGraphemes": 300,
3819
+ "maxLength": 3e3
3820
+ },
3821
+ "descriptionFacets": {
3822
+ "type": "array",
3823
+ "items": {
3824
+ "type": "ref",
3825
+ "ref": "app.bsky.richtext.facet"
3826
+ }
3827
+ },
3828
+ "avatar": {
3829
+ "type": "string",
3830
+ "format": "uri"
3831
+ },
3832
+ "listItemCount": {
3833
+ "type": "integer",
3834
+ "minimum": 0
3835
+ },
3836
+ "labels": {
3837
+ "type": "array",
3838
+ "items": {
3839
+ "type": "ref",
3840
+ "ref": "com.atproto.label.defs#label"
3841
+ }
3842
+ },
3843
+ "viewer": {
3844
+ "type": "ref",
3845
+ "ref": "#listViewerState"
3846
+ },
3847
+ "indexedAt": {
3848
+ "type": "string",
3849
+ "format": "datetime"
3850
+ }
3851
+ }
3852
+ },
3853
+ "listItemView": {
3854
+ "type": "object",
3855
+ "required": ["uri", "subject"],
3856
+ "properties": {
3857
+ "uri": {
3858
+ "type": "string",
3859
+ "format": "at-uri"
3860
+ },
3861
+ "subject": {
3862
+ "type": "ref",
3863
+ "ref": "app.bsky.actor.defs#profileView"
3864
+ }
3865
+ }
3866
+ },
3867
+ "starterPackView": {
3868
+ "type": "object",
3869
+ "required": [
3870
+ "uri",
3871
+ "cid",
3872
+ "record",
3873
+ "creator",
3874
+ "indexedAt"
3875
+ ],
3876
+ "properties": {
3877
+ "uri": {
3878
+ "type": "string",
3879
+ "format": "at-uri"
3880
+ },
3881
+ "cid": {
3882
+ "type": "string",
3883
+ "format": "cid"
3884
+ },
3885
+ "record": { "type": "unknown" },
3886
+ "creator": {
3887
+ "type": "ref",
3888
+ "ref": "app.bsky.actor.defs#profileViewBasic"
3889
+ },
3890
+ "list": {
3891
+ "type": "ref",
3892
+ "ref": "#listViewBasic"
3893
+ },
3894
+ "listItemsSample": {
3895
+ "type": "array",
3896
+ "maxLength": 12,
3897
+ "items": {
3898
+ "type": "ref",
3899
+ "ref": "#listItemView"
3900
+ }
3901
+ },
3902
+ "feeds": {
3903
+ "type": "array",
3904
+ "maxLength": 3,
3905
+ "items": {
3906
+ "type": "ref",
3907
+ "ref": "app.bsky.feed.defs#generatorView"
3908
+ }
3909
+ },
3910
+ "joinedWeekCount": {
3911
+ "type": "integer",
3912
+ "minimum": 0
3913
+ },
3914
+ "joinedAllTimeCount": {
3915
+ "type": "integer",
3916
+ "minimum": 0
3917
+ },
3918
+ "labels": {
3919
+ "type": "array",
3920
+ "items": {
3921
+ "type": "ref",
3922
+ "ref": "com.atproto.label.defs#label"
3923
+ }
3924
+ },
3925
+ "indexedAt": {
3926
+ "type": "string",
3927
+ "format": "datetime"
3928
+ }
3929
+ }
3930
+ },
3931
+ "starterPackViewBasic": {
3932
+ "type": "object",
3933
+ "required": [
3934
+ "uri",
3935
+ "cid",
3936
+ "record",
3937
+ "creator",
3938
+ "indexedAt"
3939
+ ],
3940
+ "properties": {
3941
+ "uri": {
3942
+ "type": "string",
3943
+ "format": "at-uri"
3944
+ },
3945
+ "cid": {
3946
+ "type": "string",
3947
+ "format": "cid"
3948
+ },
3949
+ "record": { "type": "unknown" },
3950
+ "creator": {
3951
+ "type": "ref",
3952
+ "ref": "app.bsky.actor.defs#profileViewBasic"
3953
+ },
3954
+ "listItemCount": {
3955
+ "type": "integer",
3956
+ "minimum": 0
3957
+ },
3958
+ "joinedWeekCount": {
3959
+ "type": "integer",
3960
+ "minimum": 0
3961
+ },
3962
+ "joinedAllTimeCount": {
3963
+ "type": "integer",
3964
+ "minimum": 0
3965
+ },
3966
+ "labels": {
3967
+ "type": "array",
3968
+ "items": {
3969
+ "type": "ref",
3970
+ "ref": "com.atproto.label.defs#label"
1911
3971
  }
3972
+ },
3973
+ "indexedAt": {
3974
+ "type": "string",
3975
+ "format": "datetime"
1912
3976
  }
1913
3977
  }
1914
3978
  },
1915
- "mentionRule": {
1916
- "type": "object",
1917
- "description": "Allow replies from actors mentioned in your post.",
1918
- "properties": {}
3979
+ "listPurpose": {
3980
+ "type": "string",
3981
+ "knownValues": [
3982
+ "app.bsky.graph.defs#modlist",
3983
+ "app.bsky.graph.defs#curatelist",
3984
+ "app.bsky.graph.defs#referencelist"
3985
+ ]
1919
3986
  },
1920
- "followerRule": {
1921
- "type": "object",
1922
- "description": "Allow replies from actors who follow you.",
1923
- "properties": {}
3987
+ "modlist": {
3988
+ "type": "token",
3989
+ "description": "A list of actors to apply an aggregate moderation action (mute/block) on."
1924
3990
  },
1925
- "followingRule": {
3991
+ "curatelist": {
3992
+ "type": "token",
3993
+ "description": "A list of actors used for curation purposes such as list feeds or interaction gating."
3994
+ },
3995
+ "referencelist": {
3996
+ "type": "token",
3997
+ "description": "A list of actors used for only for reference purposes such as within a starter pack."
3998
+ },
3999
+ "listViewerState": {
1926
4000
  "type": "object",
1927
- "description": "Allow replies from actors you follow.",
1928
- "properties": {}
4001
+ "properties": {
4002
+ "muted": { "type": "boolean" },
4003
+ "blocked": {
4004
+ "type": "string",
4005
+ "format": "at-uri"
4006
+ }
4007
+ }
1929
4008
  },
1930
- "listRule": {
4009
+ "notFoundActor": {
1931
4010
  "type": "object",
1932
- "description": "Allow replies from actors on a list.",
1933
- "required": ["list"],
1934
- "properties": { "list": {
1935
- "type": "string",
1936
- "format": "at-uri"
1937
- } }
1938
- }
1939
- };
1940
- var app_bsky_feed_threadgate_default = {
1941
- lexicon: lexicon$7,
1942
- id: id$7,
1943
- defs: defs$7
1944
- };
1945
-
1946
- //#endregion
1947
- //#region src/lexicons/app.bsky.graph.block.json
1948
- var app_bsky_graph_block_exports = /* @__PURE__ */ __exportAll({
1949
- default: () => app_bsky_graph_block_default,
1950
- defs: () => defs$6,
1951
- id: () => id$6,
1952
- lexicon: () => lexicon$6
1953
- });
1954
- var lexicon$6 = 1;
1955
- var id$6 = "app.bsky.graph.block";
1956
- var defs$6 = { "main": {
1957
- "type": "record",
1958
- "description": "Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details.",
1959
- "key": "tid",
1960
- "record": {
4011
+ "description": "indicates that a handle or DID could not be resolved",
4012
+ "required": ["actor", "notFound"],
4013
+ "properties": {
4014
+ "actor": {
4015
+ "type": "string",
4016
+ "format": "at-identifier"
4017
+ },
4018
+ "notFound": {
4019
+ "type": "boolean",
4020
+ "const": true
4021
+ }
4022
+ }
4023
+ },
4024
+ "relationship": {
1961
4025
  "type": "object",
1962
- "required": ["subject", "createdAt"],
4026
+ "description": "lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)",
4027
+ "required": ["did"],
1963
4028
  "properties": {
1964
- "subject": {
4029
+ "did": {
1965
4030
  "type": "string",
1966
- "format": "did",
1967
- "description": "DID of the account to be blocked."
4031
+ "format": "did"
1968
4032
  },
1969
- "createdAt": {
4033
+ "following": {
1970
4034
  "type": "string",
1971
- "format": "datetime"
4035
+ "format": "at-uri",
4036
+ "description": "if the actor follows this DID, this is the AT-URI of the follow record"
4037
+ },
4038
+ "followedBy": {
4039
+ "type": "string",
4040
+ "format": "at-uri",
4041
+ "description": "if the actor is followed by this DID, contains the AT-URI of the follow record"
4042
+ },
4043
+ "blocking": {
4044
+ "type": "string",
4045
+ "format": "at-uri",
4046
+ "description": "if the actor blocks this DID, this is the AT-URI of the block record"
4047
+ },
4048
+ "blockedBy": {
4049
+ "type": "string",
4050
+ "format": "at-uri",
4051
+ "description": "if the actor is blocked by this DID, contains the AT-URI of the block record"
4052
+ },
4053
+ "blockingByList": {
4054
+ "type": "string",
4055
+ "format": "at-uri",
4056
+ "description": "if the actor blocks this DID via a block list, this is the AT-URI of the listblock record"
4057
+ },
4058
+ "blockedByList": {
4059
+ "type": "string",
4060
+ "format": "at-uri",
4061
+ "description": "if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record"
1972
4062
  }
1973
4063
  }
1974
4064
  }
1975
- } };
1976
- var app_bsky_graph_block_default = {
1977
- lexicon: lexicon$6,
1978
- id: id$6,
1979
- defs: defs$6
4065
+ };
4066
+ var app_bsky_graph_defs_default = {
4067
+ lexicon: lexicon$7,
4068
+ id: id$7,
4069
+ defs: defs$7
1980
4070
  };
1981
4071
 
1982
4072
  //#endregion
1983
4073
  //#region src/lexicons/app.bsky.graph.follow.json
1984
4074
  var app_bsky_graph_follow_exports = /* @__PURE__ */ __exportAll({
1985
4075
  default: () => app_bsky_graph_follow_default,
1986
- defs: () => defs$5,
1987
- id: () => id$5,
1988
- lexicon: () => lexicon$5
4076
+ defs: () => defs$6,
4077
+ id: () => id$6,
4078
+ lexicon: () => lexicon$6
1989
4079
  });
1990
- var lexicon$5 = 1;
1991
- var id$5 = "app.bsky.graph.follow";
1992
- var defs$5 = { "main": {
4080
+ var lexicon$6 = 1;
4081
+ var id$6 = "app.bsky.graph.follow";
4082
+ var defs$6 = { "main": {
1993
4083
  "type": "record",
1994
4084
  "description": "Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView.",
1995
4085
  "key": "tid",
@@ -2013,22 +4103,22 @@ var defs$5 = { "main": {
2013
4103
  }
2014
4104
  } };
2015
4105
  var app_bsky_graph_follow_default = {
2016
- lexicon: lexicon$5,
2017
- id: id$5,
2018
- defs: defs$5
4106
+ lexicon: lexicon$6,
4107
+ id: id$6,
4108
+ defs: defs$6
2019
4109
  };
2020
4110
 
2021
4111
  //#endregion
2022
4112
  //#region src/lexicons/app.bsky.graph.list.json
2023
4113
  var app_bsky_graph_list_exports = /* @__PURE__ */ __exportAll({
2024
4114
  default: () => app_bsky_graph_list_default,
2025
- defs: () => defs$4,
2026
- id: () => id$4,
2027
- lexicon: () => lexicon$4
4115
+ defs: () => defs$5,
4116
+ id: () => id$5,
4117
+ lexicon: () => lexicon$5
2028
4118
  });
2029
- var lexicon$4 = 1;
2030
- var id$4 = "app.bsky.graph.list";
2031
- var defs$4 = { "main": {
4119
+ var lexicon$5 = 1;
4120
+ var id$5 = "app.bsky.graph.list";
4121
+ var defs$5 = { "main": {
2032
4122
  "type": "record",
2033
4123
  "description": "Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists.",
2034
4124
  "key": "tid",
@@ -2080,22 +4170,22 @@ var defs$4 = { "main": {
2080
4170
  }
2081
4171
  } };
2082
4172
  var app_bsky_graph_list_default = {
2083
- lexicon: lexicon$4,
2084
- id: id$4,
2085
- defs: defs$4
4173
+ lexicon: lexicon$5,
4174
+ id: id$5,
4175
+ defs: defs$5
2086
4176
  };
2087
4177
 
2088
4178
  //#endregion
2089
4179
  //#region src/lexicons/app.bsky.graph.listitem.json
2090
4180
  var app_bsky_graph_listitem_exports = /* @__PURE__ */ __exportAll({
2091
4181
  default: () => app_bsky_graph_listitem_default,
2092
- defs: () => defs$3,
2093
- id: () => id$3,
2094
- lexicon: () => lexicon$3
4182
+ defs: () => defs$4,
4183
+ id: () => id$4,
4184
+ lexicon: () => lexicon$4
2095
4185
  });
2096
- var lexicon$3 = 1;
2097
- var id$3 = "app.bsky.graph.listitem";
2098
- var defs$3 = { "main": {
4186
+ var lexicon$4 = 1;
4187
+ var id$4 = "app.bsky.graph.listitem";
4188
+ var defs$4 = { "main": {
2099
4189
  "type": "record",
2100
4190
  "description": "Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records.",
2101
4191
  "key": "tid",
@@ -2125,6 +4215,158 @@ var defs$3 = { "main": {
2125
4215
  }
2126
4216
  } };
2127
4217
  var app_bsky_graph_listitem_default = {
4218
+ lexicon: lexicon$4,
4219
+ id: id$4,
4220
+ defs: defs$4
4221
+ };
4222
+
4223
+ //#endregion
4224
+ //#region src/lexicons/app.bsky.notification.defs.json
4225
+ var app_bsky_notification_defs_exports = /* @__PURE__ */ __exportAll({
4226
+ default: () => app_bsky_notification_defs_default,
4227
+ defs: () => defs$3,
4228
+ id: () => id$3,
4229
+ lexicon: () => lexicon$3
4230
+ });
4231
+ var lexicon$3 = 1;
4232
+ var id$3 = "app.bsky.notification.defs";
4233
+ var defs$3 = {
4234
+ "recordDeleted": {
4235
+ "type": "object",
4236
+ "properties": {}
4237
+ },
4238
+ "chatPreference": {
4239
+ "type": "object",
4240
+ "required": ["include", "push"],
4241
+ "properties": {
4242
+ "include": {
4243
+ "type": "string",
4244
+ "knownValues": ["all", "accepted"]
4245
+ },
4246
+ "push": { "type": "boolean" }
4247
+ }
4248
+ },
4249
+ "filterablePreference": {
4250
+ "type": "object",
4251
+ "required": [
4252
+ "include",
4253
+ "list",
4254
+ "push"
4255
+ ],
4256
+ "properties": {
4257
+ "include": {
4258
+ "type": "string",
4259
+ "knownValues": ["all", "follows"]
4260
+ },
4261
+ "list": { "type": "boolean" },
4262
+ "push": { "type": "boolean" }
4263
+ }
4264
+ },
4265
+ "preference": {
4266
+ "type": "object",
4267
+ "required": ["list", "push"],
4268
+ "properties": {
4269
+ "list": { "type": "boolean" },
4270
+ "push": { "type": "boolean" }
4271
+ }
4272
+ },
4273
+ "preferences": {
4274
+ "type": "object",
4275
+ "required": [
4276
+ "chat",
4277
+ "follow",
4278
+ "like",
4279
+ "likeViaRepost",
4280
+ "mention",
4281
+ "quote",
4282
+ "reply",
4283
+ "repost",
4284
+ "repostViaRepost",
4285
+ "starterpackJoined",
4286
+ "subscribedPost",
4287
+ "unverified",
4288
+ "verified"
4289
+ ],
4290
+ "properties": {
4291
+ "chat": {
4292
+ "type": "ref",
4293
+ "ref": "#chatPreference"
4294
+ },
4295
+ "follow": {
4296
+ "type": "ref",
4297
+ "ref": "#filterablePreference"
4298
+ },
4299
+ "like": {
4300
+ "type": "ref",
4301
+ "ref": "#filterablePreference"
4302
+ },
4303
+ "likeViaRepost": {
4304
+ "type": "ref",
4305
+ "ref": "#filterablePreference"
4306
+ },
4307
+ "mention": {
4308
+ "type": "ref",
4309
+ "ref": "#filterablePreference"
4310
+ },
4311
+ "quote": {
4312
+ "type": "ref",
4313
+ "ref": "#filterablePreference"
4314
+ },
4315
+ "reply": {
4316
+ "type": "ref",
4317
+ "ref": "#filterablePreference"
4318
+ },
4319
+ "repost": {
4320
+ "type": "ref",
4321
+ "ref": "#filterablePreference"
4322
+ },
4323
+ "repostViaRepost": {
4324
+ "type": "ref",
4325
+ "ref": "#filterablePreference"
4326
+ },
4327
+ "starterpackJoined": {
4328
+ "type": "ref",
4329
+ "ref": "#preference"
4330
+ },
4331
+ "subscribedPost": {
4332
+ "type": "ref",
4333
+ "ref": "#preference"
4334
+ },
4335
+ "unverified": {
4336
+ "type": "ref",
4337
+ "ref": "#preference"
4338
+ },
4339
+ "verified": {
4340
+ "type": "ref",
4341
+ "ref": "#preference"
4342
+ }
4343
+ }
4344
+ },
4345
+ "activitySubscription": {
4346
+ "type": "object",
4347
+ "required": ["post", "reply"],
4348
+ "properties": {
4349
+ "post": { "type": "boolean" },
4350
+ "reply": { "type": "boolean" }
4351
+ }
4352
+ },
4353
+ "subjectActivitySubscription": {
4354
+ "description": "Object used to store activity subscription data in stash.",
4355
+ "type": "object",
4356
+ "required": ["subject", "activitySubscription"],
4357
+ "properties": {
4358
+ "subject": {
4359
+ "type": "string",
4360
+ "format": "did"
4361
+ },
4362
+ "activitySubscription": {
4363
+ "type": "ref",
4364
+ "ref": "#activitySubscription"
4365
+ }
4366
+ }
4367
+ }
4368
+ };
4369
+ var app_bsky_notification_defs_default = {
2128
4370
  lexicon: lexicon$3,
2129
4371
  id: id$3,
2130
4372
  defs: defs$3
@@ -2469,19 +4711,25 @@ var RecordValidator = class {
2469
4711
  */
2470
4712
  loadBlueskySchemas() {
2471
4713
  const schemas = {
4714
+ "./lexicons/app.bsky.actor.defs.json": app_bsky_actor_defs_exports,
2472
4715
  "./lexicons/app.bsky.actor.profile.json": app_bsky_actor_profile_exports,
4716
+ "./lexicons/app.bsky.embed.defs.json": app_bsky_embed_defs_exports,
2473
4717
  "./lexicons/app.bsky.embed.external.json": app_bsky_embed_external_exports,
2474
4718
  "./lexicons/app.bsky.embed.images.json": app_bsky_embed_images_exports,
2475
4719
  "./lexicons/app.bsky.embed.record.json": app_bsky_embed_record_exports,
2476
4720
  "./lexicons/app.bsky.embed.recordWithMedia.json": app_bsky_embed_recordWithMedia_exports,
4721
+ "./lexicons/app.bsky.embed.video.json": app_bsky_embed_video_exports,
4722
+ "./lexicons/app.bsky.feed.defs.json": app_bsky_feed_defs_exports,
2477
4723
  "./lexicons/app.bsky.feed.like.json": app_bsky_feed_like_exports,
2478
4724
  "./lexicons/app.bsky.feed.post.json": app_bsky_feed_post_exports,
2479
4725
  "./lexicons/app.bsky.feed.repost.json": app_bsky_feed_repost_exports,
2480
4726
  "./lexicons/app.bsky.feed.threadgate.json": app_bsky_feed_threadgate_exports,
2481
4727
  "./lexicons/app.bsky.graph.block.json": app_bsky_graph_block_exports,
4728
+ "./lexicons/app.bsky.graph.defs.json": app_bsky_graph_defs_exports,
2482
4729
  "./lexicons/app.bsky.graph.follow.json": app_bsky_graph_follow_exports,
2483
4730
  "./lexicons/app.bsky.graph.list.json": app_bsky_graph_list_exports,
2484
4731
  "./lexicons/app.bsky.graph.listitem.json": app_bsky_graph_listitem_exports,
4732
+ "./lexicons/app.bsky.notification.defs.json": app_bsky_notification_defs_exports,
2485
4733
  "./lexicons/app.bsky.richtext.facet.json": app_bsky_richtext_facet_exports,
2486
4734
  "./lexicons/com.atproto.label.defs.json": com_atproto_label_defs_exports,
2487
4735
  "./lexicons/com.atproto.repo.strongRef.json": com_atproto_repo_strongRef_exports
@@ -2500,8 +4748,9 @@ var RecordValidator = class {
2500
4748
  if (this.strictMode) throw new Error(`No lexicon schema loaded for collection: ${collection}. Enable optimistic validation or add the schema.`);
2501
4749
  return;
2502
4750
  }
4751
+ const lexRecord = jsonToLex(record);
2503
4752
  try {
2504
- this.lex.assertValidRecord(collection, record);
4753
+ this.lex.assertValidRecord(collection, lexRecord);
2505
4754
  } catch (error) {
2506
4755
  const message = error instanceof Error ? error.message : String(error);
2507
4756
  throw new Error(`Lexicon validation failed for ${collection}: ${message}`);
@@ -2840,7 +5089,7 @@ async function createSession(c) {
2840
5089
  error: "AuthenticationRequired",
2841
5090
  message: "Invalid identifier or password"
2842
5091
  }, 401);
2843
- if (!await verifyPassword(password, c.env.PASSWORD_HASH)) return c.json({
5092
+ if (!await compare(password, c.env.PASSWORD_HASH)) return c.json({
2844
5093
  error: "AuthenticationRequired",
2845
5094
  message: "Invalid identifier or password"
2846
5095
  }, 401);
@@ -2955,10 +5204,30 @@ async function getAccountStatus(c, accountDO) {
2955
5204
  });
2956
5205
  }
2957
5206
  }
5207
+ /**
5208
+ * Get a service auth token for communicating with external services.
5209
+ * Used by clients to get JWTs for services like video.bsky.app.
5210
+ */
5211
+ async function getServiceAuth(c) {
5212
+ const aud = c.req.query("aud");
5213
+ const lxm = c.req.query("lxm") || null;
5214
+ if (!aud) return c.json({
5215
+ error: "InvalidRequest",
5216
+ message: "Missing required parameter: aud"
5217
+ }, 400);
5218
+ const keypair = await getSigningKeypair(c.env.SIGNING_KEY);
5219
+ const token = await createServiceJwt({
5220
+ iss: c.env.DID,
5221
+ aud,
5222
+ lxm,
5223
+ keypair
5224
+ });
5225
+ return c.json({ token });
5226
+ }
2958
5227
 
2959
5228
  //#endregion
2960
5229
  //#region package.json
2961
- var version = "0.0.1";
5230
+ var version = "0.1.0";
2962
5231
 
2963
5232
  //#endregion
2964
5233
  //#region src/index.ts
@@ -2979,8 +5248,11 @@ try {
2979
5248
  } catch (err) {
2980
5249
  throw new Error(`Invalid DID or handle: ${err instanceof Error ? err.message : String(err)}`);
2981
5250
  }
2982
- const APPVIEW_DID = "did:web:api.bsky.app";
2983
- const CHAT_DID = "did:web:api.bsky.chat";
5251
+ const didResolver = new DidResolver({
5252
+ didCache: new WorkersDidCache(),
5253
+ timeout: 3e3,
5254
+ plcUrl: "https://plc.directory"
5255
+ });
2984
5256
  let keypairPromise = null;
2985
5257
  function getKeypair() {
2986
5258
  if (!keypairPromise) keypairPromise = Secp256k1Keypair.import(env$1.SIGNING_KEY);
@@ -3001,11 +5273,11 @@ app.use("*", cors({
3001
5273
  maxAge: 86400
3002
5274
  }));
3003
5275
  function getAccountDO(env$2) {
3004
- const id$16 = env$2.ACCOUNT.idFromName("account");
3005
- return env$2.ACCOUNT.get(id$16);
5276
+ const id$22 = env$2.ACCOUNT.idFromName("account");
5277
+ return env$2.ACCOUNT.get(id$22);
3006
5278
  }
3007
5279
  app.get("/.well-known/did.json", (c) => {
3008
- const didDocument = {
5280
+ const didDocument$1 = {
3009
5281
  "@context": [
3010
5282
  "https://www.w3.org/ns/did/v1",
3011
5283
  "https://w3id.org/security/multikey/v1",
@@ -3025,7 +5297,7 @@ app.get("/.well-known/did.json", (c) => {
3025
5297
  serviceEndpoint: `https://${c.env.PDS_HOSTNAME}`
3026
5298
  }]
3027
5299
  };
3028
- return c.json(didDocument);
5300
+ return c.json(didDocument$1);
3029
5301
  });
3030
5302
  app.get("/.well-known/atproto-did", (c) => {
3031
5303
  if (c.env.HANDLE !== c.env.PDS_HOSTNAME) return c.notFound();
@@ -3066,10 +5338,14 @@ app.post("/xrpc/com.atproto.server.refreshSession", refreshSession);
3066
5338
  app.get("/xrpc/com.atproto.server.getSession", getSession);
3067
5339
  app.post("/xrpc/com.atproto.server.deleteSession", deleteSession);
3068
5340
  app.get("/xrpc/com.atproto.server.getAccountStatus", requireAuth, (c) => getAccountStatus(c, getAccountDO(c.env)));
3069
- app.get("/xrpc/app.bsky.actor.getPreferences", requireAuth, (c) => {
3070
- return c.json({ preferences: [] });
5341
+ app.get("/xrpc/com.atproto.server.getServiceAuth", requireAuth, getServiceAuth);
5342
+ app.get("/xrpc/app.bsky.actor.getPreferences", requireAuth, async (c) => {
5343
+ const result = await getAccountDO(c.env).rpcGetPreferences();
5344
+ return c.json(result);
3071
5345
  });
3072
5346
  app.post("/xrpc/app.bsky.actor.putPreferences", requireAuth, async (c) => {
5347
+ const body = await c.req.json();
5348
+ await getAccountDO(c.env).rpcPutPreferences(body.preferences);
3073
5349
  return c.json({});
3074
5350
  });
3075
5351
  app.get("/xrpc/app.bsky.ageassurance.getState", requireAuth, (c) => {
@@ -3086,43 +5362,7 @@ app.post("/admin/emit-identity", requireAuth, async (c) => {
3086
5362
  const result = await getAccountDO(c.env).rpcEmitIdentityEvent(c.env.HANDLE);
3087
5363
  return c.json(result);
3088
5364
  });
3089
- app.all("/xrpc/*", async (c) => {
3090
- const url = new URL(c.req.url);
3091
- url.protocol = "https:";
3092
- const lxm = url.pathname.replace("/xrpc/", "");
3093
- const isChat = lxm.startsWith("chat.bsky.");
3094
- url.host = isChat ? "api.bsky.chat" : "api.bsky.app";
3095
- const audienceDid = isChat ? CHAT_DID : APPVIEW_DID;
3096
- const auth = c.req.header("Authorization");
3097
- let headers = {};
3098
- if (auth?.startsWith("Bearer ")) {
3099
- const token = auth.slice(7);
3100
- const serviceDid = `did:web:${c.env.PDS_HOSTNAME}`;
3101
- try {
3102
- let userDid;
3103
- if (token === c.env.AUTH_TOKEN) userDid = c.env.DID;
3104
- else userDid = (await verifyAccessToken(token, c.env.JWT_SECRET, serviceDid)).sub;
3105
- const keypair = await getKeypair();
3106
- headers["Authorization"] = `Bearer ${await createServiceJwt({
3107
- iss: userDid,
3108
- aud: audienceDid,
3109
- lxm,
3110
- keypair
3111
- })}`;
3112
- } catch {}
3113
- }
3114
- const originalHeaders = Object.fromEntries(c.req.raw.headers);
3115
- delete originalHeaders["authorization"];
3116
- const reqInit = {
3117
- method: c.req.method,
3118
- headers: {
3119
- ...originalHeaders,
3120
- ...headers
3121
- }
3122
- };
3123
- if (c.req.method !== "GET" && c.req.method !== "HEAD") reqInit.body = c.req.raw.body;
3124
- return fetch(url.toString(), reqInit);
3125
- });
5365
+ app.all("/xrpc/*", (c) => handleXrpcProxy(c, didResolver, getKeypair));
3126
5366
  var src_default = app;
3127
5367
 
3128
5368
  //#endregion