@ascorbic/pds 0.0.2 → 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";
@@ -986,7 +1104,13 @@ async function requireAuth(c, next) {
986
1104
  message: "Authorization header required"
987
1105
  }, 401);
988
1106
  const token = auth.slice(7);
989
- 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
+ }
990
1114
  const serviceDid = `did:web:${c.env.PDS_HOSTNAME}`;
991
1115
  try {
992
1116
  const payload = await verifyAccessToken(token, c.env.JWT_SECRET, serviceDid);
@@ -999,50 +1123,269 @@ async function requireAuth(c, next) {
999
1123
  scope: payload.scope
1000
1124
  });
1001
1125
  return next();
1002
- } catch {
1003
- return c.json({
1004
- error: "AuthenticationRequired",
1005
- message: "Invalid authentication token"
1006
- }, 401);
1007
- }
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);
1008
1139
  }
1009
1140
 
1010
1141
  //#endregion
1011
- //#region src/service-auth.ts
1012
- const MINUTE = 60 * 1e3;
1013
- function jsonToB64Url(json) {
1014
- return Buffer.from(JSON.stringify(json)).toString("base64url");
1015
- }
1016
- function noUndefinedVals(obj) {
1017
- const result = {};
1018
- for (const [key, val] of Object.entries(obj)) if (val !== void 0) result[key] = val;
1019
- 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
+ };
1020
1296
  }
1021
1297
  /**
1022
- * Create a service JWT for proxied requests to AppView.
1023
- * 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
1024
1300
  */
1025
- async function createServiceJwt(params) {
1026
- const { iss, aud, keypair } = params;
1027
- const iat = Math.floor(Date.now() / 1e3);
1028
- const exp = iat + MINUTE / 1e3;
1029
- const lxm = params.lxm ?? void 0;
1030
- const jti = randomStr(16, "hex");
1031
- const header = {
1032
- typ: "JWT",
1033
- 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
1034
1386
  };
1035
- const payload = noUndefinedVals({
1036
- iat,
1037
- iss,
1038
- aud,
1039
- exp,
1040
- lxm,
1041
- jti
1042
- });
1043
- const toSignStr = `${jsonToB64Url(header)}.${jsonToB64Url(payload)}`;
1044
- const toSign = Buffer.from(toSignStr, "utf8");
1045
- 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);
1046
1389
  }
1047
1390
 
1048
1391
  //#endregion
@@ -1179,469 +1522,1872 @@ async function getBlob(c, _accountDO) {
1179
1522
  }
1180
1523
 
1181
1524
  //#endregion
1182
- //#region src/lexicons/app.bsky.actor.profile.json
1183
- var app_bsky_actor_profile_exports = /* @__PURE__ */ __exportAll({
1184
- default: () => app_bsky_actor_profile_default,
1185
- defs: () => defs$15,
1186
- id: () => id$15,
1187
- 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
1188
1531
  });
