a collection of lightweight TypeScript packages for AT Protocol, the protocol powering Bluesky
atproto bluesky typescript npm
101
fork

Configure Feed

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

chore: pull latest bluesky lexicons

Mary 298189fc 3a3174e1

+313 -102
+7
.changeset/hip-cycles-sell.md
··· 1 + --- 2 + '@atcute/bluesky': patch 3 + '@atcute/ozone': patch 4 + '@atcute/client': patch 5 + --- 6 + 7 + pull latest Bluesky lexicons
+1 -1
lexicons/README.md
··· 1 - https://github.com/bluesky-social/atproto/tree/44f81f2eb9229e21aec4472b3a05e855396dbec5/lexicons 1 + https://github.com/bluesky-social/atproto/tree/18fbfa00057dda9ef4eba77d8b4e87994893c952/lexicons
+2 -1
lexicons/app/bsky/embed/video.json
··· 9 9 "properties": { 10 10 "video": { 11 11 "type": "blob", 12 + "description": "The mp4 video file. May be up to 100mb, formerly limited to 50mb.", 12 13 "accept": ["video/mp4"], 13 - "maxSize": 50000000 14 + "maxSize": 100000000 14 15 }, 15 16 "captions": { 16 17 "type": "array",
+21
lexicons/app/bsky/labeler/defs.json
··· 35 35 "labels": { 36 36 "type": "array", 37 37 "items": { "type": "ref", "ref": "com.atproto.label.defs#label" } 38 + }, 39 + "reasonTypes": { 40 + "description": "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.", 41 + "type": "array", 42 + "items": { 43 + "type": "ref", 44 + "ref": "com.atproto.moderation.defs#reasonType" 45 + } 46 + }, 47 + "subjectTypes": { 48 + "description": "The set of subject types (account, record, etc) this service accepts reports on.", 49 + "type": "array", 50 + "items": { 51 + "type": "ref", 52 + "ref": "com.atproto.moderation.defs#subjectType" 53 + } 54 + }, 55 + "subjectCollections": { 56 + "type": "array", 57 + "description": "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.", 58 + "items": { "type": "string", "format": "nsid" } 38 59 } 39 60 } 40 61 },
+22 -1
lexicons/app/bsky/labeler/service.json
··· 18 18 "type": "union", 19 19 "refs": ["com.atproto.label.defs#selfLabels"] 20 20 }, 21 - "createdAt": { "type": "string", "format": "datetime" } 21 + "createdAt": { "type": "string", "format": "datetime" }, 22 + "reasonTypes": { 23 + "description": "The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.", 24 + "type": "array", 25 + "items": { 26 + "type": "ref", 27 + "ref": "com.atproto.moderation.defs#reasonType" 28 + } 29 + }, 30 + "subjectTypes": { 31 + "description": "The set of subject types (account, record, etc) this service accepts reports on.", 32 + "type": "array", 33 + "items": { 34 + "type": "ref", 35 + "ref": "com.atproto.moderation.defs#subjectType" 36 + } 37 + }, 38 + "subjectCollections": { 39 + "type": "array", 40 + "description": "Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.", 41 + "items": { "type": "string", "format": "nsid" } 42 + } 22 43 } 23 44 } 24 45 }
+22
lexicons/com/atproto/identity/defs.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "com.atproto.identity.defs", 4 + "defs": { 5 + "identityInfo": { 6 + "type": "object", 7 + "required": ["did", "handle", "didDoc"], 8 + "properties": { 9 + "did": { "type": "string", "format": "did" }, 10 + "handle": { 11 + "type": "string", 12 + "format": "handle", 13 + "description": "The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document." 14 + }, 15 + "didDoc": { 16 + "type": "unknown", 17 + "description": "The complete DID document for the identity." 18 + } 19 + } 20 + } 21 + } 22 + }
+44
lexicons/com/atproto/identity/refreshIdentity.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "com.atproto.identity.refreshIdentity", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server.", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": ["identifier"], 13 + "properties": { 14 + "identifier": { 15 + "type": "string", 16 + "format": "at-identifier" 17 + } 18 + } 19 + } 20 + }, 21 + "output": { 22 + "encoding": "application/json", 23 + "schema": { 24 + "type": "ref", 25 + "ref": "com.atproto.identity.defs#identityInfo" 26 + } 27 + }, 28 + "errors": [ 29 + { 30 + "name": "HandleNotFound", 31 + "description": "The resolution process confirmed that the handle does not resolve to any DID." 32 + }, 33 + { 34 + "name": "DidNotFound", 35 + "description": "The DID resolution process confirmed that there is no current DID." 36 + }, 37 + { 38 + "name": "DidDeactivated", 39 + "description": "The DID previously existed, but has been deactivated." 40 + } 41 + ] 42 + } 43 + } 44 + }
+44
lexicons/com/atproto/identity/resolveDid.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "com.atproto.identity.resolveDid", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "description": "Resolves DID to DID document. Does not bi-directionally verify handle.", 8 + "parameters": { 9 + "type": "params", 10 + "required": ["did"], 11 + "properties": { 12 + "did": { 13 + "type": "string", 14 + "format": "did", 15 + "description": "DID to resolve." 16 + } 17 + } 18 + }, 19 + "output": { 20 + "encoding": "application/json", 21 + "schema": { 22 + "type": "object", 23 + "required": ["didDoc"], 24 + "properties": { 25 + "didDoc": { 26 + "type": "unknown", 27 + "description": "The complete DID document for the identity." 28 + } 29 + } 30 + } 31 + }, 32 + "errors": [ 33 + { 34 + "name": "DidNotFound", 35 + "description": "The DID resolution process confirmed that there is no current DID." 36 + }, 37 + { 38 + "name": "DidDeactivated", 39 + "description": "The DID previously existed, but has been deactivated." 40 + } 41 + ] 42 + } 43 + } 44 + }
+8 -2
lexicons/com/atproto/identity/resolveHandle.json
··· 4 4 "defs": { 5 5 "main": { 6 6 "type": "query", 7 - "description": "Resolves a handle (domain name) to a DID.", 7 + "description": "Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document.", 8 8 "parameters": { 9 9 "type": "params", 10 10 "required": ["handle"], ··· 25 25 "did": { "type": "string", "format": "did" } 26 26 } 27 27 } 28 - } 28 + }, 29 + "errors": [ 30 + { 31 + "name": "HandleNotFound", 32 + "description": "The resolution process confirmed that the handle does not resolve to any DID." 33 + } 34 + ] 29 35 } 30 36 } 31 37 }
+42
lexicons/com/atproto/identity/resolveIdentity.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "com.atproto.identity.resolveIdentity", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "description": "Resolves an identity (DID or Handle) to a full identity (DID document and verified handle).", 8 + "parameters": { 9 + "type": "params", 10 + "required": ["identifier"], 11 + "properties": { 12 + "identifier": { 13 + "type": "string", 14 + "format": "at-identifier", 15 + "description": "Handle or DID to resolve." 16 + } 17 + } 18 + }, 19 + "output": { 20 + "encoding": "application/json", 21 + "schema": { 22 + "type": "ref", 23 + "ref": "com.atproto.identity.defs#identityInfo" 24 + } 25 + }, 26 + "errors": [ 27 + { 28 + "name": "HandleNotFound", 29 + "description": "The resolution process confirmed that the handle does not resolve to any DID." 30 + }, 31 + { 32 + "name": "DidNotFound", 33 + "description": "The DID resolution process confirmed that there is no current DID." 34 + }, 35 + { 36 + "name": "DidDeactivated", 37 + "description": "The DID previously existed, but has been deactivated." 38 + } 39 + ] 40 + } 41 + } 42 + }
+5
lexicons/com/atproto/moderation/defs.json
··· 41 41 "reasonAppeal": { 42 42 "type": "token", 43 43 "description": "Appeal: appeal a previously taken moderation action" 44 + }, 45 + "subjectType": { 46 + "type": "string", 47 + "description": "Tag describing a type of subject that might be reported.", 48 + "knownValues": ["account", "record", "chat"] 44 49 } 45 50 } 46 51 }
-8
lexicons/com/atproto/repo/listRecords.json
··· 27 27 "description": "The number of records to return." 28 28 }, 29 29 "cursor": { "type": "string" }, 30 - "rkeyStart": { 31 - "type": "string", 32 - "description": "DEPRECATED: The lowest sort-ordered rkey to start from (exclusive)" 33 - }, 34 - "rkeyEnd": { 35 - "type": "string", 36 - "description": "DEPRECATED: The highest sort-ordered rkey to stop at (exclusive)" 37 - }, 38 30 "reverse": { 39 31 "type": "boolean", 40 32 "description": "Flag to reverse the order of the returned records."
-5
lexicons/com/atproto/sync/getRecord.json
··· 19 19 "type": "string", 20 20 "description": "Record Key", 21 21 "format": "record-key" 22 - }, 23 - "commit": { 24 - "type": "string", 25 - "format": "cid", 26 - "description": "DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit" 27 22 } 28 23 } 29 24 },
+1 -1
lexicons/com/atproto/sync/notifyOfUpdate.json
··· 4 4 "defs": { 5 5 "main": { 6 6 "type": "procedure", 7 - "description": "Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay.", 7 + "description": "Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl", 8 8 "input": { 9 9 "encoding": "application/json", 10 10 "schema": {
+1 -34
lexicons/com/atproto/sync/subscribeRepos.json
··· 17 17 "message": { 18 18 "schema": { 19 19 "type": "union", 20 - "refs": ["#commit", "#sync", "#identity", "#account", "#handle", "#migrate", "#tombstone", "#info"] 20 + "refs": ["#commit", "#sync", "#identity", "#account", "#info"] 21 21 } 22 22 }, 23 23 "errors": [ ··· 168 168 "description": "If active=false, this optional field indicates a reason for why the account is not active.", 169 169 "knownValues": ["takendown", "suspended", "deleted", "deactivated", "desynchronized", "throttled"] 170 170 } 171 - } 172 - }, 173 - "handle": { 174 - "type": "object", 175 - "description": "DEPRECATED -- Use #identity event instead", 176 - "required": ["seq", "did", "handle", "time"], 177 - "properties": { 178 - "seq": { "type": "integer" }, 179 - "did": { "type": "string", "format": "did" }, 180 - "handle": { "type": "string", "format": "handle" }, 181 - "time": { "type": "string", "format": "datetime" } 182 - } 183 - }, 184 - "migrate": { 185 - "type": "object", 186 - "description": "DEPRECATED -- Use #account event instead", 187 - "required": ["seq", "did", "migrateTo", "time"], 188 - "nullable": ["migrateTo"], 189 - "properties": { 190 - "seq": { "type": "integer" }, 191 - "did": { "type": "string", "format": "did" }, 192 - "migrateTo": { "type": "string" }, 193 - "time": { "type": "string", "format": "datetime" } 194 - } 195 - }, 196 - "tombstone": { 197 - "type": "object", 198 - "description": "DEPRECATED -- Use #account event instead", 199 - "required": ["seq", "did", "time"], 200 - "properties": { 201 - "seq": { "type": "integer" }, 202 - "did": { "type": "string", "format": "did" }, 203 - "time": { "type": "string", "format": "datetime" } 204 171 } 205 172 }, 206 173 "info": {
+3
lexicons/tools/ozone/team/listMembers.json
··· 8 8 "parameters": { 9 9 "type": "params", 10 10 "properties": { 11 + "q": { 12 + "type": "string" 13 + }, 11 14 "disabled": { 12 15 "type": "boolean" 13 16 },
+76 -49
packages/core/client/lib/lexicons.ts
··· 277 277 } 278 278 } 279 279 280 + export declare namespace ComAtprotoIdentityDefs { 281 + interface IdentityInfo { 282 + [Brand.Type]?: 'com.atproto.identity.defs#identityInfo'; 283 + did: At.DID; 284 + /** The complete DID document for the identity. */ 285 + didDoc: unknown; 286 + /** The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document. */ 287 + handle: At.Handle; 288 + } 289 + } 290 + 280 291 /** Describe the credentials that should be included in the DID doc of an account that is migrating to this service. */ 281 292 export declare namespace ComAtprotoIdentityGetRecommendedDidCredentials { 282 293 interface Params {} ··· 290 301 } 291 302 } 292 303 304 + /** Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server. */ 305 + export declare namespace ComAtprotoIdentityRefreshIdentity { 306 + interface Params {} 307 + interface Input { 308 + identifier: string; 309 + } 310 + type Output = ComAtprotoIdentityDefs.IdentityInfo; 311 + interface Errors { 312 + HandleNotFound: {}; 313 + DidNotFound: {}; 314 + DidDeactivated: {}; 315 + } 316 + } 317 + 293 318 /** Request an email with a code to in order to request a signed PLC operation. Requires Auth. */ 294 319 export declare namespace ComAtprotoIdentityRequestPlcOperationSignature { 295 320 interface Params {} ··· 297 322 type Output = undefined; 298 323 } 299 324 300 - /** Resolves a handle (domain name) to a DID. */ 325 + /** Resolves DID to DID document. Does not bi-directionally verify handle. */ 326 + export declare namespace ComAtprotoIdentityResolveDid { 327 + interface Params { 328 + /** DID to resolve. */ 329 + did: At.DID; 330 + } 331 + type Input = undefined; 332 + interface Output { 333 + /** The complete DID document for the identity. */ 334 + didDoc: unknown; 335 + } 336 + interface Errors { 337 + DidNotFound: {}; 338 + DidDeactivated: {}; 339 + } 340 + } 341 + 342 + /** Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document. */ 301 343 export declare namespace ComAtprotoIdentityResolveHandle { 302 344 interface Params { 303 345 /** The handle to resolve. */ ··· 306 348 type Input = undefined; 307 349 interface Output { 308 350 did: At.DID; 351 + } 352 + interface Errors { 353 + HandleNotFound: {}; 354 + } 355 + } 356 + 357 + /** Resolves an identity (DID or Handle) to a full identity (DID document and verified handle). */ 358 + export declare namespace ComAtprotoIdentityResolveIdentity { 359 + interface Params { 360 + /** Handle or DID to resolve. */ 361 + identifier: string; 362 + } 363 + type Input = undefined; 364 + type Output = ComAtprotoIdentityDefs.IdentityInfo; 365 + interface Errors { 366 + HandleNotFound: {}; 367 + DidNotFound: {}; 368 + DidDeactivated: {}; 309 369 } 310 370 } 311 371 ··· 530 590 | 'com.atproto.moderation.defs#reasonViolation' 531 591 | (string & {}); 532 592 type ReasonViolation = 'com.atproto.moderation.defs#reasonViolation'; 593 + /** Tag describing a type of subject that might be reported. */ 594 + type SubjectType = 'account' | 'chat' | 'record' | (string & {}); 533 595 } 534 596 535 597 /** Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS. */ ··· 737 799 limit?: number; 738 800 /** Flag to reverse the order of the returned records. */ 739 801 reverse?: boolean; 740 - /** 741 - * DEPRECATED: The highest sort-ordered rkey to stop at (exclusive) 742 - * @deprecated 743 - */ 744 - rkeyEnd?: string; 745 - /** 746 - * DEPRECATED: The lowest sort-ordered rkey to start from (exclusive) 747 - * @deprecated 748 - */ 749 - rkeyStart?: string; 750 802 } 751 803 type Input = undefined; 752 804 interface Output { ··· 1322 1374 did: At.DID; 1323 1375 /** Record Key */ 1324 1376 rkey: string; 1325 - /** 1326 - * DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit 1327 - * @deprecated 1328 - */ 1329 - commit?: At.CID; 1330 1377 } 1331 1378 type Input = undefined; 1332 1379 type Output = Uint8Array; ··· 1471 1518 } 1472 1519 } 1473 1520 1474 - /** Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. */ 1521 + /** Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl */ 1475 1522 export declare namespace ComAtprotoSyncNotifyOfUpdate { 1476 1523 interface Params {} 1477 1524 interface Input { ··· 1550 1597 /** The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose. */ 1551 1598 prevData?: At.CIDLink; 1552 1599 } 1553 - /** 1554 - * DEPRECATED -- Use #identity event instead 1555 - * @deprecated 1556 - */ 1557 - interface Handle { 1558 - [Brand.Type]?: 'com.atproto.sync.subscribeRepos#handle'; 1559 - did: At.DID; 1560 - handle: At.Handle; 1561 - seq: number; 1562 - time: string; 1563 - } 1564 1600 /** Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache. */ 1565 1601 interface Identity { 1566 1602 [Brand.Type]?: 'com.atproto.sync.subscribeRepos#identity'; ··· 1575 1611 name: 'OutdatedCursor' | (string & {}); 1576 1612 message?: string; 1577 1613 } 1578 - /** 1579 - * DEPRECATED -- Use #account event instead 1580 - * @deprecated 1581 - */ 1582 - interface Migrate { 1583 - [Brand.Type]?: 'com.atproto.sync.subscribeRepos#migrate'; 1584 - did: At.DID; 1585 - migrateTo: string | null; 1586 - seq: number; 1587 - time: string; 1588 - } 1589 1614 /** A repo operation, ie a mutation of a single record. */ 1590 1615 interface RepoOp { 1591 1616 [Brand.Type]?: 'com.atproto.sync.subscribeRepos#repoOp'; ··· 1610 1635 /** Timestamp of when this message was originally broadcast. */ 1611 1636 time: string; 1612 1637 } 1613 - /** 1614 - * DEPRECATED -- Use #account event instead 1615 - * @deprecated 1616 - */ 1617 - interface Tombstone { 1618 - [Brand.Type]?: 'com.atproto.sync.subscribeRepos#tombstone'; 1619 - did: At.DID; 1620 - seq: number; 1621 - time: string; 1622 - } 1623 1638 } 1624 1639 1625 1640 /** Add a handle to the set of reserved handles. */ ··· 1699 1714 'com.atproto.identity.getRecommendedDidCredentials': { 1700 1715 output: ComAtprotoIdentityGetRecommendedDidCredentials.Output; 1701 1716 }; 1717 + 'com.atproto.identity.resolveDid': { 1718 + params: ComAtprotoIdentityResolveDid.Params; 1719 + output: ComAtprotoIdentityResolveDid.Output; 1720 + }; 1702 1721 'com.atproto.identity.resolveHandle': { 1703 1722 params: ComAtprotoIdentityResolveHandle.Params; 1704 1723 output: ComAtprotoIdentityResolveHandle.Output; 1724 + }; 1725 + 'com.atproto.identity.resolveIdentity': { 1726 + params: ComAtprotoIdentityResolveIdentity.Params; 1727 + output: ComAtprotoIdentityResolveIdentity.Output; 1705 1728 }; 1706 1729 'com.atproto.label.queryLabels': { 1707 1730 params: ComAtprotoLabelQueryLabels.Params; ··· 1825 1848 'com.atproto.admin.updateSubjectStatus': { 1826 1849 input: ComAtprotoAdminUpdateSubjectStatus.Input; 1827 1850 output: ComAtprotoAdminUpdateSubjectStatus.Output; 1851 + }; 1852 + 'com.atproto.identity.refreshIdentity': { 1853 + input: ComAtprotoIdentityRefreshIdentity.Input; 1854 + output: ComAtprotoIdentityRefreshIdentity.Output; 1828 1855 }; 1829 1856 'com.atproto.identity.requestPlcOperationSignature': {}; 1830 1857 'com.atproto.identity.signPlcOperation': {
+13
packages/definitions/bluesky/lib/lexicons.ts
··· 567 567 namespace AppBskyEmbedVideo { 568 568 interface Main { 569 569 [Brand.Type]?: 'app.bsky.embed.video'; 570 + /** The mp4 video file. May be up to 100mb, formerly limited to 50mb. */ 570 571 video: At.Blob; 571 572 /** 572 573 * Alt text description of the video, for accessibility. \ ··· 1933 1934 labels?: ComAtprotoLabelDefs.Label[]; 1934 1935 /** Minimum: 0 */ 1935 1936 likeCount?: number; 1937 + /** The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. */ 1938 + reasonTypes?: ComAtprotoModerationDefs.ReasonType[]; 1939 + /** Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. */ 1940 + subjectCollections?: string[]; 1941 + /** The set of subject types (account, record, etc) this service accepts reports on. */ 1942 + subjectTypes?: ComAtprotoModerationDefs.SubjectType[]; 1936 1943 viewer?: LabelerViewerState; 1937 1944 } 1938 1945 interface LabelerViewerState { ··· 1961 1968 createdAt: string; 1962 1969 policies: AppBskyLabelerDefs.LabelerPolicies; 1963 1970 labels?: Brand.Union<ComAtprotoLabelDefs.SelfLabels>; 1971 + /** The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. */ 1972 + reasonTypes?: ComAtprotoModerationDefs.ReasonType[]; 1973 + /** Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. */ 1974 + subjectCollections?: string[]; 1975 + /** The set of subject types (account, record, etc) this service accepts reports on. */ 1976 + subjectTypes?: ComAtprotoModerationDefs.SubjectType[]; 1964 1977 } 1965 1978 } 1966 1979
+1
packages/definitions/ozone/lib/lexicons.ts
··· 1167 1167 * @default 50 1168 1168 */ 1169 1169 limit?: number; 1170 + q?: string; 1170 1171 roles?: string[]; 1171 1172 } 1172 1173 type Input = undefined;