/* * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT. */ import { l } from "@atproto/lex"; const $nsid = "app.bsky.feed.postgate"; export { $nsid }; /** Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the post, and that record must be in the same repository. */ type Main = { $type: "app.bsky.feed.postgate"; /** * Reference (AT-URI) to the post record. */ "post":l.AtUriString;"createdAt":l.DatetimeString; /** * 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. */ "embeddingRules"?:(l.$Typed | l.Unknown$TypedObject)[]; /** * List of AT-URIs embedding this post that the author has detached from. */ "detachedEmbeddingUris"?:(l.AtUriString)[] }; export type { Main }; /** Record defining interaction rules for a post. The record key (rkey) of the postgate record must match the record key of the 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"}),"createdAt":/*#__PURE__*/ l.string({"format":"datetime"}),"embeddingRules":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.array(/*#__PURE__*/ l.typedUnion([/*#__PURE__*/ l.typedRef((() => disableRule) as any)], false), {"maxLength":5})),"detachedEmbeddingUris":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.array(/*#__PURE__*/ l.string({"format":"at-uri"}), {"maxLength":50}))})); 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); /** Disables embedding of this post. */ type DisableRule = { $type?: "app.bsky.feed.postgate#disableRule" }; export type { DisableRule }; /** Disables embedding of this post. */ const disableRule = /*#__PURE__*/ l.typedObject($nsid, "disableRule", /*#__PURE__*/ l.object({})); export { disableRule };