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(frontpage): pull latest Frontpage lexicons

Mary 82761dfa 5e638d54

+358 -1
+5
.changeset/whole-beans-rest.md
··· 1 + --- 2 + '@atcute/frontpage': patch 3 + --- 4 + 5 + pull latest Frontpage lexicons
+1 -1
packages/definitions/frontpage/lexicons/README.md
··· 3 3 this directory contains lexicon documents pulled from the following sources: 4 4 5 5 - https://github.com/frontpagefyi/frontpage.git 6 - - commit: b8c3431c11f009d381a89f89c254c34f9e0e342c 6 + - commit: cd1340292fb16d53c98eb7255b05043668ea60e7
+55
packages/definitions/frontpage/lexicons/fyi/frontpage/feed/describeFeedGenerator.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "fyi.frontpage.feed.describeFeedGenerator", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "description": "Returns information about a feed generator service, including which feeds it provides.", 8 + "output": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": ["did", "feeds"], 13 + "properties": { 14 + "did": { 15 + "type": "string", 16 + "format": "did" 17 + }, 18 + "feeds": { 19 + "type": "array", 20 + "items": { 21 + "type": "ref", 22 + "ref": "#feed" 23 + } 24 + }, 25 + "links": { 26 + "type": "ref", 27 + "ref": "#links" 28 + } 29 + } 30 + } 31 + } 32 + }, 33 + "feed": { 34 + "type": "object", 35 + "required": ["uri"], 36 + "properties": { 37 + "uri": { 38 + "type": "string", 39 + "format": "at-uri" 40 + } 41 + } 42 + }, 43 + "links": { 44 + "type": "object", 45 + "properties": { 46 + "privacyPolicy": { 47 + "type": "string" 48 + }, 49 + "termsOfService": { 50 + "type": "string" 51 + } 52 + } 53 + } 54 + } 55 + }
+49
packages/definitions/frontpage/lexicons/fyi/frontpage/feed/generator.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "fyi.frontpage.feed.generator", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "description": "Record declaring a feed generator. The did field points to the service that runs the feed algorithm.", 8 + "key": "any", 9 + "record": { 10 + "type": "object", 11 + "required": ["did", "displayName", "createdAt"], 12 + "properties": { 13 + "did": { 14 + "type": "string", 15 + "format": "did", 16 + "description": "DID of the feed generator service." 17 + }, 18 + "displayName": { 19 + "type": "string", 20 + "maxLength": 320, 21 + "maxGraphemes": 32, 22 + "description": "Display name for the feed." 23 + }, 24 + "description": { 25 + "type": "string", 26 + "maxLength": 3000, 27 + "maxGraphemes": 300, 28 + "description": "Description of the feed." 29 + }, 30 + "avatar": { 31 + "type": "blob", 32 + "accept": ["image/png", "image/jpeg"], 33 + "maxSize": 1000000, 34 + "description": "Avatar image for the feed." 35 + }, 36 + "acceptsInteractions": { 37 + "type": "boolean", 38 + "description": "Whether the feed generator accepts interaction feedback." 39 + }, 40 + "createdAt": { 41 + "type": "string", 42 + "format": "datetime", 43 + "description": "Client-declared timestamp when this generator was created." 44 + } 45 + } 46 + } 47 + } 48 + } 49 + }
+67
packages/definitions/frontpage/lexicons/fyi/frontpage/feed/getFeedSkeleton.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "fyi.frontpage.feed.getFeedSkeleton", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "description": "Get a skeleton of a feed provided by a feed generator. Auth is optional, but may be required by the feed generator.", 8 + "parameters": { 9 + "type": "params", 10 + "required": ["feed"], 11 + "properties": { 12 + "feed": { 13 + "type": "string", 14 + "format": "at-uri", 15 + "description": "AT URI of the feed generator record." 16 + }, 17 + "limit": { 18 + "type": "integer", 19 + "minimum": 1, 20 + "maximum": 100, 21 + "default": 50, 22 + "description": "Maximum number of items to return." 23 + }, 24 + "cursor": { 25 + "type": "string", 26 + "description": "Pagination cursor." 27 + } 28 + } 29 + }, 30 + "output": { 31 + "encoding": "application/json", 32 + "schema": { 33 + "type": "object", 34 + "required": ["feed"], 35 + "properties": { 36 + "cursor": { 37 + "type": "string" 38 + }, 39 + "feed": { 40 + "type": "array", 41 + "items": { 42 + "type": "ref", 43 + "ref": "#skeletonFeedPost" 44 + } 45 + } 46 + } 47 + } 48 + }, 49 + "errors": [ 50 + { 51 + "name": "UnknownFeed" 52 + } 53 + ] 54 + }, 55 + "skeletonFeedPost": { 56 + "type": "object", 57 + "required": ["post"], 58 + "properties": { 59 + "post": { 60 + "type": "string", 61 + "format": "at-uri", 62 + "description": "AT URI of the post." 63 + } 64 + } 65 + } 66 + } 67 + }
+3
packages/definitions/frontpage/lib/lexicons/index.ts
··· 1 1 export * as FyiFrontpageFeedComment from './types/fyi/frontpage/feed/comment.ts'; 2 + export * as FyiFrontpageFeedDescribeFeedGenerator from './types/fyi/frontpage/feed/describeFeedGenerator.ts'; 3 + export * as FyiFrontpageFeedGenerator from './types/fyi/frontpage/feed/generator.ts'; 4 + export * as FyiFrontpageFeedGetFeedSkeleton from './types/fyi/frontpage/feed/getFeedSkeleton.ts'; 2 5 export * as FyiFrontpageFeedPost from './types/fyi/frontpage/feed/post.ts'; 3 6 export * as FyiFrontpageFeedVote from './types/fyi/frontpage/feed/vote.ts'; 4 7 export * as FyiFrontpageRichtextBlock from './types/fyi/frontpage/richtext/block.ts';
+52
packages/definitions/frontpage/lib/lexicons/types/fyi/frontpage/feed/describeFeedGenerator.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 _feedSchema = /*#__PURE__*/ v.object({ 6 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('fyi.frontpage.feed.describeFeedGenerator#feed')), 7 + uri: /*#__PURE__*/ v.resourceUriString(), 8 + }); 9 + const _linksSchema = /*#__PURE__*/ v.object({ 10 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('fyi.frontpage.feed.describeFeedGenerator#links')), 11 + privacyPolicy: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 12 + termsOfService: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 13 + }); 14 + const _mainSchema = /*#__PURE__*/ v.query('fyi.frontpage.feed.describeFeedGenerator', { 15 + params: null, 16 + output: { 17 + type: 'lex', 18 + schema: /*#__PURE__*/ v.object({ 19 + did: /*#__PURE__*/ v.didString(), 20 + get feeds() { 21 + return /*#__PURE__*/ v.array(feedSchema); 22 + }, 23 + get links() { 24 + return /*#__PURE__*/ v.optional(linksSchema); 25 + }, 26 + }), 27 + }, 28 + }); 29 + 30 + type feed$schematype = typeof _feedSchema; 31 + type links$schematype = typeof _linksSchema; 32 + type main$schematype = typeof _mainSchema; 33 + 34 + export interface feedSchema extends feed$schematype {} 35 + export interface linksSchema extends links$schematype {} 36 + export interface mainSchema extends main$schematype {} 37 + 38 + export const feedSchema = _feedSchema as feedSchema; 39 + export const linksSchema = _linksSchema as linksSchema; 40 + export const mainSchema = _mainSchema as mainSchema; 41 + 42 + export interface Feed extends v.InferInput<typeof feedSchema> {} 43 + export interface Links extends v.InferInput<typeof linksSchema> {} 44 + 45 + export interface $params {} 46 + export interface $output extends v.InferXRPCBodyInput<mainSchema['output']> {} 47 + 48 + declare module '@atcute/lexicons/ambient' { 49 + interface XRPCQueries { 50 + 'fyi.frontpage.feed.describeFeedGenerator': mainSchema; 51 + } 52 + }
+62
packages/definitions/frontpage/lib/lexicons/types/fyi/frontpage/feed/generator.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.record( 6 + /*#__PURE__*/ v.string(), 7 + /*#__PURE__*/ v.object({ 8 + $type: /*#__PURE__*/ v.literal('fyi.frontpage.feed.generator'), 9 + /** 10 + * Whether the feed generator accepts interaction feedback. 11 + */ 12 + acceptsInteractions: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), 13 + /** 14 + * Avatar image for the feed. 15 + * @accept image/png, image/jpeg 16 + * @maxSize 1000000 17 + */ 18 + avatar: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.blob()), 19 + /** 20 + * Client-declared timestamp when this generator was created. 21 + */ 22 + createdAt: /*#__PURE__*/ v.datetimeString(), 23 + /** 24 + * Description of the feed. 25 + * @maxLength 3000 26 + * @maxGraphemes 300 27 + */ 28 + description: /*#__PURE__*/ v.optional( 29 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 30 + /*#__PURE__*/ v.stringLength(0, 3000), 31 + /*#__PURE__*/ v.stringGraphemes(0, 300), 32 + ]), 33 + ), 34 + /** 35 + * DID of the feed generator service. 36 + */ 37 + did: /*#__PURE__*/ v.didString(), 38 + /** 39 + * Display name for the feed. 40 + * @maxLength 320 41 + * @maxGraphemes 32 42 + */ 43 + displayName: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 44 + /*#__PURE__*/ v.stringLength(0, 320), 45 + /*#__PURE__*/ v.stringGraphemes(0, 32), 46 + ]), 47 + }), 48 + ); 49 + 50 + type main$schematype = typeof _mainSchema; 51 + 52 + export interface mainSchema extends main$schematype {} 53 + 54 + export const mainSchema = _mainSchema as mainSchema; 55 + 56 + export interface Main extends v.InferInput<typeof mainSchema> {} 57 + 58 + declare module '@atcute/lexicons/ambient' { 59 + interface Records { 60 + 'fyi.frontpage.feed.generator': mainSchema; 61 + } 62 + }
+64
packages/definitions/frontpage/lib/lexicons/types/fyi/frontpage/feed/getFeedSkeleton.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('fyi.frontpage.feed.getFeedSkeleton', { 6 + params: /*#__PURE__*/ v.object({ 7 + /** 8 + * Pagination cursor. 9 + */ 10 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 11 + /** 12 + * AT URI of the feed generator record. 13 + */ 14 + feed: /*#__PURE__*/ v.resourceUriString(), 15 + /** 16 + * Maximum number of items to return. 17 + * @minimum 1 18 + * @maximum 100 19 + * @default 50 20 + */ 21 + limit: /*#__PURE__*/ v.optional( 22 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(1, 100)]), 23 + 50, 24 + ), 25 + }), 26 + output: { 27 + type: 'lex', 28 + schema: /*#__PURE__*/ v.object({ 29 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 30 + get feed() { 31 + return /*#__PURE__*/ v.array(skeletonFeedPostSchema); 32 + }, 33 + }), 34 + }, 35 + }); 36 + const _skeletonFeedPostSchema = /*#__PURE__*/ v.object({ 37 + $type: /*#__PURE__*/ v.optional( 38 + /*#__PURE__*/ v.literal('fyi.frontpage.feed.getFeedSkeleton#skeletonFeedPost'), 39 + ), 40 + /** 41 + * AT URI of the post. 42 + */ 43 + post: /*#__PURE__*/ v.resourceUriString(), 44 + }); 45 + 46 + type main$schematype = typeof _mainSchema; 47 + type skeletonFeedPost$schematype = typeof _skeletonFeedPostSchema; 48 + 49 + export interface mainSchema extends main$schematype {} 50 + export interface skeletonFeedPostSchema extends skeletonFeedPost$schematype {} 51 + 52 + export const mainSchema = _mainSchema as mainSchema; 53 + export const skeletonFeedPostSchema = _skeletonFeedPostSchema as skeletonFeedPostSchema; 54 + 55 + export interface SkeletonFeedPost extends v.InferInput<typeof skeletonFeedPostSchema> {} 56 + 57 + export interface $params extends v.InferInput<mainSchema['params']> {} 58 + export interface $output extends v.InferXRPCBodyInput<mainSchema['output']> {} 59 + 60 + declare module '@atcute/lexicons/ambient' { 61 + interface XRPCQueries { 62 + 'fyi.frontpage.feed.getFeedSkeleton': mainSchema; 63 + } 64 + }