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(microcosm): pull latest Microcosm lexicons

Mary 9d2ac71c 4a9eab68

+284
+5
.changeset/pretty-kiwis-buy.md
··· 1 + --- 2 + '@atcute/microcosm': patch 3 + --- 4 + 5 + pull latest Microcosm lexicons
+81
packages/definitions/microcosm/lexicons-src/blue/microcosm/links/get-many-to-many.ts
··· 1 + import { 2 + array, 3 + document, 4 + integer, 5 + object, 6 + params, 7 + query, 8 + required, 9 + string, 10 + } from '@atcute/lexicon-doc/builder'; 11 + 12 + const linkRecord = object({ 13 + description: 'a record identifier consisting of a DID, collection, and record key', 14 + properties: { 15 + did: required(string({ format: 'did', description: "the DID of the linking record's repository" })), 16 + collection: required(string({ format: 'nsid', description: 'the collection of the linking record' })), 17 + rkey: required(string({ format: 'record-key' })), 18 + }, 19 + }); 20 + 21 + const item = object({ 22 + properties: { 23 + linkRecord: required(linkRecord), 24 + otherSubject: required(string({ description: 'the secondary subject from the link record' })), 25 + }, 26 + }); 27 + 28 + export default document({ 29 + id: 'blue.microcosm.links.getManyToMany', 30 + defs: { 31 + main: query({ 32 + description: 'Constellation: get records that link out to both a primary and secondary subject', 33 + parameters: params({ 34 + properties: { 35 + subject: required( 36 + string({ 37 + format: 'uri', 38 + description: 'the primary target being linked to (at-uri, did, or uri)', 39 + }), 40 + ), 41 + source: required( 42 + string({ 43 + description: 44 + "collection and path specification for the primary link (e.g., 'app.bsky.feed.like:subject.uri')", 45 + }), 46 + ), 47 + pathToOther: required( 48 + string({ 49 + description: "path to the secondary link in the many-to-many record (e.g., 'otherThing.uri')", 50 + }), 51 + ), 52 + linkDid: array({ 53 + description: 'filter linking records from specific users', 54 + items: string({ format: 'did' }), 55 + }), 56 + otherSubject: array({ 57 + description: 'filter secondary links to specific subjects', 58 + items: string(), 59 + }), 60 + limit: integer({ 61 + minimum: 1, 62 + maximum: 100, 63 + default: 16, 64 + description: 'number of results to return', 65 + }), 66 + }, 67 + }), 68 + output: { 69 + encoding: 'application/json', 70 + schema: object({ 71 + properties: { 72 + items: required(array({ items: item })), 73 + cursor: string(), 74 + }, 75 + }), 76 + }, 77 + }), 78 + item, 79 + linkRecord, 80 + }, 81 + });
+2
packages/definitions/microcosm/lib/lexicons/index.ts
··· 1 1 export * as BlueMicrocosmIdentityResolveMiniDoc from './types/blue/microcosm/identity/resolveMiniDoc.ts'; 2 + export * as BlueMicrocosmLinksGetBacklinkDids from './types/blue/microcosm/links/getBacklinkDids.ts'; 2 3 export * as BlueMicrocosmLinksGetBacklinks from './types/blue/microcosm/links/getBacklinks.ts'; 3 4 export * as BlueMicrocosmLinksGetBacklinksCount from './types/blue/microcosm/links/getBacklinksCount.ts'; 5 + export * as BlueMicrocosmLinksGetManyToMany from './types/blue/microcosm/links/getManyToMany.ts'; 4 6 export * as BlueMicrocosmLinksGetManyToManyCounts from './types/blue/microcosm/links/getManyToManyCounts.ts'; 5 7 export * as BlueMicrocosmRepoGetRecordByUri from './types/blue/microcosm/repo/getRecordByUri.ts'; 6 8 export * as ComBadExampleIdentityResolveMiniDoc from './types/com/bad-example/identity/resolveMiniDoc.ts';
+55
packages/definitions/microcosm/lib/lexicons/types/blue/microcosm/links/getBacklinkDids.ts
··· 1 + import type {} from '@atcute/lexicons'; 2 + import type {} from '@atcute/lexicons/ambient'; 3 + import * as v from '@atcute/lexicons/validations'; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.query('blue.microcosm.links.getBacklinkDids', { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * number of results to return 9 + * @minimum 1 10 + * @maximum 100 11 + * @default 16 12 + */ 13 + limit: /*#__PURE__*/ v.optional( 14 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(1, 100)]), 15 + 16, 16 + ), 17 + /** 18 + * collection and path specification (e.g., 'app.bsky.feed.like:subject.uri') 19 + */ 20 + source: /*#__PURE__*/ v.string(), 21 + /** 22 + * the target being linked to (at-uri, did, or uri) 23 + */ 24 + subject: /*#__PURE__*/ v.genericUriString(), 25 + }), 26 + output: { 27 + type: 'lex', 28 + schema: /*#__PURE__*/ v.object({ 29 + /** 30 + * pagination cursor 31 + */ 32 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 33 + linking_dids: /*#__PURE__*/ v.array(/*#__PURE__*/ v.didString()), 34 + /** 35 + * total number of matching links 36 + */ 37 + total: /*#__PURE__*/ v.integer(), 38 + }), 39 + }, 40 + }); 41 + 42 + type main$schematype = typeof _mainSchema; 43 + 44 + export interface mainSchema extends main$schematype {} 45 + 46 + export const mainSchema = _mainSchema as mainSchema; 47 + 48 + export interface $params extends v.InferInput<mainSchema['params']> {} 49 + export interface $output extends v.InferXRPCBodyInput<mainSchema['output']> {} 50 + 51 + declare module '@atcute/lexicons/ambient' { 52 + interface XRPCQueries { 53 + 'blue.microcosm.links.getBacklinkDids': mainSchema; 54 + } 55 + }
+93
packages/definitions/microcosm/lib/lexicons/types/blue/microcosm/links/getManyToMany.ts
··· 1 + import type {} from '@atcute/lexicons'; 2 + import type {} from '@atcute/lexicons/ambient'; 3 + import * as v from '@atcute/lexicons/validations'; 4 + 5 + const _itemSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blue.microcosm.links.getManyToMany#item')), 7 + get linkRecord() { 8 + return linkRecordSchema; 9 + }, 10 + /** 11 + * the secondary subject from the link record 12 + */ 13 + otherSubject: /*#__PURE__*/ v.string(), 14 + }); 15 + const _linkRecordSchema = /*#__PURE__*/ v.object({ 16 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('blue.microcosm.links.getManyToMany#linkRecord')), 17 + /** 18 + * the collection of the linking record 19 + */ 20 + collection: /*#__PURE__*/ v.nsidString(), 21 + /** 22 + * the DID of the linking record's repository 23 + */ 24 + did: /*#__PURE__*/ v.didString(), 25 + rkey: /*#__PURE__*/ v.recordKeyString(), 26 + }); 27 + const _mainSchema = /*#__PURE__*/ v.query('blue.microcosm.links.getManyToMany', { 28 + params: /*#__PURE__*/ v.object({ 29 + /** 30 + * number of results to return 31 + * @minimum 1 32 + * @maximum 100 33 + * @default 16 34 + */ 35 + limit: /*#__PURE__*/ v.optional( 36 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(1, 100)]), 37 + 16, 38 + ), 39 + /** 40 + * filter linking records from specific users 41 + */ 42 + linkDid: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(/*#__PURE__*/ v.didString())), 43 + /** 44 + * filter secondary links to specific subjects 45 + */ 46 + otherSubject: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(/*#__PURE__*/ v.string())), 47 + /** 48 + * path to the secondary link in the many-to-many record (e.g., 'otherThing.uri') 49 + */ 50 + pathToOther: /*#__PURE__*/ v.string(), 51 + /** 52 + * collection and path specification for the primary link (e.g., 'app.bsky.feed.like:subject.uri') 53 + */ 54 + source: /*#__PURE__*/ v.string(), 55 + /** 56 + * the primary target being linked to (at-uri, did, or uri) 57 + */ 58 + subject: /*#__PURE__*/ v.genericUriString(), 59 + }), 60 + output: { 61 + type: 'lex', 62 + schema: /*#__PURE__*/ v.object({ 63 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 64 + get items() { 65 + return /*#__PURE__*/ v.array(itemSchema); 66 + }, 67 + }), 68 + }, 69 + }); 70 + 71 + type item$schematype = typeof _itemSchema; 72 + type linkRecord$schematype = typeof _linkRecordSchema; 73 + type main$schematype = typeof _mainSchema; 74 + 75 + export interface itemSchema extends item$schematype {} 76 + export interface linkRecordSchema extends linkRecord$schematype {} 77 + export interface mainSchema extends main$schematype {} 78 + 79 + export const itemSchema = _itemSchema as itemSchema; 80 + export const linkRecordSchema = _linkRecordSchema as linkRecordSchema; 81 + export const mainSchema = _mainSchema as mainSchema; 82 + 83 + export interface Item extends v.InferInput<typeof itemSchema> {} 84 + export interface LinkRecord extends v.InferInput<typeof linkRecordSchema> {} 85 + 86 + export interface $params extends v.InferInput<mainSchema['params']> {} 87 + export interface $output extends v.InferXRPCBodyInput<mainSchema['output']> {} 88 + 89 + declare module '@atcute/lexicons/ambient' { 90 + interface XRPCQueries { 91 + 'blue.microcosm.links.getManyToMany': mainSchema; 92 + } 93 + }