Highly ambitious ATProtocol AppView service and sdks
at main 76 kB view raw
1// Generated TypeScript client for AT Protocol records 2// Generated at: 2025-09-29 01:19:06 UTC 3// Lexicons: 42 4 5/** 6 * @example Usage 7 * ```ts 8 * import { AtProtoClient } from "./generated_client.ts"; 9 * 10 * const client = new AtProtoClient( 11 * 'https://api.slices.network', 12 * 'at://did:plc:bcgltzqazw5tb6k2g3ttenbj/network.slices.slice/3lymhd4jhrd2z' 13 * ); 14 * 15 * // Get records from the app.bsky.graph.follow collection 16 * const records = await client.app.bsky.graph.follow.getRecords(); 17 * 18 * // Get a specific record 19 * const record = await client.app.bsky.graph.follow.getRecord({ 20 * uri: 'at://did:plc:example/app.bsky.graph.follow/3abc123' 21 * }); 22 * 23 * // Get records with filtering and search 24 * const filteredRecords = await client.app.bsky.graph.follow.getRecords({ 25 * where: { 26 * text: { contains: "example search term" } 27 * } 28 * }); 29 * 30 * // Use slice-level methods for cross-collection queries with type safety 31 * const sliceRecords = await client.network.slices.slice.getSliceRecords<AppBskyGraphFollow>({ 32 * where: { 33 * collection: { eq: 'app.bsky.graph.follow' } 34 * } 35 * }); 36 * 37 * // Search across multiple collections using union types 38 * const multiCollectionRecords = await client.network.slices.slice.getSliceRecords<AppBskyGraphFollow | AppBskyActorProfile>({ 39 * where: { 40 * collection: { in: ['app.bsky.graph.follow', 'app.bsky.actor.profile'] }, 41 * text: { contains: 'example search term' }, 42 * did: { in: ['did:plc:user1', 'did:plc:user2'] } 43 * }, 44 * limit: 20 45 * }); 46 * 47 * // Serve the records as JSON 48 * Deno.serve(async () => new Response(JSON.stringify(records.records.map(r => r.value)))); 49 * ``` 50 */ 51 52import { 53 type AuthProvider, 54 type BlobRef, 55 type CountRecordsResponse, 56 type GetRecordParams, 57 type GetRecordsResponse, 58 type IndexedRecordFields, 59 type RecordResponse, 60 SlicesClient, 61 type SortField, 62 type WhereCondition, 63} from "@slices/client"; 64import type { OAuthClient } from "@slices/oauth"; 65 66export type AppBskyGraphDefsListPurpose = 67 | "app.bsky.graph.defs#modlist" 68 | "app.bsky.graph.defs#curatelist" 69 | "app.bsky.graph.defs#referencelist" 70 | (string & Record<string, never>); 71 72export type AppBskyFeedDefsEvent = 73 | "app.bsky.feed.defs#requestLess" 74 | "app.bsky.feed.defs#requestMore" 75 | "app.bsky.feed.defs#clickthroughItem" 76 | "app.bsky.feed.defs#clickthroughAuthor" 77 | "app.bsky.feed.defs#clickthroughReposter" 78 | "app.bsky.feed.defs#clickthroughEmbed" 79 | "app.bsky.feed.defs#interactionSeen" 80 | "app.bsky.feed.defs#interactionLike" 81 | "app.bsky.feed.defs#interactionRepost" 82 | "app.bsky.feed.defs#interactionReply" 83 | "app.bsky.feed.defs#interactionQuote" 84 | "app.bsky.feed.defs#interactionShare" 85 | (string & Record<string, never>); 86 87export type AppBskyFeedDefsContentMode = 88 | "app.bsky.feed.defs#contentModeUnspecified" 89 | "app.bsky.feed.defs#contentModeVideo" 90 | (string & Record<string, never>); 91 92export type AppBskyActorDefsActorTarget = 93 | "all" 94 | "exclude-following" 95 | (string & Record<string, never>); 96 97export type AppBskyActorDefsType = 98 | "feed" 99 | "list" 100 | "timeline" 101 | (string & Record<string, never>); 102 103export type AppBskyActorDefsSort = 104 | "oldest" 105 | "newest" 106 | "most-likes" 107 | "random" 108 | "hotness" 109 | (string & Record<string, never>); 110 111export type AppBskyActorDefsMutedWordTarget = 112 | "content" 113 | "tag" 114 | (string & Record<string, never>); 115 116export type AppBskyActorDefsVisibility = 117 | "ignore" 118 | "show" 119 | "warn" 120 | "hide" 121 | (string & Record<string, never>); 122 123export type AppBskyActorDefsAllowIncoming = 124 | "all" 125 | "none" 126 | "following" 127 | (string & Record<string, never>); 128 129export type ComAtprotoLabelDefsLabelValue = 130 | "!hide" 131 | "!no-promote" 132 | "!warn" 133 | "!no-unauthenticated" 134 | "dmca-violation" 135 | "doxxing" 136 | "porn" 137 | "sexual" 138 | "nudity" 139 | "nsfl" 140 | "gore" 141 | (string & Record<string, never>); 142 143export type ComAtprotoLabelDefsBlurs = 144 | "content" 145 | "media" 146 | "none" 147 | (string & Record<string, never>); 148 149export type ComAtprotoLabelDefsSeverity = 150 | "inform" 151 | "alert" 152 | "none" 153 | (string & Record<string, never>); 154 155export type ComAtprotoLabelDefsDefaultSetting = 156 | "ignore" 157 | "warn" 158 | "hide" 159 | (string & Record<string, never>); 160 161export interface AppBskyEmbedDefsAspectRatio { 162 width: number; 163 height: number; 164} 165 166export interface AppBskyEmbedRecordMain { 167 record: ComAtprotoRepoStrongRef; 168} 169 170export interface AppBskyEmbedRecordView { 171 record: 172 | AppBskyEmbedRecord["ViewRecord"] 173 | AppBskyEmbedRecord["ViewNotFound"] 174 | AppBskyEmbedRecord["ViewBlocked"] 175 | AppBskyEmbedRecord["ViewDetached"] 176 | AppBskyFeedDefs["GeneratorView"] 177 | AppBskyGraphDefs["ListView"] 178 | AppBskyLabelerDefs["LabelerView"] 179 | AppBskyGraphDefs["StarterPackViewBasic"] 180 | { $type: string; [key: string]: unknown }; 181} 182 183export interface AppBskyEmbedRecordViewRecord { 184 cid: string; 185 uri: string; 186 /** The record data itself. */ 187 value: unknown; 188 author: AppBskyActorDefs["ProfileViewBasic"]; 189 embeds?: 190 | AppBskyEmbedImages["View"] 191 | AppBskyEmbedVideo["View"] 192 | AppBskyEmbedExternal["View"] 193 | AppBskyEmbedRecord["View"] 194 | AppBskyEmbedRecordWithMedia["View"] 195 | { $type: string; [key: string]: unknown }[]; 196 labels?: ComAtprotoLabelDefs["Label"][]; 197 indexedAt: string; 198 likeCount?: number; 199 quoteCount?: number; 200 replyCount?: number; 201 repostCount?: number; 202} 203 204export interface AppBskyEmbedRecordViewBlocked { 205 uri: string; 206 author: AppBskyFeedDefs["BlockedAuthor"]; 207 blocked: boolean; 208} 209 210export interface AppBskyEmbedRecordViewDetached { 211 uri: string; 212 detached: boolean; 213} 214 215export interface AppBskyEmbedRecordViewNotFound { 216 uri: string; 217 notFound: boolean; 218} 219 220export interface AppBskyEmbedImagesMain { 221 images: AppBskyEmbedImages["Image"][]; 222} 223 224export interface AppBskyEmbedImagesView { 225 images: AppBskyEmbedImages["ViewImage"][]; 226} 227 228export interface AppBskyEmbedImagesImage { 229 /** Alt text description of the image, for accessibility. */ 230 alt: string; 231 image: BlobRef; 232 aspectRatio?: AppBskyEmbedDefs["AspectRatio"]; 233} 234 235export interface AppBskyEmbedImagesViewImage { 236 /** Alt text description of the image, for accessibility. */ 237 alt: string; 238 /** Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View. */ 239 thumb: string; 240 /** Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View. */ 241 fullsize: string; 242 aspectRatio?: AppBskyEmbedDefs["AspectRatio"]; 243} 244 245export interface AppBskyEmbedRecordWithMediaMain { 246 media: 247 | AppBskyEmbedImages["Main"] 248 | AppBskyEmbedVideo["Main"] 249 | AppBskyEmbedExternal["Main"] 250 | { $type: string; [key: string]: unknown }; 251 record: AppBskyEmbedRecord["Main"]; 252} 253 254export interface AppBskyEmbedRecordWithMediaView { 255 media: 256 | AppBskyEmbedImages["View"] 257 | AppBskyEmbedVideo["View"] 258 | AppBskyEmbedExternal["View"] 259 | { $type: string; [key: string]: unknown }; 260 record: AppBskyEmbedRecord["View"]; 261} 262 263export interface AppBskyEmbedVideoMain { 264 /** Alt text description of the video, for accessibility. */ 265 alt?: string; 266 video: BlobRef; 267 captions?: AppBskyEmbedVideo["Caption"][]; 268 aspectRatio?: AppBskyEmbedDefs["AspectRatio"]; 269} 270 271export interface AppBskyEmbedVideoView { 272 alt?: string; 273 cid: string; 274 playlist: string; 275 thumbnail?: string; 276 aspectRatio?: AppBskyEmbedDefs["AspectRatio"]; 277} 278 279export interface AppBskyEmbedVideoCaption { 280 file: BlobRef; 281 lang: string; 282} 283 284export interface AppBskyEmbedExternalMain { 285 external: AppBskyEmbedExternal["External"]; 286} 287 288export interface AppBskyEmbedExternalView { 289 external: AppBskyEmbedExternal["ViewExternal"]; 290} 291 292export interface AppBskyEmbedExternalExternal { 293 uri: string; 294 thumb?: BlobRef; 295 title: string; 296 description: string; 297} 298 299export interface AppBskyEmbedExternalViewExternal { 300 uri: string; 301 thumb?: string; 302 title: string; 303 description: string; 304} 305 306export interface AppBskyGraphFollow { 307 subject: string; 308 createdAt: string; 309} 310 311export type AppBskyGraphFollowSortFields = "subject" | "createdAt"; 312export type AppBskyGraphDefsModlist = "app.bsky.graph.defs#modlist"; 313 314export interface AppBskyGraphDefsListView { 315 cid: string; 316 uri: string; 317 name: string; 318 avatar?: string; 319 labels?: ComAtprotoLabelDefs["Label"][]; 320 viewer?: AppBskyGraphDefs["ListViewerState"]; 321 creator: AppBskyActorDefs["ProfileView"]; 322 purpose: AppBskyGraphDefs["ListPurpose"]; 323 indexedAt: string; 324 description?: string; 325 listItemCount?: number; 326 descriptionFacets?: AppBskyRichtextFacet["Main"][]; 327} 328 329export type AppBskyGraphDefsCuratelist = "app.bsky.graph.defs#curatelist"; 330 331export interface AppBskyGraphDefsListItemView { 332 uri: string; 333 subject: AppBskyActorDefs["ProfileView"]; 334} 335 336export interface AppBskyGraphDefsRelationship { 337 did: string; 338 /** if the actor follows this DID, this is the AT-URI of the follow record */ 339 following?: string; 340 /** if the actor is followed by this DID, contains the AT-URI of the follow record */ 341 followedBy?: string; 342} 343 344export interface AppBskyGraphDefsListViewBasic { 345 cid: string; 346 uri: string; 347 name: string; 348 avatar?: string; 349 labels?: ComAtprotoLabelDefs["Label"][]; 350 viewer?: AppBskyGraphDefs["ListViewerState"]; 351 purpose: AppBskyGraphDefs["ListPurpose"]; 352 indexedAt?: string; 353 listItemCount?: number; 354} 355 356export interface AppBskyGraphDefsNotFoundActor { 357 actor: string; 358 notFound: boolean; 359} 360 361export type AppBskyGraphDefsReferencelist = "app.bsky.graph.defs#referencelist"; 362 363export interface AppBskyGraphDefsListViewerState { 364 muted?: boolean; 365 blocked?: string; 366} 367 368export interface AppBskyGraphDefsStarterPackView { 369 cid: string; 370 uri: string; 371 list?: AppBskyGraphDefs["ListViewBasic"]; 372 feeds?: AppBskyFeedDefs["GeneratorView"][]; 373 labels?: ComAtprotoLabelDefs["Label"][]; 374 record: unknown; 375 creator: AppBskyActorDefs["ProfileViewBasic"]; 376 indexedAt: string; 377 joinedWeekCount?: number; 378 listItemsSample?: AppBskyGraphDefs["ListItemView"][]; 379 joinedAllTimeCount?: number; 380} 381 382export interface AppBskyGraphDefsStarterPackViewBasic { 383 cid: string; 384 uri: string; 385 labels?: ComAtprotoLabelDefs["Label"][]; 386 record: unknown; 387 creator: AppBskyActorDefs["ProfileViewBasic"]; 388 indexedAt: string; 389 listItemCount?: number; 390 joinedWeekCount?: number; 391 joinedAllTimeCount?: number; 392} 393 394export interface AppBskyFeedDefsPostView { 395 cid: string; 396 uri: string; 397 embed?: 398 | AppBskyEmbedImages["View"] 399 | AppBskyEmbedVideo["View"] 400 | AppBskyEmbedExternal["View"] 401 | AppBskyEmbedRecord["View"] 402 | AppBskyEmbedRecordWithMedia["View"] 403 | { $type: string; [key: string]: unknown }; 404 author: AppBskyActorDefs["ProfileViewBasic"]; 405 labels?: ComAtprotoLabelDefs["Label"][]; 406 record: unknown; 407 viewer?: AppBskyFeedDefs["ViewerState"]; 408 indexedAt: string; 409 likeCount?: number; 410 quoteCount?: number; 411 replyCount?: number; 412 threadgate?: AppBskyFeedDefs["ThreadgateView"]; 413 repostCount?: number; 414} 415 416export interface AppBskyFeedDefsReplyRef { 417 root: 418 | AppBskyFeedDefs["PostView"] 419 | AppBskyFeedDefs["NotFoundPost"] 420 | AppBskyFeedDefs["BlockedPost"] 421 | { $type: string; [key: string]: unknown }; 422 parent: 423 | AppBskyFeedDefs["PostView"] 424 | AppBskyFeedDefs["NotFoundPost"] 425 | AppBskyFeedDefs["BlockedPost"] 426 | { $type: string; [key: string]: unknown }; 427 /** When parent is a reply to another post, this is the author of that post. */ 428 grandparentAuthor?: AppBskyActorDefs["ProfileViewBasic"]; 429} 430 431export type AppBskyFeedDefsReasonPin = Record<string, never>; 432 433export interface AppBskyFeedDefsBlockedPost { 434 uri: string; 435 author: AppBskyFeedDefs["BlockedAuthor"]; 436 blocked: boolean; 437} 438 439export interface AppBskyFeedDefsInteraction { 440 item?: string; 441 event?: AppBskyFeedDefsEvent; 442 /** Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton. */ 443 feedContext?: string; 444} 445 446export type AppBskyFeedDefsRequestLess = "app.bsky.feed.defs#requestLess"; 447export type AppBskyFeedDefsRequestMore = "app.bsky.feed.defs#requestMore"; 448 449export interface AppBskyFeedDefsViewerState { 450 like?: string; 451 pinned?: boolean; 452 repost?: string; 453 threadMuted?: boolean; 454 replyDisabled?: boolean; 455 embeddingDisabled?: boolean; 456} 457 458export interface AppBskyFeedDefsFeedViewPost { 459 post: AppBskyFeedDefs["PostView"]; 460 reply?: AppBskyFeedDefs["ReplyRef"]; 461 reason?: AppBskyFeedDefs["ReasonRepost"] | AppBskyFeedDefs["ReasonPin"] | { 462 $type: string; 463 [key: string]: unknown; 464 }; 465 /** Context provided by feed generator that may be passed back alongside interactions. */ 466 feedContext?: string; 467} 468 469export interface AppBskyFeedDefsNotFoundPost { 470 uri: string; 471 notFound: boolean; 472} 473 474export interface AppBskyFeedDefsReasonRepost { 475 by: AppBskyActorDefs["ProfileViewBasic"]; 476 indexedAt: string; 477} 478 479export interface AppBskyFeedDefsBlockedAuthor { 480 did: string; 481 viewer?: AppBskyActorDefs["ViewerState"]; 482} 483 484export interface AppBskyFeedDefsGeneratorView { 485 cid: string; 486 did: string; 487 uri: string; 488 avatar?: string; 489 labels?: ComAtprotoLabelDefs["Label"][]; 490 viewer?: AppBskyFeedDefs["GeneratorViewerState"]; 491 creator: AppBskyActorDefs["ProfileView"]; 492 indexedAt: string; 493 likeCount?: number; 494 contentMode?: AppBskyFeedDefsContentMode; 495 description?: string; 496 displayName: string; 497 descriptionFacets?: AppBskyRichtextFacet["Main"][]; 498 acceptsInteractions?: boolean; 499} 500 501export interface AppBskyFeedDefsThreadContext { 502 rootAuthorLike?: string; 503} 504 505export interface AppBskyFeedDefsThreadViewPost { 506 post: AppBskyFeedDefs["PostView"]; 507 parent?: 508 | AppBskyFeedDefs["ThreadViewPost"] 509 | AppBskyFeedDefs["NotFoundPost"] 510 | AppBskyFeedDefs["BlockedPost"] 511 | { $type: string; [key: string]: unknown }; 512 replies?: 513 | AppBskyFeedDefs["ThreadViewPost"] 514 | AppBskyFeedDefs["NotFoundPost"] 515 | AppBskyFeedDefs["BlockedPost"] 516 | { $type: string; [key: string]: unknown }[]; 517 threadContext?: AppBskyFeedDefs["ThreadContext"]; 518} 519 520export interface AppBskyFeedDefsThreadgateView { 521 cid?: string; 522 uri?: string; 523 lists?: AppBskyGraphDefs["ListViewBasic"][]; 524 record?: unknown; 525} 526 527export type AppBskyFeedDefsInteractionLike = 528 "app.bsky.feed.defs#interactionLike"; 529export type AppBskyFeedDefsInteractionSeen = 530 "app.bsky.feed.defs#interactionSeen"; 531export type AppBskyFeedDefsClickthroughItem = 532 "app.bsky.feed.defs#clickthroughItem"; 533export type AppBskyFeedDefsContentModeVideo = 534 "app.bsky.feed.defs#contentModeVideo"; 535export type AppBskyFeedDefsInteractionQuote = 536 "app.bsky.feed.defs#interactionQuote"; 537export type AppBskyFeedDefsInteractionReply = 538 "app.bsky.feed.defs#interactionReply"; 539export type AppBskyFeedDefsInteractionShare = 540 "app.bsky.feed.defs#interactionShare"; 541 542export interface AppBskyFeedDefsSkeletonFeedPost { 543 post: string; 544 reason?: 545 | AppBskyFeedDefs["SkeletonReasonRepost"] 546 | AppBskyFeedDefs["SkeletonReasonPin"] 547 | { $type: string; [key: string]: unknown }; 548 /** Context that will be passed through to client and may be passed to feed generator back alongside interactions. */ 549 feedContext?: string; 550} 551 552export type AppBskyFeedDefsClickthroughEmbed = 553 "app.bsky.feed.defs#clickthroughEmbed"; 554export type AppBskyFeedDefsInteractionRepost = 555 "app.bsky.feed.defs#interactionRepost"; 556export type AppBskyFeedDefsSkeletonReasonPin = Record<string, never>; 557export type AppBskyFeedDefsClickthroughAuthor = 558 "app.bsky.feed.defs#clickthroughAuthor"; 559export type AppBskyFeedDefsClickthroughReposter = 560 "app.bsky.feed.defs#clickthroughReposter"; 561 562export interface AppBskyFeedDefsGeneratorViewerState { 563 like?: string; 564} 565 566export interface AppBskyFeedDefsSkeletonReasonRepost { 567 repost: string; 568} 569 570export type AppBskyFeedDefsContentModeUnspecified = 571 "app.bsky.feed.defs#contentModeUnspecified"; 572 573export interface AppBskyFeedPostgate { 574 /** Reference (AT-URI) to the post record. */ 575 post: string; 576 createdAt: string; 577 /** List of rules defining who can embed this post. If value is an empty array or is undefined, no particular rules apply and anyone can embed. */ 578 embeddingRules?: AppBskyFeedPostgate["DisableRule"] | { 579 $type: string; 580 [key: string]: unknown; 581 }[]; 582 /** List of AT-URIs embedding this post that the author has detached from. */ 583 detachedEmbeddingUris?: string[]; 584} 585 586export type AppBskyFeedPostgateSortFields = "post" | "createdAt"; 587export type AppBskyFeedPostgateDisableRule = Record<string, never>; 588 589export interface AppBskyFeedThreadgate { 590 /** Reference (AT-URI) to the post record. */ 591 post: string; 592 /** List of rules defining who can reply to this post. If value is an empty array, no one can reply. If value is undefined, anyone can reply. */ 593 allow?: 594 | AppBskyFeedThreadgate["MentionRule"] 595 | AppBskyFeedThreadgate["FollowerRule"] 596 | AppBskyFeedThreadgate["FollowingRule"] 597 | AppBskyFeedThreadgate["ListRule"] 598 | { $type: string; [key: string]: unknown }[]; 599 createdAt: string; 600 /** List of hidden reply URIs. */ 601 hiddenReplies?: string[]; 602} 603 604export type AppBskyFeedThreadgateSortFields = "post" | "createdAt"; 605 606export interface AppBskyFeedThreadgateListRule { 607 list: string; 608} 609 610export type AppBskyFeedThreadgateMentionRule = Record<string, never>; 611export type AppBskyFeedThreadgateFollowerRule = Record<string, never>; 612export type AppBskyFeedThreadgateFollowingRule = Record<string, never>; 613 614export interface AppBskyRichtextFacetTag { 615 tag: string; 616} 617 618export interface AppBskyRichtextFacetLink { 619 uri: string; 620} 621 622export interface AppBskyRichtextFacetMain { 623 index: AppBskyRichtextFacet["ByteSlice"]; 624 features: 625 | AppBskyRichtextFacet["Mention"] 626 | AppBskyRichtextFacet["Link"] 627 | AppBskyRichtextFacet["Tag"] 628 | { $type: string; [key: string]: unknown }[]; 629} 630 631export interface AppBskyRichtextFacetMention { 632 did: string; 633} 634 635export interface AppBskyRichtextFacetByteSlice { 636 byteEnd: number; 637 byteStart: number; 638} 639 640export interface AppBskyActorDefsNux { 641 id: string; 642 /** Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. */ 643 data?: string; 644 completed: boolean; 645 /** The date and time at which the NUX will expire and should be considered completed. */ 646 expiresAt?: string; 647} 648 649export interface AppBskyActorDefsMutedWord { 650 id?: string; 651 /** The muted word itself. */ 652 value: string; 653 /** The intended targets of the muted word. */ 654 targets: AppBskyActorDefs["MutedWordTarget"][]; 655 /** The date and time at which the muted word will expire and no longer be applied. */ 656 expiresAt?: string; 657 /** Groups of users to apply the muted word to. If undefined, applies to all users. */ 658 actorTarget?: AppBskyActorDefsActorTarget; 659} 660 661export interface AppBskyActorDefsSavedFeed { 662 id: string; 663 type: AppBskyActorDefsType; 664 value: string; 665 pinned: boolean; 666} 667 668export type AppBskyActorDefsPreferences = 669 | AppBskyActorDefs["AdultContentPref"] 670 | AppBskyActorDefs["ContentLabelPref"] 671 | AppBskyActorDefs["SavedFeedsPref"] 672 | AppBskyActorDefs["SavedFeedsPrefV2"] 673 | AppBskyActorDefs["PersonalDetailsPref"] 674 | AppBskyActorDefs["FeedViewPref"] 675 | AppBskyActorDefs["ThreadViewPref"] 676 | AppBskyActorDefs["InterestsPref"] 677 | AppBskyActorDefs["MutedWordsPref"] 678 | AppBskyActorDefs["HiddenPostsPref"] 679 | AppBskyActorDefs["BskyAppStatePref"] 680 | AppBskyActorDefs["LabelersPref"] 681 | AppBskyActorDefs["PostInteractionSettingsPref"] 682 | { $type: string; [key: string]: unknown }[]; 683 684export interface AppBskyActorDefsProfileView { 685 did: string; 686 avatar?: string; 687 handle: string; 688 labels?: ComAtprotoLabelDefs["Label"][]; 689 viewer?: AppBskyActorDefs["ViewerState"]; 690 createdAt?: string; 691 indexedAt?: string; 692 associated?: AppBskyActorDefs["ProfileAssociated"]; 693 description?: string; 694 displayName?: string; 695} 696 697export interface AppBskyActorDefsViewerState { 698 muted?: boolean; 699 blocking?: string; 700 blockedBy?: boolean; 701 following?: string; 702 followedBy?: string; 703 mutedByList?: AppBskyGraphDefs["ListViewBasic"]; 704 blockingByList?: AppBskyGraphDefs["ListViewBasic"]; 705 knownFollowers?: AppBskyActorDefs["KnownFollowers"]; 706} 707 708export interface AppBskyActorDefsFeedViewPref { 709 /** The URI of the feed, or an identifier which describes the feed. */ 710 feed: string; 711 /** Hide replies in the feed. */ 712 hideReplies?: boolean; 713 /** Hide reposts in the feed. */ 714 hideReposts?: boolean; 715 /** Hide quote posts in the feed. */ 716 hideQuotePosts?: boolean; 717 /** Hide replies in the feed if they do not have this number of likes. */ 718 hideRepliesByLikeCount?: number; 719 /** Hide replies in the feed if they are not by followed users. */ 720 hideRepliesByUnfollowed?: boolean; 721} 722 723export interface AppBskyActorDefsLabelersPref { 724 labelers: AppBskyActorDefs["LabelerPrefItem"][]; 725} 726 727export interface AppBskyActorDefsInterestsPref { 728 /** A list of tags which describe the account owner's interests gathered during onboarding. */ 729 tags: string[]; 730} 731 732export interface AppBskyActorDefsKnownFollowers { 733 count: number; 734 followers: AppBskyActorDefs["ProfileViewBasic"][]; 735} 736 737export interface AppBskyActorDefsMutedWordsPref { 738 /** A list of words the account owner has muted. */ 739 items: AppBskyActorDefs["MutedWord"][]; 740} 741 742export interface AppBskyActorDefsSavedFeedsPref { 743 saved: string[]; 744 pinned: string[]; 745 timelineIndex?: number; 746} 747 748export interface AppBskyActorDefsThreadViewPref { 749 /** Sorting mode for threads. */ 750 sort?: AppBskyActorDefsSort; 751 /** Show followed users at the top of all replies. */ 752 prioritizeFollowedUsers?: boolean; 753} 754 755export interface AppBskyActorDefsHiddenPostsPref { 756 /** A list of URIs of posts the account owner has hidden. */ 757 items: string[]; 758} 759 760export interface AppBskyActorDefsLabelerPrefItem { 761 did: string; 762} 763 764export interface AppBskyActorDefsAdultContentPref { 765 enabled: boolean; 766} 767 768export interface AppBskyActorDefsBskyAppStatePref { 769 /** Storage for NUXs the user has encountered. */ 770 nuxs?: AppBskyActorDefs["Nux"][]; 771 /** An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. */ 772 queuedNudges?: string[]; 773 activeProgressGuide?: AppBskyActorDefs["BskyAppProgressGuide"]; 774} 775 776export interface AppBskyActorDefsContentLabelPref { 777 label: string; 778 /** Which labeler does this preference apply to? If undefined, applies globally. */ 779 labelerDid?: string; 780 visibility: AppBskyActorDefsVisibility; 781} 782 783export interface AppBskyActorDefsProfileViewBasic { 784 did: string; 785 avatar?: string; 786 handle: string; 787 labels?: ComAtprotoLabelDefs["Label"][]; 788 viewer?: AppBskyActorDefs["ViewerState"]; 789 createdAt?: string; 790 associated?: AppBskyActorDefs["ProfileAssociated"]; 791 displayName?: string; 792} 793 794export interface AppBskyActorDefsSavedFeedsPrefV2 { 795 items: AppBskyActorDefs["SavedFeed"][]; 796} 797 798export interface AppBskyActorDefsProfileAssociated { 799 chat?: AppBskyActorDefs["ProfileAssociatedChat"]; 800 lists?: number; 801 labeler?: boolean; 802 feedgens?: number; 803 starterPacks?: number; 804} 805 806export interface AppBskyActorDefsPersonalDetailsPref { 807 /** The birth date of account owner. */ 808 birthDate?: string; 809} 810 811export interface AppBskyActorDefsProfileViewDetailed { 812 did: string; 813 avatar?: string; 814 banner?: string; 815 handle: string; 816 labels?: ComAtprotoLabelDefs["Label"][]; 817 viewer?: AppBskyActorDefs["ViewerState"]; 818 createdAt?: string; 819 indexedAt?: string; 820 associated?: AppBskyActorDefs["ProfileAssociated"]; 821 pinnedPost?: ComAtprotoRepoStrongRef; 822 postsCount?: number; 823 description?: string; 824 displayName?: string; 825 followsCount?: number; 826 followersCount?: number; 827 joinedViaStarterPack?: AppBskyGraphDefs["StarterPackViewBasic"]; 828} 829 830export interface AppBskyActorDefsBskyAppProgressGuide { 831 guide: string; 832} 833 834export interface AppBskyActorDefsProfileAssociatedChat { 835 allowIncoming: AppBskyActorDefsAllowIncoming; 836} 837 838export interface AppBskyActorDefsPostInteractionSettingsPref { 839 /** Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply. */ 840 threadgateAllowRules?: 841 | AppBskyFeedThreadgate["MentionRule"] 842 | AppBskyFeedThreadgate["FollowerRule"] 843 | AppBskyFeedThreadgate["FollowingRule"] 844 | AppBskyFeedThreadgate["ListRule"] 845 | { $type: string; [key: string]: unknown }[]; 846 /** Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed. */ 847 postgateEmbeddingRules?: AppBskyFeedPostgate["DisableRule"] | { 848 $type: string; 849 [key: string]: unknown; 850 }[]; 851} 852 853export interface AppBskyActorProfile { 854 /** Small image to be displayed next to posts from account. AKA, 'profile picture' */ 855 avatar?: BlobRef; 856 /** Larger horizontal image to display behind profile view. */ 857 banner?: BlobRef; 858 /** Self-label values, specific to the Bluesky application, on the overall account. */ 859 labels?: ComAtprotoLabelDefs["SelfLabels"] | { 860 $type: string; 861 [key: string]: unknown; 862 }; 863 createdAt?: string; 864 pinnedPost?: ComAtprotoRepoStrongRef; 865 /** Free-form profile description text. */ 866 description?: string; 867 displayName?: string; 868 joinedViaStarterPack?: ComAtprotoRepoStrongRef; 869} 870 871export type AppBskyActorProfileSortFields = 872 | "createdAt" 873 | "description" 874 | "displayName"; 875 876export interface AppBskyLabelerDefsLabelerView { 877 cid: string; 878 uri: string; 879 labels?: ComAtprotoLabelDefs["Label"][]; 880 viewer?: AppBskyLabelerDefs["LabelerViewerState"]; 881 creator: AppBskyActorDefs["ProfileView"]; 882 indexedAt: string; 883 likeCount?: number; 884} 885 886export interface AppBskyLabelerDefsLabelerPolicies { 887 /** The label values which this labeler publishes. May include global or custom labels. */ 888 labelValues: ComAtprotoLabelDefs["LabelValue"][]; 889 /** Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler. */ 890 labelValueDefinitions?: ComAtprotoLabelDefs["LabelValueDefinition"][]; 891} 892 893export interface AppBskyLabelerDefsLabelerViewerState { 894 like?: string; 895} 896 897export interface AppBskyLabelerDefsLabelerViewDetailed { 898 cid: string; 899 uri: string; 900 labels?: ComAtprotoLabelDefs["Label"][]; 901 viewer?: AppBskyLabelerDefs["LabelerViewerState"]; 902 creator: AppBskyActorDefs["ProfileView"]; 903 policies: AppBskyLabelerDefs["LabelerPolicies"]; 904 indexedAt: string; 905 likeCount?: number; 906} 907 908export interface NetworkSlicesWaitlistRequest { 909 /** The AT URI of the slice being requested access to */ 910 slice: string; 911 /** When the user joined the waitlist */ 912 createdAt: string; 913} 914 915export type NetworkSlicesWaitlistRequestSortFields = "slice" | "createdAt"; 916 917export interface NetworkSlicesWaitlistDefsRequestView { 918 /** The AT URI of the slice being requested access to */ 919 slice: string; 920 /** When the user joined the waitlist */ 921 createdAt: string; 922 /** Profile of the requester */ 923 profile?: AppBskyActorDefs["ProfileViewBasic"]; 924} 925 926export interface NetworkSlicesWaitlistDefsInviteView { 927 /** The DID being invited */ 928 did: string; 929 /** The AT URI of the slice this invite is for */ 930 slice: string; 931 /** When this invitation was created */ 932 createdAt: string; 933 /** Optional expiration date for this invitation */ 934 expiresAt?: string; 935 /** The AT URI of this invite record */ 936 uri?: string; 937 /** Profile of the invitee */ 938 profile?: AppBskyActorDefs["ProfileViewBasic"]; 939} 940 941export interface NetworkSlicesWaitlistInvite { 942 /** The DID being invited */ 943 did: string; 944 /** The AT URI of the slice this invite is for */ 945 slice: string; 946 /** When this invitation was created */ 947 createdAt: string; 948 /** Optional expiration date for this invitation */ 949 expiresAt?: string; 950} 951 952export type NetworkSlicesWaitlistInviteSortFields = 953 | "did" 954 | "slice" 955 | "createdAt" 956 | "expiresAt"; 957 958export interface NetworkSlicesSliceSyncUserCollectionsInput { 959 slice: string; 960 timeoutSeconds?: number; 961} 962 963export interface NetworkSlicesSliceSyncUserCollectionsOutput { 964 reposProcessed: number; 965 recordsSynced: number; 966 timedOut: boolean; 967} 968 969export interface NetworkSlicesSliceDefsSliceView { 970 uri: string; 971 cid: string; 972 /** Display name of the slice */ 973 name: string; 974 /** Primary domain namespace for this slice (e.g. social.grain) */ 975 domain: string; 976 /** Profile of the slice creator */ 977 creator: NetworkSlicesActorDefs["ProfileViewBasic"]; 978 createdAt: string; 979 /** Recent activity sparkline data points for the last 24 hours */ 980 sparkline?: NetworkSlicesSliceDefs["SparklinePoint"][]; 981 /** Total number of indexed records in this slice */ 982 indexedRecordCount?: number; 983 /** Total number of unique indexed actors in this slice */ 984 indexedActorCount?: number; 985 /** Number of collections with indexed records */ 986 indexedCollectionCount?: number; 987 /** Total number of waitlist requests for this slice */ 988 waitlistRequestCount?: number; 989 /** Total number of waitlist invites for this slice */ 990 waitlistInviteCount?: number; 991} 992 993export interface NetworkSlicesSliceDefsSparklinePoint { 994 timestamp: string; 995 count: number; 996} 997 998export interface NetworkSlicesSliceGetSparklinesInput { 999 slices: string[]; 1000 interval?: string; 1001 duration?: string; 1002} 1003 1004export interface NetworkSlicesSliceGetSparklinesOutput { 1005 sparklines: NetworkSlicesSliceGetSparklines["SparklineEntry"][]; 1006} 1007 1008export interface NetworkSlicesSliceGetSparklinesSparklineEntry { 1009 /** AT-URI of the slice */ 1010 sliceUri: string; 1011 /** Array of sparkline data points */ 1012 points: NetworkSlicesSliceDefs["SparklinePoint"][]; 1013} 1014 1015export interface NetworkSlicesSliceGetJobLogsParams { 1016 jobId: string; 1017 limit?: number; 1018} 1019 1020export interface NetworkSlicesSliceGetJobLogsOutput { 1021 logs: NetworkSlicesSliceGetJobLogs["LogEntry"][]; 1022} 1023 1024export interface NetworkSlicesSliceGetJobLogsLogEntry { 1025 /** Log entry ID */ 1026 id: number; 1027 /** When the log entry was created */ 1028 createdAt: string; 1029 /** Type of log entry */ 1030 logType: string; 1031 /** UUID of related job if applicable */ 1032 jobId?: string; 1033 /** DID of related user if applicable */ 1034 userDid?: string; 1035 /** AT-URI of related slice if applicable */ 1036 sliceUri?: string; 1037 /** Log level */ 1038 level: string; 1039 /** Log message */ 1040 message: string; 1041 /** Additional metadata associated with the log entry */ 1042 metadata?: unknown; 1043} 1044 1045export interface NetworkSlicesSliceGetJetstreamStatusOutput { 1046 connected: boolean; 1047} 1048 1049export interface NetworkSlicesSliceGetSyncSummaryParams { 1050 slice: string; 1051 collections?: string[]; 1052 externalCollections?: string[]; 1053 repos?: string[]; 1054 maxRepos?: number; 1055} 1056 1057export interface NetworkSlicesSliceGetSyncSummaryOutput { 1058 totalRepos: number; 1059 cappedRepos: number; 1060 collectionsSummary: NetworkSlicesSliceGetSyncSummary["CollectionSummary"][]; 1061 wouldBeCapped: boolean; 1062 appliedLimit: number; 1063} 1064 1065export interface NetworkSlicesSliceGetSyncSummaryCollectionSummary { 1066 collection: string; 1067 estimatedRepos: number; 1068 isExternal: boolean; 1069} 1070 1071export interface NetworkSlicesSlice { 1072 /** Name of the slice */ 1073 name: string; 1074 /** Primary domain namespace for this slice (e.g. social.grain) */ 1075 domain: string; 1076 /** When the slice was created */ 1077 createdAt: string; 1078} 1079 1080export type NetworkSlicesSliceSortFields = "name" | "domain" | "createdAt"; 1081 1082export interface NetworkSlicesSliceGetJobStatusParams { 1083 jobId: string; 1084} 1085 1086export type NetworkSlicesSliceGetJobStatusOutput = 1087 NetworkSlicesSliceGetJobStatus["JobStatus"]; 1088 1089export interface NetworkSlicesSliceGetJobStatusJobStatus { 1090 /** UUID of the job */ 1091 jobId: string; 1092 /** Current status of the job */ 1093 status: string; 1094 /** When the job was created */ 1095 createdAt: string; 1096 /** When the job started executing */ 1097 startedAt?: string; 1098 /** When the job completed */ 1099 completedAt?: string; 1100 /** Job result if completed successfully */ 1101 result?: NetworkSlicesSliceGetJobStatus["SyncJobResult"]; 1102 /** Error message if job failed */ 1103 error?: string; 1104 /** Number of times the job has been retried */ 1105 retryCount: number; 1106} 1107 1108export interface NetworkSlicesSliceGetJobStatusSyncJobResult { 1109 /** Whether the sync job completed successfully */ 1110 success: boolean; 1111 /** Total number of records synced */ 1112 totalRecords: number; 1113 /** List of collection NSIDs that were synced */ 1114 collectionsSynced: string[]; 1115 /** Number of repositories processed */ 1116 reposProcessed: number; 1117 /** Human-readable message about the job completion */ 1118 message: string; 1119} 1120 1121export interface NetworkSlicesSliceGetActorsInput { 1122 slice: string; 1123 limit?: number; 1124 cursor?: string; 1125 where?: unknown; 1126} 1127 1128export interface NetworkSlicesSliceGetActorsOutput { 1129 actors: NetworkSlicesSliceGetActors["Actor"][]; 1130 cursor?: string; 1131} 1132 1133export interface NetworkSlicesSliceGetActorsActor { 1134 /** Decentralized identifier of the actor */ 1135 did: string; 1136 /** Human-readable handle of the actor */ 1137 handle?: string; 1138 /** AT-URI of the slice this actor is indexed in */ 1139 sliceUri: string; 1140 /** When this actor was indexed */ 1141 indexedAt: string; 1142} 1143 1144export interface NetworkSlicesSliceClearSliceRecordsInput { 1145 slice: string; 1146} 1147 1148export interface NetworkSlicesSliceClearSliceRecordsOutput { 1149 message: string; 1150} 1151 1152export interface NetworkSlicesSliceDeleteOAuthClientInput { 1153 clientId: string; 1154} 1155 1156export interface NetworkSlicesSliceDeleteOAuthClientOutput { 1157 message: string; 1158} 1159 1160export interface NetworkSlicesSliceCreateOAuthClientInput { 1161 sliceUri: string; 1162 clientName: string; 1163 redirectUris: string[]; 1164 grantTypes?: string[]; 1165 responseTypes?: string[]; 1166 scope?: string; 1167 clientUri?: string; 1168 logoUri?: string; 1169 tosUri?: string; 1170 policyUri?: string; 1171} 1172 1173export type NetworkSlicesSliceCreateOAuthClientOutput = 1174 NetworkSlicesSliceGetOAuthClients["OauthClientDetails"]; 1175 1176export interface NetworkSlicesSliceGetJetstreamLogsParams { 1177 slice?: string; 1178 limit?: number; 1179} 1180 1181export interface NetworkSlicesSliceGetJetstreamLogsOutput { 1182 logs: NetworkSlicesSliceGetJobLogs["LogEntry"][]; 1183} 1184 1185export interface NetworkSlicesSliceGetSliceRecordsInput { 1186 slice: string; 1187 limit?: number; 1188 cursor?: string; 1189 where?: unknown; 1190 sortBy?: unknown; 1191} 1192 1193export interface NetworkSlicesSliceGetSliceRecordsOutput { 1194 records: NetworkSlicesSliceGetSliceRecords["IndexedRecord"][]; 1195 cursor?: string; 1196} 1197 1198export interface NetworkSlicesSliceGetSliceRecordsIndexedRecord { 1199 /** AT-URI of the record */ 1200 uri: string; 1201 /** Content identifier of the record */ 1202 cid: string; 1203 /** DID of the record creator */ 1204 did: string; 1205 /** NSID of the collection this record belongs to */ 1206 collection: string; 1207 /** The record value/content */ 1208 value: unknown; 1209 /** When this record was indexed */ 1210 indexedAt: string; 1211} 1212 1213export interface NetworkSlicesSliceStartSyncInput { 1214 slice: string; 1215 collections?: string[]; 1216 externalCollections?: string[]; 1217 repos?: string[]; 1218 limitPerRepo?: number; 1219 skipValidation?: boolean; 1220} 1221 1222export interface NetworkSlicesSliceStartSyncOutput { 1223 jobId: string; 1224 message: string; 1225} 1226 1227export interface NetworkSlicesSliceGetJobHistoryParams { 1228 userDid: string; 1229 sliceUri: string; 1230 limit?: number; 1231} 1232 1233export type NetworkSlicesSliceGetJobHistoryOutput = 1234 NetworkSlicesSliceGetJobStatus["JobStatus"][]; 1235 1236export interface NetworkSlicesSliceStatsParams { 1237 slice: string; 1238} 1239 1240export interface NetworkSlicesSliceStatsOutput { 1241 collections: string[]; 1242 collectionStats: NetworkSlicesSliceStats["CollectionStats"][]; 1243 totalLexicons: number; 1244 totalRecords: number; 1245 totalActors: number; 1246} 1247 1248export interface NetworkSlicesSliceStatsCollectionStats { 1249 /** Collection NSID */ 1250 collection: string; 1251 /** Number of records in this collection */ 1252 recordCount: number; 1253 /** Number of unique actors with records in this collection */ 1254 uniqueActors: number; 1255} 1256 1257export interface NetworkSlicesSliceUpdateOAuthClientInput { 1258 clientId: string; 1259 clientName?: string; 1260 redirectUris?: string[]; 1261 scope?: string; 1262 clientUri?: string; 1263 logoUri?: string; 1264 tosUri?: string; 1265 policyUri?: string; 1266} 1267 1268export type NetworkSlicesSliceUpdateOAuthClientOutput = 1269 NetworkSlicesSliceGetOAuthClients["OauthClientDetails"]; 1270 1271export interface NetworkSlicesSliceGetOAuthClientsParams { 1272 slice: string; 1273} 1274 1275export interface NetworkSlicesSliceGetOAuthClientsOutput { 1276 clients: NetworkSlicesSliceGetOAuthClients["OauthClientDetails"][]; 1277} 1278 1279export interface NetworkSlicesSliceGetOAuthClientsOauthClientDetails { 1280 /** OAuth client ID */ 1281 clientId: string; 1282 /** OAuth client secret (only returned on creation) */ 1283 clientSecret?: string; 1284 /** Human-readable name of the OAuth client */ 1285 clientName: string; 1286 /** Allowed redirect URIs for OAuth flow */ 1287 redirectUris: string[]; 1288 /** Allowed OAuth grant types */ 1289 grantTypes: string[]; 1290 /** Allowed OAuth response types */ 1291 responseTypes: string[]; 1292 /** OAuth scope */ 1293 scope?: string; 1294 /** URI of the client application */ 1295 clientUri?: string; 1296 /** URI of the client logo */ 1297 logoUri?: string; 1298 /** URI of the terms of service */ 1299 tosUri?: string; 1300 /** URI of the privacy policy */ 1301 policyUri?: string; 1302 /** When the OAuth client was created */ 1303 createdAt: string; 1304 /** DID of the user who created this client */ 1305 createdByDid: string; 1306} 1307 1308export interface NetworkSlicesLexicon { 1309 /** Namespaced identifier for the lexicon */ 1310 nsid: string; 1311 /** Human-readable description of the lexicon */ 1312 description?: string; 1313 /** The lexicon schema definitions as JSON */ 1314 definitions: string; 1315 /** When the lexicon was created */ 1316 createdAt: string; 1317 /** When the lexicon was last updated */ 1318 updatedAt?: string; 1319 /** AT-URI reference to the slice this lexicon belongs to */ 1320 slice: string; 1321 /** Whether this lexicon should be excluded from sync operations */ 1322 excludedFromSync?: boolean; 1323} 1324 1325export type NetworkSlicesLexiconSortFields = 1326 | "nsid" 1327 | "description" 1328 | "definitions" 1329 | "createdAt" 1330 | "updatedAt" 1331 | "slice"; 1332 1333export interface NetworkSlicesActorDefsProfileViewBasic { 1334 did: string; 1335 handle: string; 1336 displayName?: string; 1337 /** Free-form profile description text. */ 1338 description?: string; 1339 avatar?: string; 1340} 1341 1342export interface NetworkSlicesActorProfile { 1343 displayName?: string; 1344 /** Free-form profile description text. */ 1345 description?: string; 1346 /** Small image to be displayed next to posts from account. AKA, 'profile picture' */ 1347 avatar?: BlobRef; 1348 createdAt?: string; 1349} 1350 1351export type NetworkSlicesActorProfileSortFields = 1352 | "displayName" 1353 | "description" 1354 | "createdAt"; 1355 1356export interface ComAtprotoLabelDefsLabel { 1357 /** Optionally, CID specifying the specific version of 'uri' resource this label applies to. */ 1358 cid?: string; 1359 /** Timestamp when this label was created. */ 1360 cts: string; 1361 /** Timestamp at which this label expires (no longer applies). */ 1362 exp?: string; 1363 /** If true, this is a negation label, overwriting a previous label. */ 1364 neg?: boolean; 1365 /** Signature of dag-cbor encoded label. */ 1366 sig?: string; 1367 /** DID of the actor who created this label. */ 1368 src: string; 1369 /** AT URI of the record, repository (account), or other resource that this label applies to. */ 1370 uri: string; 1371 /** The short string name of the value or type of this label. */ 1372 val: string; 1373 /** The AT Protocol version of the label object. */ 1374 ver?: number; 1375} 1376 1377export interface ComAtprotoLabelDefsSelfLabel { 1378 /** The short string name of the value or type of this label. */ 1379 val: string; 1380} 1381 1382export interface ComAtprotoLabelDefsSelfLabels { 1383 values: ComAtprotoLabelDefs["SelfLabel"][]; 1384} 1385 1386export interface ComAtprotoLabelDefsLabelValueDefinition { 1387 /** What should this label hide in the UI, if applied? 'content' hides all of the target; 'media' hides the images/video/audio; 'none' hides nothing. */ 1388 blurs: ComAtprotoLabelDefsBlurs; 1389 locales: ComAtprotoLabelDefs["LabelValueDefinitionStrings"][]; 1390 /** How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing. */ 1391 severity: ComAtprotoLabelDefsSeverity; 1392 /** Does the user need to have adult content enabled in order to configure this label? */ 1393 adultOnly?: boolean; 1394 /** The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+). */ 1395 identifier: string; 1396 /** The default setting for this label. */ 1397 defaultSetting?: ComAtprotoLabelDefsDefaultSetting; 1398} 1399 1400export interface ComAtprotoLabelDefsLabelValueDefinitionStrings { 1401 /** The code of the language these strings are written in. */ 1402 lang: string; 1403 /** A short human-readable name for the label. */ 1404 name: string; 1405 /** A longer description of what the label means and why it might be applied. */ 1406 description: string; 1407} 1408 1409export interface ComAtprotoRepoStrongRef { 1410 cid: string; 1411 uri: string; 1412} 1413 1414export interface AppBskyEmbedDefs { 1415 readonly AspectRatio: AppBskyEmbedDefsAspectRatio; 1416} 1417 1418export interface AppBskyEmbedRecord { 1419 readonly Main: AppBskyEmbedRecordMain; 1420 readonly View: AppBskyEmbedRecordView; 1421 readonly ViewRecord: AppBskyEmbedRecordViewRecord; 1422 readonly ViewBlocked: AppBskyEmbedRecordViewBlocked; 1423 readonly ViewDetached: AppBskyEmbedRecordViewDetached; 1424 readonly ViewNotFound: AppBskyEmbedRecordViewNotFound; 1425} 1426 1427export interface AppBskyEmbedImages { 1428 readonly Main: AppBskyEmbedImagesMain; 1429 readonly View: AppBskyEmbedImagesView; 1430 readonly Image: AppBskyEmbedImagesImage; 1431 readonly ViewImage: AppBskyEmbedImagesViewImage; 1432} 1433 1434export interface AppBskyEmbedRecordWithMedia { 1435 readonly Main: AppBskyEmbedRecordWithMediaMain; 1436 readonly View: AppBskyEmbedRecordWithMediaView; 1437} 1438 1439export interface AppBskyEmbedVideo { 1440 readonly Main: AppBskyEmbedVideoMain; 1441 readonly View: AppBskyEmbedVideoView; 1442 readonly Caption: AppBskyEmbedVideoCaption; 1443} 1444 1445export interface AppBskyEmbedExternal { 1446 readonly Main: AppBskyEmbedExternalMain; 1447 readonly View: AppBskyEmbedExternalView; 1448 readonly External: AppBskyEmbedExternalExternal; 1449 readonly ViewExternal: AppBskyEmbedExternalViewExternal; 1450} 1451 1452export interface AppBskyGraphDefs { 1453 readonly Modlist: AppBskyGraphDefsModlist; 1454 readonly ListView: AppBskyGraphDefsListView; 1455 readonly Curatelist: AppBskyGraphDefsCuratelist; 1456 readonly ListPurpose: AppBskyGraphDefsListPurpose; 1457 readonly ListItemView: AppBskyGraphDefsListItemView; 1458 readonly Relationship: AppBskyGraphDefsRelationship; 1459 readonly ListViewBasic: AppBskyGraphDefsListViewBasic; 1460 readonly NotFoundActor: AppBskyGraphDefsNotFoundActor; 1461 readonly Referencelist: AppBskyGraphDefsReferencelist; 1462 readonly ListViewerState: AppBskyGraphDefsListViewerState; 1463 readonly StarterPackView: AppBskyGraphDefsStarterPackView; 1464 readonly StarterPackViewBasic: AppBskyGraphDefsStarterPackViewBasic; 1465} 1466 1467export interface AppBskyFeedDefs { 1468 readonly PostView: AppBskyFeedDefsPostView; 1469 readonly ReplyRef: AppBskyFeedDefsReplyRef; 1470 readonly ReasonPin: AppBskyFeedDefsReasonPin; 1471 readonly BlockedPost: AppBskyFeedDefsBlockedPost; 1472 readonly Interaction: AppBskyFeedDefsInteraction; 1473 readonly RequestLess: AppBskyFeedDefsRequestLess; 1474 readonly RequestMore: AppBskyFeedDefsRequestMore; 1475 readonly ViewerState: AppBskyFeedDefsViewerState; 1476 readonly FeedViewPost: AppBskyFeedDefsFeedViewPost; 1477 readonly NotFoundPost: AppBskyFeedDefsNotFoundPost; 1478 readonly ReasonRepost: AppBskyFeedDefsReasonRepost; 1479 readonly BlockedAuthor: AppBskyFeedDefsBlockedAuthor; 1480 readonly GeneratorView: AppBskyFeedDefsGeneratorView; 1481 readonly ThreadContext: AppBskyFeedDefsThreadContext; 1482 readonly ThreadViewPost: AppBskyFeedDefsThreadViewPost; 1483 readonly ThreadgateView: AppBskyFeedDefsThreadgateView; 1484 readonly InteractionLike: AppBskyFeedDefsInteractionLike; 1485 readonly InteractionSeen: AppBskyFeedDefsInteractionSeen; 1486 readonly ClickthroughItem: AppBskyFeedDefsClickthroughItem; 1487 readonly ContentModeVideo: AppBskyFeedDefsContentModeVideo; 1488 readonly InteractionQuote: AppBskyFeedDefsInteractionQuote; 1489 readonly InteractionReply: AppBskyFeedDefsInteractionReply; 1490 readonly InteractionShare: AppBskyFeedDefsInteractionShare; 1491 readonly SkeletonFeedPost: AppBskyFeedDefsSkeletonFeedPost; 1492 readonly ClickthroughEmbed: AppBskyFeedDefsClickthroughEmbed; 1493 readonly InteractionRepost: AppBskyFeedDefsInteractionRepost; 1494 readonly SkeletonReasonPin: AppBskyFeedDefsSkeletonReasonPin; 1495 readonly ClickthroughAuthor: AppBskyFeedDefsClickthroughAuthor; 1496 readonly ClickthroughReposter: AppBskyFeedDefsClickthroughReposter; 1497 readonly GeneratorViewerState: AppBskyFeedDefsGeneratorViewerState; 1498 readonly SkeletonReasonRepost: AppBskyFeedDefsSkeletonReasonRepost; 1499 readonly ContentModeUnspecified: AppBskyFeedDefsContentModeUnspecified; 1500} 1501 1502export interface AppBskyFeedPostgate { 1503 readonly Main: AppBskyFeedPostgate; 1504 readonly DisableRule: AppBskyFeedPostgateDisableRule; 1505} 1506 1507export interface AppBskyFeedThreadgate { 1508 readonly Main: AppBskyFeedThreadgate; 1509 readonly ListRule: AppBskyFeedThreadgateListRule; 1510 readonly MentionRule: AppBskyFeedThreadgateMentionRule; 1511 readonly FollowerRule: AppBskyFeedThreadgateFollowerRule; 1512 readonly FollowingRule: AppBskyFeedThreadgateFollowingRule; 1513} 1514 1515export interface AppBskyRichtextFacet { 1516 readonly Tag: AppBskyRichtextFacetTag; 1517 readonly Link: AppBskyRichtextFacetLink; 1518 readonly Main: AppBskyRichtextFacetMain; 1519 readonly Mention: AppBskyRichtextFacetMention; 1520 readonly ByteSlice: AppBskyRichtextFacetByteSlice; 1521} 1522 1523export interface AppBskyActorDefs { 1524 readonly Nux: AppBskyActorDefsNux; 1525 readonly MutedWord: AppBskyActorDefsMutedWord; 1526 readonly SavedFeed: AppBskyActorDefsSavedFeed; 1527 readonly Preferences: AppBskyActorDefsPreferences; 1528 readonly ProfileView: AppBskyActorDefsProfileView; 1529 readonly ViewerState: AppBskyActorDefsViewerState; 1530 readonly FeedViewPref: AppBskyActorDefsFeedViewPref; 1531 readonly LabelersPref: AppBskyActorDefsLabelersPref; 1532 readonly InterestsPref: AppBskyActorDefsInterestsPref; 1533 readonly KnownFollowers: AppBskyActorDefsKnownFollowers; 1534 readonly MutedWordsPref: AppBskyActorDefsMutedWordsPref; 1535 readonly SavedFeedsPref: AppBskyActorDefsSavedFeedsPref; 1536 readonly ThreadViewPref: AppBskyActorDefsThreadViewPref; 1537 readonly HiddenPostsPref: AppBskyActorDefsHiddenPostsPref; 1538 readonly LabelerPrefItem: AppBskyActorDefsLabelerPrefItem; 1539 readonly MutedWordTarget: AppBskyActorDefsMutedWordTarget; 1540 readonly AdultContentPref: AppBskyActorDefsAdultContentPref; 1541 readonly BskyAppStatePref: AppBskyActorDefsBskyAppStatePref; 1542 readonly ContentLabelPref: AppBskyActorDefsContentLabelPref; 1543 readonly ProfileViewBasic: AppBskyActorDefsProfileViewBasic; 1544 readonly SavedFeedsPrefV2: AppBskyActorDefsSavedFeedsPrefV2; 1545 readonly ProfileAssociated: AppBskyActorDefsProfileAssociated; 1546 readonly PersonalDetailsPref: AppBskyActorDefsPersonalDetailsPref; 1547 readonly ProfileViewDetailed: AppBskyActorDefsProfileViewDetailed; 1548 readonly BskyAppProgressGuide: AppBskyActorDefsBskyAppProgressGuide; 1549 readonly ProfileAssociatedChat: AppBskyActorDefsProfileAssociatedChat; 1550 readonly PostInteractionSettingsPref: 1551 AppBskyActorDefsPostInteractionSettingsPref; 1552} 1553 1554export interface AppBskyLabelerDefs { 1555 readonly LabelerView: AppBskyLabelerDefsLabelerView; 1556 readonly LabelerPolicies: AppBskyLabelerDefsLabelerPolicies; 1557 readonly LabelerViewerState: AppBskyLabelerDefsLabelerViewerState; 1558 readonly LabelerViewDetailed: AppBskyLabelerDefsLabelerViewDetailed; 1559} 1560 1561export interface NetworkSlicesWaitlistDefs { 1562 readonly RequestView: NetworkSlicesWaitlistDefsRequestView; 1563 readonly InviteView: NetworkSlicesWaitlistDefsInviteView; 1564} 1565 1566export interface NetworkSlicesSliceDefs { 1567 readonly SliceView: NetworkSlicesSliceDefsSliceView; 1568 readonly SparklinePoint: NetworkSlicesSliceDefsSparklinePoint; 1569} 1570 1571export interface NetworkSlicesSliceGetSparklines { 1572 readonly SparklineEntry: NetworkSlicesSliceGetSparklinesSparklineEntry; 1573} 1574 1575export interface NetworkSlicesSliceGetJobLogs { 1576 readonly LogEntry: NetworkSlicesSliceGetJobLogsLogEntry; 1577} 1578 1579export interface NetworkSlicesSliceGetSyncSummary { 1580 readonly CollectionSummary: NetworkSlicesSliceGetSyncSummaryCollectionSummary; 1581} 1582 1583export interface NetworkSlicesSliceGetJobStatus { 1584 readonly JobStatus: NetworkSlicesSliceGetJobStatusJobStatus; 1585 readonly SyncJobResult: NetworkSlicesSliceGetJobStatusSyncJobResult; 1586} 1587 1588export interface NetworkSlicesSliceGetActors { 1589 readonly Actor: NetworkSlicesSliceGetActorsActor; 1590} 1591 1592export interface NetworkSlicesSliceGetSliceRecords { 1593 readonly IndexedRecord: NetworkSlicesSliceGetSliceRecordsIndexedRecord; 1594} 1595 1596export interface NetworkSlicesSliceStats { 1597 readonly CollectionStats: NetworkSlicesSliceStatsCollectionStats; 1598} 1599 1600export interface NetworkSlicesSliceGetOAuthClients { 1601 readonly OauthClientDetails: 1602 NetworkSlicesSliceGetOAuthClientsOauthClientDetails; 1603} 1604 1605export interface NetworkSlicesActorDefs { 1606 readonly ProfileViewBasic: NetworkSlicesActorDefsProfileViewBasic; 1607} 1608 1609export interface ComAtprotoLabelDefs { 1610 readonly Label: ComAtprotoLabelDefsLabel; 1611 readonly SelfLabel: ComAtprotoLabelDefsSelfLabel; 1612 readonly LabelValue: ComAtprotoLabelDefsLabelValue; 1613 readonly SelfLabels: ComAtprotoLabelDefsSelfLabels; 1614 readonly LabelValueDefinition: ComAtprotoLabelDefsLabelValueDefinition; 1615 readonly LabelValueDefinitionStrings: 1616 ComAtprotoLabelDefsLabelValueDefinitionStrings; 1617} 1618 1619class FollowGraphBskyAppClient { 1620 private readonly client: SlicesClient; 1621 1622 constructor(client: SlicesClient) { 1623 this.client = client; 1624 } 1625 1626 async getRecords( 1627 params?: { 1628 limit?: number; 1629 cursor?: string; 1630 where?: { 1631 [K in AppBskyGraphFollowSortFields | IndexedRecordFields]?: 1632 WhereCondition; 1633 }; 1634 orWhere?: { 1635 [K in AppBskyGraphFollowSortFields | IndexedRecordFields]?: 1636 WhereCondition; 1637 }; 1638 sortBy?: SortField<AppBskyGraphFollowSortFields>[]; 1639 }, 1640 ): Promise<GetRecordsResponse<AppBskyGraphFollow>> { 1641 return await this.client.getRecords("app.bsky.graph.follow", params); 1642 } 1643 1644 async getRecord( 1645 params: GetRecordParams, 1646 ): Promise<RecordResponse<AppBskyGraphFollow>> { 1647 return await this.client.getRecord("app.bsky.graph.follow", params); 1648 } 1649 1650 async countRecords( 1651 params?: { 1652 limit?: number; 1653 cursor?: string; 1654 where?: { 1655 [K in AppBskyGraphFollowSortFields | IndexedRecordFields]?: 1656 WhereCondition; 1657 }; 1658 orWhere?: { 1659 [K in AppBskyGraphFollowSortFields | IndexedRecordFields]?: 1660 WhereCondition; 1661 }; 1662 sortBy?: SortField<AppBskyGraphFollowSortFields>[]; 1663 }, 1664 ): Promise<CountRecordsResponse> { 1665 return await this.client.countRecords("app.bsky.graph.follow", params); 1666 } 1667 1668 async createRecord( 1669 record: AppBskyGraphFollow, 1670 useSelfRkey?: boolean, 1671 ): Promise<{ uri: string; cid: string }> { 1672 return await this.client.createRecord( 1673 "app.bsky.graph.follow", 1674 record, 1675 useSelfRkey, 1676 ); 1677 } 1678 1679 async updateRecord( 1680 rkey: string, 1681 record: AppBskyGraphFollow, 1682 ): Promise<{ uri: string; cid: string }> { 1683 return await this.client.updateRecord( 1684 "app.bsky.graph.follow", 1685 rkey, 1686 record, 1687 ); 1688 } 1689 1690 async deleteRecord(rkey: string): Promise<void> { 1691 return await this.client.deleteRecord("app.bsky.graph.follow", rkey); 1692 } 1693} 1694 1695class GraphBskyAppClient { 1696 readonly follow: FollowGraphBskyAppClient; 1697 private readonly client: SlicesClient; 1698 1699 constructor(client: SlicesClient) { 1700 this.client = client; 1701 this.follow = new FollowGraphBskyAppClient(client); 1702 } 1703} 1704 1705class PostgateFeedBskyAppClient { 1706 private readonly client: SlicesClient; 1707 1708 constructor(client: SlicesClient) { 1709 this.client = client; 1710 } 1711 1712 async getRecords( 1713 params?: { 1714 limit?: number; 1715 cursor?: string; 1716 where?: { 1717 [K in AppBskyFeedPostgateSortFields | IndexedRecordFields]?: 1718 WhereCondition; 1719 }; 1720 orWhere?: { 1721 [K in AppBskyFeedPostgateSortFields | IndexedRecordFields]?: 1722 WhereCondition; 1723 }; 1724 sortBy?: SortField<AppBskyFeedPostgateSortFields>[]; 1725 }, 1726 ): Promise<GetRecordsResponse<AppBskyFeedPostgate>> { 1727 return await this.client.getRecords("app.bsky.feed.postgate", params); 1728 } 1729 1730 async getRecord( 1731 params: GetRecordParams, 1732 ): Promise<RecordResponse<AppBskyFeedPostgate>> { 1733 return await this.client.getRecord("app.bsky.feed.postgate", params); 1734 } 1735 1736 async countRecords( 1737 params?: { 1738 limit?: number; 1739 cursor?: string; 1740 where?: { 1741 [K in AppBskyFeedPostgateSortFields | IndexedRecordFields]?: 1742 WhereCondition; 1743 }; 1744 orWhere?: { 1745 [K in AppBskyFeedPostgateSortFields | IndexedRecordFields]?: 1746 WhereCondition; 1747 }; 1748 sortBy?: SortField<AppBskyFeedPostgateSortFields>[]; 1749 }, 1750 ): Promise<CountRecordsResponse> { 1751 return await this.client.countRecords("app.bsky.feed.postgate", params); 1752 } 1753 1754 async createRecord( 1755 record: AppBskyFeedPostgate, 1756 useSelfRkey?: boolean, 1757 ): Promise<{ uri: string; cid: string }> { 1758 return await this.client.createRecord( 1759 "app.bsky.feed.postgate", 1760 record, 1761 useSelfRkey, 1762 ); 1763 } 1764 1765 async updateRecord( 1766 rkey: string, 1767 record: AppBskyFeedPostgate, 1768 ): Promise<{ uri: string; cid: string }> { 1769 return await this.client.updateRecord( 1770 "app.bsky.feed.postgate", 1771 rkey, 1772 record, 1773 ); 1774 } 1775 1776 async deleteRecord(rkey: string): Promise<void> { 1777 return await this.client.deleteRecord("app.bsky.feed.postgate", rkey); 1778 } 1779} 1780 1781class ThreadgateFeedBskyAppClient { 1782 private readonly client: SlicesClient; 1783 1784 constructor(client: SlicesClient) { 1785 this.client = client; 1786 } 1787 1788 async getRecords( 1789 params?: { 1790 limit?: number; 1791 cursor?: string; 1792 where?: { 1793 [K in AppBskyFeedThreadgateSortFields | IndexedRecordFields]?: 1794 WhereCondition; 1795 }; 1796 orWhere?: { 1797 [K in AppBskyFeedThreadgateSortFields | IndexedRecordFields]?: 1798 WhereCondition; 1799 }; 1800 sortBy?: SortField<AppBskyFeedThreadgateSortFields>[]; 1801 }, 1802 ): Promise<GetRecordsResponse<AppBskyFeedThreadgate>> { 1803 return await this.client.getRecords("app.bsky.feed.threadgate", params); 1804 } 1805 1806 async getRecord( 1807 params: GetRecordParams, 1808 ): Promise<RecordResponse<AppBskyFeedThreadgate>> { 1809 return await this.client.getRecord("app.bsky.feed.threadgate", params); 1810 } 1811 1812 async countRecords( 1813 params?: { 1814 limit?: number; 1815 cursor?: string; 1816 where?: { 1817 [K in AppBskyFeedThreadgateSortFields | IndexedRecordFields]?: 1818 WhereCondition; 1819 }; 1820 orWhere?: { 1821 [K in AppBskyFeedThreadgateSortFields | IndexedRecordFields]?: 1822 WhereCondition; 1823 }; 1824 sortBy?: SortField<AppBskyFeedThreadgateSortFields>[]; 1825 }, 1826 ): Promise<CountRecordsResponse> { 1827 return await this.client.countRecords("app.bsky.feed.threadgate", params); 1828 } 1829 1830 async createRecord( 1831 record: AppBskyFeedThreadgate, 1832 useSelfRkey?: boolean, 1833 ): Promise<{ uri: string; cid: string }> { 1834 return await this.client.createRecord( 1835 "app.bsky.feed.threadgate", 1836 record, 1837 useSelfRkey, 1838 ); 1839 } 1840 1841 async updateRecord( 1842 rkey: string, 1843 record: AppBskyFeedThreadgate, 1844 ): Promise<{ uri: string; cid: string }> { 1845 return await this.client.updateRecord( 1846 "app.bsky.feed.threadgate", 1847 rkey, 1848 record, 1849 ); 1850 } 1851 1852 async deleteRecord(rkey: string): Promise<void> { 1853 return await this.client.deleteRecord("app.bsky.feed.threadgate", rkey); 1854 } 1855} 1856 1857class FeedBskyAppClient { 1858 readonly postgate: PostgateFeedBskyAppClient; 1859 readonly threadgate: ThreadgateFeedBskyAppClient; 1860 private readonly client: SlicesClient; 1861 1862 constructor(client: SlicesClient) { 1863 this.client = client; 1864 this.postgate = new PostgateFeedBskyAppClient(client); 1865 this.threadgate = new ThreadgateFeedBskyAppClient(client); 1866 } 1867} 1868 1869class ProfileActorBskyAppClient { 1870 private readonly client: SlicesClient; 1871 1872 constructor(client: SlicesClient) { 1873 this.client = client; 1874 } 1875 1876 async getRecords( 1877 params?: { 1878 limit?: number; 1879 cursor?: string; 1880 where?: { 1881 [K in AppBskyActorProfileSortFields | IndexedRecordFields]?: 1882 WhereCondition; 1883 }; 1884 orWhere?: { 1885 [K in AppBskyActorProfileSortFields | IndexedRecordFields]?: 1886 WhereCondition; 1887 }; 1888 sortBy?: SortField<AppBskyActorProfileSortFields>[]; 1889 }, 1890 ): Promise<GetRecordsResponse<AppBskyActorProfile>> { 1891 return await this.client.getRecords("app.bsky.actor.profile", params); 1892 } 1893 1894 async getRecord( 1895 params: GetRecordParams, 1896 ): Promise<RecordResponse<AppBskyActorProfile>> { 1897 return await this.client.getRecord("app.bsky.actor.profile", params); 1898 } 1899 1900 async countRecords( 1901 params?: { 1902 limit?: number; 1903 cursor?: string; 1904 where?: { 1905 [K in AppBskyActorProfileSortFields | IndexedRecordFields]?: 1906 WhereCondition; 1907 }; 1908 orWhere?: { 1909 [K in AppBskyActorProfileSortFields | IndexedRecordFields]?: 1910 WhereCondition; 1911 }; 1912 sortBy?: SortField<AppBskyActorProfileSortFields>[]; 1913 }, 1914 ): Promise<CountRecordsResponse> { 1915 return await this.client.countRecords("app.bsky.actor.profile", params); 1916 } 1917 1918 async createRecord( 1919 record: AppBskyActorProfile, 1920 useSelfRkey?: boolean, 1921 ): Promise<{ uri: string; cid: string }> { 1922 return await this.client.createRecord( 1923 "app.bsky.actor.profile", 1924 record, 1925 useSelfRkey, 1926 ); 1927 } 1928 1929 async updateRecord( 1930 rkey: string, 1931 record: AppBskyActorProfile, 1932 ): Promise<{ uri: string; cid: string }> { 1933 return await this.client.updateRecord( 1934 "app.bsky.actor.profile", 1935 rkey, 1936 record, 1937 ); 1938 } 1939 1940 async deleteRecord(rkey: string): Promise<void> { 1941 return await this.client.deleteRecord("app.bsky.actor.profile", rkey); 1942 } 1943} 1944 1945class ActorBskyAppClient { 1946 readonly profile: ProfileActorBskyAppClient; 1947 private readonly client: SlicesClient; 1948 1949 constructor(client: SlicesClient) { 1950 this.client = client; 1951 this.profile = new ProfileActorBskyAppClient(client); 1952 } 1953} 1954 1955class BskyAppClient { 1956 readonly graph: GraphBskyAppClient; 1957 readonly feed: FeedBskyAppClient; 1958 readonly actor: ActorBskyAppClient; 1959 private readonly client: SlicesClient; 1960 1961 constructor(client: SlicesClient) { 1962 this.client = client; 1963 this.graph = new GraphBskyAppClient(client); 1964 this.feed = new FeedBskyAppClient(client); 1965 this.actor = new ActorBskyAppClient(client); 1966 } 1967} 1968 1969class AppClient { 1970 readonly bsky: BskyAppClient; 1971 private readonly client: SlicesClient; 1972 1973 constructor(client: SlicesClient) { 1974 this.client = client; 1975 this.bsky = new BskyAppClient(client); 1976 } 1977} 1978 1979class RequestWaitlistSlicesNetworkClient { 1980 private readonly client: SlicesClient; 1981 1982 constructor(client: SlicesClient) { 1983 this.client = client; 1984 } 1985 1986 async getRecords( 1987 params?: { 1988 limit?: number; 1989 cursor?: string; 1990 where?: { 1991 [K in NetworkSlicesWaitlistRequestSortFields | IndexedRecordFields]?: 1992 WhereCondition; 1993 }; 1994 orWhere?: { 1995 [K in NetworkSlicesWaitlistRequestSortFields | IndexedRecordFields]?: 1996 WhereCondition; 1997 }; 1998 sortBy?: SortField<NetworkSlicesWaitlistRequestSortFields>[]; 1999 }, 2000 ): Promise<GetRecordsResponse<NetworkSlicesWaitlistRequest>> { 2001 return await this.client.getRecords( 2002 "network.slices.waitlist.request", 2003 params, 2004 ); 2005 } 2006 2007 async getRecord( 2008 params: GetRecordParams, 2009 ): Promise<RecordResponse<NetworkSlicesWaitlistRequest>> { 2010 return await this.client.getRecord( 2011 "network.slices.waitlist.request", 2012 params, 2013 ); 2014 } 2015 2016 async countRecords( 2017 params?: { 2018 limit?: number; 2019 cursor?: string; 2020 where?: { 2021 [K in NetworkSlicesWaitlistRequestSortFields | IndexedRecordFields]?: 2022 WhereCondition; 2023 }; 2024 orWhere?: { 2025 [K in NetworkSlicesWaitlistRequestSortFields | IndexedRecordFields]?: 2026 WhereCondition; 2027 }; 2028 sortBy?: SortField<NetworkSlicesWaitlistRequestSortFields>[]; 2029 }, 2030 ): Promise<CountRecordsResponse> { 2031 return await this.client.countRecords( 2032 "network.slices.waitlist.request", 2033 params, 2034 ); 2035 } 2036 2037 async createRecord( 2038 record: NetworkSlicesWaitlistRequest, 2039 useSelfRkey?: boolean, 2040 ): Promise<{ uri: string; cid: string }> { 2041 return await this.client.createRecord( 2042 "network.slices.waitlist.request", 2043 record, 2044 useSelfRkey, 2045 ); 2046 } 2047 2048 async updateRecord( 2049 rkey: string, 2050 record: NetworkSlicesWaitlistRequest, 2051 ): Promise<{ uri: string; cid: string }> { 2052 return await this.client.updateRecord( 2053 "network.slices.waitlist.request", 2054 rkey, 2055 record, 2056 ); 2057 } 2058 2059 async deleteRecord(rkey: string): Promise<void> { 2060 return await this.client.deleteRecord( 2061 "network.slices.waitlist.request", 2062 rkey, 2063 ); 2064 } 2065} 2066 2067class InviteWaitlistSlicesNetworkClient { 2068 private readonly client: SlicesClient; 2069 2070 constructor(client: SlicesClient) { 2071 this.client = client; 2072 } 2073 2074 async getRecords( 2075 params?: { 2076 limit?: number; 2077 cursor?: string; 2078 where?: { 2079 [K in NetworkSlicesWaitlistInviteSortFields | IndexedRecordFields]?: 2080 WhereCondition; 2081 }; 2082 orWhere?: { 2083 [K in NetworkSlicesWaitlistInviteSortFields | IndexedRecordFields]?: 2084 WhereCondition; 2085 }; 2086 sortBy?: SortField<NetworkSlicesWaitlistInviteSortFields>[]; 2087 }, 2088 ): Promise<GetRecordsResponse<NetworkSlicesWaitlistInvite>> { 2089 return await this.client.getRecords( 2090 "network.slices.waitlist.invite", 2091 params, 2092 ); 2093 } 2094 2095 async getRecord( 2096 params: GetRecordParams, 2097 ): Promise<RecordResponse<NetworkSlicesWaitlistInvite>> { 2098 return await this.client.getRecord( 2099 "network.slices.waitlist.invite", 2100 params, 2101 ); 2102 } 2103 2104 async countRecords( 2105 params?: { 2106 limit?: number; 2107 cursor?: string; 2108 where?: { 2109 [K in NetworkSlicesWaitlistInviteSortFields | IndexedRecordFields]?: 2110 WhereCondition; 2111 }; 2112 orWhere?: { 2113 [K in NetworkSlicesWaitlistInviteSortFields | IndexedRecordFields]?: 2114 WhereCondition; 2115 }; 2116 sortBy?: SortField<NetworkSlicesWaitlistInviteSortFields>[]; 2117 }, 2118 ): Promise<CountRecordsResponse> { 2119 return await this.client.countRecords( 2120 "network.slices.waitlist.invite", 2121 params, 2122 ); 2123 } 2124 2125 async createRecord( 2126 record: NetworkSlicesWaitlistInvite, 2127 useSelfRkey?: boolean, 2128 ): Promise<{ uri: string; cid: string }> { 2129 return await this.client.createRecord( 2130 "network.slices.waitlist.invite", 2131 record, 2132 useSelfRkey, 2133 ); 2134 } 2135 2136 async updateRecord( 2137 rkey: string, 2138 record: NetworkSlicesWaitlistInvite, 2139 ): Promise<{ uri: string; cid: string }> { 2140 return await this.client.updateRecord( 2141 "network.slices.waitlist.invite", 2142 rkey, 2143 record, 2144 ); 2145 } 2146 2147 async deleteRecord(rkey: string): Promise<void> { 2148 return await this.client.deleteRecord( 2149 "network.slices.waitlist.invite", 2150 rkey, 2151 ); 2152 } 2153} 2154 2155class WaitlistSlicesNetworkClient { 2156 readonly request: RequestWaitlistSlicesNetworkClient; 2157 readonly invite: InviteWaitlistSlicesNetworkClient; 2158 private readonly client: SlicesClient; 2159 2160 constructor(client: SlicesClient) { 2161 this.client = client; 2162 this.request = new RequestWaitlistSlicesNetworkClient(client); 2163 this.invite = new InviteWaitlistSlicesNetworkClient(client); 2164 } 2165} 2166 2167class SliceSlicesNetworkClient { 2168 private readonly client: SlicesClient; 2169 2170 constructor(client: SlicesClient) { 2171 this.client = client; 2172 } 2173 2174 async getRecords( 2175 params?: { 2176 limit?: number; 2177 cursor?: string; 2178 where?: { 2179 [K in NetworkSlicesSliceSortFields | IndexedRecordFields]?: 2180 WhereCondition; 2181 }; 2182 orWhere?: { 2183 [K in NetworkSlicesSliceSortFields | IndexedRecordFields]?: 2184 WhereCondition; 2185 }; 2186 sortBy?: SortField<NetworkSlicesSliceSortFields>[]; 2187 }, 2188 ): Promise<GetRecordsResponse<NetworkSlicesSlice>> { 2189 return await this.client.getRecords("network.slices.slice", params); 2190 } 2191 2192 async getRecord( 2193 params: GetRecordParams, 2194 ): Promise<RecordResponse<NetworkSlicesSlice>> { 2195 return await this.client.getRecord("network.slices.slice", params); 2196 } 2197 2198 async countRecords( 2199 params?: { 2200 limit?: number; 2201 cursor?: string; 2202 where?: { 2203 [K in NetworkSlicesSliceSortFields | IndexedRecordFields]?: 2204 WhereCondition; 2205 }; 2206 orWhere?: { 2207 [K in NetworkSlicesSliceSortFields | IndexedRecordFields]?: 2208 WhereCondition; 2209 }; 2210 sortBy?: SortField<NetworkSlicesSliceSortFields>[]; 2211 }, 2212 ): Promise<CountRecordsResponse> { 2213 return await this.client.countRecords("network.slices.slice", params); 2214 } 2215 2216 async createRecord( 2217 record: NetworkSlicesSlice, 2218 useSelfRkey?: boolean, 2219 ): Promise<{ uri: string; cid: string }> { 2220 return await this.client.createRecord( 2221 "network.slices.slice", 2222 record, 2223 useSelfRkey, 2224 ); 2225 } 2226 2227 async updateRecord( 2228 rkey: string, 2229 record: NetworkSlicesSlice, 2230 ): Promise<{ uri: string; cid: string }> { 2231 return await this.client.updateRecord("network.slices.slice", rkey, record); 2232 } 2233 2234 async deleteRecord(rkey: string): Promise<void> { 2235 return await this.client.deleteRecord("network.slices.slice", rkey); 2236 } 2237 2238 async syncUserCollections( 2239 input: NetworkSlicesSliceSyncUserCollectionsInput, 2240 ): Promise<NetworkSlicesSliceSyncUserCollectionsOutput> { 2241 return await this.client.makeRequest< 2242 NetworkSlicesSliceSyncUserCollectionsOutput 2243 >("network.slices.slice.syncUserCollections", "POST", input); 2244 } 2245 2246 async getSparklines( 2247 input: NetworkSlicesSliceGetSparklinesInput, 2248 ): Promise<NetworkSlicesSliceGetSparklinesOutput> { 2249 return await this.client.makeRequest<NetworkSlicesSliceGetSparklinesOutput>( 2250 "network.slices.slice.getSparklines", 2251 "POST", 2252 input, 2253 ); 2254 } 2255 2256 async getJobLogs( 2257 params?: NetworkSlicesSliceGetJobLogsParams, 2258 ): Promise<NetworkSlicesSliceGetJobLogsOutput> { 2259 return await this.client.makeRequest<NetworkSlicesSliceGetJobLogsOutput>( 2260 "network.slices.slice.getJobLogs", 2261 "GET", 2262 params, 2263 ); 2264 } 2265 2266 async getJetstreamStatus(): Promise< 2267 NetworkSlicesSliceGetJetstreamStatusOutput 2268 > { 2269 return await this.client.makeRequest< 2270 NetworkSlicesSliceGetJetstreamStatusOutput 2271 >("network.slices.slice.getJetstreamStatus", "GET", {}); 2272 } 2273 2274 async getSyncSummary( 2275 params?: NetworkSlicesSliceGetSyncSummaryParams, 2276 ): Promise<NetworkSlicesSliceGetSyncSummaryOutput> { 2277 return await this.client.makeRequest< 2278 NetworkSlicesSliceGetSyncSummaryOutput 2279 >("network.slices.slice.getSyncSummary", "GET", params); 2280 } 2281 2282 async getJobStatus( 2283 params?: NetworkSlicesSliceGetJobStatusParams, 2284 ): Promise<NetworkSlicesSliceGetJobStatusOutput> { 2285 return await this.client.makeRequest<NetworkSlicesSliceGetJobStatusOutput>( 2286 "network.slices.slice.getJobStatus", 2287 "GET", 2288 params, 2289 ); 2290 } 2291 2292 async getActors( 2293 input: NetworkSlicesSliceGetActorsInput, 2294 ): Promise<NetworkSlicesSliceGetActorsOutput> { 2295 return await this.client.makeRequest<NetworkSlicesSliceGetActorsOutput>( 2296 "network.slices.slice.getActors", 2297 "POST", 2298 input, 2299 ); 2300 } 2301 2302 async clearSliceRecords( 2303 input: NetworkSlicesSliceClearSliceRecordsInput, 2304 ): Promise<NetworkSlicesSliceClearSliceRecordsOutput> { 2305 return await this.client.makeRequest< 2306 NetworkSlicesSliceClearSliceRecordsOutput 2307 >("network.slices.slice.clearSliceRecords", "POST", input); 2308 } 2309 2310 async deleteOAuthClient( 2311 input: NetworkSlicesSliceDeleteOAuthClientInput, 2312 ): Promise<NetworkSlicesSliceDeleteOAuthClientOutput> { 2313 return await this.client.makeRequest< 2314 NetworkSlicesSliceDeleteOAuthClientOutput 2315 >("network.slices.slice.deleteOAuthClient", "POST", input); 2316 } 2317 2318 async createOAuthClient( 2319 input: NetworkSlicesSliceCreateOAuthClientInput, 2320 ): Promise<NetworkSlicesSliceCreateOAuthClientOutput> { 2321 return await this.client.makeRequest< 2322 NetworkSlicesSliceCreateOAuthClientOutput 2323 >("network.slices.slice.createOAuthClient", "POST", input); 2324 } 2325 2326 async getJetstreamLogs( 2327 params?: NetworkSlicesSliceGetJetstreamLogsParams, 2328 ): Promise<NetworkSlicesSliceGetJetstreamLogsOutput> { 2329 return await this.client.makeRequest< 2330 NetworkSlicesSliceGetJetstreamLogsOutput 2331 >("network.slices.slice.getJetstreamLogs", "GET", params); 2332 } 2333 2334 async getSliceRecords( 2335 input: NetworkSlicesSliceGetSliceRecordsInput, 2336 ): Promise<NetworkSlicesSliceGetSliceRecordsOutput> { 2337 return await this.client.makeRequest< 2338 NetworkSlicesSliceGetSliceRecordsOutput 2339 >("network.slices.slice.getSliceRecords", "POST", input); 2340 } 2341 2342 async startSync( 2343 input: NetworkSlicesSliceStartSyncInput, 2344 ): Promise<NetworkSlicesSliceStartSyncOutput> { 2345 return await this.client.makeRequest<NetworkSlicesSliceStartSyncOutput>( 2346 "network.slices.slice.startSync", 2347 "POST", 2348 input, 2349 ); 2350 } 2351 2352 async getJobHistory( 2353 params?: NetworkSlicesSliceGetJobHistoryParams, 2354 ): Promise<NetworkSlicesSliceGetJobHistoryOutput> { 2355 return await this.client.makeRequest<NetworkSlicesSliceGetJobHistoryOutput>( 2356 "network.slices.slice.getJobHistory", 2357 "GET", 2358 params, 2359 ); 2360 } 2361 2362 async stats( 2363 params?: NetworkSlicesSliceStatsParams, 2364 ): Promise<NetworkSlicesSliceStatsOutput> { 2365 return await this.client.makeRequest<NetworkSlicesSliceStatsOutput>( 2366 "network.slices.slice.stats", 2367 "GET", 2368 params, 2369 ); 2370 } 2371 2372 async updateOAuthClient( 2373 input: NetworkSlicesSliceUpdateOAuthClientInput, 2374 ): Promise<NetworkSlicesSliceUpdateOAuthClientOutput> { 2375 return await this.client.makeRequest< 2376 NetworkSlicesSliceUpdateOAuthClientOutput 2377 >("network.slices.slice.updateOAuthClient", "POST", input); 2378 } 2379 2380 async getOAuthClients( 2381 params?: NetworkSlicesSliceGetOAuthClientsParams, 2382 ): Promise<NetworkSlicesSliceGetOAuthClientsOutput> { 2383 return await this.client.makeRequest< 2384 NetworkSlicesSliceGetOAuthClientsOutput 2385 >("network.slices.slice.getOAuthClients", "GET", params); 2386 } 2387} 2388 2389class LexiconSlicesNetworkClient { 2390 private readonly client: SlicesClient; 2391 2392 constructor(client: SlicesClient) { 2393 this.client = client; 2394 } 2395 2396 async getRecords( 2397 params?: { 2398 limit?: number; 2399 cursor?: string; 2400 where?: { 2401 [K in NetworkSlicesLexiconSortFields | IndexedRecordFields]?: 2402 WhereCondition; 2403 }; 2404 orWhere?: { 2405 [K in NetworkSlicesLexiconSortFields | IndexedRecordFields]?: 2406 WhereCondition; 2407 }; 2408 sortBy?: SortField<NetworkSlicesLexiconSortFields>[]; 2409 }, 2410 ): Promise<GetRecordsResponse<NetworkSlicesLexicon>> { 2411 return await this.client.getRecords("network.slices.lexicon", params); 2412 } 2413 2414 async getRecord( 2415 params: GetRecordParams, 2416 ): Promise<RecordResponse<NetworkSlicesLexicon>> { 2417 return await this.client.getRecord("network.slices.lexicon", params); 2418 } 2419 2420 async countRecords( 2421 params?: { 2422 limit?: number; 2423 cursor?: string; 2424 where?: { 2425 [K in NetworkSlicesLexiconSortFields | IndexedRecordFields]?: 2426 WhereCondition; 2427 }; 2428 orWhere?: { 2429 [K in NetworkSlicesLexiconSortFields | IndexedRecordFields]?: 2430 WhereCondition; 2431 }; 2432 sortBy?: SortField<NetworkSlicesLexiconSortFields>[]; 2433 }, 2434 ): Promise<CountRecordsResponse> { 2435 return await this.client.countRecords("network.slices.lexicon", params); 2436 } 2437 2438 async createRecord( 2439 record: NetworkSlicesLexicon, 2440 useSelfRkey?: boolean, 2441 ): Promise<{ uri: string; cid: string }> { 2442 return await this.client.createRecord( 2443 "network.slices.lexicon", 2444 record, 2445 useSelfRkey, 2446 ); 2447 } 2448 2449 async updateRecord( 2450 rkey: string, 2451 record: NetworkSlicesLexicon, 2452 ): Promise<{ uri: string; cid: string }> { 2453 return await this.client.updateRecord( 2454 "network.slices.lexicon", 2455 rkey, 2456 record, 2457 ); 2458 } 2459 2460 async deleteRecord(rkey: string): Promise<void> { 2461 return await this.client.deleteRecord("network.slices.lexicon", rkey); 2462 } 2463} 2464 2465class ProfileActorSlicesNetworkClient { 2466 private readonly client: SlicesClient; 2467 2468 constructor(client: SlicesClient) { 2469 this.client = client; 2470 } 2471 2472 async getRecords( 2473 params?: { 2474 limit?: number; 2475 cursor?: string; 2476 where?: { 2477 [K in NetworkSlicesActorProfileSortFields | IndexedRecordFields]?: 2478 WhereCondition; 2479 }; 2480 orWhere?: { 2481 [K in NetworkSlicesActorProfileSortFields | IndexedRecordFields]?: 2482 WhereCondition; 2483 }; 2484 sortBy?: SortField<NetworkSlicesActorProfileSortFields>[]; 2485 }, 2486 ): Promise<GetRecordsResponse<NetworkSlicesActorProfile>> { 2487 return await this.client.getRecords("network.slices.actor.profile", params); 2488 } 2489 2490 async getRecord( 2491 params: GetRecordParams, 2492 ): Promise<RecordResponse<NetworkSlicesActorProfile>> { 2493 return await this.client.getRecord("network.slices.actor.profile", params); 2494 } 2495 2496 async countRecords( 2497 params?: { 2498 limit?: number; 2499 cursor?: string; 2500 where?: { 2501 [K in NetworkSlicesActorProfileSortFields | IndexedRecordFields]?: 2502 WhereCondition; 2503 }; 2504 orWhere?: { 2505 [K in NetworkSlicesActorProfileSortFields | IndexedRecordFields]?: 2506 WhereCondition; 2507 }; 2508 sortBy?: SortField<NetworkSlicesActorProfileSortFields>[]; 2509 }, 2510 ): Promise<CountRecordsResponse> { 2511 return await this.client.countRecords( 2512 "network.slices.actor.profile", 2513 params, 2514 ); 2515 } 2516 2517 async createRecord( 2518 record: NetworkSlicesActorProfile, 2519 useSelfRkey?: boolean, 2520 ): Promise<{ uri: string; cid: string }> { 2521 return await this.client.createRecord( 2522 "network.slices.actor.profile", 2523 record, 2524 useSelfRkey, 2525 ); 2526 } 2527 2528 async updateRecord( 2529 rkey: string, 2530 record: NetworkSlicesActorProfile, 2531 ): Promise<{ uri: string; cid: string }> { 2532 return await this.client.updateRecord( 2533 "network.slices.actor.profile", 2534 rkey, 2535 record, 2536 ); 2537 } 2538 2539 async deleteRecord(rkey: string): Promise<void> { 2540 return await this.client.deleteRecord("network.slices.actor.profile", rkey); 2541 } 2542} 2543 2544class ActorSlicesNetworkClient { 2545 readonly profile: ProfileActorSlicesNetworkClient; 2546 private readonly client: SlicesClient; 2547 2548 constructor(client: SlicesClient) { 2549 this.client = client; 2550 this.profile = new ProfileActorSlicesNetworkClient(client); 2551 } 2552} 2553 2554class SlicesNetworkClient { 2555 readonly waitlist: WaitlistSlicesNetworkClient; 2556 readonly slice: SliceSlicesNetworkClient; 2557 readonly lexicon: LexiconSlicesNetworkClient; 2558 readonly actor: ActorSlicesNetworkClient; 2559 private readonly client: SlicesClient; 2560 2561 constructor(client: SlicesClient) { 2562 this.client = client; 2563 this.waitlist = new WaitlistSlicesNetworkClient(client); 2564 this.slice = new SliceSlicesNetworkClient(client); 2565 this.lexicon = new LexiconSlicesNetworkClient(client); 2566 this.actor = new ActorSlicesNetworkClient(client); 2567 } 2568} 2569 2570class NetworkClient { 2571 readonly slices: SlicesNetworkClient; 2572 private readonly client: SlicesClient; 2573 2574 constructor(client: SlicesClient) { 2575 this.client = client; 2576 this.slices = new SlicesNetworkClient(client); 2577 } 2578} 2579 2580export class AtProtoClient extends SlicesClient { 2581 readonly app: AppClient; 2582 readonly network: NetworkClient; 2583 readonly oauth?: OAuthClient | AuthProvider; 2584 2585 constructor( 2586 baseUrl: string, 2587 sliceUri: string, 2588 oauthClient?: OAuthClient | AuthProvider, 2589 ) { 2590 super(baseUrl, sliceUri, oauthClient); 2591 this.app = new AppClient(this); 2592 this.network = new NetworkClient(this); 2593 this.oauth = oauthClient; 2594 } 2595}