[READ ONLY MIRROR] Spark Social AppView Server github.com/sprksocial/server
atproto deno hono lexicon
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: lexicon codegen

+4996 -896
+1 -1
deno.json
··· 9 9 "dev": { 10 10 "dependencies": ["dev:db", "dev:api", "dev:ingest"] 11 11 }, 12 - "codegen": "deno run -A jsr:@atp/lex-gen@^0.1.0-alpha.2 server -o ./lex -i ./lexicons", 12 + "codegen": "deno run -A ../atp/lex-gen/mod.ts server -o ./lex -i ./lexicons", 13 13 "start": "deno run -A main.ts", 14 14 "docker-dev": "docker compose -f compose.dev.yaml up --build --watch" 15 15 },
+280
lex/index.ts
··· 55 55 import type * as ToolsOzoneModerationSearchRepos from "./types/tools/ozone/moderation/searchRepos.ts"; 56 56 import type * as ToolsOzoneModerationGetAccountTimeline from "./types/tools/ozone/moderation/getAccountTimeline.ts"; 57 57 import type * as ToolsOzoneModerationGetRepos from "./types/tools/ozone/moderation/getRepos.ts"; 58 + import type * as AppBskyDraftCreateDraft from "./types/app/bsky/draft/createDraft.ts"; 59 + import type * as AppBskyDraftUpdateDraft from "./types/app/bsky/draft/updateDraft.ts"; 60 + import type * as AppBskyDraftGetDrafts from "./types/app/bsky/draft/getDrafts.ts"; 61 + import type * as AppBskyDraftDeleteDraft from "./types/app/bsky/draft/deleteDraft.ts"; 58 62 import type * as AppBskyVideoUploadVideo from "./types/app/bsky/video/uploadVideo.ts"; 59 63 import type * as AppBskyVideoGetJobStatus from "./types/app/bsky/video/getJobStatus.ts"; 60 64 import type * as AppBskyVideoGetUploadLimits from "./types/app/bsky/video/getUploadLimits.ts"; 65 + import type * as AppBskyContactSendNotification from "./types/app/bsky/contact/sendNotification.ts"; 66 + import type * as AppBskyContactGetSyncStatus from "./types/app/bsky/contact/getSyncStatus.ts"; 67 + import type * as AppBskyContactStartPhoneVerification from "./types/app/bsky/contact/startPhoneVerification.ts"; 68 + import type * as AppBskyContactGetMatches from "./types/app/bsky/contact/getMatches.ts"; 69 + import type * as AppBskyContactImportContacts from "./types/app/bsky/contact/importContacts.ts"; 70 + import type * as AppBskyContactDismissMatch from "./types/app/bsky/contact/dismissMatch.ts"; 71 + import type * as AppBskyContactRemoveData from "./types/app/bsky/contact/removeData.ts"; 72 + import type * as AppBskyContactVerifyPhone from "./types/app/bsky/contact/verifyPhone.ts"; 61 73 import type * as AppBskyBookmarkDeleteBookmark from "./types/app/bsky/bookmark/deleteBookmark.ts"; 62 74 import type * as AppBskyBookmarkGetBookmarks from "./types/app/bsky/bookmark/getBookmarks.ts"; 63 75 import type * as AppBskyBookmarkCreateBookmark from "./types/app/bsky/bookmark/createBookmark.ts"; ··· 73 85 import type * as AppBskyNotificationGetUnreadCount from "./types/app/bsky/notification/getUnreadCount.ts"; 74 86 import type * as AppBskyUnspeccedGetSuggestedFeedsSkeleton from "./types/app/bsky/unspecced/getSuggestedFeedsSkeleton.ts"; 75 87 import type * as AppBskyUnspeccedSearchStarterPacksSkeleton from "./types/app/bsky/unspecced/searchStarterPacksSkeleton.ts"; 88 + import type * as AppBskyUnspeccedGetSuggestedUsersForExplore from "./types/app/bsky/unspecced/getSuggestedUsersForExplore.ts"; 76 89 import type * as AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton from "./types/app/bsky/unspecced/getOnboardingSuggestedStarterPacksSkeleton.ts"; 90 + import type * as AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton from "./types/app/bsky/unspecced/getSuggestedUsersForExploreSkeleton.ts"; 77 91 import type * as AppBskyUnspeccedGetSuggestedUsers from "./types/app/bsky/unspecced/getSuggestedUsers.ts"; 78 92 import type * as AppBskyUnspeccedGetPostThreadOtherV2 from "./types/app/bsky/unspecced/getPostThreadOtherV2.ts"; 79 93 import type * as AppBskyUnspeccedGetSuggestedStarterPacks from "./types/app/bsky/unspecced/getSuggestedStarterPacks.ts"; ··· 85 99 import type * as AppBskyUnspeccedSearchActorsSkeleton from "./types/app/bsky/unspecced/searchActorsSkeleton.ts"; 86 100 import type * as AppBskyUnspeccedGetSuggestionsSkeleton from "./types/app/bsky/unspecced/getSuggestionsSkeleton.ts"; 87 101 import type * as AppBskyUnspeccedSearchPostsSkeleton from "./types/app/bsky/unspecced/searchPostsSkeleton.ts"; 102 + import type * as AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton from "./types/app/bsky/unspecced/getOnboardingSuggestedUsersSkeleton.ts"; 103 + import type * as AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton from "./types/app/bsky/unspecced/getSuggestedUsersForDiscoverSkeleton.ts"; 104 + import type * as AppBskyUnspeccedGetSuggestedUsersForDiscover from "./types/app/bsky/unspecced/getSuggestedUsersForDiscover.ts"; 88 105 import type * as AppBskyUnspeccedGetAgeAssuranceState from "./types/app/bsky/unspecced/getAgeAssuranceState.ts"; 89 106 import type * as AppBskyUnspeccedGetPopularFeedGenerators from "./types/app/bsky/unspecced/getPopularFeedGenerators.ts"; 107 + import type * as AppBskyUnspeccedGetSuggestedOnboardingUsers from "./types/app/bsky/unspecced/getSuggestedOnboardingUsers.ts"; 108 + import type * as AppBskyUnspeccedGetSuggestedUsersForSeeMore from "./types/app/bsky/unspecced/getSuggestedUsersForSeeMore.ts"; 90 109 import type * as AppBskyUnspeccedInitAgeAssurance from "./types/app/bsky/unspecced/initAgeAssurance.ts"; 91 110 import type * as AppBskyUnspeccedGetTrendingTopics from "./types/app/bsky/unspecced/getTrendingTopics.ts"; 92 111 import type * as AppBskyUnspeccedGetTaggedSuggestions from "./types/app/bsky/unspecced/getTaggedSuggestions.ts"; 112 + import type * as AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton from "./types/app/bsky/unspecced/getSuggestedUsersForSeeMoreSkeleton.ts"; 93 113 import type * as AppBskyUnspeccedGetSuggestedFeeds from "./types/app/bsky/unspecced/getSuggestedFeeds.ts"; 94 114 import type * as AppBskyUnspeccedGetTrendsSkeleton from "./types/app/bsky/unspecced/getTrendsSkeleton.ts"; 95 115 import type * as AppBskyUnspeccedGetConfig from "./types/app/bsky/unspecced/getConfig.ts"; ··· 1119 1139 1120 1140 export class AppBskyNS { 1121 1141 _server: Server; 1142 + draft: AppBskyDraftNS; 1122 1143 video: AppBskyVideoNS; 1144 + contact: AppBskyContactNS; 1123 1145 bookmark: AppBskyBookmarkNS; 1124 1146 embed: AppBskyEmbedNS; 1125 1147 notification: AppBskyNotificationNS; ··· 1133 1155 1134 1156 constructor(server: Server) { 1135 1157 this._server = server; 1158 + this.draft = new AppBskyDraftNS(server); 1136 1159 this.video = new AppBskyVideoNS(server); 1160 + this.contact = new AppBskyContactNS(server); 1137 1161 this.bookmark = new AppBskyBookmarkNS(server); 1138 1162 this.embed = new AppBskyEmbedNS(server); 1139 1163 this.notification = new AppBskyNotificationNS(server); ··· 1147 1171 } 1148 1172 } 1149 1173 1174 + export class AppBskyDraftNS { 1175 + _server: Server; 1176 + 1177 + constructor(server: Server) { 1178 + this._server = server; 1179 + } 1180 + 1181 + createDraft<A extends Auth = void>( 1182 + cfg: MethodConfigOrHandler< 1183 + A, 1184 + AppBskyDraftCreateDraft.QueryParams, 1185 + AppBskyDraftCreateDraft.HandlerInput, 1186 + AppBskyDraftCreateDraft.HandlerOutput 1187 + >, 1188 + ) { 1189 + const nsid = "app.bsky.draft.createDraft"; // @ts-ignore - dynamically generated 1190 + return this._server.xrpc.method(nsid, cfg); 1191 + } 1192 + 1193 + updateDraft<A extends Auth = void>( 1194 + cfg: MethodConfigOrHandler< 1195 + A, 1196 + AppBskyDraftUpdateDraft.QueryParams, 1197 + AppBskyDraftUpdateDraft.HandlerInput, 1198 + AppBskyDraftUpdateDraft.HandlerOutput 1199 + >, 1200 + ) { 1201 + const nsid = "app.bsky.draft.updateDraft"; // @ts-ignore - dynamically generated 1202 + return this._server.xrpc.method(nsid, cfg); 1203 + } 1204 + 1205 + getDrafts<A extends Auth = void>( 1206 + cfg: MethodConfigOrHandler< 1207 + A, 1208 + AppBskyDraftGetDrafts.QueryParams, 1209 + AppBskyDraftGetDrafts.HandlerInput, 1210 + AppBskyDraftGetDrafts.HandlerOutput 1211 + >, 1212 + ) { 1213 + const nsid = "app.bsky.draft.getDrafts"; // @ts-ignore - dynamically generated 1214 + return this._server.xrpc.method(nsid, cfg); 1215 + } 1216 + 1217 + deleteDraft<A extends Auth = void>( 1218 + cfg: MethodConfigOrHandler< 1219 + A, 1220 + AppBskyDraftDeleteDraft.QueryParams, 1221 + AppBskyDraftDeleteDraft.HandlerInput, 1222 + AppBskyDraftDeleteDraft.HandlerOutput 1223 + >, 1224 + ) { 1225 + const nsid = "app.bsky.draft.deleteDraft"; // @ts-ignore - dynamically generated 1226 + return this._server.xrpc.method(nsid, cfg); 1227 + } 1228 + } 1229 + 1150 1230 export class AppBskyVideoNS { 1151 1231 _server: Server; 1152 1232 ··· 1191 1271 } 1192 1272 } 1193 1273 1274 + export class AppBskyContactNS { 1275 + _server: Server; 1276 + 1277 + constructor(server: Server) { 1278 + this._server = server; 1279 + } 1280 + 1281 + sendNotification<A extends Auth = void>( 1282 + cfg: MethodConfigOrHandler< 1283 + A, 1284 + AppBskyContactSendNotification.QueryParams, 1285 + AppBskyContactSendNotification.HandlerInput, 1286 + AppBskyContactSendNotification.HandlerOutput 1287 + >, 1288 + ) { 1289 + const nsid = "app.bsky.contact.sendNotification"; // @ts-ignore - dynamically generated 1290 + return this._server.xrpc.method(nsid, cfg); 1291 + } 1292 + 1293 + getSyncStatus<A extends Auth = void>( 1294 + cfg: MethodConfigOrHandler< 1295 + A, 1296 + AppBskyContactGetSyncStatus.QueryParams, 1297 + AppBskyContactGetSyncStatus.HandlerInput, 1298 + AppBskyContactGetSyncStatus.HandlerOutput 1299 + >, 1300 + ) { 1301 + const nsid = "app.bsky.contact.getSyncStatus"; // @ts-ignore - dynamically generated 1302 + return this._server.xrpc.method(nsid, cfg); 1303 + } 1304 + 1305 + startPhoneVerification<A extends Auth = void>( 1306 + cfg: MethodConfigOrHandler< 1307 + A, 1308 + AppBskyContactStartPhoneVerification.QueryParams, 1309 + AppBskyContactStartPhoneVerification.HandlerInput, 1310 + AppBskyContactStartPhoneVerification.HandlerOutput 1311 + >, 1312 + ) { 1313 + const nsid = "app.bsky.contact.startPhoneVerification"; // @ts-ignore - dynamically generated 1314 + return this._server.xrpc.method(nsid, cfg); 1315 + } 1316 + 1317 + getMatches<A extends Auth = void>( 1318 + cfg: MethodConfigOrHandler< 1319 + A, 1320 + AppBskyContactGetMatches.QueryParams, 1321 + AppBskyContactGetMatches.HandlerInput, 1322 + AppBskyContactGetMatches.HandlerOutput 1323 + >, 1324 + ) { 1325 + const nsid = "app.bsky.contact.getMatches"; // @ts-ignore - dynamically generated 1326 + return this._server.xrpc.method(nsid, cfg); 1327 + } 1328 + 1329 + importContacts<A extends Auth = void>( 1330 + cfg: MethodConfigOrHandler< 1331 + A, 1332 + AppBskyContactImportContacts.QueryParams, 1333 + AppBskyContactImportContacts.HandlerInput, 1334 + AppBskyContactImportContacts.HandlerOutput 1335 + >, 1336 + ) { 1337 + const nsid = "app.bsky.contact.importContacts"; // @ts-ignore - dynamically generated 1338 + return this._server.xrpc.method(nsid, cfg); 1339 + } 1340 + 1341 + dismissMatch<A extends Auth = void>( 1342 + cfg: MethodConfigOrHandler< 1343 + A, 1344 + AppBskyContactDismissMatch.QueryParams, 1345 + AppBskyContactDismissMatch.HandlerInput, 1346 + AppBskyContactDismissMatch.HandlerOutput 1347 + >, 1348 + ) { 1349 + const nsid = "app.bsky.contact.dismissMatch"; // @ts-ignore - dynamically generated 1350 + return this._server.xrpc.method(nsid, cfg); 1351 + } 1352 + 1353 + removeData<A extends Auth = void>( 1354 + cfg: MethodConfigOrHandler< 1355 + A, 1356 + AppBskyContactRemoveData.QueryParams, 1357 + AppBskyContactRemoveData.HandlerInput, 1358 + AppBskyContactRemoveData.HandlerOutput 1359 + >, 1360 + ) { 1361 + const nsid = "app.bsky.contact.removeData"; // @ts-ignore - dynamically generated 1362 + return this._server.xrpc.method(nsid, cfg); 1363 + } 1364 + 1365 + verifyPhone<A extends Auth = void>( 1366 + cfg: MethodConfigOrHandler< 1367 + A, 1368 + AppBskyContactVerifyPhone.QueryParams, 1369 + AppBskyContactVerifyPhone.HandlerInput, 1370 + AppBskyContactVerifyPhone.HandlerOutput 1371 + >, 1372 + ) { 1373 + const nsid = "app.bsky.contact.verifyPhone"; // @ts-ignore - dynamically generated 1374 + return this._server.xrpc.method(nsid, cfg); 1375 + } 1376 + } 1377 + 1194 1378 export class AppBskyBookmarkNS { 1195 1379 _server: Server; 1196 1380 ··· 1402 1586 return this._server.xrpc.method(nsid, cfg); 1403 1587 } 1404 1588 1589 + getSuggestedUsersForExplore<A extends Auth = void>( 1590 + cfg: MethodConfigOrHandler< 1591 + A, 1592 + AppBskyUnspeccedGetSuggestedUsersForExplore.QueryParams, 1593 + AppBskyUnspeccedGetSuggestedUsersForExplore.HandlerInput, 1594 + AppBskyUnspeccedGetSuggestedUsersForExplore.HandlerOutput 1595 + >, 1596 + ) { 1597 + const nsid = "app.bsky.unspecced.getSuggestedUsersForExplore"; // @ts-ignore - dynamically generated 1598 + return this._server.xrpc.method(nsid, cfg); 1599 + } 1600 + 1405 1601 getOnboardingSuggestedStarterPacksSkeleton<A extends Auth = void>( 1406 1602 cfg: MethodConfigOrHandler< 1407 1603 A, ··· 1412 1608 ) { 1413 1609 const nsid = 1414 1610 "app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton"; // @ts-ignore - dynamically generated 1611 + return this._server.xrpc.method(nsid, cfg); 1612 + } 1613 + 1614 + getSuggestedUsersForExploreSkeleton<A extends Auth = void>( 1615 + cfg: MethodConfigOrHandler< 1616 + A, 1617 + AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton.QueryParams, 1618 + AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton.HandlerInput, 1619 + AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton.HandlerOutput 1620 + >, 1621 + ) { 1622 + const nsid = "app.bsky.unspecced.getSuggestedUsersForExploreSkeleton"; // @ts-ignore - dynamically generated 1415 1623 return this._server.xrpc.method(nsid, cfg); 1416 1624 } 1417 1625 ··· 1547 1755 return this._server.xrpc.method(nsid, cfg); 1548 1756 } 1549 1757 1758 + getOnboardingSuggestedUsersSkeleton<A extends Auth = void>( 1759 + cfg: MethodConfigOrHandler< 1760 + A, 1761 + AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton.QueryParams, 1762 + AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton.HandlerInput, 1763 + AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton.HandlerOutput 1764 + >, 1765 + ) { 1766 + const nsid = "app.bsky.unspecced.getOnboardingSuggestedUsersSkeleton"; // @ts-ignore - dynamically generated 1767 + return this._server.xrpc.method(nsid, cfg); 1768 + } 1769 + 1770 + getSuggestedUsersForDiscoverSkeleton<A extends Auth = void>( 1771 + cfg: MethodConfigOrHandler< 1772 + A, 1773 + AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton.QueryParams, 1774 + AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton.HandlerInput, 1775 + AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton.HandlerOutput 1776 + >, 1777 + ) { 1778 + const nsid = "app.bsky.unspecced.getSuggestedUsersForDiscoverSkeleton"; // @ts-ignore - dynamically generated 1779 + return this._server.xrpc.method(nsid, cfg); 1780 + } 1781 + 1782 + getSuggestedUsersForDiscover<A extends Auth = void>( 1783 + cfg: MethodConfigOrHandler< 1784 + A, 1785 + AppBskyUnspeccedGetSuggestedUsersForDiscover.QueryParams, 1786 + AppBskyUnspeccedGetSuggestedUsersForDiscover.HandlerInput, 1787 + AppBskyUnspeccedGetSuggestedUsersForDiscover.HandlerOutput 1788 + >, 1789 + ) { 1790 + const nsid = "app.bsky.unspecced.getSuggestedUsersForDiscover"; // @ts-ignore - dynamically generated 1791 + return this._server.xrpc.method(nsid, cfg); 1792 + } 1793 + 1550 1794 getAgeAssuranceState<A extends Auth = void>( 1551 1795 cfg: MethodConfigOrHandler< 1552 1796 A, ··· 1571 1815 return this._server.xrpc.method(nsid, cfg); 1572 1816 } 1573 1817 1818 + getSuggestedOnboardingUsers<A extends Auth = void>( 1819 + cfg: MethodConfigOrHandler< 1820 + A, 1821 + AppBskyUnspeccedGetSuggestedOnboardingUsers.QueryParams, 1822 + AppBskyUnspeccedGetSuggestedOnboardingUsers.HandlerInput, 1823 + AppBskyUnspeccedGetSuggestedOnboardingUsers.HandlerOutput 1824 + >, 1825 + ) { 1826 + const nsid = "app.bsky.unspecced.getSuggestedOnboardingUsers"; // @ts-ignore - dynamically generated 1827 + return this._server.xrpc.method(nsid, cfg); 1828 + } 1829 + 1830 + getSuggestedUsersForSeeMore<A extends Auth = void>( 1831 + cfg: MethodConfigOrHandler< 1832 + A, 1833 + AppBskyUnspeccedGetSuggestedUsersForSeeMore.QueryParams, 1834 + AppBskyUnspeccedGetSuggestedUsersForSeeMore.HandlerInput, 1835 + AppBskyUnspeccedGetSuggestedUsersForSeeMore.HandlerOutput 1836 + >, 1837 + ) { 1838 + const nsid = "app.bsky.unspecced.getSuggestedUsersForSeeMore"; // @ts-ignore - dynamically generated 1839 + return this._server.xrpc.method(nsid, cfg); 1840 + } 1841 + 1574 1842 initAgeAssurance<A extends Auth = void>( 1575 1843 cfg: MethodConfigOrHandler< 1576 1844 A, ··· 1604 1872 >, 1605 1873 ) { 1606 1874 const nsid = "app.bsky.unspecced.getTaggedSuggestions"; // @ts-ignore - dynamically generated 1875 + return this._server.xrpc.method(nsid, cfg); 1876 + } 1877 + 1878 + getSuggestedUsersForSeeMoreSkeleton<A extends Auth = void>( 1879 + cfg: MethodConfigOrHandler< 1880 + A, 1881 + AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton.QueryParams, 1882 + AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton.HandlerInput, 1883 + AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton.HandlerOutput 1884 + >, 1885 + ) { 1886 + const nsid = "app.bsky.unspecced.getSuggestedUsersForSeeMoreSkeleton"; // @ts-ignore - dynamically generated 1607 1887 return this._server.xrpc.method(nsid, cfg); 1608 1888 } 1609 1889
+2083 -13
lex/lexicons.ts
··· 3112 3112 "lex:tools.ozone.moderation.defs#modEventPriorityScore", 3113 3113 "lex:tools.ozone.moderation.defs#ageAssuranceEvent", 3114 3114 "lex:tools.ozone.moderation.defs#ageAssuranceOverrideEvent", 3115 + "lex:tools.ozone.moderation.defs#ageAssurancePurgeEvent", 3115 3116 "lex:tools.ozone.moderation.defs#revokeAccountCredentialsEvent", 3116 3117 "lex:tools.ozone.moderation.defs#scheduleTakedownEvent", 3117 3118 "lex:tools.ozone.moderation.defs#cancelScheduledTakedownEvent", ··· 3189 3190 "lex:tools.ozone.moderation.defs#modEventPriorityScore", 3190 3191 "lex:tools.ozone.moderation.defs#ageAssuranceEvent", 3191 3192 "lex:tools.ozone.moderation.defs#ageAssuranceOverrideEvent", 3193 + "lex:tools.ozone.moderation.defs#ageAssurancePurgeEvent", 3192 3194 "lex:tools.ozone.moderation.defs#revokeAccountCredentialsEvent", 3193 3195 "lex:tools.ozone.moderation.defs#scheduleTakedownEvent", 3194 3196 "lex:tools.ozone.moderation.defs#cancelScheduledTakedownEvent", ··· 3793 3795 }, 3794 3796 "comment": { 3795 3797 "type": "string", 3798 + "minLength": 1, 3796 3799 "description": "Comment describing the reason for the override.", 3797 3800 }, 3798 3801 }, 3799 3802 }, 3803 + "ageAssurancePurgeEvent": { 3804 + "type": "object", 3805 + "description": 3806 + "Purges all age assurance events for the subject. Only works on DID subjects. Moderator-only.", 3807 + "required": [ 3808 + "comment", 3809 + ], 3810 + "properties": { 3811 + "comment": { 3812 + "type": "string", 3813 + "minLength": 1, 3814 + "description": "Comment describing the reason for the purge.", 3815 + }, 3816 + }, 3817 + }, 3800 3818 "revokeAccountCredentialsEvent": { 3801 3819 "type": "object", 3802 3820 "description": ··· 3806 3824 ], 3807 3825 "properties": { 3808 3826 "comment": { 3827 + "minLength": 1, 3809 3828 "type": "string", 3810 3829 "description": "Comment describing the reason for the revocation.", 3811 3830 }, ··· 5266 5285 "lex:tools.ozone.moderation.defs#modEventPriorityScore", 5267 5286 "lex:tools.ozone.moderation.defs#ageAssuranceEvent", 5268 5287 "lex:tools.ozone.moderation.defs#ageAssuranceOverrideEvent", 5288 + "lex:tools.ozone.moderation.defs#ageAssurancePurgeEvent", 5269 5289 "lex:tools.ozone.moderation.defs#revokeAccountCredentialsEvent", 5270 5290 "lex:tools.ozone.moderation.defs#scheduleTakedownEvent", 5271 5291 "lex:tools.ozone.moderation.defs#cancelScheduledTakedownEvent", ··· 5544 5564 }, 5545 5565 }, 5546 5566 }, 5567 + "AppBskyDraftDefs": { 5568 + "lexicon": 1, 5569 + "id": "app.bsky.draft.defs", 5570 + "defs": { 5571 + "draftWithId": { 5572 + "description": 5573 + "A draft with an identifier, used to store drafts in private storage (stash).", 5574 + "type": "object", 5575 + "required": [ 5576 + "id", 5577 + "draft", 5578 + ], 5579 + "properties": { 5580 + "id": { 5581 + "description": "A TID to be used as a draft identifier.", 5582 + "type": "string", 5583 + "format": "tid", 5584 + }, 5585 + "draft": { 5586 + "type": "ref", 5587 + "ref": "lex:app.bsky.draft.defs#draft", 5588 + }, 5589 + }, 5590 + }, 5591 + "draft": { 5592 + "description": "A draft containing an array of draft posts.", 5593 + "type": "object", 5594 + "required": [ 5595 + "posts", 5596 + ], 5597 + "properties": { 5598 + "deviceId": { 5599 + "type": "string", 5600 + "description": 5601 + "UUIDv4 identifier of the device that created this draft.", 5602 + "maxLength": 100, 5603 + }, 5604 + "deviceName": { 5605 + "type": "string", 5606 + "description": 5607 + "The device and/or platform on which the draft was created.", 5608 + "maxLength": 100, 5609 + }, 5610 + "posts": { 5611 + "description": "Array of draft posts that compose this draft.", 5612 + "type": "array", 5613 + "minLength": 1, 5614 + "maxLength": 100, 5615 + "items": { 5616 + "type": "ref", 5617 + "ref": "lex:app.bsky.draft.defs#draftPost", 5618 + }, 5619 + }, 5620 + "langs": { 5621 + "type": "array", 5622 + "description": 5623 + "Indicates human language of posts primary text content.", 5624 + "maxLength": 3, 5625 + "items": { 5626 + "type": "string", 5627 + "format": "language", 5628 + }, 5629 + }, 5630 + "postgateEmbeddingRules": { 5631 + "description": 5632 + "Embedding rules for the postgates to be created when this draft is published.", 5633 + "type": "array", 5634 + "maxLength": 5, 5635 + "items": { 5636 + "type": "union", 5637 + "refs": [ 5638 + "lex:app.bsky.feed.postgate#disableRule", 5639 + ], 5640 + }, 5641 + }, 5642 + "threadgateAllow": { 5643 + "description": 5644 + "Allow-rules for the threadgate to be created when this draft is published.", 5645 + "type": "array", 5646 + "maxLength": 5, 5647 + "items": { 5648 + "type": "union", 5649 + "refs": [ 5650 + "lex:app.bsky.feed.threadgate#mentionRule", 5651 + "lex:app.bsky.feed.threadgate#followerRule", 5652 + "lex:app.bsky.feed.threadgate#followingRule", 5653 + "lex:app.bsky.feed.threadgate#listRule", 5654 + ], 5655 + }, 5656 + }, 5657 + }, 5658 + }, 5659 + "draftPost": { 5660 + "description": "One of the posts that compose a draft.", 5661 + "type": "object", 5662 + "required": [ 5663 + "text", 5664 + ], 5665 + "properties": { 5666 + "text": { 5667 + "type": "string", 5668 + "maxLength": 10000, 5669 + "maxGraphemes": 1000, 5670 + "description": 5671 + "The primary post content. It has a higher limit than post contents to allow storing a larger text that can later be refined into smaller posts.", 5672 + }, 5673 + "labels": { 5674 + "type": "union", 5675 + "description": 5676 + "Self-label values for this post. Effectively content warnings.", 5677 + "refs": [ 5678 + "lex:com.atproto.label.defs#selfLabels", 5679 + ], 5680 + }, 5681 + "embedImages": { 5682 + "type": "array", 5683 + "items": { 5684 + "type": "ref", 5685 + "ref": "lex:app.bsky.draft.defs#draftEmbedImage", 5686 + }, 5687 + "maxLength": 4, 5688 + }, 5689 + "embedVideos": { 5690 + "type": "array", 5691 + "items": { 5692 + "type": "ref", 5693 + "ref": "lex:app.bsky.draft.defs#draftEmbedVideo", 5694 + }, 5695 + "maxLength": 1, 5696 + }, 5697 + "embedExternals": { 5698 + "type": "array", 5699 + "items": { 5700 + "type": "ref", 5701 + "ref": "lex:app.bsky.draft.defs#draftEmbedExternal", 5702 + }, 5703 + "maxLength": 1, 5704 + }, 5705 + "embedRecords": { 5706 + "type": "array", 5707 + "items": { 5708 + "type": "ref", 5709 + "ref": "lex:app.bsky.draft.defs#draftEmbedRecord", 5710 + }, 5711 + "maxLength": 1, 5712 + }, 5713 + }, 5714 + }, 5715 + "draftView": { 5716 + "description": "View to present drafts data to users.", 5717 + "type": "object", 5718 + "required": [ 5719 + "id", 5720 + "draft", 5721 + "createdAt", 5722 + "updatedAt", 5723 + ], 5724 + "properties": { 5725 + "id": { 5726 + "description": "A TID to be used as a draft identifier.", 5727 + "type": "string", 5728 + "format": "tid", 5729 + }, 5730 + "draft": { 5731 + "type": "ref", 5732 + "ref": "lex:app.bsky.draft.defs#draft", 5733 + }, 5734 + "createdAt": { 5735 + "description": "The time the draft was created.", 5736 + "type": "string", 5737 + "format": "datetime", 5738 + }, 5739 + "updatedAt": { 5740 + "description": "The time the draft was last updated.", 5741 + "type": "string", 5742 + "format": "datetime", 5743 + }, 5744 + }, 5745 + }, 5746 + "draftEmbedLocalRef": { 5747 + "type": "object", 5748 + "required": [ 5749 + "path", 5750 + ], 5751 + "properties": { 5752 + "path": { 5753 + "type": "string", 5754 + "description": 5755 + "Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts.", 5756 + "minLength": 1, 5757 + "maxLength": 1024, 5758 + }, 5759 + }, 5760 + }, 5761 + "draftEmbedCaption": { 5762 + "type": "object", 5763 + "required": [ 5764 + "lang", 5765 + "content", 5766 + ], 5767 + "properties": { 5768 + "lang": { 5769 + "type": "string", 5770 + "format": "language", 5771 + }, 5772 + "content": { 5773 + "type": "string", 5774 + "maxLength": 10000, 5775 + }, 5776 + }, 5777 + }, 5778 + "draftEmbedImage": { 5779 + "type": "object", 5780 + "required": [ 5781 + "localRef", 5782 + ], 5783 + "properties": { 5784 + "localRef": { 5785 + "type": "ref", 5786 + "ref": "lex:app.bsky.draft.defs#draftEmbedLocalRef", 5787 + }, 5788 + "alt": { 5789 + "type": "string", 5790 + "maxGraphemes": 2000, 5791 + }, 5792 + }, 5793 + }, 5794 + "draftEmbedVideo": { 5795 + "type": "object", 5796 + "required": [ 5797 + "localRef", 5798 + ], 5799 + "properties": { 5800 + "localRef": { 5801 + "type": "ref", 5802 + "ref": "lex:app.bsky.draft.defs#draftEmbedLocalRef", 5803 + }, 5804 + "alt": { 5805 + "type": "string", 5806 + "maxGraphemes": 2000, 5807 + }, 5808 + "captions": { 5809 + "type": "array", 5810 + "items": { 5811 + "type": "ref", 5812 + "ref": "lex:app.bsky.draft.defs#draftEmbedCaption", 5813 + }, 5814 + "maxLength": 20, 5815 + }, 5816 + }, 5817 + }, 5818 + "draftEmbedExternal": { 5819 + "type": "object", 5820 + "required": [ 5821 + "uri", 5822 + ], 5823 + "properties": { 5824 + "uri": { 5825 + "type": "string", 5826 + "format": "uri", 5827 + }, 5828 + }, 5829 + }, 5830 + "draftEmbedRecord": { 5831 + "type": "object", 5832 + "required": [ 5833 + "record", 5834 + ], 5835 + "properties": { 5836 + "record": { 5837 + "type": "ref", 5838 + "ref": "lex:com.atproto.repo.strongRef", 5839 + }, 5840 + }, 5841 + }, 5842 + }, 5843 + }, 5844 + "AppBskyDraftCreateDraft": { 5845 + "lexicon": 1, 5846 + "id": "app.bsky.draft.createDraft", 5847 + "defs": { 5848 + "main": { 5849 + "type": "procedure", 5850 + "description": 5851 + "Inserts a draft using private storage (stash). An upper limit of drafts might be enforced. Requires authentication.", 5852 + "input": { 5853 + "encoding": "application/json", 5854 + "schema": { 5855 + "type": "object", 5856 + "required": [ 5857 + "draft", 5858 + ], 5859 + "properties": { 5860 + "draft": { 5861 + "type": "ref", 5862 + "ref": "lex:app.bsky.draft.defs#draft", 5863 + }, 5864 + }, 5865 + }, 5866 + }, 5867 + "output": { 5868 + "encoding": "application/json", 5869 + "schema": { 5870 + "type": "object", 5871 + "required": [ 5872 + "id", 5873 + ], 5874 + "properties": { 5875 + "id": { 5876 + "type": "string", 5877 + "description": "The ID of the created draft.", 5878 + }, 5879 + }, 5880 + }, 5881 + }, 5882 + "errors": [ 5883 + { 5884 + "name": "DraftLimitReached", 5885 + "description": 5886 + "Trying to insert a new draft when the limit was already reached.", 5887 + }, 5888 + ], 5889 + }, 5890 + }, 5891 + }, 5892 + "AppBskyDraftUpdateDraft": { 5893 + "lexicon": 1, 5894 + "id": "app.bsky.draft.updateDraft", 5895 + "defs": { 5896 + "main": { 5897 + "type": "procedure", 5898 + "description": 5899 + "Updates a draft using private storage (stash). If the draft ID points to a non-existing ID, the update will be silently ignored. This is done because updates don't enforce draft limit, so it accepts all writes, but will ignore invalid ones. Requires authentication.", 5900 + "input": { 5901 + "encoding": "application/json", 5902 + "schema": { 5903 + "type": "object", 5904 + "required": [ 5905 + "draft", 5906 + ], 5907 + "properties": { 5908 + "draft": { 5909 + "type": "ref", 5910 + "ref": "lex:app.bsky.draft.defs#draftWithId", 5911 + }, 5912 + }, 5913 + }, 5914 + }, 5915 + }, 5916 + }, 5917 + }, 5918 + "AppBskyDraftGetDrafts": { 5919 + "lexicon": 1, 5920 + "id": "app.bsky.draft.getDrafts", 5921 + "defs": { 5922 + "main": { 5923 + "type": "query", 5924 + "description": "Gets views of user drafts. Requires authentication.", 5925 + "parameters": { 5926 + "type": "params", 5927 + "properties": { 5928 + "limit": { 5929 + "type": "integer", 5930 + "minimum": 1, 5931 + "maximum": 100, 5932 + "default": 50, 5933 + }, 5934 + "cursor": { 5935 + "type": "string", 5936 + }, 5937 + }, 5938 + }, 5939 + "output": { 5940 + "encoding": "application/json", 5941 + "schema": { 5942 + "type": "object", 5943 + "required": [ 5944 + "drafts", 5945 + ], 5946 + "properties": { 5947 + "cursor": { 5948 + "type": "string", 5949 + }, 5950 + "drafts": { 5951 + "type": "array", 5952 + "items": { 5953 + "type": "ref", 5954 + "ref": "lex:app.bsky.draft.defs#draftView", 5955 + }, 5956 + }, 5957 + }, 5958 + }, 5959 + }, 5960 + }, 5961 + }, 5962 + }, 5963 + "AppBskyDraftDeleteDraft": { 5964 + "lexicon": 1, 5965 + "id": "app.bsky.draft.deleteDraft", 5966 + "defs": { 5967 + "main": { 5968 + "type": "procedure", 5969 + "description": "Deletes a draft by ID. Requires authentication.", 5970 + "input": { 5971 + "encoding": "application/json", 5972 + "schema": { 5973 + "type": "object", 5974 + "required": [ 5975 + "id", 5976 + ], 5977 + "properties": { 5978 + "id": { 5979 + "type": "string", 5980 + "format": "tid", 5981 + }, 5982 + }, 5983 + }, 5984 + }, 5985 + }, 5986 + }, 5987 + }, 5988 + "AppBskyAuthManageLabelerService": { 5989 + "lexicon": 1, 5990 + "id": "app.bsky.authManageLabelerService", 5991 + "defs": { 5992 + "main": { 5993 + "type": "permission-set", 5994 + "title": "Manage Hosted Labeling Service", 5995 + "title:lang": {}, 5996 + "detail": "Configure labeler declaration records.", 5997 + "detail:lang": {}, 5998 + "permissions": [ 5999 + { 6000 + "type": "permission", 6001 + "resource": "repo", 6002 + "action": [ 6003 + "create", 6004 + "update", 6005 + "delete", 6006 + ], 6007 + "collection": [ 6008 + "app.bsky.labeler.service", 6009 + ], 6010 + }, 6011 + ], 6012 + }, 6013 + }, 6014 + }, 5547 6015 "AppBskyVideoUploadVideo": { 5548 6016 "lexicon": 1, 5549 6017 "id": "app.bsky.video.uploadVideo", ··· 5691 6159 }, 5692 6160 }, 5693 6161 }, 6162 + "AppBskyContactDefs": { 6163 + "lexicon": 1, 6164 + "id": "app.bsky.contact.defs", 6165 + "defs": { 6166 + "matchAndContactIndex": { 6167 + "description": 6168 + "Associates a profile with the positional index of the contact import input in the call to `app.bsky.contact.importContacts`, so clients can know which phone caused a particular match.", 6169 + "type": "object", 6170 + "required": [ 6171 + "match", 6172 + "contactIndex", 6173 + ], 6174 + "properties": { 6175 + "match": { 6176 + "description": "Profile of the matched user.", 6177 + "type": "ref", 6178 + "ref": "lex:app.bsky.actor.defs#profileView", 6179 + }, 6180 + "contactIndex": { 6181 + "description": 6182 + "The index of this match in the import contact input.", 6183 + "type": "integer", 6184 + "minimum": 0, 6185 + "maximum": 999, 6186 + }, 6187 + }, 6188 + }, 6189 + "syncStatus": { 6190 + "type": "object", 6191 + "required": [ 6192 + "syncedAt", 6193 + "matchesCount", 6194 + ], 6195 + "properties": { 6196 + "syncedAt": { 6197 + "description": "Last date when contacts where imported.", 6198 + "type": "string", 6199 + "format": "datetime", 6200 + }, 6201 + "matchesCount": { 6202 + "description": 6203 + "Number of existing contact matches resulting of the user imports and of their imported contacts having imported the user. Matches stop being counted when the user either follows the matched contact or dismisses the match.", 6204 + "type": "integer", 6205 + "minimum": 0, 6206 + }, 6207 + }, 6208 + }, 6209 + "notification": { 6210 + "description": 6211 + "A stash object to be sent via bsync representing a notification to be created.", 6212 + "type": "object", 6213 + "required": [ 6214 + "from", 6215 + "to", 6216 + ], 6217 + "properties": { 6218 + "from": { 6219 + "description": "The DID of who this notification comes from.", 6220 + "type": "string", 6221 + "format": "did", 6222 + }, 6223 + "to": { 6224 + "description": "The DID of who this notification should go to.", 6225 + "type": "string", 6226 + "format": "did", 6227 + }, 6228 + }, 6229 + }, 6230 + }, 6231 + }, 6232 + "AppBskyContactSendNotification": { 6233 + "lexicon": 1, 6234 + "id": "app.bsky.contact.sendNotification", 6235 + "defs": { 6236 + "main": { 6237 + "type": "procedure", 6238 + "description": 6239 + "System endpoint to send notifications related to contact imports. Requires role authentication.", 6240 + "input": { 6241 + "encoding": "application/json", 6242 + "schema": { 6243 + "type": "object", 6244 + "required": [ 6245 + "from", 6246 + "to", 6247 + ], 6248 + "properties": { 6249 + "from": { 6250 + "description": "The DID of who this notification comes from.", 6251 + "type": "string", 6252 + "format": "did", 6253 + }, 6254 + "to": { 6255 + "description": "The DID of who this notification should go to.", 6256 + "type": "string", 6257 + "format": "did", 6258 + }, 6259 + }, 6260 + }, 6261 + }, 6262 + "output": { 6263 + "encoding": "application/json", 6264 + "schema": { 6265 + "type": "object", 6266 + "properties": {}, 6267 + }, 6268 + }, 6269 + }, 6270 + }, 6271 + }, 6272 + "AppBskyContactGetSyncStatus": { 6273 + "lexicon": 1, 6274 + "id": "app.bsky.contact.getSyncStatus", 6275 + "defs": { 6276 + "main": { 6277 + "type": "query", 6278 + "description": 6279 + "Gets the user's current contact import status. Requires authentication.", 6280 + "parameters": { 6281 + "type": "params", 6282 + "properties": {}, 6283 + }, 6284 + "output": { 6285 + "encoding": "application/json", 6286 + "schema": { 6287 + "type": "object", 6288 + "properties": { 6289 + "syncStatus": { 6290 + "description": 6291 + "If present, indicates the user has imported their contacts. If not present, indicates the user never used the feature or called `app.bsky.contact.removeData` and didn't import again since.", 6292 + "type": "ref", 6293 + "ref": "lex:app.bsky.contact.defs#syncStatus", 6294 + }, 6295 + }, 6296 + }, 6297 + }, 6298 + "errors": [ 6299 + { 6300 + "name": "InvalidDid", 6301 + }, 6302 + { 6303 + "name": "InternalError", 6304 + }, 6305 + ], 6306 + }, 6307 + }, 6308 + }, 6309 + "AppBskyContactStartPhoneVerification": { 6310 + "lexicon": 1, 6311 + "id": "app.bsky.contact.startPhoneVerification", 6312 + "defs": { 6313 + "main": { 6314 + "type": "procedure", 6315 + "description": 6316 + "Starts a phone verification flow. The phone passed will receive a code via SMS that should be passed to `app.bsky.contact.verifyPhone`. Requires authentication.", 6317 + "input": { 6318 + "encoding": "application/json", 6319 + "schema": { 6320 + "type": "object", 6321 + "required": [ 6322 + "phone", 6323 + ], 6324 + "properties": { 6325 + "phone": { 6326 + "description": "The phone number to receive the code via SMS.", 6327 + "type": "string", 6328 + }, 6329 + }, 6330 + }, 6331 + }, 6332 + "output": { 6333 + "encoding": "application/json", 6334 + "schema": { 6335 + "type": "object", 6336 + "properties": {}, 6337 + }, 6338 + }, 6339 + "errors": [ 6340 + { 6341 + "name": "RateLimitExceeded", 6342 + }, 6343 + { 6344 + "name": "InvalidDid", 6345 + }, 6346 + { 6347 + "name": "InvalidPhone", 6348 + }, 6349 + { 6350 + "name": "InternalError", 6351 + }, 6352 + ], 6353 + }, 6354 + }, 6355 + }, 6356 + "AppBskyContactGetMatches": { 6357 + "lexicon": 1, 6358 + "id": "app.bsky.contact.getMatches", 6359 + "defs": { 6360 + "main": { 6361 + "type": "query", 6362 + "description": 6363 + "Returns the matched contacts (contacts that were mutually imported). Excludes dismissed matches. Requires authentication.", 6364 + "parameters": { 6365 + "type": "params", 6366 + "properties": { 6367 + "limit": { 6368 + "type": "integer", 6369 + "minimum": 1, 6370 + "maximum": 100, 6371 + "default": 50, 6372 + }, 6373 + "cursor": { 6374 + "type": "string", 6375 + }, 6376 + }, 6377 + }, 6378 + "output": { 6379 + "encoding": "application/json", 6380 + "schema": { 6381 + "type": "object", 6382 + "required": [ 6383 + "matches", 6384 + ], 6385 + "properties": { 6386 + "cursor": { 6387 + "type": "string", 6388 + }, 6389 + "matches": { 6390 + "type": "array", 6391 + "items": { 6392 + "type": "ref", 6393 + "ref": "lex:app.bsky.actor.defs#profileView", 6394 + }, 6395 + }, 6396 + }, 6397 + }, 6398 + }, 6399 + "errors": [ 6400 + { 6401 + "name": "InvalidDid", 6402 + }, 6403 + { 6404 + "name": "InvalidLimit", 6405 + }, 6406 + { 6407 + "name": "InvalidCursor", 6408 + }, 6409 + { 6410 + "name": "InternalError", 6411 + }, 6412 + ], 6413 + }, 6414 + }, 6415 + }, 6416 + "AppBskyContactImportContacts": { 6417 + "lexicon": 1, 6418 + "id": "app.bsky.contact.importContacts", 6419 + "defs": { 6420 + "main": { 6421 + "type": "procedure", 6422 + "description": 6423 + "Import contacts for securely matching with other users. This follows the protocol explained in https://docs.bsky.app/blog/contact-import-rfc. Requires authentication.", 6424 + "input": { 6425 + "encoding": "application/json", 6426 + "schema": { 6427 + "type": "object", 6428 + "required": [ 6429 + "token", 6430 + "contacts", 6431 + ], 6432 + "properties": { 6433 + "token": { 6434 + "description": 6435 + "JWT to authenticate the call. Use the JWT received as a response to the call to `app.bsky.contact.verifyPhone`.", 6436 + "type": "string", 6437 + }, 6438 + "contacts": { 6439 + "description": 6440 + "List of phone numbers in global E.164 format (e.g., '+12125550123'). Phone numbers that cannot be normalized into a valid phone number will be discarded. Should not repeat the 'phone' input used in `app.bsky.contact.verifyPhone`.", 6441 + "type": "array", 6442 + "items": { 6443 + "type": "string", 6444 + }, 6445 + "minLength": 1, 6446 + "maxLength": 1000, 6447 + }, 6448 + }, 6449 + }, 6450 + }, 6451 + "output": { 6452 + "encoding": "application/json", 6453 + "schema": { 6454 + "type": "object", 6455 + "required": [ 6456 + "matchesAndContactIndexes", 6457 + ], 6458 + "properties": { 6459 + "matchesAndContactIndexes": { 6460 + "description": 6461 + "The users that matched during import and their indexes on the input contacts, so the client can correlate with its local list.", 6462 + "type": "array", 6463 + "items": { 6464 + "type": "ref", 6465 + "ref": "lex:app.bsky.contact.defs#matchAndContactIndex", 6466 + }, 6467 + }, 6468 + }, 6469 + }, 6470 + }, 6471 + "errors": [ 6472 + { 6473 + "name": "InvalidDid", 6474 + }, 6475 + { 6476 + "name": "InvalidContacts", 6477 + }, 6478 + { 6479 + "name": "TooManyContacts", 6480 + }, 6481 + { 6482 + "name": "InvalidToken", 6483 + }, 6484 + { 6485 + "name": "InternalError", 6486 + }, 6487 + ], 6488 + }, 6489 + }, 6490 + }, 6491 + "AppBskyContactDismissMatch": { 6492 + "lexicon": 1, 6493 + "id": "app.bsky.contact.dismissMatch", 6494 + "defs": { 6495 + "main": { 6496 + "type": "procedure", 6497 + "description": 6498 + "Removes a match that was found via contact import. It shouldn't appear again if the same contact is re-imported. Requires authentication.", 6499 + "input": { 6500 + "encoding": "application/json", 6501 + "schema": { 6502 + "type": "object", 6503 + "required": [ 6504 + "subject", 6505 + ], 6506 + "properties": { 6507 + "subject": { 6508 + "description": "The subject's DID to dismiss the match with.", 6509 + "type": "string", 6510 + "format": "did", 6511 + }, 6512 + }, 6513 + }, 6514 + }, 6515 + "output": { 6516 + "encoding": "application/json", 6517 + "schema": { 6518 + "type": "object", 6519 + "properties": {}, 6520 + }, 6521 + }, 6522 + "errors": [ 6523 + { 6524 + "name": "InvalidDid", 6525 + }, 6526 + { 6527 + "name": "InternalError", 6528 + }, 6529 + ], 6530 + }, 6531 + }, 6532 + }, 6533 + "AppBskyContactRemoveData": { 6534 + "lexicon": 1, 6535 + "id": "app.bsky.contact.removeData", 6536 + "defs": { 6537 + "main": { 6538 + "type": "procedure", 6539 + "description": 6540 + "Removes all stored hashes used for contact matching, existing matches, and sync status. Requires authentication.", 6541 + "input": { 6542 + "encoding": "application/json", 6543 + "schema": { 6544 + "type": "object", 6545 + "properties": {}, 6546 + }, 6547 + }, 6548 + "output": { 6549 + "encoding": "application/json", 6550 + "schema": { 6551 + "type": "object", 6552 + "properties": {}, 6553 + }, 6554 + }, 6555 + "errors": [ 6556 + { 6557 + "name": "InvalidDid", 6558 + }, 6559 + { 6560 + "name": "InternalError", 6561 + }, 6562 + ], 6563 + }, 6564 + }, 6565 + }, 6566 + "AppBskyContactVerifyPhone": { 6567 + "lexicon": 1, 6568 + "id": "app.bsky.contact.verifyPhone", 6569 + "defs": { 6570 + "main": { 6571 + "type": "procedure", 6572 + "description": 6573 + "Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication.", 6574 + "input": { 6575 + "encoding": "application/json", 6576 + "schema": { 6577 + "type": "object", 6578 + "required": [ 6579 + "phone", 6580 + "code", 6581 + ], 6582 + "properties": { 6583 + "phone": { 6584 + "description": 6585 + "The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`.", 6586 + "type": "string", 6587 + }, 6588 + "code": { 6589 + "description": 6590 + "The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`.", 6591 + "type": "string", 6592 + }, 6593 + }, 6594 + }, 6595 + }, 6596 + "output": { 6597 + "encoding": "application/json", 6598 + "schema": { 6599 + "type": "object", 6600 + "required": [ 6601 + "token", 6602 + ], 6603 + "properties": { 6604 + "token": { 6605 + "description": 6606 + "JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call.", 6607 + "type": "string", 6608 + }, 6609 + }, 6610 + }, 6611 + }, 6612 + "errors": [ 6613 + { 6614 + "name": "RateLimitExceeded", 6615 + }, 6616 + { 6617 + "name": "InvalidDid", 6618 + }, 6619 + { 6620 + "name": "InvalidPhone", 6621 + }, 6622 + { 6623 + "name": "InvalidCode", 6624 + }, 6625 + { 6626 + "name": "InternalError", 6627 + }, 6628 + ], 6629 + }, 6630 + }, 6631 + }, 6632 + "AppBskyAuthManageNotifications": { 6633 + "lexicon": 1, 6634 + "id": "app.bsky.authManageNotifications", 6635 + "defs": { 6636 + "main": { 6637 + "type": "permission-set", 6638 + "title": "Manage Bluesky Notifications", 6639 + "title:lang": {}, 6640 + "detail": "View and configure notifications for the Bluesky app.", 6641 + "detail:lang": {}, 6642 + "permissions": [ 6643 + { 6644 + "type": "permission", 6645 + "resource": "rpc", 6646 + "inheritAud": true, 6647 + "lxm": [ 6648 + "app.bsky.notification.getPreferences", 6649 + "app.bsky.notification.getUnreadCount", 6650 + "app.bsky.notification.listActivitySubscriptions", 6651 + "app.bsky.notification.listNotifications", 6652 + "app.bsky.notification.putActivitySubscription", 6653 + "app.bsky.notification.putPreferences", 6654 + "app.bsky.notification.putPreferencesV2", 6655 + "app.bsky.notification.registerPush", 6656 + "app.bsky.notification.unregisterPush", 6657 + "app.bsky.notification.updateSeen", 6658 + ], 6659 + }, 6660 + ], 6661 + }, 6662 + }, 6663 + }, 5694 6664 "AppBskyBookmarkDefs": { 5695 6665 "lexicon": 1, 5696 6666 "id": "app.bsky.bookmark.defs", ··· 6071 7041 "properties": { 6072 7042 "image": { 6073 7043 "type": "blob", 7044 + "description": 7045 + "The raw image file. May be up to 2 MB, formerly limited to 1 MB.", 6074 7046 "accept": [ 6075 7047 "image/*", 6076 7048 ], 6077 - "maxSize": 1000000, 7049 + "maxSize": 2000000, 6078 7050 }, 6079 7051 "alt": { 6080 7052 "type": "string", ··· 6224 7196 "aspectRatio": { 6225 7197 "type": "ref", 6226 7198 "ref": "lex:app.bsky.embed.defs#aspectRatio", 7199 + }, 7200 + "presentation": { 7201 + "type": "string", 7202 + "description": 7203 + "A hint to the client about how to present the video.", 7204 + "knownValues": [ 7205 + "default", 7206 + "gif", 7207 + ], 6227 7208 }, 6228 7209 }, 6229 7210 }, ··· 6275 7256 "type": "ref", 6276 7257 "ref": "lex:app.bsky.embed.defs#aspectRatio", 6277 7258 }, 7259 + "presentation": { 7260 + "type": "string", 7261 + "description": 7262 + "A hint to the client about how to present the video.", 7263 + "knownValues": [ 7264 + "default", 7265 + "gif", 7266 + ], 7267 + }, 6278 7268 }, 6279 7269 }, 6280 7270 }, ··· 6362 7352 }, 6363 7353 }, 6364 7354 }, 7355 + "AppBskyAuthDeleteContent": { 7356 + "lexicon": 1, 7357 + "id": "app.bsky.authDeleteContent", 7358 + "defs": { 7359 + "main": { 7360 + "type": "permission-set", 7361 + "title": "Delete Bluesky Content", 7362 + "title:lang": {}, 7363 + "detail": "Clean up public account history: posts, reposts, and likes.", 7364 + "detail:lang": {}, 7365 + "permissions": [ 7366 + { 7367 + "type": "permission", 7368 + "resource": "repo", 7369 + "action": [ 7370 + "delete", 7371 + ], 7372 + "collection": [ 7373 + "app.bsky.feed.like", 7374 + "app.bsky.feed.post", 7375 + "app.bsky.feed.postgate", 7376 + "app.bsky.feed.repost", 7377 + "app.bsky.feed.threadgate", 7378 + ], 7379 + }, 7380 + ], 7381 + }, 7382 + }, 7383 + }, 7384 + "AppBskyAuthCreatePosts": { 7385 + "lexicon": 1, 7386 + "id": "app.bsky.authCreatePosts", 7387 + "defs": { 7388 + "main": { 7389 + "type": "permission-set", 7390 + "title": "Create Bluesky Posts", 7391 + "title:lang": {}, 7392 + "detail": "Can not update or delete posts.", 7393 + "detail:lang": {}, 7394 + "permissions": [ 7395 + { 7396 + "type": "permission", 7397 + "resource": "rpc", 7398 + "inheritAud": true, 7399 + "lxm": [ 7400 + "app.bsky.video.uploadVideo", 7401 + "app.bsky.video.getJobStatus", 7402 + "app.bsky.video.getUploadLimits", 7403 + ], 7404 + }, 7405 + { 7406 + "type": "permission", 7407 + "resource": "repo", 7408 + "action": [ 7409 + "create", 7410 + ], 7411 + "collection": [ 7412 + "app.bsky.feed.post", 7413 + "app.bsky.feed.postgate", 7414 + "app.bsky.feed.threadgate", 7415 + ], 7416 + }, 7417 + ], 7418 + }, 7419 + }, 7420 + }, 6365 7421 "AppBskyNotificationDefs": { 6366 7422 "lexicon": 1, 6367 7423 "id": "app.bsky.notification.defs", ··· 7027 8083 "like-via-repost", 7028 8084 "repost-via-repost", 7029 8085 "subscribed-post", 8086 + "contact-match", 7030 8087 ], 7031 8088 }, 7032 8089 "reasonSubject": { ··· 7206 8263 "name": "BadQueryString", 7207 8264 }, 7208 8265 ], 8266 + }, 8267 + }, 8268 + }, 8269 + "AppBskyUnspeccedGetSuggestedUsersForExplore": { 8270 + "lexicon": 1, 8271 + "id": "app.bsky.unspecced.getSuggestedUsersForExplore", 8272 + "defs": { 8273 + "main": { 8274 + "type": "query", 8275 + "description": "Get a list of suggested users for the Explore page", 8276 + "parameters": { 8277 + "type": "params", 8278 + "properties": { 8279 + "category": { 8280 + "type": "string", 8281 + "description": "Category of users to get suggestions for.", 8282 + }, 8283 + "limit": { 8284 + "type": "integer", 8285 + "minimum": 1, 8286 + "maximum": 50, 8287 + "default": 25, 8288 + }, 8289 + }, 8290 + }, 8291 + "output": { 8292 + "encoding": "application/json", 8293 + "schema": { 8294 + "type": "object", 8295 + "required": [ 8296 + "actors", 8297 + ], 8298 + "properties": { 8299 + "actors": { 8300 + "type": "array", 8301 + "items": { 8302 + "type": "ref", 8303 + "ref": "lex:app.bsky.actor.defs#profileView", 8304 + }, 8305 + }, 8306 + "recIdStr": { 8307 + "type": "string", 8308 + "description": 8309 + "Snowflake for this recommendation, use when submitting recommendation events.", 8310 + }, 8311 + }, 8312 + }, 8313 + }, 7209 8314 }, 7210 8315 }, 7211 8316 }, ··· 7545 8650 }, 7546 8651 }, 7547 8652 }, 8653 + "AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton": { 8654 + "lexicon": 1, 8655 + "id": "app.bsky.unspecced.getSuggestedUsersForExploreSkeleton", 8656 + "defs": { 8657 + "main": { 8658 + "type": "query", 8659 + "description": 8660 + "Get a skeleton of suggested users for the Explore page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForExplore", 8661 + "parameters": { 8662 + "type": "params", 8663 + "properties": { 8664 + "viewer": { 8665 + "type": "string", 8666 + "format": "did", 8667 + "description": 8668 + "DID of the account making the request (not included for public/unauthenticated queries).", 8669 + }, 8670 + "category": { 8671 + "type": "string", 8672 + "description": "Category of users to get suggestions for.", 8673 + }, 8674 + "limit": { 8675 + "type": "integer", 8676 + "minimum": 1, 8677 + "maximum": 50, 8678 + "default": 25, 8679 + }, 8680 + }, 8681 + }, 8682 + "output": { 8683 + "encoding": "application/json", 8684 + "schema": { 8685 + "type": "object", 8686 + "required": [ 8687 + "dids", 8688 + ], 8689 + "properties": { 8690 + "dids": { 8691 + "type": "array", 8692 + "items": { 8693 + "type": "string", 8694 + "format": "did", 8695 + }, 8696 + }, 8697 + "recIdStr": { 8698 + "type": "string", 8699 + "description": 8700 + "Snowflake for this recommendation, use when submitting recommendation events.", 8701 + }, 8702 + }, 8703 + }, 8704 + }, 8705 + }, 8706 + }, 8707 + }, 7548 8708 "AppBskyUnspeccedGetSuggestedUsers": { 7549 8709 "lexicon": 1, 7550 8710 "id": "app.bsky.unspecced.getSuggestedUsers", ··· 7581 8741 "type": "ref", 7582 8742 "ref": "lex:app.bsky.actor.defs#profileView", 7583 8743 }, 8744 + }, 8745 + "recId": { 8746 + "type": "string", 8747 + "description": "DEPRECATED: use recIdStr instead.", 8748 + }, 8749 + "recIdStr": { 8750 + "type": "string", 8751 + "description": 8752 + "Snowflake for this recommendation, use when submitting recommendation events.", 7584 8753 }, 7585 8754 }, 7586 8755 }, ··· 7827 8996 "format": "did", 7828 8997 }, 7829 8998 }, 8999 + "recId": { 9000 + "type": "string", 9001 + "description": "DEPRECATED: use recIdStr instead.", 9002 + }, 9003 + "recIdStr": { 9004 + "type": "string", 9005 + "description": 9006 + "Snowflake for this recommendation, use when submitting recommendation events.", 9007 + }, 7830 9008 }, 7831 9009 }, 7832 9010 }, ··· 8122 9300 }, 8123 9301 "recId": { 8124 9302 "type": "integer", 9303 + "description": "DEPRECATED: use recIdStr instead.", 9304 + }, 9305 + "recIdStr": { 9306 + "type": "string", 8125 9307 "description": 8126 9308 "Snowflake for this recommendation, use when submitting recommendation events.", 8127 9309 }, ··· 8260 9442 }, 8261 9443 }, 8262 9444 }, 9445 + "AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton": { 9446 + "lexicon": 1, 9447 + "id": "app.bsky.unspecced.getOnboardingSuggestedUsersSkeleton", 9448 + "defs": { 9449 + "main": { 9450 + "type": "query", 9451 + "description": 9452 + "Get a skeleton of suggested users for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedOnboardingUsers", 9453 + "parameters": { 9454 + "type": "params", 9455 + "properties": { 9456 + "viewer": { 9457 + "type": "string", 9458 + "format": "did", 9459 + "description": 9460 + "DID of the account making the request (not included for public/unauthenticated queries).", 9461 + }, 9462 + "category": { 9463 + "type": "string", 9464 + "description": "Category of users to get suggestions for.", 9465 + }, 9466 + "limit": { 9467 + "type": "integer", 9468 + "minimum": 1, 9469 + "maximum": 50, 9470 + "default": 25, 9471 + }, 9472 + }, 9473 + }, 9474 + "output": { 9475 + "encoding": "application/json", 9476 + "schema": { 9477 + "type": "object", 9478 + "required": [ 9479 + "dids", 9480 + ], 9481 + "properties": { 9482 + "dids": { 9483 + "type": "array", 9484 + "items": { 9485 + "type": "string", 9486 + "format": "did", 9487 + }, 9488 + }, 9489 + "recId": { 9490 + "type": "string", 9491 + "description": "DEPRECATED: use recIdStr instead.", 9492 + }, 9493 + "recIdStr": { 9494 + "type": "string", 9495 + "description": 9496 + "Snowflake for this recommendation, use when submitting recommendation events.", 9497 + }, 9498 + }, 9499 + }, 9500 + }, 9501 + }, 9502 + }, 9503 + }, 9504 + "AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton": { 9505 + "lexicon": 1, 9506 + "id": "app.bsky.unspecced.getSuggestedUsersForDiscoverSkeleton", 9507 + "defs": { 9508 + "main": { 9509 + "type": "query", 9510 + "description": 9511 + "Get a skeleton of suggested users for the Discover page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForDiscover", 9512 + "parameters": { 9513 + "type": "params", 9514 + "properties": { 9515 + "viewer": { 9516 + "type": "string", 9517 + "format": "did", 9518 + "description": 9519 + "DID of the account making the request (not included for public/unauthenticated queries).", 9520 + }, 9521 + "limit": { 9522 + "type": "integer", 9523 + "minimum": 1, 9524 + "maximum": 50, 9525 + "default": 25, 9526 + }, 9527 + }, 9528 + }, 9529 + "output": { 9530 + "encoding": "application/json", 9531 + "schema": { 9532 + "type": "object", 9533 + "required": [ 9534 + "dids", 9535 + ], 9536 + "properties": { 9537 + "dids": { 9538 + "type": "array", 9539 + "items": { 9540 + "type": "string", 9541 + "format": "did", 9542 + }, 9543 + }, 9544 + "recIdStr": { 9545 + "type": "string", 9546 + "description": 9547 + "Snowflake for this recommendation, use when submitting recommendation events.", 9548 + }, 9549 + }, 9550 + }, 9551 + }, 9552 + }, 9553 + }, 9554 + }, 9555 + "AppBskyUnspeccedGetSuggestedUsersForDiscover": { 9556 + "lexicon": 1, 9557 + "id": "app.bsky.unspecced.getSuggestedUsersForDiscover", 9558 + "defs": { 9559 + "main": { 9560 + "type": "query", 9561 + "description": "Get a list of suggested users for the Discover page", 9562 + "parameters": { 9563 + "type": "params", 9564 + "properties": { 9565 + "limit": { 9566 + "type": "integer", 9567 + "minimum": 1, 9568 + "maximum": 50, 9569 + "default": 25, 9570 + }, 9571 + }, 9572 + }, 9573 + "output": { 9574 + "encoding": "application/json", 9575 + "schema": { 9576 + "type": "object", 9577 + "required": [ 9578 + "actors", 9579 + ], 9580 + "properties": { 9581 + "actors": { 9582 + "type": "array", 9583 + "items": { 9584 + "type": "ref", 9585 + "ref": "lex:app.bsky.actor.defs#profileView", 9586 + }, 9587 + }, 9588 + "recIdStr": { 9589 + "type": "string", 9590 + "description": 9591 + "Snowflake for this recommendation, use when submitting recommendation events.", 9592 + }, 9593 + }, 9594 + }, 9595 + }, 9596 + }, 9597 + }, 9598 + }, 8263 9599 "AppBskyUnspeccedGetAgeAssuranceState": { 8264 9600 "lexicon": 1, 8265 9601 "id": "app.bsky.unspecced.getAgeAssuranceState", ··· 8326 9662 }, 8327 9663 }, 8328 9664 }, 9665 + "AppBskyUnspeccedGetSuggestedOnboardingUsers": { 9666 + "lexicon": 1, 9667 + "id": "app.bsky.unspecced.getSuggestedOnboardingUsers", 9668 + "defs": { 9669 + "main": { 9670 + "type": "query", 9671 + "description": "Get a list of suggested users for onboarding", 9672 + "parameters": { 9673 + "type": "params", 9674 + "properties": { 9675 + "category": { 9676 + "type": "string", 9677 + "description": "Category of users to get suggestions for.", 9678 + }, 9679 + "limit": { 9680 + "type": "integer", 9681 + "minimum": 1, 9682 + "maximum": 50, 9683 + "default": 25, 9684 + }, 9685 + }, 9686 + }, 9687 + "output": { 9688 + "encoding": "application/json", 9689 + "schema": { 9690 + "type": "object", 9691 + "required": [ 9692 + "actors", 9693 + ], 9694 + "properties": { 9695 + "actors": { 9696 + "type": "array", 9697 + "items": { 9698 + "type": "ref", 9699 + "ref": "lex:app.bsky.actor.defs#profileView", 9700 + }, 9701 + }, 9702 + "recId": { 9703 + "type": "string", 9704 + "description": "DEPRECATED: use recIdStr instead.", 9705 + }, 9706 + "recIdStr": { 9707 + "type": "string", 9708 + "description": 9709 + "Snowflake for this recommendation, use when submitting recommendation events.", 9710 + }, 9711 + }, 9712 + }, 9713 + }, 9714 + }, 9715 + }, 9716 + }, 9717 + "AppBskyUnspeccedGetSuggestedUsersForSeeMore": { 9718 + "lexicon": 1, 9719 + "id": "app.bsky.unspecced.getSuggestedUsersForSeeMore", 9720 + "defs": { 9721 + "main": { 9722 + "type": "query", 9723 + "description": "Get a list of suggested users for the See More page", 9724 + "parameters": { 9725 + "type": "params", 9726 + "properties": { 9727 + "category": { 9728 + "type": "string", 9729 + "description": "Category of users to get suggestions for.", 9730 + }, 9731 + "limit": { 9732 + "type": "integer", 9733 + "minimum": 1, 9734 + "maximum": 50, 9735 + "default": 25, 9736 + }, 9737 + }, 9738 + }, 9739 + "output": { 9740 + "encoding": "application/json", 9741 + "schema": { 9742 + "type": "object", 9743 + "required": [ 9744 + "actors", 9745 + ], 9746 + "properties": { 9747 + "actors": { 9748 + "type": "array", 9749 + "items": { 9750 + "type": "ref", 9751 + "ref": "lex:app.bsky.actor.defs#profileView", 9752 + }, 9753 + }, 9754 + "recIdStr": { 9755 + "type": "string", 9756 + "description": 9757 + "Snowflake for this recommendation, use when submitting recommendation events.", 9758 + }, 9759 + }, 9760 + }, 9761 + }, 9762 + }, 9763 + }, 9764 + }, 8329 9765 "AppBskyUnspeccedInitAgeAssurance": { 8330 9766 "lexicon": 1, 8331 9767 "id": "app.bsky.unspecced.initAgeAssurance", ··· 8494 9930 }, 8495 9931 }, 8496 9932 }, 9933 + "AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton": { 9934 + "lexicon": 1, 9935 + "id": "app.bsky.unspecced.getSuggestedUsersForSeeMoreSkeleton", 9936 + "defs": { 9937 + "main": { 9938 + "type": "query", 9939 + "description": 9940 + "Get a skeleton of suggested users for the See More page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForSeeMore", 9941 + "parameters": { 9942 + "type": "params", 9943 + "properties": { 9944 + "viewer": { 9945 + "type": "string", 9946 + "format": "did", 9947 + "description": 9948 + "DID of the account making the request (not included for public/unauthenticated queries).", 9949 + }, 9950 + "category": { 9951 + "type": "string", 9952 + "description": "Category of users to get suggestions for.", 9953 + }, 9954 + "limit": { 9955 + "type": "integer", 9956 + "minimum": 1, 9957 + "maximum": 50, 9958 + "default": 25, 9959 + }, 9960 + }, 9961 + }, 9962 + "output": { 9963 + "encoding": "application/json", 9964 + "schema": { 9965 + "type": "object", 9966 + "required": [ 9967 + "dids", 9968 + ], 9969 + "properties": { 9970 + "dids": { 9971 + "type": "array", 9972 + "items": { 9973 + "type": "string", 9974 + "format": "did", 9975 + }, 9976 + }, 9977 + "recIdStr": { 9978 + "type": "string", 9979 + "description": 9980 + "Snowflake for this recommendation, use when submitting recommendation events.", 9981 + }, 9982 + }, 9983 + }, 9984 + }, 9985 + }, 9986 + }, 9987 + }, 8497 9988 "AppBskyUnspeccedGetSuggestedFeeds": { 8498 9989 "lexicon": 1, 8499 9990 "id": "app.bsky.unspecced.getSuggestedFeeds", ··· 8706 10197 "ref": "lex:app.bsky.actor.defs#profileView", 8707 10198 }, 8708 10199 }, 10200 + "recIdStr": { 10201 + "type": "string", 10202 + "description": 10203 + "Snowflake for this recommendation, use when submitting recommendation events.", 10204 + }, 8709 10205 "isFallback": { 8710 10206 "type": "boolean", 8711 10207 "description": 8712 - "If true, response has fallen-back to generic results, and is not scoped using relativeToDid", 10208 + "DEPRECATED, unused. Previously: if true, response has fallen-back to generic results, and is not scoped using relativeToDid", 8713 10209 "default": false, 8714 10210 }, 8715 10211 "recId": { 8716 10212 "type": "integer", 8717 - "description": 8718 - "Snowflake for this recommendation, use when submitting recommendation events.", 10213 + "description": "DEPRECATED: use recIdStr instead.", 8719 10214 }, 8720 10215 }, 8721 10216 }, ··· 9192 10687 "format": "at-uri", 9193 10688 "description": 9194 10689 "if the actor is followed by this DID, contains the AT-URI of the follow record", 10690 + }, 10691 + "blocking": { 10692 + "type": "string", 10693 + "format": "at-uri", 10694 + "description": 10695 + "if the actor blocks this DID, this is the AT-URI of the block record", 10696 + }, 10697 + "blockedBy": { 10698 + "type": "string", 10699 + "format": "at-uri", 10700 + "description": 10701 + "if the actor is blocked by this DID, contains the AT-URI of the block record", 10702 + }, 10703 + "blockingByList": { 10704 + "type": "string", 10705 + "format": "at-uri", 10706 + "description": 10707 + "if the actor blocks this DID via a block list, this is the AT-URI of the listblock record", 10708 + }, 10709 + "blockedByList": { 10710 + "type": "string", 10711 + "format": "at-uri", 10712 + "description": 10713 + "if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record", 9195 10714 }, 9196 10715 }, 9197 10716 }, ··· 10374 11893 }, 10375 11894 }, 10376 11895 }, 11896 + "AppBskyAuthFullApp": { 11897 + "lexicon": 1, 11898 + "id": "app.bsky.authFullApp", 11899 + "defs": { 11900 + "main": { 11901 + "type": "permission-set", 11902 + "title": "Full Bluesky Social App Permissions", 11903 + "title:lang": {}, 11904 + "detail": 11905 + "Manage all public content and interactions, private preferences and subscriptions, and other Bluesky-specific app features and data.", 11906 + "detail:lang": {}, 11907 + "permissions": [ 11908 + { 11909 + "type": "permission", 11910 + "resource": "rpc", 11911 + "inheritAud": true, 11912 + "lxm": [ 11913 + "app.bsky.actor.getPreferences", 11914 + "app.bsky.actor.getProfile", 11915 + "app.bsky.actor.getProfiles", 11916 + "app.bsky.actor.getSuggestions", 11917 + "app.bsky.actor.putPreferences", 11918 + "app.bsky.actor.searchActors", 11919 + "app.bsky.actor.searchActorsTypeahead", 11920 + "app.bsky.bookmark.createBookmark", 11921 + "app.bsky.bookmark.deleteBookmark", 11922 + "app.bsky.bookmark.getBookmarks", 11923 + "app.bsky.contact.dismissMatch", 11924 + "app.bsky.contact.getMatches", 11925 + "app.bsky.contact.getSyncStatus", 11926 + "app.bsky.contact.importContacts", 11927 + "app.bsky.contact.removeData", 11928 + "app.bsky.contact.startPhoneVerification", 11929 + "app.bsky.contact.verifyPhone", 11930 + "app.bsky.feed.describeFeedGenerator", 11931 + "app.bsky.feed.getActorFeeds", 11932 + "app.bsky.feed.getActorLikes", 11933 + "app.bsky.feed.getAuthorFeed", 11934 + "app.bsky.feed.getFeed", 11935 + "app.bsky.feed.getFeedGenerator", 11936 + "app.bsky.feed.getFeedGenerators", 11937 + "app.bsky.feed.getFeedSkeleton", 11938 + "app.bsky.feed.getLikes", 11939 + "app.bsky.feed.getListFeed", 11940 + "app.bsky.feed.getPostThread", 11941 + "app.bsky.feed.getPosts", 11942 + "app.bsky.feed.getQuotes", 11943 + "app.bsky.feed.getRepostedBy", 11944 + "app.bsky.feed.getSuggestedFeeds", 11945 + "app.bsky.feed.getTimeline", 11946 + "app.bsky.feed.searchPosts", 11947 + "app.bsky.feed.sendInteractions", 11948 + "app.bsky.graph.getActorStarterPacks", 11949 + "app.bsky.graph.getBlocks", 11950 + "app.bsky.graph.getFollowers", 11951 + "app.bsky.graph.getFollows", 11952 + "app.bsky.graph.getKnownFollowers", 11953 + "app.bsky.graph.getList", 11954 + "app.bsky.graph.getListBlocks", 11955 + "app.bsky.graph.getListMutes", 11956 + "app.bsky.graph.getLists", 11957 + "app.bsky.graph.getListsWithMembership", 11958 + "app.bsky.graph.getMutes", 11959 + "app.bsky.graph.getRelationships", 11960 + "app.bsky.graph.getStarterPack", 11961 + "app.bsky.graph.getStarterPacks", 11962 + "app.bsky.graph.getStarterPacksWithMembership", 11963 + "app.bsky.graph.getSuggestedFollowsByActor", 11964 + "app.bsky.graph.muteActor", 11965 + "app.bsky.graph.muteActorList", 11966 + "app.bsky.graph.muteThread", 11967 + "app.bsky.graph.searchStarterPacks", 11968 + "app.bsky.graph.unmuteActor", 11969 + "app.bsky.graph.unmuteActorList", 11970 + "app.bsky.graph.unmuteThread", 11971 + "app.bsky.labeler.getServices", 11972 + "app.bsky.notification.getPreferences", 11973 + "app.bsky.notification.getUnreadCount", 11974 + "app.bsky.notification.listActivitySubscriptions", 11975 + "app.bsky.notification.listNotifications", 11976 + "app.bsky.notification.putActivitySubscription", 11977 + "app.bsky.notification.putPreferences", 11978 + "app.bsky.notification.putPreferencesV2", 11979 + "app.bsky.notification.registerPush", 11980 + "app.bsky.notification.unregisterPush", 11981 + "app.bsky.notification.updateSeen", 11982 + "app.bsky.unspecced.getAgeAssuranceState", 11983 + "app.bsky.unspecced.getConfig", 11984 + "app.bsky.unspecced.getOnboardingSuggestedStarterPacks", 11985 + "app.bsky.unspecced.getPopularFeedGenerators", 11986 + "app.bsky.unspecced.getPostThreadOtherV2", 11987 + "app.bsky.unspecced.getPostThreadV2", 11988 + "app.bsky.unspecced.getSuggestedFeeds", 11989 + "app.bsky.unspecced.getSuggestedFeedsSkeleton", 11990 + "app.bsky.unspecced.getSuggestedStarterPacks", 11991 + "app.bsky.unspecced.getSuggestedStarterPacksSkeleton", 11992 + "app.bsky.unspecced.getSuggestedUsers", 11993 + "app.bsky.unspecced.getSuggestedUsersSkeleton", 11994 + "app.bsky.unspecced.getSuggestionsSkeleton", 11995 + "app.bsky.unspecced.getTaggedSuggestions", 11996 + "app.bsky.unspecced.getTrendingTopics", 11997 + "app.bsky.unspecced.getTrends", 11998 + "app.bsky.unspecced.getTrendsSkeleton", 11999 + "app.bsky.unspecced.initAgeAssurance", 12000 + "app.bsky.unspecced.searchActorsSkeleton", 12001 + "app.bsky.unspecced.searchPostsSkeleton", 12002 + "app.bsky.unspecced.searchStarterPacksSkeleton", 12003 + "app.bsky.video.getJobStatus", 12004 + "app.bsky.video.getUploadLimits", 12005 + "app.bsky.video.uploadVideo", 12006 + ], 12007 + }, 12008 + { 12009 + "type": "permission", 12010 + "resource": "repo", 12011 + "action": [ 12012 + "create", 12013 + "update", 12014 + "delete", 12015 + ], 12016 + "collection": [ 12017 + "app.bsky.actor.profile", 12018 + "app.bsky.actor.status", 12019 + "app.bsky.feed.like", 12020 + "app.bsky.feed.post", 12021 + "app.bsky.feed.postgate", 12022 + "app.bsky.feed.repost", 12023 + "app.bsky.feed.threadgate", 12024 + "app.bsky.graph.block", 12025 + "app.bsky.graph.follow", 12026 + "app.bsky.graph.list", 12027 + "app.bsky.graph.listblock", 12028 + "app.bsky.graph.listitem", 12029 + "app.bsky.graph.starterpack", 12030 + "app.bsky.notification.declaration", 12031 + ], 12032 + }, 12033 + ], 12034 + }, 12035 + }, 12036 + }, 12037 + "AppBskyAuthManageModeration": { 12038 + "lexicon": 1, 12039 + "id": "app.bsky.authManageModeration", 12040 + "defs": { 12041 + "main": { 12042 + "type": "permission-set", 12043 + "title": "Manage Personal Moderation", 12044 + "title:lang": {}, 12045 + "detail": 12046 + "Control over blocks, mutes, mod lists, mod services, and preferences.", 12047 + "detail:lang": {}, 12048 + "permissions": [ 12049 + { 12050 + "type": "permission", 12051 + "resource": "rpc", 12052 + "inheritAud": true, 12053 + "lxm": [ 12054 + "app.bsky.actor.getPreferences", 12055 + "app.bsky.actor.putPreferences", 12056 + "app.bsky.graph.muteActor", 12057 + "app.bsky.graph.muteActorList", 12058 + "app.bsky.graph.muteThread", 12059 + "app.bsky.graph.unmuteActor", 12060 + "app.bsky.graph.unmuteActorList", 12061 + "app.bsky.graph.unmuteThread", 12062 + ], 12063 + }, 12064 + { 12065 + "type": "permission", 12066 + "resource": "repo", 12067 + "action": [ 12068 + "create", 12069 + "update", 12070 + "delete", 12071 + ], 12072 + "collection": [ 12073 + "app.bsky.graph.block", 12074 + "app.bsky.graph.listblock", 12075 + ], 12076 + }, 12077 + ], 12078 + }, 12079 + }, 12080 + }, 10377 12081 "AppBskyFeedGenerator": { 10378 12082 "lexicon": 1, 10379 12083 "id": "app.bsky.feed.generator", ··· 10464 12168 "interactions", 10465 12169 ], 10466 12170 "properties": { 12171 + "feed": { 12172 + "type": "string", 12173 + "format": "at-uri", 12174 + }, 10467 12175 "interactions": { 10468 12176 "type": "array", 10469 12177 "items": { ··· 12582 14290 }, 12583 14291 }, 12584 14292 }, 14293 + "AppBskyAuthViewAll": { 14294 + "lexicon": 1, 14295 + "id": "app.bsky.authViewAll", 14296 + "defs": { 14297 + "main": { 14298 + "type": "permission-set", 14299 + "title": "Read-only access to all content", 14300 + "title:lang": {}, 14301 + "detail": 14302 + "View Bluesky network content from account perspective, and read all notifications and preferences.", 14303 + "detail:lang": {}, 14304 + "permissions": [ 14305 + { 14306 + "type": "permission", 14307 + "resource": "rpc", 14308 + "inheritAud": true, 14309 + "lxm": [ 14310 + "app.bsky.actor.getPreferences", 14311 + "app.bsky.actor.getProfile", 14312 + "app.bsky.actor.getProfiles", 14313 + "app.bsky.actor.getSuggestions", 14314 + "app.bsky.actor.searchActors", 14315 + "app.bsky.actor.searchActorsTypeahead", 14316 + "app.bsky.bookmark.getBookmarks", 14317 + "app.bsky.feed.describeFeedGenerator", 14318 + "app.bsky.feed.getActorFeeds", 14319 + "app.bsky.feed.getActorLikes", 14320 + "app.bsky.feed.getAuthorFeed", 14321 + "app.bsky.feed.getFeed", 14322 + "app.bsky.feed.getFeedGenerator", 14323 + "app.bsky.feed.getFeedGenerators", 14324 + "app.bsky.feed.getFeedSkeleton", 14325 + "app.bsky.feed.getLikes", 14326 + "app.bsky.feed.getListFeed", 14327 + "app.bsky.feed.getPostThread", 14328 + "app.bsky.feed.getPosts", 14329 + "app.bsky.feed.getQuotes", 14330 + "app.bsky.feed.getRepostedBy", 14331 + "app.bsky.feed.getSuggestedFeeds", 14332 + "app.bsky.feed.getTimeline", 14333 + "app.bsky.feed.searchPosts", 14334 + "app.bsky.graph.getActorStarterPacks", 14335 + "app.bsky.graph.getBlocks", 14336 + "app.bsky.graph.getFollowers", 14337 + "app.bsky.graph.getFollows", 14338 + "app.bsky.graph.getKnownFollowers", 14339 + "app.bsky.graph.getListBlocks", 14340 + "app.bsky.graph.getListMutes", 14341 + "app.bsky.graph.getLists", 14342 + "app.bsky.graph.getListsWithMembership", 14343 + "app.bsky.graph.getMutes", 14344 + "app.bsky.graph.getRelationships", 14345 + "app.bsky.graph.getStarterPack", 14346 + "app.bsky.graph.getStarterPacks", 14347 + "app.bsky.graph.getStarterPacksWithMembership", 14348 + "app.bsky.graph.getSuggestedFollowsByActor", 14349 + "app.bsky.graph.searchStarterPacks", 14350 + "app.bsky.labeler.getServices", 14351 + "app.bsky.notification.getPreferences", 14352 + "app.bsky.notification.getUnreadCount", 14353 + "app.bsky.notification.listActivitySubscriptions", 14354 + "app.bsky.notification.listNotifications", 14355 + "app.bsky.notification.updateSeen", 14356 + "app.bsky.unspecced.getAgeAssuranceState", 14357 + "app.bsky.unspecced.getConfig", 14358 + "app.bsky.unspecced.getOnboardingSuggestedStarterPacks", 14359 + "app.bsky.unspecced.getPopularFeedGenerators", 14360 + "app.bsky.unspecced.getPostThreadOtherV2", 14361 + "app.bsky.unspecced.getPostThreadV2", 14362 + "app.bsky.unspecced.getSuggestedFeeds", 14363 + "app.bsky.unspecced.getSuggestedFeedsSkeleton", 14364 + "app.bsky.unspecced.getSuggestedStarterPacks", 14365 + "app.bsky.unspecced.getSuggestedStarterPacksSkeleton", 14366 + "app.bsky.unspecced.getSuggestedUsers", 14367 + "app.bsky.unspecced.getSuggestedUsersSkeleton", 14368 + "app.bsky.unspecced.getSuggestionsSkeleton", 14369 + "app.bsky.unspecced.getTaggedSuggestions", 14370 + "app.bsky.unspecced.getTrendingTopics", 14371 + "app.bsky.unspecced.getTrends", 14372 + "app.bsky.unspecced.getTrendsSkeleton", 14373 + "app.bsky.unspecced.searchActorsSkeleton", 14374 + "app.bsky.unspecced.searchPostsSkeleton", 14375 + "app.bsky.unspecced.searchStarterPacksSkeleton", 14376 + "app.bsky.video.getUploadLimits", 14377 + ], 14378 + }, 14379 + ], 14380 + }, 14381 + }, 14382 + }, 14383 + "AppBskyAuthManageFeedDeclarations": { 14384 + "lexicon": 1, 14385 + "id": "app.bsky.authManageFeedDeclarations", 14386 + "defs": { 14387 + "main": { 14388 + "type": "permission-set", 14389 + "title": "Manage Hosted Feeds", 14390 + "title:lang": {}, 14391 + "detail": "Configure feed generator declaration records.", 14392 + "detail:lang": {}, 14393 + "permissions": [ 14394 + { 14395 + "type": "permission", 14396 + "resource": "repo", 14397 + "action": [ 14398 + "create", 14399 + "update", 14400 + "delete", 14401 + ], 14402 + "collection": [ 14403 + "app.bsky.feed.generator", 14404 + ], 14405 + }, 14406 + ], 14407 + }, 14408 + }, 14409 + }, 12585 14410 "AppBskyAgeassuranceBegin": { 12586 14411 "lexicon": 1, 12587 14412 "id": "app.bsky.ageassurance.begin", ··· 12729 14554 "description": "The Age Assurance configuration for a specific region.", 12730 14555 "required": [ 12731 14556 "countryCode", 14557 + "minAccessAge", 12732 14558 "rules", 12733 14559 ], 12734 14560 "properties": { ··· 12742 14568 "description": 12743 14569 "The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country.", 12744 14570 }, 14571 + "minAccessAge": { 14572 + "type": "integer", 14573 + "description": 14574 + "The minimum age (as a whole integer) required to use Bluesky in this region.", 14575 + }, 12745 14576 "rules": { 12746 14577 "type": "array", 12747 14578 "description": ··· 13033 14864 }, 13034 14865 }, 13035 14866 }, 14867 + "AppBskyAuthManageProfile": { 14868 + "lexicon": 1, 14869 + "id": "app.bsky.authManageProfile", 14870 + "defs": { 14871 + "main": { 14872 + "type": "permission-set", 14873 + "title": "Manage Bluesky Profile", 14874 + "title:lang": {}, 14875 + "detail": 14876 + "Update profile data, as well as status and public chat visibility.", 14877 + "detail:lang": {}, 14878 + "permissions": [ 14879 + { 14880 + "type": "permission", 14881 + "resource": "repo", 14882 + "action": [ 14883 + "create", 14884 + "update", 14885 + "delete", 14886 + ], 14887 + "collection": [ 14888 + "app.bsky.actor.profile", 14889 + "app.bsky.actor.status", 14890 + "app.bsky.notification.declaration", 14891 + ], 14892 + }, 14893 + ], 14894 + }, 14895 + }, 14896 + }, 13036 14897 "AppBskyActorSearchActorsTypeahead": { 13037 14898 "lexicon": 1, 13038 14899 "id": "app.bsky.actor.searchActorsTypeahead", ··· 13332 15193 "ref": 13333 15194 "lex:app.bsky.actor.defs#profileAssociatedActivitySubscription", 13334 15195 }, 15196 + "germ": { 15197 + "type": "ref", 15198 + "ref": "lex:app.bsky.actor.defs#profileAssociatedGerm", 15199 + }, 13335 15200 }, 13336 15201 }, 13337 15202 "profileAssociatedChat": { ··· 13350 15215 }, 13351 15216 }, 13352 15217 }, 15218 + "profileAssociatedGerm": { 15219 + "type": "object", 15220 + "required": [ 15221 + "showButtonTo", 15222 + "messageMeUrl", 15223 + ], 15224 + "properties": { 15225 + "messageMeUrl": { 15226 + "type": "string", 15227 + "format": "uri", 15228 + }, 15229 + "showButtonTo": { 15230 + "type": "string", 15231 + "knownValues": [ 15232 + "usersIFollow", 15233 + "everyone", 15234 + ], 15235 + }, 15236 + }, 15237 + }, 13353 15238 "profileAssociatedActivitySubscription": { 13354 15239 "type": "object", 13355 15240 "required": [ ··· 13514 15399 "lex:app.bsky.actor.defs#savedFeedsPref", 13515 15400 "lex:app.bsky.actor.defs#savedFeedsPrefV2", 13516 15401 "lex:app.bsky.actor.defs#personalDetailsPref", 15402 + "lex:app.bsky.actor.defs#declaredAgePref", 13517 15403 "lex:app.bsky.actor.defs#feedViewPref", 13518 15404 "lex:app.bsky.actor.defs#threadViewPref", 13519 15405 "lex:app.bsky.actor.defs#interestsPref", ··· 13523 15409 "lex:app.bsky.actor.defs#labelersPref", 13524 15410 "lex:app.bsky.actor.defs#postInteractionSettingsPref", 13525 15411 "lex:app.bsky.actor.defs#verificationPrefs", 15412 + "lex:app.bsky.actor.defs#liveEventPreferences", 13526 15413 ], 13527 15414 }, 13528 15415 }, ··· 13644 15531 }, 13645 15532 }, 13646 15533 }, 15534 + "declaredAgePref": { 15535 + "type": "object", 15536 + "description": 15537 + "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.", 15538 + "properties": { 15539 + "isOverAge13": { 15540 + "type": "boolean", 15541 + "description": 15542 + "Indicates if the user has declared that they are over 13 years of age.", 15543 + }, 15544 + "isOverAge16": { 15545 + "type": "boolean", 15546 + "description": 15547 + "Indicates if the user has declared that they are over 16 years of age.", 15548 + }, 15549 + "isOverAge18": { 15550 + "type": "boolean", 15551 + "description": 15552 + "Indicates if the user has declared that they are over 18 years of age.", 15553 + }, 15554 + }, 15555 + }, 13647 15556 "feedViewPref": { 13648 15557 "type": "object", 13649 15558 "required": [ ··· 13916 15825 }, 13917 15826 }, 13918 15827 }, 15828 + "liveEventPreferences": { 15829 + "type": "object", 15830 + "description": "Preferences for live events.", 15831 + "properties": { 15832 + "hiddenFeedIds": { 15833 + "description": 15834 + "A list of feed IDs that the user has hidden from live events.", 15835 + "type": "array", 15836 + "items": { 15837 + "type": "string", 15838 + }, 15839 + }, 15840 + "hideAllFeeds": { 15841 + "description": "Whether to hide all feeds from live events.", 15842 + "type": "boolean", 15843 + "default": false, 15844 + }, 15845 + }, 15846 + }, 13919 15847 "postInteractionSettingsPref": { 13920 15848 "type": "object", 13921 15849 "description": ··· 13958 15886 "record", 13959 15887 ], 13960 15888 "properties": { 15889 + "uri": { 15890 + "type": "string", 15891 + "format": "at-uri", 15892 + }, 15893 + "cid": { 15894 + "type": "string", 15895 + "format": "cid", 15896 + }, 13961 15897 "status": { 13962 15898 "type": "string", 13963 15899 "description": "The status for the account.", ··· 13975 15911 "lex:app.bsky.embed.external#view", 13976 15912 ], 13977 15913 }, 15914 + "labels": { 15915 + "type": "array", 15916 + "items": { 15917 + "type": "ref", 15918 + "ref": "lex:com.atproto.label.defs#label", 15919 + }, 15920 + }, 13978 15921 "expiresAt": { 13979 15922 "type": "string", 13980 15923 "description": ··· 13985 15928 "type": "boolean", 13986 15929 "description": 13987 15930 "True if the status is not expired, false if it is expired. Only present if expiration was set.", 15931 + }, 15932 + "isDisabled": { 15933 + "type": "boolean", 15934 + "description": 15935 + "True if the user's go-live access has been disabled by a moderator, false otherwise.", 13988 15936 }, 13989 15937 }, 13990 15938 }, ··· 14088 16036 }, 14089 16037 "recId": { 14090 16038 "type": "integer", 16039 + "description": "DEPRECATED: use recIdStr instead.", 16040 + }, 16041 + "recIdStr": { 16042 + "type": "string", 14091 16043 "description": 14092 16044 "Snowflake for this recommendation, use when submitting recommendation events.", 14093 16045 }, ··· 15954 17906 "properties": {}, 15955 17907 }, 15956 17908 }, 17909 + }, 17910 + }, 17911 + }, 17912 + "ChatBskyAuthFullChatClient": { 17913 + "lexicon": 1, 17914 + "id": "chat.bsky.authFullChatClient", 17915 + "defs": { 17916 + "main": { 17917 + "type": "permission-set", 17918 + "title": "Full Chat Client (All Conversations)", 17919 + "title:lang": {}, 17920 + "detail": 17921 + "Control of all chat conversations and configuration management.", 17922 + "detail:lang": { 17923 + "en": "All Chat Conversations", 17924 + }, 17925 + "permissions": [ 17926 + { 17927 + "type": "permission", 17928 + "resource": "rpc", 17929 + "inheritAud": true, 17930 + "lxm": [ 17931 + "chat.bsky.actor.deleteAccount", 17932 + "chat.bsky.actor.exportAccountData", 17933 + "chat.bsky.convo.acceptConvo", 17934 + "chat.bsky.convo.addReaction", 17935 + "chat.bsky.convo.deleteMessageForSelf", 17936 + "chat.bsky.convo.getConvo", 17937 + "chat.bsky.convo.getConvoAvailability", 17938 + "chat.bsky.convo.getConvoForMembers", 17939 + "chat.bsky.convo.getLog", 17940 + "chat.bsky.convo.getMessages", 17941 + "chat.bsky.convo.leaveConvo", 17942 + "chat.bsky.convo.listConvos", 17943 + "chat.bsky.convo.muteConvo", 17944 + "chat.bsky.convo.removeReaction", 17945 + "chat.bsky.convo.sendMessage", 17946 + "chat.bsky.convo.sendMessageBatch", 17947 + "chat.bsky.convo.unmuteConvo", 17948 + "chat.bsky.convo.updateAllRead", 17949 + "chat.bsky.convo.updateRead", 17950 + ], 17951 + }, 17952 + { 17953 + "type": "permission", 17954 + "resource": "repo", 17955 + "action": [ 17956 + "create", 17957 + "update", 17958 + "delete", 17959 + ], 17960 + "collection": [ 17961 + "chat.bsky.actor.declaration", 17962 + ], 17963 + }, 17964 + ], 15957 17965 }, 15958 17966 }, 15959 17967 }, ··· 23256 25264 "type": "string", 23257 25265 "knownValues": [ 23258 25266 "!hide", 23259 - "!no-promote", 23260 25267 "!warn", 23261 25268 "!no-unauthenticated", 23262 - "dmca-violation", 23263 - "doxxing", 23264 25269 "porn", 23265 25270 "sexual", 23266 25271 "nudity", 23267 - "nsfl", 23268 - "gore", 25272 + "graphic-media", 25273 + "bot", 23269 25274 ], 23270 25275 }, 23271 25276 }, ··· 23786 25791 "defs": { 23787 25792 "main": { 23788 25793 "type": "procedure", 23789 - "description": "Delete the current session. Requires auth.", 25794 + "description": 25795 + "Delete the current session. Requires auth using the 'refreshJwt' (not the 'accessJwt').", 25796 + "errors": [ 25797 + { 25798 + "name": "InvalidToken", 25799 + }, 25800 + { 25801 + "name": "ExpiredToken", 25802 + }, 25803 + ], 23790 25804 }, 23791 25805 }, 23792 25806 }, ··· 24035 26049 "type": "string", 24036 26050 "format": "did", 24037 26051 }, 26052 + "didDoc": { 26053 + "type": "unknown", 26054 + }, 24038 26055 "email": { 24039 26056 "type": "string", 24040 26057 }, ··· 24043 26060 }, 24044 26061 "emailAuthFactor": { 24045 26062 "type": "boolean", 24046 - }, 24047 - "didDoc": { 24048 - "type": "unknown", 24049 26063 }, 24050 26064 "active": { 24051 26065 "type": "boolean", ··· 24102 26116 "didDoc": { 24103 26117 "type": "unknown", 24104 26118 }, 26119 + "email": { 26120 + "type": "string", 26121 + }, 26122 + "emailConfirmed": { 26123 + "type": "boolean", 26124 + }, 26125 + "emailAuthFactor": { 26126 + "type": "boolean", 26127 + }, 24105 26128 "active": { 24106 26129 "type": "boolean", 24107 26130 }, ··· 24121 26144 "errors": [ 24122 26145 { 24123 26146 "name": "AccountTakedown", 26147 + }, 26148 + { 26149 + "name": "InvalidToken", 26150 + }, 26151 + { 26152 + "name": "ExpiredToken", 24124 26153 }, 24125 26154 ], 24126 26155 }, ··· 26910 28939 ToolsOzoneModerationGetAccountTimeline: 26911 28940 "tools.ozone.moderation.getAccountTimeline", 26912 28941 ToolsOzoneModerationGetRepos: "tools.ozone.moderation.getRepos", 28942 + AppBskyDraftDefs: "app.bsky.draft.defs", 28943 + AppBskyDraftCreateDraft: "app.bsky.draft.createDraft", 28944 + AppBskyDraftUpdateDraft: "app.bsky.draft.updateDraft", 28945 + AppBskyDraftGetDrafts: "app.bsky.draft.getDrafts", 28946 + AppBskyDraftDeleteDraft: "app.bsky.draft.deleteDraft", 28947 + AppBskyAuthManageLabelerService: "app.bsky.authManageLabelerService", 26913 28948 AppBskyVideoUploadVideo: "app.bsky.video.uploadVideo", 26914 28949 AppBskyVideoDefs: "app.bsky.video.defs", 26915 28950 AppBskyVideoGetJobStatus: "app.bsky.video.getJobStatus", 26916 28951 AppBskyVideoGetUploadLimits: "app.bsky.video.getUploadLimits", 28952 + AppBskyContactDefs: "app.bsky.contact.defs", 28953 + AppBskyContactSendNotification: "app.bsky.contact.sendNotification", 28954 + AppBskyContactGetSyncStatus: "app.bsky.contact.getSyncStatus", 28955 + AppBskyContactStartPhoneVerification: 28956 + "app.bsky.contact.startPhoneVerification", 28957 + AppBskyContactGetMatches: "app.bsky.contact.getMatches", 28958 + AppBskyContactImportContacts: "app.bsky.contact.importContacts", 28959 + AppBskyContactDismissMatch: "app.bsky.contact.dismissMatch", 28960 + AppBskyContactRemoveData: "app.bsky.contact.removeData", 28961 + AppBskyContactVerifyPhone: "app.bsky.contact.verifyPhone", 28962 + AppBskyAuthManageNotifications: "app.bsky.authManageNotifications", 26917 28963 AppBskyBookmarkDefs: "app.bsky.bookmark.defs", 26918 28964 AppBskyBookmarkDeleteBookmark: "app.bsky.bookmark.deleteBookmark", 26919 28965 AppBskyBookmarkGetBookmarks: "app.bsky.bookmark.getBookmarks", ··· 26924 28970 AppBskyEmbedRecordWithMedia: "app.bsky.embed.recordWithMedia", 26925 28971 AppBskyEmbedVideo: "app.bsky.embed.video", 26926 28972 AppBskyEmbedExternal: "app.bsky.embed.external", 28973 + AppBskyAuthDeleteContent: "app.bsky.authDeleteContent", 28974 + AppBskyAuthCreatePosts: "app.bsky.authCreatePosts", 26927 28975 AppBskyNotificationDefs: "app.bsky.notification.defs", 26928 28976 AppBskyNotificationRegisterPush: "app.bsky.notification.registerPush", 26929 28977 AppBskyNotificationPutPreferences: "app.bsky.notification.putPreferences", ··· 26943 28991 "app.bsky.unspecced.getSuggestedFeedsSkeleton", 26944 28992 AppBskyUnspeccedSearchStarterPacksSkeleton: 26945 28993 "app.bsky.unspecced.searchStarterPacksSkeleton", 28994 + AppBskyUnspeccedGetSuggestedUsersForExplore: 28995 + "app.bsky.unspecced.getSuggestedUsersForExplore", 26946 28996 AppBskyUnspeccedDefs: "app.bsky.unspecced.defs", 26947 28997 AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton: 26948 28998 "app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton", 28999 + AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton: 29000 + "app.bsky.unspecced.getSuggestedUsersForExploreSkeleton", 26949 29001 AppBskyUnspeccedGetSuggestedUsers: "app.bsky.unspecced.getSuggestedUsers", 26950 29002 AppBskyUnspeccedGetPostThreadOtherV2: 26951 29003 "app.bsky.unspecced.getPostThreadOtherV2", ··· 26964 29016 AppBskyUnspeccedGetSuggestionsSkeleton: 26965 29017 "app.bsky.unspecced.getSuggestionsSkeleton", 26966 29018 AppBskyUnspeccedSearchPostsSkeleton: "app.bsky.unspecced.searchPostsSkeleton", 29019 + AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton: 29020 + "app.bsky.unspecced.getOnboardingSuggestedUsersSkeleton", 29021 + AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton: 29022 + "app.bsky.unspecced.getSuggestedUsersForDiscoverSkeleton", 29023 + AppBskyUnspeccedGetSuggestedUsersForDiscover: 29024 + "app.bsky.unspecced.getSuggestedUsersForDiscover", 26967 29025 AppBskyUnspeccedGetAgeAssuranceState: 26968 29026 "app.bsky.unspecced.getAgeAssuranceState", 26969 29027 AppBskyUnspeccedGetPopularFeedGenerators: 26970 29028 "app.bsky.unspecced.getPopularFeedGenerators", 29029 + AppBskyUnspeccedGetSuggestedOnboardingUsers: 29030 + "app.bsky.unspecced.getSuggestedOnboardingUsers", 29031 + AppBskyUnspeccedGetSuggestedUsersForSeeMore: 29032 + "app.bsky.unspecced.getSuggestedUsersForSeeMore", 26971 29033 AppBskyUnspeccedInitAgeAssurance: "app.bsky.unspecced.initAgeAssurance", 26972 29034 AppBskyUnspeccedGetTrendingTopics: "app.bsky.unspecced.getTrendingTopics", 26973 29035 AppBskyUnspeccedGetTaggedSuggestions: 26974 29036 "app.bsky.unspecced.getTaggedSuggestions", 29037 + AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton: 29038 + "app.bsky.unspecced.getSuggestedUsersForSeeMoreSkeleton", 26975 29039 AppBskyUnspeccedGetSuggestedFeeds: "app.bsky.unspecced.getSuggestedFeeds", 26976 29040 AppBskyUnspeccedGetTrendsSkeleton: "app.bsky.unspecced.getTrendsSkeleton", 26977 29041 AppBskyUnspeccedGetConfig: "app.bsky.unspecced.getConfig", ··· 27008 29072 AppBskyGraphGetRelationships: "app.bsky.graph.getRelationships", 27009 29073 AppBskyGraphUnmuteActor: "app.bsky.graph.unmuteActor", 27010 29074 AppBskyGraphGetList: "app.bsky.graph.getList", 29075 + AppBskyAuthFullApp: "app.bsky.authFullApp", 29076 + AppBskyAuthManageModeration: "app.bsky.authManageModeration", 27011 29077 AppBskyFeedGenerator: "app.bsky.feed.generator", 27012 29078 AppBskyFeedSendInteractions: "app.bsky.feed.sendInteractions", 27013 29079 AppBskyFeedDefs: "app.bsky.feed.defs", ··· 27034 29100 AppBskyFeedGetActorFeeds: "app.bsky.feed.getActorFeeds", 27035 29101 AppBskyFeedPost: "app.bsky.feed.post", 27036 29102 AppBskyRichtextFacet: "app.bsky.richtext.facet", 29103 + AppBskyAuthViewAll: "app.bsky.authViewAll", 29104 + AppBskyAuthManageFeedDeclarations: "app.bsky.authManageFeedDeclarations", 27037 29105 AppBskyAgeassuranceBegin: "app.bsky.ageassurance.begin", 27038 29106 AppBskyAgeassuranceDefs: "app.bsky.ageassurance.defs", 27039 29107 AppBskyAgeassuranceGetState: "app.bsky.ageassurance.getState", 27040 29108 AppBskyAgeassuranceGetConfig: "app.bsky.ageassurance.getConfig", 29109 + AppBskyAuthManageProfile: "app.bsky.authManageProfile", 27041 29110 AppBskyActorSearchActorsTypeahead: "app.bsky.actor.searchActorsTypeahead", 27042 29111 AppBskyActorDefs: "app.bsky.actor.defs", 27043 29112 AppBskyActorPutPreferences: "app.bsky.actor.putPreferences", ··· 27073 29142 ChatBskyActorDeclaration: "chat.bsky.actor.declaration", 27074 29143 ChatBskyActorExportAccountData: "chat.bsky.actor.exportAccountData", 27075 29144 ChatBskyActorDeleteAccount: "chat.bsky.actor.deleteAccount", 29145 + ChatBskyAuthFullChatClient: "chat.bsky.authFullChatClient", 27076 29146 ChatBskyModerationGetActorMetadata: "chat.bsky.moderation.getActorMetadata", 27077 29147 ChatBskyModerationGetMessageContext: "chat.bsky.moderation.getMessageContext", 27078 29148 ChatBskyModerationUpdateActorAccess: "chat.bsky.moderation.updateActorAccess",
+194 -60
lex/types/app/bsky/actor/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; 7 8 import type * as AppBskyGraphDefs from "../graph/defs.ts"; ··· 33 34 34 35 const hashProfileViewBasic = "profileViewBasic"; 35 36 36 - export function isProfileViewBasic<V>(v: V) { 37 + export function isProfileViewBasic<V>(v: V): v is ProfileViewBasic & V { 37 38 return is$typed(v, id, hashProfileViewBasic); 38 39 } 39 40 40 - export function validateProfileViewBasic<V>(v: V) { 41 + export function validateProfileViewBasic<V>( 42 + v: V, 43 + ): ValidationResult<ProfileViewBasic & V> { 41 44 return validate<ProfileViewBasic & V>(v, id, hashProfileViewBasic); 42 45 } 43 46 ··· 62 65 63 66 const hashProfileView = "profileView"; 64 67 65 - export function isProfileView<V>(v: V) { 68 + export function isProfileView<V>(v: V): v is ProfileView & V { 66 69 return is$typed(v, id, hashProfileView); 67 70 } 68 71 69 - export function validateProfileView<V>(v: V) { 72 + export function validateProfileView<V>( 73 + v: V, 74 + ): ValidationResult<ProfileView & V> { 70 75 return validate<ProfileView & V>(v, id, hashProfileView); 71 76 } 72 77 ··· 98 103 99 104 const hashProfileViewDetailed = "profileViewDetailed"; 100 105 101 - export function isProfileViewDetailed<V>(v: V) { 106 + export function isProfileViewDetailed<V>(v: V): v is ProfileViewDetailed & V { 102 107 return is$typed(v, id, hashProfileViewDetailed); 103 108 } 104 109 105 - export function validateProfileViewDetailed<V>(v: V) { 110 + export function validateProfileViewDetailed<V>( 111 + v: V, 112 + ): ValidationResult<ProfileViewDetailed & V> { 106 113 return validate<ProfileViewDetailed & V>(v, id, hashProfileViewDetailed); 107 114 } 108 115 ··· 114 121 labeler?: boolean; 115 122 chat?: ProfileAssociatedChat; 116 123 activitySubscription?: ProfileAssociatedActivitySubscription; 124 + germ?: ProfileAssociatedGerm; 117 125 } 118 126 119 127 const hashProfileAssociated = "profileAssociated"; 120 128 121 - export function isProfileAssociated<V>(v: V) { 129 + export function isProfileAssociated<V>(v: V): v is ProfileAssociated & V { 122 130 return is$typed(v, id, hashProfileAssociated); 123 131 } 124 132 125 - export function validateProfileAssociated<V>(v: V) { 133 + export function validateProfileAssociated<V>( 134 + v: V, 135 + ): ValidationResult<ProfileAssociated & V> { 126 136 return validate<ProfileAssociated & V>(v, id, hashProfileAssociated); 127 137 } 128 138 ··· 137 147 138 148 const hashProfileAssociatedChat = "profileAssociatedChat"; 139 149 140 - export function isProfileAssociatedChat<V>(v: V) { 150 + export function isProfileAssociatedChat<V>( 151 + v: V, 152 + ): v is ProfileAssociatedChat & V { 141 153 return is$typed(v, id, hashProfileAssociatedChat); 142 154 } 143 155 144 - export function validateProfileAssociatedChat<V>(v: V) { 156 + export function validateProfileAssociatedChat<V>( 157 + v: V, 158 + ): ValidationResult<ProfileAssociatedChat & V> { 145 159 return validate<ProfileAssociatedChat & V>(v, id, hashProfileAssociatedChat); 146 160 } 147 161 162 + export interface ProfileAssociatedGerm { 163 + $type?: "app.bsky.actor.defs#profileAssociatedGerm"; 164 + messageMeUrl: string; 165 + showButtonTo: 166 + | "usersIFollow" 167 + | "everyone" 168 + | (string & globalThis.Record<PropertyKey, never>); 169 + } 170 + 171 + const hashProfileAssociatedGerm = "profileAssociatedGerm"; 172 + 173 + export function isProfileAssociatedGerm<V>( 174 + v: V, 175 + ): v is ProfileAssociatedGerm & V { 176 + return is$typed(v, id, hashProfileAssociatedGerm); 177 + } 178 + 179 + export function validateProfileAssociatedGerm<V>( 180 + v: V, 181 + ): ValidationResult<ProfileAssociatedGerm & V> { 182 + return validate<ProfileAssociatedGerm & V>(v, id, hashProfileAssociatedGerm); 183 + } 184 + 148 185 export interface ProfileAssociatedActivitySubscription { 149 186 $type?: "app.bsky.actor.defs#profileAssociatedActivitySubscription"; 150 187 allowSubscriptions: ··· 157 194 const hashProfileAssociatedActivitySubscription = 158 195 "profileAssociatedActivitySubscription"; 159 196 160 - export function isProfileAssociatedActivitySubscription<V>(v: V) { 197 + export function isProfileAssociatedActivitySubscription<V>( 198 + v: V, 199 + ): v is ProfileAssociatedActivitySubscription & V { 161 200 return is$typed(v, id, hashProfileAssociatedActivitySubscription); 162 201 } 163 202 164 - export function validateProfileAssociatedActivitySubscription<V>(v: V) { 203 + export function validateProfileAssociatedActivitySubscription<V>( 204 + v: V, 205 + ): ValidationResult<ProfileAssociatedActivitySubscription & V> { 165 206 return validate<ProfileAssociatedActivitySubscription & V>( 166 207 v, 167 208 id, ··· 185 226 186 227 const hashViewerState = "viewerState"; 187 228 188 - export function isViewerState<V>(v: V) { 229 + export function isViewerState<V>(v: V): v is ViewerState & V { 189 230 return is$typed(v, id, hashViewerState); 190 231 } 191 232 192 - export function validateViewerState<V>(v: V) { 233 + export function validateViewerState<V>( 234 + v: V, 235 + ): ValidationResult<ViewerState & V> { 193 236 return validate<ViewerState & V>(v, id, hashViewerState); 194 237 } 195 238 ··· 202 245 203 246 const hashKnownFollowers = "knownFollowers"; 204 247 205 - export function isKnownFollowers<V>(v: V) { 248 + export function isKnownFollowers<V>(v: V): v is KnownFollowers & V { 206 249 return is$typed(v, id, hashKnownFollowers); 207 250 } 208 251 209 - export function validateKnownFollowers<V>(v: V) { 252 + export function validateKnownFollowers<V>( 253 + v: V, 254 + ): ValidationResult<KnownFollowers & V> { 210 255 return validate<KnownFollowers & V>(v, id, hashKnownFollowers); 211 256 } 212 257 ··· 231 276 232 277 const hashVerificationState = "verificationState"; 233 278 234 - export function isVerificationState<V>(v: V) { 279 + export function isVerificationState<V>(v: V): v is VerificationState & V { 235 280 return is$typed(v, id, hashVerificationState); 236 281 } 237 282 238 - export function validateVerificationState<V>(v: V) { 283 + export function validateVerificationState<V>( 284 + v: V, 285 + ): ValidationResult<VerificationState & V> { 239 286 return validate<VerificationState & V>(v, id, hashVerificationState); 240 287 } 241 288 ··· 254 301 255 302 const hashVerificationView = "verificationView"; 256 303 257 - export function isVerificationView<V>(v: V) { 304 + export function isVerificationView<V>(v: V): v is VerificationView & V { 258 305 return is$typed(v, id, hashVerificationView); 259 306 } 260 307 261 - export function validateVerificationView<V>(v: V) { 308 + export function validateVerificationView<V>( 309 + v: V, 310 + ): ValidationResult<VerificationView & V> { 262 311 return validate<VerificationView & V>(v, id, hashVerificationView); 263 312 } 264 313 ··· 268 317 | $Typed<SavedFeedsPref> 269 318 | $Typed<SavedFeedsPrefV2> 270 319 | $Typed<PersonalDetailsPref> 320 + | $Typed<DeclaredAgePref> 271 321 | $Typed<FeedViewPref> 272 322 | $Typed<ThreadViewPref> 273 323 | $Typed<InterestsPref> ··· 277 327 | $Typed<LabelersPref> 278 328 | $Typed<PostInteractionSettingsPref> 279 329 | $Typed<VerificationPrefs> 330 + | $Typed<LiveEventPreferences> 280 331 | { $type: string } 281 332 )[]; 282 333 ··· 287 338 288 339 const hashAdultContentPref = "adultContentPref"; 289 340 290 - export function isAdultContentPref<V>(v: V) { 341 + export function isAdultContentPref<V>(v: V): v is AdultContentPref & V { 291 342 return is$typed(v, id, hashAdultContentPref); 292 343 } 293 344 294 - export function validateAdultContentPref<V>(v: V) { 345 + export function validateAdultContentPref<V>( 346 + v: V, 347 + ): ValidationResult<AdultContentPref & V> { 295 348 return validate<AdultContentPref & V>(v, id, hashAdultContentPref); 296 349 } 297 350 ··· 310 363 311 364 const hashContentLabelPref = "contentLabelPref"; 312 365 313 - export function isContentLabelPref<V>(v: V) { 366 + export function isContentLabelPref<V>(v: V): v is ContentLabelPref & V { 314 367 return is$typed(v, id, hashContentLabelPref); 315 368 } 316 369 317 - export function validateContentLabelPref<V>(v: V) { 370 + export function validateContentLabelPref<V>( 371 + v: V, 372 + ): ValidationResult<ContentLabelPref & V> { 318 373 return validate<ContentLabelPref & V>(v, id, hashContentLabelPref); 319 374 } 320 375 ··· 332 387 333 388 const hashSavedFeed = "savedFeed"; 334 389 335 - export function isSavedFeed<V>(v: V) { 390 + export function isSavedFeed<V>(v: V): v is SavedFeed & V { 336 391 return is$typed(v, id, hashSavedFeed); 337 392 } 338 393 339 - export function validateSavedFeed<V>(v: V) { 394 + export function validateSavedFeed<V>(v: V): ValidationResult<SavedFeed & V> { 340 395 return validate<SavedFeed & V>(v, id, hashSavedFeed); 341 396 } 342 397 ··· 347 402 348 403 const hashSavedFeedsPrefV2 = "savedFeedsPrefV2"; 349 404 350 - export function isSavedFeedsPrefV2<V>(v: V) { 405 + export function isSavedFeedsPrefV2<V>(v: V): v is SavedFeedsPrefV2 & V { 351 406 return is$typed(v, id, hashSavedFeedsPrefV2); 352 407 } 353 408 354 - export function validateSavedFeedsPrefV2<V>(v: V) { 409 + export function validateSavedFeedsPrefV2<V>( 410 + v: V, 411 + ): ValidationResult<SavedFeedsPrefV2 & V> { 355 412 return validate<SavedFeedsPrefV2 & V>(v, id, hashSavedFeedsPrefV2); 356 413 } 357 414 ··· 364 421 365 422 const hashSavedFeedsPref = "savedFeedsPref"; 366 423 367 - export function isSavedFeedsPref<V>(v: V) { 424 + export function isSavedFeedsPref<V>(v: V): v is SavedFeedsPref & V { 368 425 return is$typed(v, id, hashSavedFeedsPref); 369 426 } 370 427 371 - export function validateSavedFeedsPref<V>(v: V) { 428 + export function validateSavedFeedsPref<V>( 429 + v: V, 430 + ): ValidationResult<SavedFeedsPref & V> { 372 431 return validate<SavedFeedsPref & V>(v, id, hashSavedFeedsPref); 373 432 } 374 433 ··· 380 439 381 440 const hashPersonalDetailsPref = "personalDetailsPref"; 382 441 383 - export function isPersonalDetailsPref<V>(v: V) { 442 + export function isPersonalDetailsPref<V>(v: V): v is PersonalDetailsPref & V { 384 443 return is$typed(v, id, hashPersonalDetailsPref); 385 444 } 386 445 387 - export function validatePersonalDetailsPref<V>(v: V) { 446 + export function validatePersonalDetailsPref<V>( 447 + v: V, 448 + ): ValidationResult<PersonalDetailsPref & V> { 388 449 return validate<PersonalDetailsPref & V>(v, id, hashPersonalDetailsPref); 389 450 } 390 451 452 + /** 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. */ 453 + export interface DeclaredAgePref { 454 + $type?: "app.bsky.actor.defs#declaredAgePref"; 455 + /** Indicates if the user has declared that they are over 13 years of age. */ 456 + isOverAge13?: boolean; 457 + /** Indicates if the user has declared that they are over 16 years of age. */ 458 + isOverAge16?: boolean; 459 + /** Indicates if the user has declared that they are over 18 years of age. */ 460 + isOverAge18?: boolean; 461 + } 462 + 463 + const hashDeclaredAgePref = "declaredAgePref"; 464 + 465 + export function isDeclaredAgePref<V>(v: V): v is DeclaredAgePref & V { 466 + return is$typed(v, id, hashDeclaredAgePref); 467 + } 468 + 469 + export function validateDeclaredAgePref<V>( 470 + v: V, 471 + ): ValidationResult<DeclaredAgePref & V> { 472 + return validate<DeclaredAgePref & V>(v, id, hashDeclaredAgePref); 473 + } 474 + 391 475 export interface FeedViewPref { 392 476 $type?: "app.bsky.actor.defs#feedViewPref"; 393 477 /** The URI of the feed, or an identifier which describes the feed. */ ··· 406 490 407 491 const hashFeedViewPref = "feedViewPref"; 408 492 409 - export function isFeedViewPref<V>(v: V) { 493 + export function isFeedViewPref<V>(v: V): v is FeedViewPref & V { 410 494 return is$typed(v, id, hashFeedViewPref); 411 495 } 412 496 413 - export function validateFeedViewPref<V>(v: V) { 497 + export function validateFeedViewPref<V>( 498 + v: V, 499 + ): ValidationResult<FeedViewPref & V> { 414 500 return validate<FeedViewPref & V>(v, id, hashFeedViewPref); 415 501 } 416 502 ··· 428 514 429 515 const hashThreadViewPref = "threadViewPref"; 430 516 431 - export function isThreadViewPref<V>(v: V) { 517 + export function isThreadViewPref<V>(v: V): v is ThreadViewPref & V { 432 518 return is$typed(v, id, hashThreadViewPref); 433 519 } 434 520 435 - export function validateThreadViewPref<V>(v: V) { 521 + export function validateThreadViewPref<V>( 522 + v: V, 523 + ): ValidationResult<ThreadViewPref & V> { 436 524 return validate<ThreadViewPref & V>(v, id, hashThreadViewPref); 437 525 } 438 526 ··· 444 532 445 533 const hashInterestsPref = "interestsPref"; 446 534 447 - export function isInterestsPref<V>(v: V) { 535 + export function isInterestsPref<V>(v: V): v is InterestsPref & V { 448 536 return is$typed(v, id, hashInterestsPref); 449 537 } 450 538 451 - export function validateInterestsPref<V>(v: V) { 539 + export function validateInterestsPref<V>( 540 + v: V, 541 + ): ValidationResult<InterestsPref & V> { 452 542 return validate<InterestsPref & V>(v, id, hashInterestsPref); 453 543 } 454 544 ··· 476 566 477 567 const hashMutedWord = "mutedWord"; 478 568 479 - export function isMutedWord<V>(v: V) { 569 + export function isMutedWord<V>(v: V): v is MutedWord & V { 480 570 return is$typed(v, id, hashMutedWord); 481 571 } 482 572 483 - export function validateMutedWord<V>(v: V) { 573 + export function validateMutedWord<V>(v: V): ValidationResult<MutedWord & V> { 484 574 return validate<MutedWord & V>(v, id, hashMutedWord); 485 575 } 486 576 ··· 492 582 493 583 const hashMutedWordsPref = "mutedWordsPref"; 494 584 495 - export function isMutedWordsPref<V>(v: V) { 585 + export function isMutedWordsPref<V>(v: V): v is MutedWordsPref & V { 496 586 return is$typed(v, id, hashMutedWordsPref); 497 587 } 498 588 499 - export function validateMutedWordsPref<V>(v: V) { 589 + export function validateMutedWordsPref<V>( 590 + v: V, 591 + ): ValidationResult<MutedWordsPref & V> { 500 592 return validate<MutedWordsPref & V>(v, id, hashMutedWordsPref); 501 593 } 502 594 ··· 508 600 509 601 const hashHiddenPostsPref = "hiddenPostsPref"; 510 602 511 - export function isHiddenPostsPref<V>(v: V) { 603 + export function isHiddenPostsPref<V>(v: V): v is HiddenPostsPref & V { 512 604 return is$typed(v, id, hashHiddenPostsPref); 513 605 } 514 606 515 - export function validateHiddenPostsPref<V>(v: V) { 607 + export function validateHiddenPostsPref<V>( 608 + v: V, 609 + ): ValidationResult<HiddenPostsPref & V> { 516 610 return validate<HiddenPostsPref & V>(v, id, hashHiddenPostsPref); 517 611 } 518 612 ··· 523 617 524 618 const hashLabelersPref = "labelersPref"; 525 619 526 - export function isLabelersPref<V>(v: V) { 620 + export function isLabelersPref<V>(v: V): v is LabelersPref & V { 527 621 return is$typed(v, id, hashLabelersPref); 528 622 } 529 623 530 - export function validateLabelersPref<V>(v: V) { 624 + export function validateLabelersPref<V>( 625 + v: V, 626 + ): ValidationResult<LabelersPref & V> { 531 627 return validate<LabelersPref & V>(v, id, hashLabelersPref); 532 628 } 533 629 ··· 538 634 539 635 const hashLabelerPrefItem = "labelerPrefItem"; 540 636 541 - export function isLabelerPrefItem<V>(v: V) { 637 + export function isLabelerPrefItem<V>(v: V): v is LabelerPrefItem & V { 542 638 return is$typed(v, id, hashLabelerPrefItem); 543 639 } 544 640 545 - export function validateLabelerPrefItem<V>(v: V) { 641 + export function validateLabelerPrefItem<V>( 642 + v: V, 643 + ): ValidationResult<LabelerPrefItem & V> { 546 644 return validate<LabelerPrefItem & V>(v, id, hashLabelerPrefItem); 547 645 } 548 646 ··· 558 656 559 657 const hashBskyAppStatePref = "bskyAppStatePref"; 560 658 561 - export function isBskyAppStatePref<V>(v: V) { 659 + export function isBskyAppStatePref<V>(v: V): v is BskyAppStatePref & V { 562 660 return is$typed(v, id, hashBskyAppStatePref); 563 661 } 564 662 565 - export function validateBskyAppStatePref<V>(v: V) { 663 + export function validateBskyAppStatePref<V>( 664 + v: V, 665 + ): ValidationResult<BskyAppStatePref & V> { 566 666 return validate<BskyAppStatePref & V>(v, id, hashBskyAppStatePref); 567 667 } 568 668 ··· 574 674 575 675 const hashBskyAppProgressGuide = "bskyAppProgressGuide"; 576 676 577 - export function isBskyAppProgressGuide<V>(v: V) { 677 + export function isBskyAppProgressGuide<V>(v: V): v is BskyAppProgressGuide & V { 578 678 return is$typed(v, id, hashBskyAppProgressGuide); 579 679 } 580 680 581 - export function validateBskyAppProgressGuide<V>(v: V) { 681 + export function validateBskyAppProgressGuide<V>( 682 + v: V, 683 + ): ValidationResult<BskyAppProgressGuide & V> { 582 684 return validate<BskyAppProgressGuide & V>(v, id, hashBskyAppProgressGuide); 583 685 } 584 686 ··· 595 697 596 698 const hashNux = "nux"; 597 699 598 - export function isNux<V>(v: V) { 700 + export function isNux<V>(v: V): v is Nux & V { 599 701 return is$typed(v, id, hashNux); 600 702 } 601 703 602 - export function validateNux<V>(v: V) { 704 + export function validateNux<V>(v: V): ValidationResult<Nux & V> { 603 705 return validate<Nux & V>(v, id, hashNux); 604 706 } 605 707 ··· 612 714 613 715 const hashVerificationPrefs = "verificationPrefs"; 614 716 615 - export function isVerificationPrefs<V>(v: V) { 717 + export function isVerificationPrefs<V>(v: V): v is VerificationPrefs & V { 616 718 return is$typed(v, id, hashVerificationPrefs); 617 719 } 618 720 619 - export function validateVerificationPrefs<V>(v: V) { 721 + export function validateVerificationPrefs<V>( 722 + v: V, 723 + ): ValidationResult<VerificationPrefs & V> { 620 724 return validate<VerificationPrefs & V>(v, id, hashVerificationPrefs); 621 725 } 622 726 727 + /** Preferences for live events. */ 728 + export interface LiveEventPreferences { 729 + $type?: "app.bsky.actor.defs#liveEventPreferences"; 730 + /** A list of feed IDs that the user has hidden from live events. */ 731 + hiddenFeedIds?: (string)[]; 732 + /** Whether to hide all feeds from live events. */ 733 + hideAllFeeds: boolean; 734 + } 735 + 736 + const hashLiveEventPreferences = "liveEventPreferences"; 737 + 738 + export function isLiveEventPreferences<V>(v: V): v is LiveEventPreferences & V { 739 + return is$typed(v, id, hashLiveEventPreferences); 740 + } 741 + 742 + export function validateLiveEventPreferences<V>( 743 + v: V, 744 + ): ValidationResult<LiveEventPreferences & V> { 745 + return validate<LiveEventPreferences & V>(v, id, hashLiveEventPreferences); 746 + } 747 + 623 748 /** 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. */ 624 749 export interface PostInteractionSettingsPref { 625 750 $type?: "app.bsky.actor.defs#postInteractionSettingsPref"; ··· 638 763 639 764 const hashPostInteractionSettingsPref = "postInteractionSettingsPref"; 640 765 641 - export function isPostInteractionSettingsPref<V>(v: V) { 766 + export function isPostInteractionSettingsPref<V>( 767 + v: V, 768 + ): v is PostInteractionSettingsPref & V { 642 769 return is$typed(v, id, hashPostInteractionSettingsPref); 643 770 } 644 771 645 - export function validatePostInteractionSettingsPref<V>(v: V) { 772 + export function validatePostInteractionSettingsPref<V>( 773 + v: V, 774 + ): ValidationResult<PostInteractionSettingsPref & V> { 646 775 return validate<PostInteractionSettingsPref & V>( 647 776 v, 648 777 id, ··· 652 781 653 782 export interface StatusView { 654 783 $type?: "app.bsky.actor.defs#statusView"; 784 + uri?: string; 785 + cid?: string; 655 786 /** The status for the account. */ 656 787 status: 657 788 | "app.bsky.actor.status#live" 658 789 | (string & globalThis.Record<PropertyKey, never>); 659 790 record: { [_ in string]: unknown }; 660 791 embed?: $Typed<AppBskyEmbedExternal.View> | { $type: string }; 792 + labels?: (ComAtprotoLabelDefs.Label)[]; 661 793 /** The date when this status will expire. The application might choose to no longer return the status after expiration. */ 662 794 expiresAt?: string; 663 795 /** True if the status is not expired, false if it is expired. Only present if expiration was set. */ 664 796 isActive?: boolean; 797 + /** True if the user's go-live access has been disabled by a moderator, false otherwise. */ 798 + isDisabled?: boolean; 665 799 } 666 800 667 801 const hashStatusView = "statusView"; 668 802 669 - export function isStatusView<V>(v: V) { 803 + export function isStatusView<V>(v: V): v is StatusView & V { 670 804 return is$typed(v, id, hashStatusView); 671 805 } 672 806 673 - export function validateStatusView<V>(v: V) { 807 + export function validateStatusView<V>(v: V): ValidationResult<StatusView & V> { 674 808 return validate<StatusView & V>(v, id, hashStatusView); 675 809 }
+3 -1
lex/types/app/bsky/actor/getSuggestions.ts
··· 12 12 export interface OutputSchema { 13 13 cursor?: string; 14 14 actors: (AppBskyActorDefs.ProfileView)[]; 15 - /** Snowflake for this recommendation, use when submitting recommendation events. */ 15 + /** DEPRECATED: use recIdStr instead. */ 16 16 recId?: number; 17 + /** Snowflake for this recommendation, use when submitting recommendation events. */ 18 + recIdStr?: string; 17 19 } 18 20 19 21 export type HandlerInput = void;
+3 -2
lex/types/app/bsky/actor/profile.ts
··· 3 3 */ 4 4 import type { BlobRef } from "@atp/lexicon"; 5 5 import { validate as _validate } from "../../../../lexicons.ts"; 6 + import type { ValidationResult } from "@atp/lexicon"; 6 7 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 7 8 import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; 8 9 import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; ··· 31 32 32 33 const hashRecord = "main"; 33 34 34 - export function isRecord<V>(v: V) { 35 + export function isRecord<V>(v: V): v is Record & V { 35 36 return is$typed(v, id, hashRecord); 36 37 } 37 38 38 - export function validateRecord<V>(v: V) { 39 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 39 40 return validate<Record & V>(v, id, hashRecord, true); 40 41 } 41 42
+4 -3
lex/types/app/bsky/actor/status.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as AppBskyEmbedExternal from "../embed/external.ts"; 7 8 ··· 23 24 24 25 const hashRecord = "main"; 25 26 26 - export function isRecord<V>(v: V) { 27 + export function isRecord<V>(v: V): v is Record & V { 27 28 return is$typed(v, id, hashRecord); 28 29 } 29 30 30 - export function validateRecord<V>(v: V) { 31 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 31 32 return validate<Record & V>(v, id, hashRecord, true); 32 33 } 33 34 34 35 export type Main = Record; 35 36 36 37 /** Advertises an account as currently offering live content. */ 37 - export const LIVE = `${id}#live`; 38 + export const LIVE: string = `${id}#live`;
+59 -24
lex/types/app/bsky/ageassurance/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 33 34 34 35 const hashState = "state"; 35 36 36 - export function isState<V>(v: V) { 37 + export function isState<V>(v: V): v is State & V { 37 38 return is$typed(v, id, hashState); 38 39 } 39 40 40 - export function validateState<V>(v: V) { 41 + export function validateState<V>(v: V): ValidationResult<State & V> { 41 42 return validate<State & V>(v, id, hashState); 42 43 } 43 44 ··· 50 51 51 52 const hashStateMetadata = "stateMetadata"; 52 53 53 - export function isStateMetadata<V>(v: V) { 54 + export function isStateMetadata<V>(v: V): v is StateMetadata & V { 54 55 return is$typed(v, id, hashStateMetadata); 55 56 } 56 57 57 - export function validateStateMetadata<V>(v: V) { 58 + export function validateStateMetadata<V>( 59 + v: V, 60 + ): ValidationResult<StateMetadata & V> { 58 61 return validate<StateMetadata & V>(v, id, hashStateMetadata); 59 62 } 60 63 ··· 66 69 67 70 const hashConfig = "config"; 68 71 69 - export function isConfig<V>(v: V) { 72 + export function isConfig<V>(v: V): v is Config & V { 70 73 return is$typed(v, id, hashConfig); 71 74 } 72 75 73 - export function validateConfig<V>(v: V) { 76 + export function validateConfig<V>(v: V): ValidationResult<Config & V> { 74 77 return validate<Config & V>(v, id, hashConfig); 75 78 } 76 79 ··· 81 84 countryCode: string; 82 85 /** The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country. */ 83 86 regionCode?: string; 87 + /** The minimum age (as a whole integer) required to use Bluesky in this region. */ 88 + minAccessAge: number; 84 89 /** The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item. */ 85 90 rules: ( 86 91 | $Typed<ConfigRegionRuleDefault> ··· 96 101 97 102 const hashConfigRegion = "configRegion"; 98 103 99 - export function isConfigRegion<V>(v: V) { 104 + export function isConfigRegion<V>(v: V): v is ConfigRegion & V { 100 105 return is$typed(v, id, hashConfigRegion); 101 106 } 102 107 103 - export function validateConfigRegion<V>(v: V) { 108 + export function validateConfigRegion<V>( 109 + v: V, 110 + ): ValidationResult<ConfigRegion & V> { 104 111 return validate<ConfigRegion & V>(v, id, hashConfigRegion); 105 112 } 106 113 ··· 112 119 113 120 const hashConfigRegionRuleDefault = "configRegionRuleDefault"; 114 121 115 - export function isConfigRegionRuleDefault<V>(v: V) { 122 + export function isConfigRegionRuleDefault<V>( 123 + v: V, 124 + ): v is ConfigRegionRuleDefault & V { 116 125 return is$typed(v, id, hashConfigRegionRuleDefault); 117 126 } 118 127 119 - export function validateConfigRegionRuleDefault<V>(v: V) { 128 + export function validateConfigRegionRuleDefault<V>( 129 + v: V, 130 + ): ValidationResult<ConfigRegionRuleDefault & V> { 120 131 return validate<ConfigRegionRuleDefault & V>( 121 132 v, 122 133 id, ··· 135 146 const hashConfigRegionRuleIfDeclaredOverAge = 136 147 "configRegionRuleIfDeclaredOverAge"; 137 148 138 - export function isConfigRegionRuleIfDeclaredOverAge<V>(v: V) { 149 + export function isConfigRegionRuleIfDeclaredOverAge<V>( 150 + v: V, 151 + ): v is ConfigRegionRuleIfDeclaredOverAge & V { 139 152 return is$typed(v, id, hashConfigRegionRuleIfDeclaredOverAge); 140 153 } 141 154 142 - export function validateConfigRegionRuleIfDeclaredOverAge<V>(v: V) { 155 + export function validateConfigRegionRuleIfDeclaredOverAge<V>( 156 + v: V, 157 + ): ValidationResult<ConfigRegionRuleIfDeclaredOverAge & V> { 143 158 return validate<ConfigRegionRuleIfDeclaredOverAge & V>( 144 159 v, 145 160 id, ··· 158 173 const hashConfigRegionRuleIfDeclaredUnderAge = 159 174 "configRegionRuleIfDeclaredUnderAge"; 160 175 161 - export function isConfigRegionRuleIfDeclaredUnderAge<V>(v: V) { 176 + export function isConfigRegionRuleIfDeclaredUnderAge<V>( 177 + v: V, 178 + ): v is ConfigRegionRuleIfDeclaredUnderAge & V { 162 179 return is$typed(v, id, hashConfigRegionRuleIfDeclaredUnderAge); 163 180 } 164 181 165 - export function validateConfigRegionRuleIfDeclaredUnderAge<V>(v: V) { 182 + export function validateConfigRegionRuleIfDeclaredUnderAge<V>( 183 + v: V, 184 + ): ValidationResult<ConfigRegionRuleIfDeclaredUnderAge & V> { 166 185 return validate<ConfigRegionRuleIfDeclaredUnderAge & V>( 167 186 v, 168 187 id, ··· 180 199 181 200 const hashConfigRegionRuleIfAssuredOverAge = "configRegionRuleIfAssuredOverAge"; 182 201 183 - export function isConfigRegionRuleIfAssuredOverAge<V>(v: V) { 202 + export function isConfigRegionRuleIfAssuredOverAge<V>( 203 + v: V, 204 + ): v is ConfigRegionRuleIfAssuredOverAge & V { 184 205 return is$typed(v, id, hashConfigRegionRuleIfAssuredOverAge); 185 206 } 186 207 187 - export function validateConfigRegionRuleIfAssuredOverAge<V>(v: V) { 208 + export function validateConfigRegionRuleIfAssuredOverAge<V>( 209 + v: V, 210 + ): ValidationResult<ConfigRegionRuleIfAssuredOverAge & V> { 188 211 return validate<ConfigRegionRuleIfAssuredOverAge & V>( 189 212 v, 190 213 id, ··· 203 226 const hashConfigRegionRuleIfAssuredUnderAge = 204 227 "configRegionRuleIfAssuredUnderAge"; 205 228 206 - export function isConfigRegionRuleIfAssuredUnderAge<V>(v: V) { 229 + export function isConfigRegionRuleIfAssuredUnderAge<V>( 230 + v: V, 231 + ): v is ConfigRegionRuleIfAssuredUnderAge & V { 207 232 return is$typed(v, id, hashConfigRegionRuleIfAssuredUnderAge); 208 233 } 209 234 210 - export function validateConfigRegionRuleIfAssuredUnderAge<V>(v: V) { 235 + export function validateConfigRegionRuleIfAssuredUnderAge<V>( 236 + v: V, 237 + ): ValidationResult<ConfigRegionRuleIfAssuredUnderAge & V> { 211 238 return validate<ConfigRegionRuleIfAssuredUnderAge & V>( 212 239 v, 213 240 id, ··· 226 253 const hashConfigRegionRuleIfAccountNewerThan = 227 254 "configRegionRuleIfAccountNewerThan"; 228 255 229 - export function isConfigRegionRuleIfAccountNewerThan<V>(v: V) { 256 + export function isConfigRegionRuleIfAccountNewerThan<V>( 257 + v: V, 258 + ): v is ConfigRegionRuleIfAccountNewerThan & V { 230 259 return is$typed(v, id, hashConfigRegionRuleIfAccountNewerThan); 231 260 } 232 261 233 - export function validateConfigRegionRuleIfAccountNewerThan<V>(v: V) { 262 + export function validateConfigRegionRuleIfAccountNewerThan<V>( 263 + v: V, 264 + ): ValidationResult<ConfigRegionRuleIfAccountNewerThan & V> { 234 265 return validate<ConfigRegionRuleIfAccountNewerThan & V>( 235 266 v, 236 267 id, ··· 249 280 const hashConfigRegionRuleIfAccountOlderThan = 250 281 "configRegionRuleIfAccountOlderThan"; 251 282 252 - export function isConfigRegionRuleIfAccountOlderThan<V>(v: V) { 283 + export function isConfigRegionRuleIfAccountOlderThan<V>( 284 + v: V, 285 + ): v is ConfigRegionRuleIfAccountOlderThan & V { 253 286 return is$typed(v, id, hashConfigRegionRuleIfAccountOlderThan); 254 287 } 255 288 256 - export function validateConfigRegionRuleIfAccountOlderThan<V>(v: V) { 289 + export function validateConfigRegionRuleIfAccountOlderThan<V>( 290 + v: V, 291 + ): ValidationResult<ConfigRegionRuleIfAccountOlderThan & V> { 257 292 return validate<ConfigRegionRuleIfAccountOlderThan & V>( 258 293 v, 259 294 id, ··· 300 335 301 336 const hashEvent = "event"; 302 337 303 - export function isEvent<V>(v: V) { 338 + export function isEvent<V>(v: V): v is Event & V { 304 339 return is$typed(v, id, hashEvent); 305 340 } 306 341 307 - export function validateEvent<V>(v: V) { 342 + export function validateEvent<V>(v: V): ValidationResult<Event & V> { 308 343 return validate<Event & V>(v, id, hashEvent); 309 344 }
+6
lex/types/app/bsky/authCreatePosts.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type { LexPermissionSet } from "@atp/lexicon"; 5 + 6 + export type Main = LexPermissionSet;
+6
lex/types/app/bsky/authDeleteContent.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type { LexPermissionSet } from "@atp/lexicon"; 5 + 6 + export type Main = LexPermissionSet;
+6
lex/types/app/bsky/authFullApp.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type { LexPermissionSet } from "@atp/lexicon"; 5 + 6 + export type Main = LexPermissionSet;
+6
lex/types/app/bsky/authManageFeedDeclarations.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type { LexPermissionSet } from "@atp/lexicon"; 5 + 6 + export type Main = LexPermissionSet;
+6
lex/types/app/bsky/authManageLabelerService.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type { LexPermissionSet } from "@atp/lexicon"; 5 + 6 + export type Main = LexPermissionSet;
+6
lex/types/app/bsky/authManageModeration.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type { LexPermissionSet } from "@atp/lexicon"; 5 + 6 + export type Main = LexPermissionSet;
+6
lex/types/app/bsky/authManageNotifications.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type { LexPermissionSet } from "@atp/lexicon"; 5 + 6 + export type Main = LexPermissionSet;
+6
lex/types/app/bsky/authManageProfile.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type { LexPermissionSet } from "@atp/lexicon"; 5 + 6 + export type Main = LexPermissionSet;
+6
lex/types/app/bsky/authViewAll.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type { LexPermissionSet } from "@atp/lexicon"; 5 + 6 + export type Main = LexPermissionSet;
+7 -4
lex/types/app/bsky/bookmark/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; 7 8 import type * as AppBskyFeedDefs from "../feed/defs.ts"; ··· 17 18 18 19 const hashBookmark = "bookmark"; 19 20 20 - export function isBookmark<V>(v: V) { 21 + export function isBookmark<V>(v: V): v is Bookmark & V { 21 22 return is$typed(v, id, hashBookmark); 22 23 } 23 24 24 - export function validateBookmark<V>(v: V) { 25 + export function validateBookmark<V>(v: V): ValidationResult<Bookmark & V> { 25 26 return validate<Bookmark & V>(v, id, hashBookmark); 26 27 } 27 28 ··· 38 39 39 40 const hashBookmarkView = "bookmarkView"; 40 41 41 - export function isBookmarkView<V>(v: V) { 42 + export function isBookmarkView<V>(v: V): v is BookmarkView & V { 42 43 return is$typed(v, id, hashBookmarkView); 43 44 } 44 45 45 - export function validateBookmarkView<V>(v: V) { 46 + export function validateBookmarkView<V>( 47 + v: V, 48 + ): ValidationResult<BookmarkView & V> { 46 49 return validate<BookmarkView & V>(v, id, hashBookmarkView); 47 50 }
+69
lex/types/app/bsky/contact/defs.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 6 + import { is$typed as _is$typed } from "../../../../util.ts"; 7 + import type * as AppBskyActorDefs from "../actor/defs.ts"; 8 + 9 + const is$typed = _is$typed, validate = _validate; 10 + const id = "app.bsky.contact.defs"; 11 + 12 + /** Associates a profile with the positional index of the contact import input in the call to `app.bsky.contact.importContacts`, so clients can know which phone caused a particular match. */ 13 + export interface MatchAndContactIndex { 14 + $type?: "app.bsky.contact.defs#matchAndContactIndex"; 15 + match: AppBskyActorDefs.ProfileView; 16 + /** The index of this match in the import contact input. */ 17 + contactIndex: number; 18 + } 19 + 20 + const hashMatchAndContactIndex = "matchAndContactIndex"; 21 + 22 + export function isMatchAndContactIndex<V>(v: V): v is MatchAndContactIndex & V { 23 + return is$typed(v, id, hashMatchAndContactIndex); 24 + } 25 + 26 + export function validateMatchAndContactIndex<V>( 27 + v: V, 28 + ): ValidationResult<MatchAndContactIndex & V> { 29 + return validate<MatchAndContactIndex & V>(v, id, hashMatchAndContactIndex); 30 + } 31 + 32 + export interface SyncStatus { 33 + $type?: "app.bsky.contact.defs#syncStatus"; 34 + /** Last date when contacts where imported. */ 35 + syncedAt: string; 36 + /** Number of existing contact matches resulting of the user imports and of their imported contacts having imported the user. Matches stop being counted when the user either follows the matched contact or dismisses the match. */ 37 + matchesCount: number; 38 + } 39 + 40 + const hashSyncStatus = "syncStatus"; 41 + 42 + export function isSyncStatus<V>(v: V): v is SyncStatus & V { 43 + return is$typed(v, id, hashSyncStatus); 44 + } 45 + 46 + export function validateSyncStatus<V>(v: V): ValidationResult<SyncStatus & V> { 47 + return validate<SyncStatus & V>(v, id, hashSyncStatus); 48 + } 49 + 50 + /** A stash object to be sent via bsync representing a notification to be created. */ 51 + export interface Notification { 52 + $type?: "app.bsky.contact.defs#notification"; 53 + /** The DID of who this notification comes from. */ 54 + from: string; 55 + /** The DID of who this notification should go to. */ 56 + to: string; 57 + } 58 + 59 + const hashNotification = "notification"; 60 + 61 + export function isNotification<V>(v: V): v is Notification & V { 62 + return is$typed(v, id, hashNotification); 63 + } 64 + 65 + export function validateNotification<V>( 66 + v: V, 67 + ): ValidationResult<Notification & V> { 68 + return validate<Notification & V>(v, id, hashNotification); 69 + }
+30
lex/types/app/bsky/contact/dismissMatch.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + export type QueryParams = globalThis.Record<PropertyKey, never>; 5 + 6 + export interface InputSchema { 7 + /** The subject's DID to dismiss the match with. */ 8 + subject: string; 9 + } 10 + 11 + export type OutputSchema = globalThis.Record<PropertyKey, never>; 12 + 13 + export interface HandlerInput { 14 + encoding: "application/json"; 15 + body: InputSchema; 16 + } 17 + 18 + export interface HandlerSuccess { 19 + encoding: "application/json"; 20 + body: OutputSchema; 21 + headers?: { [key: string]: string }; 22 + } 23 + 24 + export interface HandlerError { 25 + status: number; 26 + message?: string; 27 + error?: "InvalidDid" | "InternalError"; 28 + } 29 + 30 + export type HandlerOutput = HandlerError | HandlerSuccess;
+31
lex/types/app/bsky/contact/getMatches.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type * as AppBskyActorDefs from "../actor/defs.ts"; 5 + 6 + export type QueryParams = { 7 + limit: number; 8 + cursor?: string; 9 + }; 10 + export type InputSchema = undefined; 11 + 12 + export interface OutputSchema { 13 + cursor?: string; 14 + matches: (AppBskyActorDefs.ProfileView)[]; 15 + } 16 + 17 + export type HandlerInput = void; 18 + 19 + export interface HandlerSuccess { 20 + encoding: "application/json"; 21 + body: OutputSchema; 22 + headers?: { [key: string]: string }; 23 + } 24 + 25 + export interface HandlerError { 26 + status: number; 27 + message?: string; 28 + error?: "InvalidDid" | "InvalidLimit" | "InvalidCursor" | "InternalError"; 29 + } 30 + 31 + export type HandlerOutput = HandlerError | HandlerSuccess;
+27
lex/types/app/bsky/contact/getSyncStatus.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type * as AppBskyContactDefs from "./defs.ts"; 5 + 6 + export type QueryParams = globalThis.Record<PropertyKey, never>; 7 + export type InputSchema = undefined; 8 + 9 + export interface OutputSchema { 10 + syncStatus?: AppBskyContactDefs.SyncStatus; 11 + } 12 + 13 + export type HandlerInput = void; 14 + 15 + export interface HandlerSuccess { 16 + encoding: "application/json"; 17 + body: OutputSchema; 18 + headers?: { [key: string]: string }; 19 + } 20 + 21 + export interface HandlerError { 22 + status: number; 23 + message?: string; 24 + error?: "InvalidDid" | "InternalError"; 25 + } 26 + 27 + export type HandlerOutput = HandlerError | HandlerSuccess;
+42
lex/types/app/bsky/contact/importContacts.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type * as AppBskyContactDefs from "./defs.ts"; 5 + 6 + export type QueryParams = globalThis.Record<PropertyKey, never>; 7 + 8 + export interface InputSchema { 9 + /** JWT to authenticate the call. Use the JWT received as a response to the call to `app.bsky.contact.verifyPhone`. */ 10 + token: string; 11 + /** List of phone numbers in global E.164 format (e.g., '+12125550123'). Phone numbers that cannot be normalized into a valid phone number will be discarded. Should not repeat the 'phone' input used in `app.bsky.contact.verifyPhone`. */ 12 + contacts: (string)[]; 13 + } 14 + 15 + export interface OutputSchema { 16 + /** The users that matched during import and their indexes on the input contacts, so the client can correlate with its local list. */ 17 + matchesAndContactIndexes: (AppBskyContactDefs.MatchAndContactIndex)[]; 18 + } 19 + 20 + export interface HandlerInput { 21 + encoding: "application/json"; 22 + body: InputSchema; 23 + } 24 + 25 + export interface HandlerSuccess { 26 + encoding: "application/json"; 27 + body: OutputSchema; 28 + headers?: { [key: string]: string }; 29 + } 30 + 31 + export interface HandlerError { 32 + status: number; 33 + message?: string; 34 + error?: 35 + | "InvalidDid" 36 + | "InvalidContacts" 37 + | "TooManyContacts" 38 + | "InvalidToken" 39 + | "InternalError"; 40 + } 41 + 42 + export type HandlerOutput = HandlerError | HandlerSuccess;
+25
lex/types/app/bsky/contact/removeData.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + export type QueryParams = globalThis.Record<PropertyKey, never>; 5 + export type InputSchema = globalThis.Record<PropertyKey, never>; 6 + export type OutputSchema = globalThis.Record<PropertyKey, never>; 7 + 8 + export interface HandlerInput { 9 + encoding: "application/json"; 10 + body: InputSchema; 11 + } 12 + 13 + export interface HandlerSuccess { 14 + encoding: "application/json"; 15 + body: OutputSchema; 16 + headers?: { [key: string]: string }; 17 + } 18 + 19 + export interface HandlerError { 20 + status: number; 21 + message?: string; 22 + error?: "InvalidDid" | "InternalError"; 23 + } 24 + 25 + export type HandlerOutput = HandlerError | HandlerSuccess;
+31
lex/types/app/bsky/contact/sendNotification.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + export type QueryParams = globalThis.Record<PropertyKey, never>; 5 + 6 + export interface InputSchema { 7 + /** The DID of who this notification comes from. */ 8 + from: string; 9 + /** The DID of who this notification should go to. */ 10 + to: string; 11 + } 12 + 13 + export type OutputSchema = globalThis.Record<PropertyKey, never>; 14 + 15 + export interface HandlerInput { 16 + encoding: "application/json"; 17 + body: InputSchema; 18 + } 19 + 20 + export interface HandlerSuccess { 21 + encoding: "application/json"; 22 + body: OutputSchema; 23 + headers?: { [key: string]: string }; 24 + } 25 + 26 + export interface HandlerError { 27 + status: number; 28 + message?: string; 29 + } 30 + 31 + export type HandlerOutput = HandlerError | HandlerSuccess;
+30
lex/types/app/bsky/contact/startPhoneVerification.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + export type QueryParams = globalThis.Record<PropertyKey, never>; 5 + 6 + export interface InputSchema { 7 + /** The phone number to receive the code via SMS. */ 8 + phone: string; 9 + } 10 + 11 + export type OutputSchema = globalThis.Record<PropertyKey, never>; 12 + 13 + export interface HandlerInput { 14 + encoding: "application/json"; 15 + body: InputSchema; 16 + } 17 + 18 + export interface HandlerSuccess { 19 + encoding: "application/json"; 20 + body: OutputSchema; 21 + headers?: { [key: string]: string }; 22 + } 23 + 24 + export interface HandlerError { 25 + status: number; 26 + message?: string; 27 + error?: "RateLimitExceeded" | "InvalidDid" | "InvalidPhone" | "InternalError"; 28 + } 29 + 30 + export type HandlerOutput = HandlerError | HandlerSuccess;
+40
lex/types/app/bsky/contact/verifyPhone.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + export type QueryParams = globalThis.Record<PropertyKey, never>; 5 + 6 + export interface InputSchema { 7 + /** The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`. */ 8 + phone: string; 9 + /** The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`. */ 10 + code: string; 11 + } 12 + 13 + export interface OutputSchema { 14 + /** JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call. */ 15 + token: string; 16 + } 17 + 18 + export interface HandlerInput { 19 + encoding: "application/json"; 20 + body: InputSchema; 21 + } 22 + 23 + export interface HandlerSuccess { 24 + encoding: "application/json"; 25 + body: OutputSchema; 26 + headers?: { [key: string]: string }; 27 + } 28 + 29 + export interface HandlerError { 30 + status: number; 31 + message?: string; 32 + error?: 33 + | "RateLimitExceeded" 34 + | "InvalidDid" 35 + | "InvalidPhone" 36 + | "InvalidCode" 37 + | "InternalError"; 38 + } 39 + 40 + export type HandlerOutput = HandlerError | HandlerSuccess;
+34
lex/types/app/bsky/draft/createDraft.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type * as AppBskyDraftDefs from "./defs.ts"; 5 + 6 + export type QueryParams = globalThis.Record<PropertyKey, never>; 7 + 8 + export interface InputSchema { 9 + draft: AppBskyDraftDefs.Draft; 10 + } 11 + 12 + export interface OutputSchema { 13 + /** The ID of the created draft. */ 14 + id: string; 15 + } 16 + 17 + export interface HandlerInput { 18 + encoding: "application/json"; 19 + body: InputSchema; 20 + } 21 + 22 + export interface HandlerSuccess { 23 + encoding: "application/json"; 24 + body: OutputSchema; 25 + headers?: { [key: string]: string }; 26 + } 27 + 28 + export interface HandlerError { 29 + status: number; 30 + message?: string; 31 + error?: "DraftLimitReached"; 32 + } 33 + 34 + export type HandlerOutput = HandlerError | HandlerSuccess;
+218
lex/types/app/bsky/draft/defs.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 6 + import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 7 + import type * as AppBskyFeedPostgate from "../feed/postgate.ts"; 8 + import type * as AppBskyFeedThreadgate from "../feed/threadgate.ts"; 9 + import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; 10 + import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; 11 + 12 + const is$typed = _is$typed, validate = _validate; 13 + const id = "app.bsky.draft.defs"; 14 + 15 + /** A draft with an identifier, used to store drafts in private storage (stash). */ 16 + export interface DraftWithId { 17 + $type?: "app.bsky.draft.defs#draftWithId"; 18 + /** A TID to be used as a draft identifier. */ 19 + id: string; 20 + draft: Draft; 21 + } 22 + 23 + const hashDraftWithId = "draftWithId"; 24 + 25 + export function isDraftWithId<V>(v: V): v is DraftWithId & V { 26 + return is$typed(v, id, hashDraftWithId); 27 + } 28 + 29 + export function validateDraftWithId<V>( 30 + v: V, 31 + ): ValidationResult<DraftWithId & V> { 32 + return validate<DraftWithId & V>(v, id, hashDraftWithId); 33 + } 34 + 35 + /** A draft containing an array of draft posts. */ 36 + export interface Draft { 37 + $type?: "app.bsky.draft.defs#draft"; 38 + /** UUIDv4 identifier of the device that created this draft. */ 39 + deviceId?: string; 40 + /** The device and/or platform on which the draft was created. */ 41 + deviceName?: string; 42 + /** Array of draft posts that compose this draft. */ 43 + posts: (DraftPost)[]; 44 + /** Indicates human language of posts primary text content. */ 45 + langs?: (string)[]; 46 + /** Embedding rules for the postgates to be created when this draft is published. */ 47 + postgateEmbeddingRules?: 48 + ($Typed<AppBskyFeedPostgate.DisableRule> | { $type: string })[]; 49 + /** Allow-rules for the threadgate to be created when this draft is published. */ 50 + threadgateAllow?: ( 51 + | $Typed<AppBskyFeedThreadgate.MentionRule> 52 + | $Typed<AppBskyFeedThreadgate.FollowerRule> 53 + | $Typed<AppBskyFeedThreadgate.FollowingRule> 54 + | $Typed<AppBskyFeedThreadgate.ListRule> 55 + | { $type: string } 56 + )[]; 57 + } 58 + 59 + const hashDraft = "draft"; 60 + 61 + export function isDraft<V>(v: V): v is Draft & V { 62 + return is$typed(v, id, hashDraft); 63 + } 64 + 65 + export function validateDraft<V>(v: V): ValidationResult<Draft & V> { 66 + return validate<Draft & V>(v, id, hashDraft); 67 + } 68 + 69 + /** One of the posts that compose a draft. */ 70 + export interface DraftPost { 71 + $type?: "app.bsky.draft.defs#draftPost"; 72 + /** The primary post content. It has a higher limit than post contents to allow storing a larger text that can later be refined into smaller posts. */ 73 + text: string; 74 + labels?: $Typed<ComAtprotoLabelDefs.SelfLabels> | { $type: string }; 75 + embedImages?: (DraftEmbedImage)[]; 76 + embedVideos?: (DraftEmbedVideo)[]; 77 + embedExternals?: (DraftEmbedExternal)[]; 78 + embedRecords?: (DraftEmbedRecord)[]; 79 + } 80 + 81 + const hashDraftPost = "draftPost"; 82 + 83 + export function isDraftPost<V>(v: V): v is DraftPost & V { 84 + return is$typed(v, id, hashDraftPost); 85 + } 86 + 87 + export function validateDraftPost<V>(v: V): ValidationResult<DraftPost & V> { 88 + return validate<DraftPost & V>(v, id, hashDraftPost); 89 + } 90 + 91 + /** View to present drafts data to users. */ 92 + export interface DraftView { 93 + $type?: "app.bsky.draft.defs#draftView"; 94 + /** A TID to be used as a draft identifier. */ 95 + id: string; 96 + draft: Draft; 97 + /** The time the draft was created. */ 98 + createdAt: string; 99 + /** The time the draft was last updated. */ 100 + updatedAt: string; 101 + } 102 + 103 + const hashDraftView = "draftView"; 104 + 105 + export function isDraftView<V>(v: V): v is DraftView & V { 106 + return is$typed(v, id, hashDraftView); 107 + } 108 + 109 + export function validateDraftView<V>(v: V): ValidationResult<DraftView & V> { 110 + return validate<DraftView & V>(v, id, hashDraftView); 111 + } 112 + 113 + export interface DraftEmbedLocalRef { 114 + $type?: "app.bsky.draft.defs#draftEmbedLocalRef"; 115 + /** Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts. */ 116 + path: string; 117 + } 118 + 119 + const hashDraftEmbedLocalRef = "draftEmbedLocalRef"; 120 + 121 + export function isDraftEmbedLocalRef<V>(v: V): v is DraftEmbedLocalRef & V { 122 + return is$typed(v, id, hashDraftEmbedLocalRef); 123 + } 124 + 125 + export function validateDraftEmbedLocalRef<V>( 126 + v: V, 127 + ): ValidationResult<DraftEmbedLocalRef & V> { 128 + return validate<DraftEmbedLocalRef & V>(v, id, hashDraftEmbedLocalRef); 129 + } 130 + 131 + export interface DraftEmbedCaption { 132 + $type?: "app.bsky.draft.defs#draftEmbedCaption"; 133 + lang: string; 134 + content: string; 135 + } 136 + 137 + const hashDraftEmbedCaption = "draftEmbedCaption"; 138 + 139 + export function isDraftEmbedCaption<V>(v: V): v is DraftEmbedCaption & V { 140 + return is$typed(v, id, hashDraftEmbedCaption); 141 + } 142 + 143 + export function validateDraftEmbedCaption<V>( 144 + v: V, 145 + ): ValidationResult<DraftEmbedCaption & V> { 146 + return validate<DraftEmbedCaption & V>(v, id, hashDraftEmbedCaption); 147 + } 148 + 149 + export interface DraftEmbedImage { 150 + $type?: "app.bsky.draft.defs#draftEmbedImage"; 151 + localRef: DraftEmbedLocalRef; 152 + alt?: string; 153 + } 154 + 155 + const hashDraftEmbedImage = "draftEmbedImage"; 156 + 157 + export function isDraftEmbedImage<V>(v: V): v is DraftEmbedImage & V { 158 + return is$typed(v, id, hashDraftEmbedImage); 159 + } 160 + 161 + export function validateDraftEmbedImage<V>( 162 + v: V, 163 + ): ValidationResult<DraftEmbedImage & V> { 164 + return validate<DraftEmbedImage & V>(v, id, hashDraftEmbedImage); 165 + } 166 + 167 + export interface DraftEmbedVideo { 168 + $type?: "app.bsky.draft.defs#draftEmbedVideo"; 169 + localRef: DraftEmbedLocalRef; 170 + alt?: string; 171 + captions?: (DraftEmbedCaption)[]; 172 + } 173 + 174 + const hashDraftEmbedVideo = "draftEmbedVideo"; 175 + 176 + export function isDraftEmbedVideo<V>(v: V): v is DraftEmbedVideo & V { 177 + return is$typed(v, id, hashDraftEmbedVideo); 178 + } 179 + 180 + export function validateDraftEmbedVideo<V>( 181 + v: V, 182 + ): ValidationResult<DraftEmbedVideo & V> { 183 + return validate<DraftEmbedVideo & V>(v, id, hashDraftEmbedVideo); 184 + } 185 + 186 + export interface DraftEmbedExternal { 187 + $type?: "app.bsky.draft.defs#draftEmbedExternal"; 188 + uri: string; 189 + } 190 + 191 + const hashDraftEmbedExternal = "draftEmbedExternal"; 192 + 193 + export function isDraftEmbedExternal<V>(v: V): v is DraftEmbedExternal & V { 194 + return is$typed(v, id, hashDraftEmbedExternal); 195 + } 196 + 197 + export function validateDraftEmbedExternal<V>( 198 + v: V, 199 + ): ValidationResult<DraftEmbedExternal & V> { 200 + return validate<DraftEmbedExternal & V>(v, id, hashDraftEmbedExternal); 201 + } 202 + 203 + export interface DraftEmbedRecord { 204 + $type?: "app.bsky.draft.defs#draftEmbedRecord"; 205 + record: ComAtprotoRepoStrongRef.Main; 206 + } 207 + 208 + const hashDraftEmbedRecord = "draftEmbedRecord"; 209 + 210 + export function isDraftEmbedRecord<V>(v: V): v is DraftEmbedRecord & V { 211 + return is$typed(v, id, hashDraftEmbedRecord); 212 + } 213 + 214 + export function validateDraftEmbedRecord<V>( 215 + v: V, 216 + ): ValidationResult<DraftEmbedRecord & V> { 217 + return validate<DraftEmbedRecord & V>(v, id, hashDraftEmbedRecord); 218 + }
+20
lex/types/app/bsky/draft/deleteDraft.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + export type QueryParams = globalThis.Record<PropertyKey, never>; 5 + 6 + export interface InputSchema { 7 + id: string; 8 + } 9 + 10 + export interface HandlerInput { 11 + encoding: "application/json"; 12 + body: InputSchema; 13 + } 14 + 15 + export interface HandlerError { 16 + status: number; 17 + message?: string; 18 + } 19 + 20 + export type HandlerOutput = HandlerError | void;
+30
lex/types/app/bsky/draft/getDrafts.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type * as AppBskyDraftDefs from "./defs.ts"; 5 + 6 + export type QueryParams = { 7 + limit: number; 8 + cursor?: string; 9 + }; 10 + export type InputSchema = undefined; 11 + 12 + export interface OutputSchema { 13 + cursor?: string; 14 + drafts: (AppBskyDraftDefs.DraftView)[]; 15 + } 16 + 17 + export type HandlerInput = void; 18 + 19 + export interface HandlerSuccess { 20 + encoding: "application/json"; 21 + body: OutputSchema; 22 + headers?: { [key: string]: string }; 23 + } 24 + 25 + export interface HandlerError { 26 + status: number; 27 + message?: string; 28 + } 29 + 30 + export type HandlerOutput = HandlerError | HandlerSuccess;
+22
lex/types/app/bsky/draft/updateDraft.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type * as AppBskyDraftDefs from "./defs.ts"; 5 + 6 + export type QueryParams = globalThis.Record<PropertyKey, never>; 7 + 8 + export interface InputSchema { 9 + draft: AppBskyDraftDefs.DraftWithId; 10 + } 11 + 12 + export interface HandlerInput { 13 + encoding: "application/json"; 14 + body: InputSchema; 15 + } 16 + 17 + export interface HandlerError { 18 + status: number; 19 + message?: string; 20 + } 21 + 22 + export type HandlerOutput = HandlerError | void;
+5 -2
lex/types/app/bsky/embed/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 16 17 17 18 const hashAspectRatio = "aspectRatio"; 18 19 19 - export function isAspectRatio<V>(v: V) { 20 + export function isAspectRatio<V>(v: V): v is AspectRatio & V { 20 21 return is$typed(v, id, hashAspectRatio); 21 22 } 22 23 23 - export function validateAspectRatio<V>(v: V) { 24 + export function validateAspectRatio<V>( 25 + v: V, 26 + ): ValidationResult<AspectRatio & V> { 24 27 return validate<AspectRatio & V>(v, id, hashAspectRatio); 25 28 }
+11 -8
lex/types/app/bsky/embed/external.ts
··· 3 3 */ 4 4 import type { BlobRef } from "@atp/lexicon"; 5 5 import { validate as _validate } from "../../../../lexicons.ts"; 6 + import type { ValidationResult } from "@atp/lexicon"; 6 7 import { is$typed as _is$typed } from "../../../../util.ts"; 7 8 8 9 const is$typed = _is$typed, validate = _validate; ··· 16 17 17 18 const hashMain = "main"; 18 19 19 - export function isMain<V>(v: V) { 20 + export function isMain<V>(v: V): v is Main & V { 20 21 return is$typed(v, id, hashMain); 21 22 } 22 23 23 - export function validateMain<V>(v: V) { 24 + export function validateMain<V>(v: V): ValidationResult<Main & V> { 24 25 return validate<Main & V>(v, id, hashMain); 25 26 } 26 27 ··· 34 35 35 36 const hashExternal = "external"; 36 37 37 - export function isExternal<V>(v: V) { 38 + export function isExternal<V>(v: V): v is External & V { 38 39 return is$typed(v, id, hashExternal); 39 40 } 40 41 41 - export function validateExternal<V>(v: V) { 42 + export function validateExternal<V>(v: V): ValidationResult<External & V> { 42 43 return validate<External & V>(v, id, hashExternal); 43 44 } 44 45 ··· 49 50 50 51 const hashView = "view"; 51 52 52 - export function isView<V>(v: V) { 53 + export function isView<V>(v: V): v is View & V { 53 54 return is$typed(v, id, hashView); 54 55 } 55 56 56 - export function validateView<V>(v: V) { 57 + export function validateView<V>(v: V): ValidationResult<View & V> { 57 58 return validate<View & V>(v, id, hashView); 58 59 } 59 60 ··· 67 68 68 69 const hashViewExternal = "viewExternal"; 69 70 70 - export function isViewExternal<V>(v: V) { 71 + export function isViewExternal<V>(v: V): v is ViewExternal & V { 71 72 return is$typed(v, id, hashViewExternal); 72 73 } 73 74 74 - export function validateViewExternal<V>(v: V) { 75 + export function validateViewExternal<V>( 76 + v: V, 77 + ): ValidationResult<ViewExternal & V> { 75 78 return validate<ViewExternal & V>(v, id, hashViewExternal); 76 79 }
+10 -8
lex/types/app/bsky/embed/images.ts
··· 3 3 */ 4 4 import type { BlobRef } from "@atp/lexicon"; 5 5 import { validate as _validate } from "../../../../lexicons.ts"; 6 + import type { ValidationResult } from "@atp/lexicon"; 6 7 import { is$typed as _is$typed } from "../../../../util.ts"; 7 8 import type * as AppBskyEmbedDefs from "./defs.ts"; 8 9 ··· 16 17 17 18 const hashMain = "main"; 18 19 19 - export function isMain<V>(v: V) { 20 + export function isMain<V>(v: V): v is Main & V { 20 21 return is$typed(v, id, hashMain); 21 22 } 22 23 23 - export function validateMain<V>(v: V) { 24 + export function validateMain<V>(v: V): ValidationResult<Main & V> { 24 25 return validate<Main & V>(v, id, hashMain); 25 26 } 26 27 27 28 export interface Image { 28 29 $type?: "app.bsky.embed.images#image"; 30 + /** The raw image file. May be up to 2 MB, formerly limited to 1 MB. */ 29 31 image: BlobRef; 30 32 /** Alt text description of the image, for accessibility. */ 31 33 alt: string; ··· 34 36 35 37 const hashImage = "image"; 36 38 37 - export function isImage<V>(v: V) { 39 + export function isImage<V>(v: V): v is Image & V { 38 40 return is$typed(v, id, hashImage); 39 41 } 40 42 41 - export function validateImage<V>(v: V) { 43 + export function validateImage<V>(v: V): ValidationResult<Image & V> { 42 44 return validate<Image & V>(v, id, hashImage); 43 45 } 44 46 ··· 49 51 50 52 const hashView = "view"; 51 53 52 - export function isView<V>(v: V) { 54 + export function isView<V>(v: V): v is View & V { 53 55 return is$typed(v, id, hashView); 54 56 } 55 57 56 - export function validateView<V>(v: V) { 58 + export function validateView<V>(v: V): ValidationResult<View & V> { 57 59 return validate<View & V>(v, id, hashView); 58 60 } 59 61 ··· 70 72 71 73 const hashViewImage = "viewImage"; 72 74 73 - export function isViewImage<V>(v: V) { 75 + export function isViewImage<V>(v: V): v is ViewImage & V { 74 76 return is$typed(v, id, hashViewImage); 75 77 } 76 78 77 - export function validateViewImage<V>(v: V) { 79 + export function validateViewImage<V>(v: V): ValidationResult<ViewImage & V> { 78 80 return validate<ViewImage & V>(v, id, hashViewImage); 79 81 }
+19 -12
lex/types/app/bsky/embed/record.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; 7 8 import type * as AppBskyFeedDefs from "../feed/defs.ts"; ··· 24 25 25 26 const hashMain = "main"; 26 27 27 - export function isMain<V>(v: V) { 28 + export function isMain<V>(v: V): v is Main & V { 28 29 return is$typed(v, id, hashMain); 29 30 } 30 31 31 - export function validateMain<V>(v: V) { 32 + export function validateMain<V>(v: V): ValidationResult<Main & V> { 32 33 return validate<Main & V>(v, id, hashMain); 33 34 } 34 35 ··· 48 49 49 50 const hashView = "view"; 50 51 51 - export function isView<V>(v: V) { 52 + export function isView<V>(v: V): v is View & V { 52 53 return is$typed(v, id, hashView); 53 54 } 54 55 55 - export function validateView<V>(v: V) { 56 + export function validateView<V>(v: V): ValidationResult<View & V> { 56 57 return validate<View & V>(v, id, hashView); 57 58 } 58 59 ··· 81 82 82 83 const hashViewRecord = "viewRecord"; 83 84 84 - export function isViewRecord<V>(v: V) { 85 + export function isViewRecord<V>(v: V): v is ViewRecord & V { 85 86 return is$typed(v, id, hashViewRecord); 86 87 } 87 88 88 - export function validateViewRecord<V>(v: V) { 89 + export function validateViewRecord<V>(v: V): ValidationResult<ViewRecord & V> { 89 90 return validate<ViewRecord & V>(v, id, hashViewRecord); 90 91 } 91 92 ··· 97 98 98 99 const hashViewNotFound = "viewNotFound"; 99 100 100 - export function isViewNotFound<V>(v: V) { 101 + export function isViewNotFound<V>(v: V): v is ViewNotFound & V { 101 102 return is$typed(v, id, hashViewNotFound); 102 103 } 103 104 104 - export function validateViewNotFound<V>(v: V) { 105 + export function validateViewNotFound<V>( 106 + v: V, 107 + ): ValidationResult<ViewNotFound & V> { 105 108 return validate<ViewNotFound & V>(v, id, hashViewNotFound); 106 109 } 107 110 ··· 114 117 115 118 const hashViewBlocked = "viewBlocked"; 116 119 117 - export function isViewBlocked<V>(v: V) { 120 + export function isViewBlocked<V>(v: V): v is ViewBlocked & V { 118 121 return is$typed(v, id, hashViewBlocked); 119 122 } 120 123 121 - export function validateViewBlocked<V>(v: V) { 124 + export function validateViewBlocked<V>( 125 + v: V, 126 + ): ValidationResult<ViewBlocked & V> { 122 127 return validate<ViewBlocked & V>(v, id, hashViewBlocked); 123 128 } 124 129 ··· 130 135 131 136 const hashViewDetached = "viewDetached"; 132 137 133 - export function isViewDetached<V>(v: V) { 138 + export function isViewDetached<V>(v: V): v is ViewDetached & V { 134 139 return is$typed(v, id, hashViewDetached); 135 140 } 136 141 137 - export function validateViewDetached<V>(v: V) { 142 + export function validateViewDetached<V>( 143 + v: V, 144 + ): ValidationResult<ViewDetached & V> { 138 145 return validate<ViewDetached & V>(v, id, hashViewDetached); 139 146 }
+5 -4
lex/types/app/bsky/embed/recordWithMedia.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as AppBskyEmbedRecord from "./record.ts"; 7 8 import type * as AppBskyEmbedImages from "./images.ts"; ··· 23 24 24 25 const hashMain = "main"; 25 26 26 - export function isMain<V>(v: V) { 27 + export function isMain<V>(v: V): v is Main & V { 27 28 return is$typed(v, id, hashMain); 28 29 } 29 30 30 - export function validateMain<V>(v: V) { 31 + export function validateMain<V>(v: V): ValidationResult<Main & V> { 31 32 return validate<Main & V>(v, id, hashMain); 32 33 } 33 34 ··· 43 44 44 45 const hashView = "view"; 45 46 46 - export function isView<V>(v: V) { 47 + export function isView<V>(v: V): v is View & V { 47 48 return is$typed(v, id, hashView); 48 49 } 49 50 50 - export function validateView<V>(v: V) { 51 + export function validateView<V>(v: V): ValidationResult<View & V> { 51 52 return validate<View & V>(v, id, hashView); 52 53 }
+17 -6
lex/types/app/bsky/embed/video.ts
··· 3 3 */ 4 4 import type { BlobRef } from "@atp/lexicon"; 5 5 import { validate as _validate } from "../../../../lexicons.ts"; 6 + import type { ValidationResult } from "@atp/lexicon"; 6 7 import { is$typed as _is$typed } from "../../../../util.ts"; 7 8 import type * as AppBskyEmbedDefs from "./defs.ts"; 8 9 ··· 17 18 /** Alt text description of the video, for accessibility. */ 18 19 alt?: string; 19 20 aspectRatio?: AppBskyEmbedDefs.AspectRatio; 21 + /** A hint to the client about how to present the video. */ 22 + presentation?: 23 + | "default" 24 + | "gif" 25 + | (string & globalThis.Record<PropertyKey, never>); 20 26 } 21 27 22 28 const hashMain = "main"; 23 29 24 - export function isMain<V>(v: V) { 30 + export function isMain<V>(v: V): v is Main & V { 25 31 return is$typed(v, id, hashMain); 26 32 } 27 33 28 - export function validateMain<V>(v: V) { 34 + export function validateMain<V>(v: V): ValidationResult<Main & V> { 29 35 return validate<Main & V>(v, id, hashMain); 30 36 } 31 37 ··· 37 43 38 44 const hashCaption = "caption"; 39 45 40 - export function isCaption<V>(v: V) { 46 + export function isCaption<V>(v: V): v is Caption & V { 41 47 return is$typed(v, id, hashCaption); 42 48 } 43 49 44 - export function validateCaption<V>(v: V) { 50 + export function validateCaption<V>(v: V): ValidationResult<Caption & V> { 45 51 return validate<Caption & V>(v, id, hashCaption); 46 52 } 47 53 ··· 52 58 thumbnail?: string; 53 59 alt?: string; 54 60 aspectRatio?: AppBskyEmbedDefs.AspectRatio; 61 + /** A hint to the client about how to present the video. */ 62 + presentation?: 63 + | "default" 64 + | "gif" 65 + | (string & globalThis.Record<PropertyKey, never>); 55 66 } 56 67 57 68 const hashView = "view"; 58 69 59 - export function isView<V>(v: V) { 70 + export function isView<V>(v: V): v is View & V { 60 71 return is$typed(v, id, hashView); 61 72 } 62 73 63 - export function validateView<V>(v: V) { 74 + export function validateView<V>(v: V): ValidationResult<View & V> { 64 75 return validate<View & V>(v, id, hashView); 65 76 }
+81 -50
lex/types/app/bsky/feed/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as AppBskyActorDefs from "../actor/defs.ts"; 7 8 import type * as AppBskyEmbedImages from "../embed/images.ts"; ··· 44 45 45 46 const hashPostView = "postView"; 46 47 47 - export function isPostView<V>(v: V) { 48 + export function isPostView<V>(v: V): v is PostView & V { 48 49 return is$typed(v, id, hashPostView); 49 50 } 50 51 51 - export function validatePostView<V>(v: V) { 52 + export function validatePostView<V>(v: V): ValidationResult<PostView & V> { 52 53 return validate<PostView & V>(v, id, hashPostView); 53 54 } 54 55 ··· 66 67 67 68 const hashViewerState = "viewerState"; 68 69 69 - export function isViewerState<V>(v: V) { 70 + export function isViewerState<V>(v: V): v is ViewerState & V { 70 71 return is$typed(v, id, hashViewerState); 71 72 } 72 73 73 - export function validateViewerState<V>(v: V) { 74 + export function validateViewerState<V>( 75 + v: V, 76 + ): ValidationResult<ViewerState & V> { 74 77 return validate<ViewerState & V>(v, id, hashViewerState); 75 78 } 76 79 ··· 82 85 83 86 const hashThreadContext = "threadContext"; 84 87 85 - export function isThreadContext<V>(v: V) { 88 + export function isThreadContext<V>(v: V): v is ThreadContext & V { 86 89 return is$typed(v, id, hashThreadContext); 87 90 } 88 91 89 - export function validateThreadContext<V>(v: V) { 92 + export function validateThreadContext<V>( 93 + v: V, 94 + ): ValidationResult<ThreadContext & V> { 90 95 return validate<ThreadContext & V>(v, id, hashThreadContext); 91 96 } 92 97 ··· 103 108 104 109 const hashFeedViewPost = "feedViewPost"; 105 110 106 - export function isFeedViewPost<V>(v: V) { 111 + export function isFeedViewPost<V>(v: V): v is FeedViewPost & V { 107 112 return is$typed(v, id, hashFeedViewPost); 108 113 } 109 114 110 - export function validateFeedViewPost<V>(v: V) { 115 + export function validateFeedViewPost<V>( 116 + v: V, 117 + ): ValidationResult<FeedViewPost & V> { 111 118 return validate<FeedViewPost & V>(v, id, hashFeedViewPost); 112 119 } 113 120 ··· 124 131 125 132 const hashReplyRef = "replyRef"; 126 133 127 - export function isReplyRef<V>(v: V) { 134 + export function isReplyRef<V>(v: V): v is ReplyRef & V { 128 135 return is$typed(v, id, hashReplyRef); 129 136 } 130 137 131 - export function validateReplyRef<V>(v: V) { 138 + export function validateReplyRef<V>(v: V): ValidationResult<ReplyRef & V> { 132 139 return validate<ReplyRef & V>(v, id, hashReplyRef); 133 140 } 134 141 ··· 142 149 143 150 const hashReasonRepost = "reasonRepost"; 144 151 145 - export function isReasonRepost<V>(v: V) { 152 + export function isReasonRepost<V>(v: V): v is ReasonRepost & V { 146 153 return is$typed(v, id, hashReasonRepost); 147 154 } 148 155 149 - export function validateReasonRepost<V>(v: V) { 156 + export function validateReasonRepost<V>( 157 + v: V, 158 + ): ValidationResult<ReasonRepost & V> { 150 159 return validate<ReasonRepost & V>(v, id, hashReasonRepost); 151 160 } 152 161 ··· 156 165 157 166 const hashReasonPin = "reasonPin"; 158 167 159 - export function isReasonPin<V>(v: V) { 168 + export function isReasonPin<V>(v: V): v is ReasonPin & V { 160 169 return is$typed(v, id, hashReasonPin); 161 170 } 162 171 163 - export function validateReasonPin<V>(v: V) { 172 + export function validateReasonPin<V>(v: V): ValidationResult<ReasonPin & V> { 164 173 return validate<ReasonPin & V>(v, id, hashReasonPin); 165 174 } 166 175 ··· 181 190 182 191 const hashThreadViewPost = "threadViewPost"; 183 192 184 - export function isThreadViewPost<V>(v: V) { 193 + export function isThreadViewPost<V>(v: V): v is ThreadViewPost & V { 185 194 return is$typed(v, id, hashThreadViewPost); 186 195 } 187 196 188 - export function validateThreadViewPost<V>(v: V) { 197 + export function validateThreadViewPost<V>( 198 + v: V, 199 + ): ValidationResult<ThreadViewPost & V> { 189 200 return validate<ThreadViewPost & V>(v, id, hashThreadViewPost); 190 201 } 191 202 ··· 197 208 198 209 const hashNotFoundPost = "notFoundPost"; 199 210 200 - export function isNotFoundPost<V>(v: V) { 211 + export function isNotFoundPost<V>(v: V): v is NotFoundPost & V { 201 212 return is$typed(v, id, hashNotFoundPost); 202 213 } 203 214 204 - export function validateNotFoundPost<V>(v: V) { 215 + export function validateNotFoundPost<V>( 216 + v: V, 217 + ): ValidationResult<NotFoundPost & V> { 205 218 return validate<NotFoundPost & V>(v, id, hashNotFoundPost); 206 219 } 207 220 ··· 214 227 215 228 const hashBlockedPost = "blockedPost"; 216 229 217 - export function isBlockedPost<V>(v: V) { 230 + export function isBlockedPost<V>(v: V): v is BlockedPost & V { 218 231 return is$typed(v, id, hashBlockedPost); 219 232 } 220 233 221 - export function validateBlockedPost<V>(v: V) { 234 + export function validateBlockedPost<V>( 235 + v: V, 236 + ): ValidationResult<BlockedPost & V> { 222 237 return validate<BlockedPost & V>(v, id, hashBlockedPost); 223 238 } 224 239 ··· 230 245 231 246 const hashBlockedAuthor = "blockedAuthor"; 232 247 233 - export function isBlockedAuthor<V>(v: V) { 248 + export function isBlockedAuthor<V>(v: V): v is BlockedAuthor & V { 234 249 return is$typed(v, id, hashBlockedAuthor); 235 250 } 236 251 237 - export function validateBlockedAuthor<V>(v: V) { 252 + export function validateBlockedAuthor<V>( 253 + v: V, 254 + ): ValidationResult<BlockedAuthor & V> { 238 255 return validate<BlockedAuthor & V>(v, id, hashBlockedAuthor); 239 256 } 240 257 ··· 261 278 262 279 const hashGeneratorView = "generatorView"; 263 280 264 - export function isGeneratorView<V>(v: V) { 281 + export function isGeneratorView<V>(v: V): v is GeneratorView & V { 265 282 return is$typed(v, id, hashGeneratorView); 266 283 } 267 284 268 - export function validateGeneratorView<V>(v: V) { 285 + export function validateGeneratorView<V>( 286 + v: V, 287 + ): ValidationResult<GeneratorView & V> { 269 288 return validate<GeneratorView & V>(v, id, hashGeneratorView); 270 289 } 271 290 ··· 276 295 277 296 const hashGeneratorViewerState = "generatorViewerState"; 278 297 279 - export function isGeneratorViewerState<V>(v: V) { 298 + export function isGeneratorViewerState<V>(v: V): v is GeneratorViewerState & V { 280 299 return is$typed(v, id, hashGeneratorViewerState); 281 300 } 282 301 283 - export function validateGeneratorViewerState<V>(v: V) { 302 + export function validateGeneratorViewerState<V>( 303 + v: V, 304 + ): ValidationResult<GeneratorViewerState & V> { 284 305 return validate<GeneratorViewerState & V>(v, id, hashGeneratorViewerState); 285 306 } 286 307 ··· 296 317 297 318 const hashSkeletonFeedPost = "skeletonFeedPost"; 298 319 299 - export function isSkeletonFeedPost<V>(v: V) { 320 + export function isSkeletonFeedPost<V>(v: V): v is SkeletonFeedPost & V { 300 321 return is$typed(v, id, hashSkeletonFeedPost); 301 322 } 302 323 303 - export function validateSkeletonFeedPost<V>(v: V) { 324 + export function validateSkeletonFeedPost<V>( 325 + v: V, 326 + ): ValidationResult<SkeletonFeedPost & V> { 304 327 return validate<SkeletonFeedPost & V>(v, id, hashSkeletonFeedPost); 305 328 } 306 329 ··· 311 334 312 335 const hashSkeletonReasonRepost = "skeletonReasonRepost"; 313 336 314 - export function isSkeletonReasonRepost<V>(v: V) { 337 + export function isSkeletonReasonRepost<V>(v: V): v is SkeletonReasonRepost & V { 315 338 return is$typed(v, id, hashSkeletonReasonRepost); 316 339 } 317 340 318 - export function validateSkeletonReasonRepost<V>(v: V) { 341 + export function validateSkeletonReasonRepost<V>( 342 + v: V, 343 + ): ValidationResult<SkeletonReasonRepost & V> { 319 344 return validate<SkeletonReasonRepost & V>(v, id, hashSkeletonReasonRepost); 320 345 } 321 346 ··· 325 350 326 351 const hashSkeletonReasonPin = "skeletonReasonPin"; 327 352 328 - export function isSkeletonReasonPin<V>(v: V) { 353 + export function isSkeletonReasonPin<V>(v: V): v is SkeletonReasonPin & V { 329 354 return is$typed(v, id, hashSkeletonReasonPin); 330 355 } 331 356 332 - export function validateSkeletonReasonPin<V>(v: V) { 357 + export function validateSkeletonReasonPin<V>( 358 + v: V, 359 + ): ValidationResult<SkeletonReasonPin & V> { 333 360 return validate<SkeletonReasonPin & V>(v, id, hashSkeletonReasonPin); 334 361 } 335 362 ··· 343 370 344 371 const hashThreadgateView = "threadgateView"; 345 372 346 - export function isThreadgateView<V>(v: V) { 373 + export function isThreadgateView<V>(v: V): v is ThreadgateView & V { 347 374 return is$typed(v, id, hashThreadgateView); 348 375 } 349 376 350 - export function validateThreadgateView<V>(v: V) { 377 + export function validateThreadgateView<V>( 378 + v: V, 379 + ): ValidationResult<ThreadgateView & V> { 351 380 return validate<ThreadgateView & V>(v, id, hashThreadgateView); 352 381 } 353 382 ··· 376 405 377 406 const hashInteraction = "interaction"; 378 407 379 - export function isInteraction<V>(v: V) { 408 + export function isInteraction<V>(v: V): v is Interaction & V { 380 409 return is$typed(v, id, hashInteraction); 381 410 } 382 411 383 - export function validateInteraction<V>(v: V) { 412 + export function validateInteraction<V>( 413 + v: V, 414 + ): ValidationResult<Interaction & V> { 384 415 return validate<Interaction & V>(v, id, hashInteraction); 385 416 } 386 417 387 418 /** Request that less content like the given feed item be shown in the feed */ 388 - export const REQUESTLESS = `${id}#requestLess`; 419 + export const REQUESTLESS: string = `${id}#requestLess`; 389 420 /** Request that more content like the given feed item be shown in the feed */ 390 - export const REQUESTMORE = `${id}#requestMore`; 421 + export const REQUESTMORE: string = `${id}#requestMore`; 391 422 /** User clicked through to the feed item */ 392 - export const CLICKTHROUGHITEM = `${id}#clickthroughItem`; 423 + export const CLICKTHROUGHITEM: string = `${id}#clickthroughItem`; 393 424 /** User clicked through to the author of the feed item */ 394 - export const CLICKTHROUGHAUTHOR = `${id}#clickthroughAuthor`; 425 + export const CLICKTHROUGHAUTHOR: string = `${id}#clickthroughAuthor`; 395 426 /** User clicked through to the reposter of the feed item */ 396 - export const CLICKTHROUGHREPOSTER = `${id}#clickthroughReposter`; 427 + export const CLICKTHROUGHREPOSTER: string = `${id}#clickthroughReposter`; 397 428 /** User clicked through to the embedded content of the feed item */ 398 - export const CLICKTHROUGHEMBED = `${id}#clickthroughEmbed`; 429 + export const CLICKTHROUGHEMBED: string = `${id}#clickthroughEmbed`; 399 430 /** Declares the feed generator returns any types of posts. */ 400 - export const CONTENTMODEUNSPECIFIED = `${id}#contentModeUnspecified`; 431 + export const CONTENTMODEUNSPECIFIED: string = `${id}#contentModeUnspecified`; 401 432 /** Declares the feed generator returns posts containing app.bsky.embed.video embeds. */ 402 - export const CONTENTMODEVIDEO = `${id}#contentModeVideo`; 433 + export const CONTENTMODEVIDEO: string = `${id}#contentModeVideo`; 403 434 /** Feed item was seen by user */ 404 - export const INTERACTIONSEEN = `${id}#interactionSeen`; 435 + export const INTERACTIONSEEN: string = `${id}#interactionSeen`; 405 436 /** User liked the feed item */ 406 - export const INTERACTIONLIKE = `${id}#interactionLike`; 437 + export const INTERACTIONLIKE: string = `${id}#interactionLike`; 407 438 /** User reposted the feed item */ 408 - export const INTERACTIONREPOST = `${id}#interactionRepost`; 439 + export const INTERACTIONREPOST: string = `${id}#interactionRepost`; 409 440 /** User replied to the feed item */ 410 - export const INTERACTIONREPLY = `${id}#interactionReply`; 441 + export const INTERACTIONREPLY: string = `${id}#interactionReply`; 411 442 /** User quoted the feed item */ 412 - export const INTERACTIONQUOTE = `${id}#interactionQuote`; 443 + export const INTERACTIONQUOTE: string = `${id}#interactionQuote`; 413 444 /** User shared the feed item */ 414 - export const INTERACTIONSHARE = `${id}#interactionShare`; 445 + export const INTERACTIONSHARE: string = `${id}#interactionShare`;
+5 -4
lex/types/app/bsky/feed/describeFeedGenerator.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 38 39 39 40 const hashFeed = "feed"; 40 41 41 - export function isFeed<V>(v: V) { 42 + export function isFeed<V>(v: V): v is Feed & V { 42 43 return is$typed(v, id, hashFeed); 43 44 } 44 45 45 - export function validateFeed<V>(v: V) { 46 + export function validateFeed<V>(v: V): ValidationResult<Feed & V> { 46 47 return validate<Feed & V>(v, id, hashFeed); 47 48 } 48 49 ··· 54 55 55 56 const hashLinks = "links"; 56 57 57 - export function isLinks<V>(v: V) { 58 + export function isLinks<V>(v: V): v is Links & V { 58 59 return is$typed(v, id, hashLinks); 59 60 } 60 61 61 - export function validateLinks<V>(v: V) { 62 + export function validateLinks<V>(v: V): ValidationResult<Links & V> { 62 63 return validate<Links & V>(v, id, hashLinks); 63 64 }
+3 -2
lex/types/app/bsky/feed/generator.ts
··· 3 3 */ 4 4 import type { BlobRef } from "@atp/lexicon"; 5 5 import { validate as _validate } from "../../../../lexicons.ts"; 6 + import type { ValidationResult } from "@atp/lexicon"; 6 7 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 7 8 import type * as AppBskyRichtextFacet from "../richtext/facet.ts"; 8 9 import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; ··· 30 31 31 32 const hashRecord = "main"; 32 33 33 - export function isRecord<V>(v: V) { 34 + export function isRecord<V>(v: V): v is Record & V { 34 35 return is$typed(v, id, hashRecord); 35 36 } 36 37 37 - export function validateRecord<V>(v: V) { 38 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 38 39 return validate<Record & V>(v, id, hashRecord, true); 39 40 } 40 41
+3 -2
lex/types/app/bsky/feed/getLikes.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as AppBskyActorDefs from "../actor/defs.ts"; 7 8 ··· 49 50 50 51 const hashLike = "like"; 51 52 52 - export function isLike<V>(v: V) { 53 + export function isLike<V>(v: V): v is Like & V { 53 54 return is$typed(v, id, hashLike); 54 55 } 55 56 56 - export function validateLike<V>(v: V) { 57 + export function validateLike<V>(v: V): ValidationResult<Like & V> { 57 58 return validate<Like & V>(v, id, hashLike); 58 59 }
+3 -2
lex/types/app/bsky/feed/like.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; 7 8 ··· 18 19 19 20 const hashRecord = "main"; 20 21 21 - export function isRecord<V>(v: V) { 22 + export function isRecord<V>(v: V): v is Record & V { 22 23 return is$typed(v, id, hashRecord); 23 24 } 24 25 25 - export function validateRecord<V>(v: V) { 26 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 26 27 return validate<Record & V>(v, id, hashRecord, true); 27 28 } 28 29
+9 -8
lex/types/app/bsky/feed/post.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as AppBskyRichtextFacet from "../richtext/facet.ts"; 7 8 import type * as AppBskyEmbedImages from "../embed/images.ts"; ··· 43 44 44 45 const hashRecord = "main"; 45 46 46 - export function isRecord<V>(v: V) { 47 + export function isRecord<V>(v: V): v is Record & V { 47 48 return is$typed(v, id, hashRecord); 48 49 } 49 50 50 - export function validateRecord<V>(v: V) { 51 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 51 52 return validate<Record & V>(v, id, hashRecord, true); 52 53 } 53 54 ··· 61 62 62 63 const hashReplyRef = "replyRef"; 63 64 64 - export function isReplyRef<V>(v: V) { 65 + export function isReplyRef<V>(v: V): v is ReplyRef & V { 65 66 return is$typed(v, id, hashReplyRef); 66 67 } 67 68 68 - export function validateReplyRef<V>(v: V) { 69 + export function validateReplyRef<V>(v: V): ValidationResult<ReplyRef & V> { 69 70 return validate<ReplyRef & V>(v, id, hashReplyRef); 70 71 } 71 72 ··· 80 81 81 82 const hashEntity = "entity"; 82 83 83 - export function isEntity<V>(v: V) { 84 + export function isEntity<V>(v: V): v is Entity & V { 84 85 return is$typed(v, id, hashEntity); 85 86 } 86 87 87 - export function validateEntity<V>(v: V) { 88 + export function validateEntity<V>(v: V): ValidationResult<Entity & V> { 88 89 return validate<Entity & V>(v, id, hashEntity); 89 90 } 90 91 ··· 97 98 98 99 const hashTextSlice = "textSlice"; 99 100 100 - export function isTextSlice<V>(v: V) { 101 + export function isTextSlice<V>(v: V): v is TextSlice & V { 101 102 return is$typed(v, id, hashTextSlice); 102 103 } 103 104 104 - export function validateTextSlice<V>(v: V) { 105 + export function validateTextSlice<V>(v: V): ValidationResult<TextSlice & V> { 105 106 return validate<TextSlice & V>(v, id, hashTextSlice); 106 107 }
+7 -4
lex/types/app/bsky/feed/postgate.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 21 22 22 23 const hashRecord = "main"; 23 24 24 - export function isRecord<V>(v: V) { 25 + export function isRecord<V>(v: V): v is Record & V { 25 26 return is$typed(v, id, hashRecord); 26 27 } 27 28 28 - export function validateRecord<V>(v: V) { 29 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 29 30 return validate<Record & V>(v, id, hashRecord, true); 30 31 } 31 32 ··· 38 39 39 40 const hashDisableRule = "disableRule"; 40 41 41 - export function isDisableRule<V>(v: V) { 42 + export function isDisableRule<V>(v: V): v is DisableRule & V { 42 43 return is$typed(v, id, hashDisableRule); 43 44 } 44 45 45 - export function validateDisableRule<V>(v: V) { 46 + export function validateDisableRule<V>( 47 + v: V, 48 + ): ValidationResult<DisableRule & V> { 46 49 return validate<DisableRule & V>(v, id, hashDisableRule); 47 50 }
+3 -2
lex/types/app/bsky/feed/repost.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; 7 8 ··· 18 19 19 20 const hashRecord = "main"; 20 21 21 - export function isRecord<V>(v: V) { 22 + export function isRecord<V>(v: V): v is Record & V { 22 23 return is$typed(v, id, hashRecord); 23 24 } 24 25 25 - export function validateRecord<V>(v: V) { 26 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 26 27 return validate<Record & V>(v, id, hashRecord, true); 27 28 } 28 29
+1
lex/types/app/bsky/feed/sendInteractions.ts
··· 6 6 export type QueryParams = globalThis.Record<PropertyKey, never>; 7 7 8 8 export interface InputSchema { 9 + feed?: string; 9 10 interactions: (AppBskyFeedDefs.Interaction)[]; 10 11 } 11 12
+17 -10
lex/types/app/bsky/feed/threadgate.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 27 28 28 29 const hashRecord = "main"; 29 30 30 - export function isRecord<V>(v: V) { 31 + export function isRecord<V>(v: V): v is Record & V { 31 32 return is$typed(v, id, hashRecord); 32 33 } 33 34 34 - export function validateRecord<V>(v: V) { 35 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 35 36 return validate<Record & V>(v, id, hashRecord, true); 36 37 } 37 38 ··· 44 45 45 46 const hashMentionRule = "mentionRule"; 46 47 47 - export function isMentionRule<V>(v: V) { 48 + export function isMentionRule<V>(v: V): v is MentionRule & V { 48 49 return is$typed(v, id, hashMentionRule); 49 50 } 50 51 51 - export function validateMentionRule<V>(v: V) { 52 + export function validateMentionRule<V>( 53 + v: V, 54 + ): ValidationResult<MentionRule & V> { 52 55 return validate<MentionRule & V>(v, id, hashMentionRule); 53 56 } 54 57 ··· 59 62 60 63 const hashFollowerRule = "followerRule"; 61 64 62 - export function isFollowerRule<V>(v: V) { 65 + export function isFollowerRule<V>(v: V): v is FollowerRule & V { 63 66 return is$typed(v, id, hashFollowerRule); 64 67 } 65 68 66 - export function validateFollowerRule<V>(v: V) { 69 + export function validateFollowerRule<V>( 70 + v: V, 71 + ): ValidationResult<FollowerRule & V> { 67 72 return validate<FollowerRule & V>(v, id, hashFollowerRule); 68 73 } 69 74 ··· 74 79 75 80 const hashFollowingRule = "followingRule"; 76 81 77 - export function isFollowingRule<V>(v: V) { 82 + export function isFollowingRule<V>(v: V): v is FollowingRule & V { 78 83 return is$typed(v, id, hashFollowingRule); 79 84 } 80 85 81 - export function validateFollowingRule<V>(v: V) { 86 + export function validateFollowingRule<V>( 87 + v: V, 88 + ): ValidationResult<FollowingRule & V> { 82 89 return validate<FollowingRule & V>(v, id, hashFollowingRule); 83 90 } 84 91 ··· 90 97 91 98 const hashListRule = "listRule"; 92 99 93 - export function isListRule<V>(v: V) { 100 + export function isListRule<V>(v: V): v is ListRule & V { 94 101 return is$typed(v, id, hashListRule); 95 102 } 96 103 97 - export function validateListRule<V>(v: V) { 104 + export function validateListRule<V>(v: V): ValidationResult<ListRule & V> { 98 105 return validate<ListRule & V>(v, id, hashListRule); 99 106 }
+3 -2
lex/types/app/bsky/graph/block.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 17 18 18 19 const hashRecord = "main"; 19 20 20 - export function isRecord<V>(v: V) { 21 + export function isRecord<V>(v: V): v is Record & V { 21 22 return is$typed(v, id, hashRecord); 22 23 } 23 24 24 - export function validateRecord<V>(v: V) { 25 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 25 26 return validate<Record & V>(v, id, hashRecord, true); 26 27 } 27 28
+42 -19
lex/types/app/bsky/graph/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; 7 8 import type * as AppBskyActorDefs from "../actor/defs.ts"; ··· 26 27 27 28 const hashListViewBasic = "listViewBasic"; 28 29 29 - export function isListViewBasic<V>(v: V) { 30 + export function isListViewBasic<V>(v: V): v is ListViewBasic & V { 30 31 return is$typed(v, id, hashListViewBasic); 31 32 } 32 33 33 - export function validateListViewBasic<V>(v: V) { 34 + export function validateListViewBasic<V>( 35 + v: V, 36 + ): ValidationResult<ListViewBasic & V> { 34 37 return validate<ListViewBasic & V>(v, id, hashListViewBasic); 35 38 } 36 39 ··· 52 55 53 56 const hashListView = "listView"; 54 57 55 - export function isListView<V>(v: V) { 58 + export function isListView<V>(v: V): v is ListView & V { 56 59 return is$typed(v, id, hashListView); 57 60 } 58 61 59 - export function validateListView<V>(v: V) { 62 + export function validateListView<V>(v: V): ValidationResult<ListView & V> { 60 63 return validate<ListView & V>(v, id, hashListView); 61 64 } 62 65 ··· 68 71 69 72 const hashListItemView = "listItemView"; 70 73 71 - export function isListItemView<V>(v: V) { 74 + export function isListItemView<V>(v: V): v is ListItemView & V { 72 75 return is$typed(v, id, hashListItemView); 73 76 } 74 77 75 - export function validateListItemView<V>(v: V) { 78 + export function validateListItemView<V>( 79 + v: V, 80 + ): ValidationResult<ListItemView & V> { 76 81 return validate<ListItemView & V>(v, id, hashListItemView); 77 82 } 78 83 ··· 93 98 94 99 const hashStarterPackView = "starterPackView"; 95 100 96 - export function isStarterPackView<V>(v: V) { 101 + export function isStarterPackView<V>(v: V): v is StarterPackView & V { 97 102 return is$typed(v, id, hashStarterPackView); 98 103 } 99 104 100 - export function validateStarterPackView<V>(v: V) { 105 + export function validateStarterPackView<V>( 106 + v: V, 107 + ): ValidationResult<StarterPackView & V> { 101 108 return validate<StarterPackView & V>(v, id, hashStarterPackView); 102 109 } 103 110 ··· 116 123 117 124 const hashStarterPackViewBasic = "starterPackViewBasic"; 118 125 119 - export function isStarterPackViewBasic<V>(v: V) { 126 + export function isStarterPackViewBasic<V>(v: V): v is StarterPackViewBasic & V { 120 127 return is$typed(v, id, hashStarterPackViewBasic); 121 128 } 122 129 123 - export function validateStarterPackViewBasic<V>(v: V) { 130 + export function validateStarterPackViewBasic<V>( 131 + v: V, 132 + ): ValidationResult<StarterPackViewBasic & V> { 124 133 return validate<StarterPackViewBasic & V>(v, id, hashStarterPackViewBasic); 125 134 } 126 135 ··· 131 140 | (string & globalThis.Record<PropertyKey, never>); 132 141 133 142 /** A list of actors to apply an aggregate moderation action (mute/block) on. */ 134 - export const MODLIST = `${id}#modlist`; 143 + export const MODLIST: string = `${id}#modlist`; 135 144 /** A list of actors used for curation purposes such as list feeds or interaction gating. */ 136 - export const CURATELIST = `${id}#curatelist`; 145 + export const CURATELIST: string = `${id}#curatelist`; 137 146 /** A list of actors used for only for reference purposes such as within a starter pack. */ 138 - export const REFERENCELIST = `${id}#referencelist`; 147 + export const REFERENCELIST: string = `${id}#referencelist`; 139 148 140 149 export interface ListViewerState { 141 150 $type?: "app.bsky.graph.defs#listViewerState"; ··· 145 154 146 155 const hashListViewerState = "listViewerState"; 147 156 148 - export function isListViewerState<V>(v: V) { 157 + export function isListViewerState<V>(v: V): v is ListViewerState & V { 149 158 return is$typed(v, id, hashListViewerState); 150 159 } 151 160 152 - export function validateListViewerState<V>(v: V) { 161 + export function validateListViewerState<V>( 162 + v: V, 163 + ): ValidationResult<ListViewerState & V> { 153 164 return validate<ListViewerState & V>(v, id, hashListViewerState); 154 165 } 155 166 ··· 162 173 163 174 const hashNotFoundActor = "notFoundActor"; 164 175 165 - export function isNotFoundActor<V>(v: V) { 176 + export function isNotFoundActor<V>(v: V): v is NotFoundActor & V { 166 177 return is$typed(v, id, hashNotFoundActor); 167 178 } 168 179 169 - export function validateNotFoundActor<V>(v: V) { 180 + export function validateNotFoundActor<V>( 181 + v: V, 182 + ): ValidationResult<NotFoundActor & V> { 170 183 return validate<NotFoundActor & V>(v, id, hashNotFoundActor); 171 184 } 172 185 ··· 178 191 following?: string; 179 192 /** if the actor is followed by this DID, contains the AT-URI of the follow record */ 180 193 followedBy?: string; 194 + /** if the actor blocks this DID, this is the AT-URI of the block record */ 195 + blocking?: string; 196 + /** if the actor is blocked by this DID, contains the AT-URI of the block record */ 197 + blockedBy?: string; 198 + /** if the actor blocks this DID via a block list, this is the AT-URI of the listblock record */ 199 + blockingByList?: string; 200 + /** if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record */ 201 + blockedByList?: string; 181 202 } 182 203 183 204 const hashRelationship = "relationship"; 184 205 185 - export function isRelationship<V>(v: V) { 206 + export function isRelationship<V>(v: V): v is Relationship & V { 186 207 return is$typed(v, id, hashRelationship); 187 208 } 188 209 189 - export function validateRelationship<V>(v: V) { 210 + export function validateRelationship<V>( 211 + v: V, 212 + ): ValidationResult<Relationship & V> { 190 213 return validate<Relationship & V>(v, id, hashRelationship); 191 214 }
+3 -2
lex/types/app/bsky/graph/follow.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; 7 8 ··· 18 19 19 20 const hashRecord = "main"; 20 21 21 - export function isRecord<V>(v: V) { 22 + export function isRecord<V>(v: V): v is Record & V { 22 23 return is$typed(v, id, hashRecord); 23 24 } 24 25 25 - export function validateRecord<V>(v: V) { 26 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 26 27 return validate<Record & V>(v, id, hashRecord, true); 27 28 } 28 29
+5 -2
lex/types/app/bsky/graph/getListsWithMembership.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as AppBskyGraphDefs from "./defs.ts"; 7 8 ··· 50 51 51 52 const hashListWithMembership = "listWithMembership"; 52 53 53 - export function isListWithMembership<V>(v: V) { 54 + export function isListWithMembership<V>(v: V): v is ListWithMembership & V { 54 55 return is$typed(v, id, hashListWithMembership); 55 56 } 56 57 57 - export function validateListWithMembership<V>(v: V) { 58 + export function validateListWithMembership<V>( 59 + v: V, 60 + ): ValidationResult<ListWithMembership & V> { 58 61 return validate<ListWithMembership & V>(v, id, hashListWithMembership); 59 62 }
+7 -2
lex/types/app/bsky/graph/getStarterPacksWithMembership.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as AppBskyGraphDefs from "./defs.ts"; 7 8 ··· 46 47 47 48 const hashStarterPackWithMembership = "starterPackWithMembership"; 48 49 49 - export function isStarterPackWithMembership<V>(v: V) { 50 + export function isStarterPackWithMembership<V>( 51 + v: V, 52 + ): v is StarterPackWithMembership & V { 50 53 return is$typed(v, id, hashStarterPackWithMembership); 51 54 } 52 55 53 - export function validateStarterPackWithMembership<V>(v: V) { 56 + export function validateStarterPackWithMembership<V>( 57 + v: V, 58 + ): ValidationResult<StarterPackWithMembership & V> { 54 59 return validate<StarterPackWithMembership & V>( 55 60 v, 56 61 id,
+4 -2
lex/types/app/bsky/graph/getSuggestedFollowsByActor.ts
··· 10 10 11 11 export interface OutputSchema { 12 12 suggestions: (AppBskyActorDefs.ProfileView)[]; 13 - /** If true, response has fallen-back to generic results, and is not scoped using relativeToDid */ 14 - isFallback?: boolean; 15 13 /** Snowflake for this recommendation, use when submitting recommendation events. */ 14 + recIdStr?: string; 15 + /** DEPRECATED, unused. Previously: if true, response has fallen-back to generic results, and is not scoped using relativeToDid */ 16 + isFallback?: boolean; 17 + /** DEPRECATED: use recIdStr instead. */ 16 18 recId?: number; 17 19 } 18 20
+3 -2
lex/types/app/bsky/graph/list.ts
··· 3 3 */ 4 4 import type { BlobRef } from "@atp/lexicon"; 5 5 import { validate as _validate } from "../../../../lexicons.ts"; 6 + import type { ValidationResult } from "@atp/lexicon"; 6 7 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 7 8 import type * as AppBskyGraphDefs from "./defs.ts"; 8 9 import type * as AppBskyRichtextFacet from "../richtext/facet.ts"; ··· 26 27 27 28 const hashRecord = "main"; 28 29 29 - export function isRecord<V>(v: V) { 30 + export function isRecord<V>(v: V): v is Record & V { 30 31 return is$typed(v, id, hashRecord); 31 32 } 32 33 33 - export function validateRecord<V>(v: V) { 34 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 34 35 return validate<Record & V>(v, id, hashRecord, true); 35 36 } 36 37
+3 -2
lex/types/app/bsky/graph/listblock.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 17 18 18 19 const hashRecord = "main"; 19 20 20 - export function isRecord<V>(v: V) { 21 + export function isRecord<V>(v: V): v is Record & V { 21 22 return is$typed(v, id, hashRecord); 22 23 } 23 24 24 - export function validateRecord<V>(v: V) { 25 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 25 26 return validate<Record & V>(v, id, hashRecord, true); 26 27 } 27 28
+3 -2
lex/types/app/bsky/graph/listitem.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 19 20 20 21 const hashRecord = "main"; 21 22 22 - export function isRecord<V>(v: V) { 23 + export function isRecord<V>(v: V): v is Record & V { 23 24 return is$typed(v, id, hashRecord); 24 25 } 25 26 26 - export function validateRecord<V>(v: V) { 27 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 27 28 return validate<Record & V>(v, id, hashRecord, true); 28 29 } 29 30
+5 -4
lex/types/app/bsky/graph/starterpack.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as AppBskyRichtextFacet from "../richtext/facet.ts"; 7 8 ··· 23 24 24 25 const hashRecord = "main"; 25 26 26 - export function isRecord<V>(v: V) { 27 + export function isRecord<V>(v: V): v is Record & V { 27 28 return is$typed(v, id, hashRecord); 28 29 } 29 30 30 - export function validateRecord<V>(v: V) { 31 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 31 32 return validate<Record & V>(v, id, hashRecord, true); 32 33 } 33 34 ··· 40 41 41 42 const hashFeedItem = "feedItem"; 42 43 43 - export function isFeedItem<V>(v: V) { 44 + export function isFeedItem<V>(v: V): v is FeedItem & V { 44 45 return is$typed(v, id, hashFeedItem); 45 46 } 46 47 47 - export function validateFeedItem<V>(v: V) { 48 + export function validateFeedItem<V>(v: V): ValidationResult<FeedItem & V> { 48 49 return validate<FeedItem & V>(v, id, hashFeedItem); 49 50 }
+3 -2
lex/types/app/bsky/graph/verification.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 22 23 23 24 const hashRecord = "main"; 24 25 25 - export function isRecord<V>(v: V) { 26 + export function isRecord<V>(v: V): v is Record & V { 26 27 return is$typed(v, id, hashRecord); 27 28 } 28 29 29 - export function validateRecord<V>(v: V) { 30 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 30 31 return validate<Record & V>(v, id, hashRecord, true); 31 32 } 32 33
+17 -8
lex/types/app/bsky/labeler/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as AppBskyActorDefs from "../actor/defs.ts"; 7 8 import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; ··· 23 24 24 25 const hashLabelerView = "labelerView"; 25 26 26 - export function isLabelerView<V>(v: V) { 27 + export function isLabelerView<V>(v: V): v is LabelerView & V { 27 28 return is$typed(v, id, hashLabelerView); 28 29 } 29 30 30 - export function validateLabelerView<V>(v: V) { 31 + export function validateLabelerView<V>( 32 + v: V, 33 + ): ValidationResult<LabelerView & V> { 31 34 return validate<LabelerView & V>(v, id, hashLabelerView); 32 35 } 33 36 ··· 51 54 52 55 const hashLabelerViewDetailed = "labelerViewDetailed"; 53 56 54 - export function isLabelerViewDetailed<V>(v: V) { 57 + export function isLabelerViewDetailed<V>(v: V): v is LabelerViewDetailed & V { 55 58 return is$typed(v, id, hashLabelerViewDetailed); 56 59 } 57 60 58 - export function validateLabelerViewDetailed<V>(v: V) { 61 + export function validateLabelerViewDetailed<V>( 62 + v: V, 63 + ): ValidationResult<LabelerViewDetailed & V> { 59 64 return validate<LabelerViewDetailed & V>(v, id, hashLabelerViewDetailed); 60 65 } 61 66 ··· 66 71 67 72 const hashLabelerViewerState = "labelerViewerState"; 68 73 69 - export function isLabelerViewerState<V>(v: V) { 74 + export function isLabelerViewerState<V>(v: V): v is LabelerViewerState & V { 70 75 return is$typed(v, id, hashLabelerViewerState); 71 76 } 72 77 73 - export function validateLabelerViewerState<V>(v: V) { 78 + export function validateLabelerViewerState<V>( 79 + v: V, 80 + ): ValidationResult<LabelerViewerState & V> { 74 81 return validate<LabelerViewerState & V>(v, id, hashLabelerViewerState); 75 82 } 76 83 ··· 84 91 85 92 const hashLabelerPolicies = "labelerPolicies"; 86 93 87 - export function isLabelerPolicies<V>(v: V) { 94 + export function isLabelerPolicies<V>(v: V): v is LabelerPolicies & V { 88 95 return is$typed(v, id, hashLabelerPolicies); 89 96 } 90 97 91 - export function validateLabelerPolicies<V>(v: V) { 98 + export function validateLabelerPolicies<V>( 99 + v: V, 100 + ): ValidationResult<LabelerPolicies & V> { 92 101 return validate<LabelerPolicies & V>(v, id, hashLabelerPolicies); 93 102 }
+3 -2
lex/types/app/bsky/labeler/service.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as AppBskyLabelerDefs from "./defs.ts"; 7 8 import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; ··· 26 27 27 28 const hashRecord = "main"; 28 29 29 - export function isRecord<V>(v: V) { 30 + export function isRecord<V>(v: V): v is Record & V { 30 31 return is$typed(v, id, hashRecord); 31 32 } 32 33 33 - export function validateRecord<V>(v: V) { 34 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 34 35 return validate<Record & V>(v, id, hashRecord, true); 35 36 } 36 37
+3 -2
lex/types/app/bsky/notification/declaration.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 20 21 21 22 const hashRecord = "main"; 22 23 23 - export function isRecord<V>(v: V) { 24 + export function isRecord<V>(v: V): v is Record & V { 24 25 return is$typed(v, id, hashRecord); 25 26 } 26 27 27 - export function validateRecord<V>(v: V) { 28 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 28 29 return validate<Record & V>(v, id, hashRecord, true); 29 30 } 30 31
+29 -14
lex/types/app/bsky/notification/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 13 14 14 15 const hashRecordDeleted = "recordDeleted"; 15 16 16 - export function isRecordDeleted<V>(v: V) { 17 + export function isRecordDeleted<V>(v: V): v is RecordDeleted & V { 17 18 return is$typed(v, id, hashRecordDeleted); 18 19 } 19 20 20 - export function validateRecordDeleted<V>(v: V) { 21 + export function validateRecordDeleted<V>( 22 + v: V, 23 + ): ValidationResult<RecordDeleted & V> { 21 24 return validate<RecordDeleted & V>(v, id, hashRecordDeleted); 22 25 } 23 26 ··· 32 35 33 36 const hashChatPreference = "chatPreference"; 34 37 35 - export function isChatPreference<V>(v: V) { 38 + export function isChatPreference<V>(v: V): v is ChatPreference & V { 36 39 return is$typed(v, id, hashChatPreference); 37 40 } 38 41 39 - export function validateChatPreference<V>(v: V) { 42 + export function validateChatPreference<V>( 43 + v: V, 44 + ): ValidationResult<ChatPreference & V> { 40 45 return validate<ChatPreference & V>(v, id, hashChatPreference); 41 46 } 42 47 ··· 49 54 50 55 const hashFilterablePreference = "filterablePreference"; 51 56 52 - export function isFilterablePreference<V>(v: V) { 57 + export function isFilterablePreference<V>(v: V): v is FilterablePreference & V { 53 58 return is$typed(v, id, hashFilterablePreference); 54 59 } 55 60 56 - export function validateFilterablePreference<V>(v: V) { 61 + export function validateFilterablePreference<V>( 62 + v: V, 63 + ): ValidationResult<FilterablePreference & V> { 57 64 return validate<FilterablePreference & V>(v, id, hashFilterablePreference); 58 65 } 59 66 ··· 65 72 66 73 const hashPreference = "preference"; 67 74 68 - export function isPreference<V>(v: V) { 75 + export function isPreference<V>(v: V): v is Preference & V { 69 76 return is$typed(v, id, hashPreference); 70 77 } 71 78 72 - export function validatePreference<V>(v: V) { 79 + export function validatePreference<V>(v: V): ValidationResult<Preference & V> { 73 80 return validate<Preference & V>(v, id, hashPreference); 74 81 } 75 82 ··· 92 99 93 100 const hashPreferences = "preferences"; 94 101 95 - export function isPreferences<V>(v: V) { 102 + export function isPreferences<V>(v: V): v is Preferences & V { 96 103 return is$typed(v, id, hashPreferences); 97 104 } 98 105 99 - export function validatePreferences<V>(v: V) { 106 + export function validatePreferences<V>( 107 + v: V, 108 + ): ValidationResult<Preferences & V> { 100 109 return validate<Preferences & V>(v, id, hashPreferences); 101 110 } 102 111 ··· 108 117 109 118 const hashActivitySubscription = "activitySubscription"; 110 119 111 - export function isActivitySubscription<V>(v: V) { 120 + export function isActivitySubscription<V>(v: V): v is ActivitySubscription & V { 112 121 return is$typed(v, id, hashActivitySubscription); 113 122 } 114 123 115 - export function validateActivitySubscription<V>(v: V) { 124 + export function validateActivitySubscription<V>( 125 + v: V, 126 + ): ValidationResult<ActivitySubscription & V> { 116 127 return validate<ActivitySubscription & V>(v, id, hashActivitySubscription); 117 128 } 118 129 ··· 125 136 126 137 const hashSubjectActivitySubscription = "subjectActivitySubscription"; 127 138 128 - export function isSubjectActivitySubscription<V>(v: V) { 139 + export function isSubjectActivitySubscription<V>( 140 + v: V, 141 + ): v is SubjectActivitySubscription & V { 129 142 return is$typed(v, id, hashSubjectActivitySubscription); 130 143 } 131 144 132 - export function validateSubjectActivitySubscription<V>(v: V) { 145 + export function validateSubjectActivitySubscription<V>( 146 + v: V, 147 + ): ValidationResult<SubjectActivitySubscription & V> { 133 148 return validate<SubjectActivitySubscription & V>( 134 149 v, 135 150 id,
+6 -2
lex/types/app/bsky/notification/listNotifications.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as AppBskyActorDefs from "../actor/defs.ts"; 7 8 import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; ··· 60 61 | "like-via-repost" 61 62 | "repost-via-repost" 62 63 | "subscribed-post" 64 + | "contact-match" 63 65 | (string & globalThis.Record<PropertyKey, never>); 64 66 reasonSubject?: string; 65 67 record: { [_ in string]: unknown }; ··· 70 72 71 73 const hashNotification = "notification"; 72 74 73 - export function isNotification<V>(v: V) { 75 + export function isNotification<V>(v: V): v is Notification & V { 74 76 return is$typed(v, id, hashNotification); 75 77 } 76 78 77 - export function validateNotification<V>(v: V) { 79 + export function validateNotification<V>( 80 + v: V, 81 + ): ValidationResult<Notification & V> { 78 82 return validate<Notification & V>(v, id, hashNotification); 79 83 }
+11 -10
lex/types/app/bsky/richtext/facet.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 17 18 18 19 const hashMain = "main"; 19 20 20 - export function isMain<V>(v: V) { 21 + export function isMain<V>(v: V): v is Main & V { 21 22 return is$typed(v, id, hashMain); 22 23 } 23 24 24 - export function validateMain<V>(v: V) { 25 + export function validateMain<V>(v: V): ValidationResult<Main & V> { 25 26 return validate<Main & V>(v, id, hashMain); 26 27 } 27 28 ··· 33 34 34 35 const hashMention = "mention"; 35 36 36 - export function isMention<V>(v: V) { 37 + export function isMention<V>(v: V): v is Mention & V { 37 38 return is$typed(v, id, hashMention); 38 39 } 39 40 40 - export function validateMention<V>(v: V) { 41 + export function validateMention<V>(v: V): ValidationResult<Mention & V> { 41 42 return validate<Mention & V>(v, id, hashMention); 42 43 } 43 44 ··· 49 50 50 51 const hashLink = "link"; 51 52 52 - export function isLink<V>(v: V) { 53 + export function isLink<V>(v: V): v is Link & V { 53 54 return is$typed(v, id, hashLink); 54 55 } 55 56 56 - export function validateLink<V>(v: V) { 57 + export function validateLink<V>(v: V): ValidationResult<Link & V> { 57 58 return validate<Link & V>(v, id, hashLink); 58 59 } 59 60 ··· 65 66 66 67 const hashTag = "tag"; 67 68 68 - export function isTag<V>(v: V) { 69 + export function isTag<V>(v: V): v is Tag & V { 69 70 return is$typed(v, id, hashTag); 70 71 } 71 72 72 - export function validateTag<V>(v: V) { 73 + export function validateTag<V>(v: V): ValidationResult<Tag & V> { 73 74 return validate<Tag & V>(v, id, hashTag); 74 75 } 75 76 ··· 82 83 83 84 const hashByteSlice = "byteSlice"; 84 85 85 - export function isByteSlice<V>(v: V) { 86 + export function isByteSlice<V>(v: V): v is ByteSlice & V { 86 87 return is$typed(v, id, hashByteSlice); 87 88 } 88 89 89 - export function validateByteSlice<V>(v: V) { 90 + export function validateByteSlice<V>(v: V): ValidationResult<ByteSlice & V> { 90 91 return validate<ByteSlice & V>(v, id, hashByteSlice); 91 92 }
+51 -24
lex/types/app/bsky/unspecced/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as AppBskyActorDefs from "../actor/defs.ts"; 7 8 import type * as AppBskyFeedDefs from "../feed/defs.ts"; ··· 16 17 17 18 const hashSkeletonSearchPost = "skeletonSearchPost"; 18 19 19 - export function isSkeletonSearchPost<V>(v: V) { 20 + export function isSkeletonSearchPost<V>(v: V): v is SkeletonSearchPost & V { 20 21 return is$typed(v, id, hashSkeletonSearchPost); 21 22 } 22 23 23 - export function validateSkeletonSearchPost<V>(v: V) { 24 + export function validateSkeletonSearchPost<V>( 25 + v: V, 26 + ): ValidationResult<SkeletonSearchPost & V> { 24 27 return validate<SkeletonSearchPost & V>(v, id, hashSkeletonSearchPost); 25 28 } 26 29 ··· 31 34 32 35 const hashSkeletonSearchActor = "skeletonSearchActor"; 33 36 34 - export function isSkeletonSearchActor<V>(v: V) { 37 + export function isSkeletonSearchActor<V>(v: V): v is SkeletonSearchActor & V { 35 38 return is$typed(v, id, hashSkeletonSearchActor); 36 39 } 37 40 38 - export function validateSkeletonSearchActor<V>(v: V) { 41 + export function validateSkeletonSearchActor<V>( 42 + v: V, 43 + ): ValidationResult<SkeletonSearchActor & V> { 39 44 return validate<SkeletonSearchActor & V>(v, id, hashSkeletonSearchActor); 40 45 } 41 46 ··· 46 51 47 52 const hashSkeletonSearchStarterPack = "skeletonSearchStarterPack"; 48 53 49 - export function isSkeletonSearchStarterPack<V>(v: V) { 54 + export function isSkeletonSearchStarterPack<V>( 55 + v: V, 56 + ): v is SkeletonSearchStarterPack & V { 50 57 return is$typed(v, id, hashSkeletonSearchStarterPack); 51 58 } 52 59 53 - export function validateSkeletonSearchStarterPack<V>(v: V) { 60 + export function validateSkeletonSearchStarterPack<V>( 61 + v: V, 62 + ): ValidationResult<SkeletonSearchStarterPack & V> { 54 63 return validate<SkeletonSearchStarterPack & V>( 55 64 v, 56 65 id, ··· 68 77 69 78 const hashTrendingTopic = "trendingTopic"; 70 79 71 - export function isTrendingTopic<V>(v: V) { 80 + export function isTrendingTopic<V>(v: V): v is TrendingTopic & V { 72 81 return is$typed(v, id, hashTrendingTopic); 73 82 } 74 83 75 - export function validateTrendingTopic<V>(v: V) { 84 + export function validateTrendingTopic<V>( 85 + v: V, 86 + ): ValidationResult<TrendingTopic & V> { 76 87 return validate<TrendingTopic & V>(v, id, hashTrendingTopic); 77 88 } 78 89 ··· 90 101 91 102 const hashSkeletonTrend = "skeletonTrend"; 92 103 93 - export function isSkeletonTrend<V>(v: V) { 104 + export function isSkeletonTrend<V>(v: V): v is SkeletonTrend & V { 94 105 return is$typed(v, id, hashSkeletonTrend); 95 106 } 96 107 97 - export function validateSkeletonTrend<V>(v: V) { 108 + export function validateSkeletonTrend<V>( 109 + v: V, 110 + ): ValidationResult<SkeletonTrend & V> { 98 111 return validate<SkeletonTrend & V>(v, id, hashSkeletonTrend); 99 112 } 100 113 ··· 112 125 113 126 const hashTrendView = "trendView"; 114 127 115 - export function isTrendView<V>(v: V) { 128 + export function isTrendView<V>(v: V): v is TrendView & V { 116 129 return is$typed(v, id, hashTrendView); 117 130 } 118 131 119 - export function validateTrendView<V>(v: V) { 132 + export function validateTrendView<V>(v: V): ValidationResult<TrendView & V> { 120 133 return validate<TrendView & V>(v, id, hashTrendView); 121 134 } 122 135 ··· 137 150 138 151 const hashThreadItemPost = "threadItemPost"; 139 152 140 - export function isThreadItemPost<V>(v: V) { 153 + export function isThreadItemPost<V>(v: V): v is ThreadItemPost & V { 141 154 return is$typed(v, id, hashThreadItemPost); 142 155 } 143 156 144 - export function validateThreadItemPost<V>(v: V) { 157 + export function validateThreadItemPost<V>( 158 + v: V, 159 + ): ValidationResult<ThreadItemPost & V> { 145 160 return validate<ThreadItemPost & V>(v, id, hashThreadItemPost); 146 161 } 147 162 ··· 151 166 152 167 const hashThreadItemNoUnauthenticated = "threadItemNoUnauthenticated"; 153 168 154 - export function isThreadItemNoUnauthenticated<V>(v: V) { 169 + export function isThreadItemNoUnauthenticated<V>( 170 + v: V, 171 + ): v is ThreadItemNoUnauthenticated & V { 155 172 return is$typed(v, id, hashThreadItemNoUnauthenticated); 156 173 } 157 174 158 - export function validateThreadItemNoUnauthenticated<V>(v: V) { 175 + export function validateThreadItemNoUnauthenticated<V>( 176 + v: V, 177 + ): ValidationResult<ThreadItemNoUnauthenticated & V> { 159 178 return validate<ThreadItemNoUnauthenticated & V>( 160 179 v, 161 180 id, ··· 169 188 170 189 const hashThreadItemNotFound = "threadItemNotFound"; 171 190 172 - export function isThreadItemNotFound<V>(v: V) { 191 + export function isThreadItemNotFound<V>(v: V): v is ThreadItemNotFound & V { 173 192 return is$typed(v, id, hashThreadItemNotFound); 174 193 } 175 194 176 - export function validateThreadItemNotFound<V>(v: V) { 195 + export function validateThreadItemNotFound<V>( 196 + v: V, 197 + ): ValidationResult<ThreadItemNotFound & V> { 177 198 return validate<ThreadItemNotFound & V>(v, id, hashThreadItemNotFound); 178 199 } 179 200 ··· 184 205 185 206 const hashThreadItemBlocked = "threadItemBlocked"; 186 207 187 - export function isThreadItemBlocked<V>(v: V) { 208 + export function isThreadItemBlocked<V>(v: V): v is ThreadItemBlocked & V { 188 209 return is$typed(v, id, hashThreadItemBlocked); 189 210 } 190 211 191 - export function validateThreadItemBlocked<V>(v: V) { 212 + export function validateThreadItemBlocked<V>( 213 + v: V, 214 + ): ValidationResult<ThreadItemBlocked & V> { 192 215 return validate<ThreadItemBlocked & V>(v, id, hashThreadItemBlocked); 193 216 } 194 217 ··· 208 231 209 232 const hashAgeAssuranceState = "ageAssuranceState"; 210 233 211 - export function isAgeAssuranceState<V>(v: V) { 234 + export function isAgeAssuranceState<V>(v: V): v is AgeAssuranceState & V { 212 235 return is$typed(v, id, hashAgeAssuranceState); 213 236 } 214 237 215 - export function validateAgeAssuranceState<V>(v: V) { 238 + export function validateAgeAssuranceState<V>( 239 + v: V, 240 + ): ValidationResult<AgeAssuranceState & V> { 216 241 return validate<AgeAssuranceState & V>(v, id, hashAgeAssuranceState); 217 242 } 218 243 ··· 243 268 244 269 const hashAgeAssuranceEvent = "ageAssuranceEvent"; 245 270 246 - export function isAgeAssuranceEvent<V>(v: V) { 271 + export function isAgeAssuranceEvent<V>(v: V): v is AgeAssuranceEvent & V { 247 272 return is$typed(v, id, hashAgeAssuranceEvent); 248 273 } 249 274 250 - export function validateAgeAssuranceEvent<V>(v: V) { 275 + export function validateAgeAssuranceEvent<V>( 276 + v: V, 277 + ): ValidationResult<AgeAssuranceEvent & V> { 251 278 return validate<AgeAssuranceEvent & V>(v, id, hashAgeAssuranceEvent); 252 279 }
+5 -2
lex/types/app/bsky/unspecced/getConfig.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 38 39 39 40 const hashLiveNowConfig = "liveNowConfig"; 40 41 41 - export function isLiveNowConfig<V>(v: V) { 42 + export function isLiveNowConfig<V>(v: V): v is LiveNowConfig & V { 42 43 return is$typed(v, id, hashLiveNowConfig); 43 44 } 44 45 45 - export function validateLiveNowConfig<V>(v: V) { 46 + export function validateLiveNowConfig<V>( 47 + v: V, 48 + ): ValidationResult<LiveNowConfig & V> { 46 49 return validate<LiveNowConfig & V>(v, id, hashLiveNowConfig); 47 50 }
+34
lex/types/app/bsky/unspecced/getOnboardingSuggestedUsersSkeleton.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + export type QueryParams = { 5 + /** DID of the account making the request (not included for public/unauthenticated queries). */ 6 + viewer?: string; 7 + /** Category of users to get suggestions for. */ 8 + category?: string; 9 + limit: number; 10 + }; 11 + export type InputSchema = undefined; 12 + 13 + export interface OutputSchema { 14 + dids: (string)[]; 15 + /** DEPRECATED: use recIdStr instead. */ 16 + recId?: string; 17 + /** Snowflake for this recommendation, use when submitting recommendation events. */ 18 + recIdStr?: string; 19 + } 20 + 21 + export type HandlerInput = void; 22 + 23 + export interface HandlerSuccess { 24 + encoding: "application/json"; 25 + body: OutputSchema; 26 + headers?: { [key: string]: string }; 27 + } 28 + 29 + export interface HandlerError { 30 + status: number; 31 + message?: string; 32 + } 33 + 34 + export type HandlerOutput = HandlerError | HandlerSuccess;
+3 -2
lex/types/app/bsky/unspecced/getPostThreadOtherV2.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as AppBskyUnspeccedDefs from "./defs.ts"; 7 8 ··· 44 45 45 46 const hashThreadItem = "threadItem"; 46 47 47 - export function isThreadItem<V>(v: V) { 48 + export function isThreadItem<V>(v: V): v is ThreadItem & V { 48 49 return is$typed(v, id, hashThreadItem); 49 50 } 50 51 51 - export function validateThreadItem<V>(v: V) { 52 + export function validateThreadItem<V>(v: V): ValidationResult<ThreadItem & V> { 52 53 return validate<ThreadItem & V>(v, id, hashThreadItem); 53 54 }
+3 -2
lex/types/app/bsky/unspecced/getPostThreadV2.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as AppBskyFeedDefs from "../feed/defs.ts"; 7 8 import type * as AppBskyUnspeccedDefs from "./defs.ts"; ··· 65 66 66 67 const hashThreadItem = "threadItem"; 67 68 68 - export function isThreadItem<V>(v: V) { 69 + export function isThreadItem<V>(v: V): v is ThreadItem & V { 69 70 return is$typed(v, id, hashThreadItem); 70 71 } 71 72 72 - export function validateThreadItem<V>(v: V) { 73 + export function validateThreadItem<V>(v: V): ValidationResult<ThreadItem & V> { 73 74 return validate<ThreadItem & V>(v, id, hashThreadItem); 74 75 }
+34
lex/types/app/bsky/unspecced/getSuggestedOnboardingUsers.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type * as AppBskyActorDefs from "../actor/defs.ts"; 5 + 6 + export type QueryParams = { 7 + /** Category of users to get suggestions for. */ 8 + category?: string; 9 + limit: number; 10 + }; 11 + export type InputSchema = undefined; 12 + 13 + export interface OutputSchema { 14 + actors: (AppBskyActorDefs.ProfileView)[]; 15 + /** DEPRECATED: use recIdStr instead. */ 16 + recId?: string; 17 + /** Snowflake for this recommendation, use when submitting recommendation events. */ 18 + recIdStr?: string; 19 + } 20 + 21 + export type HandlerInput = void; 22 + 23 + export interface HandlerSuccess { 24 + encoding: "application/json"; 25 + body: OutputSchema; 26 + headers?: { [key: string]: string }; 27 + } 28 + 29 + export interface HandlerError { 30 + status: number; 31 + message?: string; 32 + } 33 + 34 + export type HandlerOutput = HandlerError | HandlerSuccess;
+4
lex/types/app/bsky/unspecced/getSuggestedUsers.ts
··· 12 12 13 13 export interface OutputSchema { 14 14 actors: (AppBskyActorDefs.ProfileView)[]; 15 + /** DEPRECATED: use recIdStr instead. */ 16 + recId?: string; 17 + /** Snowflake for this recommendation, use when submitting recommendation events. */ 18 + recIdStr?: string; 15 19 } 16 20 17 21 export type HandlerInput = void;
+30
lex/types/app/bsky/unspecced/getSuggestedUsersForDiscover.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type * as AppBskyActorDefs from "../actor/defs.ts"; 5 + 6 + export type QueryParams = { 7 + limit: number; 8 + }; 9 + export type InputSchema = undefined; 10 + 11 + export interface OutputSchema { 12 + actors: (AppBskyActorDefs.ProfileView)[]; 13 + /** Snowflake for this recommendation, use when submitting recommendation events. */ 14 + recIdStr?: string; 15 + } 16 + 17 + export type HandlerInput = void; 18 + 19 + export interface HandlerSuccess { 20 + encoding: "application/json"; 21 + body: OutputSchema; 22 + headers?: { [key: string]: string }; 23 + } 24 + 25 + export interface HandlerError { 26 + status: number; 27 + message?: string; 28 + } 29 + 30 + export type HandlerOutput = HandlerError | HandlerSuccess;
+30
lex/types/app/bsky/unspecced/getSuggestedUsersForDiscoverSkeleton.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + export type QueryParams = { 5 + /** DID of the account making the request (not included for public/unauthenticated queries). */ 6 + viewer?: string; 7 + limit: number; 8 + }; 9 + export type InputSchema = undefined; 10 + 11 + export interface OutputSchema { 12 + dids: (string)[]; 13 + /** Snowflake for this recommendation, use when submitting recommendation events. */ 14 + recIdStr?: string; 15 + } 16 + 17 + export type HandlerInput = void; 18 + 19 + export interface HandlerSuccess { 20 + encoding: "application/json"; 21 + body: OutputSchema; 22 + headers?: { [key: string]: string }; 23 + } 24 + 25 + export interface HandlerError { 26 + status: number; 27 + message?: string; 28 + } 29 + 30 + export type HandlerOutput = HandlerError | HandlerSuccess;
+32
lex/types/app/bsky/unspecced/getSuggestedUsersForExplore.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type * as AppBskyActorDefs from "../actor/defs.ts"; 5 + 6 + export type QueryParams = { 7 + /** Category of users to get suggestions for. */ 8 + category?: string; 9 + limit: number; 10 + }; 11 + export type InputSchema = undefined; 12 + 13 + export interface OutputSchema { 14 + actors: (AppBskyActorDefs.ProfileView)[]; 15 + /** Snowflake for this recommendation, use when submitting recommendation events. */ 16 + recIdStr?: string; 17 + } 18 + 19 + export type HandlerInput = void; 20 + 21 + export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 + } 26 + 27 + export interface HandlerError { 28 + status: number; 29 + message?: string; 30 + } 31 + 32 + export type HandlerOutput = HandlerError | HandlerSuccess;
+32
lex/types/app/bsky/unspecced/getSuggestedUsersForExploreSkeleton.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + export type QueryParams = { 5 + /** DID of the account making the request (not included for public/unauthenticated queries). */ 6 + viewer?: string; 7 + /** Category of users to get suggestions for. */ 8 + category?: string; 9 + limit: number; 10 + }; 11 + export type InputSchema = undefined; 12 + 13 + export interface OutputSchema { 14 + dids: (string)[]; 15 + /** Snowflake for this recommendation, use when submitting recommendation events. */ 16 + recIdStr?: string; 17 + } 18 + 19 + export type HandlerInput = void; 20 + 21 + export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 + } 26 + 27 + export interface HandlerError { 28 + status: number; 29 + message?: string; 30 + } 31 + 32 + export type HandlerOutput = HandlerError | HandlerSuccess;
+32
lex/types/app/bsky/unspecced/getSuggestedUsersForSeeMore.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type * as AppBskyActorDefs from "../actor/defs.ts"; 5 + 6 + export type QueryParams = { 7 + /** Category of users to get suggestions for. */ 8 + category?: string; 9 + limit: number; 10 + }; 11 + export type InputSchema = undefined; 12 + 13 + export interface OutputSchema { 14 + actors: (AppBskyActorDefs.ProfileView)[]; 15 + /** Snowflake for this recommendation, use when submitting recommendation events. */ 16 + recIdStr?: string; 17 + } 18 + 19 + export type HandlerInput = void; 20 + 21 + export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 + } 26 + 27 + export interface HandlerError { 28 + status: number; 29 + message?: string; 30 + } 31 + 32 + export type HandlerOutput = HandlerError | HandlerSuccess;
+32
lex/types/app/bsky/unspecced/getSuggestedUsersForSeeMoreSkeleton.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + export type QueryParams = { 5 + /** DID of the account making the request (not included for public/unauthenticated queries). */ 6 + viewer?: string; 7 + /** Category of users to get suggestions for. */ 8 + category?: string; 9 + limit: number; 10 + }; 11 + export type InputSchema = undefined; 12 + 13 + export interface OutputSchema { 14 + dids: (string)[]; 15 + /** Snowflake for this recommendation, use when submitting recommendation events. */ 16 + recIdStr?: string; 17 + } 18 + 19 + export type HandlerInput = void; 20 + 21 + export interface HandlerSuccess { 22 + encoding: "application/json"; 23 + body: OutputSchema; 24 + headers?: { [key: string]: string }; 25 + } 26 + 27 + export interface HandlerError { 28 + status: number; 29 + message?: string; 30 + } 31 + 32 + export type HandlerOutput = HandlerError | HandlerSuccess;
+4
lex/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts
··· 12 12 13 13 export interface OutputSchema { 14 14 dids: (string)[]; 15 + /** DEPRECATED: use recIdStr instead. */ 16 + recId?: string; 17 + /** Snowflake for this recommendation, use when submitting recommendation events. */ 18 + recIdStr?: string; 15 19 } 16 20 17 21 export type HandlerInput = void;
+3 -1
lex/types/app/bsky/unspecced/getSuggestionsSkeleton.ts
··· 18 18 actors: (AppBskyUnspeccedDefs.SkeletonSearchActor)[]; 19 19 /** DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer. */ 20 20 relativeToDid?: string; 21 - /** Snowflake for this recommendation, use when submitting recommendation events. */ 21 + /** DEPRECATED: use recIdStr instead. */ 22 22 recId?: number; 23 + /** Snowflake for this recommendation, use when submitting recommendation events. */ 24 + recIdStr?: string; 23 25 } 24 26 25 27 export type HandlerInput = void;
+3 -2
lex/types/app/bsky/unspecced/getTaggedSuggestions.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 41 42 42 43 const hashSuggestion = "suggestion"; 43 44 44 - export function isSuggestion<V>(v: V) { 45 + export function isSuggestion<V>(v: V): v is Suggestion & V { 45 46 return is$typed(v, id, hashSuggestion); 46 47 } 47 48 48 - export function validateSuggestion<V>(v: V) { 49 + export function validateSuggestion<V>(v: V): ValidationResult<Suggestion & V> { 49 50 return validate<Suggestion & V>(v, id, hashSuggestion); 50 51 }
+3 -2
lex/types/app/bsky/video/defs.ts
··· 3 3 */ 4 4 import type { BlobRef } from "@atp/lexicon"; 5 5 import { validate as _validate } from "../../../../lexicons.ts"; 6 + import type { ValidationResult } from "@atp/lexicon"; 6 7 import { is$typed as _is$typed } from "../../../../util.ts"; 7 8 8 9 const is$typed = _is$typed, validate = _validate; ··· 26 27 27 28 const hashJobStatus = "jobStatus"; 28 29 29 - export function isJobStatus<V>(v: V) { 30 + export function isJobStatus<V>(v: V): v is JobStatus & V { 30 31 return is$typed(v, id, hashJobStatus); 31 32 } 32 33 33 - export function validateJobStatus<V>(v: V) { 34 + export function validateJobStatus<V>(v: V): ValidationResult<JobStatus & V> { 34 35 return validate<JobStatus & V>(v, id, hashJobStatus); 35 36 }
+3 -2
lex/types/chat/bsky/actor/declaration.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 19 20 20 21 const hashRecord = "main"; 21 22 22 - export function isRecord<V>(v: V) { 23 + export function isRecord<V>(v: V): v is Record & V { 23 24 return is$typed(v, id, hashRecord); 24 25 } 25 26 26 - export function validateRecord<V>(v: V) { 27 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 27 28 return validate<Record & V>(v, id, hashRecord, true); 28 29 } 29 30
+5 -2
lex/types/chat/bsky/actor/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as AppBskyActorDefs from "../../../app/bsky/actor/defs.ts"; 7 8 import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; ··· 25 26 26 27 const hashProfileViewBasic = "profileViewBasic"; 27 28 28 - export function isProfileViewBasic<V>(v: V) { 29 + export function isProfileViewBasic<V>(v: V): v is ProfileViewBasic & V { 29 30 return is$typed(v, id, hashProfileViewBasic); 30 31 } 31 32 32 - export function validateProfileViewBasic<V>(v: V) { 33 + export function validateProfileViewBasic<V>( 34 + v: V, 35 + ): ValidationResult<ProfileViewBasic & V> { 33 36 return validate<ProfileViewBasic & V>(v, id, hashProfileViewBasic); 34 37 }
+6
lex/types/chat/bsky/authFullChatClient.ts
··· 1 + /** 2 + * GENERATED CODE - DO NOT MODIFY 3 + */ 4 + import type { LexPermissionSet } from "@atp/lexicon"; 5 + 6 + export type Main = LexPermissionSet;
+75 -38
lex/types/chat/bsky/convo/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as AppBskyRichtextFacet from "../../../app/bsky/richtext/facet.ts"; 7 8 import type * as AppBskyEmbedRecord from "../../../app/bsky/embed/record.ts"; ··· 19 20 20 21 const hashMessageRef = "messageRef"; 21 22 22 - export function isMessageRef<V>(v: V) { 23 + export function isMessageRef<V>(v: V): v is MessageRef & V { 23 24 return is$typed(v, id, hashMessageRef); 24 25 } 25 26 26 - export function validateMessageRef<V>(v: V) { 27 + export function validateMessageRef<V>(v: V): ValidationResult<MessageRef & V> { 27 28 return validate<MessageRef & V>(v, id, hashMessageRef); 28 29 } 29 30 ··· 37 38 38 39 const hashMessageInput = "messageInput"; 39 40 40 - export function isMessageInput<V>(v: V) { 41 + export function isMessageInput<V>(v: V): v is MessageInput & V { 41 42 return is$typed(v, id, hashMessageInput); 42 43 } 43 44 44 - export function validateMessageInput<V>(v: V) { 45 + export function validateMessageInput<V>( 46 + v: V, 47 + ): ValidationResult<MessageInput & V> { 45 48 return validate<MessageInput & V>(v, id, hashMessageInput); 46 49 } 47 50 ··· 61 64 62 65 const hashMessageView = "messageView"; 63 66 64 - export function isMessageView<V>(v: V) { 67 + export function isMessageView<V>(v: V): v is MessageView & V { 65 68 return is$typed(v, id, hashMessageView); 66 69 } 67 70 68 - export function validateMessageView<V>(v: V) { 71 + export function validateMessageView<V>( 72 + v: V, 73 + ): ValidationResult<MessageView & V> { 69 74 return validate<MessageView & V>(v, id, hashMessageView); 70 75 } 71 76 ··· 79 84 80 85 const hashDeletedMessageView = "deletedMessageView"; 81 86 82 - export function isDeletedMessageView<V>(v: V) { 87 + export function isDeletedMessageView<V>(v: V): v is DeletedMessageView & V { 83 88 return is$typed(v, id, hashDeletedMessageView); 84 89 } 85 90 86 - export function validateDeletedMessageView<V>(v: V) { 91 + export function validateDeletedMessageView<V>( 92 + v: V, 93 + ): ValidationResult<DeletedMessageView & V> { 87 94 return validate<DeletedMessageView & V>(v, id, hashDeletedMessageView); 88 95 } 89 96 ··· 94 101 95 102 const hashMessageViewSender = "messageViewSender"; 96 103 97 - export function isMessageViewSender<V>(v: V) { 104 + export function isMessageViewSender<V>(v: V): v is MessageViewSender & V { 98 105 return is$typed(v, id, hashMessageViewSender); 99 106 } 100 107 101 - export function validateMessageViewSender<V>(v: V) { 108 + export function validateMessageViewSender<V>( 109 + v: V, 110 + ): ValidationResult<MessageViewSender & V> { 102 111 return validate<MessageViewSender & V>(v, id, hashMessageViewSender); 103 112 } 104 113 ··· 111 120 112 121 const hashReactionView = "reactionView"; 113 122 114 - export function isReactionView<V>(v: V) { 123 + export function isReactionView<V>(v: V): v is ReactionView & V { 115 124 return is$typed(v, id, hashReactionView); 116 125 } 117 126 118 - export function validateReactionView<V>(v: V) { 127 + export function validateReactionView<V>( 128 + v: V, 129 + ): ValidationResult<ReactionView & V> { 119 130 return validate<ReactionView & V>(v, id, hashReactionView); 120 131 } 121 132 ··· 126 137 127 138 const hashReactionViewSender = "reactionViewSender"; 128 139 129 - export function isReactionViewSender<V>(v: V) { 140 + export function isReactionViewSender<V>(v: V): v is ReactionViewSender & V { 130 141 return is$typed(v, id, hashReactionViewSender); 131 142 } 132 143 133 - export function validateReactionViewSender<V>(v: V) { 144 + export function validateReactionViewSender<V>( 145 + v: V, 146 + ): ValidationResult<ReactionViewSender & V> { 134 147 return validate<ReactionViewSender & V>(v, id, hashReactionViewSender); 135 148 } 136 149 ··· 142 155 143 156 const hashMessageAndReactionView = "messageAndReactionView"; 144 157 145 - export function isMessageAndReactionView<V>(v: V) { 158 + export function isMessageAndReactionView<V>( 159 + v: V, 160 + ): v is MessageAndReactionView & V { 146 161 return is$typed(v, id, hashMessageAndReactionView); 147 162 } 148 163 149 - export function validateMessageAndReactionView<V>(v: V) { 164 + export function validateMessageAndReactionView<V>( 165 + v: V, 166 + ): ValidationResult<MessageAndReactionView & V> { 150 167 return validate<MessageAndReactionView & V>( 151 168 v, 152 169 id, ··· 173 190 174 191 const hashConvoView = "convoView"; 175 192 176 - export function isConvoView<V>(v: V) { 193 + export function isConvoView<V>(v: V): v is ConvoView & V { 177 194 return is$typed(v, id, hashConvoView); 178 195 } 179 196 180 - export function validateConvoView<V>(v: V) { 197 + export function validateConvoView<V>(v: V): ValidationResult<ConvoView & V> { 181 198 return validate<ConvoView & V>(v, id, hashConvoView); 182 199 } 183 200 ··· 189 206 190 207 const hashLogBeginConvo = "logBeginConvo"; 191 208 192 - export function isLogBeginConvo<V>(v: V) { 209 + export function isLogBeginConvo<V>(v: V): v is LogBeginConvo & V { 193 210 return is$typed(v, id, hashLogBeginConvo); 194 211 } 195 212 196 - export function validateLogBeginConvo<V>(v: V) { 213 + export function validateLogBeginConvo<V>( 214 + v: V, 215 + ): ValidationResult<LogBeginConvo & V> { 197 216 return validate<LogBeginConvo & V>(v, id, hashLogBeginConvo); 198 217 } 199 218 ··· 205 224 206 225 const hashLogAcceptConvo = "logAcceptConvo"; 207 226 208 - export function isLogAcceptConvo<V>(v: V) { 227 + export function isLogAcceptConvo<V>(v: V): v is LogAcceptConvo & V { 209 228 return is$typed(v, id, hashLogAcceptConvo); 210 229 } 211 230 212 - export function validateLogAcceptConvo<V>(v: V) { 231 + export function validateLogAcceptConvo<V>( 232 + v: V, 233 + ): ValidationResult<LogAcceptConvo & V> { 213 234 return validate<LogAcceptConvo & V>(v, id, hashLogAcceptConvo); 214 235 } 215 236 ··· 221 242 222 243 const hashLogLeaveConvo = "logLeaveConvo"; 223 244 224 - export function isLogLeaveConvo<V>(v: V) { 245 + export function isLogLeaveConvo<V>(v: V): v is LogLeaveConvo & V { 225 246 return is$typed(v, id, hashLogLeaveConvo); 226 247 } 227 248 228 - export function validateLogLeaveConvo<V>(v: V) { 249 + export function validateLogLeaveConvo<V>( 250 + v: V, 251 + ): ValidationResult<LogLeaveConvo & V> { 229 252 return validate<LogLeaveConvo & V>(v, id, hashLogLeaveConvo); 230 253 } 231 254 ··· 237 260 238 261 const hashLogMuteConvo = "logMuteConvo"; 239 262 240 - export function isLogMuteConvo<V>(v: V) { 263 + export function isLogMuteConvo<V>(v: V): v is LogMuteConvo & V { 241 264 return is$typed(v, id, hashLogMuteConvo); 242 265 } 243 266 244 - export function validateLogMuteConvo<V>(v: V) { 267 + export function validateLogMuteConvo<V>( 268 + v: V, 269 + ): ValidationResult<LogMuteConvo & V> { 245 270 return validate<LogMuteConvo & V>(v, id, hashLogMuteConvo); 246 271 } 247 272 ··· 253 278 254 279 const hashLogUnmuteConvo = "logUnmuteConvo"; 255 280 256 - export function isLogUnmuteConvo<V>(v: V) { 281 + export function isLogUnmuteConvo<V>(v: V): v is LogUnmuteConvo & V { 257 282 return is$typed(v, id, hashLogUnmuteConvo); 258 283 } 259 284 260 - export function validateLogUnmuteConvo<V>(v: V) { 285 + export function validateLogUnmuteConvo<V>( 286 + v: V, 287 + ): ValidationResult<LogUnmuteConvo & V> { 261 288 return validate<LogUnmuteConvo & V>(v, id, hashLogUnmuteConvo); 262 289 } 263 290 ··· 270 297 271 298 const hashLogCreateMessage = "logCreateMessage"; 272 299 273 - export function isLogCreateMessage<V>(v: V) { 300 + export function isLogCreateMessage<V>(v: V): v is LogCreateMessage & V { 274 301 return is$typed(v, id, hashLogCreateMessage); 275 302 } 276 303 277 - export function validateLogCreateMessage<V>(v: V) { 304 + export function validateLogCreateMessage<V>( 305 + v: V, 306 + ): ValidationResult<LogCreateMessage & V> { 278 307 return validate<LogCreateMessage & V>(v, id, hashLogCreateMessage); 279 308 } 280 309 ··· 287 316 288 317 const hashLogDeleteMessage = "logDeleteMessage"; 289 318 290 - export function isLogDeleteMessage<V>(v: V) { 319 + export function isLogDeleteMessage<V>(v: V): v is LogDeleteMessage & V { 291 320 return is$typed(v, id, hashLogDeleteMessage); 292 321 } 293 322 294 - export function validateLogDeleteMessage<V>(v: V) { 323 + export function validateLogDeleteMessage<V>( 324 + v: V, 325 + ): ValidationResult<LogDeleteMessage & V> { 295 326 return validate<LogDeleteMessage & V>(v, id, hashLogDeleteMessage); 296 327 } 297 328 ··· 304 335 305 336 const hashLogReadMessage = "logReadMessage"; 306 337 307 - export function isLogReadMessage<V>(v: V) { 338 + export function isLogReadMessage<V>(v: V): v is LogReadMessage & V { 308 339 return is$typed(v, id, hashLogReadMessage); 309 340 } 310 341 311 - export function validateLogReadMessage<V>(v: V) { 342 + export function validateLogReadMessage<V>( 343 + v: V, 344 + ): ValidationResult<LogReadMessage & V> { 312 345 return validate<LogReadMessage & V>(v, id, hashLogReadMessage); 313 346 } 314 347 ··· 322 355 323 356 const hashLogAddReaction = "logAddReaction"; 324 357 325 - export function isLogAddReaction<V>(v: V) { 358 + export function isLogAddReaction<V>(v: V): v is LogAddReaction & V { 326 359 return is$typed(v, id, hashLogAddReaction); 327 360 } 328 361 329 - export function validateLogAddReaction<V>(v: V) { 362 + export function validateLogAddReaction<V>( 363 + v: V, 364 + ): ValidationResult<LogAddReaction & V> { 330 365 return validate<LogAddReaction & V>(v, id, hashLogAddReaction); 331 366 } 332 367 ··· 340 375 341 376 const hashLogRemoveReaction = "logRemoveReaction"; 342 377 343 - export function isLogRemoveReaction<V>(v: V) { 378 + export function isLogRemoveReaction<V>(v: V): v is LogRemoveReaction & V { 344 379 return is$typed(v, id, hashLogRemoveReaction); 345 380 } 346 381 347 - export function validateLogRemoveReaction<V>(v: V) { 382 + export function validateLogRemoveReaction<V>( 383 + v: V, 384 + ): ValidationResult<LogRemoveReaction & V> { 348 385 return validate<LogRemoveReaction & V>(v, id, hashLogRemoveReaction); 349 386 }
+3 -2
lex/types/chat/bsky/convo/sendMessageBatch.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ChatBskyConvoDefs from "./defs.ts"; 7 8 ··· 44 45 45 46 const hashBatchItem = "batchItem"; 46 47 47 - export function isBatchItem<V>(v: V) { 48 + export function isBatchItem<V>(v: V): v is BatchItem & V { 48 49 return is$typed(v, id, hashBatchItem); 49 50 } 50 51 51 - export function validateBatchItem<V>(v: V) { 52 + export function validateBatchItem<V>(v: V): ValidationResult<BatchItem & V> { 52 53 return validate<BatchItem & V>(v, id, hashBatchItem); 53 54 }
+3 -2
lex/types/chat/bsky/moderation/getActorMetadata.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 43 44 44 45 const hashMetadata = "metadata"; 45 46 46 - export function isMetadata<V>(v: V) { 47 + export function isMetadata<V>(v: V): v is Metadata & V { 47 48 return is$typed(v, id, hashMetadata); 48 49 } 49 50 50 - export function validateMetadata<V>(v: V) { 51 + export function validateMetadata<V>(v: V): ValidationResult<Metadata & V> { 51 52 return validate<Metadata & V>(v, id, hashMetadata); 52 53 }
+17 -10
lex/types/com/atproto/admin/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ComAtprotoServerDefs from "../server/defs.ts"; 7 8 ··· 16 17 17 18 const hashStatusAttr = "statusAttr"; 18 19 19 - export function isStatusAttr<V>(v: V) { 20 + export function isStatusAttr<V>(v: V): v is StatusAttr & V { 20 21 return is$typed(v, id, hashStatusAttr); 21 22 } 22 23 23 - export function validateStatusAttr<V>(v: V) { 24 + export function validateStatusAttr<V>(v: V): ValidationResult<StatusAttr & V> { 24 25 return validate<StatusAttr & V>(v, id, hashStatusAttr); 25 26 } 26 27 ··· 42 43 43 44 const hashAccountView = "accountView"; 44 45 45 - export function isAccountView<V>(v: V) { 46 + export function isAccountView<V>(v: V): v is AccountView & V { 46 47 return is$typed(v, id, hashAccountView); 47 48 } 48 49 49 - export function validateAccountView<V>(v: V) { 50 + export function validateAccountView<V>( 51 + v: V, 52 + ): ValidationResult<AccountView & V> { 50 53 return validate<AccountView & V>(v, id, hashAccountView); 51 54 } 52 55 ··· 57 60 58 61 const hashRepoRef = "repoRef"; 59 62 60 - export function isRepoRef<V>(v: V) { 63 + export function isRepoRef<V>(v: V): v is RepoRef & V { 61 64 return is$typed(v, id, hashRepoRef); 62 65 } 63 66 64 - export function validateRepoRef<V>(v: V) { 67 + export function validateRepoRef<V>(v: V): ValidationResult<RepoRef & V> { 65 68 return validate<RepoRef & V>(v, id, hashRepoRef); 66 69 } 67 70 ··· 74 77 75 78 const hashRepoBlobRef = "repoBlobRef"; 76 79 77 - export function isRepoBlobRef<V>(v: V) { 80 + export function isRepoBlobRef<V>(v: V): v is RepoBlobRef & V { 78 81 return is$typed(v, id, hashRepoBlobRef); 79 82 } 80 83 81 - export function validateRepoBlobRef<V>(v: V) { 84 + export function validateRepoBlobRef<V>( 85 + v: V, 86 + ): ValidationResult<RepoBlobRef & V> { 82 87 return validate<RepoBlobRef & V>(v, id, hashRepoBlobRef); 83 88 } 84 89 ··· 90 95 91 96 const hashThreatSignature = "threatSignature"; 92 97 93 - export function isThreatSignature<V>(v: V) { 98 + export function isThreatSignature<V>(v: V): v is ThreatSignature & V { 94 99 return is$typed(v, id, hashThreatSignature); 95 100 } 96 101 97 - export function validateThreatSignature<V>(v: V) { 102 + export function validateThreatSignature<V>( 103 + v: V, 104 + ): ValidationResult<ThreatSignature & V> { 98 105 return validate<ThreatSignature & V>(v, id, hashThreatSignature); 99 106 }
+5 -2
lex/types/com/atproto/identity/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 18 19 19 20 const hashIdentityInfo = "identityInfo"; 20 21 21 - export function isIdentityInfo<V>(v: V) { 22 + export function isIdentityInfo<V>(v: V): v is IdentityInfo & V { 22 23 return is$typed(v, id, hashIdentityInfo); 23 24 } 24 25 25 - export function validateIdentityInfo<V>(v: V) { 26 + export function validateIdentityInfo<V>( 27 + v: V, 28 + ): ValidationResult<IdentityInfo & V> { 26 29 return validate<IdentityInfo & V>(v, id, hashIdentityInfo); 27 30 }
+19 -15
lex/types/com/atproto/label/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 32 33 33 34 const hashLabel = "label"; 34 35 35 - export function isLabel<V>(v: V) { 36 + export function isLabel<V>(v: V): v is Label & V { 36 37 return is$typed(v, id, hashLabel); 37 38 } 38 39 39 - export function validateLabel<V>(v: V) { 40 + export function validateLabel<V>(v: V): ValidationResult<Label & V> { 40 41 return validate<Label & V>(v, id, hashLabel); 41 42 } 42 43 ··· 48 49 49 50 const hashSelfLabels = "selfLabels"; 50 51 51 - export function isSelfLabels<V>(v: V) { 52 + export function isSelfLabels<V>(v: V): v is SelfLabels & V { 52 53 return is$typed(v, id, hashSelfLabels); 53 54 } 54 55 55 - export function validateSelfLabels<V>(v: V) { 56 + export function validateSelfLabels<V>(v: V): ValidationResult<SelfLabels & V> { 56 57 return validate<SelfLabels & V>(v, id, hashSelfLabels); 57 58 } 58 59 ··· 65 66 66 67 const hashSelfLabel = "selfLabel"; 67 68 68 - export function isSelfLabel<V>(v: V) { 69 + export function isSelfLabel<V>(v: V): v is SelfLabel & V { 69 70 return is$typed(v, id, hashSelfLabel); 70 71 } 71 72 72 - export function validateSelfLabel<V>(v: V) { 73 + export function validateSelfLabel<V>(v: V): ValidationResult<SelfLabel & V> { 73 74 return validate<SelfLabel & V>(v, id, hashSelfLabel); 74 75 } 75 76 ··· 103 104 104 105 const hashLabelValueDefinition = "labelValueDefinition"; 105 106 106 - export function isLabelValueDefinition<V>(v: V) { 107 + export function isLabelValueDefinition<V>(v: V): v is LabelValueDefinition & V { 107 108 return is$typed(v, id, hashLabelValueDefinition); 108 109 } 109 110 110 - export function validateLabelValueDefinition<V>(v: V) { 111 + export function validateLabelValueDefinition<V>( 112 + v: V, 113 + ): ValidationResult<LabelValueDefinition & V> { 111 114 return validate<LabelValueDefinition & V>(v, id, hashLabelValueDefinition); 112 115 } 113 116 ··· 124 127 125 128 const hashLabelValueDefinitionStrings = "labelValueDefinitionStrings"; 126 129 127 - export function isLabelValueDefinitionStrings<V>(v: V) { 130 + export function isLabelValueDefinitionStrings<V>( 131 + v: V, 132 + ): v is LabelValueDefinitionStrings & V { 128 133 return is$typed(v, id, hashLabelValueDefinitionStrings); 129 134 } 130 135 131 - export function validateLabelValueDefinitionStrings<V>(v: V) { 136 + export function validateLabelValueDefinitionStrings<V>( 137 + v: V, 138 + ): ValidationResult<LabelValueDefinitionStrings & V> { 132 139 return validate<LabelValueDefinitionStrings & V>( 133 140 v, 134 141 id, ··· 138 145 139 146 export type LabelValue = 140 147 | "!hide" 141 - | "!no-promote" 142 148 | "!warn" 143 149 | "!no-unauthenticated" 144 - | "dmca-violation" 145 - | "doxxing" 146 150 | "porn" 147 151 | "sexual" 148 152 | "nudity" 149 - | "nsfl" 150 - | "gore" 153 + | "graphic-media" 154 + | "bot" 151 155 | (string & globalThis.Record<PropertyKey, never>);
+5 -4
lex/types/com/atproto/label/subscribeLabels.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type { ErrorFrame } from "@atp/xrpc-server"; 7 8 import type * as ComAtprotoLabelDefs from "./defs.ts"; ··· 25 26 26 27 const hashLabels = "labels"; 27 28 28 - export function isLabels<V>(v: V) { 29 + export function isLabels<V>(v: V): v is Labels & V { 29 30 return is$typed(v, id, hashLabels); 30 31 } 31 32 32 - export function validateLabels<V>(v: V) { 33 + export function validateLabels<V>(v: V): ValidationResult<Labels & V> { 33 34 return validate<Labels & V>(v, id, hashLabels); 34 35 } 35 36 ··· 41 42 42 43 const hashInfo = "info"; 43 44 44 - export function isInfo<V>(v: V) { 45 + export function isInfo<V>(v: V): v is Info & V { 45 46 return is$typed(v, id, hashInfo); 46 47 } 47 48 48 - export function validateInfo<V>(v: V) { 49 + export function validateInfo<V>(v: V): ValidationResult<Info & V> { 49 50 return validate<Info & V>(v, id, hashInfo); 50 51 }
+3 -2
lex/types/com/atproto/lexicon/schema.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 16 17 17 18 const hashRecord = "main"; 18 19 19 - export function isRecord<V>(v: V) { 20 + export function isRecord<V>(v: V): v is Record & V { 20 21 return is$typed(v, id, hashRecord); 21 22 } 22 23 23 - export function validateRecord<V>(v: V) { 24 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 24 25 return validate<Record & V>(v, id, hashRecord, true); 25 26 } 26 27
+3 -2
lex/types/com/atproto/moderation/createReport.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ComAtprotoModerationDefs from "./defs.ts"; 7 8 import type * as ComAtprotoAdminDefs from "../admin/defs.ts"; ··· 64 65 65 66 const hashModTool = "modTool"; 66 67 67 - export function isModTool<V>(v: V) { 68 + export function isModTool<V>(v: V): v is ModTool & V { 68 69 return is$typed(v, id, hashModTool); 69 70 } 70 71 71 - export function validateModTool<V>(v: V) { 72 + export function validateModTool<V>(v: V): ValidationResult<ModTool & V> { 72 73 return validate<ModTool & V>(v, id, hashModTool); 73 74 }
+7 -7
lex/types/com/atproto/moderation/defs.ts
··· 54 54 | (string & globalThis.Record<PropertyKey, never>); 55 55 56 56 /** Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`. */ 57 - export const REASONSPAM = `${id}#reasonSpam`; 57 + export const REASONSPAM: string = `${id}#reasonSpam`; 58 58 /** Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`. */ 59 - export const REASONVIOLATION = `${id}#reasonViolation`; 59 + export const REASONVIOLATION: string = `${id}#reasonViolation`; 60 60 /** Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`. */ 61 - export const REASONMISLEADING = `${id}#reasonMisleading`; 61 + export const REASONMISLEADING: string = `${id}#reasonMisleading`; 62 62 /** Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`. */ 63 - export const REASONSEXUAL = `${id}#reasonSexual`; 63 + export const REASONSEXUAL: string = `${id}#reasonSexual`; 64 64 /** Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`. */ 65 - export const REASONRUDE = `${id}#reasonRude`; 65 + export const REASONRUDE: string = `${id}#reasonRude`; 66 66 /** Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`. */ 67 - export const REASONOTHER = `${id}#reasonOther`; 67 + export const REASONOTHER: string = `${id}#reasonOther`; 68 68 /** Appeal a previously taken moderation action */ 69 - export const REASONAPPEAL = `${id}#reasonAppeal`; 69 + export const REASONAPPEAL: string = `${id}#reasonAppeal`; 70 70 71 71 /** Tag describing a type of subject that might be reported. */ 72 72 export type SubjectType =
+19 -12
lex/types/com/atproto/repo/applyWrites.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ComAtprotoRepoDefs from "./defs.ts"; 7 8 ··· 56 57 57 58 const hashCreate = "create"; 58 59 59 - export function isCreate<V>(v: V) { 60 + export function isCreate<V>(v: V): v is Create & V { 60 61 return is$typed(v, id, hashCreate); 61 62 } 62 63 63 - export function validateCreate<V>(v: V) { 64 + export function validateCreate<V>(v: V): ValidationResult<Create & V> { 64 65 return validate<Create & V>(v, id, hashCreate); 65 66 } 66 67 ··· 74 75 75 76 const hashUpdate = "update"; 76 77 77 - export function isUpdate<V>(v: V) { 78 + export function isUpdate<V>(v: V): v is Update & V { 78 79 return is$typed(v, id, hashUpdate); 79 80 } 80 81 81 - export function validateUpdate<V>(v: V) { 82 + export function validateUpdate<V>(v: V): ValidationResult<Update & V> { 82 83 return validate<Update & V>(v, id, hashUpdate); 83 84 } 84 85 ··· 91 92 92 93 const hashDelete = "delete"; 93 94 94 - export function isDelete<V>(v: V) { 95 + export function isDelete<V>(v: V): v is Delete & V { 95 96 return is$typed(v, id, hashDelete); 96 97 } 97 98 98 - export function validateDelete<V>(v: V) { 99 + export function validateDelete<V>(v: V): ValidationResult<Delete & V> { 99 100 return validate<Delete & V>(v, id, hashDelete); 100 101 } 101 102 ··· 111 112 112 113 const hashCreateResult = "createResult"; 113 114 114 - export function isCreateResult<V>(v: V) { 115 + export function isCreateResult<V>(v: V): v is CreateResult & V { 115 116 return is$typed(v, id, hashCreateResult); 116 117 } 117 118 118 - export function validateCreateResult<V>(v: V) { 119 + export function validateCreateResult<V>( 120 + v: V, 121 + ): ValidationResult<CreateResult & V> { 119 122 return validate<CreateResult & V>(v, id, hashCreateResult); 120 123 } 121 124 ··· 131 134 132 135 const hashUpdateResult = "updateResult"; 133 136 134 - export function isUpdateResult<V>(v: V) { 137 + export function isUpdateResult<V>(v: V): v is UpdateResult & V { 135 138 return is$typed(v, id, hashUpdateResult); 136 139 } 137 140 138 - export function validateUpdateResult<V>(v: V) { 141 + export function validateUpdateResult<V>( 142 + v: V, 143 + ): ValidationResult<UpdateResult & V> { 139 144 return validate<UpdateResult & V>(v, id, hashUpdateResult); 140 145 } 141 146 ··· 145 150 146 151 const hashDeleteResult = "deleteResult"; 147 152 148 - export function isDeleteResult<V>(v: V) { 153 + export function isDeleteResult<V>(v: V): v is DeleteResult & V { 149 154 return is$typed(v, id, hashDeleteResult); 150 155 } 151 156 152 - export function validateDeleteResult<V>(v: V) { 157 + export function validateDeleteResult<V>( 158 + v: V, 159 + ): ValidationResult<DeleteResult & V> { 153 160 return validate<DeleteResult & V>(v, id, hashDeleteResult); 154 161 }
+3 -2
lex/types/com/atproto/repo/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 15 16 16 17 const hashCommitMeta = "commitMeta"; 17 18 18 - export function isCommitMeta<V>(v: V) { 19 + export function isCommitMeta<V>(v: V): v is CommitMeta & V { 19 20 return is$typed(v, id, hashCommitMeta); 20 21 } 21 22 22 - export function validateCommitMeta<V>(v: V) { 23 + export function validateCommitMeta<V>(v: V): ValidationResult<CommitMeta & V> { 23 24 return validate<CommitMeta & V>(v, id, hashCommitMeta); 24 25 }
+3 -2
lex/types/com/atproto/repo/listMissingBlobs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 41 42 42 43 const hashRecordBlob = "recordBlob"; 43 44 44 - export function isRecordBlob<V>(v: V) { 45 + export function isRecordBlob<V>(v: V): v is RecordBlob & V { 45 46 return is$typed(v, id, hashRecordBlob); 46 47 } 47 48 48 - export function validateRecordBlob<V>(v: V) { 49 + export function validateRecordBlob<V>(v: V): ValidationResult<RecordBlob & V> { 49 50 return validate<RecordBlob & V>(v, id, hashRecordBlob); 50 51 }
+3 -2
lex/types/com/atproto/repo/listRecords.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 49 50 50 51 const hashRecord = "record"; 51 52 52 - export function isRecord<V>(v: V) { 53 + export function isRecord<V>(v: V): v is Record & V { 53 54 return is$typed(v, id, hashRecord); 54 55 } 55 56 56 - export function validateRecord<V>(v: V) { 57 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 57 58 return validate<Record & V>(v, id, hashRecord); 58 59 }
+3 -2
lex/types/com/atproto/repo/strongRef.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 15 16 16 17 const hashMain = "main"; 17 18 18 - export function isMain<V>(v: V) { 19 + export function isMain<V>(v: V): v is Main & V { 19 20 return is$typed(v, id, hashMain); 20 21 } 21 22 22 - export function validateMain<V>(v: V) { 23 + export function validateMain<V>(v: V): ValidationResult<Main & V> { 23 24 return validate<Main & V>(v, id, hashMain); 24 25 }
+5 -2
lex/types/com/atproto/server/createAppPassword.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 47 48 48 49 const hashAppPassword = "appPassword"; 49 50 50 - export function isAppPassword<V>(v: V) { 51 + export function isAppPassword<V>(v: V): v is AppPassword & V { 51 52 return is$typed(v, id, hashAppPassword); 52 53 } 53 54 54 - export function validateAppPassword<V>(v: V) { 55 + export function validateAppPassword<V>( 56 + v: V, 57 + ): ValidationResult<AppPassword & V> { 55 58 return validate<AppPassword & V>(v, id, hashAppPassword); 56 59 }
+5 -2
lex/types/com/atproto/server/createInviteCodes.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 45 46 46 47 const hashAccountCodes = "accountCodes"; 47 48 48 - export function isAccountCodes<V>(v: V) { 49 + export function isAccountCodes<V>(v: V): v is AccountCodes & V { 49 50 return is$typed(v, id, hashAccountCodes); 50 51 } 51 52 52 - export function validateAccountCodes<V>(v: V) { 53 + export function validateAccountCodes<V>( 54 + v: V, 55 + ): ValidationResult<AccountCodes & V> { 53 56 return validate<AccountCodes & V>(v, id, hashAccountCodes); 54 57 }
+7 -4
lex/types/com/atproto/server/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 20 21 21 22 const hashInviteCode = "inviteCode"; 22 23 23 - export function isInviteCode<V>(v: V) { 24 + export function isInviteCode<V>(v: V): v is InviteCode & V { 24 25 return is$typed(v, id, hashInviteCode); 25 26 } 26 27 27 - export function validateInviteCode<V>(v: V) { 28 + export function validateInviteCode<V>(v: V): ValidationResult<InviteCode & V> { 28 29 return validate<InviteCode & V>(v, id, hashInviteCode); 29 30 } 30 31 ··· 36 37 37 38 const hashInviteCodeUse = "inviteCodeUse"; 38 39 39 - export function isInviteCodeUse<V>(v: V) { 40 + export function isInviteCodeUse<V>(v: V): v is InviteCodeUse & V { 40 41 return is$typed(v, id, hashInviteCodeUse); 41 42 } 42 43 43 - export function validateInviteCodeUse<V>(v: V) { 44 + export function validateInviteCodeUse<V>( 45 + v: V, 46 + ): ValidationResult<InviteCodeUse & V> { 44 47 return validate<InviteCodeUse & V>(v, id, hashInviteCodeUse); 45 48 }
+1
lex/types/com/atproto/server/deleteSession.ts
··· 8 8 export interface HandlerError { 9 9 status: number; 10 10 message?: string; 11 + error?: "InvalidToken" | "ExpiredToken"; 11 12 } 12 13 13 14 export type HandlerOutput = HandlerError | void;
+5 -4
lex/types/com/atproto/server/describeServer.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 45 46 46 47 const hashLinks = "links"; 47 48 48 - export function isLinks<V>(v: V) { 49 + export function isLinks<V>(v: V): v is Links & V { 49 50 return is$typed(v, id, hashLinks); 50 51 } 51 52 52 - export function validateLinks<V>(v: V) { 53 + export function validateLinks<V>(v: V): ValidationResult<Links & V> { 53 54 return validate<Links & V>(v, id, hashLinks); 54 55 } 55 56 ··· 60 61 61 62 const hashContact = "contact"; 62 63 63 - export function isContact<V>(v: V) { 64 + export function isContact<V>(v: V): v is Contact & V { 64 65 return is$typed(v, id, hashContact); 65 66 } 66 67 67 - export function validateContact<V>(v: V) { 68 + export function validateContact<V>(v: V): ValidationResult<Contact & V> { 68 69 return validate<Contact & V>(v, id, hashContact); 69 70 }
+1 -1
lex/types/com/atproto/server/getSession.ts
··· 7 7 export interface OutputSchema { 8 8 handle: string; 9 9 did: string; 10 + didDoc?: { [_ in string]: unknown }; 10 11 email?: string; 11 12 emailConfirmed?: boolean; 12 13 emailAuthFactor?: boolean; 13 - didDoc?: { [_ in string]: unknown }; 14 14 active?: boolean; 15 15 /** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */ 16 16 status?:
+5 -2
lex/types/com/atproto/server/listAppPasswords.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 39 40 40 41 const hashAppPassword = "appPassword"; 41 42 42 - export function isAppPassword<V>(v: V) { 43 + export function isAppPassword<V>(v: V): v is AppPassword & V { 43 44 return is$typed(v, id, hashAppPassword); 44 45 } 45 46 46 - export function validateAppPassword<V>(v: V) { 47 + export function validateAppPassword<V>( 48 + v: V, 49 + ): ValidationResult<AppPassword & V> { 47 50 return validate<AppPassword & V>(v, id, hashAppPassword); 48 51 }
+4 -1
lex/types/com/atproto/server/refreshSession.ts
··· 10 10 handle: string; 11 11 did: string; 12 12 didDoc?: { [_ in string]: unknown }; 13 + email?: string; 14 + emailConfirmed?: boolean; 15 + emailAuthFactor?: boolean; 13 16 active?: boolean; 14 17 /** Hosting status of the account. If not specified, then assume 'active'. */ 15 18 status?: ··· 30 33 export interface HandlerError { 31 34 status: number; 32 35 message?: string; 33 - error?: "AccountTakedown"; 36 + error?: "AccountTakedown" | "InvalidToken" | "ExpiredToken"; 34 37 } 35 38 36 39 export type HandlerOutput = HandlerError | HandlerSuccess;
+3 -2
lex/types/com/atproto/sync/listHosts.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ComAtprotoSyncDefs from "./defs.ts"; 7 8 ··· 47 48 48 49 const hashHost = "host"; 49 50 50 - export function isHost<V>(v: V) { 51 + export function isHost<V>(v: V): v is Host & V { 51 52 return is$typed(v, id, hashHost); 52 53 } 53 54 54 - export function validateHost<V>(v: V) { 55 + export function validateHost<V>(v: V): ValidationResult<Host & V> { 55 56 return validate<Host & V>(v, id, hashHost); 56 57 }
+3 -2
lex/types/com/atproto/sync/listRepos.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 53 54 54 55 const hashRepo = "repo"; 55 56 56 - export function isRepo<V>(v: V) { 57 + export function isRepo<V>(v: V): v is Repo & V { 57 58 return is$typed(v, id, hashRepo); 58 59 } 59 60 60 - export function validateRepo<V>(v: V) { 61 + export function validateRepo<V>(v: V): ValidationResult<Repo & V> { 61 62 return validate<Repo & V>(v, id, hashRepo); 62 63 }
+3 -2
lex/types/com/atproto/sync/listReposByCollection.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 42 43 43 44 const hashRepo = "repo"; 44 45 45 - export function isRepo<V>(v: V) { 46 + export function isRepo<V>(v: V): v is Repo & V { 46 47 return is$typed(v, id, hashRepo); 47 48 } 48 49 49 - export function validateRepo<V>(v: V) { 50 + export function validateRepo<V>(v: V): ValidationResult<Repo & V> { 50 51 return validate<Repo & V>(v, id, hashRepo); 51 52 }
+13 -12
lex/types/com/atproto/sync/subscribeRepos.ts
··· 3 3 */ 4 4 import type { CID } from "multiformats/cid"; 5 5 import { validate as _validate } from "../../../../lexicons.ts"; 6 + import type { ValidationResult } from "@atp/lexicon"; 6 7 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 7 8 import type { ErrorFrame } from "@atp/xrpc-server"; 8 9 ··· 52 53 53 54 const hashCommit = "commit"; 54 55 55 - export function isCommit<V>(v: V) { 56 + export function isCommit<V>(v: V): v is Commit & V { 56 57 return is$typed(v, id, hashCommit); 57 58 } 58 59 59 - export function validateCommit<V>(v: V) { 60 + export function validateCommit<V>(v: V): ValidationResult<Commit & V> { 60 61 return validate<Commit & V>(v, id, hashCommit); 61 62 } 62 63 ··· 77 78 78 79 const hashSync = "sync"; 79 80 80 - export function isSync<V>(v: V) { 81 + export function isSync<V>(v: V): v is Sync & V { 81 82 return is$typed(v, id, hashSync); 82 83 } 83 84 84 - export function validateSync<V>(v: V) { 85 + export function validateSync<V>(v: V): ValidationResult<Sync & V> { 85 86 return validate<Sync & V>(v, id, hashSync); 86 87 } 87 88 ··· 97 98 98 99 const hashIdentity = "identity"; 99 100 100 - export function isIdentity<V>(v: V) { 101 + export function isIdentity<V>(v: V): v is Identity & V { 101 102 return is$typed(v, id, hashIdentity); 102 103 } 103 104 104 - export function validateIdentity<V>(v: V) { 105 + export function validateIdentity<V>(v: V): ValidationResult<Identity & V> { 105 106 return validate<Identity & V>(v, id, hashIdentity); 106 107 } 107 108 ··· 126 127 127 128 const hashAccount = "account"; 128 129 129 - export function isAccount<V>(v: V) { 130 + export function isAccount<V>(v: V): v is Account & V { 130 131 return is$typed(v, id, hashAccount); 131 132 } 132 133 133 - export function validateAccount<V>(v: V) { 134 + export function validateAccount<V>(v: V): ValidationResult<Account & V> { 134 135 return validate<Account & V>(v, id, hashAccount); 135 136 } 136 137 ··· 142 143 143 144 const hashInfo = "info"; 144 145 145 - export function isInfo<V>(v: V) { 146 + export function isInfo<V>(v: V): v is Info & V { 146 147 return is$typed(v, id, hashInfo); 147 148 } 148 149 149 - export function validateInfo<V>(v: V) { 150 + export function validateInfo<V>(v: V): ValidationResult<Info & V> { 150 151 return validate<Info & V>(v, id, hashInfo); 151 152 } 152 153 ··· 167 168 168 169 const hashRepoOp = "repoOp"; 169 170 170 - export function isRepoOp<V>(v: V) { 171 + export function isRepoOp<V>(v: V): v is RepoOp & V { 171 172 return is$typed(v, id, hashRepoOp); 172 173 } 173 174 174 - export function validateRepoOp<V>(v: V) { 175 + export function validateRepoOp<V>(v: V): ValidationResult<RepoOp & V> { 175 176 return validate<RepoOp & V>(v, id, hashRepoOp); 176 177 }
+11 -6
lex/types/com/atproto/temp/checkHandleAvailability.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 48 49 49 50 const hashResultAvailable = "resultAvailable"; 50 51 51 - export function isResultAvailable<V>(v: V) { 52 + export function isResultAvailable<V>(v: V): v is ResultAvailable & V { 52 53 return is$typed(v, id, hashResultAvailable); 53 54 } 54 55 55 - export function validateResultAvailable<V>(v: V) { 56 + export function validateResultAvailable<V>( 57 + v: V, 58 + ): ValidationResult<ResultAvailable & V> { 56 59 return validate<ResultAvailable & V>(v, id, hashResultAvailable); 57 60 } 58 61 ··· 65 68 66 69 const hashResultUnavailable = "resultUnavailable"; 67 70 68 - export function isResultUnavailable<V>(v: V) { 71 + export function isResultUnavailable<V>(v: V): v is ResultUnavailable & V { 69 72 return is$typed(v, id, hashResultUnavailable); 70 73 } 71 74 72 - export function validateResultUnavailable<V>(v: V) { 75 + export function validateResultUnavailable<V>( 76 + v: V, 77 + ): ValidationResult<ResultUnavailable & V> { 73 78 return validate<ResultUnavailable & V>(v, id, hashResultUnavailable); 74 79 } 75 80 ··· 82 87 83 88 const hashSuggestion = "suggestion"; 84 89 85 - export function isSuggestion<V>(v: V) { 90 + export function isSuggestion<V>(v: V): v is Suggestion & V { 86 91 return is$typed(v, id, hashSuggestion); 87 92 } 88 93 89 - export function validateSuggestion<V>(v: V) { 94 + export function validateSuggestion<V>(v: V): ValidationResult<Suggestion & V> { 90 95 return validate<Suggestion & V>(v, id, hashSuggestion); 91 96 }
+75 -38
lex/types/so/sprk/actor/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; 7 8 import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; ··· 26 27 27 28 const hashProfileViewBasic = "profileViewBasic"; 28 29 29 - export function isProfileViewBasic<V>(v: V) { 30 + export function isProfileViewBasic<V>(v: V): v is ProfileViewBasic & V { 30 31 return is$typed(v, id, hashProfileViewBasic); 31 32 } 32 33 33 - export function validateProfileViewBasic<V>(v: V) { 34 + export function validateProfileViewBasic<V>( 35 + v: V, 36 + ): ValidationResult<ProfileViewBasic & V> { 34 37 return validate<ProfileViewBasic & V>(v, id, hashProfileViewBasic); 35 38 } 36 39 ··· 52 55 53 56 const hashProfileView = "profileView"; 54 57 55 - export function isProfileView<V>(v: V) { 58 + export function isProfileView<V>(v: V): v is ProfileView & V { 56 59 return is$typed(v, id, hashProfileView); 57 60 } 58 61 59 - export function validateProfileView<V>(v: V) { 62 + export function validateProfileView<V>( 63 + v: V, 64 + ): ValidationResult<ProfileView & V> { 60 65 return validate<ProfileView & V>(v, id, hashProfileView); 61 66 } 62 67 ··· 83 88 84 89 const hashProfileViewDetailed = "profileViewDetailed"; 85 90 86 - export function isProfileViewDetailed<V>(v: V) { 91 + export function isProfileViewDetailed<V>(v: V): v is ProfileViewDetailed & V { 87 92 return is$typed(v, id, hashProfileViewDetailed); 88 93 } 89 94 90 - export function validateProfileViewDetailed<V>(v: V) { 95 + export function validateProfileViewDetailed<V>( 96 + v: V, 97 + ): ValidationResult<ProfileViewDetailed & V> { 91 98 return validate<ProfileViewDetailed & V>(v, id, hashProfileViewDetailed); 92 99 } 93 100 ··· 100 107 101 108 const hashProfileAssociated = "profileAssociated"; 102 109 103 - export function isProfileAssociated<V>(v: V) { 110 + export function isProfileAssociated<V>(v: V): v is ProfileAssociated & V { 104 111 return is$typed(v, id, hashProfileAssociated); 105 112 } 106 113 107 - export function validateProfileAssociated<V>(v: V) { 114 + export function validateProfileAssociated<V>( 115 + v: V, 116 + ): ValidationResult<ProfileAssociated & V> { 108 117 return validate<ProfileAssociated & V>(v, id, hashProfileAssociated); 109 118 } 110 119 ··· 119 128 120 129 const hashProfileAssociatedChat = "profileAssociatedChat"; 121 130 122 - export function isProfileAssociatedChat<V>(v: V) { 131 + export function isProfileAssociatedChat<V>( 132 + v: V, 133 + ): v is ProfileAssociatedChat & V { 123 134 return is$typed(v, id, hashProfileAssociatedChat); 124 135 } 125 136 126 - export function validateProfileAssociatedChat<V>(v: V) { 137 + export function validateProfileAssociatedChat<V>( 138 + v: V, 139 + ): ValidationResult<ProfileAssociatedChat & V> { 127 140 return validate<ProfileAssociatedChat & V>(v, id, hashProfileAssociatedChat); 128 141 } 129 142 ··· 140 153 141 154 const hashViewerState = "viewerState"; 142 155 143 - export function isViewerState<V>(v: V) { 156 + export function isViewerState<V>(v: V): v is ViewerState & V { 144 157 return is$typed(v, id, hashViewerState); 145 158 } 146 159 147 - export function validateViewerState<V>(v: V) { 160 + export function validateViewerState<V>( 161 + v: V, 162 + ): ValidationResult<ViewerState & V> { 148 163 return validate<ViewerState & V>(v, id, hashViewerState); 149 164 } 150 165 ··· 157 172 158 173 const hashKnownFollowers = "knownFollowers"; 159 174 160 - export function isKnownFollowers<V>(v: V) { 175 + export function isKnownFollowers<V>(v: V): v is KnownFollowers & V { 161 176 return is$typed(v, id, hashKnownFollowers); 162 177 } 163 178 164 - export function validateKnownFollowers<V>(v: V) { 179 + export function validateKnownFollowers<V>( 180 + v: V, 181 + ): ValidationResult<KnownFollowers & V> { 165 182 return validate<KnownFollowers & V>(v, id, hashKnownFollowers); 166 183 } 167 184 ··· 193 210 194 211 const hashContentLabelPref = "contentLabelPref"; 195 212 196 - export function isContentLabelPref<V>(v: V) { 213 + export function isContentLabelPref<V>(v: V): v is ContentLabelPref & V { 197 214 return is$typed(v, id, hashContentLabelPref); 198 215 } 199 216 200 - export function validateContentLabelPref<V>(v: V) { 217 + export function validateContentLabelPref<V>( 218 + v: V, 219 + ): ValidationResult<ContentLabelPref & V> { 201 220 return validate<ContentLabelPref & V>(v, id, hashContentLabelPref); 202 221 } 203 222 ··· 211 230 212 231 const hashSavedFeed = "savedFeed"; 213 232 214 - export function isSavedFeed<V>(v: V) { 233 + export function isSavedFeed<V>(v: V): v is SavedFeed & V { 215 234 return is$typed(v, id, hashSavedFeed); 216 235 } 217 236 218 - export function validateSavedFeed<V>(v: V) { 237 + export function validateSavedFeed<V>(v: V): ValidationResult<SavedFeed & V> { 219 238 return validate<SavedFeed & V>(v, id, hashSavedFeed); 220 239 } 221 240 ··· 226 245 227 246 const hashSavedFeedsPref = "savedFeedsPref"; 228 247 229 - export function isSavedFeedsPref<V>(v: V) { 248 + export function isSavedFeedsPref<V>(v: V): v is SavedFeedsPref & V { 230 249 return is$typed(v, id, hashSavedFeedsPref); 231 250 } 232 251 233 - export function validateSavedFeedsPref<V>(v: V) { 252 + export function validateSavedFeedsPref<V>( 253 + v: V, 254 + ): ValidationResult<SavedFeedsPref & V> { 234 255 return validate<SavedFeedsPref & V>(v, id, hashSavedFeedsPref); 235 256 } 236 257 ··· 242 263 243 264 const hashPersonalDetailsPref = "personalDetailsPref"; 244 265 245 - export function isPersonalDetailsPref<V>(v: V) { 266 + export function isPersonalDetailsPref<V>(v: V): v is PersonalDetailsPref & V { 246 267 return is$typed(v, id, hashPersonalDetailsPref); 247 268 } 248 269 249 - export function validatePersonalDetailsPref<V>(v: V) { 270 + export function validatePersonalDetailsPref<V>( 271 + v: V, 272 + ): ValidationResult<PersonalDetailsPref & V> { 250 273 return validate<PersonalDetailsPref & V>(v, id, hashPersonalDetailsPref); 251 274 } 252 275 ··· 268 291 269 292 const hashFeedViewPref = "feedViewPref"; 270 293 271 - export function isFeedViewPref<V>(v: V) { 294 + export function isFeedViewPref<V>(v: V): v is FeedViewPref & V { 272 295 return is$typed(v, id, hashFeedViewPref); 273 296 } 274 297 275 - export function validateFeedViewPref<V>(v: V) { 298 + export function validateFeedViewPref<V>( 299 + v: V, 300 + ): ValidationResult<FeedViewPref & V> { 276 301 return validate<FeedViewPref & V>(v, id, hashFeedViewPref); 277 302 } 278 303 ··· 290 315 291 316 const hashThreadViewPref = "threadViewPref"; 292 317 293 - export function isThreadViewPref<V>(v: V) { 318 + export function isThreadViewPref<V>(v: V): v is ThreadViewPref & V { 294 319 return is$typed(v, id, hashThreadViewPref); 295 320 } 296 321 297 - export function validateThreadViewPref<V>(v: V) { 322 + export function validateThreadViewPref<V>( 323 + v: V, 324 + ): ValidationResult<ThreadViewPref & V> { 298 325 return validate<ThreadViewPref & V>(v, id, hashThreadViewPref); 299 326 } 300 327 ··· 306 333 307 334 const hashInterestsPref = "interestsPref"; 308 335 309 - export function isInterestsPref<V>(v: V) { 336 + export function isInterestsPref<V>(v: V): v is InterestsPref & V { 310 337 return is$typed(v, id, hashInterestsPref); 311 338 } 312 339 313 - export function validateInterestsPref<V>(v: V) { 340 + export function validateInterestsPref<V>( 341 + v: V, 342 + ): ValidationResult<InterestsPref & V> { 314 343 return validate<InterestsPref & V>(v, id, hashInterestsPref); 315 344 } 316 345 ··· 338 367 339 368 const hashMutedWord = "mutedWord"; 340 369 341 - export function isMutedWord<V>(v: V) { 370 + export function isMutedWord<V>(v: V): v is MutedWord & V { 342 371 return is$typed(v, id, hashMutedWord); 343 372 } 344 373 345 - export function validateMutedWord<V>(v: V) { 374 + export function validateMutedWord<V>(v: V): ValidationResult<MutedWord & V> { 346 375 return validate<MutedWord & V>(v, id, hashMutedWord); 347 376 } 348 377 ··· 354 383 355 384 const hashMutedWordsPref = "mutedWordsPref"; 356 385 357 - export function isMutedWordsPref<V>(v: V) { 386 + export function isMutedWordsPref<V>(v: V): v is MutedWordsPref & V { 358 387 return is$typed(v, id, hashMutedWordsPref); 359 388 } 360 389 361 - export function validateMutedWordsPref<V>(v: V) { 390 + export function validateMutedWordsPref<V>( 391 + v: V, 392 + ): ValidationResult<MutedWordsPref & V> { 362 393 return validate<MutedWordsPref & V>(v, id, hashMutedWordsPref); 363 394 } 364 395 ··· 370 401 371 402 const hashHiddenPostsPref = "hiddenPostsPref"; 372 403 373 - export function isHiddenPostsPref<V>(v: V) { 404 + export function isHiddenPostsPref<V>(v: V): v is HiddenPostsPref & V { 374 405 return is$typed(v, id, hashHiddenPostsPref); 375 406 } 376 407 377 - export function validateHiddenPostsPref<V>(v: V) { 408 + export function validateHiddenPostsPref<V>( 409 + v: V, 410 + ): ValidationResult<HiddenPostsPref & V> { 378 411 return validate<HiddenPostsPref & V>(v, id, hashHiddenPostsPref); 379 412 } 380 413 ··· 385 418 386 419 const hashLabelersPref = "labelersPref"; 387 420 388 - export function isLabelersPref<V>(v: V) { 421 + export function isLabelersPref<V>(v: V): v is LabelersPref & V { 389 422 return is$typed(v, id, hashLabelersPref); 390 423 } 391 424 392 - export function validateLabelersPref<V>(v: V) { 425 + export function validateLabelersPref<V>( 426 + v: V, 427 + ): ValidationResult<LabelersPref & V> { 393 428 return validate<LabelersPref & V>(v, id, hashLabelersPref); 394 429 } 395 430 ··· 400 435 401 436 const hashLabelerPrefItem = "labelerPrefItem"; 402 437 403 - export function isLabelerPrefItem<V>(v: V) { 438 + export function isLabelerPrefItem<V>(v: V): v is LabelerPrefItem & V { 404 439 return is$typed(v, id, hashLabelerPrefItem); 405 440 } 406 441 407 - export function validateLabelerPrefItem<V>(v: V) { 442 + export function validateLabelerPrefItem<V>( 443 + v: V, 444 + ): ValidationResult<LabelerPrefItem & V> { 408 445 return validate<LabelerPrefItem & V>(v, id, hashLabelerPrefItem); 409 446 }
+3 -2
lex/types/so/sprk/actor/profile.ts
··· 3 3 */ 4 4 import type { BlobRef } from "@atp/lexicon"; 5 5 import { validate as _validate } from "../../../../lexicons.ts"; 6 + import type { ValidationResult } from "@atp/lexicon"; 6 7 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 7 8 import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; 8 9 import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; ··· 28 29 29 30 const hashRecord = "main"; 30 31 31 - export function isRecord<V>(v: V) { 32 + export function isRecord<V>(v: V): v is Record & V { 32 33 return is$typed(v, id, hashRecord); 33 34 } 34 35 35 - export function validateRecord<V>(v: V) { 36 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 36 37 return validate<Record & V>(v, id, hashRecord, true); 37 38 } 38 39
+7 -6
lex/types/so/sprk/embed/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as SoSprkEmbedMention from "./mention.ts"; 7 8 import type * as SoSprkEmbedRecord from "./record.ts"; ··· 29 30 30 31 const hashPlacement = "placement"; 31 32 32 - export function isPlacement<V>(v: V) { 33 + export function isPlacement<V>(v: V): v is Placement & V { 33 34 return is$typed(v, id, hashPlacement); 34 35 } 35 36 36 - export function validatePlacement<V>(v: V) { 37 + export function validatePlacement<V>(v: V): ValidationResult<Placement & V> { 37 38 return validate<Placement & V>(v, id, hashPlacement); 38 39 } 39 40 ··· 48 49 49 50 const hashFrame = "frame"; 50 51 51 - export function isFrame<V>(v: V) { 52 + export function isFrame<V>(v: V): v is Frame & V { 52 53 return is$typed(v, id, hashFrame); 53 54 } 54 55 55 - export function validateFrame<V>(v: V) { 56 + export function validateFrame<V>(v: V): ValidationResult<Frame & V> { 56 57 return validate<Frame & V>(v, id, hashFrame); 57 58 } 58 59 ··· 64 65 65 66 const hashMediaRef = "mediaRef"; 66 67 67 - export function isMediaRef<V>(v: V) { 68 + export function isMediaRef<V>(v: V): v is MediaRef & V { 68 69 return is$typed(v, id, hashMediaRef); 69 70 } 70 71 71 - export function validateMediaRef<V>(v: V) { 72 + export function validateMediaRef<V>(v: V): ValidationResult<MediaRef & V> { 72 73 return validate<MediaRef & V>(v, id, hashMediaRef); 73 74 }
+5 -4
lex/types/so/sprk/embed/mention.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as SoSprkEmbedDefs from "./defs.ts"; 7 8 import type * as SoSprkActorDefs from "../actor/defs.ts"; ··· 17 18 18 19 const hashMain = "main"; 19 20 20 - export function isMain<V>(v: V) { 21 + export function isMain<V>(v: V): v is Main & V { 21 22 return is$typed(v, id, hashMain); 22 23 } 23 24 24 - export function validateMain<V>(v: V) { 25 + export function validateMain<V>(v: V): ValidationResult<Main & V> { 25 26 return validate<Main & V>(v, id, hashMain); 26 27 } 27 28 ··· 34 35 35 36 const hashView = "view"; 36 37 37 - export function isView<V>(v: V) { 38 + export function isView<V>(v: V): v is View & V { 38 39 return is$typed(v, id, hashView); 39 40 } 40 41 41 - export function validateView<V>(v: V) { 42 + export function validateView<V>(v: V): ValidationResult<View & V> { 42 43 return validate<View & V>(v, id, hashView); 43 44 }
+5 -4
lex/types/so/sprk/embed/record.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as SoSprkEmbedDefs from "./defs.ts"; 7 8 import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; ··· 18 19 19 20 const hashMain = "main"; 20 21 21 - export function isMain<V>(v: V) { 22 + export function isMain<V>(v: V): v is Main & V { 22 23 return is$typed(v, id, hashMain); 23 24 } 24 25 25 - export function validateMain<V>(v: V) { 26 + export function validateMain<V>(v: V): ValidationResult<Main & V> { 26 27 return validate<Main & V>(v, id, hashMain); 27 28 } 28 29 ··· 38 39 39 40 const hashView = "view"; 40 41 41 - export function isView<V>(v: V) { 42 + export function isView<V>(v: V): v is View & V { 42 43 return is$typed(v, id, hashView); 43 44 } 44 45 45 - export function validateView<V>(v: V) { 46 + export function validateView<V>(v: V): ValidationResult<View & V> { 46 47 return validate<View & V>(v, id, hashView); 47 48 }
+78 -49
lex/types/so/sprk/feed/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as SoSprkActorDefs from "../actor/defs.ts"; 7 8 import type * as SoSprkMediaImages from "../media/images.ts"; ··· 35 36 36 37 const hashPostView = "postView"; 37 38 38 - export function isPostView<V>(v: V) { 39 + export function isPostView<V>(v: V): v is PostView & V { 39 40 return is$typed(v, id, hashPostView); 40 41 } 41 42 42 - export function validatePostView<V>(v: V) { 43 + export function validatePostView<V>(v: V): ValidationResult<PostView & V> { 43 44 return validate<PostView & V>(v, id, hashPostView); 44 45 } 45 46 ··· 59 60 60 61 const hashReplyView = "replyView"; 61 62 62 - export function isReplyView<V>(v: V) { 63 + export function isReplyView<V>(v: V): v is ReplyView & V { 63 64 return is$typed(v, id, hashReplyView); 64 65 } 65 66 66 - export function validateReplyView<V>(v: V) { 67 + export function validateReplyView<V>(v: V): ValidationResult<ReplyView & V> { 67 68 return validate<ReplyView & V>(v, id, hashReplyView); 68 69 } 69 70 ··· 78 79 79 80 const hashReplyViewerState = "replyViewerState"; 80 81 81 - export function isReplyViewerState<V>(v: V) { 82 + export function isReplyViewerState<V>(v: V): v is ReplyViewerState & V { 82 83 return is$typed(v, id, hashReplyViewerState); 83 84 } 84 85 85 - export function validateReplyViewerState<V>(v: V) { 86 + export function validateReplyViewerState<V>( 87 + v: V, 88 + ): ValidationResult<ReplyViewerState & V> { 86 89 return validate<ReplyViewerState & V>(v, id, hashReplyViewerState); 87 90 } 88 91 ··· 102 105 103 106 const hashViewerState = "viewerState"; 104 107 105 - export function isViewerState<V>(v: V) { 108 + export function isViewerState<V>(v: V): v is ViewerState & V { 106 109 return is$typed(v, id, hashViewerState); 107 110 } 108 111 109 - export function validateViewerState<V>(v: V) { 112 + export function validateViewerState<V>( 113 + v: V, 114 + ): ValidationResult<ViewerState & V> { 110 115 return validate<ViewerState & V>(v, id, hashViewerState); 111 116 } 112 117 ··· 120 125 121 126 const hashKnownRepost = "knownRepost"; 122 127 123 - export function isKnownRepost<V>(v: V) { 128 + export function isKnownRepost<V>(v: V): v is KnownRepost & V { 124 129 return is$typed(v, id, hashKnownRepost); 125 130 } 126 131 127 - export function validateKnownRepost<V>(v: V) { 132 + export function validateKnownRepost<V>( 133 + v: V, 134 + ): ValidationResult<KnownRepost & V> { 128 135 return validate<KnownRepost & V>(v, id, hashKnownRepost); 129 136 } 130 137 ··· 138 145 139 146 const hashKnownLike = "knownLike"; 140 147 141 - export function isKnownLike<V>(v: V) { 148 + export function isKnownLike<V>(v: V): v is KnownLike & V { 142 149 return is$typed(v, id, hashKnownLike); 143 150 } 144 151 145 - export function validateKnownLike<V>(v: V) { 152 + export function validateKnownLike<V>(v: V): ValidationResult<KnownLike & V> { 146 153 return validate<KnownLike & V>(v, id, hashKnownLike); 147 154 } 148 155 ··· 157 164 158 165 const hashKnownReply = "knownReply"; 159 166 160 - export function isKnownReply<V>(v: V) { 167 + export function isKnownReply<V>(v: V): v is KnownReply & V { 161 168 return is$typed(v, id, hashKnownReply); 162 169 } 163 170 164 - export function validateKnownReply<V>(v: V) { 171 + export function validateKnownReply<V>(v: V): ValidationResult<KnownReply & V> { 165 172 return validate<KnownReply & V>(v, id, hashKnownReply); 166 173 } 167 174 ··· 173 180 174 181 const hashThreadContext = "threadContext"; 175 182 176 - export function isThreadContext<V>(v: V) { 183 + export function isThreadContext<V>(v: V): v is ThreadContext & V { 177 184 return is$typed(v, id, hashThreadContext); 178 185 } 179 186 180 - export function validateThreadContext<V>(v: V) { 187 + export function validateThreadContext<V>( 188 + v: V, 189 + ): ValidationResult<ThreadContext & V> { 181 190 return validate<ThreadContext & V>(v, id, hashThreadContext); 182 191 } 183 192 ··· 190 199 191 200 const hashFeedViewPost = "feedViewPost"; 192 201 193 - export function isFeedViewPost<V>(v: V) { 202 + export function isFeedViewPost<V>(v: V): v is FeedViewPost & V { 194 203 return is$typed(v, id, hashFeedViewPost); 195 204 } 196 205 197 - export function validateFeedViewPost<V>(v: V) { 206 + export function validateFeedViewPost<V>( 207 + v: V, 208 + ): ValidationResult<FeedViewPost & V> { 198 209 return validate<FeedViewPost & V>(v, id, hashFeedViewPost); 199 210 } 200 211 ··· 214 225 215 226 const hashReplyRef = "replyRef"; 216 227 217 - export function isReplyRef<V>(v: V) { 228 + export function isReplyRef<V>(v: V): v is ReplyRef & V { 218 229 return is$typed(v, id, hashReplyRef); 219 230 } 220 231 221 - export function validateReplyRef<V>(v: V) { 232 + export function validateReplyRef<V>(v: V): ValidationResult<ReplyRef & V> { 222 233 return validate<ReplyRef & V>(v, id, hashReplyRef); 223 234 } 224 235 ··· 239 250 240 251 const hashThreadViewPost = "threadViewPost"; 241 252 242 - export function isThreadViewPost<V>(v: V) { 253 + export function isThreadViewPost<V>(v: V): v is ThreadViewPost & V { 243 254 return is$typed(v, id, hashThreadViewPost); 244 255 } 245 256 246 - export function validateThreadViewPost<V>(v: V) { 257 + export function validateThreadViewPost<V>( 258 + v: V, 259 + ): ValidationResult<ThreadViewPost & V> { 247 260 return validate<ThreadViewPost & V>(v, id, hashThreadViewPost); 248 261 } 249 262 ··· 255 268 256 269 const hashNotFoundPost = "notFoundPost"; 257 270 258 - export function isNotFoundPost<V>(v: V) { 271 + export function isNotFoundPost<V>(v: V): v is NotFoundPost & V { 259 272 return is$typed(v, id, hashNotFoundPost); 260 273 } 261 274 262 - export function validateNotFoundPost<V>(v: V) { 275 + export function validateNotFoundPost<V>( 276 + v: V, 277 + ): ValidationResult<NotFoundPost & V> { 263 278 return validate<NotFoundPost & V>(v, id, hashNotFoundPost); 264 279 } 265 280 ··· 272 287 273 288 const hashBlockedPost = "blockedPost"; 274 289 275 - export function isBlockedPost<V>(v: V) { 290 + export function isBlockedPost<V>(v: V): v is BlockedPost & V { 276 291 return is$typed(v, id, hashBlockedPost); 277 292 } 278 293 279 - export function validateBlockedPost<V>(v: V) { 294 + export function validateBlockedPost<V>( 295 + v: V, 296 + ): ValidationResult<BlockedPost & V> { 280 297 return validate<BlockedPost & V>(v, id, hashBlockedPost); 281 298 } 282 299 ··· 288 305 289 306 const hashBlockedAuthor = "blockedAuthor"; 290 307 291 - export function isBlockedAuthor<V>(v: V) { 308 + export function isBlockedAuthor<V>(v: V): v is BlockedAuthor & V { 292 309 return is$typed(v, id, hashBlockedAuthor); 293 310 } 294 311 295 - export function validateBlockedAuthor<V>(v: V) { 312 + export function validateBlockedAuthor<V>( 313 + v: V, 314 + ): ValidationResult<BlockedAuthor & V> { 296 315 return validate<BlockedAuthor & V>(v, id, hashBlockedAuthor); 297 316 } 298 317 ··· 315 334 316 335 const hashGeneratorView = "generatorView"; 317 336 318 - export function isGeneratorView<V>(v: V) { 337 + export function isGeneratorView<V>(v: V): v is GeneratorView & V { 319 338 return is$typed(v, id, hashGeneratorView); 320 339 } 321 340 322 - export function validateGeneratorView<V>(v: V) { 341 + export function validateGeneratorView<V>( 342 + v: V, 343 + ): ValidationResult<GeneratorView & V> { 323 344 return validate<GeneratorView & V>(v, id, hashGeneratorView); 324 345 } 325 346 ··· 330 351 331 352 const hashGeneratorViewerState = "generatorViewerState"; 332 353 333 - export function isGeneratorViewerState<V>(v: V) { 354 + export function isGeneratorViewerState<V>(v: V): v is GeneratorViewerState & V { 334 355 return is$typed(v, id, hashGeneratorViewerState); 335 356 } 336 357 337 - export function validateGeneratorViewerState<V>(v: V) { 358 + export function validateGeneratorViewerState<V>( 359 + v: V, 360 + ): ValidationResult<GeneratorViewerState & V> { 338 361 return validate<GeneratorViewerState & V>(v, id, hashGeneratorViewerState); 339 362 } 340 363 ··· 347 370 348 371 const hashSkeletonFeedPost = "skeletonFeedPost"; 349 372 350 - export function isSkeletonFeedPost<V>(v: V) { 373 + export function isSkeletonFeedPost<V>(v: V): v is SkeletonFeedPost & V { 351 374 return is$typed(v, id, hashSkeletonFeedPost); 352 375 } 353 376 354 - export function validateSkeletonFeedPost<V>(v: V) { 377 + export function validateSkeletonFeedPost<V>( 378 + v: V, 379 + ): ValidationResult<SkeletonFeedPost & V> { 355 380 return validate<SkeletonFeedPost & V>(v, id, hashSkeletonFeedPost); 356 381 } 357 382 ··· 364 389 365 390 const hashThreadgateView = "threadgateView"; 366 391 367 - export function isThreadgateView<V>(v: V) { 392 + export function isThreadgateView<V>(v: V): v is ThreadgateView & V { 368 393 return is$typed(v, id, hashThreadgateView); 369 394 } 370 395 371 - export function validateThreadgateView<V>(v: V) { 396 + export function validateThreadgateView<V>( 397 + v: V, 398 + ): ValidationResult<ThreadgateView & V> { 372 399 return validate<ThreadgateView & V>(v, id, hashThreadgateView); 373 400 } 374 401 ··· 394 421 395 422 const hashInteraction = "interaction"; 396 423 397 - export function isInteraction<V>(v: V) { 424 + export function isInteraction<V>(v: V): v is Interaction & V { 398 425 return is$typed(v, id, hashInteraction); 399 426 } 400 427 401 - export function validateInteraction<V>(v: V) { 428 + export function validateInteraction<V>( 429 + v: V, 430 + ): ValidationResult<Interaction & V> { 402 431 return validate<Interaction & V>(v, id, hashInteraction); 403 432 } 404 433 405 434 /** Request that less content like the given feed item be shown in the feed */ 406 - export const REQUESTLESS = `${id}#requestLess`; 435 + export const REQUESTLESS: string = `${id}#requestLess`; 407 436 /** Request that more content like the given feed item be shown in the feed */ 408 - export const REQUESTMORE = `${id}#requestMore`; 437 + export const REQUESTMORE: string = `${id}#requestMore`; 409 438 /** User clicked through to the feed item */ 410 - export const CLICKTHROUGHITEM = `${id}#clickthroughItem`; 439 + export const CLICKTHROUGHITEM: string = `${id}#clickthroughItem`; 411 440 /** User clicked through to the author of the feed item */ 412 - export const CLICKTHROUGHAUTHOR = `${id}#clickthroughAuthor`; 441 + export const CLICKTHROUGHAUTHOR: string = `${id}#clickthroughAuthor`; 413 442 /** User clicked through to the reposter of the feed item */ 414 - export const CLICKTHROUGHREPOSTER = `${id}#clickthroughReposter`; 443 + export const CLICKTHROUGHREPOSTER: string = `${id}#clickthroughReposter`; 415 444 /** User clicked through to the embedded content of the feed item */ 416 - export const CLICKTHROUGHEMBED = `${id}#clickthroughEmbed`; 445 + export const CLICKTHROUGHEMBED: string = `${id}#clickthroughEmbed`; 417 446 /** Feed item was seen by user */ 418 - export const INTERACTIONSEEN = `${id}#interactionSeen`; 447 + export const INTERACTIONSEEN: string = `${id}#interactionSeen`; 419 448 /** User liked the feed item */ 420 - export const INTERACTIONLIKE = `${id}#interactionLike`; 449 + export const INTERACTIONLIKE: string = `${id}#interactionLike`; 421 450 /** User reposted the feed item */ 422 - export const INTERACTIONREPOST = `${id}#interactionRepost`; 451 + export const INTERACTIONREPOST: string = `${id}#interactionRepost`; 423 452 /** User replied to the feed item */ 424 - export const INTERACTIONREPLY = `${id}#interactionReply`; 453 + export const INTERACTIONREPLY: string = `${id}#interactionReply`; 425 454 /** User shared the feed item */ 426 - export const INTERACTIONSHARE = `${id}#interactionShare`; 455 + export const INTERACTIONSHARE: string = `${id}#interactionShare`;
+5 -4
lex/types/so/sprk/feed/describeFeedGenerator.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 38 39 39 40 const hashFeed = "feed"; 40 41 41 - export function isFeed<V>(v: V) { 42 + export function isFeed<V>(v: V): v is Feed & V { 42 43 return is$typed(v, id, hashFeed); 43 44 } 44 45 45 - export function validateFeed<V>(v: V) { 46 + export function validateFeed<V>(v: V): ValidationResult<Feed & V> { 46 47 return validate<Feed & V>(v, id, hashFeed); 47 48 } 48 49 ··· 54 55 55 56 const hashLinks = "links"; 56 57 57 - export function isLinks<V>(v: V) { 58 + export function isLinks<V>(v: V): v is Links & V { 58 59 return is$typed(v, id, hashLinks); 59 60 } 60 61 61 - export function validateLinks<V>(v: V) { 62 + export function validateLinks<V>(v: V): ValidationResult<Links & V> { 62 63 return validate<Links & V>(v, id, hashLinks); 63 64 }
+3 -2
lex/types/so/sprk/feed/generator.ts
··· 3 3 */ 4 4 import type { BlobRef } from "@atp/lexicon"; 5 5 import { validate as _validate } from "../../../../lexicons.ts"; 6 + import type { ValidationResult } from "@atp/lexicon"; 6 7 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 7 8 import type * as SoSprkRichtextFacet from "../richtext/facet.ts"; 8 9 import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; ··· 26 27 27 28 const hashRecord = "main"; 28 29 29 - export function isRecord<V>(v: V) { 30 + export function isRecord<V>(v: V): v is Record & V { 30 31 return is$typed(v, id, hashRecord); 31 32 } 32 33 33 - export function validateRecord<V>(v: V) { 34 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 34 35 return validate<Record & V>(v, id, hashRecord, true); 35 36 } 36 37
+3 -2
lex/types/so/sprk/feed/getCrosspostThread.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as SoSprkFeedDefs from "./defs.ts"; 7 8 ··· 63 64 64 65 const hashThreadItem = "threadItem"; 65 66 66 - export function isThreadItem<V>(v: V) { 67 + export function isThreadItem<V>(v: V): v is ThreadItem & V { 67 68 return is$typed(v, id, hashThreadItem); 68 69 } 69 70 70 - export function validateThreadItem<V>(v: V) { 71 + export function validateThreadItem<V>(v: V): ValidationResult<ThreadItem & V> { 71 72 return validate<ThreadItem & V>(v, id, hashThreadItem); 72 73 }
+3 -2
lex/types/so/sprk/feed/getLikes.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as SoSprkActorDefs from "../actor/defs.ts"; 7 8 ··· 49 50 50 51 const hashLike = "like"; 51 52 52 - export function isLike<V>(v: V) { 53 + export function isLike<V>(v: V): v is Like & V { 53 54 return is$typed(v, id, hashLike); 54 55 } 55 56 56 - export function validateLike<V>(v: V) { 57 + export function validateLike<V>(v: V): ValidationResult<Like & V> { 57 58 return validate<Like & V>(v, id, hashLike); 58 59 }
+3 -2
lex/types/so/sprk/feed/getPostThread.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as SoSprkFeedDefs from "./defs.ts"; 7 8 ··· 63 64 64 65 const hashThreadItem = "threadItem"; 65 66 66 - export function isThreadItem<V>(v: V) { 67 + export function isThreadItem<V>(v: V): v is ThreadItem & V { 67 68 return is$typed(v, id, hashThreadItem); 68 69 } 69 70 70 - export function validateThreadItem<V>(v: V) { 71 + export function validateThreadItem<V>(v: V): ValidationResult<ThreadItem & V> { 71 72 return validate<ThreadItem & V>(v, id, hashThreadItem); 72 73 }
+3 -2
lex/types/so/sprk/feed/like.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; 7 8 ··· 18 19 19 20 const hashRecord = "main"; 20 21 21 - export function isRecord<V>(v: V) { 22 + export function isRecord<V>(v: V): v is Record & V { 22 23 return is$typed(v, id, hashRecord); 23 24 } 24 25 25 - export function validateRecord<V>(v: V) { 26 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 26 27 return validate<Record & V>(v, id, hashRecord, true); 27 28 } 28 29
+5 -4
lex/types/so/sprk/feed/post.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as SoSprkMediaImages from "../media/images.ts"; 7 8 import type * as SoSprkMediaVideo from "../media/video.ts"; ··· 33 34 34 35 const hashRecord = "main"; 35 36 36 - export function isRecord<V>(v: V) { 37 + export function isRecord<V>(v: V): v is Record & V { 37 38 return is$typed(v, id, hashRecord); 38 39 } 39 40 40 - export function validateRecord<V>(v: V) { 41 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 41 42 return validate<Record & V>(v, id, hashRecord, true); 42 43 } 43 44 ··· 53 54 54 55 const hashCaptionRef = "captionRef"; 55 56 56 - export function isCaptionRef<V>(v: V) { 57 + export function isCaptionRef<V>(v: V): v is CaptionRef & V { 57 58 return is$typed(v, id, hashCaptionRef); 58 59 } 59 60 60 - export function validateCaptionRef<V>(v: V) { 61 + export function validateCaptionRef<V>(v: V): ValidationResult<CaptionRef & V> { 61 62 return validate<CaptionRef & V>(v, id, hashCaptionRef); 62 63 }
+5 -4
lex/types/so/sprk/feed/reply.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as SoSprkRichtextFacet from "../richtext/facet.ts"; 7 8 import type * as SoSprkMediaImage from "../media/image.ts"; ··· 29 30 30 31 const hashRecord = "main"; 31 32 32 - export function isRecord<V>(v: V) { 33 + export function isRecord<V>(v: V): v is Record & V { 33 34 return is$typed(v, id, hashRecord); 34 35 } 35 36 36 - export function validateRecord<V>(v: V) { 37 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 37 38 return validate<Record & V>(v, id, hashRecord, true); 38 39 } 39 40 ··· 47 48 48 49 const hashReplyRef = "replyRef"; 49 50 50 - export function isReplyRef<V>(v: V) { 51 + export function isReplyRef<V>(v: V): v is ReplyRef & V { 51 52 return is$typed(v, id, hashReplyRef); 52 53 } 53 54 54 - export function validateReplyRef<V>(v: V) { 55 + export function validateReplyRef<V>(v: V): ValidationResult<ReplyRef & V> { 55 56 return validate<ReplyRef & V>(v, id, hashReplyRef); 56 57 }
+3 -2
lex/types/so/sprk/feed/repost.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; 7 8 ··· 18 19 19 20 const hashRecord = "main"; 20 21 21 - export function isRecord<V>(v: V) { 22 + export function isRecord<V>(v: V): v is Record & V { 22 23 return is$typed(v, id, hashRecord); 23 24 } 24 25 25 - export function validateRecord<V>(v: V) { 26 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 26 27 return validate<Record & V>(v, id, hashRecord, true); 27 28 } 28 29
+15 -8
lex/types/so/sprk/feed/threadgate.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 24 25 25 26 const hashRecord = "main"; 26 27 27 - export function isRecord<V>(v: V) { 28 + export function isRecord<V>(v: V): v is Record & V { 28 29 return is$typed(v, id, hashRecord); 29 30 } 30 31 31 - export function validateRecord<V>(v: V) { 32 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 32 33 return validate<Record & V>(v, id, hashRecord, true); 33 34 } 34 35 ··· 41 42 42 43 const hashMentionRule = "mentionRule"; 43 44 44 - export function isMentionRule<V>(v: V) { 45 + export function isMentionRule<V>(v: V): v is MentionRule & V { 45 46 return is$typed(v, id, hashMentionRule); 46 47 } 47 48 48 - export function validateMentionRule<V>(v: V) { 49 + export function validateMentionRule<V>( 50 + v: V, 51 + ): ValidationResult<MentionRule & V> { 49 52 return validate<MentionRule & V>(v, id, hashMentionRule); 50 53 } 51 54 ··· 56 59 57 60 const hashFollowerRule = "followerRule"; 58 61 59 - export function isFollowerRule<V>(v: V) { 62 + export function isFollowerRule<V>(v: V): v is FollowerRule & V { 60 63 return is$typed(v, id, hashFollowerRule); 61 64 } 62 65 63 - export function validateFollowerRule<V>(v: V) { 66 + export function validateFollowerRule<V>( 67 + v: V, 68 + ): ValidationResult<FollowerRule & V> { 64 69 return validate<FollowerRule & V>(v, id, hashFollowerRule); 65 70 } 66 71 ··· 71 76 72 77 const hashFollowingRule = "followingRule"; 73 78 74 - export function isFollowingRule<V>(v: V) { 79 + export function isFollowingRule<V>(v: V): v is FollowingRule & V { 75 80 return is$typed(v, id, hashFollowingRule); 76 81 } 77 82 78 - export function validateFollowingRule<V>(v: V) { 83 + export function validateFollowingRule<V>( 84 + v: V, 85 + ): ValidationResult<FollowingRule & V> { 79 86 return validate<FollowingRule & V>(v, id, hashFollowingRule); 80 87 }
+3 -2
lex/types/so/sprk/graph/block.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 17 18 18 19 const hashRecord = "main"; 19 20 20 - export function isRecord<V>(v: V) { 21 + export function isRecord<V>(v: V): v is Record & V { 21 22 return is$typed(v, id, hashRecord); 22 23 } 23 24 24 - export function validateRecord<V>(v: V) { 25 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 25 26 return validate<Record & V>(v, id, hashRecord, true); 26 27 } 27 28
+9 -4
lex/types/so/sprk/graph/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 16 17 17 18 const hashNotFoundActor = "notFoundActor"; 18 19 19 - export function isNotFoundActor<V>(v: V) { 20 + export function isNotFoundActor<V>(v: V): v is NotFoundActor & V { 20 21 return is$typed(v, id, hashNotFoundActor); 21 22 } 22 23 23 - export function validateNotFoundActor<V>(v: V) { 24 + export function validateNotFoundActor<V>( 25 + v: V, 26 + ): ValidationResult<NotFoundActor & V> { 24 27 return validate<NotFoundActor & V>(v, id, hashNotFoundActor); 25 28 } 26 29 ··· 36 39 37 40 const hashRelationship = "relationship"; 38 41 39 - export function isRelationship<V>(v: V) { 42 + export function isRelationship<V>(v: V): v is Relationship & V { 40 43 return is$typed(v, id, hashRelationship); 41 44 } 42 45 43 - export function validateRelationship<V>(v: V) { 46 + export function validateRelationship<V>( 47 + v: V, 48 + ): ValidationResult<Relationship & V> { 44 49 return validate<Relationship & V>(v, id, hashRelationship); 45 50 }
+3 -2
lex/types/so/sprk/graph/follow.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 16 17 17 18 const hashRecord = "main"; 18 19 19 - export function isRecord<V>(v: V) { 20 + export function isRecord<V>(v: V): v is Record & V { 20 21 return is$typed(v, id, hashRecord); 21 22 } 22 23 23 - export function validateRecord<V>(v: V) { 24 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 24 25 return validate<Record & V>(v, id, hashRecord, true); 25 26 } 26 27
+17 -8
lex/types/so/sprk/labeler/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as SoSprkActorDefs from "../actor/defs.ts"; 7 8 import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; ··· 23 24 24 25 const hashLabelerView = "labelerView"; 25 26 26 - export function isLabelerView<V>(v: V) { 27 + export function isLabelerView<V>(v: V): v is LabelerView & V { 27 28 return is$typed(v, id, hashLabelerView); 28 29 } 29 30 30 - export function validateLabelerView<V>(v: V) { 31 + export function validateLabelerView<V>( 32 + v: V, 33 + ): ValidationResult<LabelerView & V> { 31 34 return validate<LabelerView & V>(v, id, hashLabelerView); 32 35 } 33 36 ··· 51 54 52 55 const hashLabelerViewDetailed = "labelerViewDetailed"; 53 56 54 - export function isLabelerViewDetailed<V>(v: V) { 57 + export function isLabelerViewDetailed<V>(v: V): v is LabelerViewDetailed & V { 55 58 return is$typed(v, id, hashLabelerViewDetailed); 56 59 } 57 60 58 - export function validateLabelerViewDetailed<V>(v: V) { 61 + export function validateLabelerViewDetailed<V>( 62 + v: V, 63 + ): ValidationResult<LabelerViewDetailed & V> { 59 64 return validate<LabelerViewDetailed & V>(v, id, hashLabelerViewDetailed); 60 65 } 61 66 ··· 66 71 67 72 const hashLabelerViewerState = "labelerViewerState"; 68 73 69 - export function isLabelerViewerState<V>(v: V) { 74 + export function isLabelerViewerState<V>(v: V): v is LabelerViewerState & V { 70 75 return is$typed(v, id, hashLabelerViewerState); 71 76 } 72 77 73 - export function validateLabelerViewerState<V>(v: V) { 78 + export function validateLabelerViewerState<V>( 79 + v: V, 80 + ): ValidationResult<LabelerViewerState & V> { 74 81 return validate<LabelerViewerState & V>(v, id, hashLabelerViewerState); 75 82 } 76 83 ··· 84 91 85 92 const hashLabelerPolicies = "labelerPolicies"; 86 93 87 - export function isLabelerPolicies<V>(v: V) { 94 + export function isLabelerPolicies<V>(v: V): v is LabelerPolicies & V { 88 95 return is$typed(v, id, hashLabelerPolicies); 89 96 } 90 97 91 - export function validateLabelerPolicies<V>(v: V) { 98 + export function validateLabelerPolicies<V>( 99 + v: V, 100 + ): ValidationResult<LabelerPolicies & V> { 92 101 return validate<LabelerPolicies & V>(v, id, hashLabelerPolicies); 93 102 }
+3 -2
lex/types/so/sprk/labeler/service.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as SoSprkLabelerDefs from "./defs.ts"; 7 8 import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; ··· 26 27 27 28 const hashRecord = "main"; 28 29 29 - export function isRecord<V>(v: V) { 30 + export function isRecord<V>(v: V): v is Record & V { 30 31 return is$typed(v, id, hashRecord); 31 32 } 32 33 33 - export function validateRecord<V>(v: V) { 34 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 34 35 return validate<Record & V>(v, id, hashRecord, true); 35 36 } 36 37
+5 -2
lex/types/so/sprk/media/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 16 17 17 18 const hashAspectRatio = "aspectRatio"; 18 19 19 - export function isAspectRatio<V>(v: V) { 20 + export function isAspectRatio<V>(v: V): v is AspectRatio & V { 20 21 return is$typed(v, id, hashAspectRatio); 21 22 } 22 23 23 - export function validateAspectRatio<V>(v: V) { 24 + export function validateAspectRatio<V>( 25 + v: V, 26 + ): ValidationResult<AspectRatio & V> { 24 27 return validate<AspectRatio & V>(v, id, hashAspectRatio); 25 28 }
+5 -4
lex/types/so/sprk/media/image.ts
··· 3 3 */ 4 4 import type { BlobRef } from "@atp/lexicon"; 5 5 import { validate as _validate } from "../../../../lexicons.ts"; 6 + import type { ValidationResult } from "@atp/lexicon"; 6 7 import { is$typed as _is$typed } from "../../../../util.ts"; 7 8 import type * as SoSprkMediaDefs from "./defs.ts"; 8 9 ··· 19 20 20 21 const hashMain = "main"; 21 22 22 - export function isMain<V>(v: V) { 23 + export function isMain<V>(v: V): v is Main & V { 23 24 return is$typed(v, id, hashMain); 24 25 } 25 26 26 - export function validateMain<V>(v: V) { 27 + export function validateMain<V>(v: V): ValidationResult<Main & V> { 27 28 return validate<Main & V>(v, id, hashMain); 28 29 } 29 30 ··· 40 41 41 42 const hashView = "view"; 42 43 43 - export function isView<V>(v: V) { 44 + export function isView<V>(v: V): v is View & V { 44 45 return is$typed(v, id, hashView); 45 46 } 46 47 47 - export function validateView<V>(v: V) { 48 + export function validateView<V>(v: V): ValidationResult<View & V> { 48 49 return validate<View & V>(v, id, hashView); 49 50 }
+5 -4
lex/types/so/sprk/media/images.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as SoSprkMediaImage from "./image.ts"; 7 8 ··· 15 16 16 17 const hashMain = "main"; 17 18 18 - export function isMain<V>(v: V) { 19 + export function isMain<V>(v: V): v is Main & V { 19 20 return is$typed(v, id, hashMain); 20 21 } 21 22 22 - export function validateMain<V>(v: V) { 23 + export function validateMain<V>(v: V): ValidationResult<Main & V> { 23 24 return validate<Main & V>(v, id, hashMain); 24 25 } 25 26 ··· 30 31 31 32 const hashView = "view"; 32 33 33 - export function isView<V>(v: V) { 34 + export function isView<V>(v: V): v is View & V { 34 35 return is$typed(v, id, hashView); 35 36 } 36 37 37 - export function validateView<V>(v: V) { 38 + export function validateView<V>(v: V): ValidationResult<View & V> { 38 39 return validate<View & V>(v, id, hashView); 39 40 }
+7 -6
lex/types/so/sprk/media/video.ts
··· 3 3 */ 4 4 import type { BlobRef } from "@atp/lexicon"; 5 5 import { validate as _validate } from "../../../../lexicons.ts"; 6 + import type { ValidationResult } from "@atp/lexicon"; 6 7 import { is$typed as _is$typed } from "../../../../util.ts"; 7 8 import type * as SoSprkMediaDefs from "./defs.ts"; 8 9 ··· 20 21 21 22 const hashMain = "main"; 22 23 23 - export function isMain<V>(v: V) { 24 + export function isMain<V>(v: V): v is Main & V { 24 25 return is$typed(v, id, hashMain); 25 26 } 26 27 27 - export function validateMain<V>(v: V) { 28 + export function validateMain<V>(v: V): ValidationResult<Main & V> { 28 29 return validate<Main & V>(v, id, hashMain); 29 30 } 30 31 ··· 36 37 37 38 const hashCaption = "caption"; 38 39 39 - export function isCaption<V>(v: V) { 40 + export function isCaption<V>(v: V): v is Caption & V { 40 41 return is$typed(v, id, hashCaption); 41 42 } 42 43 43 - export function validateCaption<V>(v: V) { 44 + export function validateCaption<V>(v: V): ValidationResult<Caption & V> { 44 45 return validate<Caption & V>(v, id, hashCaption); 45 46 } 46 47 ··· 55 56 56 57 const hashView = "view"; 57 58 58 - export function isView<V>(v: V) { 59 + export function isView<V>(v: V): v is View & V { 59 60 return is$typed(v, id, hashView); 60 61 } 61 62 62 - export function validateView<V>(v: V) { 63 + export function validateView<V>(v: V): ValidationResult<View & V> { 63 64 return validate<View & V>(v, id, hashView); 64 65 }
+5 -2
lex/types/so/sprk/notification/listNotifications.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as SoSprkActorDefs from "../actor/defs.ts"; 7 8 import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; ··· 65 66 66 67 const hashNotification = "notification"; 67 68 68 - export function isNotification<V>(v: V) { 69 + export function isNotification<V>(v: V): v is Notification & V { 69 70 return is$typed(v, id, hashNotification); 70 71 } 71 72 72 - export function validateNotification<V>(v: V) { 73 + export function validateNotification<V>( 74 + v: V, 75 + ): ValidationResult<Notification & V> { 73 76 return validate<Notification & V>(v, id, hashNotification); 74 77 }
+11 -10
lex/types/so/sprk/richtext/facet.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 17 18 18 19 const hashMain = "main"; 19 20 20 - export function isMain<V>(v: V) { 21 + export function isMain<V>(v: V): v is Main & V { 21 22 return is$typed(v, id, hashMain); 22 23 } 23 24 24 - export function validateMain<V>(v: V) { 25 + export function validateMain<V>(v: V): ValidationResult<Main & V> { 25 26 return validate<Main & V>(v, id, hashMain); 26 27 } 27 28 ··· 33 34 34 35 const hashMention = "mention"; 35 36 36 - export function isMention<V>(v: V) { 37 + export function isMention<V>(v: V): v is Mention & V { 37 38 return is$typed(v, id, hashMention); 38 39 } 39 40 40 - export function validateMention<V>(v: V) { 41 + export function validateMention<V>(v: V): ValidationResult<Mention & V> { 41 42 return validate<Mention & V>(v, id, hashMention); 42 43 } 43 44 ··· 49 50 50 51 const hashLink = "link"; 51 52 52 - export function isLink<V>(v: V) { 53 + export function isLink<V>(v: V): v is Link & V { 53 54 return is$typed(v, id, hashLink); 54 55 } 55 56 56 - export function validateLink<V>(v: V) { 57 + export function validateLink<V>(v: V): ValidationResult<Link & V> { 57 58 return validate<Link & V>(v, id, hashLink); 58 59 } 59 60 ··· 65 66 66 67 const hashTag = "tag"; 67 68 68 - export function isTag<V>(v: V) { 69 + export function isTag<V>(v: V): v is Tag & V { 69 70 return is$typed(v, id, hashTag); 70 71 } 71 72 72 - export function validateTag<V>(v: V) { 73 + export function validateTag<V>(v: V): ValidationResult<Tag & V> { 73 74 return validate<Tag & V>(v, id, hashTag); 74 75 } 75 76 ··· 82 83 83 84 const hashByteSlice = "byteSlice"; 84 85 85 - export function isByteSlice<V>(v: V) { 86 + export function isByteSlice<V>(v: V): v is ByteSlice & V { 86 87 return is$typed(v, id, hashByteSlice); 87 88 } 88 89 89 - export function validateByteSlice<V>(v: V) { 90 + export function validateByteSlice<V>(v: V): ValidationResult<ByteSlice & V> { 90 91 return validate<ByteSlice & V>(v, id, hashByteSlice); 91 92 }
+3 -2
lex/types/so/sprk/sound/audio.ts
··· 3 3 */ 4 4 import type { BlobRef } from "@atp/lexicon"; 5 5 import { validate as _validate } from "../../../../lexicons.ts"; 6 + import type { ValidationResult } from "@atp/lexicon"; 6 7 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 7 8 import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; 8 9 import type * as SoSprkSoundDefs from "./defs.ts"; ··· 26 27 27 28 const hashRecord = "main"; 28 29 29 - export function isRecord<V>(v: V) { 30 + export function isRecord<V>(v: V): v is Record & V { 30 31 return is$typed(v, id, hashRecord); 31 32 } 32 33 33 - export function validateRecord<V>(v: V) { 34 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 34 35 return validate<Record & V>(v, id, hashRecord, true); 35 36 } 36 37
+7 -4
lex/types/so/sprk/sound/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as SoSprkActorDefs from "../actor/defs.ts"; 7 8 import type * as ComAtprotoLabelDefs from "../../../com/atproto/label/defs.ts"; ··· 26 27 27 28 const hashAudioView = "audioView"; 28 29 29 - export function isAudioView<V>(v: V) { 30 + export function isAudioView<V>(v: V): v is AudioView & V { 30 31 return is$typed(v, id, hashAudioView); 31 32 } 32 33 33 - export function validateAudioView<V>(v: V) { 34 + export function validateAudioView<V>(v: V): ValidationResult<AudioView & V> { 34 35 return validate<AudioView & V>(v, id, hashAudioView); 35 36 } 36 37 ··· 43 44 44 45 const hashAudioDetails = "audioDetails"; 45 46 46 - export function isAudioDetails<V>(v: V) { 47 + export function isAudioDetails<V>(v: V): v is AudioDetails & V { 47 48 return is$typed(v, id, hashAudioDetails); 48 49 } 49 50 50 - export function validateAudioDetails<V>(v: V) { 51 + export function validateAudioDetails<V>( 52 + v: V, 53 + ): ValidationResult<AudioDetails & V> { 51 54 return validate<AudioDetails & V>(v, id, hashAudioDetails); 52 55 }
+11 -6
lex/types/so/sprk/story/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as SoSprkActorDefs from "../actor/defs.ts"; 7 8 import type * as SoSprkMediaImage from "../media/image.ts"; ··· 26 27 27 28 const hashStoryView = "storyView"; 28 29 29 - export function isStoryView<V>(v: V) { 30 + export function isStoryView<V>(v: V): v is StoryView & V { 30 31 return is$typed(v, id, hashStoryView); 31 32 } 32 33 33 - export function validateStoryView<V>(v: V) { 34 + export function validateStoryView<V>(v: V): ValidationResult<StoryView & V> { 34 35 return validate<StoryView & V>(v, id, hashStoryView); 35 36 } 36 37 ··· 42 43 43 44 const hashStoriesByAuthor = "storiesByAuthor"; 44 45 45 - export function isStoriesByAuthor<V>(v: V) { 46 + export function isStoriesByAuthor<V>(v: V): v is StoriesByAuthor & V { 46 47 return is$typed(v, id, hashStoriesByAuthor); 47 48 } 48 49 49 - export function validateStoriesByAuthor<V>(v: V) { 50 + export function validateStoriesByAuthor<V>( 51 + v: V, 52 + ): ValidationResult<StoriesByAuthor & V> { 50 53 return validate<StoriesByAuthor & V>(v, id, hashStoriesByAuthor); 51 54 } 52 55 ··· 67 70 68 71 const hashInteraction = "interaction"; 69 72 70 - export function isInteraction<V>(v: V) { 73 + export function isInteraction<V>(v: V): v is Interaction & V { 71 74 return is$typed(v, id, hashInteraction); 72 75 } 73 76 74 - export function validateInteraction<V>(v: V) { 77 + export function validateInteraction<V>( 78 + v: V, 79 + ): ValidationResult<Interaction & V> { 75 80 return validate<Interaction & V>(v, id, hashInteraction); 76 81 }
+3 -2
lex/types/so/sprk/story/post.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as SoSprkMediaImage from "../media/image.ts"; 7 8 import type * as SoSprkMediaVideo from "../media/video.ts"; ··· 27 28 28 29 const hashRecord = "main"; 29 30 30 - export function isRecord<V>(v: V) { 31 + export function isRecord<V>(v: V): v is Record & V { 31 32 return is$typed(v, id, hashRecord); 32 33 } 33 34 34 - export function validateRecord<V>(v: V) { 35 + export function validateRecord<V>(v: V): ValidationResult<Record & V> { 35 36 return validate<Record & V>(v, id, hashRecord, true); 36 37 } 37 38
+7 -4
lex/types/so/sprk/video/defs.ts
··· 3 3 */ 4 4 import type { BlobRef } from "@atp/lexicon"; 5 5 import { validate as _validate } from "../../../../lexicons.ts"; 6 + import type { ValidationResult } from "@atp/lexicon"; 6 7 import { is$typed as _is$typed } from "../../../../util.ts"; 7 8 import type * as SoSprkSoundDefs from "../sound/defs.ts"; 8 9 ··· 30 31 31 32 const hashJobStatus = "jobStatus"; 32 33 33 - export function isJobStatus<V>(v: V) { 34 + export function isJobStatus<V>(v: V): v is JobStatus & V { 34 35 return is$typed(v, id, hashJobStatus); 35 36 } 36 37 37 - export function validateJobStatus<V>(v: V) { 38 + export function validateJobStatus<V>(v: V): ValidationResult<JobStatus & V> { 38 39 return validate<JobStatus & V>(v, id, hashJobStatus); 39 40 } 40 41 ··· 47 48 48 49 const hashExtractedAudio = "extractedAudio"; 49 50 50 - export function isExtractedAudio<V>(v: V) { 51 + export function isExtractedAudio<V>(v: V): v is ExtractedAudio & V { 51 52 return is$typed(v, id, hashExtractedAudio); 52 53 } 53 54 54 - export function validateExtractedAudio<V>(v: V) { 55 + export function validateExtractedAudio<V>( 56 + v: V, 57 + ): ValidationResult<ExtractedAudio & V> { 55 58 return validate<ExtractedAudio & V>(v, id, hashExtractedAudio); 56 59 }
+5 -2
lex/types/tools/ozone/communication/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 27 28 28 29 const hashTemplateView = "templateView"; 29 30 30 - export function isTemplateView<V>(v: V) { 31 + export function isTemplateView<V>(v: V): v is TemplateView & V { 31 32 return is$typed(v, id, hashTemplateView); 32 33 } 33 34 34 - export function validateTemplateView<V>(v: V) { 35 + export function validateTemplateView<V>( 36 + v: V, 37 + ): ValidationResult<TemplateView & V> { 35 38 return validate<TemplateView & V>(v, id, hashTemplateView); 36 39 }
+23 -12
lex/types/tools/ozone/hosting/getAccountHistory.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 56 57 57 58 const hashEvent = "event"; 58 59 59 - export function isEvent<V>(v: V) { 60 + export function isEvent<V>(v: V): v is Event & V { 60 61 return is$typed(v, id, hashEvent); 61 62 } 62 63 63 - export function validateEvent<V>(v: V) { 64 + export function validateEvent<V>(v: V): ValidationResult<Event & V> { 64 65 return validate<Event & V>(v, id, hashEvent); 65 66 } 66 67 ··· 72 73 73 74 const hashAccountCreated = "accountCreated"; 74 75 75 - export function isAccountCreated<V>(v: V) { 76 + export function isAccountCreated<V>(v: V): v is AccountCreated & V { 76 77 return is$typed(v, id, hashAccountCreated); 77 78 } 78 79 79 - export function validateAccountCreated<V>(v: V) { 80 + export function validateAccountCreated<V>( 81 + v: V, 82 + ): ValidationResult<AccountCreated & V> { 80 83 return validate<AccountCreated & V>(v, id, hashAccountCreated); 81 84 } 82 85 ··· 87 90 88 91 const hashEmailUpdated = "emailUpdated"; 89 92 90 - export function isEmailUpdated<V>(v: V) { 93 + export function isEmailUpdated<V>(v: V): v is EmailUpdated & V { 91 94 return is$typed(v, id, hashEmailUpdated); 92 95 } 93 96 94 - export function validateEmailUpdated<V>(v: V) { 97 + export function validateEmailUpdated<V>( 98 + v: V, 99 + ): ValidationResult<EmailUpdated & V> { 95 100 return validate<EmailUpdated & V>(v, id, hashEmailUpdated); 96 101 } 97 102 ··· 102 107 103 108 const hashEmailConfirmed = "emailConfirmed"; 104 109 105 - export function isEmailConfirmed<V>(v: V) { 110 + export function isEmailConfirmed<V>(v: V): v is EmailConfirmed & V { 106 111 return is$typed(v, id, hashEmailConfirmed); 107 112 } 108 113 109 - export function validateEmailConfirmed<V>(v: V) { 114 + export function validateEmailConfirmed<V>( 115 + v: V, 116 + ): ValidationResult<EmailConfirmed & V> { 110 117 return validate<EmailConfirmed & V>(v, id, hashEmailConfirmed); 111 118 } 112 119 ··· 116 123 117 124 const hashPasswordUpdated = "passwordUpdated"; 118 125 119 - export function isPasswordUpdated<V>(v: V) { 126 + export function isPasswordUpdated<V>(v: V): v is PasswordUpdated & V { 120 127 return is$typed(v, id, hashPasswordUpdated); 121 128 } 122 129 123 - export function validatePasswordUpdated<V>(v: V) { 130 + export function validatePasswordUpdated<V>( 131 + v: V, 132 + ): ValidationResult<PasswordUpdated & V> { 124 133 return validate<PasswordUpdated & V>(v, id, hashPasswordUpdated); 125 134 } 126 135 ··· 131 140 132 141 const hashHandleUpdated = "handleUpdated"; 133 142 134 - export function isHandleUpdated<V>(v: V) { 143 + export function isHandleUpdated<V>(v: V): v is HandleUpdated & V { 135 144 return is$typed(v, id, hashHandleUpdated); 136 145 } 137 146 138 - export function validateHandleUpdated<V>(v: V) { 147 + export function validateHandleUpdated<V>( 148 + v: V, 149 + ): ValidationResult<HandleUpdated & V> { 139 150 return validate<HandleUpdated & V>(v, id, hashHandleUpdated); 140 151 }
+9 -4
lex/types/tools/ozone/moderation/cancelScheduledActions.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 46 47 47 48 const hashCancellationResults = "cancellationResults"; 48 49 49 - export function isCancellationResults<V>(v: V) { 50 + export function isCancellationResults<V>(v: V): v is CancellationResults & V { 50 51 return is$typed(v, id, hashCancellationResults); 51 52 } 52 53 53 - export function validateCancellationResults<V>(v: V) { 54 + export function validateCancellationResults<V>( 55 + v: V, 56 + ): ValidationResult<CancellationResults & V> { 54 57 return validate<CancellationResults & V>(v, id, hashCancellationResults); 55 58 } 56 59 ··· 63 66 64 67 const hashFailedCancellation = "failedCancellation"; 65 68 66 - export function isFailedCancellation<V>(v: V) { 69 + export function isFailedCancellation<V>(v: V): v is FailedCancellation & V { 67 70 return is$typed(v, id, hashFailedCancellation); 68 71 } 69 72 70 - export function validateFailedCancellation<V>(v: V) { 73 + export function validateFailedCancellation<V>( 74 + v: V, 75 + ): ValidationResult<FailedCancellation & V> { 71 76 return validate<FailedCancellation & V>(v, id, hashFailedCancellation); 72 77 }
+231 -101
lex/types/tools/ozone/moderation/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ComAtprotoAdminDefs from "../../../com/atproto/admin/defs.ts"; 7 8 import type * as ComAtprotoRepoStrongRef from "../../../com/atproto/repo/strongRef.ts"; ··· 39 40 | $Typed<ModEventPriorityScore> 40 41 | $Typed<AgeAssuranceEvent> 41 42 | $Typed<AgeAssuranceOverrideEvent> 43 + | $Typed<AgeAssurancePurgeEvent> 42 44 | $Typed<RevokeAccountCredentialsEvent> 43 45 | $Typed<ScheduleTakedownEvent> 44 46 | $Typed<CancelScheduledTakedownEvent> ··· 58 60 59 61 const hashModEventView = "modEventView"; 60 62 61 - export function isModEventView<V>(v: V) { 63 + export function isModEventView<V>(v: V): v is ModEventView & V { 62 64 return is$typed(v, id, hashModEventView); 63 65 } 64 66 65 - export function validateModEventView<V>(v: V) { 67 + export function validateModEventView<V>( 68 + v: V, 69 + ): ValidationResult<ModEventView & V> { 66 70 return validate<ModEventView & V>(v, id, hashModEventView); 67 71 } 68 72 ··· 91 95 | $Typed<ModEventPriorityScore> 92 96 | $Typed<AgeAssuranceEvent> 93 97 | $Typed<AgeAssuranceOverrideEvent> 98 + | $Typed<AgeAssurancePurgeEvent> 94 99 | $Typed<RevokeAccountCredentialsEvent> 95 100 | $Typed<ScheduleTakedownEvent> 96 101 | $Typed<CancelScheduledTakedownEvent> ··· 109 114 110 115 const hashModEventViewDetail = "modEventViewDetail"; 111 116 112 - export function isModEventViewDetail<V>(v: V) { 117 + export function isModEventViewDetail<V>(v: V): v is ModEventViewDetail & V { 113 118 return is$typed(v, id, hashModEventViewDetail); 114 119 } 115 120 116 - export function validateModEventViewDetail<V>(v: V) { 121 + export function validateModEventViewDetail<V>( 122 + v: V, 123 + ): ValidationResult<ModEventViewDetail & V> { 117 124 return validate<ModEventViewDetail & V>(v, id, hashModEventViewDetail); 118 125 } 119 126 ··· 169 176 170 177 const hashSubjectStatusView = "subjectStatusView"; 171 178 172 - export function isSubjectStatusView<V>(v: V) { 179 + export function isSubjectStatusView<V>(v: V): v is SubjectStatusView & V { 173 180 return is$typed(v, id, hashSubjectStatusView); 174 181 } 175 182 176 - export function validateSubjectStatusView<V>(v: V) { 183 + export function validateSubjectStatusView<V>( 184 + v: V, 185 + ): ValidationResult<SubjectStatusView & V> { 177 186 return validate<SubjectStatusView & V>(v, id, hashSubjectStatusView); 178 187 } 179 188 ··· 190 199 191 200 const hashSubjectView = "subjectView"; 192 201 193 - export function isSubjectView<V>(v: V) { 202 + export function isSubjectView<V>(v: V): v is SubjectView & V { 194 203 return is$typed(v, id, hashSubjectView); 195 204 } 196 205 197 - export function validateSubjectView<V>(v: V) { 206 + export function validateSubjectView<V>( 207 + v: V, 208 + ): ValidationResult<SubjectView & V> { 198 209 return validate<SubjectView & V>(v, id, hashSubjectView); 199 210 } 200 211 ··· 215 226 216 227 const hashAccountStats = "accountStats"; 217 228 218 - export function isAccountStats<V>(v: V) { 229 + export function isAccountStats<V>(v: V): v is AccountStats & V { 219 230 return is$typed(v, id, hashAccountStats); 220 231 } 221 232 222 - export function validateAccountStats<V>(v: V) { 233 + export function validateAccountStats<V>( 234 + v: V, 235 + ): ValidationResult<AccountStats & V> { 223 236 return validate<AccountStats & V>(v, id, hashAccountStats); 224 237 } 225 238 ··· 246 259 247 260 const hashRecordsStats = "recordsStats"; 248 261 249 - export function isRecordsStats<V>(v: V) { 262 + export function isRecordsStats<V>(v: V): v is RecordsStats & V { 250 263 return is$typed(v, id, hashRecordsStats); 251 264 } 252 265 253 - export function validateRecordsStats<V>(v: V) { 266 + export function validateRecordsStats<V>( 267 + v: V, 268 + ): ValidationResult<RecordsStats & V> { 254 269 return validate<RecordsStats & V>(v, id, hashRecordsStats); 255 270 } 256 271 ··· 269 284 270 285 const hashAccountStrike = "accountStrike"; 271 286 272 - export function isAccountStrike<V>(v: V) { 287 + export function isAccountStrike<V>(v: V): v is AccountStrike & V { 273 288 return is$typed(v, id, hashAccountStrike); 274 289 } 275 290 276 - export function validateAccountStrike<V>(v: V) { 291 + export function validateAccountStrike<V>( 292 + v: V, 293 + ): ValidationResult<AccountStrike & V> { 277 294 return validate<AccountStrike & V>(v, id, hashAccountStrike); 278 295 } 279 296 ··· 285 302 | (string & globalThis.Record<PropertyKey, never>); 286 303 287 304 /** Moderator review status of a subject: Open. Indicates that the subject needs to be reviewed by a moderator */ 288 - export const REVIEWOPEN = `${id}#reviewOpen`; 305 + export const REVIEWOPEN: string = `${id}#reviewOpen`; 289 306 /** Moderator review status of a subject: Escalated. Indicates that the subject was escalated for review by a moderator */ 290 - export const REVIEWESCALATED = `${id}#reviewEscalated`; 307 + export const REVIEWESCALATED: string = `${id}#reviewEscalated`; 291 308 /** Moderator review status of a subject: Closed. Indicates that the subject was already reviewed and resolved by a moderator */ 292 - export const REVIEWCLOSED = `${id}#reviewClosed`; 309 + export const REVIEWCLOSED: string = `${id}#reviewClosed`; 293 310 /** Moderator review status of a subject: Unnecessary. Indicates that the subject does not need a review at the moment but there is probably some moderation related metadata available for it */ 294 - export const REVIEWNONE = `${id}#reviewNone`; 311 + export const REVIEWNONE: string = `${id}#reviewNone`; 295 312 296 313 /** Take down a subject permanently or temporarily */ 297 314 export interface ModEventTakedown { ··· 316 333 317 334 const hashModEventTakedown = "modEventTakedown"; 318 335 319 - export function isModEventTakedown<V>(v: V) { 336 + export function isModEventTakedown<V>(v: V): v is ModEventTakedown & V { 320 337 return is$typed(v, id, hashModEventTakedown); 321 338 } 322 339 323 - export function validateModEventTakedown<V>(v: V) { 340 + export function validateModEventTakedown<V>( 341 + v: V, 342 + ): ValidationResult<ModEventTakedown & V> { 324 343 return validate<ModEventTakedown & V>(v, id, hashModEventTakedown); 325 344 } 326 345 ··· 339 358 340 359 const hashModEventReverseTakedown = "modEventReverseTakedown"; 341 360 342 - export function isModEventReverseTakedown<V>(v: V) { 361 + export function isModEventReverseTakedown<V>( 362 + v: V, 363 + ): v is ModEventReverseTakedown & V { 343 364 return is$typed(v, id, hashModEventReverseTakedown); 344 365 } 345 366 346 - export function validateModEventReverseTakedown<V>(v: V) { 367 + export function validateModEventReverseTakedown<V>( 368 + v: V, 369 + ): ValidationResult<ModEventReverseTakedown & V> { 347 370 return validate<ModEventReverseTakedown & V>( 348 371 v, 349 372 id, ··· 360 383 361 384 const hashModEventResolveAppeal = "modEventResolveAppeal"; 362 385 363 - export function isModEventResolveAppeal<V>(v: V) { 386 + export function isModEventResolveAppeal<V>( 387 + v: V, 388 + ): v is ModEventResolveAppeal & V { 364 389 return is$typed(v, id, hashModEventResolveAppeal); 365 390 } 366 391 367 - export function validateModEventResolveAppeal<V>(v: V) { 392 + export function validateModEventResolveAppeal<V>( 393 + v: V, 394 + ): ValidationResult<ModEventResolveAppeal & V> { 368 395 return validate<ModEventResolveAppeal & V>(v, id, hashModEventResolveAppeal); 369 396 } 370 397 ··· 378 405 379 406 const hashModEventComment = "modEventComment"; 380 407 381 - export function isModEventComment<V>(v: V) { 408 + export function isModEventComment<V>(v: V): v is ModEventComment & V { 382 409 return is$typed(v, id, hashModEventComment); 383 410 } 384 411 385 - export function validateModEventComment<V>(v: V) { 412 + export function validateModEventComment<V>( 413 + v: V, 414 + ): ValidationResult<ModEventComment & V> { 386 415 return validate<ModEventComment & V>(v, id, hashModEventComment); 387 416 } 388 417 ··· 397 426 398 427 const hashModEventReport = "modEventReport"; 399 428 400 - export function isModEventReport<V>(v: V) { 429 + export function isModEventReport<V>(v: V): v is ModEventReport & V { 401 430 return is$typed(v, id, hashModEventReport); 402 431 } 403 432 404 - export function validateModEventReport<V>(v: V) { 433 + export function validateModEventReport<V>( 434 + v: V, 435 + ): ValidationResult<ModEventReport & V> { 405 436 return validate<ModEventReport & V>(v, id, hashModEventReport); 406 437 } 407 438 ··· 417 448 418 449 const hashModEventLabel = "modEventLabel"; 419 450 420 - export function isModEventLabel<V>(v: V) { 451 + export function isModEventLabel<V>(v: V): v is ModEventLabel & V { 421 452 return is$typed(v, id, hashModEventLabel); 422 453 } 423 454 424 - export function validateModEventLabel<V>(v: V) { 455 + export function validateModEventLabel<V>( 456 + v: V, 457 + ): ValidationResult<ModEventLabel & V> { 425 458 return validate<ModEventLabel & V>(v, id, hashModEventLabel); 426 459 } 427 460 ··· 434 467 435 468 const hashModEventPriorityScore = "modEventPriorityScore"; 436 469 437 - export function isModEventPriorityScore<V>(v: V) { 470 + export function isModEventPriorityScore<V>( 471 + v: V, 472 + ): v is ModEventPriorityScore & V { 438 473 return is$typed(v, id, hashModEventPriorityScore); 439 474 } 440 475 441 - export function validateModEventPriorityScore<V>(v: V) { 476 + export function validateModEventPriorityScore<V>( 477 + v: V, 478 + ): ValidationResult<ModEventPriorityScore & V> { 442 479 return validate<ModEventPriorityScore & V>(v, id, hashModEventPriorityScore); 443 480 } 444 481 ··· 472 509 473 510 const hashAgeAssuranceEvent = "ageAssuranceEvent"; 474 511 475 - export function isAgeAssuranceEvent<V>(v: V) { 512 + export function isAgeAssuranceEvent<V>(v: V): v is AgeAssuranceEvent & V { 476 513 return is$typed(v, id, hashAgeAssuranceEvent); 477 514 } 478 515 479 - export function validateAgeAssuranceEvent<V>(v: V) { 516 + export function validateAgeAssuranceEvent<V>( 517 + v: V, 518 + ): ValidationResult<AgeAssuranceEvent & V> { 480 519 return validate<AgeAssuranceEvent & V>(v, id, hashAgeAssuranceEvent); 481 520 } 482 521 ··· 496 535 497 536 const hashAgeAssuranceOverrideEvent = "ageAssuranceOverrideEvent"; 498 537 499 - export function isAgeAssuranceOverrideEvent<V>(v: V) { 538 + export function isAgeAssuranceOverrideEvent<V>( 539 + v: V, 540 + ): v is AgeAssuranceOverrideEvent & V { 500 541 return is$typed(v, id, hashAgeAssuranceOverrideEvent); 501 542 } 502 543 503 - export function validateAgeAssuranceOverrideEvent<V>(v: V) { 544 + export function validateAgeAssuranceOverrideEvent<V>( 545 + v: V, 546 + ): ValidationResult<AgeAssuranceOverrideEvent & V> { 504 547 return validate<AgeAssuranceOverrideEvent & V>( 505 548 v, 506 549 id, ··· 508 551 ); 509 552 } 510 553 554 + /** Purges all age assurance events for the subject. Only works on DID subjects. Moderator-only. */ 555 + export interface AgeAssurancePurgeEvent { 556 + $type?: "tools.ozone.moderation.defs#ageAssurancePurgeEvent"; 557 + /** Comment describing the reason for the purge. */ 558 + comment: string; 559 + } 560 + 561 + const hashAgeAssurancePurgeEvent = "ageAssurancePurgeEvent"; 562 + 563 + export function isAgeAssurancePurgeEvent<V>( 564 + v: V, 565 + ): v is AgeAssurancePurgeEvent & V { 566 + return is$typed(v, id, hashAgeAssurancePurgeEvent); 567 + } 568 + 569 + export function validateAgeAssurancePurgeEvent<V>( 570 + v: V, 571 + ): ValidationResult<AgeAssurancePurgeEvent & V> { 572 + return validate<AgeAssurancePurgeEvent & V>( 573 + v, 574 + id, 575 + hashAgeAssurancePurgeEvent, 576 + ); 577 + } 578 + 511 579 /** Account credentials revocation by moderators. Only works on DID subjects. */ 512 580 export interface RevokeAccountCredentialsEvent { 513 581 $type?: "tools.ozone.moderation.defs#revokeAccountCredentialsEvent"; ··· 517 585 518 586 const hashRevokeAccountCredentialsEvent = "revokeAccountCredentialsEvent"; 519 587 520 - export function isRevokeAccountCredentialsEvent<V>(v: V) { 588 + export function isRevokeAccountCredentialsEvent<V>( 589 + v: V, 590 + ): v is RevokeAccountCredentialsEvent & V { 521 591 return is$typed(v, id, hashRevokeAccountCredentialsEvent); 522 592 } 523 593 524 - export function validateRevokeAccountCredentialsEvent<V>(v: V) { 594 + export function validateRevokeAccountCredentialsEvent<V>( 595 + v: V, 596 + ): ValidationResult<RevokeAccountCredentialsEvent & V> { 525 597 return validate<RevokeAccountCredentialsEvent & V>( 526 598 v, 527 599 id, ··· 538 610 539 611 const hashModEventAcknowledge = "modEventAcknowledge"; 540 612 541 - export function isModEventAcknowledge<V>(v: V) { 613 + export function isModEventAcknowledge<V>(v: V): v is ModEventAcknowledge & V { 542 614 return is$typed(v, id, hashModEventAcknowledge); 543 615 } 544 616 545 - export function validateModEventAcknowledge<V>(v: V) { 617 + export function validateModEventAcknowledge<V>( 618 + v: V, 619 + ): ValidationResult<ModEventAcknowledge & V> { 546 620 return validate<ModEventAcknowledge & V>(v, id, hashModEventAcknowledge); 547 621 } 548 622 ··· 553 627 554 628 const hashModEventEscalate = "modEventEscalate"; 555 629 556 - export function isModEventEscalate<V>(v: V) { 630 + export function isModEventEscalate<V>(v: V): v is ModEventEscalate & V { 557 631 return is$typed(v, id, hashModEventEscalate); 558 632 } 559 633 560 - export function validateModEventEscalate<V>(v: V) { 634 + export function validateModEventEscalate<V>( 635 + v: V, 636 + ): ValidationResult<ModEventEscalate & V> { 561 637 return validate<ModEventEscalate & V>(v, id, hashModEventEscalate); 562 638 } 563 639 ··· 571 647 572 648 const hashModEventMute = "modEventMute"; 573 649 574 - export function isModEventMute<V>(v: V) { 650 + export function isModEventMute<V>(v: V): v is ModEventMute & V { 575 651 return is$typed(v, id, hashModEventMute); 576 652 } 577 653 578 - export function validateModEventMute<V>(v: V) { 654 + export function validateModEventMute<V>( 655 + v: V, 656 + ): ValidationResult<ModEventMute & V> { 579 657 return validate<ModEventMute & V>(v, id, hashModEventMute); 580 658 } 581 659 ··· 588 666 589 667 const hashModEventUnmute = "modEventUnmute"; 590 668 591 - export function isModEventUnmute<V>(v: V) { 669 + export function isModEventUnmute<V>(v: V): v is ModEventUnmute & V { 592 670 return is$typed(v, id, hashModEventUnmute); 593 671 } 594 672 595 - export function validateModEventUnmute<V>(v: V) { 673 + export function validateModEventUnmute<V>( 674 + v: V, 675 + ): ValidationResult<ModEventUnmute & V> { 596 676 return validate<ModEventUnmute & V>(v, id, hashModEventUnmute); 597 677 } 598 678 ··· 606 686 607 687 const hashModEventMuteReporter = "modEventMuteReporter"; 608 688 609 - export function isModEventMuteReporter<V>(v: V) { 689 + export function isModEventMuteReporter<V>(v: V): v is ModEventMuteReporter & V { 610 690 return is$typed(v, id, hashModEventMuteReporter); 611 691 } 612 692 613 - export function validateModEventMuteReporter<V>(v: V) { 693 + export function validateModEventMuteReporter<V>( 694 + v: V, 695 + ): ValidationResult<ModEventMuteReporter & V> { 614 696 return validate<ModEventMuteReporter & V>(v, id, hashModEventMuteReporter); 615 697 } 616 698 ··· 623 705 624 706 const hashModEventUnmuteReporter = "modEventUnmuteReporter"; 625 707 626 - export function isModEventUnmuteReporter<V>(v: V) { 708 + export function isModEventUnmuteReporter<V>( 709 + v: V, 710 + ): v is ModEventUnmuteReporter & V { 627 711 return is$typed(v, id, hashModEventUnmuteReporter); 628 712 } 629 713 630 - export function validateModEventUnmuteReporter<V>(v: V) { 714 + export function validateModEventUnmuteReporter<V>( 715 + v: V, 716 + ): ValidationResult<ModEventUnmuteReporter & V> { 631 717 return validate<ModEventUnmuteReporter & V>( 632 718 v, 633 719 id, ··· 658 744 659 745 const hashModEventEmail = "modEventEmail"; 660 746 661 - export function isModEventEmail<V>(v: V) { 747 + export function isModEventEmail<V>(v: V): v is ModEventEmail & V { 662 748 return is$typed(v, id, hashModEventEmail); 663 749 } 664 750 665 - export function validateModEventEmail<V>(v: V) { 751 + export function validateModEventEmail<V>( 752 + v: V, 753 + ): ValidationResult<ModEventEmail & V> { 666 754 return validate<ModEventEmail & V>(v, id, hashModEventEmail); 667 755 } 668 756 ··· 674 762 675 763 const hashModEventDivert = "modEventDivert"; 676 764 677 - export function isModEventDivert<V>(v: V) { 765 + export function isModEventDivert<V>(v: V): v is ModEventDivert & V { 678 766 return is$typed(v, id, hashModEventDivert); 679 767 } 680 768 681 - export function validateModEventDivert<V>(v: V) { 769 + export function validateModEventDivert<V>( 770 + v: V, 771 + ): ValidationResult<ModEventDivert & V> { 682 772 return validate<ModEventDivert & V>(v, id, hashModEventDivert); 683 773 } 684 774 ··· 695 785 696 786 const hashModEventTag = "modEventTag"; 697 787 698 - export function isModEventTag<V>(v: V) { 788 + export function isModEventTag<V>(v: V): v is ModEventTag & V { 699 789 return is$typed(v, id, hashModEventTag); 700 790 } 701 791 702 - export function validateModEventTag<V>(v: V) { 792 + export function validateModEventTag<V>( 793 + v: V, 794 + ): ValidationResult<ModEventTag & V> { 703 795 return validate<ModEventTag & V>(v, id, hashModEventTag); 704 796 } 705 797 ··· 722 814 723 815 const hashAccountEvent = "accountEvent"; 724 816 725 - export function isAccountEvent<V>(v: V) { 817 + export function isAccountEvent<V>(v: V): v is AccountEvent & V { 726 818 return is$typed(v, id, hashAccountEvent); 727 819 } 728 820 729 - export function validateAccountEvent<V>(v: V) { 821 + export function validateAccountEvent<V>( 822 + v: V, 823 + ): ValidationResult<AccountEvent & V> { 730 824 return validate<AccountEvent & V>(v, id, hashAccountEvent); 731 825 } 732 826 ··· 742 836 743 837 const hashIdentityEvent = "identityEvent"; 744 838 745 - export function isIdentityEvent<V>(v: V) { 839 + export function isIdentityEvent<V>(v: V): v is IdentityEvent & V { 746 840 return is$typed(v, id, hashIdentityEvent); 747 841 } 748 842 749 - export function validateIdentityEvent<V>(v: V) { 843 + export function validateIdentityEvent<V>( 844 + v: V, 845 + ): ValidationResult<IdentityEvent & V> { 750 846 return validate<IdentityEvent & V>(v, id, hashIdentityEvent); 751 847 } 752 848 ··· 765 861 766 862 const hashRecordEvent = "recordEvent"; 767 863 768 - export function isRecordEvent<V>(v: V) { 864 + export function isRecordEvent<V>(v: V): v is RecordEvent & V { 769 865 return is$typed(v, id, hashRecordEvent); 770 866 } 771 867 772 - export function validateRecordEvent<V>(v: V) { 868 + export function validateRecordEvent<V>( 869 + v: V, 870 + ): ValidationResult<RecordEvent & V> { 773 871 return validate<RecordEvent & V>(v, id, hashRecordEvent); 774 872 } 775 873 ··· 784 882 785 883 const hashScheduleTakedownEvent = "scheduleTakedownEvent"; 786 884 787 - export function isScheduleTakedownEvent<V>(v: V) { 885 + export function isScheduleTakedownEvent<V>( 886 + v: V, 887 + ): v is ScheduleTakedownEvent & V { 788 888 return is$typed(v, id, hashScheduleTakedownEvent); 789 889 } 790 890 791 - export function validateScheduleTakedownEvent<V>(v: V) { 891 + export function validateScheduleTakedownEvent<V>( 892 + v: V, 893 + ): ValidationResult<ScheduleTakedownEvent & V> { 792 894 return validate<ScheduleTakedownEvent & V>(v, id, hashScheduleTakedownEvent); 793 895 } 794 896 ··· 800 902 801 903 const hashCancelScheduledTakedownEvent = "cancelScheduledTakedownEvent"; 802 904 803 - export function isCancelScheduledTakedownEvent<V>(v: V) { 905 + export function isCancelScheduledTakedownEvent<V>( 906 + v: V, 907 + ): v is CancelScheduledTakedownEvent & V { 804 908 return is$typed(v, id, hashCancelScheduledTakedownEvent); 805 909 } 806 910 807 - export function validateCancelScheduledTakedownEvent<V>(v: V) { 911 + export function validateCancelScheduledTakedownEvent<V>( 912 + v: V, 913 + ): ValidationResult<CancelScheduledTakedownEvent & V> { 808 914 return validate<CancelScheduledTakedownEvent & V>( 809 915 v, 810 916 id, ··· 829 935 830 936 const hashRepoView = "repoView"; 831 937 832 - export function isRepoView<V>(v: V) { 938 + export function isRepoView<V>(v: V): v is RepoView & V { 833 939 return is$typed(v, id, hashRepoView); 834 940 } 835 941 836 - export function validateRepoView<V>(v: V) { 942 + export function validateRepoView<V>(v: V): ValidationResult<RepoView & V> { 837 943 return validate<RepoView & V>(v, id, hashRepoView); 838 944 } 839 945 ··· 857 963 858 964 const hashRepoViewDetail = "repoViewDetail"; 859 965 860 - export function isRepoViewDetail<V>(v: V) { 966 + export function isRepoViewDetail<V>(v: V): v is RepoViewDetail & V { 861 967 return is$typed(v, id, hashRepoViewDetail); 862 968 } 863 969 864 - export function validateRepoViewDetail<V>(v: V) { 970 + export function validateRepoViewDetail<V>( 971 + v: V, 972 + ): ValidationResult<RepoViewDetail & V> { 865 973 return validate<RepoViewDetail & V>(v, id, hashRepoViewDetail); 866 974 } 867 975 ··· 872 980 873 981 const hashRepoViewNotFound = "repoViewNotFound"; 874 982 875 - export function isRepoViewNotFound<V>(v: V) { 983 + export function isRepoViewNotFound<V>(v: V): v is RepoViewNotFound & V { 876 984 return is$typed(v, id, hashRepoViewNotFound); 877 985 } 878 986 879 - export function validateRepoViewNotFound<V>(v: V) { 987 + export function validateRepoViewNotFound<V>( 988 + v: V, 989 + ): ValidationResult<RepoViewNotFound & V> { 880 990 return validate<RepoViewNotFound & V>(v, id, hashRepoViewNotFound); 881 991 } 882 992 ··· 893 1003 894 1004 const hashRecordView = "recordView"; 895 1005 896 - export function isRecordView<V>(v: V) { 1006 + export function isRecordView<V>(v: V): v is RecordView & V { 897 1007 return is$typed(v, id, hashRecordView); 898 1008 } 899 1009 900 - export function validateRecordView<V>(v: V) { 1010 + export function validateRecordView<V>(v: V): ValidationResult<RecordView & V> { 901 1011 return validate<RecordView & V>(v, id, hashRecordView); 902 1012 } 903 1013 ··· 915 1025 916 1026 const hashRecordViewDetail = "recordViewDetail"; 917 1027 918 - export function isRecordViewDetail<V>(v: V) { 1028 + export function isRecordViewDetail<V>(v: V): v is RecordViewDetail & V { 919 1029 return is$typed(v, id, hashRecordViewDetail); 920 1030 } 921 1031 922 - export function validateRecordViewDetail<V>(v: V) { 1032 + export function validateRecordViewDetail<V>( 1033 + v: V, 1034 + ): ValidationResult<RecordViewDetail & V> { 923 1035 return validate<RecordViewDetail & V>(v, id, hashRecordViewDetail); 924 1036 } 925 1037 ··· 930 1042 931 1043 const hashRecordViewNotFound = "recordViewNotFound"; 932 1044 933 - export function isRecordViewNotFound<V>(v: V) { 1045 + export function isRecordViewNotFound<V>(v: V): v is RecordViewNotFound & V { 934 1046 return is$typed(v, id, hashRecordViewNotFound); 935 1047 } 936 1048 937 - export function validateRecordViewNotFound<V>(v: V) { 1049 + export function validateRecordViewNotFound<V>( 1050 + v: V, 1051 + ): ValidationResult<RecordViewNotFound & V> { 938 1052 return validate<RecordViewNotFound & V>(v, id, hashRecordViewNotFound); 939 1053 } 940 1054 ··· 945 1059 946 1060 const hashModeration = "moderation"; 947 1061 948 - export function isModeration<V>(v: V) { 1062 + export function isModeration<V>(v: V): v is Moderation & V { 949 1063 return is$typed(v, id, hashModeration); 950 1064 } 951 1065 952 - export function validateModeration<V>(v: V) { 1066 + export function validateModeration<V>(v: V): ValidationResult<Moderation & V> { 953 1067 return validate<Moderation & V>(v, id, hashModeration); 954 1068 } 955 1069 ··· 960 1074 961 1075 const hashModerationDetail = "moderationDetail"; 962 1076 963 - export function isModerationDetail<V>(v: V) { 1077 + export function isModerationDetail<V>(v: V): v is ModerationDetail & V { 964 1078 return is$typed(v, id, hashModerationDetail); 965 1079 } 966 1080 967 - export function validateModerationDetail<V>(v: V) { 1081 + export function validateModerationDetail<V>( 1082 + v: V, 1083 + ): ValidationResult<ModerationDetail & V> { 968 1084 return validate<ModerationDetail & V>(v, id, hashModerationDetail); 969 1085 } 970 1086 ··· 980 1096 981 1097 const hashBlobView = "blobView"; 982 1098 983 - export function isBlobView<V>(v: V) { 1099 + export function isBlobView<V>(v: V): v is BlobView & V { 984 1100 return is$typed(v, id, hashBlobView); 985 1101 } 986 1102 987 - export function validateBlobView<V>(v: V) { 1103 + export function validateBlobView<V>(v: V): ValidationResult<BlobView & V> { 988 1104 return validate<BlobView & V>(v, id, hashBlobView); 989 1105 } 990 1106 ··· 996 1112 997 1113 const hashImageDetails = "imageDetails"; 998 1114 999 - export function isImageDetails<V>(v: V) { 1115 + export function isImageDetails<V>(v: V): v is ImageDetails & V { 1000 1116 return is$typed(v, id, hashImageDetails); 1001 1117 } 1002 1118 1003 - export function validateImageDetails<V>(v: V) { 1119 + export function validateImageDetails<V>( 1120 + v: V, 1121 + ): ValidationResult<ImageDetails & V> { 1004 1122 return validate<ImageDetails & V>(v, id, hashImageDetails); 1005 1123 } 1006 1124 ··· 1013 1131 1014 1132 const hashVideoDetails = "videoDetails"; 1015 1133 1016 - export function isVideoDetails<V>(v: V) { 1134 + export function isVideoDetails<V>(v: V): v is VideoDetails & V { 1017 1135 return is$typed(v, id, hashVideoDetails); 1018 1136 } 1019 1137 1020 - export function validateVideoDetails<V>(v: V) { 1138 + export function validateVideoDetails<V>( 1139 + v: V, 1140 + ): ValidationResult<VideoDetails & V> { 1021 1141 return validate<VideoDetails & V>(v, id, hashVideoDetails); 1022 1142 } 1023 1143 ··· 1039 1159 1040 1160 const hashAccountHosting = "accountHosting"; 1041 1161 1042 - export function isAccountHosting<V>(v: V) { 1162 + export function isAccountHosting<V>(v: V): v is AccountHosting & V { 1043 1163 return is$typed(v, id, hashAccountHosting); 1044 1164 } 1045 1165 1046 - export function validateAccountHosting<V>(v: V) { 1166 + export function validateAccountHosting<V>( 1167 + v: V, 1168 + ): ValidationResult<AccountHosting & V> { 1047 1169 return validate<AccountHosting & V>(v, id, hashAccountHosting); 1048 1170 } 1049 1171 ··· 1060 1182 1061 1183 const hashRecordHosting = "recordHosting"; 1062 1184 1063 - export function isRecordHosting<V>(v: V) { 1185 + export function isRecordHosting<V>(v: V): v is RecordHosting & V { 1064 1186 return is$typed(v, id, hashRecordHosting); 1065 1187 } 1066 1188 1067 - export function validateRecordHosting<V>(v: V) { 1189 + export function validateRecordHosting<V>( 1190 + v: V, 1191 + ): ValidationResult<RecordHosting & V> { 1068 1192 return validate<RecordHosting & V>(v, id, hashRecordHosting); 1069 1193 } 1070 1194 ··· 1091 1215 1092 1216 const hashReporterStats = "reporterStats"; 1093 1217 1094 - export function isReporterStats<V>(v: V) { 1218 + export function isReporterStats<V>(v: V): v is ReporterStats & V { 1095 1219 return is$typed(v, id, hashReporterStats); 1096 1220 } 1097 1221 1098 - export function validateReporterStats<V>(v: V) { 1222 + export function validateReporterStats<V>( 1223 + v: V, 1224 + ): ValidationResult<ReporterStats & V> { 1099 1225 return validate<ReporterStats & V>(v, id, hashReporterStats); 1100 1226 } 1101 1227 ··· 1110 1236 1111 1237 const hashModTool = "modTool"; 1112 1238 1113 - export function isModTool<V>(v: V) { 1239 + export function isModTool<V>(v: V): v is ModTool & V { 1114 1240 return is$typed(v, id, hashModTool); 1115 1241 } 1116 1242 1117 - export function validateModTool<V>(v: V) { 1243 + export function validateModTool<V>(v: V): ValidationResult<ModTool & V> { 1118 1244 return validate<ModTool & V>(v, id, hashModTool); 1119 1245 } 1120 1246 1121 1247 /** Moderation event timeline event for a PLC create operation */ 1122 - export const TIMELINEEVENTPLCCREATE = `${id}#timelineEventPlcCreate`; 1248 + export const TIMELINEEVENTPLCCREATE: string = `${id}#timelineEventPlcCreate`; 1123 1249 /** Moderation event timeline event for generic PLC operation */ 1124 - export const TIMELINEEVENTPLCOPERATION = `${id}#timelineEventPlcOperation`; 1250 + export const TIMELINEEVENTPLCOPERATION: string = 1251 + `${id}#timelineEventPlcOperation`; 1125 1252 /** Moderation event timeline event for a PLC tombstone operation */ 1126 - export const TIMELINEEVENTPLCTOMBSTONE = `${id}#timelineEventPlcTombstone`; 1253 + export const TIMELINEEVENTPLCTOMBSTONE: string = 1254 + `${id}#timelineEventPlcTombstone`; 1127 1255 1128 1256 /** View of a scheduled moderation action */ 1129 1257 export interface ScheduledActionView { ··· 1167 1295 1168 1296 const hashScheduledActionView = "scheduledActionView"; 1169 1297 1170 - export function isScheduledActionView<V>(v: V) { 1298 + export function isScheduledActionView<V>(v: V): v is ScheduledActionView & V { 1171 1299 return is$typed(v, id, hashScheduledActionView); 1172 1300 } 1173 1301 1174 - export function validateScheduledActionView<V>(v: V) { 1302 + export function validateScheduledActionView<V>( 1303 + v: V, 1304 + ): ValidationResult<ScheduledActionView & V> { 1175 1305 return validate<ScheduledActionView & V>(v, id, hashScheduledActionView); 1176 1306 }
+1
lex/types/tools/ozone/moderation/emitEvent.ts
··· 31 31 | $Typed<ToolsOzoneModerationDefs.ModEventPriorityScore> 32 32 | $Typed<ToolsOzoneModerationDefs.AgeAssuranceEvent> 33 33 | $Typed<ToolsOzoneModerationDefs.AgeAssuranceOverrideEvent> 34 + | $Typed<ToolsOzoneModerationDefs.AgeAssurancePurgeEvent> 34 35 | $Typed<ToolsOzoneModerationDefs.RevokeAccountCredentialsEvent> 35 36 | $Typed<ToolsOzoneModerationDefs.ScheduleTakedownEvent> 36 37 | $Typed<ToolsOzoneModerationDefs.CancelScheduledTakedownEvent>
+9 -4
lex/types/tools/ozone/moderation/getAccountTimeline.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 40 41 41 42 const hashTimelineItem = "timelineItem"; 42 43 43 - export function isTimelineItem<V>(v: V) { 44 + export function isTimelineItem<V>(v: V): v is TimelineItem & V { 44 45 return is$typed(v, id, hashTimelineItem); 45 46 } 46 47 47 - export function validateTimelineItem<V>(v: V) { 48 + export function validateTimelineItem<V>( 49 + v: V, 50 + ): ValidationResult<TimelineItem & V> { 48 51 return validate<TimelineItem & V>(v, id, hashTimelineItem); 49 52 } 50 53 ··· 93 96 94 97 const hashTimelineItemSummary = "timelineItemSummary"; 95 98 96 - export function isTimelineItemSummary<V>(v: V) { 99 + export function isTimelineItemSummary<V>(v: V): v is TimelineItemSummary & V { 97 100 return is$typed(v, id, hashTimelineItemSummary); 98 101 } 99 102 100 - export function validateTimelineItemSummary<V>(v: V) { 103 + export function validateTimelineItemSummary<V>( 104 + v: V, 105 + ): ValidationResult<TimelineItemSummary & V> { 101 106 return validate<TimelineItemSummary & V>(v, id, hashTimelineItemSummary); 102 107 }
+17 -8
lex/types/tools/ozone/moderation/scheduleAction.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ToolsOzoneModerationDefs from "./defs.ts"; 7 8 ··· 63 64 64 65 const hashTakedown = "takedown"; 65 66 66 - export function isTakedown<V>(v: V) { 67 + export function isTakedown<V>(v: V): v is Takedown & V { 67 68 return is$typed(v, id, hashTakedown); 68 69 } 69 70 70 - export function validateTakedown<V>(v: V) { 71 + export function validateTakedown<V>(v: V): ValidationResult<Takedown & V> { 71 72 return validate<Takedown & V>(v, id, hashTakedown); 72 73 } 73 74 ··· 84 85 85 86 const hashSchedulingConfig = "schedulingConfig"; 86 87 87 - export function isSchedulingConfig<V>(v: V) { 88 + export function isSchedulingConfig<V>(v: V): v is SchedulingConfig & V { 88 89 return is$typed(v, id, hashSchedulingConfig); 89 90 } 90 91 91 - export function validateSchedulingConfig<V>(v: V) { 92 + export function validateSchedulingConfig<V>( 93 + v: V, 94 + ): ValidationResult<SchedulingConfig & V> { 92 95 return validate<SchedulingConfig & V>(v, id, hashSchedulingConfig); 93 96 } 94 97 ··· 100 103 101 104 const hashScheduledActionResults = "scheduledActionResults"; 102 105 103 - export function isScheduledActionResults<V>(v: V) { 106 + export function isScheduledActionResults<V>( 107 + v: V, 108 + ): v is ScheduledActionResults & V { 104 109 return is$typed(v, id, hashScheduledActionResults); 105 110 } 106 111 107 - export function validateScheduledActionResults<V>(v: V) { 112 + export function validateScheduledActionResults<V>( 113 + v: V, 114 + ): ValidationResult<ScheduledActionResults & V> { 108 115 return validate<ScheduledActionResults & V>( 109 116 v, 110 117 id, ··· 121 128 122 129 const hashFailedScheduling = "failedScheduling"; 123 130 124 - export function isFailedScheduling<V>(v: V) { 131 + export function isFailedScheduling<V>(v: V): v is FailedScheduling & V { 125 132 return is$typed(v, id, hashFailedScheduling); 126 133 } 127 134 128 - export function validateFailedScheduling<V>(v: V) { 135 + export function validateFailedScheduling<V>( 136 + v: V, 137 + ): ValidationResult<FailedScheduling & V> { 129 138 return validate<FailedScheduling & V>(v, id, hashFailedScheduling); 130 139 }
+50 -40
lex/types/tools/ozone/report/defs.ts
··· 47 47 | (string & globalThis.Record<PropertyKey, never>); 48 48 49 49 /** Appeal a previously taken moderation action */ 50 - export const REASONAPPEAL = `${id}#reasonAppeal`; 50 + export const REASONAPPEAL: string = `${id}#reasonAppeal`; 51 51 /** An issue not included in these options */ 52 - export const REASONOTHER = `${id}#reasonOther`; 52 + export const REASONOTHER: string = `${id}#reasonOther`; 53 53 /** Animal welfare violations */ 54 - export const REASONVIOLENCEANIMAL = `${id}#reasonViolenceAnimal`; 54 + export const REASONVIOLENCEANIMAL: string = `${id}#reasonViolenceAnimal`; 55 55 /** Threats or incitement */ 56 - export const REASONVIOLENCETHREATS = `${id}#reasonViolenceThreats`; 56 + export const REASONVIOLENCETHREATS: string = `${id}#reasonViolenceThreats`; 57 57 /** Graphic violent content */ 58 - export const REASONVIOLENCEGRAPHICCONTENT = 58 + export const REASONVIOLENCEGRAPHICCONTENT: string = 59 59 `${id}#reasonViolenceGraphicContent`; 60 60 /** Glorification of violence */ 61 - export const REASONVIOLENCEGLORIFICATION = `${id}#reasonViolenceGlorification`; 61 + export const REASONVIOLENCEGLORIFICATION: string = 62 + `${id}#reasonViolenceGlorification`; 62 63 /** Extremist content. These reports will be sent only be sent to the application's Moderation Authority. */ 63 - export const REASONVIOLENCEEXTREMISTCONTENT = 64 + export const REASONVIOLENCEEXTREMISTCONTENT: string = 64 65 `${id}#reasonViolenceExtremistContent`; 65 66 /** Human trafficking */ 66 - export const REASONVIOLENCETRAFFICKING = `${id}#reasonViolenceTrafficking`; 67 + export const REASONVIOLENCETRAFFICKING: string = 68 + `${id}#reasonViolenceTrafficking`; 67 69 /** Other violent content */ 68 - export const REASONVIOLENCEOTHER = `${id}#reasonViolenceOther`; 70 + export const REASONVIOLENCEOTHER: string = `${id}#reasonViolenceOther`; 69 71 /** Adult sexual abuse content */ 70 - export const REASONSEXUALABUSECONTENT = `${id}#reasonSexualAbuseContent`; 72 + export const REASONSEXUALABUSECONTENT: string = 73 + `${id}#reasonSexualAbuseContent`; 71 74 /** Non-consensual intimate imagery */ 72 - export const REASONSEXUALNCII = `${id}#reasonSexualNCII`; 75 + export const REASONSEXUALNCII: string = `${id}#reasonSexualNCII`; 73 76 /** Deepfake adult content */ 74 - export const REASONSEXUALDEEPFAKE = `${id}#reasonSexualDeepfake`; 77 + export const REASONSEXUALDEEPFAKE: string = `${id}#reasonSexualDeepfake`; 75 78 /** Animal sexual abuse */ 76 - export const REASONSEXUALANIMAL = `${id}#reasonSexualAnimal`; 79 + export const REASONSEXUALANIMAL: string = `${id}#reasonSexualAnimal`; 77 80 /** Unlabelled adult content */ 78 - export const REASONSEXUALUNLABELED = `${id}#reasonSexualUnlabeled`; 81 + export const REASONSEXUALUNLABELED: string = `${id}#reasonSexualUnlabeled`; 79 82 /** Other sexual violence content */ 80 - export const REASONSEXUALOTHER = `${id}#reasonSexualOther`; 83 + export const REASONSEXUALOTHER: string = `${id}#reasonSexualOther`; 81 84 /** Child sexual abuse material (CSAM). These reports will be sent only be sent to the application's Moderation Authority. */ 82 - export const REASONCHILDSAFETYCSAM = `${id}#reasonChildSafetyCSAM`; 85 + export const REASONCHILDSAFETYCSAM: string = `${id}#reasonChildSafetyCSAM`; 83 86 /** Grooming or predatory behavior. These reports will be sent only be sent to the application's Moderation Authority. */ 84 - export const REASONCHILDSAFETYGROOM = `${id}#reasonChildSafetyGroom`; 87 + export const REASONCHILDSAFETYGROOM: string = `${id}#reasonChildSafetyGroom`; 85 88 /** Privacy violation involving a minor */ 86 - export const REASONCHILDSAFETYPRIVACY = `${id}#reasonChildSafetyPrivacy`; 89 + export const REASONCHILDSAFETYPRIVACY: string = 90 + `${id}#reasonChildSafetyPrivacy`; 87 91 /** Harassment or bullying of minors */ 88 - export const REASONCHILDSAFETYHARASSMENT = `${id}#reasonChildSafetyHarassment`; 92 + export const REASONCHILDSAFETYHARASSMENT: string = 93 + `${id}#reasonChildSafetyHarassment`; 89 94 /** Other child safety. These reports will be sent only be sent to the application's Moderation Authority. */ 90 - export const REASONCHILDSAFETYOTHER = `${id}#reasonChildSafetyOther`; 95 + export const REASONCHILDSAFETYOTHER: string = `${id}#reasonChildSafetyOther`; 91 96 /** Trolling */ 92 - export const REASONHARASSMENTTROLL = `${id}#reasonHarassmentTroll`; 97 + export const REASONHARASSMENTTROLL: string = `${id}#reasonHarassmentTroll`; 93 98 /** Targeted harassment */ 94 - export const REASONHARASSMENTTARGETED = `${id}#reasonHarassmentTargeted`; 99 + export const REASONHARASSMENTTARGETED: string = 100 + `${id}#reasonHarassmentTargeted`; 95 101 /** Hate speech */ 96 - export const REASONHARASSMENTHATESPEECH = `${id}#reasonHarassmentHateSpeech`; 102 + export const REASONHARASSMENTHATESPEECH: string = 103 + `${id}#reasonHarassmentHateSpeech`; 97 104 /** Doxxing */ 98 - export const REASONHARASSMENTDOXXING = `${id}#reasonHarassmentDoxxing`; 105 + export const REASONHARASSMENTDOXXING: string = `${id}#reasonHarassmentDoxxing`; 99 106 /** Other harassing or hateful content */ 100 - export const REASONHARASSMENTOTHER = `${id}#reasonHarassmentOther`; 107 + export const REASONHARASSMENTOTHER: string = `${id}#reasonHarassmentOther`; 101 108 /** Fake account or bot */ 102 - export const REASONMISLEADINGBOT = `${id}#reasonMisleadingBot`; 109 + export const REASONMISLEADINGBOT: string = `${id}#reasonMisleadingBot`; 103 110 /** Impersonation */ 104 - export const REASONMISLEADINGIMPERSONATION = 111 + export const REASONMISLEADINGIMPERSONATION: string = 105 112 `${id}#reasonMisleadingImpersonation`; 106 113 /** Spam */ 107 - export const REASONMISLEADINGSPAM = `${id}#reasonMisleadingSpam`; 114 + export const REASONMISLEADINGSPAM: string = `${id}#reasonMisleadingSpam`; 108 115 /** Scam */ 109 - export const REASONMISLEADINGSCAM = `${id}#reasonMisleadingScam`; 116 + export const REASONMISLEADINGSCAM: string = `${id}#reasonMisleadingScam`; 110 117 /** False information about elections */ 111 - export const REASONMISLEADINGELECTIONS = `${id}#reasonMisleadingElections`; 118 + export const REASONMISLEADINGELECTIONS: string = 119 + `${id}#reasonMisleadingElections`; 112 120 /** Other misleading content */ 113 - export const REASONMISLEADINGOTHER = `${id}#reasonMisleadingOther`; 121 + export const REASONMISLEADINGOTHER: string = `${id}#reasonMisleadingOther`; 114 122 /** Hacking or system attacks */ 115 - export const REASONRULESITESECURITY = `${id}#reasonRuleSiteSecurity`; 123 + export const REASONRULESITESECURITY: string = `${id}#reasonRuleSiteSecurity`; 116 124 /** Promoting or selling prohibited items or services */ 117 - export const REASONRULEPROHIBITEDSALES = `${id}#reasonRuleProhibitedSales`; 125 + export const REASONRULEPROHIBITEDSALES: string = 126 + `${id}#reasonRuleProhibitedSales`; 118 127 /** Banned user returning */ 119 - export const REASONRULEBANEVASION = `${id}#reasonRuleBanEvasion`; 128 + export const REASONRULEBANEVASION: string = `${id}#reasonRuleBanEvasion`; 120 129 /** Other */ 121 - export const REASONRULEOTHER = `${id}#reasonRuleOther`; 130 + export const REASONRULEOTHER: string = `${id}#reasonRuleOther`; 122 131 /** Content promoting or depicting self-harm */ 123 - export const REASONSELFHARMCONTENT = `${id}#reasonSelfHarmContent`; 132 + export const REASONSELFHARMCONTENT: string = `${id}#reasonSelfHarmContent`; 124 133 /** Eating disorders */ 125 - export const REASONSELFHARMED = `${id}#reasonSelfHarmED`; 134 + export const REASONSELFHARMED: string = `${id}#reasonSelfHarmED`; 126 135 /** Dangerous challenges or activities */ 127 - export const REASONSELFHARMSTUNTS = `${id}#reasonSelfHarmStunts`; 136 + export const REASONSELFHARMSTUNTS: string = `${id}#reasonSelfHarmStunts`; 128 137 /** Dangerous substances or drug abuse */ 129 - export const REASONSELFHARMSUBSTANCES = `${id}#reasonSelfHarmSubstances`; 138 + export const REASONSELFHARMSUBSTANCES: string = 139 + `${id}#reasonSelfHarmSubstances`; 130 140 /** Other dangerous content */ 131 - export const REASONSELFHARMOTHER = `${id}#reasonSelfHarmOther`; 141 + export const REASONSELFHARMOTHER: string = `${id}#reasonSelfHarmOther`;
+5 -4
lex/types/tools/ozone/safelink/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 27 28 28 29 const hashEvent = "event"; 29 30 30 - export function isEvent<V>(v: V) { 31 + export function isEvent<V>(v: V): v is Event & V { 31 32 return is$typed(v, id, hashEvent); 32 33 } 33 34 34 - export function validateEvent<V>(v: V) { 35 + export function validateEvent<V>(v: V): ValidationResult<Event & V> { 35 36 return validate<Event & V>(v, id, hashEvent); 36 37 } 37 38 ··· 76 77 77 78 const hashUrlRule = "urlRule"; 78 79 79 - export function isUrlRule<V>(v: V) { 80 + export function isUrlRule<V>(v: V): v is UrlRule & V { 80 81 return is$typed(v, id, hashUrlRule); 81 82 } 82 83 83 - export function validateUrlRule<V>(v: V) { 84 + export function validateUrlRule<V>(v: V): ValidationResult<UrlRule & V> { 84 85 return validate<UrlRule & V>(v, id, hashUrlRule); 85 86 }
+9 -4
lex/types/tools/ozone/server/getConfig.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 42 43 43 44 const hashServiceConfig = "serviceConfig"; 44 45 45 - export function isServiceConfig<V>(v: V) { 46 + export function isServiceConfig<V>(v: V): v is ServiceConfig & V { 46 47 return is$typed(v, id, hashServiceConfig); 47 48 } 48 49 49 - export function validateServiceConfig<V>(v: V) { 50 + export function validateServiceConfig<V>( 51 + v: V, 52 + ): ValidationResult<ServiceConfig & V> { 50 53 return validate<ServiceConfig & V>(v, id, hashServiceConfig); 51 54 } 52 55 ··· 62 65 63 66 const hashViewerConfig = "viewerConfig"; 64 67 65 - export function isViewerConfig<V>(v: V) { 68 + export function isViewerConfig<V>(v: V): v is ViewerConfig & V { 66 69 return is$typed(v, id, hashViewerConfig); 67 70 } 68 71 69 - export function validateViewerConfig<V>(v: V) { 72 + export function validateViewerConfig<V>( 73 + v: V, 74 + ): ValidationResult<ViewerConfig & V> { 70 75 return validate<ViewerConfig & V>(v, id, hashViewerConfig); 71 76 }
+5 -4
lex/types/tools/ozone/set/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 15 16 16 17 const hashSet = "set"; 17 18 18 - export function isSet<V>(v: V) { 19 + export function isSet<V>(v: V): v is Set & V { 19 20 return is$typed(v, id, hashSet); 20 21 } 21 22 22 - export function validateSet<V>(v: V) { 23 + export function validateSet<V>(v: V): ValidationResult<Set & V> { 23 24 return validate<Set & V>(v, id, hashSet); 24 25 } 25 26 ··· 34 35 35 36 const hashSetView = "setView"; 36 37 37 - export function isSetView<V>(v: V) { 38 + export function isSetView<V>(v: V): v is SetView & V { 38 39 return is$typed(v, id, hashSetView); 39 40 } 40 41 41 - export function validateSetView<V>(v: V) { 42 + export function validateSetView<V>(v: V): ValidationResult<SetView & V> { 42 43 return validate<SetView & V>(v, id, hashSetView); 43 44 }
+3 -2
lex/types/tools/ozone/setting/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 31 32 32 33 const hashOption = "option"; 33 34 34 - export function isOption<V>(v: V) { 35 + export function isOption<V>(v: V): v is Option & V { 35 36 return is$typed(v, id, hashOption); 36 37 } 37 38 38 - export function validateOption<V>(v: V) { 39 + export function validateOption<V>(v: V): ValidationResult<Option & V> { 39 40 return validate<Option & V>(v, id, hashOption); 40 41 }
+3 -2
lex/types/tools/ozone/signature/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 15 16 16 17 const hashSigDetail = "sigDetail"; 17 18 18 - export function isSigDetail<V>(v: V) { 19 + export function isSigDetail<V>(v: V): v is SigDetail & V { 19 20 return is$typed(v, id, hashSigDetail); 20 21 } 21 22 22 - export function validateSigDetail<V>(v: V) { 23 + export function validateSigDetail<V>(v: V): ValidationResult<SigDetail & V> { 23 24 return validate<SigDetail & V>(v, id, hashSigDetail); 24 25 }
+5 -2
lex/types/tools/ozone/signature/findRelatedAccounts.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ComAtprotoAdminDefs from "../../../com/atproto/admin/defs.ts"; 7 8 import type * as ToolsOzoneSignatureDefs from "./defs.ts"; ··· 44 45 45 46 const hashRelatedAccount = "relatedAccount"; 46 47 47 - export function isRelatedAccount<V>(v: V) { 48 + export function isRelatedAccount<V>(v: V): v is RelatedAccount & V { 48 49 return is$typed(v, id, hashRelatedAccount); 49 50 } 50 51 51 - export function validateRelatedAccount<V>(v: V) { 52 + export function validateRelatedAccount<V>( 53 + v: V, 54 + ): ValidationResult<RelatedAccount & V> { 52 55 return validate<RelatedAccount & V>(v, id, hashRelatedAccount); 53 56 }
+7 -6
lex/types/tools/ozone/team/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as AppBskyActorDefs from "../../../app/bsky/actor/defs.ts"; 7 8 ··· 26 27 27 28 const hashMember = "member"; 28 29 29 - export function isMember<V>(v: V) { 30 + export function isMember<V>(v: V): v is Member & V { 30 31 return is$typed(v, id, hashMember); 31 32 } 32 33 33 - export function validateMember<V>(v: V) { 34 + export function validateMember<V>(v: V): ValidationResult<Member & V> { 34 35 return validate<Member & V>(v, id, hashMember); 35 36 } 36 37 37 38 /** Admin role. Highest level of access, can perform all actions. */ 38 - export const ROLEADMIN = `${id}#roleAdmin`; 39 + export const ROLEADMIN: string = `${id}#roleAdmin`; 39 40 /** Moderator role. Can perform most actions. */ 40 - export const ROLEMODERATOR = `${id}#roleModerator`; 41 + export const ROLEMODERATOR: string = `${id}#roleModerator`; 41 42 /** Triage role. Mostly intended for monitoring and escalating issues. */ 42 - export const ROLETRIAGE = `${id}#roleTriage`; 43 + export const ROLETRIAGE: string = `${id}#roleTriage`; 43 44 /** Verifier role. Only allowed to issue verifications. */ 44 - export const ROLEVERIFIER = `${id}#roleVerifier`; 45 + export const ROLEVERIFIER: string = `${id}#roleVerifier`;
+5 -2
lex/types/tools/ozone/verification/defs.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { type $Typed, is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ToolsOzoneModerationDefs from "../moderation/defs.ts"; 7 8 ··· 43 44 44 45 const hashVerificationView = "verificationView"; 45 46 46 - export function isVerificationView<V>(v: V) { 47 + export function isVerificationView<V>(v: V): v is VerificationView & V { 47 48 return is$typed(v, id, hashVerificationView); 48 49 } 49 50 50 - export function validateVerificationView<V>(v: V) { 51 + export function validateVerificationView<V>( 52 + v: V, 53 + ): ValidationResult<VerificationView & V> { 51 54 return validate<VerificationView & V>(v, id, hashVerificationView); 52 55 }
+7 -4
lex/types/tools/ozone/verification/grantVerifications.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 import type * as ToolsOzoneVerificationDefs from "./defs.ts"; 7 8 ··· 52 53 53 54 const hashVerificationInput = "verificationInput"; 54 55 55 - export function isVerificationInput<V>(v: V) { 56 + export function isVerificationInput<V>(v: V): v is VerificationInput & V { 56 57 return is$typed(v, id, hashVerificationInput); 57 58 } 58 59 59 - export function validateVerificationInput<V>(v: V) { 60 + export function validateVerificationInput<V>( 61 + v: V, 62 + ): ValidationResult<VerificationInput & V> { 60 63 return validate<VerificationInput & V>(v, id, hashVerificationInput); 61 64 } 62 65 ··· 71 74 72 75 const hashGrantError = "grantError"; 73 76 74 - export function isGrantError<V>(v: V) { 77 + export function isGrantError<V>(v: V): v is GrantError & V { 75 78 return is$typed(v, id, hashGrantError); 76 79 } 77 80 78 - export function validateGrantError<V>(v: V) { 81 + export function validateGrantError<V>(v: V): ValidationResult<GrantError & V> { 79 82 return validate<GrantError & V>(v, id, hashGrantError); 80 83 }
+5 -2
lex/types/tools/ozone/verification/revokeVerifications.ts
··· 2 2 * GENERATED CODE - DO NOT MODIFY 3 3 */ 4 4 import { validate as _validate } from "../../../../lexicons.ts"; 5 + import type { ValidationResult } from "@atp/lexicon"; 5 6 import { is$typed as _is$typed } from "../../../../util.ts"; 6 7 7 8 const is$typed = _is$typed, validate = _validate; ··· 52 53 53 54 const hashRevokeError = "revokeError"; 54 55 55 - export function isRevokeError<V>(v: V) { 56 + export function isRevokeError<V>(v: V): v is RevokeError & V { 56 57 return is$typed(v, id, hashRevokeError); 57 58 } 58 59 59 - export function validateRevokeError<V>(v: V) { 60 + export function validateRevokeError<V>( 61 + v: V, 62 + ): ValidationResult<RevokeError & V> { 60 63 return validate<RevokeError & V>(v, id, hashRevokeError); 61 64 }