/* * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT. */ import { l } from "@atproto/lex"; const $nsid = "place.stream.server.defs"; export { $nsid }; /** A webhook configuration for receiving Streamplace events. */ type Webhook = { $type?: "place.stream.server.defs#webhook"; /** * Unique identifier for this webhook. */ "id":string; /** * The webhook URL where events will be sent. */ "url":l.UriString; /** * The types of events this webhook should receive. */ "events":("chat" | "livestream" | "follow" | "mention" | "stream.received")[]; /** * Whether this webhook is currently active. */ "active":boolean; /** * Text to prepend to webhook messages. */ "prefix"?:string; /** * Text to append to webhook messages. */ "suffix"?:string; /** * Text replacement rules for webhook messages. */ "rewrite"?:(RewriteRule)[]; /** * When this webhook was created. */ "createdAt":l.DatetimeString; /** * When this webhook was last updated. */ "updatedAt"?:l.DatetimeString; /** * A user-friendly name for this webhook. */ "name"?:string; /** * A description of what this webhook is used for. */ "description"?:string; /** * When this webhook was last triggered. */ "lastTriggered"?:l.DatetimeString; /** * Number of consecutive errors for this webhook. */ "errorCount"?:number; /** * Words to filter out from chat messages. Messages containing any of these words will not be forwarded. */ "muteWords"?:(string)[] }; export type { Webhook }; /** A webhook configuration for receiving Streamplace events. */ const webhook = /*#__PURE__*/ l.typedObject($nsid, "webhook", /*#__PURE__*/ l.object({"id":/*#__PURE__*/ l.string(),"url":/*#__PURE__*/ l.string({"format":"uri"}),"events":/*#__PURE__*/ l.array(/*#__PURE__*/ l.enum(["chat","livestream","follow","mention","stream.received"]), ),"active":/*#__PURE__*/ l.boolean(),"prefix":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({"maxLength":100})),"suffix":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({"maxLength":100})),"rewrite":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.array(/*#__PURE__*/ l.ref((() => rewriteRule) as any), )),"createdAt":/*#__PURE__*/ l.string({"format":"datetime"}),"updatedAt":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({"format":"datetime"})),"name":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({"maxLength":100})),"description":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({"maxLength":500})),"lastTriggered":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({"format":"datetime"})),"errorCount":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),"muteWords":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.array(/*#__PURE__*/ l.string({"maxLength":100}), ))})); export { webhook }; type RewriteRule = { $type?: "place.stream.server.defs#rewriteRule"; /** * Text to search for and replace. */ "from":string; /** * Text to replace with. */ "to":string }; export type { RewriteRule }; const rewriteRule = /*#__PURE__*/ l.typedObject($nsid, "rewriteRule", /*#__PURE__*/ l.object({"from":/*#__PURE__*/ l.string({"maxLength":100,"minLength":1}),"to":/*#__PURE__*/ l.string({"maxLength":100})})); export { rewriteRule }; /** S3 storage configuration for backups. */ type Storage = { $type?: "place.stream.server.defs#storage"; /** * S3 storage URL with masked secret key in format: s3+https://ACCESS_KEY:***@endpoint/bucket */ "url":string; /** * Whether backup storage is currently active. */ "isActive":boolean }; export type { Storage }; /** S3 storage configuration for backups. */ const storage = /*#__PURE__*/ l.typedObject($nsid, "storage", /*#__PURE__*/ l.object({"url":/*#__PURE__*/ l.string(),"isActive":/*#__PURE__*/ l.boolean()})); export { storage };