/* * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT. */ import { l } from "@atproto/lex"; const $nsid = "app.bsky.feed.threadgate"; export { $nsid }; /** Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository. */ type Main = { $type: "app.bsky.feed.threadgate"; /** * Reference (AT-URI) to the post record. */ "post":l.AtUriString; /** * 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. */ "allow"?:(l.$Typed | l.$Typed | l.$Typed | l.$Typed | l.Unknown$TypedObject)[];"createdAt":l.DatetimeString; /** * List of hidden reply URIs. */ "hiddenReplies"?:(l.AtUriString)[] }; export type { Main }; /** Record defining interaction gating rules for a thread (aka, reply controls). The record key (rkey) of the threadgate record must match the record key of the thread's root post, and that record must be in the same repository. */ const main = /*#__PURE__*/ l.record<"tid", Main>("tid", $nsid, /*#__PURE__*/ l.object({"post":/*#__PURE__*/ l.string({"format":"at-uri"}),"allow":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.array(/*#__PURE__*/ l.typedUnion([/*#__PURE__*/ l.typedRef((() => mentionRule) as any),/*#__PURE__*/ l.typedRef((() => followerRule) as any),/*#__PURE__*/ l.typedRef((() => followingRule) as any),/*#__PURE__*/ l.typedRef((() => listRule) as any)], false), {"maxLength":5})),"createdAt":/*#__PURE__*/ l.string({"format":"datetime"}),"hiddenReplies":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.array(/*#__PURE__*/ l.string({"format":"at-uri"}), {"maxLength":300}))})); export { main }; export const $type = $nsid; export const $isTypeOf = /*#__PURE__*/ main.isTypeOf.bind(main); export const $build = /*#__PURE__*/ main.build.bind(main); export const $assert = /*#__PURE__*/ main.assert.bind(main); export const $check = /*#__PURE__*/ main.check.bind(main); export const $cast = /*#__PURE__*/ main.cast.bind(main); export const $ifMatches = /*#__PURE__*/ main.ifMatches.bind(main); export const $matches = /*#__PURE__*/ main.matches.bind(main); export const $parse = /*#__PURE__*/ main.parse.bind(main); export const $safeParse = /*#__PURE__*/ main.safeParse.bind(main); export const $validate = /*#__PURE__*/ main.validate.bind(main); export const $safeValidate = /*#__PURE__*/ main.safeValidate.bind(main); /** Allow replies from actors on a list. */ type ListRule = { $type?: "app.bsky.feed.threadgate#listRule";"list":l.AtUriString }; export type { ListRule }; /** Allow replies from actors on a list. */ const listRule = /*#__PURE__*/ l.typedObject($nsid, "listRule", /*#__PURE__*/ l.object({"list":/*#__PURE__*/ l.string({"format":"at-uri"})})); export { listRule }; /** Allow replies from actors mentioned in your post. */ type MentionRule = { $type?: "app.bsky.feed.threadgate#mentionRule" }; export type { MentionRule }; /** Allow replies from actors mentioned in your post. */ const mentionRule = /*#__PURE__*/ l.typedObject($nsid, "mentionRule", /*#__PURE__*/ l.object({})); export { mentionRule }; /** Allow replies from actors who follow you. */ type FollowerRule = { $type?: "app.bsky.feed.threadgate#followerRule" }; export type { FollowerRule }; /** Allow replies from actors who follow you. */ const followerRule = /*#__PURE__*/ l.typedObject($nsid, "followerRule", /*#__PURE__*/ l.object({})); export { followerRule }; /** Allow replies from actors you follow. */ type FollowingRule = { $type?: "app.bsky.feed.threadgate#followingRule" }; export type { FollowingRule }; /** Allow replies from actors you follow. */ const followingRule = /*#__PURE__*/ l.typedObject($nsid, "followingRule", /*#__PURE__*/ l.object({})); export { followingRule };