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(bluesky): pull latest Bluesky lexicons

Mary 96fbbadb 507aba8c

+812 -2
+5
.changeset/loose-chairs-film.md
··· 1 + --- 2 + '@atcute/bluesky': patch 3 + --- 4 + 5 + pull latest Bluesky lexicons
+1 -1
packages/definitions/bluesky/lexicons/README.md
··· 3 3 this directory contains lexicon documents pulled from the following sources: 4 4 5 5 - https://github.com/bluesky-social/atproto.git 6 - - commit: 1a87be24d6a3352e0c6a11c72b367def5f0594db 6 + - commit: f7ae44d7f6d83aa97b7bdae1a755fbe321b50d42
+24 -1
packages/definitions/bluesky/lexicons/app/bsky/actor/defs.json
··· 392 392 "#bskyAppStatePref", 393 393 "#labelersPref", 394 394 "#postInteractionSettingsPref", 395 - "#verificationPrefs" 395 + "#verificationPrefs", 396 + "#liveEventPreferences" 396 397 ] 397 398 } 398 399 }, ··· 733 734 } 734 735 } 735 736 }, 737 + "liveEventPreferences": { 738 + "type": "object", 739 + "description": "Preferences for live events.", 740 + "properties": { 741 + "hiddenFeedIds": { 742 + "description": "A list of feed IDs that the user has hidden from live events.", 743 + "type": "array", 744 + "items": { 745 + "type": "string" 746 + } 747 + }, 748 + "hideAllFeeds": { 749 + "description": "Whether to hide all feeds from live events.", 750 + "type": "boolean", 751 + "default": false 752 + } 753 + } 754 + }, 736 755 "postInteractionSettingsPref": { 737 756 "type": "object", 738 757 "description": "Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.", ··· 796 815 "isActive": { 797 816 "type": "boolean", 798 817 "description": "True if the status is not expired, false if it is expired. Only present if expiration was set." 818 + }, 819 + "isDisabled": { 820 + "type": "boolean", 821 + "description": "True if the user's go-live access has been disabled by a moderator, false otherwise." 799 822 } 800 823 } 801 824 }
+42
packages/definitions/bluesky/lexicons/app/bsky/draft/createDraft.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "app.bsky.draft.createDraft", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Inserts a draft using private storage (stash). An upper limit of drafts might be enforced. Requires authentication.", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": ["draft"], 13 + "properties": { 14 + "draft": { 15 + "type": "ref", 16 + "ref": "app.bsky.draft.defs#draft" 17 + } 18 + } 19 + } 20 + }, 21 + "output": { 22 + "encoding": "application/json", 23 + "schema": { 24 + "type": "object", 25 + "required": ["id"], 26 + "properties": { 27 + "id": { 28 + "type": "string", 29 + "description": "The ID of the created draft." 30 + } 31 + } 32 + } 33 + }, 34 + "errors": [ 35 + { 36 + "name": "DraftLimitReached", 37 + "description": "Trying to insert a new draft when the limit was already reached." 38 + } 39 + ] 40 + } 41 + } 42 + }
+229
packages/definitions/bluesky/lexicons/app/bsky/draft/defs.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "app.bsky.draft.defs", 4 + "defs": { 5 + "draftWithId": { 6 + "description": "A draft with an identifier, used to store drafts in private storage (stash).", 7 + "type": "object", 8 + "required": ["id", "draft"], 9 + "properties": { 10 + "id": { 11 + "description": "A TID to be used as a draft identifier.", 12 + "type": "string", 13 + "format": "tid" 14 + }, 15 + "draft": { 16 + "type": "ref", 17 + "ref": "#draft" 18 + } 19 + } 20 + }, 21 + "draft": { 22 + "description": "A draft containing an array of draft posts.", 23 + "type": "object", 24 + "required": ["posts"], 25 + "properties": { 26 + "posts": { 27 + "description": "Array of draft posts that compose this draft.", 28 + "type": "array", 29 + "minLength": 1, 30 + "maxLength": 100, 31 + "items": { 32 + "type": "ref", 33 + "ref": "#draftPost" 34 + } 35 + }, 36 + "langs": { 37 + "type": "array", 38 + "description": "Indicates human language of posts primary text content.", 39 + "maxLength": 3, 40 + "items": { 41 + "type": "string", 42 + "format": "language" 43 + } 44 + }, 45 + "postgateEmbeddingRules": { 46 + "description": "Embedding rules for the postgates to be created when this draft is published.", 47 + "type": "array", 48 + "maxLength": 5, 49 + "items": { 50 + "type": "union", 51 + "refs": ["app.bsky.feed.postgate#disableRule"] 52 + } 53 + }, 54 + "threadgateAllow": { 55 + "description": "Allow-rules for the threadgate to be created when this draft is published.", 56 + "type": "array", 57 + "maxLength": 5, 58 + "items": { 59 + "type": "union", 60 + "refs": [ 61 + "app.bsky.feed.threadgate#mentionRule", 62 + "app.bsky.feed.threadgate#followerRule", 63 + "app.bsky.feed.threadgate#followingRule", 64 + "app.bsky.feed.threadgate#listRule" 65 + ] 66 + } 67 + } 68 + } 69 + }, 70 + "draftPost": { 71 + "description": "One of the posts that compose a draft.", 72 + "type": "object", 73 + "required": ["text"], 74 + "properties": { 75 + "text": { 76 + "type": "string", 77 + "maxLength": 3000, 78 + "maxGraphemes": 300, 79 + "description": "The primary post content." 80 + }, 81 + "labels": { 82 + "type": "union", 83 + "description": "Self-label values for this post. Effectively content warnings.", 84 + "refs": ["com.atproto.label.defs#selfLabels"] 85 + }, 86 + "embedImages": { 87 + "type": "array", 88 + "items": { 89 + "type": "ref", 90 + "ref": "#draftEmbedImage" 91 + }, 92 + "maxLength": 4 93 + }, 94 + "embedVideos": { 95 + "type": "array", 96 + "items": { 97 + "type": "ref", 98 + "ref": "#draftEmbedVideo" 99 + }, 100 + "maxLength": 1 101 + }, 102 + "embedExternals": { 103 + "type": "array", 104 + "items": { 105 + "type": "ref", 106 + "ref": "#draftEmbedExternal" 107 + }, 108 + "maxLength": 1 109 + }, 110 + "embedRecords": { 111 + "type": "array", 112 + "items": { 113 + "type": "ref", 114 + "ref": "#draftEmbedRecord" 115 + }, 116 + "maxLength": 1 117 + } 118 + } 119 + }, 120 + "draftView": { 121 + "description": "View to present drafts data to users.", 122 + "type": "object", 123 + "required": ["id", "draft", "createdAt", "updatedAt"], 124 + "properties": { 125 + "id": { 126 + "description": "A TID to be used as a draft identifier.", 127 + "type": "string", 128 + "format": "tid" 129 + }, 130 + "draft": { 131 + "type": "ref", 132 + "ref": "#draft" 133 + }, 134 + "createdAt": { 135 + "description": "The time the draft was created.", 136 + "type": "string", 137 + "format": "datetime" 138 + }, 139 + "updatedAt": { 140 + "description": "The time the draft was last updated.", 141 + "type": "string", 142 + "format": "datetime" 143 + } 144 + } 145 + }, 146 + "draftEmbedLocalRef": { 147 + "type": "object", 148 + "required": ["path"], 149 + "properties": { 150 + "path": { 151 + "type": "string", 152 + "description": "Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts.", 153 + "minLength": 1, 154 + "maxLength": 1024 155 + } 156 + } 157 + }, 158 + "draftEmbedCaption": { 159 + "type": "object", 160 + "required": ["lang", "content"], 161 + "properties": { 162 + "lang": { 163 + "type": "string", 164 + "format": "language" 165 + }, 166 + "content": { 167 + "type": "string", 168 + "maxLength": 10000 169 + } 170 + } 171 + }, 172 + "draftEmbedImage": { 173 + "type": "object", 174 + "required": ["localRef"], 175 + "properties": { 176 + "localRef": { 177 + "type": "ref", 178 + "ref": "#draftEmbedLocalRef" 179 + }, 180 + "alt": { 181 + "type": "string", 182 + "maxGraphemes": 2000 183 + } 184 + } 185 + }, 186 + "draftEmbedVideo": { 187 + "type": "object", 188 + "required": ["localRef"], 189 + "properties": { 190 + "localRef": { 191 + "type": "ref", 192 + "ref": "#draftEmbedLocalRef" 193 + }, 194 + "alt": { 195 + "type": "string", 196 + "maxGraphemes": 2000 197 + }, 198 + "captions": { 199 + "type": "array", 200 + "items": { 201 + "type": "ref", 202 + "ref": "#draftEmbedCaption" 203 + }, 204 + "maxLength": 20 205 + } 206 + } 207 + }, 208 + "draftEmbedExternal": { 209 + "type": "object", 210 + "required": ["uri"], 211 + "properties": { 212 + "uri": { 213 + "type": "string", 214 + "format": "uri" 215 + } 216 + } 217 + }, 218 + "draftEmbedRecord": { 219 + "type": "object", 220 + "required": ["record"], 221 + "properties": { 222 + "record": { 223 + "type": "ref", 224 + "ref": "com.atproto.repo.strongRef" 225 + } 226 + } 227 + } 228 + } 229 + }
+23
packages/definitions/bluesky/lexicons/app/bsky/draft/deleteDraft.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "app.bsky.draft.deleteDraft", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Deletes a draft by ID. Requires authentication.", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": ["id"], 13 + "properties": { 14 + "id": { 15 + "type": "string", 16 + "format": "tid" 17 + } 18 + } 19 + } 20 + } 21 + } 22 + } 23 + }
+43
packages/definitions/bluesky/lexicons/app/bsky/draft/getDrafts.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "app.bsky.draft.getDrafts", 4 + "defs": { 5 + "main": { 6 + "type": "query", 7 + "description": "Gets views of user drafts. Requires authentication.", 8 + "parameters": { 9 + "type": "params", 10 + "properties": { 11 + "limit": { 12 + "type": "integer", 13 + "minimum": 1, 14 + "maximum": 100, 15 + "default": 50 16 + }, 17 + "cursor": { 18 + "type": "string" 19 + } 20 + } 21 + }, 22 + "output": { 23 + "encoding": "application/json", 24 + "schema": { 25 + "type": "object", 26 + "required": ["drafts"], 27 + "properties": { 28 + "cursor": { 29 + "type": "string" 30 + }, 31 + "drafts": { 32 + "type": "array", 33 + "items": { 34 + "type": "ref", 35 + "ref": "app.bsky.draft.defs#draftView" 36 + } 37 + } 38 + } 39 + } 40 + } 41 + } 42 + } 43 + }
+23
packages/definitions/bluesky/lexicons/app/bsky/draft/updateDraft.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "app.bsky.draft.updateDraft", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Updates a draft using private storage (stash). If the draft ID points to a non-existing ID, the update will be silently ignored. This is done because updates don't enforce draft limit, so it accepts all writes, but will ignore invalid ones. Requires authentication.", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": ["draft"], 13 + "properties": { 14 + "draft": { 15 + "type": "ref", 16 + "ref": "app.bsky.draft.defs#draftWithId" 17 + } 18 + } 19 + } 20 + } 21 + } 22 + } 23 + }
+5
packages/definitions/bluesky/lib/lexicons/index.ts
··· 25 25 export * as AppBskyContactSendNotification from './types/app/bsky/contact/sendNotification.js'; 26 26 export * as AppBskyContactStartPhoneVerification from './types/app/bsky/contact/startPhoneVerification.js'; 27 27 export * as AppBskyContactVerifyPhone from './types/app/bsky/contact/verifyPhone.js'; 28 + export * as AppBskyDraftCreateDraft from './types/app/bsky/draft/createDraft.js'; 29 + export * as AppBskyDraftDefs from './types/app/bsky/draft/defs.js'; 30 + export * as AppBskyDraftDeleteDraft from './types/app/bsky/draft/deleteDraft.js'; 31 + export * as AppBskyDraftGetDrafts from './types/app/bsky/draft/getDrafts.js'; 32 + export * as AppBskyDraftUpdateDraft from './types/app/bsky/draft/updateDraft.js'; 28 33 export * as AppBskyEmbedDefs from './types/app/bsky/embed/defs.js'; 29 34 export * as AppBskyEmbedExternal from './types/app/bsky/embed/external.js'; 30 35 export * as AppBskyEmbedImages from './types/app/bsky/embed/images.js';
+21
packages/definitions/bluesky/lib/lexicons/types/app/bsky/actor/defs.ts
··· 147 147 return /*#__PURE__*/ v.array(labelerPrefItemSchema); 148 148 }, 149 149 }); 150 + const _liveEventPreferencesSchema = /*#__PURE__*/ v.object({ 151 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.actor.defs#liveEventPreferences')), 152 + /** 153 + * A list of feed IDs that the user has hidden from live events. 154 + */ 155 + hiddenFeedIds: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.array(/*#__PURE__*/ v.string())), 156 + /** 157 + * Whether to hide all feeds from live events. 158 + * @default false 159 + */ 160 + hideAllFeeds: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean(), false), 161 + }); 150 162 const _mutedWordSchema = /*#__PURE__*/ v.object({ 151 163 $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.actor.defs#mutedWord')), 152 164 /** ··· 268 280 hiddenPostsPrefSchema, 269 281 interestsPrefSchema, 270 282 labelersPrefSchema, 283 + liveEventPreferencesSchema, 271 284 mutedWordsPrefSchema, 272 285 personalDetailsPrefSchema, 273 286 postInteractionSettingsPrefSchema, ··· 480 493 * True if the status is not expired, false if it is expired. Only present if expiration was set. 481 494 */ 482 495 isActive: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), 496 + /** 497 + * True if the user's go-live access has been disabled by a moderator, false otherwise. 498 + */ 499 + isDisabled: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.boolean()), 483 500 record: /*#__PURE__*/ v.unknown(), 484 501 /** 485 502 * The status for the account. ··· 578 595 type knownFollowers$schematype = typeof _knownFollowersSchema; 579 596 type labelerPrefItem$schematype = typeof _labelerPrefItemSchema; 580 597 type labelersPref$schematype = typeof _labelersPrefSchema; 598 + type liveEventPreferences$schematype = typeof _liveEventPreferencesSchema; 581 599 type mutedWord$schematype = typeof _mutedWordSchema; 582 600 type mutedWordTarget$schematype = typeof _mutedWordTargetSchema; 583 601 type mutedWordsPref$schematype = typeof _mutedWordsPrefSchema; ··· 612 630 export interface knownFollowersSchema extends knownFollowers$schematype {} 613 631 export interface labelerPrefItemSchema extends labelerPrefItem$schematype {} 614 632 export interface labelersPrefSchema extends labelersPref$schematype {} 633 + export interface liveEventPreferencesSchema extends liveEventPreferences$schematype {} 615 634 export interface mutedWordSchema extends mutedWord$schematype {} 616 635 export interface mutedWordTargetSchema extends mutedWordTarget$schematype {} 617 636 export interface mutedWordsPrefSchema extends mutedWordsPref$schematype {} ··· 646 665 export const knownFollowersSchema = _knownFollowersSchema as knownFollowersSchema; 647 666 export const labelerPrefItemSchema = _labelerPrefItemSchema as labelerPrefItemSchema; 648 667 export const labelersPrefSchema = _labelersPrefSchema as labelersPrefSchema; 668 + export const liveEventPreferencesSchema = _liveEventPreferencesSchema as liveEventPreferencesSchema; 649 669 export const mutedWordSchema = _mutedWordSchema as mutedWordSchema; 650 670 export const mutedWordTargetSchema = _mutedWordTargetSchema as mutedWordTargetSchema; 651 671 export const mutedWordsPrefSchema = _mutedWordsPrefSchema as mutedWordsPrefSchema; ··· 682 702 export interface KnownFollowers extends v.InferInput<typeof knownFollowersSchema> {} 683 703 export interface LabelerPrefItem extends v.InferInput<typeof labelerPrefItemSchema> {} 684 704 export interface LabelersPref extends v.InferInput<typeof labelersPrefSchema> {} 705 + export interface LiveEventPreferences extends v.InferInput<typeof liveEventPreferencesSchema> {} 685 706 export interface MutedWord extends v.InferInput<typeof mutedWordSchema> {} 686 707 export type MutedWordTarget = v.InferInput<typeof mutedWordTargetSchema>; 687 708 export interface MutedWordsPref extends v.InferInput<typeof mutedWordsPrefSchema> {}
+41
packages/definitions/bluesky/lib/lexicons/types/app/bsky/draft/createDraft.ts
··· 1 + import type {} from '@atcute/lexicons'; 2 + import * as v from '@atcute/lexicons/validations'; 3 + import type {} from '@atcute/lexicons/ambient'; 4 + import * as AppBskyDraftDefs from './defs.js'; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.procedure('app.bsky.draft.createDraft', { 7 + params: null, 8 + input: { 9 + type: 'lex', 10 + schema: /*#__PURE__*/ v.object({ 11 + get draft() { 12 + return AppBskyDraftDefs.draftSchema; 13 + }, 14 + }), 15 + }, 16 + output: { 17 + type: 'lex', 18 + schema: /*#__PURE__*/ v.object({ 19 + /** 20 + * The ID of the created draft. 21 + */ 22 + id: /*#__PURE__*/ v.string(), 23 + }), 24 + }, 25 + }); 26 + 27 + type main$schematype = typeof _mainSchema; 28 + 29 + export interface mainSchema extends main$schematype {} 30 + 31 + export const mainSchema = _mainSchema as mainSchema; 32 + 33 + export interface $params {} 34 + export interface $input extends v.InferXRPCBodyInput<mainSchema['input']> {} 35 + export interface $output extends v.InferXRPCBodyInput<mainSchema['output']> {} 36 + 37 + declare module '@atcute/lexicons/ambient' { 38 + interface XRPCProcedures { 39 + 'app.bsky.draft.createDraft': mainSchema; 40 + } 41 + }
+251
packages/definitions/bluesky/lib/lexicons/types/app/bsky/draft/defs.ts
··· 1 + import type {} from '@atcute/lexicons'; 2 + import * as v from '@atcute/lexicons/validations'; 3 + import * as AppBskyFeedPostgate from '../feed/postgate.js'; 4 + import * as AppBskyFeedThreadgate from '../feed/threadgate.js'; 5 + import * as ComAtprotoLabelDefs from '@atcute/atproto/types/label/defs'; 6 + import * as ComAtprotoRepoStrongRef from '@atcute/atproto/types/repo/strongRef'; 7 + 8 + const _draftSchema = /*#__PURE__*/ v.object({ 9 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.draft.defs#draft')), 10 + /** 11 + * Indicates human language of posts primary text content. 12 + * @maxLength 3 13 + */ 14 + langs: /*#__PURE__*/ v.optional( 15 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.array(/*#__PURE__*/ v.languageCodeString()), [ 16 + /*#__PURE__*/ v.arrayLength(0, 3), 17 + ]), 18 + ), 19 + /** 20 + * Embedding rules for the postgates to be created when this draft is published. 21 + * @maxLength 5 22 + */ 23 + get postgateEmbeddingRules() { 24 + return /*#__PURE__*/ v.optional( 25 + /*#__PURE__*/ v.constrain( 26 + /*#__PURE__*/ v.array(/*#__PURE__*/ v.variant([AppBskyFeedPostgate.disableRuleSchema])), 27 + [/*#__PURE__*/ v.arrayLength(0, 5)], 28 + ), 29 + ); 30 + }, 31 + /** 32 + * Array of draft posts that compose this draft. 33 + * @minLength 1 34 + * @maxLength 100 35 + */ 36 + get posts() { 37 + return /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.array(draftPostSchema), [ 38 + /*#__PURE__*/ v.arrayLength(1, 100), 39 + ]); 40 + }, 41 + /** 42 + * Allow-rules for the threadgate to be created when this draft is published. 43 + * @maxLength 5 44 + */ 45 + get threadgateAllow() { 46 + return /*#__PURE__*/ v.optional( 47 + /*#__PURE__*/ v.constrain( 48 + /*#__PURE__*/ v.array( 49 + /*#__PURE__*/ v.variant([ 50 + AppBskyFeedThreadgate.followerRuleSchema, 51 + AppBskyFeedThreadgate.followingRuleSchema, 52 + AppBskyFeedThreadgate.listRuleSchema, 53 + AppBskyFeedThreadgate.mentionRuleSchema, 54 + ]), 55 + ), 56 + [/*#__PURE__*/ v.arrayLength(0, 5)], 57 + ), 58 + ); 59 + }, 60 + }); 61 + const _draftEmbedCaptionSchema = /*#__PURE__*/ v.object({ 62 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.draft.defs#draftEmbedCaption')), 63 + /** 64 + * @maxLength 10000 65 + */ 66 + content: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(0, 10000)]), 67 + lang: /*#__PURE__*/ v.languageCodeString(), 68 + }); 69 + const _draftEmbedExternalSchema = /*#__PURE__*/ v.object({ 70 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.draft.defs#draftEmbedExternal')), 71 + uri: /*#__PURE__*/ v.genericUriString(), 72 + }); 73 + const _draftEmbedImageSchema = /*#__PURE__*/ v.object({ 74 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.draft.defs#draftEmbedImage')), 75 + /** 76 + * @maxGraphemes 2000 77 + */ 78 + alt: /*#__PURE__*/ v.optional( 79 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringGraphemes(0, 2000)]), 80 + ), 81 + get localRef() { 82 + return draftEmbedLocalRefSchema; 83 + }, 84 + }); 85 + const _draftEmbedLocalRefSchema = /*#__PURE__*/ v.object({ 86 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.draft.defs#draftEmbedLocalRef')), 87 + /** 88 + * Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts. 89 + * @minLength 1 90 + * @maxLength 1024 91 + */ 92 + path: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringLength(1, 1024)]), 93 + }); 94 + const _draftEmbedRecordSchema = /*#__PURE__*/ v.object({ 95 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.draft.defs#draftEmbedRecord')), 96 + get record() { 97 + return ComAtprotoRepoStrongRef.mainSchema; 98 + }, 99 + }); 100 + const _draftEmbedVideoSchema = /*#__PURE__*/ v.object({ 101 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.draft.defs#draftEmbedVideo')), 102 + /** 103 + * @maxGraphemes 2000 104 + */ 105 + alt: /*#__PURE__*/ v.optional( 106 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [/*#__PURE__*/ v.stringGraphemes(0, 2000)]), 107 + ), 108 + /** 109 + * @maxLength 20 110 + */ 111 + get captions() { 112 + return /*#__PURE__*/ v.optional( 113 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.array(draftEmbedCaptionSchema), [ 114 + /*#__PURE__*/ v.arrayLength(0, 20), 115 + ]), 116 + ); 117 + }, 118 + get localRef() { 119 + return draftEmbedLocalRefSchema; 120 + }, 121 + }); 122 + const _draftPostSchema = /*#__PURE__*/ v.object({ 123 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.draft.defs#draftPost')), 124 + /** 125 + * @maxLength 1 126 + */ 127 + get embedExternals() { 128 + return /*#__PURE__*/ v.optional( 129 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.array(draftEmbedExternalSchema), [ 130 + /*#__PURE__*/ v.arrayLength(0, 1), 131 + ]), 132 + ); 133 + }, 134 + /** 135 + * @maxLength 4 136 + */ 137 + get embedImages() { 138 + return /*#__PURE__*/ v.optional( 139 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.array(draftEmbedImageSchema), [ 140 + /*#__PURE__*/ v.arrayLength(0, 4), 141 + ]), 142 + ); 143 + }, 144 + /** 145 + * @maxLength 1 146 + */ 147 + get embedRecords() { 148 + return /*#__PURE__*/ v.optional( 149 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.array(draftEmbedRecordSchema), [ 150 + /*#__PURE__*/ v.arrayLength(0, 1), 151 + ]), 152 + ); 153 + }, 154 + /** 155 + * @maxLength 1 156 + */ 157 + get embedVideos() { 158 + return /*#__PURE__*/ v.optional( 159 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.array(draftEmbedVideoSchema), [ 160 + /*#__PURE__*/ v.arrayLength(0, 1), 161 + ]), 162 + ); 163 + }, 164 + /** 165 + * Self-label values for this post. Effectively content warnings. 166 + */ 167 + get labels() { 168 + return /*#__PURE__*/ v.optional(/*#__PURE__*/ v.variant([ComAtprotoLabelDefs.selfLabelsSchema])); 169 + }, 170 + /** 171 + * The primary post content. 172 + * @maxLength 3000 173 + * @maxGraphemes 300 174 + */ 175 + text: /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.string(), [ 176 + /*#__PURE__*/ v.stringLength(0, 3000), 177 + /*#__PURE__*/ v.stringGraphemes(0, 300), 178 + ]), 179 + }); 180 + const _draftViewSchema = /*#__PURE__*/ v.object({ 181 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.draft.defs#draftView')), 182 + /** 183 + * The time the draft was created. 184 + */ 185 + createdAt: /*#__PURE__*/ v.datetimeString(), 186 + get draft() { 187 + return draftSchema; 188 + }, 189 + /** 190 + * A TID to be used as a draft identifier. 191 + */ 192 + id: /*#__PURE__*/ v.tidString(), 193 + /** 194 + * The time the draft was last updated. 195 + */ 196 + updatedAt: /*#__PURE__*/ v.datetimeString(), 197 + }); 198 + const _draftWithIdSchema = /*#__PURE__*/ v.object({ 199 + $type: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.literal('app.bsky.draft.defs#draftWithId')), 200 + get draft() { 201 + return draftSchema; 202 + }, 203 + /** 204 + * A TID to be used as a draft identifier. 205 + */ 206 + id: /*#__PURE__*/ v.tidString(), 207 + }); 208 + 209 + type draft$schematype = typeof _draftSchema; 210 + type draftEmbedCaption$schematype = typeof _draftEmbedCaptionSchema; 211 + type draftEmbedExternal$schematype = typeof _draftEmbedExternalSchema; 212 + type draftEmbedImage$schematype = typeof _draftEmbedImageSchema; 213 + type draftEmbedLocalRef$schematype = typeof _draftEmbedLocalRefSchema; 214 + type draftEmbedRecord$schematype = typeof _draftEmbedRecordSchema; 215 + type draftEmbedVideo$schematype = typeof _draftEmbedVideoSchema; 216 + type draftPost$schematype = typeof _draftPostSchema; 217 + type draftView$schematype = typeof _draftViewSchema; 218 + type draftWithId$schematype = typeof _draftWithIdSchema; 219 + 220 + export interface draftSchema extends draft$schematype {} 221 + export interface draftEmbedCaptionSchema extends draftEmbedCaption$schematype {} 222 + export interface draftEmbedExternalSchema extends draftEmbedExternal$schematype {} 223 + export interface draftEmbedImageSchema extends draftEmbedImage$schematype {} 224 + export interface draftEmbedLocalRefSchema extends draftEmbedLocalRef$schematype {} 225 + export interface draftEmbedRecordSchema extends draftEmbedRecord$schematype {} 226 + export interface draftEmbedVideoSchema extends draftEmbedVideo$schematype {} 227 + export interface draftPostSchema extends draftPost$schematype {} 228 + export interface draftViewSchema extends draftView$schematype {} 229 + export interface draftWithIdSchema extends draftWithId$schematype {} 230 + 231 + export const draftSchema = _draftSchema as draftSchema; 232 + export const draftEmbedCaptionSchema = _draftEmbedCaptionSchema as draftEmbedCaptionSchema; 233 + export const draftEmbedExternalSchema = _draftEmbedExternalSchema as draftEmbedExternalSchema; 234 + export const draftEmbedImageSchema = _draftEmbedImageSchema as draftEmbedImageSchema; 235 + export const draftEmbedLocalRefSchema = _draftEmbedLocalRefSchema as draftEmbedLocalRefSchema; 236 + export const draftEmbedRecordSchema = _draftEmbedRecordSchema as draftEmbedRecordSchema; 237 + export const draftEmbedVideoSchema = _draftEmbedVideoSchema as draftEmbedVideoSchema; 238 + export const draftPostSchema = _draftPostSchema as draftPostSchema; 239 + export const draftViewSchema = _draftViewSchema as draftViewSchema; 240 + export const draftWithIdSchema = _draftWithIdSchema as draftWithIdSchema; 241 + 242 + export interface Draft extends v.InferInput<typeof draftSchema> {} 243 + export interface DraftEmbedCaption extends v.InferInput<typeof draftEmbedCaptionSchema> {} 244 + export interface DraftEmbedExternal extends v.InferInput<typeof draftEmbedExternalSchema> {} 245 + export interface DraftEmbedImage extends v.InferInput<typeof draftEmbedImageSchema> {} 246 + export interface DraftEmbedLocalRef extends v.InferInput<typeof draftEmbedLocalRefSchema> {} 247 + export interface DraftEmbedRecord extends v.InferInput<typeof draftEmbedRecordSchema> {} 248 + export interface DraftEmbedVideo extends v.InferInput<typeof draftEmbedVideoSchema> {} 249 + export interface DraftPost extends v.InferInput<typeof draftPostSchema> {} 250 + export interface DraftView extends v.InferInput<typeof draftViewSchema> {} 251 + export interface DraftWithId extends v.InferInput<typeof draftWithIdSchema> {}
+29
packages/definitions/bluesky/lib/lexicons/types/app/bsky/draft/deleteDraft.ts
··· 1 + import type {} from '@atcute/lexicons'; 2 + import * as v from '@atcute/lexicons/validations'; 3 + import type {} from '@atcute/lexicons/ambient'; 4 + 5 + const _mainSchema = /*#__PURE__*/ v.procedure('app.bsky.draft.deleteDraft', { 6 + params: null, 7 + input: { 8 + type: 'lex', 9 + schema: /*#__PURE__*/ v.object({ 10 + id: /*#__PURE__*/ v.tidString(), 11 + }), 12 + }, 13 + output: null, 14 + }); 15 + 16 + type main$schematype = typeof _mainSchema; 17 + 18 + export interface mainSchema extends main$schematype {} 19 + 20 + export const mainSchema = _mainSchema as mainSchema; 21 + 22 + export interface $params {} 23 + export interface $input extends v.InferXRPCBodyInput<mainSchema['input']> {} 24 + 25 + declare module '@atcute/lexicons/ambient' { 26 + interface XRPCProcedures { 27 + 'app.bsky.draft.deleteDraft': mainSchema; 28 + } 29 + }
+43
packages/definitions/bluesky/lib/lexicons/types/app/bsky/draft/getDrafts.ts
··· 1 + import type {} from '@atcute/lexicons'; 2 + import * as v from '@atcute/lexicons/validations'; 3 + import type {} from '@atcute/lexicons/ambient'; 4 + import * as AppBskyDraftDefs from './defs.js'; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.query('app.bsky.draft.getDrafts', { 7 + params: /*#__PURE__*/ v.object({ 8 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 9 + /** 10 + * @minimum 1 11 + * @maximum 100 12 + * @default 50 13 + */ 14 + limit: /*#__PURE__*/ v.optional( 15 + /*#__PURE__*/ v.constrain(/*#__PURE__*/ v.integer(), [/*#__PURE__*/ v.integerRange(1, 100)]), 16 + 50, 17 + ), 18 + }), 19 + output: { 20 + type: 'lex', 21 + schema: /*#__PURE__*/ v.object({ 22 + cursor: /*#__PURE__*/ v.optional(/*#__PURE__*/ v.string()), 23 + get drafts() { 24 + return /*#__PURE__*/ v.array(AppBskyDraftDefs.draftViewSchema); 25 + }, 26 + }), 27 + }, 28 + }); 29 + 30 + type main$schematype = typeof _mainSchema; 31 + 32 + export interface mainSchema extends main$schematype {} 33 + 34 + export const mainSchema = _mainSchema as mainSchema; 35 + 36 + export interface $params extends v.InferInput<mainSchema['params']> {} 37 + export interface $output extends v.InferXRPCBodyInput<mainSchema['output']> {} 38 + 39 + declare module '@atcute/lexicons/ambient' { 40 + interface XRPCQueries { 41 + 'app.bsky.draft.getDrafts': mainSchema; 42 + } 43 + }
+32
packages/definitions/bluesky/lib/lexicons/types/app/bsky/draft/updateDraft.ts
··· 1 + import type {} from '@atcute/lexicons'; 2 + import * as v from '@atcute/lexicons/validations'; 3 + import type {} from '@atcute/lexicons/ambient'; 4 + import * as AppBskyDraftDefs from './defs.js'; 5 + 6 + const _mainSchema = /*#__PURE__*/ v.procedure('app.bsky.draft.updateDraft', { 7 + params: null, 8 + input: { 9 + type: 'lex', 10 + schema: /*#__PURE__*/ v.object({ 11 + get draft() { 12 + return AppBskyDraftDefs.draftWithIdSchema; 13 + }, 14 + }), 15 + }, 16 + output: null, 17 + }); 18 + 19 + type main$schematype = typeof _mainSchema; 20 + 21 + export interface mainSchema extends main$schematype {} 22 + 23 + export const mainSchema = _mainSchema as mainSchema; 24 + 25 + export interface $params {} 26 + export interface $input extends v.InferXRPCBodyInput<mainSchema['input']> {} 27 + 28 + declare module '@atcute/lexicons/ambient' { 29 + interface XRPCProcedures { 30 + 'app.bsky.draft.updateDraft': mainSchema; 31 + } 32 + }