diff --git a/packages/lexicons/src/lib/lexicons.ts b/packages/lexicons/src/lib/lexicons.ts index 0dad938..71f620e 100644 --- a/packages/lexicons/src/lib/lexicons.ts +++ b/packages/lexicons/src/lib/lexicons.ts @@ -5,9 +5,9 @@ * @module * Contains type declarations for Bluesky lexicons * @generated - * Generated on: 2025-02-19T09:17:40.945Z + * Generated on: 2025-02-23T09:41:54.872Z * Version: main - * Source: https://github.com/bluesky-social/atproto/tree/7449f8607c1be948a0b55611c21075757c3d7261/lexicons + * Source: https://github.com/bluesky-social/atproto/tree/6e382f67aa73532efadfea80ff96a27b526cb178/lexicons */ /** Base type with optional type field */ @@ -57,6 +57,12 @@ export declare namespace At { /** URI string */ type Uri = string; + /** TID string */ + type TID = string; + + /** RKEY string */ + type RKEY = string; + /** Object containing a CID string */ interface CIDLink { $link: CID; @@ -2383,6 +2389,17 @@ export declare namespace ChatBskyActorExportAccountData { type Output = Uint8Array; } +export declare namespace ChatBskyConvoAcceptConvo { + interface Params extends TypedBase {} + interface Input extends TypedBase { + convoId: string; + } + interface Output extends TypedBase { + /** Rev when the convo was accepted. If not present, the convo was already accepted. */ + rev?: string; + } +} + export declare namespace ChatBskyConvoDefs { interface ConvoView extends TypedBase { id: string; @@ -2391,7 +2408,7 @@ export declare namespace ChatBskyConvoDefs { rev: string; unreadCount: number; lastMessage?: TypeUnion; - opened?: boolean; + status?: "accepted" | "request" | (string & {}); } interface DeletedMessageView extends TypedBase { id: string; @@ -2399,6 +2416,10 @@ export declare namespace ChatBskyConvoDefs { sender: MessageViewSender; sentAt: string; } + interface LogAcceptConvo extends TypedBase { + convoId: string; + rev: string; + } interface LogBeginConvo extends TypedBase { convoId: string; rev: string; @@ -2417,6 +2438,19 @@ export declare namespace ChatBskyConvoDefs { convoId: string; rev: string; } + interface LogMuteConvo extends TypedBase { + convoId: string; + rev: string; + } + interface LogReadMessage extends TypedBase { + convoId: string; + message: TypeUnion; + rev: string; + } + interface LogUnmuteConvo extends TypedBase { + convoId: string; + rev: string; + } interface MessageInput extends TypedBase { /** * Maximum string length: 10000 @@ -2470,6 +2504,22 @@ export declare namespace ChatBskyConvoGetConvo { } } +/** Get whether the requester and the other members can chat. If an existing convo is found for these members, it is returned. */ +export declare namespace ChatBskyConvoGetConvoAvailability { + interface Params extends TypedBase { + /** + * Minimum array length: 1 + * Maximum array length: 10 + */ + members: At.DID[]; + } + type Input = undefined; + interface Output extends TypedBase { + canChat: boolean; + convo?: ChatBskyConvoDefs.ConvoView; + } +} + export declare namespace ChatBskyConvoGetConvoForMembers { interface Params extends TypedBase { /** @@ -2491,6 +2541,7 @@ export declare namespace ChatBskyConvoGetLog { type Input = undefined; interface Output extends TypedBase { logs: TypeUnion< + | ChatBskyConvoDefs.LogAcceptConvo | ChatBskyConvoDefs.LogBeginConvo | ChatBskyConvoDefs.LogCreateMessage | ChatBskyConvoDefs.LogDeleteMessage @@ -2540,6 +2591,8 @@ export declare namespace ChatBskyConvoListConvos { * \@default 50 */ limit?: number; + readState?: "unread" | (string & {}); + status?: "accepted" | "request" | (string & {}); } type Input = undefined; interface Output extends TypedBase { @@ -3153,8 +3206,8 @@ export declare namespace ComAtprotoRepoApplyWrites { interface Create extends TypedBase { collection: string; value: unknown; - /** Maximum string length: 512 */ - rkey?: string; + /** NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility. */ + rkey?: At.RKEY; } interface CreateResult extends TypedBase { cid: At.CID; @@ -3164,13 +3217,13 @@ export declare namespace ComAtprotoRepoApplyWrites { /** Operation which deletes an existing record. */ interface Delete extends TypedBase { collection: string; - rkey: string; + rkey: At.RKEY; } interface DeleteResult extends TypedBase {} /** Operation which updates an existing record. */ interface Update extends TypedBase { collection: string; - rkey: string; + rkey: At.RKEY; value: unknown; } interface UpdateResult extends TypedBase { @@ -3190,11 +3243,8 @@ export declare namespace ComAtprotoRepoCreateRecord { record: unknown; /** The handle or DID of the repo (aka, current account). */ repo: string; - /** - * The Record Key. - * Maximum string length: 512 - */ - rkey?: string; + /** The Record Key. */ + rkey?: At.RKEY; /** Compare and swap with the previous commit by CID. */ swapCommit?: At.CID; /** Can be set to 'false' to skip Lexicon schema validation of record data, 'true' to require it, or leave unset to validate only for known Lexicons. */ @@ -3214,7 +3264,7 @@ export declare namespace ComAtprotoRepoCreateRecord { export declare namespace ComAtprotoRepoDefs { interface CommitMeta extends TypedBase { cid: At.CID; - rev: string; + rev: At.TID; } } @@ -3227,7 +3277,7 @@ export declare namespace ComAtprotoRepoDeleteRecord { /** The handle or DID of the repo (aka, current account). */ repo: string; /** The Record Key. */ - rkey: string; + rkey: At.RKEY; /** Compare and swap with the previous commit by CID. */ swapCommit?: At.CID; /** Compare and swap with the previous record by CID. */ @@ -3268,7 +3318,7 @@ export declare namespace ComAtprotoRepoGetRecord { /** The handle or DID of the repo. */ repo: string; /** The Record Key. */ - rkey: string; + rkey: At.RKEY; /** The CID of the version of the record. If not specified, then return the most recent version. */ cid?: At.CID; } @@ -3362,11 +3412,8 @@ export declare namespace ComAtprotoRepoPutRecord { record: unknown; /** The handle or DID of the repo (aka, current account). */ repo: string; - /** - * The Record Key. - * Maximum string length: 512 - */ - rkey: string; + /** The Record Key. */ + rkey: At.RKEY; /** Compare and swap with the previous commit by CID. */ swapCommit?: At.CID; /** Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation */ @@ -3890,7 +3937,7 @@ export declare namespace ComAtprotoSyncGetLatestCommit { type Input = undefined; interface Output extends TypedBase { cid: At.CID; - rev: string; + rev: At.TID; } interface Errors extends TypedBase { RepoNotFound: {}; @@ -3907,7 +3954,7 @@ export declare namespace ComAtprotoSyncGetRecord { /** The DID of the repo. */ did: At.DID; /** Record Key */ - rkey: string; + rkey: At.RKEY; /** * DEPRECATED: referenced a repo commit by CID, and retrieved record as of that commit * \@deprecated @@ -3931,7 +3978,7 @@ export declare namespace ComAtprotoSyncGetRepo { /** The DID of the repo. */ did: At.DID; /** The revision ('rev') of the repo to create a diff from. */ - since?: string; + since?: At.TID; } type Input = undefined; type Output = Uint8Array; @@ -3954,9 +4001,16 @@ export declare namespace ComAtprotoSyncGetRepoStatus { active: boolean; did: At.DID; /** Optional field, the current rev of the repo, if active=true */ - rev?: string; + rev?: At.TID; /** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */ - status?: "deactivated" | "suspended" | "takendown" | (string & {}); + status?: + | "deactivated" + | "deleted" + | "desynchronized" + | "suspended" + | "takendown" + | "throttled" + | (string & {}); } interface Errors extends TypedBase { RepoNotFound: {}; @@ -3976,7 +4030,7 @@ export declare namespace ComAtprotoSyncListBlobs { */ limit?: number; /** Optional revision of the repo to list blobs since. */ - since?: string; + since?: At.TID; } type Input = undefined; interface Output extends TypedBase { @@ -4011,10 +4065,17 @@ export declare namespace ComAtprotoSyncListRepos { did: At.DID; /** Current repo commit CID */ head: At.CID; - rev: string; + rev: At.TID; active?: boolean; /** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */ - status?: "deactivated" | "suspended" | "takendown" | (string & {}); + status?: + | "deactivated" + | "deleted" + | "desynchronized" + | "suspended" + | "takendown" + | "throttled" + | (string & {}); } } @@ -4067,7 +4128,7 @@ export declare namespace ComAtprotoSyncSubscribeRepos { cursor?: number; } type Message = TypeUnion< - Account | Commit | Handle | Identity | Info | Migrate | Tombstone + Account | Commit | Handle | Identity | Info | Migrate | Sync | Tombstone >; interface Errors extends TypedBase { FutureCursor: {}; @@ -4084,15 +4145,20 @@ export declare namespace ComAtprotoSyncSubscribeRepos { status?: | "deactivated" | "deleted" + | "desynchronized" | "suspended" | "takendown" + | "throttled" | (string & {}); } /** Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature. */ interface Commit extends TypedBase { - /** List of new blobs (by CID) referenced by records in this commit. */ + /** + * DEPRECATED -- will soon always be empty. List of new blobs (by CID) referenced by records in this commit. + * \@deprecated + */ blobs: At.CIDLink[]; - /** CAR file containing relevant blocks, as a diff since the previous repo state. */ + /** CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list. */ blocks: At.Bytes; /** Repo commit object CID. */ commit: At.CIDLink; @@ -4106,23 +4172,23 @@ export declare namespace ComAtprotoSyncSubscribeRepos { * \@deprecated */ rebase: boolean; - /** The repo this event comes from. */ + /** The repo this event comes from. Note that all other message types name this field 'did'. */ repo: At.DID; /** The rev of the emitted commit. Note that this information is also in the commit object included in blocks, unless this is a tooBig event. */ - rev: string; + rev: At.TID; /** The stream sequence number of this message. */ seq: number; /** The rev of the last emitted commit from this repo (if any). */ - since: string | null; + since: At.TID | null; /** Timestamp of when this message was originally broadcast. */ time: string; - /** Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data. */ - tooBig: boolean; /** - * DEPRECATED -- unused. WARNING -- nullable and optional; stick with optional to ensure golang interoperability. + * DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data. * \@deprecated */ - prev?: At.CIDLink | null; + tooBig: boolean; + /** The root CID of the MST tree for the previous commit from this repo (indicated by the 'since' revision field in this message). Corresponds to the 'data' field in the repo commit object. NOTE: this field is effectively required for the 'inductive' version of firehose. */ + prevData?: At.CIDLink; } /** * DEPRECATED -- Use #identity event instead @@ -4162,6 +4228,21 @@ export declare namespace ComAtprotoSyncSubscribeRepos { /** For creates and updates, the new record CID. For deletions, null. */ cid: At.CIDLink | null; path: string; + /** For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined. */ + prev?: At.CIDLink; + } + /** Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository. */ + interface Sync extends TypedBase { + /** CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'. */ + blocks: At.Bytes; + /** The account this repo event corresponds to. Must match that in the commit object. */ + did: At.DID; + /** The rev of the commit. This value must match that in the commit object. */ + rev: string; + /** The stream sequence number of this message. */ + seq: number; + /** Timestamp of when this message was originally broadcast. */ + time: string; } /** * DEPRECATED -- Use #account event instead @@ -4713,6 +4794,7 @@ export declare namespace ToolsOzoneModerationEmitEvent { | ToolsOzoneModerationDefs.IdentityEvent | ToolsOzoneModerationDefs.ModEventAcknowledge | ToolsOzoneModerationDefs.ModEventComment + | ToolsOzoneModerationDefs.ModEventDivert | ToolsOzoneModerationDefs.ModEventEmail | ToolsOzoneModerationDefs.ModEventEscalate | ToolsOzoneModerationDefs.ModEventLabel @@ -5601,6 +5683,10 @@ export declare interface Queries { params: ChatBskyConvoGetConvo.Params; output: ChatBskyConvoGetConvo.Output; }; + "chat.bsky.convo.getConvoAvailability": { + params: ChatBskyConvoGetConvoAvailability.Params; + output: ChatBskyConvoGetConvoAvailability.Output; + }; "chat.bsky.convo.getConvoForMembers": { params: ChatBskyConvoGetConvoForMembers.Params; output: ChatBskyConvoGetConvoForMembers.Output; @@ -5857,6 +5943,10 @@ export declare interface Procedures { "chat.bsky.actor.deleteAccount": { output: ChatBskyActorDeleteAccount.Output; }; + "chat.bsky.convo.acceptConvo": { + input: ChatBskyConvoAcceptConvo.Input; + output: ChatBskyConvoAcceptConvo.Output; + }; "chat.bsky.convo.deleteMessageForSelf": { input: ChatBskyConvoDeleteMessageForSelf.Input; output: ChatBskyConvoDeleteMessageForSelf.Output;