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: fmt

Mary 0983c2d4 4eb36d4c

+55 -34
+9 -3
packages/definitions/microcosm/lexicons-src/blue/microcosm/links/get-backlinks.ts
··· 12 12 const linkRecord = object({ 13 13 description: 'a record linking to the subject', 14 14 properties: { 15 - did: required(string({ format: 'did', description: 'the DID of the linking record\'s repository' })), 15 + did: required(string({ format: 'did', description: "the DID of the linking record's repository" })), 16 16 collection: required(string({ format: 'nsid', description: 'the collection of the linking record' })), 17 17 rkey: required(string({ format: 'record-key', description: 'the record key of the linking record' })), 18 18 }, ··· 25 25 description: 'a list of records linking to any record, identity, or uri', 26 26 parameters: params({ 27 27 properties: { 28 - subject: required(string({ format: 'uri', description: 'the target being linked to (at-uri, did, or uri)' })), 29 - source: required(string({ description: 'collection and path specification (e.g., \'app.bsky.feed.like:subject.uri\')' })), 28 + subject: required( 29 + string({ format: 'uri', description: 'the target being linked to (at-uri, did, or uri)' }), 30 + ), 31 + source: required( 32 + string({ 33 + description: "collection and path specification (e.g., 'app.bsky.feed.like:subject.uri')", 34 + }), 35 + ), 30 36 did: array({ 31 37 description: 'filter links to those from specific users', 32 38 items: string({ format: 'did' }),
+11 -2
packages/definitions/microcosm/lexicons-src/blue/microcosm/links/get-many-to-many-counts.ts
··· 25 25 description: 'count many-to-many relationships with secondary link paths', 26 26 parameters: params({ 27 27 properties: { 28 - subject: required(string({ format: 'uri', description: 'the primary target being linked to (at-uri, did, or uri)' })), 28 + subject: required( 29 + string({ 30 + format: 'uri', 31 + description: 'the primary target being linked to (at-uri, did, or uri)', 32 + }), 33 + ), 29 34 source: required(string({ description: 'collection and path specification for the primary link' })), 30 - pathToOther: required(string({ description: 'path to the secondary link in the many-to-many record (e.g., \'otherThing.uri\')' })), 35 + pathToOther: required( 36 + string({ 37 + description: "path to the secondary link in the many-to-many record (e.g., 'otherThing.uri')", 38 + }), 39 + ), 31 40 did: array({ 32 41 description: 'filter links to those from specific users', 33 42 items: string({ format: 'did' }),
+17 -12
packages/definitions/microcosm/lexicons-src/com/bad-example/identity/resolve-mini-doc.ts
··· 1 - import { 2 - document, 3 - object, 4 - params, 5 - query, 6 - required, 7 - string, 8 - } from '@atcute/lexicon-doc/builder'; 1 + import { document, object, params, query, required, string } from '@atcute/lexicon-doc/builder'; 9 2 10 3 export default document({ 11 4 id: 'com.bad-example.identity.resolveMiniDoc', 12 5 defs: { 13 6 main: query({ 14 - description: 'like com.atproto.identity.resolveIdentity but instead of the full didDoc it returns an atproto-relevant subset', 7 + description: 8 + 'like com.atproto.identity.resolveIdentity but instead of the full didDoc it returns an atproto-relevant subset', 15 9 parameters: params({ 16 10 properties: { 17 11 identifier: required(string({ format: 'at-identifier', description: 'handle or DID to resolve' })), ··· 21 15 encoding: 'application/json', 22 16 schema: object({ 23 17 properties: { 24 - did: required(string({ format: 'did', description: 'DID, bi-directionally verified if a handle was provided in the query' })), 25 - handle: required(string({ format: 'handle', description: 'the validated handle of the account or \'handle.invalid\' if the handle did not bi-directionally match the DID document' })), 26 - pds: required(string({ format: 'uri', description: 'the identity\'s PDS URL' })), 18 + did: required( 19 + string({ 20 + format: 'did', 21 + description: 'DID, bi-directionally verified if a handle was provided in the query', 22 + }), 23 + ), 24 + handle: required( 25 + string({ 26 + format: 'handle', 27 + description: 28 + "the validated handle of the account or 'handle.invalid' if the handle did not bi-directionally match the DID document", 29 + }), 30 + ), 31 + pds: required(string({ format: 'uri', description: "the identity's PDS URL" })), 27 32 signing_key: required(string({ description: 'the atproto signing key publicKeyMultibase' })), 28 33 }, 29 34 }),
+14 -12
packages/definitions/microcosm/lexicons-src/com/bad-example/repo/get-uri-record.ts
··· 1 - import { 2 - document, 3 - object, 4 - params, 5 - query, 6 - required, 7 - string, 8 - unknown, 9 - } from '@atcute/lexicon-doc/builder'; 1 + import { document, object, params, query, required, string, unknown } from '@atcute/lexicon-doc/builder'; 10 2 11 3 export default document({ 12 4 id: 'com.bad-example.repo.getUriRecord', 13 5 defs: { 14 6 main: query({ 15 - description: 'ergonomic complement to com.atproto.repo.getRecord which accepts an at-uri instead of individual repo/collection/rkey params', 7 + description: 8 + 'ergonomic complement to com.atproto.repo.getRecord which accepts an at-uri instead of individual repo/collection/rkey params', 16 9 parameters: params({ 17 10 properties: { 18 - at_uri: required(string({ format: 'at-uri', description: 'the at-uri of the record (identifier can be a DID or handle)' })), 19 - cid: string({ format: 'cid', description: 'optional CID of the version of the record. if not specified, return the most recent version. if specified and a newer version exists, returns 404.' }), 11 + at_uri: required( 12 + string({ 13 + format: 'at-uri', 14 + description: 'the at-uri of the record (identifier can be a DID or handle)', 15 + }), 16 + ), 17 + cid: string({ 18 + format: 'cid', 19 + description: 20 + 'optional CID of the version of the record. if not specified, return the most recent version. if specified and a newer version exists, returns 404.', 21 + }), 20 22 }, 21 23 }), 22 24 output: {
+1 -4
packages/definitions/microcosm/tsconfig.json
··· 1 1 { 2 2 "files": [], 3 - "references": [ 4 - { "path": "./tsconfig.lib.json" }, 5 - { "path": "./tsconfig.lexicons.json" } 6 - ] 3 + "references": [{ "path": "./tsconfig.lib.json" }, { "path": "./tsconfig.lexicons.json" }] 7 4 }
+3 -1
packages/lexicons/lex-cli/src/lexicon-loader.ts
··· 115 115 116 116 const defaultExport = (mod as any)?.default; 117 117 if (!isLexDocumentBuilder(defaultExport)) { 118 - console.error(pc.bold(pc.red(`module "${relativePath}" default export is not a valid LexDocumentBuilder`))); 118 + console.error( 119 + pc.bold(pc.red(`module "${relativePath}" default export is not a valid LexDocumentBuilder`)), 120 + ); 119 121 console.error(`expected default export to be a LexDocumentBuilder (object with 'id' and 'defs')`); 120 122 process.exit(1); 121 123 }