1189
- var lexicon$15 = 1;
1190
- var id$15 = "app.bsky.actor.profile";
1191
- var defs$15 = { "main": {
1192
- "type": "record",
1193
- "description": "A declaration of a Bluesky account profile.",
1194
- "key": "literal:self",
1195
- "record": {
1532
+ var lexicon$21 = 1;
1533
+ var id$21 = "app.bsky.actor.defs";
1534
+ var defs$21 = {
1535
+ "profileViewBasic": {
1196
1536
  "type": "object",
1537
+ "required": ["did", "handle"],
1197
1538
  "properties": {
1198
- "displayName": {
1539
+ "did": {
1199
1540
  "type": "string",
1200
- "maxGraphemes": 64,
1201
- "maxLength": 640
1541
+ "format": "did"
1202
1542
  },
1203
- "description": {
1543
+ "handle": {
1204
1544
  "type": "string",
1205
- "description": "Free-form profile description text.",
1206
- "maxGraphemes": 256,
1207
- "maxLength": 2560
1545
+ "format": "handle"
1208
1546
  },
1209
- "pronouns": {
1547
+ "displayName": {
1210
1548
  "type": "string",
1211
- "description": "Free-form pronouns text.",
1212
- "maxGraphemes": 20,
1213
- "maxLength": 200
1549
+ "maxGraphemes": 64,
1550
+ "maxLength": 640
1214
1551
  },
1215
- "website": {
1552
+ "pronouns": { "type": "string" },
1553
+ "avatar": {
1216
1554
  "type": "string",
1217
1555
  "format": "uri"
1218
1556
  },
1219
- "avatar": {
1220
- "type": "blob",
1221
- "description": "Small image to be displayed next to posts from account. AKA, 'profile picture'",
1222
- "accept": ["image/png", "image/jpeg"],
1223
- "maxSize": 1e6
1557
+ "associated": {
1558
+ "type": "ref",
1559
+ "ref": "#profileAssociated"
1224
1560
  },
1225
- "banner": {
1226
- "type": "blob",
1227
- "description": "Larger horizontal image to display behind profile view.",
1228
- "accept": ["image/png", "image/jpeg"],
1229
- "maxSize": 1e6
1561
+ "viewer": {
1562
+ "type": "ref",
1563
+ "ref": "#viewerState"
1230
1564
  },
1231
1565
  "labels": {
1232
- "type": "union",
1233
- "description": "Self-label values, specific to the Bluesky application, on the overall account.",
1234
- "refs": ["com.atproto.label.defs#selfLabels"]
1566
+ "type": "array",
1567
+ "items": {
1568
+ "type": "ref",
1569
+ "ref": "com.atproto.label.defs#label"
1570
+ }
1235
1571
  },
1236
- "joinedViaStarterPack": {
1572
+ "createdAt": {
1573
+ "type": "string",
1574
+ "format": "datetime"
1575
+ },
1576
+ "verification": {
1237
1577
  "type": "ref",
1238
- "ref": "com.atproto.repo.strongRef"
1578
+ "ref": "#verificationState"
1239
1579
  },
1240
- "pinnedPost": {
1580
+ "status": {
1241
1581
  "type": "ref",
1242
- "ref": "com.atproto.repo.strongRef"
1582
+ "ref": "#statusView"
1243
1583
  },
1244
- "createdAt": {
1245
- "type": "string",
1246
- "format": "datetime"
1584
+ "debug": {
1585
+ "type": "unknown",
1586
+ "description": "Debug information for internal development"
1247
1587
  }
1248
1588
  }
1249
- }
1250
- } };
1251
- var app_bsky_actor_profile_default = {
1252
- lexicon: lexicon$15,
1253
- id: id$15,
1254
- defs: defs$15
1255
- };
1256
-
1257
- //#endregion
1258
- //#region src/lexicons/app.bsky.embed.external.json
1259
- var app_bsky_embed_external_exports = /* @__PURE__ */ __exportAll({
1260
- default: () => app_bsky_embed_external_default,
1261
- defs: () => defs$14,
1262
- id: () => id$14,
1263
- lexicon: () => lexicon$14
1264
- });
1265
- var lexicon$14 = 1;
1266
- var id$14 = "app.bsky.embed.external";
1267
- var defs$14 = {
1268
- "main": {
1269
- "type": "object",
1270
- "description": "A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post).",
1271
- "required": ["external"],
1272
- "properties": { "external": {
1273
- "type": "ref",
1274
- "ref": "#external"
1275
- } }
1276
1589
  },
1277
- "external": {
1590
+ "profileView": {
1278
1591
  "type": "object",
1279
- "required": [
1280
- "uri",
1281
- "title",
1282
- "description"
1283
- ],
1592
+ "required": ["did", "handle"],
1284
1593
  "properties": {
1285
- "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": {
1286
1614
  "type": "string",
1287
1615
  "format": "uri"
1288
1616
  },
1289
- "title": { "type": "string" },
1290
- "description": { "type": "string" },
1291
- "thumb": {
1292
- "type": "blob",
1293
- "accept": ["image/*"],
1294
- "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"
1295
1651
  }
1296
1652
  }
1297
1653
  },
1298
- "view": {
1299
- "type": "object",
1300
- "required": ["external"],
1301
- "properties": { "external": {
1302
- "type": "ref",
1303
- "ref": "#viewExternal"
1304
- } }
1305
- },
1306
- "viewExternal": {
1654
+ "profileViewDetailed": {
1307
1655
  "type": "object",
1308
- "required": [
1309
- "uri",
1310
- "title",
1311
- "description"
1312
- ],
1656
+ "required": ["did", "handle"],
1313
1657
  "properties": {
1314
- "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": {
1315
1678
  "type": "string",
1316
1679
  "format": "uri"
1317
1680
  },
1318
- "title": { "type": "string" },
1319
- "description": { "type": "string" },
1320
- "thumb": {
1681
+ "avatar": {
1321
1682
  "type": "string",
1322
1683
  "format": "uri"
1323
- }
1324
- }
1325
- }
1326
- };
1327
- var app_bsky_embed_external_default = {
1328
- lexicon: lexicon$14,
1329
- id: id$14,
1330
- defs: defs$14
1331
- };
1332
-
1333
- //#endregion
1334
- //#region src/lexicons/app.bsky.embed.images.json
1335
- var app_bsky_embed_images_exports = /* @__PURE__ */ __exportAll({
1336
- default: () => app_bsky_embed_images_default,
1337
- defs: () => defs$13,
1338
- description: () => description$3,
1339
- id: () => id$13,
1340
- lexicon: () => lexicon$13
1341
- });
1342
- var lexicon$13 = 1;
1343
- var id$13 = "app.bsky.embed.images";
1344
- var description$3 = "A set of images embedded in a Bluesky record (eg, a post).";
1345
- var defs$13 = {
1346
- "main": {
1347
- "type": "object",
1348
- "required": ["images"],
1349
- "properties": { "images": {
1350
- "type": "array",
1351
- "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": {
1352
1693
  "type": "ref",
1353
- "ref": "#image"
1694
+ "ref": "#profileAssociated"
1354
1695
  },
1355
- "maxLength": 4
1356
- } }
1357
- },
1358
- "image": {
1359
- "type": "object",
1360
- "required": ["image", "alt"],
1361
- "properties": {
1362
- "image": {
1363
- "type": "blob",
1364
- "accept": ["image/*"],
1365
- "maxSize": 1e6
1696
+ "joinedViaStarterPack": {
1697
+ "type": "ref",
1698
+ "ref": "app.bsky.graph.defs#starterPackViewBasic"
1366
1699
  },
1367
- "alt": {
1700
+ "indexedAt": {
1368
1701
  "type": "string",
1369
- "description": "Alt text description of the image, for accessibility."
1702
+ "format": "datetime"
1370
1703
  },
1371
- "aspectRatio": {
1704
+ "createdAt": {
1705
+ "type": "string",
1706
+ "format": "datetime"
1707
+ },
1708
+ "viewer": {
1372
1709
  "type": "ref",
1373
- "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"
1374
1734
  }
1375
1735
  }
1376
1736
  },
1377
- "view": {
1737
+ "profileAssociated": {
1378
1738
  "type": "object",
1379
- "required": ["images"],
1380
- "properties": { "images": {
1381
- "type": "array",
1382
- "items": {
1739
+ "properties": {
1740
+ "lists": { "type": "integer" },
1741
+ "feedgens": { "type": "integer" },
1742
+ "starterPacks": { "type": "integer" },
1743
+ "labeler": { "type": "boolean" },
1744
+ "chat": {
1383
1745
  "type": "ref",
1384
- "ref": "#viewImage"
1746
+ "ref": "#profileAssociatedChat"
1385
1747
  },
1386
- "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
+ ]
1387
1764
  } }
1388
1765
  },
1389
- "viewImage": {
1766
+ "profileAssociatedActivitySubscription": {
1390
1767
  "type": "object",
1391
- "required": [
1392
- "thumb",
1393
- "fullsize",
1394
- "alt"
1395
- ],
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.",
1396
1781
  "properties": {
1397
- "thumb": {
1782
+ "muted": { "type": "boolean" },
1783
+ "mutedByList": {
1784
+ "type": "ref",
1785
+ "ref": "app.bsky.graph.defs#listViewBasic"
1786
+ },
1787
+ "blockedBy": { "type": "boolean" },
1788
+ "blocking": {
1398
1789
  "type": "string",
1399
- "format": "uri",
1400
- "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"
1401
1791
  },
1402
- "fullsize": {
1792
+ "blockingByList": {
1793
+ "type": "ref",
1794
+ "ref": "app.bsky.graph.defs#listViewBasic"
1795
+ },
1796
+ "following": {
1403
1797
  "type": "string",
1404
- "format": "uri",
1405
- "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"
1406
1799
  },
1407
- "alt": {
1800
+ "followedBy": {
1408
1801
  "type": "string",
1409
- "description": "Alt text description of the image, for accessibility."
1802
+ "format": "at-uri"
1410
1803
  },
1411
- "aspectRatio": {
1804
+ "knownFollowers": {
1805
+ "description": "This property is present only in selected cases, as an optimization.",
1412
1806
  "type": "ref",
1413
- "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"
1414
1813
  }
1415
1814
  }
1416
- }
1417
- };
1418
- var app_bsky_embed_images_default = {
1419
- lexicon: lexicon$13,
1420
- id: id$13,
1421
- description: description$3,
1422
- defs: defs$13
1423
- };
1424
-
1425
- //#endregion
1426
- //#region src/lexicons/app.bsky.embed.record.json
1427
- var app_bsky_embed_record_exports = /* @__PURE__ */ __exportAll({
1428
- default: () => app_bsky_embed_record_default,
1429
- defs: () => defs$12,
1430
- description: () => description$2,
1431
- id: () => id$12,
1432
- lexicon: () => lexicon$12
1433
- });
1434
- var lexicon$12 = 1;
1435
- var id$12 = "app.bsky.embed.record";
1436
- 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.";
1437
- var defs$12 = {
1438
- "main": {
1815
+ },
1816
+ "knownFollowers": {
1439
1817
  "type": "object",
1440
- "required": ["record"],
1441
- "properties": { "record": {
1442
- "type": "ref",
1443
- "ref": "com.atproto.repo.strongRef"
1444
- } }
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
+ }
1445
1832
  },
1446
- "view": {
1833
+ "verificationState": {
1447
1834
  "type": "object",
1448
- "required": ["record"],
1449
- "properties": { "record": {
1450
- "type": "union",
1451
- "refs": [
1452
- "#viewRecord",
1453
- "#viewNotFound",
1454
- "#viewBlocked",
1455
- "#viewDetached",
1456
- "app.bsky.feed.defs#generatorView",
1457
- "app.bsky.graph.defs#listView",
1458
- "app.bsky.labeler.defs#labelerView",
1459
- "app.bsky.graph.defs#starterPackViewBasic"
1460
- ]
1461
- } }
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
+ }
1462
1869
  },
1463
- "viewRecord": {
1870
+ "verificationView": {
1464
1871
  "type": "object",
1872
+ "description": "An individual verification for an associated subject.",
1465
1873
  "required": [
1874
+ "issuer",
1466
1875
  "uri",
1467
- "cid",
1468
- "author",
1469
- "value",
1470
- "indexedAt"
1876
+ "isValid",
1877
+ "createdAt"
1471
1878
  ],
1472
1879
  "properties": {
1880
+ "issuer": {
1881
+ "type": "string",
1882
+ "description": "The user who issued this verification.",
1883
+ "format": "did"
1884
+ },
1473
1885
  "uri": {
1474
1886
  "type": "string",
1887
+ "description": "The AT-URI of the verification record.",
1475
1888
  "format": "at-uri"
1476
1889
  },
1477
- "cid": {
1478
- "type": "string",
1479
- "format": "cid"
1890
+ "isValid": {
1891
+ "type": "boolean",
1892
+ "description": "True if the verification passes validation, otherwise false."
1480
1893
  },
1481
- "author": {
1482
- "type": "ref",
1483
- "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"
1484
1940
  },
1485
- "value": {
1486
- "type": "unknown",
1487
- "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
+ ]
1488
1970
  },
1489
- "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": {
1490
1991
  "type": "array",
1491
1992
  "items": {
1492
- "type": "ref",
1493
- "ref": "com.atproto.label.defs#label"
1993
+ "type": "string",
1994
+ "format": "at-uri"
1494
1995
  }
1495
1996
  },
1496
- "replyCount": { "type": "integer" },
1497
- "repostCount": { "type": "integer" },
1498
- "likeCount": { "type": "integer" },
1499
- "quoteCount": { "type": "integer" },
1500
- "embeds": {
1997
+ "saved": {
1501
1998
  "type": "array",
1502
1999
  "items": {
1503
- "type": "union",
1504
- "refs": [
1505
- "app.bsky.embed.images#view",
1506
- "app.bsky.embed.video#view",
1507
- "app.bsky.embed.external#view",
1508
- "app.bsky.embed.record#view",
1509
- "app.bsky.embed.recordWithMedia#view"
1510
- ]
2000
+ "type": "string",
2001
+ "format": "at-uri"
1511
2002
  }
1512
2003
  },
1513
- "indexedAt": {
1514
- "type": "string",
1515
- "format": "datetime"
1516
- }
2004
+ "timelineIndex": { "type": "integer" }
1517
2005
  }
1518
2006
  },
1519
- "viewNotFound": {
2007
+ "personalDetailsPref": {
1520
2008
  "type": "object",
1521
- "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.",
1522
2018
  "properties": {
1523
- "uri": {
1524
- "type": "string",
1525
- "format": "at-uri"
2019
+ "isOverAge13": {
2020
+ "type": "boolean",
2021
+ "description": "Indicates if the user has declared that they are over 13 years of age."
1526
2022
  },
1527
- "notFound": {
2023
+ "isOverAge16": {
1528
2024
  "type": "boolean",
1529
- "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."
1530
2030
  }
1531
2031
  }
1532
2032
  },
1533
- "viewBlocked": {
2033
+ "feedViewPref": {
1534
2034
  "type": "object",
1535
- "required": [
1536
- "uri",
1537
- "blocked",
1538
- "author"
1539
- ],
2035
+ "required": ["feed"],
1540
2036
  "properties": {
1541
- "uri": {
2037
+ "feed": {
1542
2038
  "type": "string",
1543
- "format": "at-uri"
2039
+ "description": "The URI of the feed, or an identifier which describes the feed."
1544
2040
  },
1545
- "blocked": {
2041
+ "hideReplies": {
1546
2042
  "type": "boolean",
1547
- "const": true
2043
+ "description": "Hide replies in the feed."
1548
2044
  },
1549
- "author": {
1550
- "type": "ref",
1551
- "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."
1552
2061
  }
1553
2062
  }
1554
2063
  },
1555
- "viewDetached": {
2064
+ "threadViewPref": {
1556
2065
  "type": "object",
1557
- "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"],
1558
2102
  "properties": {
1559
- "uri": {
2103
+ "id": { "type": "string" },
2104
+ "value": {
1560
2105
  "type": "string",
1561
- "format": "at-uri"
2106
+ "description": "The muted word itself.",
2107
+ "maxLength": 1e4,
2108
+ "maxGraphemes": 1e3
1562
2109
  },
1563
- "detached": {
1564
- "type": "boolean",
1565
- "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."
1566
2128
  }
1567
2129
  }
1568
- }
1569
- };
1570
- var app_bsky_embed_record_default = {
1571
- lexicon: lexicon$12,
1572
- id: id$12,
1573
- description: description$2,
1574
- defs: defs$12
1575
- };
1576
-
1577
- //#endregion
1578
- //#region src/lexicons/app.bsky.embed.recordWithMedia.json
1579
- var app_bsky_embed_recordWithMedia_exports = /* @__PURE__ */ __exportAll({
1580
- default: () => app_bsky_embed_recordWithMedia_default,
1581
- defs: () => defs$11,
1582
- description: () => description$1,
1583
- id: () => id$11,
1584
- lexicon: () => lexicon$11
1585
- });
1586
- var lexicon$11 = 1;
1587
- var id$11 = "app.bsky.embed.recordWithMedia";
1588
- 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.";
1589
- var defs$11 = {
1590
- "main": {
2130
+ },
2131
+ "mutedWordsPref": {
1591
2132
  "type": "object",
1592
- "required": ["record", "media"],
1593
- "properties": {
1594
- "record": {
2133
+ "required": ["items"],
2134
+ "properties": { "items": {
2135
+ "type": "array",
2136
+ "items": {
1595
2137
  "type": "ref",
1596
- "ref": "app.bsky.embed.record"
2138
+ "ref": "app.bsky.actor.defs#mutedWord"
1597
2139
  },
1598
- "media": {
1599
- "type": "union",
1600
- "refs": [
1601
- "app.bsky.embed.images",
1602
- "app.bsky.embed.video",
1603
- "app.bsky.embed.external"
1604
- ]
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"
1605
2163
  }
1606
- }
2164
+ } }
1607
2165
  },
1608
- "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.",
1609
2176
  "type": "object",
1610
- "required": ["record", "media"],
1611
2177
  "properties": {
1612
- "record": {
2178
+ "activeProgressGuide": {
1613
2179
  "type": "ref",
1614
- "ref": "app.bsky.embed.record#view"
2180
+ "ref": "#bskyAppProgressGuide"
1615
2181
  },
1616
- "media": {
1617
- "type": "union",
1618
- "refs": [
1619
- "app.bsky.embed.images#view",
1620
- "app.bsky.embed.video#view",
1621
- "app.bsky.embed.external#view"
1622
- ]
1623
- }
1624
- }
1625
- }
1626
- };
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
+ };
1627
2787
  var app_bsky_embed_recordWithMedia_default = {
1628
- lexicon: lexicon$11,
1629
- id: id$11,
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,
1630
2883
  description: description$1,
1631
- defs: defs$11
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
+ }
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"
3372
+ }
3373
+ };
3374
+ var app_bsky_feed_defs_default = {
3375
+ lexicon: lexicon$13,
3376
+ id: id$13,
3377
+ defs: defs$13
1632
3378
  };
1633
3379
 
1634
3380
  //#endregion
1635
3381
  //#region src/lexicons/app.bsky.feed.like.json
1636
3382
  var app_bsky_feed_like_exports = /* @__PURE__ */ __exportAll({
1637
3383
  default: () => app_bsky_feed_like_default,
1638
- defs: () => defs$10,
1639
- id: () => id$10,
1640
- lexicon: () => lexicon$10
3384
+ defs: () => defs$12,
3385
+ id: () => id$12,
3386
+ lexicon: () => lexicon$12
1641
3387
  });
1642
- var lexicon$10 = 1;
1643
- var id$10 = "app.bsky.feed.like";
1644
- var defs$10 = { "main": {
3388
+ var lexicon$12 = 1;
3389
+ var id$12 = "app.bsky.feed.like";
3390
+ var defs$12 = { "main": {
1645
3391
  "type": "record",
1646
3392
  "description": "Record declaring a 'like' of a piece of subject content.",
1647
3393
  "key": "tid",
@@ -1665,22 +3411,22 @@ var defs$10 = { "main": {
1665
3411
  }
1666
3412
  } };
1667
3413
  var app_bsky_feed_like_default = {
1668
- lexicon: lexicon$10,
1669
- id: id$10,
1670
- defs: defs$10
3414
+ lexicon: lexicon$12,
3415
+ id: id$12,
3416
+ defs: defs$12
1671
3417
  };
1672
3418
 
1673
3419
  //#endregion
1674
3420
  //#region src/lexicons/app.bsky.feed.post.json
1675
3421
  var app_bsky_feed_post_exports = /* @__PURE__ */ __exportAll({
1676
3422
  default: () => app_bsky_feed_post_default,
1677
- defs: () => defs$9,
1678
- id: () => id$9,
1679
- lexicon: () => lexicon$9
3423
+ defs: () => defs$11,
3424
+ id: () => id$11,
3425
+ lexicon: () => lexicon$11
1680
3426
  });
1681
- var lexicon$9 = 1;
1682
- var id$9 = "app.bsky.feed.post";
1683
- var defs$9 = {
3427
+ var lexicon$11 = 1;
3428
+ var id$11 = "app.bsky.feed.post";
3429
+ var defs$11 = {
1684
3430
  "main": {
1685
3431
  "type": "record",
1686
3432
  "description": "Record containing a Bluesky post.",
@@ -1808,182 +3554,532 @@ var defs$9 = {
1808
3554
  }
1809
3555
  };
1810
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 = {
1811
3681
  lexicon: lexicon$9,
1812
3682
  id: id$9,
1813
3683
  defs: defs$9
1814
3684
  };
1815
3685
 
1816
3686
  //#endregion
1817
- //#region src/lexicons/app.bsky.feed.repost.json
1818
- var app_bsky_feed_repost_exports = /* @__PURE__ */ __exportAll({
1819
- 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,
1820
3690
  defs: () => defs$8,
1821
3691
  id: () => id$8,
1822
3692
  lexicon: () => lexicon$8
1823
3693
  });
1824
3694
  var lexicon$8 = 1;
1825
- var id$8 = "app.bsky.feed.repost";
3695
+ var id$8 = "app.bsky.graph.block";
1826
3696
  var defs$8 = { "main": {
1827
- "description": "Record representing a 'repost' of an existing Bluesky post.",
1828
3697
  "type": "record",
3698
+ "description": "Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details.",
1829
3699
  "key": "tid",
1830
3700
  "record": {
1831
3701
  "type": "object",
1832
3702
  "required": ["subject", "createdAt"],
1833
3703
  "properties": {
1834
3704
  "subject": {
1835
- "type": "ref",
1836
- "ref": "com.atproto.repo.strongRef"
3705
+ "type": "string",
3706
+ "format": "did",
3707
+ "description": "DID of the account to be blocked."
1837
3708
  },
1838
3709
  "createdAt": {
1839
3710
  "type": "string",
1840
3711
  "format": "datetime"
1841
- },
1842
- "via": {
1843
- "type": "ref",
1844
- "ref": "com.atproto.repo.strongRef"
1845
3712
  }
1846
3713
  }
1847
3714
  }
1848
3715
  } };
1849
- var app_bsky_feed_repost_default = {
3716
+ var app_bsky_graph_block_default = {
1850
3717
  lexicon: lexicon$8,
1851
3718
  id: id$8,
1852
3719
  defs: defs$8
1853
3720
  };
1854
3721
 
1855
3722
  //#endregion
1856
- //#region src/lexicons/app.bsky.feed.threadgate.json
1857
- var app_bsky_feed_threadgate_exports = /* @__PURE__ */ __exportAll({
1858
- 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,
1859
3726
  defs: () => defs$7,
1860
3727
  id: () => id$7,
1861
3728
  lexicon: () => lexicon$7
1862
3729
  });
1863
3730
  var lexicon$7 = 1;
1864
- var id$7 = "app.bsky.feed.threadgate";
3731
+ var id$7 = "app.bsky.graph.defs";
1865
3732
  var defs$7 = {
1866
- "main": {
1867
- "type": "record",
1868
- "key": "tid",
1869
- "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.",
1870
- "record": {
1871
- "type": "object",
1872
- "required": ["post", "createdAt"],
1873
- "properties": {
1874
- "post": {
1875
- "type": "string",
1876
- "format": "at-uri",
1877
- "description": "Reference (AT-URI) to the post record."
1878
- },
1879
- "allow": {
1880
- "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.",
1881
- "type": "array",
1882
- "maxLength": 5,
1883
- "items": {
1884
- "type": "union",
1885
- "refs": [
1886
- "#mentionRule",
1887
- "#followerRule",
1888
- "#followingRule",
1889
- "#listRule"
1890
- ]
1891
- }
1892
- },
1893
- "createdAt": {
1894
- "type": "string",
1895
- "format": "datetime"
1896
- },
1897
- "hiddenReplies": {
1898
- "type": "array",
1899
- "maxLength": 300,
1900
- "items": {
1901
- "type": "string",
1902
- "format": "at-uri"
1903
- },
1904
- "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"
1905
3971
  }
3972
+ },
3973
+ "indexedAt": {
3974
+ "type": "string",
3975
+ "format": "datetime"
1906
3976
  }
1907
3977
  }
1908
3978
  },
1909
- "mentionRule": {
1910
- "type": "object",
1911
- "description": "Allow replies from actors mentioned in your post.",
1912
- "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
+ ]
1913
3986
  },
1914
- "followerRule": {
1915
- "type": "object",
1916
- "description": "Allow replies from actors who follow you.",
1917
- "properties": {}
3987
+ "modlist": {
3988
+ "type": "token",
3989
+ "description": "A list of actors to apply an aggregate moderation action (mute/block) on."
1918
3990
  },
1919
- "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": {
1920
4000
  "type": "object",
1921
- "description": "Allow replies from actors you follow.",
1922
- "properties": {}
4001
+ "properties": {
4002
+ "muted": { "type": "boolean" },
4003
+ "blocked": {
4004
+ "type": "string",
4005
+ "format": "at-uri"
4006
+ }
4007
+ }
1923
4008
  },
1924
- "listRule": {
4009
+ "notFoundActor": {
1925
4010
  "type": "object",
1926
- "description": "Allow replies from actors on a list.",
1927
- "required": ["list"],
1928
- "properties": { "list": {
1929
- "type": "string",
1930
- "format": "at-uri"
1931
- } }
1932
- }
1933
- };
1934
- var app_bsky_feed_threadgate_default = {
1935
- lexicon: lexicon$7,
1936
- id: id$7,
1937
- defs: defs$7
1938
- };
1939
-
1940
- //#endregion
1941
- //#region src/lexicons/app.bsky.graph.block.json
1942
- var app_bsky_graph_block_exports = /* @__PURE__ */ __exportAll({
1943
- default: () => app_bsky_graph_block_default,
1944
- defs: () => defs$6,
1945
- id: () => id$6,
1946
- lexicon: () => lexicon$6
1947
- });
1948
- var lexicon$6 = 1;
1949
- var id$6 = "app.bsky.graph.block";
1950
- var defs$6 = { "main": {
1951
- "type": "record",
1952
- "description": "Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details.",
1953
- "key": "tid",
1954
- "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": {
1955
4025
  "type": "object",
1956
- "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"],
1957
4028
  "properties": {
1958
- "subject": {
4029
+ "did": {
1959
4030
  "type": "string",
1960
- "format": "did",
1961
- "description": "DID of the account to be blocked."
4031
+ "format": "did"
1962
4032
  },
1963
- "createdAt": {
4033
+ "following": {
1964
4034
  "type": "string",
1965
- "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"
1966
4062
  }
1967
4063
  }
1968
4064
  }
1969
- } };
1970
- var app_bsky_graph_block_default = {
1971
- lexicon: lexicon$6,
1972
- id: id$6,
1973
- defs: defs$6
4065
+ };
4066
+ var app_bsky_graph_defs_default = {
4067
+ lexicon: lexicon$7,
4068
+ id: id$7,
4069
+ defs: defs$7
1974
4070
  };
1975
4071
 
1976
4072
  //#endregion
1977
4073
  //#region src/lexicons/app.bsky.graph.follow.json
1978
4074
  var app_bsky_graph_follow_exports = /* @__PURE__ */ __exportAll({
1979
4075
  default: () => app_bsky_graph_follow_default,
1980
- defs: () => defs$5,
1981
- id: () => id$5,
1982
- lexicon: () => lexicon$5
4076
+ defs: () => defs$6,
4077
+ id: () => id$6,
4078
+ lexicon: () => lexicon$6
1983
4079
  });
1984
- var lexicon$5 = 1;
1985
- var id$5 = "app.bsky.graph.follow";
1986
- var defs$5 = { "main": {
4080
+ var lexicon$6 = 1;
4081
+ var id$6 = "app.bsky.graph.follow";
4082
+ var defs$6 = { "main": {
1987
4083
  "type": "record",
1988
4084
  "description": "Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView.",
1989
4085
  "key": "tid",
@@ -2007,22 +4103,22 @@ var defs$5 = { "main": {
2007
4103
  }
2008
4104
  } };
2009
4105
  var app_bsky_graph_follow_default = {
2010
- lexicon: lexicon$5,
2011
- id: id$5,
2012
- defs: defs$5
4106
+ lexicon: lexicon$6,
4107
+ id: id$6,
4108
+ defs: defs$6
2013
4109
  };
2014
4110
 
2015
4111
  //#endregion
2016
4112
  //#region src/lexicons/app.bsky.graph.list.json
2017
4113
  var app_bsky_graph_list_exports = /* @__PURE__ */ __exportAll({
2018
4114
  default: () => app_bsky_graph_list_default,
2019
- defs: () => defs$4,
2020
- id: () => id$4,
2021
- lexicon: () => lexicon$4
4115
+ defs: () => defs$5,
4116
+ id: () => id$5,
4117
+ lexicon: () => lexicon$5
2022
4118
  });
2023
- var lexicon$4 = 1;
2024
- var id$4 = "app.bsky.graph.list";
2025
- var defs$4 = { "main": {
4119
+ var lexicon$5 = 1;
4120
+ var id$5 = "app.bsky.graph.list";
4121
+ var defs$5 = { "main": {
2026
4122
  "type": "record",
2027
4123
  "description": "Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists.",
2028
4124
  "key": "tid",
@@ -2074,22 +4170,22 @@ var defs$4 = { "main": {
2074
4170
  }
2075
4171
  } };
2076
4172
  var app_bsky_graph_list_default = {
2077
- lexicon: lexicon$4,
2078
- id: id$4,
2079
- defs: defs$4
4173
+ lexicon: lexicon$5,
4174
+ id: id$5,
4175
+ defs: defs$5
2080
4176
  };
2081
4177
 
2082
4178
  //#endregion
2083
4179
  //#region src/lexicons/app.bsky.graph.listitem.json
2084
4180
  var app_bsky_graph_listitem_exports = /* @__PURE__ */ __exportAll({
2085
4181
  default: () => app_bsky_graph_listitem_default,
2086
- defs: () => defs$3,
2087
- id: () => id$3,
2088
- lexicon: () => lexicon$3
4182
+ defs: () => defs$4,
4183
+ id: () => id$4,
4184
+ lexicon: () => lexicon$4
2089
4185
  });
2090
- var lexicon$3 = 1;
2091
- var id$3 = "app.bsky.graph.listitem";
2092
- var defs$3 = { "main": {
4186
+ var lexicon$4 = 1;
4187
+ var id$4 = "app.bsky.graph.listitem";
4188
+ var defs$4 = { "main": {
2093
4189
  "type": "record",
2094
4190
  "description": "Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records.",
2095
4191
  "key": "tid",
@@ -2119,6 +4215,158 @@ var defs$3 = { "main": {
2119
4215
  }
2120
4216
  } };
2121
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 = {
2122
4370
  lexicon: lexicon$3,
2123
4371
  id: id$3,
2124
4372
  defs: defs$3
@@ -2463,19 +4711,25 @@ var RecordValidator = class {
2463
4711
  */
2464
4712
  loadBlueskySchemas() {
2465
4713
  const schemas = {
4714
+ "./lexicons/app.bsky.actor.defs.json": app_bsky_actor_defs_exports,
2466
4715
  "./lexicons/app.bsky.actor.profile.json": app_bsky_actor_profile_exports,
4716
+ "./lexicons/app.bsky.embed.defs.json": app_bsky_embed_defs_exports,
2467
4717
  "./lexicons/app.bsky.embed.external.json": app_bsky_embed_external_exports,
2468
4718
  "./lexicons/app.bsky.embed.images.json": app_bsky_embed_images_exports,
2469
4719
  "./lexicons/app.bsky.embed.record.json": app_bsky_embed_record_exports,
2470
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,
2471
4723
  "./lexicons/app.bsky.feed.like.json": app_bsky_feed_like_exports,
2472
4724
  "./lexicons/app.bsky.feed.post.json": app_bsky_feed_post_exports,
2473
4725
  "./lexicons/app.bsky.feed.repost.json": app_bsky_feed_repost_exports,
2474
4726
  "./lexicons/app.bsky.feed.threadgate.json": app_bsky_feed_threadgate_exports,
2475
4727
  "./lexicons/app.bsky.graph.block.json": app_bsky_graph_block_exports,
4728
+ "./lexicons/app.bsky.graph.defs.json": app_bsky_graph_defs_exports,
2476
4729
  "./lexicons/app.bsky.graph.follow.json": app_bsky_graph_follow_exports,
2477
4730
  "./lexicons/app.bsky.graph.list.json": app_bsky_graph_list_exports,
2478
4731
  "./lexicons/app.bsky.graph.listitem.json": app_bsky_graph_listitem_exports,
4732
+ "./lexicons/app.bsky.notification.defs.json": app_bsky_notification_defs_exports,
2479
4733
  "./lexicons/app.bsky.richtext.facet.json": app_bsky_richtext_facet_exports,
2480
4734
  "./lexicons/com.atproto.label.defs.json": com_atproto_label_defs_exports,
2481
4735
  "./lexicons/com.atproto.repo.strongRef.json": com_atproto_repo_strongRef_exports
@@ -2494,8 +4748,9 @@ var RecordValidator = class {
2494
4748
  if (this.strictMode) throw new Error(`No lexicon schema loaded for collection: ${collection}. Enable optimistic validation or add the schema.`);
2495
4749
  return;
2496
4750
  }
4751
+ const lexRecord = jsonToLex(record);
2497
4752
  try {
2498
- this.lex.assertValidRecord(collection, record);
4753
+ this.lex.assertValidRecord(collection, lexRecord);
2499
4754
  } catch (error) {
2500
4755
  const message = error instanceof Error ? error.message : String(error);
2501
4756
  throw new Error(`Lexicon validation failed for ${collection}: ${message}`);
@@ -2949,10 +5204,30 @@ async function getAccountStatus(c, accountDO) {
2949
5204
  });
2950
5205
  }
2951
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
+ }
2952
5227
 
2953
5228
  //#endregion
2954
5229
  //#region package.json
2955
- var version = "0.0.2";
5230
+ var version = "0.1.0";
2956
5231
 
2957
5232
  //#endregion
2958
5233
  //#region src/index.ts
@@ -2973,8 +5248,11 @@ try {
2973
5248
  } catch (err) {
2974
5249
  throw new Error(`Invalid DID or handle: ${err instanceof Error ? err.message : String(err)}`);
2975
5250
  }
2976
- const APPVIEW_DID = "did:web:api.bsky.app";
2977
- 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
+ });
2978
5256
  let keypairPromise = null;
2979
5257
  function getKeypair() {
2980
5258
  if (!keypairPromise) keypairPromise = Secp256k1Keypair.import(env$1.SIGNING_KEY);
@@ -2995,11 +5273,11 @@ app.use("*", cors({
2995
5273
  maxAge: 86400
2996
5274
  }));
2997
5275
  function getAccountDO(env$2) {
2998
- const id$16 = env$2.ACCOUNT.idFromName("account");
2999
- return env$2.ACCOUNT.get(id$16);
5276
+ const id$22 = env$2.ACCOUNT.idFromName("account");
5277
+ return env$2.ACCOUNT.get(id$22);
3000
5278
  }
3001
5279
  app.get("/.well-known/did.json", (c) => {
3002
- const didDocument = {
5280
+ const didDocument$1 = {
3003
5281
  "@context": [
3004
5282
  "https://www.w3.org/ns/did/v1",
3005
5283
  "https://w3id.org/security/multikey/v1",
@@ -3019,7 +5297,7 @@ app.get("/.well-known/did.json", (c) => {
3019
5297
  serviceEndpoint: `https://${c.env.PDS_HOSTNAME}`
3020
5298
  }]
3021
5299
  };
3022
- return c.json(didDocument);
5300
+ return c.json(didDocument$1);
3023
5301
  });
3024
5302
  app.get("/.well-known/atproto-did", (c) => {
3025
5303
  if (c.env.HANDLE !== c.env.PDS_HOSTNAME) return c.notFound();
@@ -3060,10 +5338,14 @@ app.post("/xrpc/com.atproto.server.refreshSession", refreshSession);
3060
5338
  app.get("/xrpc/com.atproto.server.getSession", getSession);
3061
5339
  app.post("/xrpc/com.atproto.server.deleteSession", deleteSession);
3062
5340
  app.get("/xrpc/com.atproto.server.getAccountStatus", requireAuth, (c) => getAccountStatus(c, getAccountDO(c.env)));
3063
- app.get("/xrpc/app.bsky.actor.getPreferences", requireAuth, (c) => {
3064
- 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);
3065
5345
  });
3066
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);
3067
5349
  return c.json({});
3068
5350
  });
3069
5351
  app.get("/xrpc/app.bsky.ageassurance.getState", requireAuth, (c) => {
@@ -3080,43 +5362,7 @@ app.post("/admin/emit-identity", requireAuth, async (c) => {
3080
5362
  const result = await getAccountDO(c.env).rpcEmitIdentityEvent(c.env.HANDLE);
3081
5363
  return c.json(result);
3082
5364
  });
3083
- app.all("/xrpc/*", async (c) => {
3084
- const url = new URL(c.req.url);
3085
- url.protocol = "https:";
3086
- const lxm = url.pathname.replace("/xrpc/", "");
3087
- const isChat = lxm.startsWith("chat.bsky.");
3088
- url.host = isChat ? "api.bsky.chat" : "api.bsky.app";
3089
- const audienceDid = isChat ? CHAT_DID : APPVIEW_DID;
3090
- const auth = c.req.header("Authorization");
3091
- let headers = {};
3092
- if (auth?.startsWith("Bearer ")) {
3093
- const token = auth.slice(7);
3094
- const serviceDid = `did:web:${c.env.PDS_HOSTNAME}`;
3095
- try {
3096
- let userDid;
3097
- if (token === c.env.AUTH_TOKEN) userDid = c.env.DID;
3098
- else userDid = (await verifyAccessToken(token, c.env.JWT_SECRET, serviceDid)).sub;
3099
- const keypair = await getKeypair();
3100
- headers["Authorization"] = `Bearer ${await createServiceJwt({
3101
- iss: userDid,
3102
- aud: audienceDid,
3103
- lxm,
3104
- keypair
3105
- })}`;
3106
- } catch {}
3107
- }
3108
- const originalHeaders = Object.fromEntries(c.req.raw.headers);
3109
- delete originalHeaders["authorization"];
3110
- const reqInit = {
3111
- method: c.req.method,
3112
- headers: {
3113
- ...originalHeaders,
3114
- ...headers
3115
- }
3116
- };
3117
- if (c.req.method !== "GET" && c.req.method !== "HEAD") reqInit.body = c.req.raw.body;
3118
- return fetch(url.toString(), reqInit);
3119
- });
5365
+ app.all("/xrpc/*", (c) => handleXrpcProxy(c, didResolver, getKeypair));
3120
5366
  var src_default = app;
3121
5367
 
3122
5368
  //#endregion