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.

fix(microcosm): account for cursor being nullable

closes https://github.com/mary-ext/atcute/issues/49

Mary 0fc9ee7d db0fad33

+40 -16
+5
.changeset/gold-teams-fold.md
··· 1 + --- 2 + '@atcute/microcosm': patch 3 + --- 4 + 5 + account for cursor being nullable
+2 -1
packages/definitions/microcosm/lexicons-src/blue/microcosm/links/get-backlinks.ts
··· 2 2 array, 3 3 document, 4 4 integer, 5 + nullable, 5 6 object, 6 7 params, 7 8 query, ··· 51 52 properties: { 52 53 total: required(integer({ description: 'total number of matching links' })), 53 54 records: required(array({ items: linkRecord })), 54 - cursor: string({ description: 'pagination cursor' }), 55 + cursor: nullable(string({ description: 'pagination cursor' })), 55 56 }, 56 57 }), 57 58 },
+8 -2
packages/definitions/microcosm/lexicons-src/blue/microcosm/links/get-many-to-many-counts.ts
··· 2 2 array, 3 3 document, 4 4 integer, 5 + nullable, 5 6 object, 6 7 params, 7 8 query, ··· 31 32 description: 'the primary target being linked to (at-uri, did, or uri)', 32 33 }), 33 34 ), 34 - source: required(string({ description: 'collection and path specification for the primary link' })), 35 + source: required( 36 + string({ 37 + description: 38 + "collection and path specification for the primary link (e.g., 'app.bsky.feed.like:subject.uri')", 39 + }), 40 + ), 35 41 pathToOther: required( 36 42 string({ 37 43 description: "path to the secondary link in the many-to-many record (e.g., 'otherThing.uri')", ··· 58 64 schema: object({ 59 65 properties: { 60 66 counts_by_other_subject: required(array({ items: countBySubject })), 61 - cursor: string({ description: 'pagination cursor' }), 67 + cursor: nullable(string({ description: 'pagination cursor' })), 62 68 }, 63 69 }), 64 70 },
+4 -3
packages/definitions/microcosm/lexicons-src/blue/microcosm/links/get-many-to-many.ts
··· 2 2 array, 3 3 document, 4 4 integer, 5 + nullable, 5 6 object, 6 7 params, 7 8 query, ··· 10 11 } from '@atcute/lexicon-doc/builder'; 11 12 12 13 const linkRecord = object({ 13 - description: 'a record identifier consisting of a DID, collection, and record key', 14 + description: 'a record linking to the subject', 14 15 properties: { 15 16 did: required(string({ format: 'did', description: "the DID of the linking record's repository" })), 16 17 collection: required(string({ format: 'nsid', description: 'the collection of the linking record' })), 17 - rkey: required(string({ format: 'record-key' })), 18 + rkey: required(string({ format: 'record-key', description: 'the record key of the linking record' })), 18 19 }, 19 20 }); 20 21 ··· 70 71 schema: object({ 71 72 properties: { 72 73 items: required(array({ items: item })), 73 - cursor: string(), 74 + cursor: nullable(string({ description: 'pagination cursor' })), 74 75 }, 75 76 }), 76 77 },
+1 -1
packages/definitions/microcosm/lib/lexicons/types/blue/microcosm/links/getBacklinkDids.ts
··· 29 29 /** 30 30 * pagination cursor 31 31 */ 32 - cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 32 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nullable(/*#__PURE__*/ v.string())), 33 33 linking_dids: /*#__PURE__*/ v.array(/*#__PURE__*/ v.didString()), 34 34 /** 35 35 * total number of matching links
+1 -1
packages/definitions/microcosm/lib/lexicons/types/blue/microcosm/links/getBacklinks.ts
··· 48 48 /** 49 49 * pagination cursor 50 50 */ 51 - cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 51 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nullable(/*#__PURE__*/ v.string())), 52 52 get records() { 53 53 return /*#__PURE__*/ v.array(linkRecordSchema); 54 54 },
+2 -2
packages/definitions/microcosm/lib/lexicons/types/blue/microcosm/links/getBacklinksCount.ts
··· 5 5 const _mainSchema = /*#__PURE__*/ v.query('blue.microcosm.links.getBacklinksCount', { 6 6 params: /*#__PURE__*/ v.object({ 7 7 /** 8 - * collection and path specification for the primary link 8 + * collection and path specification (e.g., 'app.bsky.feed.like:subject.uri') 9 9 */ 10 10 source: /*#__PURE__*/ v.string(), 11 11 /** 12 12 * the target being linked to (at-uri, did, or uri) 13 13 */ 14 - subject: /*#__PURE__*/ v.resourceUriString(), 14 + subject: /*#__PURE__*/ v.genericUriString(), 15 15 }), 16 16 output: { 17 17 type: 'lex',
+7 -1
packages/definitions/microcosm/lib/lexicons/types/blue/microcosm/links/getManyToMany.ts
··· 22 22 * the DID of the linking record's repository 23 23 */ 24 24 did: /*#__PURE__*/ v.didString(), 25 + /** 26 + * the record key of the linking record 27 + */ 25 28 rkey: /*#__PURE__*/ v.recordKeyString(), 26 29 }); 27 30 const _mainSchema = /*#__PURE__*/ v.query('blue.microcosm.links.getManyToMany', { ··· 60 63 output: { 61 64 type: 'lex', 62 65 schema: /*#__PURE__*/ v.object({ 63 - cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 66 + /** 67 + * pagination cursor 68 + */ 69 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nullable(/*#__PURE__*/ v.string())), 64 70 get items() { 65 71 return /*#__PURE__*/ v.array(itemSchema); 66 72 },
+2 -2
packages/definitions/microcosm/lib/lexicons/types/blue/microcosm/links/getManyToManyCounts.ts
··· 44 44 */ 45 45 pathToOther: /*#__PURE__*/ v.string(), 46 46 /** 47 - * collection and path specification for the primary link 47 + * collection and path specification for the primary link (e.g., 'app.bsky.feed.like:subject.uri') 48 48 */ 49 49 source: /*#__PURE__*/ v.string(), 50 50 /** ··· 61 61 /** 62 62 * pagination cursor 63 63 */ 64 - cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 64 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.nullable(/*#__PURE__*/ v.string())), 65 65 }), 66 66 }, 67 67 });