PageSourceSearch

https://nuxt-atproto.pages.dev/_nuxt/CUzC8g2f.js

js nuxt-atproto.pages.dev collected 2026-10-03 05:30:44 UTC 615,543 bytes, 1 lines download raw bytes

1var Ut=t=>{throw TypeError(t)};var Ot=(t,e,r)=>e.has(t)||Ut("Cannot "+r);var Oe=(t,e,r)=>(Ot(t,e,"read from private field"),r?r.call(t):e.get(t)),Gt=(t,e,r)=>e.has(t)?Ut("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),Ht=(t,e,r,o)=>(Ot(t,e,"write to private field"),o?o.call(t,r):e.set(t,r),r);import{al as Be,bc as g,aa as w,b0 as U,af as Wt,a5 as m,a7 as _,ag as Se,bC as M,cJ as ci,cG as di,cA as pi,bO as j,aS as li,bp as at,a3 as Me,u as jt,bu as ui,bU as Gr,ch as te,U as Kt,ct as de,by as N,Y as ye,aq as fi,a2 as Hr,aw as Wr,bH as mi,ax as yi,X as hi,bN as re,bo as Q,bA as l,W,aM as gi,Z as Ae,N as bi,b4 as b,aV as S,bM as Y,$ as ie,b3 as R,ap as vi,ao as ne,aN as wi,ai as ki,aO as xi,o as Ai,P as ji,aj as qi,bi as Si,b9 as Ii,cB as Ri,a6 as se,cF as Jt,m as Ge,ah as Ei,bt as Ci}from"./Cxa_Nf8Q.js";import{u as Ti}from"./CX3PbZXC.js";import"./O07y9G3c.js";import"./BLvfbY2r.js";import"./BzLXVmjd.js";import"./B3RJnHA-.js";import"./Z2x-SVlB.js";var st=typeof st<"u"?st:{};const Di={key:0,class:"auth-card__hero"},Pi={key:1,class:"auth-card__embed-header"},Li={key:2,class:"auth-card__embed-add-label"},_i={key:3,class:"auth-card__compact-header"},zi={class:"auth-card__methods"},Vi={key:0,class:"auth-card__hint"},Bi={key:0,class:"auth-card__label",for:"handle-input"},Mi={class:"input-group"},Ni=["disabled"],Fi={key:4,class:"auth-card__footnote"},$i=Be({__name:"PlaygroundAuthPanel",props:{addAccount:{type:Boolean,default:!1},embedded:{type:Boolean,default:!1}},emits:["signIn","signInWithHandle"],setup(t,{emit:e}){const r=t,o=e,i=at(""),n=Me(()=>i.value.trim().length>0);function a(){const c=i.value.trim();c&&o("signInWithHandle",c)}return(c,d)=>(g(),w("section",{class:U(["auth-card",{panel:!r.embedded,"panel--featured":!r.addAccount&&!r.embedded,"auth-card--compact":r.addAccount&&!r.embedded,"auth-card--embedded":r.embedded,"auth-card--embedded-add":r.embedded&&r.addAccount}])},[!r.addAccount&&!r.embedded?(g(),w("div",Di,[...d[2]||(d[2]=[Wt('<div class="auth-card__mark" aria-hidden="true" data-v-b59f6688><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-b59f6688><path d="M12 3 4 8v8l8 5 8-5V8l-8-5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" data-v-b59f6688></path><path d="M12 12 4 8m8 4 8-4M12 12v8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-b59f6688></path></svg></div><h2 class="auth-card__title" data-v-b59f6688> Sign in with AT Protocol </h2><p class="auth-card__lead" data-v-b59f6688> OAuth runs entirely in your browser. Pick your account provider or enter a handle. </p>',3)])])):r.embedded&&!r.addAccount?(g(),w("header",Pi,[...d[3]||(d[3]=[Wt('<
1div class="auth-card__embed-mark" aria-hidden="true" data-v-b59f6688><svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-b59f6688><path d="M12 3 4 8v8l8 5 8-5V8l-8-5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round" data-v-b59f6688></path><path d="M12 12 4 8m8 4 8-4M12 12v8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-v-b59f6688></path></svg></div><div class="auth-card__embed-copy" data-v-b59f6688><h2 class="auth-card__embed-title" data-v-b59f6688> Sign in with ATProto </h2><p class="auth-card__embed-lead" data-v-b59f6688> OAuth runs in your browser — pick your PDS or enter a handle. </p></div>',2)])])):r.addAccount&&r.embedded?(g(),w("header",Li," Add account ")):r.addAccount?(g(),w("header",_i,[...d[4]||(d[4]=[m("h2",{class:"auth-card__compact-title"}," Add another account ",-1),m("p",{class:"auth-card__compact-lead"}," Sign in with a different handle. Your current session stays cached locally. ",-1)])])):_("",!0),m("div",zi,[m("button",{type:"button",class:U(["btn btn--primary btn--block auth-card__oauth",{"btn--lg":!r.embedded,"auth-card__oauth--embedded":r.embedded}]),onClick:d[0]||(d[0]=p=>o("signIn"))},[d[5]||(d[5]=m("span",{class:"auth-card__oauth-icon","aria-hidden":"true"},[m("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[m("path",{d:"M5 12h14M13 6l6 6-6 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),Se(" "+M(r.addAccount?r.embedded?"Add with PDS":"Continue with another PDS":"Continue with your PDS"),1)],2),!r.addAccount&&!r.embedded?(g(),w("p",Vi," Redirects to your personal data server for authorization. ")):_("",!0),m("div",{class:U(["auth-card__divider",{"auth-card__divider--plain":r.embedded}]),role:"separator"},[m("span",null,M(r.embedded&&r.addAccount?"or handle":"or sign in with handle"),1)],2),m("form",{class:U(["auth-card__handle",{"auth-card__handle--embedded":r.embedded,"auth-card__handle--embedded-add":r.embedded&&r.addAccount}]),onSubmit:ci(a,["prevent"])},[r.embedded&&r.addAccount?_("",!0):(g(),w("label",Bi," Bluesky / ATProto handle ")),m("div",Mi,[d[6]||(d[6]=m("span",{class:"input-group__prefix","aria-hidden":"true"},"@",-1)),di(m("input",{id:"handle-input","onUpdate:modelValue":d[1]||(d[1]=p=>li(i)?i.value=p:null),type:"text",class:"input input-group__field",placeholder:"alice.bsky.social",autocomplete:"username",spellcheck:"false"},null,512),[[pi,j(i)]]),m("button",{type:"submit",class:"btn btn--secondary input-group__action",disabled:!j(n)},M(r.addAccount?"Add":"Sign in"),9,Ni)])],34)]),!r.addAccount&&!r.embedded?(g(),w("p",Fi," Sessions stay in the browser on this device. ")):_("",!0)],2))}}),Ui=Object.assign(jt($i,[["__scopeId","data-v-b59f6688"]]),{__name:"PlaygroundAuthPanel"}),Oi={class:"profile-card__media"},Gi=["src","alt","width","height"],Hi={key:1,class:"profile-card__avatar profile-card__avatar--placeholder","aria-hidden":"true"},Wi={key:2,class:"profile-card__status"},Ki={class:"profile-card__body"},Ji={class:"profile-card__names"},Qi={class:"profile-card__display"},Xi=["href"],Zi={key:0,class:"profile-card__bio"},Yi={key:1,class:"profile-card__footer"},en=["title"],tn={class:"profile-card__meta"},rn={class:"profile-card__actions"},on=Be({__name:"PlaygroundProfileCard",props:{entry:{},active:{type:Boolean},compact:{type:Boolean}},emits:["restore","signOut"],setup(t){function e(r){const o=Date.now()-new Date(r).getTime(),i=Math.floor(o/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const n=Math.floor(i/60);return n<24?`${n}h ago`:new Date(r).toLocaleDateString()}return(r,o)=>(g(),w("article",{class:U(["profile-card",{"profile-card--active":t.active,"profile-card--compact":t.compact}])},[m("div",Oi,[t.entry.profile.avatar?(g(),w("img",{key:0,src:t.entry.profile.avatar,alt:t.entry.profile.displayName||t.entry.profile.handle,class:"profile-card__avatar",width:t.compact?40:64,height:t.compact?40:64},null,8,Gi)):(g(),w("div",Hi,M(t.entry.profile.handle.slice(0,1).toUpperCase()),1)),t.active?(g(),w("span",Wi,"Active")):_("",!0)]),m("div",Ki,[m("div",Ji,[m("p",Qi,M(t.entry.profile.displayName||t.entry.profile.handle),1),m("a",{href:`https://bsky.app/profile/${t.entry.profile.handle}`,target:"_blank",rel:"noopener noreferrer",class:"profile-card__handle"},[Se(" @"+M(t.entry.profile.handle)+" ",1),o[0]||(o[0]=m("span",{class:"profile-card__external","aria-hidden":"true"},"↗",-1))],8,Xi)]),t.entry.profile.description&&!t.compact?(g(),w("p",Zi,M(t.entry.profile.description),1)):_("",!0),t.compact?_("",!0):(g(),w("div",Yi,[m("code",{class:"profile-card__did",title:t.entry.profile.did},M(t.entry.profile.did),9,en),m("span",tn," Cached "+M(e(t.entry.updatedAt)),1)]))]),m("div",rn,[ui(r.$slots,"actions",{},void 0,!0)])],2))}}),nn=Object.assign(jt(on,[["__scopeId","data-v-335cbf2a"]]),{__name:"PlaygroundProfileCard"}),sn={class:"dev-panel"},an={class:"dev-panel__list"},cn={class:"dev-panel__row"},dn={class:"dev-panel__row"},pn=Be({__name:"PlaygroundDevPanel",props:{status:{},isLogged:{type:Boolean}},setup(t){return(e,r)=>(g(),w("details",sn,[r[2]||(r[2]=m("summary",null,"Module diagnostics",-1)),m("dl",an,[m("div",cn,[r[0]||(r[0]=m("dt",null,"Session status",-1)),m("dd",null,[m("code",null,M(t.status),1)])]),m("div",dn,[r[1]||(r[1]=m("dt",null,"Logged in",-1)),m("dd",null,[m("code",null,M(t.isLogged),1)])])])]))}}),ln=Object.assign(jt(pn,[["__scopeId","data-v-ff6f4c2f"]]),{__name:"PlaygroundDevPanel"});function un(){const t=Gr();async function e(n=t.serviceEndpoint.private,a=t.oauth.signInOptions){const{$atproto:c}=te();try{await c.client.signInRedirect(n,{...a,signal:new AbortController().signal})}catch(d){console.error("Error during sign-in:",d)}}async function r(n,a=t.oauth.signInOptions){const{$atproto:c}=te();try{const d=await c.client.authorize(n,a);window.location.href=d.href}catch(d){console.error(`Error during sign-in for handle ${n}:`,d)}}async function o(n){const a=te(),c=await a.$atproto.client.restore(n);return Kt(a,c,"account-switch"),c}async function i(){const n=te(),a=n.$atproto.session.value;if(a)try{await n.$atproto.client.revoke(a.did)}catch(c){console.error("Error revoking ATProto session:",c)}Kt(n,void 0,"sign-out"),t.debug&&console.log("User signed out")}return{signIn:e,signInWithHandle:r,signOut:i,restore:o}}const Qt="nuxt-atproto:playground:profiles";function Kr(){const t=de("playground-profiles",()=>({}));function e(){try{t.value=JSON.parse(localStorage.getItem(Qt)||"{}")}catch{t.value={}}}function r(){localStorage.setItem(Qt,JSON.stringify(t.value))}function o(a,c){t.value={...t.value,[a]:{updatedAt:new Date().toISOString(),profile:c}},r()}function i(a){const c={...t.value};Reflect.deleteProperty(c,a),t.value=c,r()}const n=Me(()=>Object.values(t.value).sort((a,c)=>new Date(c.updatedAt).getTime()-new Date(a.updatedAt).getTime()));return{profiles:t,entries:n,loadFromStorage:e,upsert:o,remove:i}}const ct=(t,e)=>e.safeParse(t).success,fn=t=>new Promise(e=>setTimeout(e,t)),Jr="234567abcdefghijklmnopqrstuvwxyz",Xt=t=>{let e="";for(;t;){const r=t%32;t=Math.floor(t/32),e=Jr.charAt(r)+e}return e},Zt=t=>{let e=0;for(const r of t)e=e*32+Jr.indexOf(r);return e},Yt=13;
1let He=0,er=0,ke=null;function tr(t){return t.replaceAll("-","")}class z{constructor(e){const r=tr(e);if(r.length!==Yt)throw new Error(`Poorly formatted TID: ${r.length} length`);this.str=r}static next(e){const r=Math.max(Date.now(),He);r===He&&er++,He=r;const o=r*1e3+er;ke===null&&(ke=Math.floor(Math.random()*32));const i=z.fromTime(o,ke);return!e||i.newerThan(e)?i:z.fromTime(e.timestamp()+1,ke)}static nextStr(e){return z.next(e?new z(e):void 0).toString()}static fromTime(e,r){const o=`${Xt(e)}${Xt(r).padStart(2,"2")}`;return new z(o)}static fromStr(e){return new z(e)}static oldestFirst(e,r){return e.compareTo(r)}static newestFirst(e,r){return r.compareTo(e)}static is(e){return tr(e).length===Yt}timestamp(){return Zt(this.str.slice(0,11))}clockid(){return Zt(this.str.slice(11,13))}formatted(){const e=this.toString();return`${e.slice(0,4)}-${e.slice(4,7)}-${e.slice(7,11)}-${e.slice(11,13)}`}toString(){return this.str}compareTo(e){return this.str>e.str?1:this.str<e.str?-1:0}equals(e){return this.str===e.str}newerThan(e){return this.compareTo(e)>0}olderThan(e){return this.compareTo(e)<0}}const pe=N({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),mn=N({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),yn=N({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),hn=N({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),gn=N({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),bn=N({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),vn=N({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),wn=N({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),kn=N({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),xn=Object.freeze(Object.defineProperty({__proto__:null,base32:pe,base32hex:gn,base32hexpad:vn,base32hexpadupper:wn,base32hexupper:bn,base32pad:yn,base32padupper:hn,base32upper:mn,base32z:kn},Symbol.toStringTag,{value:"Module"})),je=ye({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),An=ye({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),jn=Object.freeze(Object.defineProperty({__proto__:null,base36:je,base36upper:An},Symbol.toStringTag,{value:"Module"})),H=ye({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),qn=ye({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Sn=Object.freeze(Object.defineProperty({__proto__:null,base58btc:H,base58flickr:qn},Symbol.toStringTag,{value:"Module"}));var In=Qr,rr=128,Rn=-128,En=Math.pow(2,31);function Qr(t,e,r){e=e||[],r=r||0;for(var o=r;t>=En;)e[r++]=t&255|rr,t/=128;for(;t&Rn;)e[r++]=t&255|rr,t>>>=7;return e[r]=t|0,Qr.bytes=r-o+1,e}var Cn=dt,Tn=128,or=127;function dt(t,o){var r=0,o=o||0,i=0,n=o,a,c=t.length;do{if(n>=c)throw dt.bytes=0,new RangeError("Could not decode varint");a=t[n++],r+=i<28?(a&or)<<i:(a&or)*Math.pow(2,i),i+=7}while(a>=Tn);return dt.bytes=n-o,r}var Dn=Math.pow(2,7),Pn=Math.pow(2,14),Ln=Math.pow(2,21),_n=Math.pow(2,28),zn=Math.pow(2,35),Vn=Math.pow(2,42),Bn=Math.pow(2,49),Mn=Math.pow(2,56),Nn=Math.pow(2,63),Fn=function(t){return t<Dn?1:t<Pn?2:t<Ln?3:t<_n?4:t<zn?5:t<Vn?6:t<Bn?7:t<Mn?8:t<Nn?9:10},$n={encode:In,decode:Cn,encodingLength:Fn},Ie=$n;function pt(t,e=0){return[Ie.decode(t,e),Ie.decode.bytes]}function Re(t,e,r=0){return Ie.encode(t,e,r),e}function Ee(t){return Ie.encodingLength(t)}function Xr(t,e){const r=e.byteLength,o=Ee(t),i=o+Ee(r),n=new Uint8Array(i+r);return Re(t,n,0),Re(r,n,o),n.set(e,i),new qt(t,r,e,n)}function Un(t){const e=Hr(t),[r,o]=pt(e),[i,n]=pt(e.subarray(o)),a=e.subarray(o+n);if(a.byteLength!==i)throw new Error("Incorrect length");return new qt(r,i,a,e)}function On(t,e){if(t===e)return!0;{const r=e;return t.code===r.code&&t.size===r.size&&r.bytes instanceof Uint8Array&&fi(t.bytes,r.bytes)}}class qt{code;size;digest;bytes;
1constructor(e,r,o,i){this.code=e,this.size=r,this.digest=o,this.bytes=i}}function ir(t,e){const{bytes:r,version:o}=t;return o===0?Hn(r,lt(t),e??H.encoder):Wn(r,lt(t),e??pe.encoder)}const nr=new WeakMap;function lt(t){const e=nr.get(t);if(e==null){const r=new Map;return nr.set(t,r),r}return e}class q{code;version;multihash;bytes;"/";constructor(e,r,o,i){this.code=r,this.version=e,this.multihash=o,this.bytes=i,this["/"]=i}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{const{code:e,multihash:r}=this;if(e!==ae)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(r.code!==Kn)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return q.createV0(r)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{const{code:e,digest:r}=this.multihash,o=Xr(e,r);return q.createV1(this.code,o)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(e){return q.equals(this,e)}static equals(e,r){const o=r;return o!=null&&e.code===o.code&&e.version===o.version&&On(e.multihash,o.multihash)}toString(e){return ir(this,e)}toJSON(){return{"/":ir(this)}}link(){return this}[Symbol.toStringTag]="CID";[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(e){if(e==null)return null;const r=e;if(r instanceof q)return r;if(r["/"]!=null&&r["/"]===r.bytes||r.asCID===r){const{version:o,code:i,multihash:n,bytes:a}=r;return new q(o,i,n,a??sr(o,i,n.bytes))}else if(r[Jn]===!0){const{version:o,multihash:i,code:n}=r,a=Un(i);return q.create(o,n,a)}else return null}static create(e,r,o){if(typeof r!="number")throw new Error("String codecs are no longer supported");if(!(o.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(e){case 0:{if(r!==ae)throw new Error(`Version 0 CID must use dag-pb (code: ${ae}) block encoding`);return new q(e,r,o,o.bytes)}case 1:{const i=sr(e,r,o.bytes);return new q(e,r,o,i)}default:throw new Error("Invalid version")}}static createV0(e){return q.create(0,ae,e)}static createV1(e,r){return q.create(1,e,r)}static decode(e){const[r,o]=q.decodeFirst(e);if(o.length!==0)throw new Error("Incorrect length");return r}static decodeFirst(e){const r=q.inspectBytes(e),o=r.size-r.multihashSize,i=Hr(e.subarray(o,o+r.multihashSize));if(i.byteLength!==r.multihashSize)throw new Error("Incorrect length");const n=i.subarray(r.multihashSize-r.digestSize),a=new qt(r.multihashCode,r.digestSize,n,i);return[r.version===0?q.createV0(a):q.createV1(r.codec,a),e.subarray(r.size)]}static inspectBytes(e){let r=0;const o=()=>{const[y,k]=pt(e.subarray(r));return r+=k,y};let i=o(),n=ae;if(i===18?(i=0,r=0):n=o(),i!==0&&i!==1)throw new RangeError(`Invalid CID version ${i}`);const a=r,c=o(),d=o(),p=r+d,u=p-a;return{version:i,codec:n,multihashCode:c,digestSize:d,multihashSize:u,size:p}}static parse(e,r){const[o,i]=Gn(e,r),n=q.decode(i);if(n.version===0&&e[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return lt(n).set(o,e),n}}function Gn(t,e){switch(t[0]){case"Q":{const r=e??H;return[H.prefix,r.decode(`${H.prefix}${t}`)]}case H.prefix:{const r=e??H;return[H.prefix,r.decode(t)]}case pe.prefix:{const r=e??pe;return[pe.prefix,r.decode(t)]}case je.prefix:{const r=e??je;return[je.prefix,r.decode(t)]}default:{if(e==null)throw Error("To parse non base32, base36 or base58btc encoded CID multibase decoder must be provided");return[t[0],e.decode(t)]}}}function Hn(t,e,r){const{prefix:o}=r;if(o!==H.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);const i=e.get(o);if(i==null){const n=r.encode(t).slice(1);return e.set(o,n),n}else return i}function Wn(t,e,r){const{prefix:o}=r,i=e.get(o);if(i==null){const n=r.encode(t);return e.set(o,n),n}else return i}const ae=112,Kn=18;function sr(t,e,r){const o=Ee(t),i=o+Ee(e),n=new Uint8Array(i+r.byteLength);return Re(t,n,0),Re(e,n,o),n.set(r,i),n}const Jn=Symbol.for("@ipld/js-cid/CID"),Qn=20;function Zr({name:t,code:e,encode:r,minDigestLength:o,maxDigestLength:i}){return new Xn(t,e,r,o,i)}class Xn{name;code;encode;minDigestLength;maxDigestLength;
1constructor(e,r,o,i,n){this.name=e,this.code=r,this.encode=o,this.minDigestLength=i??Qn,this.maxDigestLength=n}digest(e,r){if(r?.truncate!=null){if(r.truncate<this.minDigestLength)throw new Error(`Invalid truncate option, must be greater than or equal to ${this.minDigestLength}`);if(this.maxDigestLength!=null&&r.truncate>this.maxDigestLength)throw new Error(`Invalid truncate option, must be less than or equal to ${this.maxDigestLength}`)}if(e instanceof Uint8Array){const o=this.encode(e);return o instanceof Uint8Array?ar(o,this.code,r?.truncate):o.then(i=>ar(i,this.code,r?.truncate))}else throw Error("Unknown type, must be binary type")}}function ar(t,e,r){if(r!=null&&r!==t.byteLength){if(r>t.byteLength)throw new Error(`Invalid truncate option, must be less than or equal to ${t.byteLength}`);t=t.subarray(0,r)}return Xr(e,t)}function Yr(t){return async e=>new Uint8Array(await crypto.subtle.digest(t,e))}const Zn=Zr({name:"sha2-256",code:18,encode:Yr("SHA-256")}),Yn=Zr({name:"sha2-512",code:19,encode:Yr("SHA-512")});function cr(t){return Number.isInteger(t)&&t>=0&&t<256}function ut(t){return t!=null&&typeof t=="object"}const es=Object.prototype,ts=Object.prototype.toString;function rs(t){return ut(t)&&os(t)}function os(t){const e=Object.getPrototypeOf(t);return e===null?!0:(e===es||Object.getPrototypeOf(e)===null)&&ts.call(t)==="[object Object]"}const We="Bu"+"f".repeat(2)+"er",Ce=globalThis?.[We]?.prototype instanceof Uint8Array&&"byteLength"in globalThis[We]?globalThis[We]:null,is=ye({prefix:"9",name:"base10",alphabet:"0123456789"}),ns=Object.freeze(Object.defineProperty({__proto__:null,base10:is},Symbol.toStringTag,{value:"Module"})),ss=N({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),as=N({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),cs=Object.freeze(Object.defineProperty({__proto__:null,base16:ss,base16upper:as},Symbol.toStringTag,{value:"Module"})),ds=N({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),ps=Object.freeze(Object.defineProperty({__proto__:null,base2:ds},Symbol.toStringTag,{value:"Module"})),eo=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),ls=eo.reduce((t,e,r)=>(t[r]=e,t),[]),us=eo.reduce((t,e,r)=>{const o=e.codePointAt(0);if(o==null)throw new Error(`Invalid character: ${e}`);return t[o]=r,t},[]);function fs(t){return t.reduce((e,r)=>(e+=ls[r],e),"")}function ms(t){const e=[];for(const r of t){const o=r.codePointAt(0);if(o==null)throw new Error(`Invalid character: ${r}`);const i=us[o];if(i==null)throw new Error(`Non-base256emoji character: ${r}`);e.push(i)}return new Uint8Array(e)}const ys=Wr({prefix:"🚀",name:"base256emoji",encode:fs,decode:ms}),hs=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:ys},Symbol.toStringTag,{value:"Module"})),gs=N({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),bs=Object.freeze(Object.defineProperty({__proto__:null,base8:gs},Symbol.toStringTag,{value:"Module"})),vs=Wr({prefix:"\0",name:"identity",encode:t=>mi(t),decode:t=>yi(t)}),ws=Object.freeze(Object.defineProperty({__proto__:null,identity:vs},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const dr={...ws,...ps,...bs,...ns,...cs,...xn,...jn,...Sn,...hi,...hs};function ks(t=0){return new Uint8Array(t)}function to(t,e,r,o){return{name:t,prefix:e,encoder:{name:t,prefix:e,encode:r},decoder:{decode:o}}}const pr=to("utf8","u",t=>"u"+new TextDecoder("utf8").decode(t),t=>new TextEncoder().encode(t.substring(1))),Ke=to("ascii","a",t=>{let e="a";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},t=>{t=t.substring(1);const e=ks(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}),ro={utf8:pr,"utf-8":pr,hex:dr.base16,latin1:Ke,ascii:Ke,binary:Ke,...dr};function xs(t,e="utf8"){const r=ro[e];if(r==null)throw new Error(`Unsupported encoding "${e}"`);return r.decoder.decode(`${r.prefix}${t}`)}const lr=Ce,As=typeof Uint8Array.fromBase64=="function"?function(e,r="base64"){return Uint8Array.fromBase64(e,{alphabet:r,lastChunkHandling:"loose"})}:null,js=lr?function(e,r="base64"){const o=lr.from(e,r);return oo(e,o),new Uint8Array(o.buffer,o.byteOffset,o.byteLength)}:null;function qs(t,e="base64"){const r=xs(t,t.endsWith("=")?`${e}pad`:e);return oo(t,r),r}function oo(t,e){const r=t.endsWith("==")?2:t.endsWith("=")?1:0,o=t.length-r,i=Math.floor(o*3/4);if(e.length!==i)throw new Error("Invalid base64 string");const n=e.length/3*4,a=n%4===0?0:4-n%4,c=n+a;if(t.length>c)throw new Error("Invalid base64 string");for(let d=Math.ceil(n);d<t.length-r;d++){const p=t.charCodeAt(d);if(!(p>=65&&p<=90)&&!(p>=97&&p<=122)&&!(p>=48&&p<=57)&&p!==43&&p!==47)throw new Error("Invalid base64 string")}}function Ss(t,e="utf8"){const r=ro[e];if(r==null)throw new Error(`Unsupported encoding "${e}"`);return r.encoder.encode(t).substring(1)}const Je=Ce,Is=typeof Uint8Array.prototype.toBase64=="function"?function(e,r="base64"){return e.toBase64({alphabet:r,om
1itPadding:!0})}:null,Rs=Je?function(e,r="base64"){const i=(e instanceof Je?e:Je.from(e)).toString(r);return i.charCodeAt(i.length-1)===61?i.charCodeAt(i.length-2)===61?i.slice(0,-2):i.slice(0,-1):i}:null;function Es(t,e="base64"){return Ss(t,e)}const Cs=Is??Rs??Es,Ts=As??js??qs;function Ds(t,e){if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0}const io=113,no=85,Ps=Zn.code;Yn.code;function Ls(t){return t.version===1&&t.code===no}function so(t){return t.version===1&&(t.code===no||t.code===io)&&t.multihash.code===Ps&&t.multihash.digest.byteLength===32}function _s(t){return t.code===io&&so(t)}function zs(t,e){switch(e?.flavor){case void 0:return!0;case"cbor":return _s(t);case"dasl":return so(t);case"raw":return Ls(t);default:throw new TypeError(`Unknown CID flavor: ${e?.flavor}`)}}function St(t,e){return Ns(t)&&zs(t,e)}function Vs(t,e){return St(t,e)?t:null}function Bs(t,e){if(St(t,e))return t;throw new Error(`Invalid CID "${t}"`)}function Ms(t,e){const r=q.parse(t);return Bs(r,e)}function Ns(t){if(q.asCID(t))return t.bytes!=null;try{if(!ut(t))return!1;const e=t;if(e.version!==0&&e.version!==1||!cr(e.code)||!ut(e.multihash))return!1;const r=e.multihash;return!(!cr(r.code)||!(r.digest instanceof Uint8Array)||!(e.bytes instanceof Uint8Array)||e.bytes[0]!==e.version||e.bytes[1]!==e.code||e.bytes[2]!==r.code||e.bytes[3]!==r.digest.length||e.bytes.length!==4+r.digest.length||!Ds(e.bytes.subarray(4),r.digest)||typeof e.equals!="function"||e.equals(e)!==!0)}catch{return!1}}const Fs={flavor:"raw"},$s=Number.isSafeInteger;function ur(t,e){if(!rs(t)||t?.$type!=="blob")return!1;const{mimeType:r,size:o,ref:i}=t;if(typeof r!="string"||!r.includes("/"))return!1;if(!(o===-1&&e?.strict===!1)){if(!$s(o)||o<0)return!1}if(typeof i!="object"||i===null)return!1;for(const a in t)if(a!=="$type"&&a!=="mimeType"&&a!=="ref"&&a!=="size")return!1;return!!Vs(i,e?.strict===!1?void 0:Fs)}function ao(t,e=""){let r=[],o=t.split(",").map(n=>n?parseInt(n,36):0),i=0;for(let n=0;n<o.length;n++)n%2?r.push([i,i+o[n],e?parseInt(e[n>>1],36):0]):i=o[n];return r}function co(t,e,r=0,o=e.length-1){for(;r<=o;){let i=r+o>>>1,n=e[i];if(t<n[0])o=i-1;else if(t>n[1])r=i+1;else return i}return-1}const ft=ao(",9,a,,b,1,d,,e,h,3j,w,4p,,4t,,4u,,lc,33,w3,6,13l,18,14v,,14x,1,150,1,153,,16o,5,174,a,17g,,18r,k,19s,,1cm,6,1ct,,1cv,5,1d3,1,1d6,3,1e7,,1e9,,1f4,q,1ie,a,1kb,8,1kt,,1li,3,1ln,8,1lx,2,1m1,4,1nd,2,1ow,1,1p3,8,1qi,n,1r6,,1r7,v,1s3,,1tm,,1tn,,1to,,1tq,2,1tt,7,1u1,3,1u5,,1u6,1,1u9,6,1uq,1,1vl,,1vm,1,1x8,,1xa,,1xb,1,1xd,3,1xj,1,1xn,1,1xp,,1xz,,1ya,1,1z2,,1z5,1,1z7,,20s,,20u,2,20x,1,213,1,217,2,21d,,228,1,22d,,22p,1,22r,,24c,,24e,2,24h,4,24n,1,24p,,24r,1,24t,,25e,1,262,5,269,,26a,1,27w,,27y,1,280,,281,3,287,1,28b,1,28d,,28l,2,28y,1,29u,,2bi,,2bj,,2bk,,2bl,1,2bq,2,2bu,2,2bx,,2c7,,2dc,,2dd,2,2dg,,2f0,,2f2,2,2f5,3,2fa,2,2fe,3,2fp,1,2g2,1,2gx,,2gy,1,2ik,,2im,,2in,1,2ip,,2iq,,2ir,1,2iu,2,2iy,3,2j9,1,2jm,1,2k3,,2kg,1,2ki,1,2m3,1,2m6,,2m7,1,2m9,3,2me,2,2mi,2,2ml,,2mm,,2mv,,2n6,1,2o1,,2o2,1,2q2,,2q7,,2q8,1,2qa,2,2qe,,2qg,6,2qn,,2r6,1,2sx,,2sz,,2t0,6,2tj,7,2wh,,2wj,,2wk,8,2x4,6,2zc,1,305,,307,,309,,30e,1,31t,d,327,,328,4,32e,1,32l,a,32x,z,346,,371,3,375,,376,5,37d,1,37f,1,37h,1,386,1,388,1,38e,2,38x,3,39e,,39g,,39h,1,39p,,3a5,,3cw,2n,3fk,1z,3hk,2f,3tp,2,4k2,3,4ky,2,4lu,1,4mq,1,4ok,1,4om,,4on,6,4ou,7,4p2,,4p3,1,4p5,a,4pp,,4qz,2,4r2,,4r3,,4ud,1,4vd,,4yo,2,4yr,3,4yv,1,4yx,2,4z4,1,4z6,,4z7,5,4zd,2,55j,1,55l,1,55n,,579,,57a,,57b,,57c,6,57k,,57m,,57p,7,57x,5,583,9,58f,,59s,u,5c0,3,5c4,,5dg,9,5dq,3,5du,2,5ez,8,5fk,1,5fm,,5gh,,5gi,3,5gm,1,5go,5,5ie,,5if,,5ig,1,5ii,2,5il,,5im,,5in,4,5k4,7,5kc,7,5kk,1,5km,1,5ow,2,5p0,c,5pd,,5pe,6,5pp,,5pw,,5pz,,5q0,1,5vk,1r,6bv,,6bw,,6bx,,6by,1,6co,6,6d8,,6dl,,6e8,f,6hc,w,6jm,,6k9,,6ms,5,6nd,1,6xm,1,6y0,,70o,,72n,,73d,a,73s,2,79e,,7fu,1,7g6,,7gg,,7i3,3,7i8,5,7if,b,7is,35,7m8,39,7pk,a,7pw,,7py,,7q5,,7q9,,7qg,,7qr,1,7r8,,7rb,,7rg,,7ri,,7rn,2,7rr,,7s3,4,7th,2,7tt,,7u8,,7un,,850,1,8hx,2,8ij,1,8k0,,8k5,,8vj,2,8zj,,928,v,wvj,3,wvo,9,wwu,1,wz4,1,x6q,,x6u,,x6z,,x7n,1,x7p,1,x7r,,x7w,,xa8,1,xbo,f,xc4,1,xcw,h,xdr,,xeu,7,xfr,a,xg2,,xg3,,xgg,s,xhc,2,xhf,,xir,,xis,1,xiu,3,xiy,1,xj0,1,xj2,1,xj4,,xk5,,xm1,5,xm7,1,xm9,1,xmb,1,xmd,1,xmr,,xn0,,xn1,,xoc,,xps,,xpu,2,xpz,1,xq6,1,xq9,,xrf,,xrg,1,xri,1,xrp,,xrq,,xyb,1,xyd,,xye,1,xyg,,xyh,1,xyk,,xyl,,1e68,f,1e74,f,1edb,,1ehq,1,1ek0,b,1eyl,,1f4w,,1f92,4,1gjl,2,1gjp,1,1gjw,3,1gl4,2,1glb,,1gpx,1,1h5w,3,1h7t,4,1hgr,1,1hj0,3,1hl2,a,1hmq,3,1hq8,,1hq9,,1hqa,,1hrs,e,1htc,,1htf,1,1htr,2,1htu,,1hv4,2,1hv7,3,1hvb,1,1hvd,1,1hvh,,1hvm,,1hvx,,1hxc,2,1hyf,4,1hyk,,1hyl,7,
11hz9,1,1i0j,,1i0w,1,1i0y,,1i2b,2,1i2e,8,1i2n,,1i2o,,1i2q,1,1i2x,3,1i32,,1i33,,1i5o,2,1i5r,2,1i5u,1,1i5w,3,1i66,,1i69,,1ian,,1iao,2,1iar,7,1ibk,1,1ibm,1,1id7,1,1ida,,1idb,,1idc,,1idd,3,1idj,1,1idn,1,1idp,,1idz,,1iea,1,1iee,6,1ieo,4,1igo,,1igp,1,1igr,5,1igy,,1ih1,,1ih3,2,1ih6,,1ih8,1,1iha,2,1ihd,,1ihe,,1iht,1,1ik5,2,1ik8,7,1ikg,1,1iki,2,1ikl,,1ikm,,1ila,,1ink,,1inl,1,1inn,5,1int,,1inu,,1inv,1,1inx,,1iny,,1inz,1,1io1,,1io2,1,1iun,,1iuo,1,1iuq,3,1iuw,3,1iv0,1,1iv2,,1iv3,1,1ivw,1,1iy8,2,1iyb,7,1iyj,1,1iyl,,1iym,,1iyn,1,1j1n,,1j1o,,1j1p,,1j1q,1,1j1s,7,1j4t,,1j4u,,1j4v,,1j4y,3,1j52,,1j53,4,1jcc,2,1jcf,8,1jco,,1jcp,1,1jjk,,1jjl,4,1jjr,1,1jjv,3,1jjz,,1jk0,,1jk1,,1jk2,,1jk3,,1jo1,2,1jo4,3,1joa,1,1joc,3,1jog,,1jok,,1jpd,9,1jqr,5,1jqx,,1jqy,,1jqz,3,1jrb,,1jrl,5,1jrr,1,1jrt,2,1jt0,5,1jt6,c,1jtj,,1jtk,1,1k4v,,1k4w,6,1k54,5,1k5a,,1k5b,,1k7m,l,1k89,,1k8a,6,1k8h,,1k8i,1,1k8k,,1k8l,1,1kc1,5,1kca,,1kcc,1,1kcf,6,1kcm,,1kcn,,1kei,4,1keo,1,1ker,1,1ket,,1keu,,1kev,,1koj,1,1kol,1,1kow,1,1koy,,1koz,,1kqc,1,1kqe,4,1kqm,1,1kqo,2,1kre,,1ovk,f,1ow0,,1ow7,e,1xr2,b,1xre,2,1xrh,2,1zow,4,1zqo,6,206b,,206f,3,20jz,,20k1,1i,20lr,3,20o4,,20og,1,2ftp,1,2fts,3,2jgg,19,2jhs,m,2jxh,4,2jxp,5,2jxv,7,2jy3,7,2jyd,6,2jze,3,2k3m,2,2lmo,1i,2lob,1d,2lpx,,2lqc,,2lqz,4,2lr5,e,2mtc,6,2mtk,g,2mu3,6,2mub,1,2mue,4,2mxb,,2n1s,6,2nce,,2ne4,3,2nsc,3,2nzi,1,2ok0,6,2on8,6,2pz4,73,2q6l,2,2q7j,,2q98,5,2q9q,1,2qa6,,2qa9,9,2qb1,1k,2qcm,p,2qdd,e,2qe2,,2qen,,2qeq,8,2qf0,3,2qfd,c1,2qrf,4,2qrk,8t,2r0m,7d,2r9c,3j,2rg4,b,2rit,16,2rkc,3,2rm0,7,2rmi,5,2rns,7,2rou,29,2rrg,1a,2rss,9,2rt3,c8,2scg,sd,jny8,v,jnz4,2n,jo1s,3j,jo5c,6n,joc0,2rz","262122424333333393233393339333333333393393b3b3b3b3b333b33b3bb33333b3b3333333b3b33bb3333b33b3bb33333b3bbb333b333b33333b3b3b3b3333b3b33b3bb39333b33b33b3b3b333b333333b3b333333b33b3b3333b3335dc333333b3b3b33323333b3bb3b33b3b3b3333b3333b3b333bb3b33b3b3b3b3b333b333b3323e2244234444444444444444444444444444444444444444443333333333b3b3bb33333b353b3b3b3b333b3b333b333333b3bb3b3b3bb333232333333333333333b3b3333bb3b393933b3b33bb3b393b3b3b3333b33b33b3bbb33b333b3333bb3933b3b3b333b3b3b3b3b33b3b3b33b3b3b33b3b33b33b3b3b33bb39b9b3b33b3b33b9333b393b3b33b33b3b3b3333393b3b3b33b39bb3b332333b333dd3b33332333323333333333333333333333344444444a44444434444444444444423232"),Us=ao("1sl,10,1ug,7,1vc,7,1w5,j,1wq,6,1wy,,1x2,3,1y4,1,1y7,,1yo,1,239,j,23u,6,242,1,245,4,261,,26t,j,27e,6,27m,1,27p,4,28s,1,28v,,29d,,2dx,j,2ei,f,2fs,2,2l1,11"),fr=65535;function*Os(t){let e=t.codePointAt(0);if(e==null)return;let r=e<=fr?1:2,o=t.length,i=mr(e),n=0,a=0,c=!1,d=!1,p=!1,u=0,y=i,k=e;for(;r<o;){e=t.codePointAt(r),n=mr(e);let A=!0;i===1?A=n!==6:i===2||i===6||n===1||n===2||n===6?A=!0:n===3||n===14||n===11||i===9?A=!1:i===14&&n===4?A=!c:i===10&&n===10?A=a++%2===1:i===5?A=!(n===5||n===13||n===7||n===8):((i===7||i===13)&&(n===13||n===12)||(i===8||i===12)&&n===12||n===0&&d&&p&&yr(e))&&(A=!1),A?(yield{segment:t.slice(u,r),index:u,input:t,_hd:k,_catBegin:y,_catEnd:i},c=!1,a=0,u=r,y=n,k=e):n===14&&(i===3||i===4)?c=!0:e>=2325&&(!d&&i===0&&(d=yr(k)),d&&n===3?p=p||e===2381||e===2509||e===2637||e===2765||e===2893||e===3149||e===3405:p=!1),r+=e<=fr?1:2,i=n}u<o&&(yield{segment:t.slice(u),index:u,input:t,_hd:k,_catBegin:y,_catEnd:i})}function Gs(t){let e=0;for(let r of Os(t))e+=1;return e}const po=new Uint8Array(6080),Te=128,mt=12287,lo=new Uint8Array(1536),De=40960,uo=44031,Hs=(()=>{let t=0;for(;;){let[e,r,o]=ft[t];if(e>uo)break;if(t++,!(r<Te||e>mt&&r<De))for(let i=e;i<=r;i++){let n,a=0;i<=mt?(n=po,a=i-Te>>1):(n=lo,a=i-De>>1),n[a]=i&1?n[a]&15|o<<4:n[a]&240|o}}return t})();function mr(t){if(t<Te)return t>=32?0:t===10?6:t===13?1:2;if(t<=mt){let r=po[t-Te>>1];return t&1?r>>4:r&15}if(t<De)return t<12336?t>=12330?3:0:t<12443?t===12336||t===12349?4:t>=12441?3:0:t===12951||t===12953?4:0;if(t<=uo){let r=lo[t-De>>1];return t&1?r>>4:r&15}if(t<=55203)return(t-44032)%28===0?7:8;if(t<=55295)return t<=55238?t>=55216?13:0:t>=55243?12:0;if(t<65024)return t===64286?3:0;let e=co(t,ft,Hs);return e<0?0:ft[e][2]}function yr(t){return co(t,Us)>=0}const hr="Segmenter"in Intl&&typeof Intl.Segmenter=="function"?new Intl.Segmenter:null,Ws=hr?function(e){let r=0;
1for(const o of hr.segment(e))r++;return r}:null;function Ks(t){return Gs(t)}const Js=Ce?function(e){return Ce.byteLength(e,"utf8")}:null;function Qs(t){let e=t.length,r;for(let o=0;o<t.length;o+=1)r=t.charCodeAt(o),r<=127||(r<=2047?e+=1:(e+=2,r>=55296&&r<=56319&&(r=t.charCodeAt(o+1),r>=56320&&r<=57343&&o++)));return e}const Xs=Ws??Ks,Zs=Js??Qs;function Ys(t){if(!(!t||!("$bytes"in t))){for(const e in t)if(e!=="$bytes")return;if(typeof t.$bytes=="string")try{return Ts(t.$bytes)}catch{return}}}function ea(t){return{$bytes:Cs(t)}}function fo(t,e){if(!t||!("$link"in t))return;for(const o in t)if(o!=="$link")return;const{$link:r}=t;if(typeof r=="string"&&r.length!==0&&!(r.length>2048))try{return Ms(r,e)}catch{return}}function ta(t){return{$link:t.toString()}}function ra(t,e){if(t.$type!=="blob")return;const r=t?.ref;if(!(!r||typeof r!="object")){if("$link"in r){const o=fo(r);if(!o)return;const i={...t,ref:o};if(ur(i,e))return i}if(ur(t))return t}}function It(t,e={strict:!1}){switch(typeof t){case"object":return t===null?null:Array.isArray(t)?oa(t,e):aa(t,e)??ia(t,e);case"number":if(Number.isSafeInteger(t)||e.strict===!1)return t;throw new TypeError(`Invalid non-integer number: ${t}`);case"boolean":case"string":return t;default:throw new TypeError(`Invalid JSON value: ${typeof t}`)}}function oa(t,e){let r;for(let o=0;o<t.length;o++){const i=t[o],n=It(i,e);n!==i&&(r??=Array.from(t),r[o]=n)}return r??t}function ia(t,e){let r;for(const[o,i]of Object.entries(t)){if(o==="__proto__")throw new TypeError("Invalid key: __proto__");if(i===void 0){r??={...t},delete r[o];continue}const n=It(i,e);n!==i&&(r??={...t},r[o]=n)}return r??t}function Rt(t){switch(typeof t){case"object":return t===null?t:Array.isArray(t)?na(t):St(t)?ta(t):ArrayBuffer.isView(t)?ea(t):sa(t);case"boolean":case"string":case"number":return t;default:throw new TypeError(`Invalid Lex value: ${typeof t}`)}}function na(t){let e;for(let r=0;r<t.length;r++){const o=t[r],i=Rt(o);i!==o&&(e??=Array.from(t),e[r]=i)}return e??t}function sa(t){let e;for(const[r,o]of Object.entries(t)){if(r==="__proto__")throw new TypeError("Invalid key: __proto__");if(o===void 0){e??={...t},delete e[r];continue}const i=Rt(o);i!==o&&(e??={...t},e[r]=i)}return e??t}function aa(t,e){if(t.$link!==void 0){const r=fo(t);if(r)return r;if(e.strict)throw new TypeError("Invalid $link object")}else if(t.$bytes!==void 0){const r=Ys(t);if(r)return r;if(e.strict)throw new TypeError("Invalid $bytes object")}else if(t.$type!==void 0&&e.strict)if(t.$type==="blob"){const r=ra(t,e);if(r)return r;throw new TypeError("Invalid blob object")}else{if(typeof t.$type!="string")throw new TypeError(`Invalid $type property (${typeof t.$type})`);if(t.$type.length===0)throw new TypeError("Empty $type property")}}const ca=t=>It(t,{strict:!1}),mo=t=>t===void 0||Number.isNaN(t)?t:Rt(t);async function da(t,e={}){const{maxRetries:r=3,retryable:o=()=>!0,getWaitMs:i=pa}=e;let n=0,a;for(;!a;)try{return await t()}catch(c){const d=i(n);n<r&&d!==null&&o(c)?(n+=1,d!==0&&await fn(d)):a=c}throw a}function pa(t,e=100,r=1e3){const o=Math.pow(2,t)*e,i=Math.min(o,r);return la(i)}function la(t){const e=t*.15;return t+ua(-e,e)}function ua(t,e){return Math.random()*(e-t)+t}const yo=re().transform((t,e)=>{const r=q.asCID(t);return r??(e.addIssue({code:Ae.custom,message:"Not a valid CID"}),bi)});b({version:S(1),roots:W(yo)});const fa={cid:yo,bytes:gi(Uint8Array),string:l(),array:W(re()),map:Q(l(),re()),unknown:re()},ho=/^did:[a-z]+:[a-zA-Z0-9._:%-]*[a-zA-Z0-9._-]$/;function yt(t){if(!ho.test(t))throw new ht("DID didn't validate via regex");if(t.length>2048)throw new ht("DID is too long (2048 chars max)")}function go(t){return t.length<=2048&&ho.test(t)}let ht=class extends Error{};const bo=/^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/;function ma(t){if(t.length>253)throw new gt("Handle is too long (253 chars max)");if(!bo.test(t))throw new gt("Handle didn't validate via regex")}function vo(t){return t.length<=253&&bo.test(t)}let gt=class extends Error{};function ya(t){return t.startsWith("did:")}function gr(t){try{if(!t||typeof t!="string")throw new TypeError("Identifier must be a non-empty string");t.startsWith("did:")?yt(t):ma(t)}catch(e){throw new gt("Invalid DID or handle",{cause:e})}}function wo(t){return!t||typeof t!="string"?!1:t.startsWith("did:")?go(t):vo(t)}function he(t){return{success:!0,value:t}}function x(t){return{success:!1,message:t}}function br(t){const e=ha(t);if(!e.success)throw new xa(e.message)}function Et(t){return ka(t).success}function ha(t){if(t.length>317)return x("NSID is too long (317 chars max)");if(ga(t))return x("Disallowed characters in NSID (ASCII letters, digits, dashes, periods only)");const e=t.split(".");if(e.length<3)return x("NSID needs at least three parts");for(const r of e){if(r.length<1)return x("NSID parts can not be empty");if(r.length>63)return x("NSID part too long (max 63 chars)");if(ba(r)||va(r))return x("NSID parts can not start or end with hyphen")}return ko(e[0])?x("NSID first part may not start with a digit"):wa(e[e.length-1])?he(e):x("NSID name part must be only letters and digits (and no leading digit)")}function ga(t){return!/^[a-zA-Z0-9.-]*$/.test(t)}function ko(t){const e=t.charCodeAt(0);return e>=48&&e<=57}function ba(t){return t.charCodeAt(0)===45}function va(t){return t.charCodeAt(t.length-1)===45}function wa(t){return!ko(t)&&!t.includes("-")}function ka(t){return t.length>317?x("NSID is too long (317 chars max)"):t.length<5||!/^[a-zA-Z](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?:\.[a-zA-Z](?:[a-zA-Z0-9]{0,62})?)$/.test(t)?x("NSID didn't validate via regex"):he(t)}
1class xa extends Error{}const bt=512,vt=1,xo=new Set([".",".."]),Ao=/^[a-zA-Z0-9_~.:-]{1,512}$/;function vr(t){if(t.length>bt||t.length<vt)throw new Qe(`record key must be ${vt} to ${bt} characters`);if(xo.has(t))throw new Qe('record key can not be "." or ".."');if(!Ao.test(t))throw new Qe("record key syntax not valid (regex)")}function jo(t){return t.length>=vt&&t.length<=bt&&Ao.test(t)&&!xo.has(t)}class Qe extends Error{}function Aa(t,e){return Sa(t,e).success}const ja=/[^a-zA-Z0-9._~:@!$&'()*+,;=%/\\[\]#?-]/,qa=/^(?<uri>at:\/\/(?<authority>[^/?#\s]+)(?:\/(?<collection>[^/?#\s]+)(?:\/(?<rkey>[^/?#\s]+))?)?(?<trailingSlash>\/)?)(?:\?(?<query>[^#\s]*))?(?:#(?<hash>[^\s]*))?$/;function Sa(t,e){if(typeof t!="string")return x("ATURI must be a string");if(t.length>8192)return x("ATURI exceeds maximum length");if(t.match(ja))return x("Disallowed characters in ATURI (ASCII)");const i=t.match(qa)?.groups;if(!i){if(e?.detailed){if(!t.startsWith("at://"))return x('ATURI must start with "at://"');if(t.includes(" "))return x("ATURI can not contain spaces");if(t.includes("//",5))return x("ATURI can not have empty path segments");const n=t.indexOf("/",5);if(n!==-1){const a=t.indexOf("#"),c=a!==-1?a:t.length,d=t.indexOf("/",n+1);if(d!==-1&&d!==c-1)return x("ATURI can not have more than two path segments")}}return x("ATURI does not match expected format")}if(!wo(i.authority))return x("ATURI has invalid authority");if(i.collection!=null&&!Et(i.collection))return x("ATURI has invalid collection");if(i.hash!=null){const n=Ra(i.hash,e);if(n.success)i.hash=n.value;else return x(`ATURI has invalid fragment (${n.message})`)}if(e?.strict!==!1){if(i.trailingSlash!=null)return x("ATURI can not have a trailing slash");if(i.query!=null)return x("ATURI query part is not allowed");if(i.rkey!=null&&!jo(i.rkey))return x("ATURI has invalid record key")}return he(i)}const Ia=/^\/[a-zA-Z0-9._~:@!$&')(*+,;=%[\]/-]*$/;function Ra(t,e){if(!Ia.test(t))return x("Invalid JSON pointer");const r=Ea(t);return!r.success&&e?.strict===!1?he(t):r}function Ea(t){try{return he(decodeURIComponent(t))}catch{return x("Invalid percent-encoding")}}const Ca=/^(at:\/\/)?((?:did:[a-z0-9:%-]+)|(?:[a-z0-9][a-z0-9.:-]*))(\/[^?#\s]*)?(\?[^#\s]+)?(#[^\s]+)?$/i,Ta=/^(\/[^?#\s]*)?(\?[^#\s]+)?(#[^\s]+)?$/i;class K{constructor(e,r){const o=r!==void 0?Object.assign(typeof r=="string"?wr(r):{host:r.host},kr(e)):wr(e);gr(o.host),this.hash=o.hash??"",this.host=o.host,this.pathname=o.pathname??"",this.searchParams=o.searchParams}static make(e,r,o){let i=e;return r&&(i+="/"+r),o&&(i+="/"+o),new K(i)}get protocol(){return"at:"}get origin(){return`at://${this.host}`}get did(){const{host:e}=this;if(ya(e))return e;throw new ht(`AtUri "${this}" does not have a DID hostname`)}get hostname(){return this.host}set hostname(e){gr(e),this.host=e}get search(){return this.searchParams.toString()}set search(e){this.searchParams=new URLSearchParams(e)}get collection(){return this.pathname.split("/").filter(Boolean)[0]||""}get collectionSafe(){const{collection:e}=this;return br(e),e}set collection(e){br(e),this.unsafelySetCollection(e)}unsafelySetCollection(e){const r=this.pathname.split("/").filter(Boolean);r[0]=e,this.pathname=r.join("/")}get rkey(){return this.pathname.split("/").filter(Boolean)[1]||""}get rkeySafe(){const{rkey:e}=this;return vr(e),e}set rkey(e){vr(e),this.unsafelySetRkey(e)}unsafelySetRkey(e){const r=this.pathname.split("/").filter(Boolean);r[0]||="undefined",r[1]=e,this.pathname=r.join("/")}get href(){return this.toString()}toString(){let e=this.pathname;for(e&&!e.startsWith("/")&&(e=`/${e}`);e.endsWith("/");)e=e.slice(0,-1);let r="";this.searchParams.size&&(r=`?${this.searchParams.toString()}`);let o=this.hash;return o==="#"?o="":o&&!o.startsWith("#")&&(o=`#${o}`),`at://${this.host}${e}${r}${o}`}}function wr(t){const e=t.match(Ca);if(!e)throw new Error(`Invalid AT uri: ${t}`);return{host:e[2],hash:e[5],pathname:e[3],searchParams:new URLSearchParams(e[4])}}function kr(t){const e=t.match(Ta);if(!e)throw new Error(`Invalid path: ${t}`);return{hash:e[3],pathname:e[1],searchParams:new URLSearchParams(e[2])}}(()=>{var t={d:(p,u)=>{for(var y in u)t.o(u,y)&&!t.o(p,y)&&Object.defineProperty(p,y,{enumerable:!0,get:u[y]})},o:(p,u)=>Object.prototype.hasOwnProperty.call(p,u),r:p=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})}},e={};function r(p,u){return u===void 0&&(u="-"),new RegExp("^(?!0{4}"+u+"0{2}"+u+"0{2})((?=[0-9]{4}"+u+"(((0[^2])|1[0-2])|02(?="+u+"(([0-1][0-9])|2[0-8])))"+u+"[0-9]{2})|(?=((([13579][26])|([2468][048])|(0[48]))0{2})|([0-9]{2}((((0|[2468])[48])|[2468][048])|([13579][26])))"+u+"02"+u+"29))([0-9]{4})"+u+"(?!((0[469])|11)"+u+"31)((0[1,3-9]|1[0-2])|(02(?!"+u+"3)))"+u+"(0[1-9]|[1-2][0-9]|3[0-1])$").test(p)}function o(p){var u=/\D/.exec(p);return u?u[0]:""}function i(p,u,y){u===void 0&&(u=":"),y===void 0&&(y=!1);var k=new RegExp("^([0-1]|2(?=([0-3])|4"+u+"00))[0-9]"+u+"[0-5][0-9]("+u+"([0-5]|6(?=0))[0-9])?(.[0-9]{1,9})?$");if(!y||!/[Z+\-]/.test(p))return k.test(p);if(/Z$/.test(p))return k.test(p.replace("Z",""));var A=p.includes("+"),F=p.split(/[+-]/),B=F[0],C=F[1];return k.test(B)&&(function(T,$,I){return I===void 0&&(I=":"),new RegExp($?"^(0(?!(2"+I+"4)|0"+I+"3)|1(?=([0-1]|2(?="+I+"[04])|[34](?="+I+"0))))([03469](?="+I+"[03])|[17](?="+I+"0)|2(?="+I+"[04])|5(?="+I+"[034])|8(?="+I+"[04]))"+I+"([03](?=0)|4(?=5))[05]$":"^(0(?=[^0])|1(?=[0-2]))([39](?="+I+"[03])|[0-24-8](?="+I+"00))"+I+"[03]0$").test(T)})(C,A,o(C))}function n(p){var u=p.split("T"),y=u[0],k=u[1],A=r(y,o(y));if(!k)return!1;var F,B=(F=k.match(/([^Z+\-\d])(?=\d+\1)/),Array.isArray(F)?F[0]:"");return A&&i(k,B,!0)}function a(p,u){return u===void 0&&(u="-"),new RegExp("^[0-9]{4}"+u+"(0(?=[^0])|1(?=[0-2]))[0-9]$").test(p)}t.r(e),t.d(e,{isValidDate:()=>r,isValidISODateString:()=>n,isValidTime:()=>i,isValidYearMonth:()=>a});var c=st;for(var d in e)c[d]=e[d];
1e.__esModule&&Object.defineProperty(c,"__esModule",{value:!0})})();const Da=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),{isValidISODateString:Pa}=(t=>t.default??t)(Da);function La(t){return Ba(t).success}function _a(t){if(typeof t!="string")return!1;try{if(Pa(t))return!0}catch{}return La(t)}const X=t=>({success:!1,message:t}),za=t=>({success:!0,value:t}),Va=/^(?<full_year>[0-9]{4})-(?<date_month>0[1-9]|1[012])-(?<date_mday>[0-2][0-9]|3[01])T(?<time_hour>[0-1][0-9]|2[0-3]):(?<time_minute>[0-5][0-9]):(?<time_second>[0-5][0-9]|60)(?<time_secfrac>\.[0-9]+)?(?<time_offset>Z|(?<time_numoffset>[+-](?:[0-1][0-9]|2[0-3]):[0-5][0-9]))$/;function Ba(t){if(typeof t!="string")return X("datetime must be a string");if(t.length>64)return X("datetime is too long (64 chars max)");if(t.endsWith("-00:00"))return X('datetime can not use "-00:00" for UTC timezone');if(!Va.test(t))return X("datetime is not in a valid format (must match RFC 3339 & ISO 8601 with 'Z' or ±hh:mm timezone)");const e=new Date(t);return Ma(e)}function Ma(t){const e=t.getUTCFullYear();return Number.isNaN(e)?X("datetime did not parse as ISO 8601"):e<0?X("datetime normalized to a negative time"):e>9999?X("datetime year is too far in the future"):za(t)}const Na=/^((?<grandfathered>(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|n
1o-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?<language>([A-Za-z]{2,3}(-(?<extlang>[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?<script>[A-Za-z]{4}))?(-(?<region>[A-Za-z]{2}|[0-9]{3}))?(-(?<variant>[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?<extension>[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?<privateUseA>x(-[A-Za-z0-9]{1,8})+))?)|(?<privateUseB>x(-[A-Za-z0-9]{1,8})+))$/;function qo(t){return Na.test(t)}const Fa=13,$a=/^[234567abcdefghij][234567abcdefghijklmnopqrstuvwxyz]{12}$/;function Ua(t){return t.length===Fa&&$a.test(t)}function Oa(t){return/^\w+:(?:\/\/)?[^\s/][^\s]*$/.test(t)}const Ga=Xs,Ha=Zs,Wa=qo,Ka=t=>tc.safeParse(t).success,Ja=t=>Qa(t,{id:"#atproto_pds",type:"AtprotoPersonalDataServer"}),Qa=(t,e)=>{const r=Xa(t,"service",e.id);if(r&&r.type===e.type&&typeof r.serviceEndpoint=="string")return Za(r.serviceEndpoint)};function Xa(t,e,r){const o=t[e];if(o)for(let i=0;i<o.length;i++){const n=o[i],a=n.id;if(a[0]==="#"?a===r:a.length===t.id.length+r.length&&a[t.id.length]==="#"&&a.endsWith(r)&&a.startsWith(t.id))return n}}const Za=t=>{if(!(!t.startsWith("http://")&&!t.startsWith("https://"))&&Ya(t))return t},Ya=URL.canParse??(t=>{try{return new URL(t),!0}catch{return!1}}),xr=b({id:l(),type:l(),controller:l(),publicKeyJwk:Q(l(),re()).optional(),publicKeyMultibase:l().optional()}),ec=b({id:l(),type:l(),serviceEndpoint:Y([l(),Q(re())])}),tc=b({"@context":Y([S("https://www.w3.org/ns/did/v1"),W(l().url())]).optional(),id:l(),alsoKnownAs:W(l()).optional(),verificationMethod:W(xr).optional(),authentication:W(Y([l(),xr])).optional(),service:W(ec).optional()});function D(t,e){if(t.split("#").length>2)throw new Error("Uri can only have one hash segment");if(t.startsWith("lex:"))return t;if(t.startsWith("#")){if(!e)throw new Error(`Unable to resolve uri without anchor: ${t}`);return`${e}${t}`}return`lex:${t}`}function So(t,e){if(t.required!==void 0){if(!Array.isArray(t.required)){e.addIssue({code:Ae.invalid_type,received:typeof t.required,expected:"array"});return}if(t.properties===void 0){t.required.length>0&&e.addIssue({code:Ae.custom,message:"Required fields defined but no properties defined"});return}for(const r of t.required)t.properties[r]===void 0&&e.addIssue({code:Ae.custom,message:`Required field "${r}" not defined`})}}const rc=l().refine(Wa,"Invalid BCP47 language tag"),Ar=Q(rc,l().optional()),ge=b({type:S("boolean"),description:l().optional(),default:ie().optional(),const:ie().optional()}),be=b({type:S("integer"),description:l().optional(),default:R().int().optional(),minimum:R().int().optional(),maximum:R().int().optional(),enum:R().int().array().optional(),const:R().int().optional()}),oc=vi(["datetime","uri","at-uri","did","handle","at-identifier","nsid","cid","language","tid","record-key"]),ve=b({type:S("string"),format:oc.optional(),description:l().optional(),default:l().optional(),minLength:R().int().optional(),maxLength:R().int().optional(),minGraphemes:R().int().optional(),maxGraphemes:R().int().optional(),enum:l().array().optional(),const:l().optional(),knownValues:l().array().optional()}),we=b({type:S("unknown"),description:l().optional()}),ic=ne("type",[ge,be,ve,we]),Ne=b({type:S("bytes"),description:l().optional(),maxLength:R().optional(),minLength:R().optional()}),Fe=b({type:S("cid-link"),description:l().optional()});ne("type",[Ne,Fe]);const Ct=b({type:S("ref"),description:l().optional(),ref:l()}),$e=b({type:S("union"),description:l().optional(),refs:l().array(),closed:ie().optional()}),nc=ne("type",[Ct,$e]),Tt=b({type:S("blob"),description:l().optional(),accept:l().array().optional(),maxSize:R().optional()}),Dt=b({type:S("array"),description:l().optional(),items:ne("type",[ge,be,ve,we,Ne,Fe,Ct,$e,Tt]),minLength:R().int().optional(),maxLength:R().int().optional()}),sc=Dt.merge(b({items:ic})),ac=b({type:S("token"),description:l().optional()}),Pt=b({type:S("object"),description:l().optional(),required:l().array().optional(),nullable:l().array().optional(),properties:Q(l(),ne("type",[Dt,ge,be,ve,we,Ne,Fe,Ct,$e,Tt]))}).superRefine(So),cc=wi(b({type:S("permission"),resource:l().nonempty()}),Q(l(),Y([W(Y([l(),R().int(),ie()])),ie(),R().int(),l()]).optional())),dc=b({type:S("permission-set"),description:l().optional(),title:l().optional(),"title:lang":Ar.optional(),detail:l().optional(),"detail:lang":Ar.optional(),permissions:W(cc)}),Lt=b({type:S("params"),description:l().optional(),required:l().array().optional(),properties:Q(l(),ne("type",[sc,ge,be,ve,we]))}).superRefine(So),wt=b({description:l().optional(),encoding:l(),schema:Y([nc,Pt]).optional()}),_t=b({name:l(),description:l().optional()}),pc=b({type:S("query"),description:l().optional(),parameters:Lt.optional(),output:wt.optional(),errors:_t.array().optional()}),lc=b({type:S("procedure"),description:l().optional(),parameters:Lt.optional(),input
1:wt.optional(),output:wt.optional(),errors:_t.array().optional()}),uc=b({type:S("subscription"),description:l().optional(),parameters:Lt.optional(),message:b({description:l().optional(),schema:$e}),errors:_t.array().optional()}),fc=b({type:S("record"),description:l().optional(),key:l().optional(),record:Pt}),mc=ki(t=>{if(!(!t||typeof t!="object")&&t.type!==void 0)switch(t.type){case"record":return fc.parse(t);case"permission-set":return dc.parse(t);case"query":return pc.parse(t);case"procedure":return lc.parse(t);case"subscription":return uc.parse(t);case"blob":return Tt.parse(t);case"array":return Dt.parse(t);case"token":return ac.parse(t);case"object":return Pt.parse(t);case"boolean":return ge.parse(t);case"integer":return be.parse(t);case"string":return ve.parse(t);case"bytes":return Ne.parse(t);case"cid-link":return Fe.parse(t);case"unknown":return we.parse(t)}},t=>!t||typeof t!="object"?{message:"Must be an object",fatal:!0}:t.type===void 0?{message:"Must have a type",fatal:!0}:typeof t.type!="string"?{message:"Type property must be a string",fatal:!0}:{message:`Invalid type: ${t.type} must be one of: record, query, procedure, subscription, blob, array, token, object, boolean, integer, string, bytes, cid-link, unknown`,fatal:!0});b({lexicon:S(1),id:l().refine(Et,{message:"Must be a valid NSID"}),revision:R().optional(),description:l().optional(),defs:Q(l(),mc)}).refine(t=>{for(const[e,r]of Object.entries(t.defs))if(e!=="main"&&(r.type==="record"||r.type==="permission-set"||r.type==="procedure"||r.type==="query"||r.type==="subscription"))return!1;return!0},{message:"Records, permission sets, procedures, queries, and subscriptions must be the main definition."});function Pe(t){return t!=null&&typeof t=="object"}function yc(t){return Pe(t)&&"$type"in t&&typeof t.$type=="string"}class f extends Error{}class jr extends Error{}
1class hc extends Error{}const Io=b({$type:S("blob"),ref:fa.cid,mimeType:l(),size:R()}).strict(),gc=b({cid:l(),mimeType:l()}).strict(),Ro=Y([Io,gc]);class Z{constructor(e,r,o,i){this.ref=e,this.mimeType=r,this.size=o,this.original=i??{$type:"blob",ref:e,mimeType:r,size:o}}static asBlobRef(e){return ct(e,Ro)?Z.fromJsonRef(e):null}static fromJsonRef(e){return ct(e,Io)?new Z(e.ref,e.mimeType,e.size):new Z(q.parse(e.cid),e.mimeType,-1,e)}ipld(){return this.original}toJSON(){return mo(this.ipld())}}function bc(t,e,r,o){return!o||!(o instanceof Z)?{success:!1,error:new f(`${e} should be a blob ref`)}:{success:!0,value:o}}const vc=O(_a,"must be an valid atproto datetime (both RFC-3339 and ISO-8601)"),wc=O(Oa,"must be a uri"),kc=O(Aa,"must be a valid at-uri"),xc=O(go,"must be a valid did"),Ac=O(vo,"must be a valid handle"),jc=O(wo,"must be a valid did or a handle"),qc=O(Et,"must be a valid nsid"),Sc=O(Cc,"must be a cid string"),Ic=O(qo,"must be a well-formed BCP 47 language tag"),Rc=O(Ua,"must be a valid TID"),Ec=O(jo,"must be a valid Record Key");function O(t,e){return(r,o)=>t(o)?{success:!0,value:o}:{success:!1,error:new f(`${r} ${e}`)}}function Cc(t){try{return q.parse(t),!0}catch{return!1}}function Eo(t,e,r,o){switch(r.type){case"boolean":return Tc(t,e,r,o);case"integer":return Dc(t,e,r,o);case"string":return Pc(t,e,r,o);case"bytes":return Lc(t,e,r,o);case"cid-link":return _c(t,e,r,o);case"unknown":return zc(t,e,r,o);default:return{success:!1,error:new f(`Unexpected lexicon type: ${r.type}`)}}}function Tc(t,e,r,o){r=r;const i=typeof o;return i==="undefined"?typeof r.default=="boolean"?{success:!0,value:r.default}:{success:!1,error:new f(`${e} must be a boolean`)}:i!=="boolean"?{success:!1,error:new f(`${e} must be a boolean`)}:typeof r.const=="boolean"&&o!==r.const?{success:!1,error:new f(`${e} must be ${r.const}`)}:{success:!0,value:o}}function Dc(t,e,r,o){return r=r,typeof o==="undefined"?typeof r.default=="number"?{success:!0,value:r.default}:{success:!1,error:new f(`${e} must be an integer`)}:Number.isInteger(o)?typeof r.const=="number"&&o!==r.const?{success:!1,error:new f(`${e} must be ${r.const}`)}:Array.isArray(r.enum)&&!r.enum.includes(o)?{success:!1,error:new f(`${e} must be one of (${r.enum.join("|")})`)}:typeof r.maximum=="number"&&o>r.maximum?{success:!1,error:new f(`${e} can not be greater than ${r.maximum}`)}:typeof r.minimum=="number"&&o<r.minimum?{success:!1,error:new f(`${e} can not be less than ${r.minimum}`)}:{success:!0,value:o}:{success:!1,error:new f(`${e} must be an integer`)}}function Pc(t,e,r,o){if(r=r,typeof o>"u")return typeof r.default=="string"?{success:!0,value:r.default}:{success:!1,error:new f(`${e} must be a string`)};if(typeof o!="string")return{success:!1,error:new f(`${e} must be a string`)};if(typeof r.const=="string"&&o!==r.const)return{success:!1,error:new f(`${e} must be ${r.const}`)};if(Array.isArray(r.enum)&&!r.enum.includes(o))return{success:!1,error:new f(`${e} must be one of (${r.enum.join("|")})`)};if(typeof r.minLength=="number"||typeof r.maxLength=="number"){if(typeof r.minLength=="number"&&o.length*3<r.minLength)return{success:!1,error:new f(`${e} must not be shorter than ${r.minLength} characters`)};let i=!1;if(typeof r.minLength>"u"&&typeof r.maxLength=="number"&&o.length*3<=r.maxLength&&(i=!0),!i){const n=Ha(o);if(typeof r.maxLength=="number"&&n>r.maxLength)return{success:!1,error:new f(`${e} must not be longer than ${r.maxLength} characters`)};if(typeof r.minLength=="number"&&n<r.minLength)return{success:!1,error:new f(`${e} must not be shorter than ${r.minLength} characters`)}}}if(typeof r.maxGraphemes=="number"||typeof r.minGraphemes=="number"){let i=!1,n=!1;if(typeof r.maxGraphemes=="number"&&(o.length<=r.maxGraphemes?i=!1:i=!0),typeof r.minGraphemes=="number"){if(o.length<r.minGraphemes)return{success:!1,error:new f(`${e} must not be shorter than ${r.minGraphemes} graphemes`)};n=!0}if(i||n){const a=Ga(o);if(typeof r.maxGraphemes=="number"&&a>r.maxGraphemes)return{success:!1,error:new f(`${e} must not be longer than ${r.maxGraphemes} graphemes`)};if(typeof r.minGraphemes=="number"&&a<r.minGraphemes)return{success:!1,error:new f(`${e} must not be shorter than ${r.minGraphemes} graphemes`)}}}if(typeof r.format=="string")switch(r.format){case"datetime":return vc(e,o);case"uri":return wc(e,o);case"at-uri":return kc(e,o);case"did":return xc(e,o);case"handle":return Ac(e,o);case"at-identifier":return jc(e,o);case"nsid":return qc(e,o);case"cid":return Sc(e,o);case"language":return Ic(e,o);case"tid":return Rc(e,o);
1case"record-key":return Ec(e,o)}return{success:!0,value:o}}function Lc(t,e,r,o){return r=r,!o||!(o instanceof Uint8Array)?{success:!1,error:new f(`${e} must be a byte array`)}:typeof r.maxLength=="number"&&o.byteLength>r.maxLength?{success:!1,error:new f(`${e} must not be larger than ${r.maxLength} bytes`)}:typeof r.minLength=="number"&&o.byteLength<r.minLength?{success:!1,error:new f(`${e} must not be smaller than ${r.minLength} bytes`)}:{success:!0,value:o}}function _c(t,e,r,o){return q.asCID(o)===null?{success:!1,error:new f(`${e} must be a CID`)}:{success:!0,value:o}}function zc(t,e,r,o){return!o||typeof o!="object"?{success:!1,error:new f(`${e} must be an object`)}:{success:!0,value:o}}function Vc(t,e,r,o){switch(r.type){case"object":return ue(t,e,r,o);case"array":return Co(t,e,r,o);case"blob":return bc(t,e,r,o);default:return Eo(t,e,r,o)}}function Co(t,e,r,o){if(!Array.isArray(o))return{success:!1,error:new f(`${e} must be an array`)};if(typeof r.maxLength=="number"&&o.length>r.maxLength)return{success:!1,error:new f(`${e} must not have more than ${r.maxLength} elements`)};if(typeof r.minLength=="number"&&o.length<r.minLength)return{success:!1,error:new f(`${e} must not have fewer than ${r.minLength} elements`)};const i=r.items;for(let n=0;n<o.length;n++){const a=o[n],c=`${e}/${n}`,d=zt(t,c,i,a);if(!d.success)return d}return{success:!0,value:o}}function ue(t,e,r,o){if(!Pe(o))return{success:!1,error:new f(`${e} must be an object`)};let i=o;if("properties"in r&&r.properties!=null)for(const n in r.properties){const a=o[n];if(a===null&&r.nullable?.includes(n))continue;const c=r.properties[n];if(a===void 0&&!r.required?.includes(n))if(c.type==="integer"||c.type==="boolean"||c.type==="string"){if(c.default===void 0)continue}else continue;const d=`${e}/${n}`,p=zt(t,d,c,a),u=p.success?p.value:a;if(u===void 0){if(r.required?.includes(n))return{success:!1,error:new f(`${e} must have the property "${n}"`)}}else if(!p.success)return p;u!==a&&(i===o&&(i={...o}),i[n]=u)}return{success:!0,value:i}}function zt(t,e,r,o,i=!1){let n;if(r.type==="union"){if(!yc(o))return{success:!1,error:new f(`${e} must be an object which includes the "$type" property`)};if(Bc(r.refs,o.$type))n=t.getDefOrThrow(o.$type);else return r.closed?{success:!1,error:new f(`${e} $type must be one of ${r.refs.join(", ")}`)}:{success:!0,value:o}}else r.type==="ref"?n=t.getDefOrThrow(r.ref):n=r;return i?ue(t,e,n,o):Vc(t,e,n,o)}const Bc=(t,e)=>{const r=D(e);return t.includes(r)?!0:r.endsWith("#main")?t.includes(r.slice(0,-5)):!r.includes("#")&&t.includes(`${r}#main`)};function Mc(t,e,r,o){const i=o&&typeof o=="object"?o:{},n=new Set(r.required??[]);let a=i;if(typeof r.properties=="object")for(const c in r.properties){const d=r.properties[c],p=d.type==="array"?Co(t,c,d,i[c]):Eo(t,c,d,i[c]),u=p.success?p.value:i[c],y=typeof u>"u";if(y&&n.has(c))return{success:!1,error:new f(`${e} must have the property "${c}"`)};if(!y&&!p.success)return p;u!==i[c]&&(a===i&&(a={...i}),a[c]=u)}return{success:!0,value:a}}function Nc(t,e,r){const o=ue(t,"Record",e.record,r);if(!o.success)throw o.error;return o.value}function Fc(t,e,r){if(e.parameters){const o=Mc(t,"Params",e.parameters,r);if(!o.success)throw o.error;return o.value}}function $c(t,e,r){if(e.input?.schema)return Vt(t,"Input",e.input.schema,r,!0)}function Uc(t,e,r){if(e.output?.schema)return Vt(t,"Output",e.output.schema,r,!0)}function Oc(t,e,r){if(e.message?.schema)return Vt(t,"Message",e.message.schema,r,!0)}function Vt(t,e,r,o,i=!1){const n=zt(t,e,r,o,i);if(!n.success)throw n.error;return n.value}class fe{constructor(e){if(this.docs=new Map,this.defs=new Map,e)for(const r of e)this.add(r)}[Symbol.iterator](){return this.docs.values()}add(e){const r=D(e.id);if(this.docs.has(r))throw new Error(`${r} has already been registered`);kt(e,r),this.docs.set(r,e);for(const[o,i]of qr(e))this.defs.set(o,i)}remove(e){e=D(e);const r=this.docs.get(e);if(!r)throw new Error(`Unable to remove "${e}": does not exist`);for(const[o,i]of qr(r))this.defs.delete(o);this.docs.delete(e)}get(e){return e=D(e),this.docs.get(e)}getDef(e){return e=D(e),this.defs.get(e)}getDefOrThrow(e,r){const o=this.getDef(e);if(!o)throw new hc(`Lexicon not found: ${e}`);if(r&&!r.includes(o.type))throw new jr(`Not a ${r.join(" or ")} lexicon: ${e}`);return o}validate(e,r){if(!Pe(r))throw new f("Value must be an object");const o=D(e),i=this.getDefOrThrow(o,["record","object"]);if(i.type==="record")return ue(this,"Record",i.record,r);if(i.type==="object")return ue(this,"Object",i,r);throw new jr("Definition must be a record or object")}assertValidRecord(e,r){if(!Pe(r))throw new f("Record must be an object");
1if(!("$type"in r))throw new f("Record/$type must be a string");const{$type:o}=r;if(typeof o!="string")throw new f("Record/$type must be a string");const i=D(e);if(D(o)!==i)throw new f(`Invalid $type: must be ${i}, got ${o}`);const n=this.getDefOrThrow(i,["record"]);return Nc(this,n,r)}assertValidXrpcParams(e,r){e=D(e);const o=this.getDefOrThrow(e,["query","procedure","subscription"]);return Fc(this,o,r)}assertValidXrpcInput(e,r){e=D(e);const o=this.getDefOrThrow(e,["procedure"]);return $c(this,o,r)}assertValidXrpcOutput(e,r){e=D(e);const o=this.getDefOrThrow(e,["query","procedure"]);return Uc(this,o,r)}assertValidXrpcMessage(e,r){e=D(e);const o=this.getDefOrThrow(e,["subscription"]);return Oc(this,o,r)}resolveLexUri(e,r){return e=D(e),D(r,e)}}function*qr(t){for(const e in t.defs)yield[`lex:${t.id}#${e}`,t.defs[e]],e==="main"&&(yield[`lex:${t.id}`,t.defs[e]])}function kt(t,e){for(const r in t)t.type==="ref"?t.ref=D(t.ref,e):t.type==="union"?t.refs=t.refs.map(o=>D(o,e)):Array.isArray(t[r])?t[r]=t[r].map(o=>typeof o=="string"?o.startsWith("#")?D(o,e):o:o&&typeof o=="object"?kt(o,e):o):t[r]&&typeof t[r]=="object"&&(t[r]=kt(t[r],e));return t}const xt=t=>{if(Array.isArray(t))return t.map(e=>xt(e));if(t&&typeof t=="object"){if(t instanceof Z)return t.original;if(q.asCID(t)||t instanceof Uint8Array)return t;const e={};for(const r of Object.keys(t))e[r]=xt(t[r]);return e}return t},At=t=>{if(Array.isArray(t))return t.map(e=>At(e));if(t&&typeof t=="object"){if((t.$type==="blob"||typeof t.cid=="string"&&typeof t.mimeType=="string")&&ct(t,Ro))return Z.fromJsonRef(t);if(q.asCID(t)||t instanceof Uint8Array)return t;const e={};for(const r of Object.keys(t))e[r]=At(t[r]);return e}return t},Gc=t=>mo(xt(t)),Hc=t=>JSON.stringify(Gc(t)),Wc=t=>At(ca(t)),Kc=t=>Wc(JSON.parse(t));function To(t){return t!=null&&typeof t=="object"}function Do(t,e,r){return r==="main"?t===e:typeof t=="string"&&t.length===e.length+1+r.length&&t.charCodeAt(e.length)===35&&t.startsWith(e)&&t.endsWith(r)}function Po(t,e,r){return To(t)&&"$type"in t&&Do(t.$type,e,r)}function Jc(t,e,r){return To(t)&&("$type"in t?t.$type===void 0||Do(t.$type,e,r):!0)}function E(t){return function(e){return t(e).success}}const Qc={AppBskyActorDefs:{lexicon:1,id:"app.bsky.actor.defs",defs:{profileViewBasic:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},displayName:{type:"string",maxGraphemes:64,maxLength:640},pronouns:{type:"string"},avatar:{type:"string",format:"uri"},associated:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociated"},viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},createdAt:{type:"string",format:"datetime"},verification:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationState"},status:{type:"ref",ref:"lex:app.bsky.actor.defs#statusView"},debug:{type:"unknown",description:"Debug information for internal development"}}},profileView:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},displayName:{type:"string",maxGraphemes:64,maxLength:640},pronouns:{type:"string"},description:{type:"string",maxGraphemes:256,maxLength:2560},avatar:{type:"string",format:"uri"},associated:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociated"},indexedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},verification:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationState"},status:{type:"ref",ref:"lex:app.bsky.actor.defs#statusView"},debug:{type:"unknown",description:"Debug information for internal development"}}},profileViewDetailed:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},displayName:{type:"string",maxGraphemes:64,maxLength:640},description:{type:"string",maxGraphemes:256,maxLength:2560},pronouns:{type:"string"},website:{type:"string",format:"uri"},avatar:{type:"string",format:"uri"},banner:{type:"string",format:"uri"},followersCount:{type:"integer"},followsCount:{type:"integer"},postsCount:{type:"integer"},associated:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociated"},joinedViaStarterPack:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackViewBasic"},indexedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"}
1,viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},pinnedPost:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},verification:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationState"},status:{type:"ref",ref:"lex:app.bsky.actor.defs#statusView"},debug:{type:"unknown",description:"Debug information for internal development"}}},profileAssociated:{type:"object",properties:{lists:{type:"integer"},feedgens:{type:"integer"},starterPacks:{type:"integer"},labeler:{type:"boolean"},chat:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociatedChat"},activitySubscription:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociatedActivitySubscription"},germ:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociatedGerm"}}},profileAssociatedChat:{type:"object",required:["allowIncoming"],properties:{allowIncoming:{type:"string",knownValues:["all","none","following"]},allowGroupInvites:{type:"string",knownValues:["all","none","following"]}}},profileAssociatedGerm:{type:"object",required:["showButtonTo","messageMeUrl"],properties:{messageMeUrl:{type:"string",format:"uri"},showButtonTo:{type:"string",knownValues:["usersIFollow","everyone"]}}},profileAssociatedActivitySubscription:{type:"object",required:["allowSubscriptions"],properties:{allowSubscriptions:{type:"string",knownValues:["followers","mutuals","none"]}}}
1,viewerState:{type:"object",description:"Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.",properties:{muted:{type:"boolean"},mutedByList:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewBasic"},blockedBy:{type:"boolean"},blocking:{type:"string",format:"at-uri"},blockingByList:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewBasic"},following:{type:"string",format:"at-uri"},followedBy:{type:"string",format:"at-uri"},knownFollowers:{description:"This property is present only in selected cases, as an optimization.",type:"ref",ref:"lex:app.bsky.actor.defs#knownFollowers"},activitySubscription:{description:"This property is present only in selected cases, as an optimization.",type:"ref",ref:"lex:app.bsky.notification.defs#activitySubscription"}}},knownFollowers:{type:"object",description:"The subject's followers whom you also follow",required:["count","followers"],properties:{count:{type:"integer"},followers:{type:"array",minLength:0,maxLength:5,items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"}}}},verificationState:{type:"object",description:"Represents the verification information about the user this object is attached to.",required:["verifications","verifiedStatus","trustedVerifierStatus"],properties:{verifications:{type:"array",description:"All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included.",items:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationView"}},verifiedStatus:{type:"string",description:"The user's status as a verified account.",knownValues:["valid","invalid","none"]},trustedVerifierStatus:{type:"string",description:"The user's status as a trusted verifier.",knownValues:["valid","invalid","none"]}}},verificationView:{type:"object",description:"An individual verification for an associated subject.",required:["issuer","uri","isValid","createdAt"],properties:{issuer:{type:"string",description:"The user who issued this verification.",format:"did"},uri:{type:"string",description:"The AT-URI of the verification record.",format:"at-uri"},isValid:{type:"boolean",description:"True if the verification passes validation, otherwise false."},createdAt:{type:"string",description:"Timestamp when the verification was created.",format:"datetime"}}},preferences:{type:"array",items:{type:"union",refs:["lex:app.bsky.actor.defs#adultContentPref","lex:app.bsky.actor.defs#contentLabelPref","lex:app.bsky.actor.defs#savedFeedsPref","lex:app.bsky.actor.defs#savedFeedsPrefV2","lex:app.bsky.actor.defs#personalDetailsPref","lex:app.bsky.actor.defs#declaredAgePref","lex:app.bsky.actor.defs#feedViewPref","lex:app.bsky.actor.defs#threadViewPref","lex:app.bsky.actor.defs#interestsPref","lex:app.bsky.actor.defs#mutedWordsPref","lex:app.bsky.actor.defs#hiddenPostsPref","lex:app.bsky.actor.defs#bskyAppStatePref","lex:app.bsky.actor.defs#labelersPref","lex:app.bsky.actor.defs#postInteractionSettingsPref","lex:app.bsky.actor.defs#verificationPrefs","lex:app.bsky.actor.defs#liveEventPreferences"]}},adultContentPref:{type:"object",required:["enabled"],properties:{enabled:{type:"boolean",default:!1}}},contentLabelPref:{type:"object",required:["label","visibility"],properties:{labelerDid:{type:"string",description:"Which labeler does this preference apply to? If undefined, applies globally.",format:"did"},label:{type:"string"},visibility:{type:"string",knownValues:["ignore","show","warn","hide"]}}},savedFeed:{type:"object",required:["id","type","value","pinned"],properties:{id:{type:"string"},type:{type:"string",knownValues:["feed","list","timeline"]},value:{type:"string"},pinned:{type:"boolean"}}},savedFeedsPrefV2:{type:"object",required:["items"],properties:{items:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#savedFeed"}}}},savedFeedsPref:{type:"object",required:["pinned","saved"],properties:{pinned:{type:"array",items:{type:"string",format:"at-uri"}},saved:{type:"array",items:{type:"string",format:"at-uri"}},timelineIndex:{type:"integer"}}},personalDetailsPref:{type:"object",properties:{birthDate:{type:"string",format:"datetime",description:"The birth date of account owner."}}},declaredAgePref:{type:"object",description:"Read-only preference containing value(s) inferred from the user's declared birthdate. Absence of this preference object in the response indicates that the user has not made a declaration.",properties:{isOverAge13:{type:"boolean",description:"Indicates if the user has declared that they are over 13 years of age."},isOverAge16:{type:"boolean",description:"Indicates if the user has declared that they are over 16 years of age."},isOverAge18:{type:"boolean",description:"Indicates if the user has declared that they are over 18 years of age."}}},feedViewPref:{type:"object",required:["feed"],properties:{feed:{type:"string",description:"The URI of the feed, or an identifier which describes the feed."},hideReplies:{type:"boolean",description:"Hide replies in the feed."},hideRepliesByUnfollowed:{type:"boolean",description:"Hide replies in the feed 
1if they are not by followed users.",default:!0},hideRepliesByLikeCount:{type:"integer",description:"Hide replies in the feed if they do not have this number of likes."},hideReposts:{type:"boolean",description:"Hide reposts in the feed."},hideQuotePosts:{type:"boolean",description:"Hide quote posts in the feed."}}},threadViewPref:{type:"object",properties:{sort:{type:"string",description:"Sorting mode for threads.",knownValues:["oldest","newest","most-likes","random","hotness"]}}},interestsPref:{type:"object",required:["tags"],properties:{tags:{type:"array",maxLength:100,items:{type:"string",maxLength:640,maxGraphemes:64},description:"A list of tags which describe the account owner's interests gathered during onboarding."}}},mutedWordTarget:{type:"string",knownValues:["content","tag"],maxLength:640,maxGraphemes:64},mutedWord:{type:"object",description:"A word that the account owner has muted.",required:["value","targets"],properties:{id:{type:"string"},value:{type:"string",description:"The muted word itself.",maxLength:1e4,maxGraphemes:1e3},targets:{type:"array",description:"The intended targets of the muted word.",items:{type:"ref",ref:"lex:app.bsky.actor.defs#mutedWordTarget"}},actorTarget:{type:"string",description:"Groups of users to apply the muted word to. If undefined, applies to all users.",knownValues:["all","exclude-following"],default:"all"},expiresAt:{type:"string",format:"datetime",description:"The date and time at which the muted word will expire and no longer be applied."}}},mutedWordsPref:{type:"object",required:["items"],properties:{items:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#mutedWord"},description:"A list of words the account owner has muted."}}},hiddenPostsPref:{type:"object",required:["items"],properties:{items:{type:"array",items:{type:"string",format:"at-uri"},description:"A list of URIs of posts the account owner has hidden."}}},labelersPref:{type:"object",required:["labelers"],properties:{labelers:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#labelerPrefItem"}}}},labelerPrefItem:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},bskyAppStatePref:{description:"A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.",type:"object",properties:{activeProgressGuide:{type:"ref",ref:"lex:app.bsky.actor.defs#bskyAppProgressGuide"},queuedNudges:{description:"An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.",type:"array",maxLength:1e3,items:{type:"string",maxLength:100}},nuxs:{description:"Storage for NUXs the user has encountered.",type:"array",maxLength:100,items:{type:"ref",ref:"lex:app.bsky.actor.defs#nux"}}}},bskyAppProgressGuide:{description:"If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.",type:"object",required:["guide"],properties:{guide:{type:"string",maxLength:100}}},nux:{type:"object",description:"A new user experiences (NUX) storage object",required:["id","completed"],properties:{id:{type:"string",maxLength:100},completed:{type:"boolean",default:!1},data:{description:"Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.",type:"string",maxLength:3e3,maxGraphemes:300},expiresAt:{type:"string",format:"datetime",description:"The date and time at which the NUX will expire and should be considered completed."}}},verificationPrefs:{type:"object",description:"Preferences for how verified accounts appear in the app.",required:[],properties:{hideBadges:{description:"Hide the blue check badges for verified accounts and trusted verifiers.",type:"boolean",default:!1}}},liveEventPreferences:{type:"object",description:"Preferences for live events.",properties:{hiddenFeedIds:{description:"A list of feed IDs that the user has hidden from live events.",type:"array",items:{type:"string"}},hideAllFeeds:{description:"Whether to hide all feeds from live events.",type:"boolean",default:!1}}},postInteractionSettingsPref:{type:"object",description:"Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.",required:[],properties:{threadgateAllowRules:{description:"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.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.threadgate#mentionRule","lex:app.bsky.feed.threadgate#followerRule","lex:app.bsky.feed.threadgate#followingRule","lex:app.bsky.feed.threadgate#listRule"]}},postgateEmbeddingRules:{description:"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.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.postgate#disableRule"]}}}}
1,statusView:{type:"object",required:["status","record"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},status:{type:"string",description:"The status for the account.",knownValues:["app.bsky.actor.status#live"]},record:{type:"unknown"},embed:{type:"union",description:"An optional embed associated with the status.",refs:["lex:app.bsky.embed.external#view"]},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},expiresAt:{type:"string",description:"The date when this status will expire. The application might choose to no longer return the status after expiration.",format:"datetime"},isActive:{type:"boolean",description:"True if the status is not expired, false if it is expired. Only present if expiration was set."},isDisabled:{type:"boolean",description:"True if the user's go-live access has been disabled by a moderator, false otherwise."}}}}},AppBskyActorGetPreferences:{lexicon:1,id:"app.bsky.actor.getPreferences",defs:{main:{type:"query",description:"Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth.",parameters:{type:"params",properties:{}},output:{encoding:"application/json",schema:{type:"object",required:["preferences"],properties:{preferences:{type:"ref",ref:"lex:app.bsky.actor.defs#preferences"}}}}}}},AppBskyActorGetProfile:{lexicon:1,id:"app.bsky.actor.getProfile",defs:{main:{type:"query",description:"Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier",description:"Handle or DID of account to fetch profile of."}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewDetailed"}}}}},AppBskyActorGetProfiles:{lexicon:1,id:"app.bsky.actor.getProfiles",defs:{main:{type:"query",description:"Get detailed profile views of multiple actors.",parameters:{type:"params",required:["actors"],properties:{actors:{type:"array",items:{type:"string",format:"at-identifier"},maxLength:25}}},output:{encoding:"application/json",schema:{type:"object",required:["profiles"],properties:{profiles:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewDetailed"}}}}}}}},AppBskyActorGetSuggestions:{lexicon:1,id:"app.bsky.actor.getSuggestions",defs:{main:{type:"query",description:"Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{cursor:{type:"string"},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}},recId:{type:"integer",description:"DEPRECATED: use recIdStr instead."},recIdStr:{type:"string",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyActorProfile:{lexicon:1,id:"app.bsky.actor.profile",defs:{main:{type:"record",description:"A declaration of a Bluesky account profile.",key:"literal:self",record:{type:"object",properties:{displayName:{type:"string",maxGraphemes:64,maxLength:640},description:{type:"string",description:"Free-form profile description text.",maxGraphemes:256,maxLength:2560},pronouns:{type:"string",description:"Free-form pronouns text.",maxGraphemes:20,maxLength:200},website:{type:"string",format:"uri"},avatar:{type:"blob",description:"Small image to be displayed next to posts from account. AKA, 'profile picture'",accept:["image/png","image/jpeg"],maxSize:1e6},banner:{type:"blob",description:"Larger horizontal image to display behind profile view.",accept:["image/png","image/jpeg"],maxSize:1e6},labels:{type:"union",description:"Self-label values, specific to the Bluesky application, on the overall account.",refs:["lex:com.atproto.label.defs#selfLabels"]},joinedViaStarterPack:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},pinnedPost:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyActorPutPreferences:{lexicon:1,id:"app.bsky.actor.putPreferences",defs:{main:{type:"procedure",description:"Set the private preferences attached to the account.",input:{encoding:"application/json",schema:{type:"object",required:["preferences"],properties:{preferences:{type:"ref",ref:"lex:app.bsky.actor.defs#preferences"}}}}}}},AppBskyActorSearchActors:{lexicon:1,id:"app.bsky.actor.searchActors",defs:{main:{type:"query",description:"Find actors (profiles) matching search criteria. Does not require auth.",parameters:{type:"params",properties:{term:{type:"string",description:"DEPRECATED: use 'q' instead."},q:{type:"string",description:"Search query string. Syntax, phrase, boolean, and facet
1ing is unspecified, but Lucene query syntax is recommended."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{cursor:{type:"string"},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyActorSearchActorsTypeahead:{lexicon:1,id:"app.bsky.actor.searchActorsTypeahead",defs:{main:{type:"query",description:"Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth.",parameters:{type:"params",properties:{term:{type:"string",description:"DEPRECATED: use 'q' instead."},q:{type:"string",description:"Search query prefix; not a full query string."},limit:{type:"integer",minimum:1,maximum:100,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"}}}}}}}},AppBskyActorStatus:{lexicon:1,id:"app.bsky.actor.status",defs:{main:{type:"record",description:"A declaration of a Bluesky account status.",key:"literal:self",record:{type:"object",required:["status","createdAt"],properties:{status:{type:"string",description:"The status for the account.",knownValues:["app.bsky.actor.status#live"]},embed:{type:"union",description:"An optional embed associated with the status.",refs:["lex:app.bsky.embed.external"]},durationMinutes:{type:"integer",description:"The duration of the status in minutes. Applications can choose to impose minimum and maximum limits.",minimum:1},createdAt:{type:"string",format:"datetime"}}}},live:{type:"token",description:"Advertises an account as currently offering live content."}}},AppBskyAgeassuranceBegin:{lexicon:1,id:"app.bsky.ageassurance.begin",defs:{main:{type:"procedure",description:"Initiate Age Assurance for an account.",input:{encoding:"application/json",schema:{type:"object",required:["email","language","countryCode"],properties:{email:{type:"string",description:"The user's email address to receive Age Assurance instructions."},language:{type:"string",description:"The user's preferred language for communication during the Age Assurance process."},countryCode:{type:"string",description:"An ISO 3166-1 alpha-2 code of the user's location."},regionCode:{type:"string",description:"An optional ISO 3166-2 code of the user's region or state within the country."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:app.bsky.ageassurance.defs#state"}},errors:[{name:"InvalidEmail"},{name:"DidTooLong"},{name:"InvalidInitiation"},{name:"RegionNotSupported"}]}}},AppBskyAgeassuranceDefs:{lexicon:1,id:"app.bsky.ageassurance.defs",defs:{access:{description:"The access level granted based on Age Assurance data we've processed.",type:"string",knownValues:["unknown","none","safe","full"]},status:{type:"string",description:"The status of the Age Assurance process.",knownValues:["unknown","pending","assured","blocked"]},state:{type:"object",description:"The user's computed Age Assurance state.",required:["status","access"],properties:{lastInitiatedAt:{type:"string",format:"datetime",description:"The timestamp when this state was last updated."},status:{type:"ref",ref:"lex:app.bsky.ageassurance.defs#status"},access:{type:"ref",ref:"lex:app.bsky.ageassurance.defs#access"}}},stateMetadata:{type:"object",description:"Additional metadata needed to compute Age Assurance state client-side.",required:[],properties:{accountCreatedAt:{type:"string",format:"datetime",description:"The account creation timestamp."}}},config:{type:"object",description:"",required:["regions"],properties:{regions:{type:"array",description:"The per-region Age Assurance configuration.",items:{type:"ref",ref:"lex:app.bsky.ageassurance.defs#configRegion"}}}},configRegion:{type:"object",description:"The Age Assurance configuration for a specific region.",required:["countryCode","minAccessAge","rules"],properties:{countryCode:{type:"string",description:"The ISO 3166-1 alpha-2 country code this configuration applies to."},regionCode:{type:"string",description:"The ISO 3166-2 region code this configuration applies to. If omitted, the configuration applies to the entire country."},minAccessAge:{type:"integer",description:"The minimum age (as a whole integer) required to use Bluesky in this region."},rules:{type:"array",description:"The ordered list of Age Assurance rules that apply to this region. Rules should be applied in order, and the first matching rule determines the access level granted. The rules array should always include a default rule as the last item.",items:{type:"union",refs:["lex:app.bsky.ageassurance.defs#configRegionRuleDefault","lex:app.bsky.ageassurance.defs#configRegionRuleIfDeclaredOverAge","lex:app.bsky.ageassurance.defs#configRegionRuleIfDeclaredUnderAge","lex:app.bsky.ageassurance.defs#configRegionRuleIfAssuredOverAge","lex:app.bsky.ageassurance.defs#configRegionRuleIfAssuredUnderAge","lex:app.bsky.ageassurance.defs#configRegionRuleIfAccountNewerThan","lex:app.bsky.ageassurance.defs#configRegionRuleIfAccountOlderThan"]}}}},configRegionRuleDefault:{type:"object",description:"Age Assurance rule that applies by default.",required:["access"],properties:{access:{type:"ref",ref:"lex:app.bsky.ageassurance.defs#access"}}},configRegionRuleIfDeclaredOverAge:{type:"object",description:"Age Assurance rule that applies if the user has declared themselves equal-to or over a certain age.",required:["age","access"],properties:{age:{type:"integer",description:"The age threshold as a whole integer."},access:{type:"ref",ref:"lex:app.bsky.ageassurance.defs#access"}}},configRegionRuleIfDeclaredUnderAge:{type:"object",description:"Age Assurance rule that applies if the user has declared themselves under a certain age.",required:["age","access"],properties:{age:{type:"integer",description:"The age threshold as a whole integer."},access:{type:"ref",ref:"lex:app.bsky.ageassurance.defs#access"}}},configRegionRuleIfAssuredOverAge:{type:"object",description:"Age Assurance rule that applies if the user has been assured to be equal-to or over a certain age.",required:["age","access"],properties:{age:{type:"integer",description:"The age threshold as a whole integer."},access:{type:"ref",ref:"lex:app.bsky.ageassurance.defs#access"}}},configRegionRuleIfAssuredUnderAge:{type:"object",description:"Age Assurance rule that applies if the user has been assured to be under a certain age.",required:["age","access"],properties:{age:{type:"integer",description:"The age threshold as a whole integer."},access:{type:"ref",ref:"lex:app.bsky.ageassurance.defs#access"}}},configRegionRuleIfAccountNewerThan:{type:"object",description:"Age Assurance rule that applies if the account is equal-to or newer than a certain date.",required:["date","access"],properties:{date:{type:"string",format:"datetime",description:"The date threshold as a datetime string."},access:{type:"ref",ref:"lex:app.bsky.ageassurance.defs#access"}}},configRegionRuleIfAccountOlderThan:{type:"object",description:"Age Assurance rule that applies if the account is older than a certain date.",required:["date","access"],properties:{date:{type:"string",format:"datetime",description:"The date threshold as a datetime string."},access:{type:"ref",ref:"lex:app.bsky.ageassurance.defs#access"}}}
1,event:{type:"object",description:"Object used to store Age Assurance data in stash.",required:["createdAt","status","access","attemptId","countryCode"],properties:{createdAt:{type:"string",format:"datetime",description:"The date and time of this write operation."},attemptId:{type:"string",description:"The unique identifier for this instance of the Age Assurance flow, in UUID format."},status:{type:"string",description:"The status of the Age Assurance process.",knownValues:["unknown","pending","assured","blocked"]},access:{description:"The access level granted based on Age Assurance data we've processed.",type:"string",knownValues:["unknown","none","safe","full"]},countryCode:{type:"string",description:"The ISO 3166-1 alpha-2 country code provided when beginning the Age Assurance flow."},regionCode:{type:"string",description:"The ISO 3166-2 region code provided when beginning the Age Assurance flow."},email:{type:"string",description:"The email used for Age Assurance."},initIp:{type:"string",description:"The IP address used when initiating the Age Assurance flow."},initUa:{type:"string",description:"The user agent used when initiating the Age Assurance flow."},completeIp:{type:"string",description:"The IP address used when completing the Age Assurance flow."},completeUa:{type:"string",description:"The user agent used when completing the Age Assurance flow."}}}}},AppBskyAgeassuranceGetConfig:{lexicon:1,id:"app.bsky.ageassurance.getConfig",defs:{main:{type:"query",description:"Returns Age Assurance configuration for use on the client.",output:{encoding:"application/json",schema:{type:"ref",ref:"lex:app.bsky.ageassurance.defs#config"}}}}},AppBskyAgeassuranceGetState:{lexicon:1,id:"app.bsky.ageassurance.getState",defs:{main:{type:"query",description:"Returns server-computed Age Assurance state, if available, and any additional metadata needed to compute Age Assurance state client-side.",parameters:{type:"params",required:["countryCode"],properties:{countryCode:{type:"string"},regionCode:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["state","metadata"],properties:{state:{type:"ref",ref:"lex:app.bsky.ageassurance.defs#state"},metadata:{type:"ref",ref:"lex:app.bsky.ageassurance.defs#stateMetadata"}}}}}}},AppBskyBookmarkCreateBookmark:{lexicon:1,id:"app.bsky.bookmark.createBookmark",defs:{main:{type:"procedure",description:"Creates a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication.",input:{encoding:"application/json",schema:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"}}}},errors:[{name:"UnsupportedCollection",description:"The URI to be bookmarked is for an unsupported collection."}]}}},AppBskyBookmarkDefs:{lexicon:1,id:"app.bsky.bookmark.defs",defs:{bookmark:{description:"Object used to store bookmark data in stash.",type:"object",required:["subject"],properties:{subject:{description:"A strong ref to the record to be bookmarked. Currently, only `app.bsky.feed.post` records are supported.",type:"ref",ref:"lex:com.atproto.repo.strongRef"}}},bookmarkView:{type:"object",required:["subject","item"],properties:{subject:{description:"A strong ref to the bookmarked record.",type:"ref",ref:"lex:com.atproto.repo.strongRef"},createdAt:{type:"string",format:"datetime"},item:{type:"union",refs:["lex:app.bsky.feed.defs#blockedPost","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#postView"]}}}}},AppBskyBookmarkDeleteBookmark:{lexicon:1,id:"app.bsky.bookmark.deleteBookmark",defs:{main:{type:"procedure",description:"Deletes a private bookmark for the specified record. Currently, only `app.bsky.feed.post` records are supported. Requires authentication.",input:{encoding:"application/json",schema:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}}},errors:[{name:"UnsupportedCollection",description:"The URI to be bookmarked is for an unsupported collection."}]}}},AppBskyBookmarkGetBookmarks:{lexicon:1,id:"app.bsky.bookmark.getBookmarks",defs:{main:{type:"query",description:"Gets views of records bookmarked by the authenticated user. Requires authentication.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["bookmarks"],properties:{cursor:{type:"string"},bookmarks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.bookmark.defs#bookmarkView"}}}}}}}},AppBskyContactDefs:{lexicon:1,id:"app.bsky.contact.defs",defs:{matchAndContactIndex:{description:"Associates a profile with the positional index of the contact import input in the call to `app.bsky.contact.
1importContacts`, so clients can know which phone caused a particular match.",type:"object",required:["match","contactIndex"],properties:{match:{description:"Profile of the matched user.",type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},contactIndex:{description:"The index of this match in the import contact input.",type:"integer",minimum:0,maximum:999}}},syncStatus:{type:"object",required:["syncedAt","matchesCount"],properties:{syncedAt:{description:"Last date when contacts where imported.",type:"string",format:"datetime"},matchesCount:{description:"Number of existing contact matches resulting of the user imports and of their imported contacts having imported the user. Matches stop being counted when the user either follows the matched contact or dismisses the match.",type:"integer",minimum:0}}},notification:{description:"A stash object to be sent via bsync representing a notification to be created.",type:"object",required:["from","to"],properties:{from:{description:"The DID of who this notification comes from.",type:"string",format:"did"},to:{description:"The DID of who this notification should go to.",type:"string",format:"did"}}}}},AppBskyContactDismissMatch:{lexicon:1,id:"app.bsky.contact.dismissMatch",defs:{main:{type:"procedure",description:"Removes a match that was found via contact import. It shouldn't appear again if the same contact is re-imported. Requires authentication.",input:{encoding:"application/json",schema:{type:"object",required:["subject"],properties:{subject:{description:"The subject's DID to dismiss the match with.",type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}},errors:[{name:"InvalidDid"},{name:"InternalError"}]}}},AppBskyContactGetMatches:{lexicon:1,id:"app.bsky.contact.getMatches",defs:{main:{type:"query",description:"Returns the matched contacts (contacts that were mutually imported). Excludes dismissed matches. Requires authentication.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["matches"],properties:{cursor:{type:"string"},matches:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}},errors:[{name:"InvalidDid"},{name:"InvalidLimit"},{name:"InvalidCursor"},{name:"InternalError"}]}}},AppBskyContactGetSyncStatus:{lexicon:1,id:"app.bsky.contact.getSyncStatus",defs:{main:{type:"query",description:"Gets the user's current contact import status. Requires authentication.",parameters:{type:"params",properties:{}},output:{encoding:"application/json",schema:{type:"object",properties:{syncStatus:{description:"If present, indicates the user has imported their contacts. If not present, indicates the user never used the feature or called `app.bsky.contact.removeData` and didn't import again since.",type:"ref",ref:"lex:app.bsky.contact.defs#syncStatus"}}}},errors:[{name:"InvalidDid"},{name:"InternalError"}]}}},AppBskyContactImportContacts:{lexicon:1,id:"app.bsky.contact.importContacts",defs:{main:{type:"procedure",description:"Import contacts for securely matching with other users. This follows the protocol explained in https://docs.bsky.app/blog/contact-import-rfc. Requires authentication.",input:{encoding:"application/json",schema:{type:"object",required:["token","contacts"],properties:{token:{description:"JWT to authenticate the call. Use the JWT received as a response to the call to `app.bsky.contact.verifyPhone`.",type:"string"},contacts:{description:"List of phone numbers in global E.164 format (e.g., '+12125550123'). Phone numbers that cannot be normalized into a valid phone number will be discarded. Should not repeat the 'phone' input used in `app.bsky.contact.verifyPhone`.",type:"array",items:{type:"string"},minLength:1,maxLength:1e3}}}},output:{encoding:"application/json",schema:{type:"object",required:["matchesAndContactIndexes"],properties:{matchesAndContactIndexes:{description:"The users that matched during import and their indexes on the input contacts, so the client can correlate with its local list.",type:"array",items:{type:"ref",ref:"lex:app.bsky.contact.defs#matchAndContactIndex"}}}}},errors:[{name:"InvalidDid"},{name:"InvalidContacts"},{name:"TooManyContacts"},{name:"InvalidToken"},{name:"InternalError"}]}}},AppBskyContactRemoveData:{lexicon:1,id:"app.bsky.contact.removeData",defs:{main:{type:"procedure",description:"Removes all stored hashes used for c
1ontact matching, existing matches, and sync status. Requires authentication.",input:{encoding:"application/json",schema:{type:"object",properties:{}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}},errors:[{name:"InvalidDid"},{name:"InternalError"}]}}},AppBskyContactSendNotification:{lexicon:1,id:"app.bsky.contact.sendNotification",defs:{main:{type:"procedure",description:"System endpoint to send notifications related to contact imports. Requires role authentication.",input:{encoding:"application/json",schema:{type:"object",required:["from","to"],properties:{from:{description:"The DID of who this notification comes from.",type:"string",format:"did"},to:{description:"The DID of who this notification should go to.",type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},AppBskyContactStartPhoneVerification:{lexicon:1,id:"app.bsky.contact.startPhoneVerification",defs:{main:{type:"procedure",description:"Starts a phone verification flow. The phone passed will receive a code via SMS that should be passed to `app.bsky.contact.verifyPhone`. Requires authentication.",input:{encoding:"application/json",schema:{type:"object",required:["phone"],properties:{phone:{description:"The phone number to receive the code via SMS.",type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}},errors:[{name:"RateLimitExceeded"},{name:"InvalidDid"},{name:"InvalidPhone"},{name:"InternalError"}]}}},AppBskyContactVerifyPhone:{lexicon:1,id:"app.bsky.contact.verifyPhone",defs:{main:{type:"procedure",description:"Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication.",input:{encoding:"application/json",schema:{type:"object",required:["phone","code"],properties:{phone:{description:"The phone number to verify. Should be the same as the one passed to `app.bsky.contact.startPhoneVerification`.",type:"string"},code:{description:"The code received via SMS as a result of the call to `app.bsky.contact.startPhoneVerification`.",type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["token"],properties:{token:{description:"JWT to be used in a call to `app.bsky.contact.importContacts`. It is only valid for a single call.",type:"string"}}}},errors:[{name:"RateLimitExceeded"},{name:"InvalidDid"},{name:"InvalidPhone"},{name:"InvalidCode"},{name:"InternalError"}]}}},AppBskyDraftCreateDraft:{lexicon:1,id:"app.bsky.draft.createDraft",defs:{main:{type:"procedure",description:"Inserts a draft using private storage (stash). An upper limit of drafts might be enforced. Requires authentication.",input:{encoding:"application/json",schema:{type:"object",required:["draft"],properties:{draft:{type:"ref",ref:"lex:app.bsky.draft.defs#draft"}}}},output:{encoding:"application/json",schema:{type:"object",required:["id"],properties:{id:{type:"string",description:"The ID of the created draft."}}}},errors:[{name:"DraftLimitReached",description:"Trying to insert a new draft when the limit was already reached."}]}}},AppBskyDraftDefs:{lexicon:1,id:"app.bsky.draft.defs",defs:{draftWithId:{description:"A draft with an identifier, used to store drafts in private storage (stash).",type:"object",required:["id","draft"],properties:{id:{description:"A TID to be used as a draft identifier.",type:"string",format:"tid"},draft:{type:"ref",ref:"lex:app.bsky.draft.defs#draft"}}},draft:{description:"A draft containing an array of draft posts.",type:"object",required:["posts"],properties:{deviceId:{type:"string",description:"UUIDv4 identifier of the device that created this draft.",maxLength:100},deviceName:{type:"string",description:"The device and/or platform on which the draft was created.",maxLength:100},posts:{description:"Array of draft posts that compose this draft.",type:"array",minLength:1,maxLength:100,items:{type:"ref",ref:"lex:app.bsky.draft.defs#draftPost"}},langs:{type:"array",description:"Indicates human language of posts primary text content.",maxLength:3,items:{type:"string",format:"language"}},postgateEmbeddingRules:{description:"Embedding rules for the postgates to be created when this draft is published.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.postgate#disableRule"]}},threadgateAllow:{description:"Allow-rules for the threadgate to be created when this draft is published.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.threadgate#mentionRule","lex:app.bsky.feed.threadgate#followerRule","lex:app.bsky.feed.threadgate#followingRule","lex:app.bsky.feed.threadgate#listRule"]}}}},draftPost:{description:"One of the posts that compose a draft.",type:"object",required:["text"],properties:{text:{type:"string",maxLength:1e4,maxGraphemes:1e3,description:"The primary post content. It has a higher limit than post contents to allow storing a larger text that can later be refined into smaller posts."},labels:{type:"union",description:"Self-label values for this post. Effectively content warnings.",refs:["lex:com.atproto.label.defs#selfL
1abels"]},embedImages:{type:"array",items:{type:"ref",ref:"lex:app.bsky.draft.defs#draftEmbedImage"},maxLength:4},embedVideos:{type:"array",items:{type:"ref",ref:"lex:app.bsky.draft.defs#draftEmbedVideo"},maxLength:1},embedExternals:{type:"array",items:{type:"ref",ref:"lex:app.bsky.draft.defs#draftEmbedExternal"},maxLength:1},embedRecords:{type:"array",items:{type:"ref",ref:"lex:app.bsky.draft.defs#draftEmbedRecord"},maxLength:1}}},draftView:{description:"View to present drafts data to users.",type:"object",required:["id","draft","createdAt","updatedAt"],properties:{id:{description:"A TID to be used as a draft identifier.",type:"string",format:"tid"},draft:{type:"ref",ref:"lex:app.bsky.draft.defs#draft"},createdAt:{description:"The time the draft was created.",type:"string",format:"datetime"},updatedAt:{description:"The time the draft was last updated.",type:"string",format:"datetime"}}},draftEmbedLocalRef:{type:"object",required:["path"],properties:{path:{type:"string",description:"Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts.",minLength:1,maxLength:1024}}},draftEmbedCaption:{type:"object",required:["lang","content"],properties:{lang:{type:"string",format:"language"},content:{type:"string",maxLength:1e4}}},draftEmbedImage:{type:"object",required:["localRef"],properties:{localRef:{type:"ref",ref:"lex:app.bsky.draft.defs#draftEmbedLocalRef"},alt:{type:"string",maxGraphemes:2e3}}},draftEmbedVideo:{type:"object",required:["localRef"],properties:{localRef:{type:"ref",ref:"lex:app.bsky.draft.defs#draftEmbedLocalRef"},alt:{type:"string",maxGraphemes:2e3},captions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.draft.defs#draftEmbedCaption"},maxLength:20}}},draftEmbedExternal:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"uri"}}},draftEmbedRecord:{type:"object",required:["record"],properties:{record:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}}}},AppBskyDraftDeleteDraft:{lexicon:1,id:"app.bsky.draft.deleteDraft",defs:{main:{type:"procedure",description:"Deletes a draft by ID. Requires authentication.",input:{encoding:"application/json",schema:{type:"object",required:["id"],properties:{id:{type:"string",format:"tid"}}}}}}},AppBskyDraftGetDrafts:{lexicon:1,id:"app.bsky.draft.getDrafts",defs:{main:{type:"query",description:"Gets views of user drafts. Requires authentication.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["drafts"],properties:{cursor:{type:"string"},drafts:{type:"array",items:{type:"ref",ref:"lex:app.bsky.draft.defs#draftView"}}}}}}}},AppBskyDraftUpdateDraft:{lexicon:1,id:"app.bsky.draft.updateDraft",defs:{main:{type:"procedure",description:"Updates a draft using private storage (stash). If the draft ID points to a non-existing ID, the update will be silently ignored. This is done because updates don't enforce draft limit, so it accepts all writes, but will ignore invalid ones. Requires authentication.",input:{encoding:"application/json",schema:{type:"object",required:["draft"],properties:{draft:{type:"ref",ref:"lex:app.bsky.draft.defs#draftWithId"}}}}}}},AppBskyEmbedDefs:{lexicon:1,id:"app.bsky.embed.defs",defs:{aspectRatio:{type:"object",description:"width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.",required:["width","height"],properties:{width:{type:"integer",minimum:1},height:{type:"integer",minimum:1}}}}},AppBskyEmbedExternal:{lexicon:1,id:"app.bsky.embed.external",defs:{main:{type:"object",description:"A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post).",required:["external"],properties:{external:{type:"ref",ref:"lex:app.bsky.embed.external#external"}}},external:{type:"object",required:["uri","title","description"],properties:{uri:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},thumb:{type:"blob",accept:["image/*"],maxSize:1e6},associatedRefs:{type:"array",items:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},description:"StrongRefs (uri+cid) of the Atmosphere records that backed this view."}}},view:{type:"object",required:["external"],properties:{external:{type:"ref",ref:"lex:app.bsky.embed.external#viewExternal"}}},viewExternal:{type:"object",required:["uri","title","description"],properties:{uri:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},thumb:{type:"string",format:"uri"},createdAt:{type:"string",format:"datetime",description:"When the external 
1content was created, if available. Example: a publication date, for an article."},updatedAt:{type:"string",format:"datetime",description:"When the external content was updated, if available."},readingTime:{type:"integer",description:"Estimated reading time in minutes, if applicable and available."},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},source:{type:"ref",ref:"lex:app.bsky.embed.external#viewExternalSource"},associatedRefs:{type:"array",items:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},description:"StrongRefs (uri+cid) of the Atmosphere records that backed this view."},associatedProfiles:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},description:"Profiles of the owners of the Atmosphere records that backed this view."}}},viewExternalSource:{type:"object",description:"The source of an external embed, such as a standard.site publication.",required:["uri","title"],properties:{uri:{type:"string",format:"uri",description:"URI of the source, if available. Example: the https:// URL of a site.standard.publication record."},icon:{type:"string",format:"uri",description:"Fully-qualified URL where an icon representing the source can be fetched. For example, CDN location provided by the App View."},title:{type:"string"},description:{type:"string"},theme:{type:"ref",ref:"lex:app.bsky.embed.external#viewExternalSourceTheme"}}},viewExternalSourceTheme:{type:"object",description:"The theme colors of an external source, such as a site.standard.publication. These colors may be used when rendering an embed from that source.",properties:{backgroundRGB:{type:"ref",ref:"lex:app.bsky.embed.external#colorRGB"},foregroundRGB:{type:"ref",ref:"lex:app.bsky.embed.external#colorRGB"},accentRGB:{type:"ref",ref:"lex:app.bsky.embed.external#colorRGB"},accentForegroundRGB:{type:"ref",ref:"lex:app.bsky.embed.external#colorRGB"}}},colorRGB:{type:"object",description:"RGB color definition, inspired by site.standard.theme.color#rgb",required:["r","g","b"],properties:{r:{type:"integer",minimum:0,maximum:255},g:{type:"integer",minimum:0,maximum:255},b:{type:"integer",minimum:0,maximum:255}}}}},AppBskyEmbedGetEmbedExternalView:{lexicon:1,id:"app.bsky.embed.getEmbedExternalView",defs:{main:{type:"query",description:"Resolve one or more AT-URIs into the data needed to render an enhanced external embed. Returns `associatedRefs` (strongRefs to embed into a post's external.associatedRefs), the raw `associatedRecords`, and a hydrated `view`. The response is empty (`{}`) when no records were resolvable, or when validation determined the resolved records don't actually back the requested URL; clients should fall back to their own link-card rendering in that case and skip writing strongRefs to the post.",parameters:{type:"params",required:["url","uris"],properties:{url:{type:"string",format:"uri",description:"The canonical web URL the embed represents (typically the URL the user pasted into the composer). Used as the returned view's `uri`. May be used for validation in the future."},uris:{type:"array",description:"AT-URIs of any Atmosphere records that can be resolved and used to construct #externalView views. Example: a site.standard.document and optionally its associated site.standard.publication.",items:{type:"string",format:"at-uri"},maxLength:4}}},output:{encoding:"application/json",schema:{type:"object",properties:{view:{type:"ref",ref:"lex:app.bsky.embed.external#view",description:"Hydrated view of the embed. Present only when the resolved records back the requested URL and supply enough information to populate the required `viewExternal` fields. Omitted alongside the rest of the response when no records resolved or validation failed."},associatedRefs:{type:"array",items:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},description:"StrongRefs (URI+CID) of the Atmosphere records that backed this view, suitable for embedding into a post's external.associatedRefs."},associatedRecords:{type:"array",items:{type:"unknown",description:"The raw record data of the Atmosphere records that backed this view. This is returned for c
1onvenience, to avoid the need for the client to separately fetch the record data for the associatedRefs. Example: the site.standard.document and site.standard.publication records that backed this view."}}}}}}}},AppBskyEmbedImages:{lexicon:1,id:"app.bsky.embed.images",description:"A set of images embedded in a Bluesky record (eg, a post).",defs:{main:{type:"object",required:["images"],properties:{images:{type:"array",items:{type:"ref",ref:"lex:app.bsky.embed.images#image"},maxLength:4}}},image:{type:"object",required:["image","alt"],properties:{image:{type:"blob",description:"The raw image file. May be up to 2 MB, formerly limited to 1 MB.",accept:["image/*"],maxSize:2e6},alt:{type:"string",description:"Alt text description of the image, for accessibility."},aspectRatio:{type:"ref",ref:"lex:app.bsky.embed.defs#aspectRatio"}}},view:{type:"object",required:["images"],properties:{images:{type:"array",items:{type:"ref",ref:"lex:app.bsky.embed.images#viewImage"},maxLength:4}}},viewImage:{type:"object",required:["thumb","fullsize","alt"],properties:{thumb:{type:"string",format:"uri",description:"Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View."},fullsize:{type:"string",format:"uri",description:"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."},alt:{type:"string",description:"Alt text description of the image, for accessibility."},aspectRatio:{type:"ref",ref:"lex:app.bsky.embed.defs#aspectRatio"}}}}},AppBskyEmbedRecord:{lexicon:1,id:"app.bsky.embed.record",description:"A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record.",defs:{main:{type:"object",required:["record"],properties:{record:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}},view:{type:"object",required:["record"],properties:{record:{type:"union",refs:["lex:app.bsky.embed.record#viewRecord","lex:app.bsky.embed.record#viewNotFound","lex:app.bsky.embed.record#viewBlocked","lex:app.bsky.embed.record#viewDetached","lex:app.bsky.feed.defs#generatorView","lex:app.bsky.graph.defs#listView","lex:app.bsky.labeler.defs#labelerView","lex:app.bsky.graph.defs#starterPackViewBasic"]}}},viewRecord:{type:"object",required:["uri","cid","author","value","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},author:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},value:{type:"unknown",description:"The record data itself."},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},replyCount:{type:"integer"},repostCount:{type:"integer"},likeCount:{type:"integer"},quoteCount:{type:"integer"},embeds:{type:"array",items:{type:"union",refs:["lex:app.bsky.embed.images#view","lex:app.bsky.embed.video#view","lex:app.bsky.embed.external#view","lex:app.bsky.embed.record#view","lex:app.bsky.embed.recordWithMedia#view"]}},indexedAt:{type:"string",format:"datetime"}}},viewNotFound:{type:"object",required:["uri","notFound"],properties:{uri:{type:"string",format:"at-uri"},notFound:{type:"boolean",const:!0}}},viewBlocked:{type:"object",required:["uri","blocked","author"],properties:{uri:{type:"string",format:"at-uri"},blocked:{type:"boolean",const:!0},author:{type:"ref",ref:"lex:app.bsky.feed.defs#blockedAuthor"}}},viewDetached:{type:"object",required:["uri","detached"],properties:{uri:{type:"string",format:"at-uri"},detached:{type:"boolean",const:!0}}}}},AppBskyEmbedRecordWithMedia:{lexicon:1,id:"app.bsky.embed.recordWithMedia",description:"A representation of a record embedded in a Bluesky record (eg, a post), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card.",defs:{main:{type:"object",required:["record","media"],properties:{record:{type:"ref",ref:"lex:app.bsky.embed.record"},media:{type:"union",refs:["lex:app.bsky.embed.images","lex:app.bsky.embed.video","lex:app.bsky.embed.external"]}}},view:{type:"object",required:["record","media"],properties:{record:{type:"ref",ref:"lex:app.bsky.embed.record#view"},media:{type:"union",refs:["lex:app.bsky.embed.images#view","lex:app.bsky.embed.video#view","lex:app.bsky.embed.external#view"]}}}}}
1,AppBskyEmbedVideo:{lexicon:1,id:"app.bsky.embed.video",description:"A video embedded in a Bluesky record (eg, a post).",defs:{main:{type:"object",required:["video"],properties:{video:{type:"blob",description:"The mp4 video file. May be up to 100mb, formerly limited to 50mb.",accept:["video/mp4"],maxSize:1e8},captions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.embed.video#caption"},maxLength:20},alt:{type:"string",description:"Alt text description of the video, for accessibility.",maxGraphemes:1e3,maxLength:1e4},aspectRatio:{type:"ref",ref:"lex:app.bsky.embed.defs#aspectRatio"},presentation:{type:"string",description:"A hint to the client about how to present the video.",knownValues:["default","gif"]}}},caption:{type:"object",required:["lang","file"],properties:{lang:{type:"string",format:"language"},file:{type:"blob",accept:["text/vtt"],maxSize:2e4}}},view:{type:"object",required:["cid","playlist"],properties:{cid:{type:"string",format:"cid"},playlist:{type:"string",format:"uri"},thumbnail:{type:"string",format:"uri"},alt:{type:"string",maxGraphemes:1e3,maxLength:1e4},aspectRatio:{type:"ref",ref:"lex:app.bsky.embed.defs#aspectRatio"},presentation:{type:"string",description:"A hint to the client about how to present the video.",knownValues:["default","gif"]}}}}},AppBskyFeedDefs:{lexicon:1,id:"app.bsky.feed.defs",defs:{postView:{type:"object",required:["uri","cid","author","record","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},author:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},record:{type:"unknown"},embed:{type:"union",refs:["lex:app.bsky.embed.images#view","lex:app.bsky.embed.video#view","lex:app.bsky.embed.external#view","lex:app.bsky.embed.record#view","lex:app.bsky.embed.recordWithMedia#view"]},bookmarkCount:{type:"integer"},replyCount:{type:"integer"},repostCount:{type:"integer"},likeCount:{type:"integer"},quoteCount:{type:"integer"},indexedAt:{type:"string",format:"datetime"},viewer:{type:"ref",ref:"lex:app.bsky.feed.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},threadgate:{type:"ref",ref:"lex:app.bsky.feed.defs#threadgateView"},debug:{type:"unknown",description:"Debug information for internal development"}}},viewerState:{type:"object",description:"Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.",properties:{repost:{type:"string",format:"at-uri"},like:{type:"string",format:"at-uri"},bookmarked:{type:"boolean"},threadMuted:{type:"boolean"},replyDisabled:{type:"boolean"},embeddingDisabled:{type:"boolean"},pinned:{type:"boolean"}}},threadContext:{type:"object",description:"Metadata about this post within the context of the thread it is in.",properties:{rootAuthorLike:{type:"string",format:"at-uri"}}},feedViewPost:{type:"object",required:["post"],properties:{post:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"},reply:{type:"ref",ref:"lex:app.bsky.feed.defs#replyRef"},reason:{type:"union",refs:["lex:app.bsky.feed.defs#reasonRepost","lex:app.bsky.feed.defs#reasonPin"]},feedContext:{type:"string",description:"Context provided by feed generator that may be passed back alongside interactions.",maxLength:2e3},reqId:{type:"string",description:"Unique identifier per request that may be passed back alongside interactions.",maxLength:100}}},replyRef:{type:"object",required:["root","parent"],properties:{root:{type:"union",refs:["lex:app.bsky.feed.defs#postView","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]},parent:{type:"union",refs:["lex:app.bsky.feed.defs#postView","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]},grandparentAuthor:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic",description:"When parent is a reply to another post, this is the author of that post."}}},reasonRepost:{type:"object",required:["by","indexedAt"],properties:{by:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},indexedAt:{type:"string",format:"datetime"}}},reasonPin:{type:"object",properties:{}},threadViewPost:{type:"object",required:["post"],properties:{post:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"},parent:{type:"union",refs:["lex:app.bsky.feed.defs#threadViewPost","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]},replies:{type:"array",items:{type:"union",refs:["lex:app.bsky.feed.defs#threadViewPost","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]}},threadContext:{type:"ref",ref:"lex:app.bsky.feed.defs#threadContext"}}},notFoundPost:{type:"object",required:["uri","notFound"],properties:{uri:{type:"string",format:"at-uri"},notFound:{type:"boolean",const:!0}}},blockedPost:{type:"object",required:["uri","blocked","author"],properties:{uri:{type:"string",format:"at-uri"},blocked:{type:"boolean",const:!0},author:{type:"ref",ref:"lex:app.bsky.feed.defs#blockedAuthor"}}},blockedAuthor:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}
1,viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"}}},generatorView:{type:"object",required:["uri","cid","did","creator","displayName","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},did:{type:"string",format:"did"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},displayName:{type:"string"},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},avatar:{type:"string",format:"uri"},likeCount:{type:"integer",minimum:0},acceptsInteractions:{type:"boolean"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},viewer:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorViewerState"},contentMode:{type:"string",knownValues:["app.bsky.feed.defs#contentModeUnspecified","app.bsky.feed.defs#contentModeVideo"]},indexedAt:{type:"string",format:"datetime"}}},generatorViewerState:{type:"object",properties:{like:{type:"string",format:"at-uri"}}},skeletonFeedPost:{type:"object",required:["post"],properties:{post:{type:"string",format:"at-uri"},reason:{type:"union",refs:["lex:app.bsky.feed.defs#skeletonReasonRepost","lex:app.bsky.feed.defs#skeletonReasonPin"]},feedContext:{type:"string",description:"Context that will be passed through to client and may be passed to feed generator back alongside interactions.",maxLength:2e3}}},skeletonReasonRepost:{type:"object",required:["repost"],properties:{repost:{type:"string",format:"at-uri"}}},skeletonReasonPin:{type:"object",properties:{}},threadgateView:{type:"object",properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},record:{type:"unknown"},lists:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewBasic"}}}},interaction:{type:"object",properties:{item:{type:"string",format:"at-uri"},event:{type:"string",knownValues:["app.bsky.feed.defs#requestLess","app.bsky.feed.defs#requestMore","app.bsky.feed.defs#clickthroughItem","app.bsky.feed.defs#clickthroughAuthor","app.bsky.feed.defs#clickthroughReposter","app.bsky.feed.defs#clickthroughEmbed","app.bsky.feed.defs#interactionSeen","app.bsky.feed.defs#interactionLike","app.bsky.feed.defs#interactionRepost","app.bsky.feed.defs#interactionReply","app.bsky.feed.defs#interactionQuote","app.bsky.feed.defs#interactionShare"]},feedContext:{type:"string",description:"Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.",maxLength:2e3},reqId:{type:"string",description:"Unique identifier per request that may be passed back alongside interactions.",maxLength:100}}},requestLess:{type:"token",description:"Request that less content like the given feed item be shown in the feed"},requestMore:{type:"token",description:"Request that more content like the given feed item be shown in the feed"},clickthroughItem:{type:"token",description:"User clicked through to the feed item"},clickthroughAuthor:{type:"token",description:"User clicked through to the author of the feed item"},clickthroughReposter:{type:"token",description:"User clicked through to the reposter of the feed item"},clickthroughEmbed:{type:"token",description:"User clicked through to the embedded content of the feed item"},contentModeUnspecified:{type:"token",description:"Declares the feed generator returns any types of posts."},contentModeVideo:{type:"token",description:"Declares the feed generator returns posts containing app.bsky.embed.video embeds."},interactionSeen:{type:"token",description:"Feed item was seen by user"},interactionLike:{type:"token",description:"User liked the feed item"},interactionRepost:{type:"token",description:"User reposted the feed item"},interactionReply:{type:"token",description:"User replied to the feed item"},interactionQuote:{type:"token",description:"User quoted the feed item"},interactionShare:{type:"token",description:"User shared the feed item"}}},AppBskyFeedDescribeFeedGenerator:{lexicon:1,id:"app.bsky.feed.describeFeedGenerator",defs:{main:{type:"query",description:"Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View).",output:{encoding:"application/json",schema:{type:"object",required:["did","feeds"],properties:{did:{type:"string",format:"did"},feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.describeFeedGenerator#feed"}},links:{type:"ref",ref:"lex:app.bsky.feed.describeFeedGenerator#links"}}}}},feed:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}},links:{type:"object",properties:{privacyPolicy:{type:"string"},termsOfService:{type:"string"}}}}},AppBskyFeedGenerator:{lexicon:1,id:"app.bsky.feed.generator",defs:{main:{type:"record",description:"Record declaring of the existence of a feed generator, and containing metadata about it. The record can exist in any repository.",key:"any",re
1cord:{type:"object",required:["did","displayName","createdAt"],properties:{did:{type:"string",format:"did"},displayName:{type:"string",maxGraphemes:24,maxLength:240},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},avatar:{type:"blob",accept:["image/png","image/jpeg"],maxSize:1e6},acceptsInteractions:{type:"boolean",description:"Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions"},labels:{type:"union",description:"Self-label values",refs:["lex:com.atproto.label.defs#selfLabels"]},contentMode:{type:"string",knownValues:["app.bsky.feed.defs#contentModeUnspecified","app.bsky.feed.defs#contentModeVideo"]},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyFeedGetActorFeeds:{lexicon:1,id:"app.bsky.feed.getActorFeeds",defs:{main:{type:"query",description:"Get a list of feeds (feed generator records) created by the actor (in the actor's repo).",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{cursor:{type:"string"},feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyFeedGetActorLikes:{lexicon:1,id:"app.bsky.feed.getActorLikes",defs:{main:{type:"query",description:"Get a list of posts liked by an actor. Requires auth, actor must be the requesting account.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}},errors:[{name:"BlockedActor"},{name:"BlockedByActor"}]}}},AppBskyFeedGetAuthorFeed:{lexicon:1,id:"app.bsky.feed.getAuthorFeed",defs:{main:{type:"query",description:"Get a view of an actor's 'author feed' (post and reposts by the author). Does not require auth.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},filter:{type:"string",description:"Combinations of post/repost types to include in response.",knownValues:["posts_with_replies","posts_no_replies","posts_with_media","posts_and_author_threads","posts_with_video"],default:"posts_with_replies"},includePins:{type:"boolean",default:!1}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}},errors:[{name:"BlockedActor"},{name:"BlockedByActor"}]}}},AppBskyFeedGetFeed:{lexicon:1,id:"app.bsky.feed.getFeed",defs:{main:{type:"query",description:"Get a hydrated feed from an actor's selected feed generator. Implemented by App View.",parameters:{type:"params",required:["feed"],properties:{feed:{type:"string",format:"at-uri"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}},errors:[{name:"UnknownFeed"}]}}},AppBskyFeedGetFeedGenerator:{lexicon:1,id:"app.bsky.feed.getFeedGenerator",defs:{main:{type:"query",description:"Get information about a feed generator. Implemented by AppView.",parameters:{type:"params",required:["feed"],properties:{feed:{type:"string",format:"at-uri",description:"AT-URI of the feed generator record."}}},output:{encoding:"application/json",schema:{type:"object",required:["view","isOnline","isValid"],properties:{view:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"},isOnline:{type:"boolean",description:"Indicates whether the feed generator service has been online recently, or else seems to be inactive."},isValid:{type:"boolean",description:"Indicates whether the feed generator service is compatible with the record declaration."}}}}}}},AppBskyFeedGetFeedGenerators:{lexicon:1,id:"app.bsky.feed.getFeedGenerators",defs:{main:{type:"query",description:"Get information about a list of feed generators.",parameters:{type:"params",required:["feeds"],properties:{feeds:{type:"array",items:{type:"string",format:"at-uri"}}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyFeedGetFeedSkeleton:{lexicon:1,id:"app.bsky.feed.getFeedSkeleton",defs:{main:{type:"query",description:"Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service.",parameters:{type:"params",required:["feed"],properties:{feed:{type:"string",format:"at-uri",description:"Reference to feed generator record describing the specific feed being requested."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#skeletonFeedPost"}},reqId:{type:"string",description:"Unique identifier per request that may be passed back alongside interactions.",maxLength:100}}}},errors:[{name:"UnknownFeed"}]}}},AppBskyFeedGetLikes:{lexicon:1,id:"app.bsky.feed.getLikes",defs:{main:{type:"query",description:"Get like records which reference a subject (by AT-URI and CID).",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri",description:"AT-URI of the subject (eg, a post record)."},cid:{type:"string",format:"cid",description:"CID of the subject record (aka, specific version of record), to filter likes."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","likes"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},cursor:{type:"string"},likes:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.getLikes#like"}}}}}},like:{type:"object",required:["indexedAt","createdAt","actor"],properties:{indexedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},actor:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}},AppBskyFeedGetListFeed:{lexicon:1,id:"app.bsky.feed.getListFeed",defs:{main:{type:"query",description:"Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth.",parameters:{type:"params",required:["list"],properties:{list:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the list record."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}},errors:[{name:"UnknownList"}]}}},AppBskyFeedGetPostThread:{lexicon:1,id:"app.bsky.feed.getPostThread",defs:{main:{type:"query",description:"Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests.",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri",description:"Reference (AT-URI) to post record."},depth:{type:"integer",description:"How many levels of reply depth should be included in response.",default:6,minimum:0,maximum:1e3},parentHeight:{type:"integer",description:"How many levels of parent (and grandparent, etc) post to include.",default:80,minimum:0,maximum:1e3}}},output:{encoding:"application/json",schema:{type:"object",required:["thread"],properties:{thread:{type:"union",refs:["lex:app.bsky.feed.defs#threadViewPost","lex:app.bsky.feed.defs#notFoundPost","lex:app.bsky.feed.defs#blockedPost"]},threadgate:{type:"ref",ref:"lex:app.bsky.feed.defs#threadgateView"}}}},errors:[{name:"NotFound"}]}}},AppBskyFeedGetPosts:{lexicon:1,id:"app.bsky.feed.getPosts",defs:{main:{type:"query",description:"Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as 'hydrating' a 'feed skeleton'.",parameters:{type:"params",required:["uris"],properties:{uris:{type:"array",description:"List of post AT-URIs to return hydrated views for.",items:{type:"string",format:"at-uri"},maxLength:25}}},output:{encoding:"application/json",schema:{type:"object",required:["posts"],properties:{posts:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"}}}}}}}},AppBskyFeedGetQuotes:{lexicon:1,id:"app.bsky.feed.getQuotes",defs:{main:{type:"query",description:"Get a list of quotes for a given post.",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri",description:"Reference (AT-URI) of post record"},cid:{type:"string",format:"cid",description:"If supplied, filters to quotes of specific version (by CID) of the post record."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","posts"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},cursor:{type:"string"},posts:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"}}}}}}}},AppBskyFeedGetRepostedBy:{lexicon:1,id:"app.bsky.feed.getRepostedBy",defs:{main:{type:"query",description:"Get a list of reposts for a given post.",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri",description:"Reference (AT-URI) of post record"},cid:{type:"string",format:"cid",description:"If supplied, filters to reposts of specific version (by CID) of the post record."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","repostedBy"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},cursor:{type:"string"},repostedBy:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyFeedGetSuggestedFeeds:{lexicon:1,id:"app.bsky.feed.getSuggestedFeeds",defs:{main:{type:"query",description:"Get a list of suggested feeds (feed generators) for the requesting account.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{cursor:{type:"string"},feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyFeedGetTimeline:{lexicon:1,id:"app.bsky.feed.getTimeline",def
1s:{main:{type:"query",description:"Get a view of the requesting account's home timeline. This is expected to be some form of reverse-chronological feed.",parameters:{type:"params",properties:{algorithm:{type:"string",description:"Variant 'algorithm' for timeline. Implementation-specific. NOTE: most feed flexibility has been moved to feed generator mechanism."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feed"],properties:{cursor:{type:"string"},feed:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#feedViewPost"}}}}}}}},AppBskyFeedLike:{lexicon:1,id:"app.bsky.feed.like",defs:{main:{type:"record",description:"Record declaring a 'like' of a piece of subject content.",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},createdAt:{type:"string",format:"datetime"},via:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}}}}},AppBskyFeedPost:{lexicon:1,id:"app.bsky.feed.post",defs:{main:{type:"record",description:"Record containing a Bluesky post.",key:"tid",record:{type:"object",required:["text","createdAt"],properties:{text:{type:"string",maxLength:3e3,maxGraphemes:300,description:"The primary post content. May be an empty string, if there are embeds."},entities:{type:"array",description:"DEPRECATED: replaced by app.bsky.richtext.facet.",items:{type:"ref",ref:"lex:app.bsky.feed.post#entity"}},facets:{type:"array",description:"Annotations of text (mentions, URLs, hashtags, etc)",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},reply:{type:"ref",ref:"lex:app.bsky.feed.post#replyRef"},embed:{type:"union",refs:["lex:app.bsky.embed.images","lex:app.bsky.embed.video","lex:app.bsky.embed.external","lex:app.bsky.embed.record","lex:app.bsky.embed.recordWithMedia"]},langs:{type:"array",description:"Indicates human language of post primary text content.",maxLength:3,items:{type:"string",format:"language"}},labels:{type:"union",description:"Self-label values for this post. Effectively content warnings.",refs:["lex:com.atproto.label.defs#selfLabels"]},tags:{type:"array",description:"Additional hashtags, in addition to any included in post text and facets.",maxLength:8,items:{type:"string",maxLength:640,maxGraphemes:64}},createdAt:{type:"string",format:"datetime",description:"Client-declared timestamp when this post was originally created."}}}},replyRef:{type:"object",required:["root","parent"],properties:{root:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},parent:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}},entity:{type:"object",description:"Deprecated: use facets instead.",required:["index","type","value"],properties:{index:{type:"ref",ref:"lex:app.bsky.feed.post#textSlice"},type:{type:"string",description:"Expected values are 'mention' and 'link'."},value:{type:"string"}}},textSlice:{type:"object",description:"Deprecated. Use app.bsky.richtext instead -- A text segment. Start is inclusive, end is exclusive. Indices are for utf16-encoded strings.",required:["start","end"],properties:{start:{type:"integer",minimum:0},end:{type:"integer",minimum:0}}}}},AppBskyFeedPostgate:{lexicon:1,id:"app.bsky.feed.postgate",defs:{main:{type:"record",key:"tid",description:"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.",record:{type:"object",required:["post","createdAt"],properties:{createdAt:{type:"string",format:"datetime"},post:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the post record."},detachedEmbeddingUris:{type:"array",maxLength:50,items:{type:"string",format:"at-uri"},description:"List of AT-URIs embedding this post that the author has detached from."},embeddingRules:{description:"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.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.postgate#disableRule"]}}}}},disableRule:{type:"object",description:"Disables embedding of this post.",properties:{}}}},AppBskyFeedRepost:{lexicon:1,id:"app.bsky.feed.repost",defs:{main:{description:"Record representing a 'repost' of an existing Bluesky post.",type:"record",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"ref",ref:"lex:com.atproto.repo.strongRef"},createdAt:{type:"string",format:"datetime"},via:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}}}}},AppBskyFeedSearchPosts:{lexicon:1,id:"app.bsky.feed.searchPosts",defs:{main:{type:"query",description:"Find posts matching search criteria, returning views of those posts. Note that this API endpoint may require authentication (eg, not public) for some service providers and implementations.",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string;
1 syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."},sort:{type:"string",knownValues:["top","latest"],default:"latest",description:"Specifies the ranking order of results."},since:{type:"string",description:"Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD)."},until:{type:"string",description:"Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD)."},mentions:{type:"string",format:"at-identifier",description:"Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions."},author:{type:"string",format:"at-identifier",description:"Filter to posts by the given account. Handles are resolved to DID before query-time."},lang:{type:"string",format:"language",description:"Filter to posts in the given language. Expected to be based on post language field, though server may override language detection."},domain:{type:"string",description:"Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization."},url:{type:"string",format:"uri",description:"Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching."},tag:{type:"array",items:{type:"string",maxLength:640,maxGraphemes:64},description:"Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string",description:"Optional pagination mechanism; may not necessarily allow scrolling through entire result set."}}},output:{encoding:"application/json",schema:{type:"object",required:["posts"],properties:{cursor:{type:"string"},hitsTotal:{type:"integer",description:"Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."},posts:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"}}}}},errors:[{name:"BadQueryString"}]}}},AppBskyFeedSendInteractions:{lexicon:1,id:"app.bsky.feed.sendInteractions",defs:{main:{type:"procedure",description:"Send information about interactions with feed items back to the feed generator that served them.",input:{encoding:"application/json",schema:{type:"object",required:["interactions"],properties:{feed:{type:"string",format:"at-uri"},interactions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#interaction"}}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},AppBskyFeedThreadgate:{lexicon:1,id:"app.bsky.feed.threadgate",defs:{main:{type:"record",key:"tid",description:"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.",record:{type:"object",required:["post","createdAt"],properties:{post:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the post record."},allow:{description:"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.",type:"array",maxLength:5,items:{type:"union",refs:["lex:app.bsky.feed.threadgate#mentionRule","lex:app.bsky.feed.threadgate#followerRule","lex:app.bsky.feed.threadgate#followingRule","lex:app.bsky.feed.threadgate#listRule"]}},createdAt:{type:"string",format:"datetime"},hiddenReplies:{type:"array",maxLength:300,items:{type:"string",format:"at-uri"},description:"List of hidden reply URIs."}}}},mentionRule:{type:"object",description:"Allow replies from actors mentioned in your post.",properties:{}},followerRule:{type:"object",description:"Allow replies from actors who follow you.",properties:{}},followingRule:{type:"object",description:"Allow replies from actors you follow.",properties:{}},listRule:{type:"object",description:"Allow replies from actors on a list.",required:["list"],properties:{list:{type:"string",format:"at-uri"}}}}},AppBskyGraphBlock:{lexicon:1,id:"app.bsky.graph.block",defs:{main:{type:"record",description:"Record declaring a 'block' relationship against another account. NOTE: blocks are public in Bluesky; see blog posts for details.",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"string",format:"did",description:"DID of the account to be blocked."},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphDefs:{lexicon:1,id:"app.bsky.graph.defs",defs:{listViewBasic:{type:"object",required:["uri","cid","name","purpose"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},name:{type:"string",maxLength:64,minLength:1},purpose:{type:"ref",ref:"lex:app.bsky.graph.defs#listPurpose"},avatar:{type:"string",format:"uri"},listItemCount:{type:"integer",minimum:0},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},viewer:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewerState"},indexedAt:{type:"string",format:"datetime"}}},listView:{type:"object",required:["uri","cid","creator","name","purpose","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},name:{type:"string",maxLength:64,minLength:1},purpose:{type:"ref",ref:"lex:app.bsky.graph.defs#listPurpose"},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},avatar:{type:"string",format:"uri"},listItemCount:{type:"integer",minimum:0},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},viewer:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewerState"},indexedAt:{type:"string",format:"datetime"}}},listItemView:{type:"object",required:["uri","subject"],properties:{uri:{type:"string",format:"at-uri"},subject:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}},starterPackView:{type:"object",required:["uri","cid","record","creator","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},record:{type:"unknown"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},list:{type:"ref",ref:"lex:app.bsky.graph.defs#listViewBasic"},listItemsSample:{type:"array",maxLength:12,items:{type:"ref",ref:"lex:app.bsky.graph.defs#listItemView"}},feeds:{type:"array",maxLength:3,items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}},joinedWeekCount:{type:"integer",minimum:0},joinedAllTimeCount:{type:"integer",minimum:0},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},indexedAt:{type:"string",format:"datetime"}}},starterPackViewBasic:{type:"object",required:["uri","cid","record","creator","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},record:{type:"unknown"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"},listItemCount:{type:"integer",minimum:0},joinedWeekCount:{type:"integer",minimum:0},joinedAllTimeCount:{type:"integer",minimum:0},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},indexedAt:{type:"string",format:"datetime"}}},listPurpose:{type:"string",knownValues:["app.bsky.graph.defs#modlist","app.bsky.graph.defs#curatelist","app.bsky.graph.defs#referencelist"]},modlist:{type:"token",description:"A list of actors to apply an aggregate moderation action (mute/block) on."},curatelist:{type:"token",description:"A list of actors used for curation purposes such as list feeds or interaction gating."},referencelist:{type:"token",description:"A list of actors used for only for reference purposes such as within a starter pack."},listViewerState:{type:"object",properties:{muted:{type:"boolean"},blocked:{type:"string",format:"at-uri"}}},notFoundActor:{type:"object",description:"indicates that a handle or DID could not be resolved",required:["actor","notFound"],properties:{actor:{type:"string",format:"at-identifier"},notFound:{type:"boolean",const:!0}}},relationship:{type:"object",description:"lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)",required:["did"],properties:{did:{type:"string",format:"did"},following:{type:"string",format:"at-uri",description:"if the actor follows this DID, this is the AT-URI of the follow record"},followedBy:{type:"string",format:"at-uri",description:"if the actor is followed by this DID, contains the AT-URI of the follow record"},blocking:{type:"string",format:"at-uri",description:"if the actor blocks this DID, this is the AT-URI of the block record"},blockedBy:{type:"string",format:"at-uri",description:"if the actor is blocked by this DID, contains the AT-URI of the block record"},blockingByList:{type:"string",format:"at-uri",description:"if the actor blocks this DID via a block list, this is the AT-URI of the listblock record"},blockedByList:{type:"string",format:"at-uri",description:"if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record"}}}}},AppBskyGraphFollow:{lexicon:1,id:"app.bsky.graph.follow",defs:{main:{type:"record",description:"Record declaring a social 'follow' relationship of another account. Duplicate follows will be ignored by the AppView.",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"string",format:"did"},createdAt:{type:"string",format:"datetime"},via:{type:"ref",ref:"lex:com.atproto.repo.strongRef"}}}}}},AppBskyGraphGetActorStarterPacks:{lexicon:1,id:"app.bsky.graph.getActorStarterPacks",defs:{main:{type:"query",description:"Get a list of starter packs created by the actor.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{cursor:{type:"string"},starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackViewBasic"}}}}}}}},AppBskyGraphGetBlocks:{lexicon:1,id:"app.bsky.graph.getBlocks",defs:{main:{type:"query",description:"Enumerates which accounts the requesting account is currently blocking. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["blocks"],properties:{cursor:{type:"string"},blocks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetFollowers:{lexicon:1,id:"app.bsky.graph.getFollowers",defs:{main:{type:"query",description:"Enumerates accounts which follow a specified account (
1actor).",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["subject","followers"],properties:{subject:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},cursor:{type:"string"},followers:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetFollows:{lexicon:1,id:"app.bsky.graph.getFollows",defs:{main:{type:"query",description:"Enumerates accounts which a specified account (actor) follows.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["subject","follows"],properties:{subject:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},cursor:{type:"string"},follows:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetKnownFollowers:{lexicon:1,id:"app.bsky.graph.getKnownFollowers",defs:{main:{type:"query",description:"Enumerates accounts which follow a specified account (actor) and are followed by the viewer.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["subject","followers"],properties:{subject:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},cursor:{type:"string"},followers:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetList:{lexicon:1,id:"app.bsky.graph.getList",defs:{main:{type:"query",description:"Gets a 'view' (with additional context) of a specified list.",parameters:{type:"params",required:["list"],properties:{list:{type:"string",format:"at-uri",description:"Reference (AT-URI) of the list record to hydrate."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["list","items"],properties:{cursor:{type:"string"},list:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"},items:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listItemView"}}}}}}}},AppBskyGraphGetListBlocks:{lexicon:1,id:"app.bsky.graph.getListBlocks",defs:{main:{type:"query",description:"Get mod lists that the requesting account (actor) is blocking. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["lists"],properties:{cursor:{type:"string"},lists:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"}}}}}}}},AppBskyGraphGetListMutes:{lexicon:1,id:"app.bsky.graph.getListMutes",defs:{main:{type:"query",description:"Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["lists"],properties:{cursor:{type:"string"},lists:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"}}}}}}}},AppBskyGraphGetLists:{lexicon:1,id:"app.bsky.graph.getLists",defs:{main:{type:"query",description:"Enumerates the lists created by a specified account (actor).",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier",description:"The account (actor) to enumerate lists from."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},purposes:{type:"array",description:"Optional filter by list purpose. If not specified, all supported types are returned.",items:{type:"string",knownValues:["modlist","curatelist"]}}}},output:{encoding:"application/json",schema:{type:"object",required:["lists"],properties:{cursor:{type:"string"},lists:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"}}}}}}}},AppBskyGraphGetListsWithMembership:{lexicon:1,id:"app.bsky.graph.getListsWithMembership",defs:{main:{type:"query",description:"Enumerates the lists created by the session user, and includes membership information about `actor` in those lists. Only supports curation and moderation lists (no reference lists, used in starter packs). Requires auth.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier",description:"The account (
1actor) to check for membership."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},purposes:{type:"array",description:"Optional filter by list purpose. If not specified, all supported types are returned.",items:{type:"string",knownValues:["modlist","curatelist"]}}}},output:{encoding:"application/json",schema:{type:"object",required:["listsWithMembership"],properties:{cursor:{type:"string"},listsWithMembership:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.getListsWithMembership#listWithMembership"}}}}}},listWithMembership:{description:"A list and an optional list item indicating membership of a target user to that list.",type:"object",required:["list"],properties:{list:{type:"ref",ref:"lex:app.bsky.graph.defs#listView"},listItem:{type:"ref",ref:"lex:app.bsky.graph.defs#listItemView"}}}}},AppBskyGraphGetMutes:{lexicon:1,id:"app.bsky.graph.getMutes",defs:{main:{type:"query",description:"Enumerates accounts that the requesting account (actor) currently has muted. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["mutes"],properties:{cursor:{type:"string"},mutes:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyGraphGetRelationships:{lexicon:1,id:"app.bsky.graph.getRelationships",defs:{main:{type:"query",description:"Enumerates public relationships between one account, and a list of other accounts. Does not require auth.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier",description:"Primary account requesting relationships for."},others:{type:"array",description:"List of 'other' accounts to be related back to the primary.",maxLength:30,items:{type:"string",format:"at-identifier"}}}},output:{encoding:"application/json",schema:{type:"object",required:["relationships"],properties:{actor:{type:"string",format:"did"},relationships:{type:"array",items:{type:"union",refs:["lex:app.bsky.graph.defs#relationship","lex:app.bsky.graph.defs#notFoundActor"]}}}}},errors:[{name:"ActorNotFound",description:"the primary actor at-identifier could not be resolved"}]}}},AppBskyGraphGetStarterPack:{lexicon:1,id:"app.bsky.graph.getStarterPack",defs:{main:{type:"query",description:"Gets a view of a starter pack.",parameters:{type:"params",required:["starterPack"],properties:{starterPack:{type:"string",format:"at-uri",description:"Reference (AT-URI) of the starter pack record."}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPack"],properties:{starterPack:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackView"}}}}}}},AppBskyGraphGetStarterPacks:{lexicon:1,id:"app.bsky.graph.getStarterPacks",defs:{main:{type:"query",description:"Get views for a list of starter packs.",parameters:{type:"params",required:["uris"],properties:{uris:{type:"array",items:{type:"string",format:"at-uri"},maxLength:25}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackViewBasic"}}}}}}}},AppBskyGraphGetStarterPacksWithMembership:{lexicon:1,id:"app.bsky.graph.getStarterPacksWithMembership",defs:{main:{type:"query",description:"Enumerates the starter packs created by the session user, and includes membership information about `actor` in those starter packs. Requires auth.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier",description:"The account (actor) to check for membership."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacksWithMembership"],properties:{cursor:{type:"string"},starterPacksWithMembership:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.getStarterPacksWithMembership#starterPackWithMembership"}}}}}},starterPackWithMembership:{description:"A starter pack and an optional list item indicating membership of a target user to that starter pack.",type:"object",required:["starterPack"],properties:{starterPack:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackView"},listItem:{type:"ref",ref:"lex:app.bsky.graph.defs#listItemView"}}}}},AppBskyGraphGetSuggestedFollowsByActor:{lexicon:1,id:"app.bsky.graph.getSuggestedFollowsByActor",defs:{main:{type:"query",description:"Enumerates follows similar to a given account (
1actor). Expected use is to recommend additional accounts immediately after following one account.",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"}}},output:{encoding:"application/json",schema:{type:"object",required:["suggestions"],properties:{suggestions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}},recIdStr:{type:"string",description:"Snowflake for this recommendation, use when submitting recommendation events."},isFallback:{type:"boolean",description:"DEPRECATED, unused. Previously: if true, response has fallen-back to generic results, and is not scoped using relativeToDid",default:!1},recId:{type:"integer",description:"DEPRECATED: use recIdStr instead."}}}}}}},AppBskyGraphList:{lexicon:1,id:"app.bsky.graph.list",defs:{main:{type:"record",description:"Record representing a list of accounts (actors). Scope includes both moderation-oriented lists and curration-oriented lists.",key:"tid",record:{type:"object",required:["name","purpose","createdAt"],properties:{purpose:{type:"ref",description:"Defines the purpose of the list (aka, moderation-oriented or curration-oriented)",ref:"lex:app.bsky.graph.defs#listPurpose"},name:{type:"string",maxLength:64,minLength:1,description:"Display name for list; can not be empty."},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},avatar:{type:"blob",accept:["image/png","image/jpeg"],maxSize:1e6},labels:{type:"union",refs:["lex:com.atproto.label.defs#selfLabels"]},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphListblock:{lexicon:1,id:"app.bsky.graph.listblock",defs:{main:{type:"record",description:"Record representing a block relationship against an entire an entire list of accounts (actors).",key:"tid",record:{type:"object",required:["subject","createdAt"],properties:{subject:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the mod list record."},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphListitem:{lexicon:1,id:"app.bsky.graph.listitem",defs:{main:{type:"record",description:"Record representing an account's inclusion on a specific list. The AppView will ignore duplicate listitem records.",key:"tid",record:{type:"object",required:["subject","list","createdAt"],properties:{subject:{type:"string",format:"did",description:"The account which is included on the list."},list:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the list record (app.bsky.graph.list)."},createdAt:{type:"string",format:"datetime"}}}}}},AppBskyGraphMuteActor:{lexicon:1,id:"app.bsky.graph.muteActor",defs:{main:{type:"procedure",description:"Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"}}}}}}},AppBskyGraphMuteActorList:{lexicon:1,id:"app.bsky.graph.muteActorList",defs:{main:{type:"procedure",description:"Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["list"],properties:{list:{type:"string",format:"at-uri"}}}}}}},AppBskyGraphMuteThread:{lexicon:1,id:"app.bsky.graph.muteThread",defs:{main:{type:"procedure",description:"Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["root"],properties:{root:{type:"string",format:"at-uri"}}}}}}},AppBskyGraphSearchStarterPacks:{lexicon:1,id:"app.bsky.graph.searchStarterPacks",defs:{main:{type:"query",description:"Find starter packs matching search criteria. Does not require auth.",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string. Syntax, phrase, boolean, and facet
1ing is unspecified, but Lucene query syntax is recommended."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{cursor:{type:"string"},starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackViewBasic"}}}}}}}},AppBskyGraphStarterpack:{lexicon:1,id:"app.bsky.graph.starterpack",defs:{main:{type:"record",description:"Record defining a starter pack of actors and feeds for new users.",key:"tid",record:{type:"object",required:["name","list","createdAt"],properties:{name:{type:"string",maxGraphemes:50,maxLength:500,minLength:1,description:"Display name for starter pack; can not be empty."},description:{type:"string",maxGraphemes:300,maxLength:3e3},descriptionFacets:{type:"array",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},list:{type:"string",format:"at-uri",description:"Reference (AT-URI) to the list record."},feeds:{type:"array",maxLength:3,items:{type:"ref",ref:"lex:app.bsky.graph.starterpack#feedItem"}},createdAt:{type:"string",format:"datetime"}}}},feedItem:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}}}},AppBskyGraphUnmuteActor:{lexicon:1,id:"app.bsky.graph.unmuteActor",defs:{main:{type:"procedure",description:"Unmutes the specified account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["actor"],properties:{actor:{type:"string",format:"at-identifier"}}}}}}},AppBskyGraphUnmuteActorList:{lexicon:1,id:"app.bsky.graph.unmuteActorList",defs:{main:{type:"procedure",description:"Unmutes the specified list of accounts. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["list"],properties:{list:{type:"string",format:"at-uri"}}}}}}},AppBskyGraphUnmuteThread:{lexicon:1,id:"app.bsky.graph.unmuteThread",defs:{main:{type:"procedure",description:"Unmutes the specified thread. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["root"],properties:{root:{type:"string",format:"at-uri"}}}}}}},AppBskyGraphVerification:{lexicon:1,id:"app.bsky.graph.verification",defs:{main:{type:"record",description:"Record declaring a verification relationship between two accounts. Verifications are only considered valid by an app if issued by an account the app considers trusted.",key:"tid",record:{type:"object",required:["subject","handle","displayName","createdAt"],properties:{subject:{description:"DID of the subject the verification applies to.",type:"string",format:"did"},handle:{description:"Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying.",type:"string",format:"handle"},displayName:{description:"Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying.",type:"string"},createdAt:{description:"Date of when the verification was created.",type:"string",format:"datetime"}}}}}},AppBskyLabelerDefs:{lexicon:1,id:"app.bsky.labeler.defs",defs:{labelerView:{type:"object",required:["uri","cid","creator","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},likeCount:{type:"integer",minimum:0},viewer:{type:"ref",ref:"lex:app.bsky.labeler.defs#labelerViewerState"},indexedAt:{type:"string",format:"datetime"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}},labelerViewDetailed:{type:"object",required:["uri","cid","creator","policies","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},creator:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},policies:{type:"ref",ref:"lex:app.bsky.labeler.defs#labelerPolicies"},likeCount:{type:"integer",minimum:0},viewer:{type:"ref",ref:"lex:app.bsky.labeler.defs#labelerViewerState"},indexedAt:{type:"string",format:"datetime"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},reasonTypes:{description:"The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.",type:"array",items:{type:"ref",ref:"lex:com.atproto.moderation.defs#reasonType"}},subjectTypes:{description:"The set of subject types (account, record, etc) this 
1service accepts reports on.",type:"array",items:{type:"ref",ref:"lex:com.atproto.moderation.defs#subjectType"}},subjectCollections:{type:"array",description:"Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.",items:{type:"string",format:"nsid"}}}},labelerViewerState:{type:"object",properties:{like:{type:"string",format:"at-uri"}}},labelerPolicies:{type:"object",required:["labelValues"],properties:{labelValues:{type:"array",description:"The label values which this labeler publishes. May include global or custom labels.",items:{type:"ref",ref:"lex:com.atproto.label.defs#labelValue"}},labelValueDefinitions:{type:"array",description:"Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.",items:{type:"ref",ref:"lex:com.atproto.label.defs#labelValueDefinition"}}}}}},AppBskyLabelerGetServices:{lexicon:1,id:"app.bsky.labeler.getServices",defs:{main:{type:"query",description:"Get information about a list of labeler services.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}},detailed:{type:"boolean",default:!1}}},output:{encoding:"application/json",schema:{type:"object",required:["views"],properties:{views:{type:"array",items:{type:"union",refs:["lex:app.bsky.labeler.defs#labelerView","lex:app.bsky.labeler.defs#labelerViewDetailed"]}}}}}}}},AppBskyLabelerService:{lexicon:1,id:"app.bsky.labeler.service",defs:{main:{type:"record",description:"A declaration of the existence of labeler service.",key:"literal:self",record:{type:"object",required:["policies","createdAt"],properties:{policies:{type:"ref",ref:"lex:app.bsky.labeler.defs#labelerPolicies"},labels:{type:"union",refs:["lex:com.atproto.label.defs#selfLabels"]},createdAt:{type:"string",format:"datetime"},reasonTypes:{description:"The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed.",type:"array",items:{type:"ref",ref:"lex:com.atproto.moderation.defs#reasonType"}},subjectTypes:{description:"The set of subject types (account, record, etc) this service accepts reports on.",type:"array",items:{type:"ref",ref:"lex:com.atproto.moderation.defs#subjectType"}},subjectCollections:{type:"array",description:"Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type.",items:{type:"string",format:"nsid"}}}}}}},AppBskyNotificationDeclaration:{lexicon:1,id:"app.bsky.notification.declaration",defs:{main:{type:"record",description:"A declaration of the user's choices related to notifications that can be produced by them.",key:"literal:self",record:{type:"object",required:["allowSubscriptions"],properties:{allowSubscriptions:{type:"string",description:"A declaration of the user's preference for allowing activity subscriptions from other users. Absence of a record implies 'followers'.",knownValues:["followers","mutuals","none"]}}}}}},AppBskyNotificationDefs:{lexicon:1,id:"app.bsky.notification.defs",defs:{recordDeleted:{type:"object",properties:{}},chatPreference:{type:"object",required:["include","push"],properties:{include:{type:"string",knownValues:["all","accepted"]},push:{type:"boolean"}}},filterablePreference:{type:"object",required:["include","list","push"],properties:{include:{type:"string",knownValues:["all","follows"]},list:{type:"boolean"},push:{type:"boolean"}}},preference:{type:"object",required:["list","push"],properties:{list:{type:"boolean"},push:{type:"boolean"}}},preferences:{type:"object",required:["chat","follow","like","likeViaRepost","mention","quote","reply","repost","repostViaRepost","starterpackJoined","subscribedPost","unverified","verified"],properties:{chat:{type:"ref",ref:"lex:app.bsky.notification.defs#chatPreference"},follow:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},like:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},likeViaRepost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},mention:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},quote:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},reply:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},repost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},repostViaRepost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},starterpackJoined:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},subscribedPost:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},unverified:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},verified:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"}}},activitySubscription:{type:"object",required:["post","reply"],properties:{post:{type:"boolean"},reply:{type:"boolean"}}}
1,subjectActivitySubscription:{description:"Object used to store activity subscription data in stash.",type:"object",required:["subject","activitySubscription"],properties:{subject:{type:"string",format:"did"},activitySubscription:{type:"ref",ref:"lex:app.bsky.notification.defs#activitySubscription"}}}}},AppBskyNotificationGetPreferences:{lexicon:1,id:"app.bsky.notification.getPreferences",defs:{main:{type:"query",description:"Get notification-related preferences for an account. Requires auth.",parameters:{type:"params",properties:{}},output:{encoding:"application/json",schema:{type:"object",required:["preferences"],properties:{preferences:{type:"ref",ref:"lex:app.bsky.notification.defs#preferences"}}}}}}},AppBskyNotificationGetUnreadCount:{lexicon:1,id:"app.bsky.notification.getUnreadCount",defs:{main:{type:"query",description:"Count the number of unread notifications for the requesting account. Requires auth.",parameters:{type:"params",properties:{priority:{type:"boolean"},seenAt:{type:"string",format:"datetime"}}},output:{encoding:"application/json",schema:{type:"object",required:["count"],properties:{count:{type:"integer"}}}}}}},AppBskyNotificationListActivitySubscriptions:{lexicon:1,id:"app.bsky.notification.listActivitySubscriptions",defs:{main:{type:"query",description:"Enumerate all accounts to which the requesting account is subscribed to receive notifications for. Requires auth.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["subscriptions"],properties:{cursor:{type:"string"},subscriptions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}}}}}}}},AppBskyNotificationListNotifications:{lexicon:1,id:"app.bsky.notification.listNotifications",defs:{main:{type:"query",description:"Enumerate notifications for the requesting account. Requires auth.",parameters:{type:"params",properties:{reasons:{description:"Notification reasons to include in response.",type:"array",items:{type:"string",description:"A reason that matches the reason property of #notification."}},limit:{type:"integer",minimum:1,maximum:100,default:50},priority:{type:"boolean"},cursor:{type:"string"},seenAt:{type:"string",format:"datetime"}}},output:{encoding:"application/json",schema:{type:"object",required:["notifications"],properties:{cursor:{type:"string"},notifications:{type:"array",items:{type:"ref",ref:"lex:app.bsky.notification.listNotifications#notification"}},priority:{type:"boolean"},seenAt:{type:"string",format:"datetime"}}}}},notification:{type:"object",required:["uri","cid","author","reason","record","isRead","indexedAt"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},author:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"},reason:{type:"string",description:"The reason why this notification was delivered - e.g. your post was liked, or you received a new follower.",knownValues:["like","repost","follow","mention","reply","quote","starterpack-joined","verified","unverified","like-via-repost","repost-via-repost","subscribed-post","contact-match"]},reasonSubject:{type:"string",format:"at-uri"},record:{type:"unknown"},isRead:{type:"boolean"},indexedAt:{type:"string",format:"datetime"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}}}},AppBskyNotificationPutActivitySubscription:{lexicon:1,id:"app.bsky.notification.putActivitySubscription",defs:{main:{type:"procedure",description:"Puts an activity subscription entry. The key should be omitted for creation and provided for updates. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["subject","activitySubscription"],properties:{subject:{type:"string",format:"did"},activitySubscription:{type:"ref",ref:"lex:app.bsky.notification.defs#activitySubscription"}}}},output:{encoding:"application/json",schema:{type:"object",required:["subject"],properties:{subject:{type:"string",format:"did"},activitySubscription:{type:"ref",ref:"lex:app.bsky.notification.defs#activitySubscription"}}}}}}},AppBskyNotificationPutPreferences:{lexicon:1,id:"app.bsky.notification.putPreferences",defs:{main:{type:"procedure",description:"Set notification-related preferences for an account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["priority"],properties:{priority:{type:"boolean"}}}}}}},AppBskyNotificationPutPreferencesV2:{lexicon:1,id:"app.bsky.notification.putPreferencesV2",defs:{main:{type:"procedure",description:"Set notification-related preferences for an account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",properties:{chat:{type:"ref",ref:"lex:app.bsky.notification.defs#chatPreference"},follow:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},like:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},likeViaRepost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},mention:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},quote:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},reply:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},repost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},repostViaRepost:{type:"ref",ref:"lex:app.bsky.notification.defs#filterablePreference"},starterpackJoined:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},subscribedPost:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},unverified:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"},verified:{type:"ref",ref:"lex:app.bsky.notification.defs#preference"}}}},output:{encoding:"application/json",schema:{type:"object",required:["preferences"],properties:{preferences:{type:"ref",ref:"lex:app.bsky.notification.defs#preferences"}}}}}}},AppBskyNotificationRegisterPush:{lexicon:1,id:"app.bsky.notification.registerPush",defs:{main:{type:"procedure",description:"Register to receive push notifications, via a specified service, for the requesting account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["serviceDid","token","platform","appId"],properties:{serviceDid:{type:"string",format:"did"},token:{type:"string"},platform:{type:"string",knownValues:["ios","android","web"]},appId:{type:"string"},ageRestricted:{type:"boolean",description:"Set to true when the actor is age restricted"}}}}}}},AppBskyNotificationUnregisterPush:{lexicon:1,id:"app.bsky.notification.unregisterPush",defs:{main:{type:"procedure",description:"The inverse of registerPush - inform a specified service that push notifications should no longer be sent to the given token for the requesting account. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["serviceDid","token","platform","appId"],properties:{serviceDid:{type:"string",format:"did"},token:{type:"string"},platform:{type:"string",knownValues:["ios","android","web"]},appId:{type:"string"}}}}}}},AppBskyNotificationUpdateSeen:{lexicon:1,id:"app.bsky.notification.updateSeen",defs:{main:{type:"procedure",description:"Notify server that the requesting account has seen notifications. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["seenAt"],properties:{seenAt:{type:"string",format:"datetime"}}}}}}},AppBskyRichtextFacet:{lexicon:1,id:"app.bsky.richtext.facet",def
1s:{main:{type:"object",description:"Annotation of a sub-string within rich text.",required:["index","features"],properties:{index:{type:"ref",ref:"lex:app.bsky.richtext.facet#byteSlice"},features:{type:"array",items:{type:"union",refs:["lex:app.bsky.richtext.facet#mention","lex:app.bsky.richtext.facet#link","lex:app.bsky.richtext.facet#tag"]}}}},mention:{type:"object",description:"Facet feature for mention of another account. The text is usually a handle, including a '@' prefix, but the facet reference is a DID.",required:["did"],properties:{did:{type:"string",format:"did"}}},link:{type:"object",description:"Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.",required:["uri"],properties:{uri:{type:"string",format:"uri"}}},tag:{type:"object",description:"Facet feature for a hashtag. The text usually includes a '#' prefix, but the facet reference should not (except in the case of 'double hash tags').",required:["tag"],properties:{tag:{type:"string",maxLength:640,maxGraphemes:64}}},byteSlice:{type:"object",description:"Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.",required:["byteStart","byteEnd"],properties:{byteStart:{type:"integer",minimum:0},byteEnd:{type:"integer",minimum:0}}}}},AppBskyUnspeccedDefs:{lexicon:1,id:"app.bsky.unspecced.defs",defs:{skeletonSearchPost:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}},skeletonSearchActor:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},skeletonSearchStarterPack:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}},trendingTopic:{type:"object",required:["topic","link"],properties:{topic:{type:"string"},displayName:{type:"string"},description:{type:"string"},link:{type:"string"}}},skeletonTrend:{type:"object",required:["topic","displayName","link","startedAt","postCount","dids"],properties:{topic:{type:"string"},displayName:{type:"string"},link:{type:"string"},startedAt:{type:"string",format:"datetime"},postCount:{type:"integer"},status:{type:"string",knownValues:["hot"]},category:{type:"string"},dids:{type:"array",items:{type:"string",format:"did"}}}},trendView:{type:"object",required:["topic","displayName","link","startedAt","postCount","actors"],properties:{topic:{type:"string"},displayName:{type:"string"},link:{type:"string"},startedAt:{type:"string",format:"datetime"},postCount:{type:"integer"},status:{type:"string",knownValues:["hot"]},category:{type:"string"},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewBasic"}}}},threadItemPost:{type:"object",required:["post","moreParents","moreReplies","opThread","hiddenByThreadgate","mutedByViewer"],properties:{post:{type:"ref",ref:"lex:app.bsky.feed.defs#postView"},moreParents:{type:"boolean",description:"This post has more parents that were not present in the response. This is just a boolean, without the number of parents."},moreReplies:{type:"integer",description:"This post has more replies that were not present in the response. This is a numeric value, which is best-effort and might not be accurate."},opThread:{type:"boolean",description:"This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread."},hiddenByThreadgate:{type:"boolean",description:"The threadgate created by the author indicates this post as a reply to be hidden for everyone consuming the thread."},mutedByViewer:{type:"boolean",description:"This is by an account muted by the viewer requesting it."}}},threadItemNoUnauthenticated:{type:"object",properties:{}},threadItemNotFound:{type:"object",properties:{}},threadItemBlocked:{type:"object",required:["author"],properties:{author:{type:"ref",ref:"lex:app.bsky.feed.defs#blockedAuthor"}}},ageAssuranceState:{type:"object",description:"The computed state of the age assurance process, returned to the user in question on certain authenticated requests.",required:["status"],properties:{lastInitiatedAt:{type:"string",format:"datetime",description:"The timestamp when this 
1state was last updated."},status:{type:"string",description:"The status of the age assurance process.",knownValues:["unknown","pending","assured","blocked"]}}},ageAssuranceEvent:{type:"object",description:"Object used to store age assurance data in stash.",required:["createdAt","status","attemptId"],properties:{createdAt:{type:"string",format:"datetime",description:"The date and time of this write operation."},status:{type:"string",description:"The status of the age assurance process.",knownValues:["unknown","pending","assured"]},attemptId:{type:"string",description:"The unique identifier for this instance of the age assurance flow, in UUID format."},email:{type:"string",description:"The email used for AA."},initIp:{type:"string",description:"The IP address used when initiating the AA flow."},initUa:{type:"string",description:"The user agent used when initiating the AA flow."},completeIp:{type:"string",description:"The IP address used when completing the AA flow."},completeUa:{type:"string",description:"The user agent used when completing the AA flow."}}}}},AppBskyUnspeccedGetAgeAssuranceState:{lexicon:1,id:"app.bsky.unspecced.getAgeAssuranceState",defs:{main:{type:"query",description:"Returns the current state of the age assurance process for an account. This is used to check if the user has completed age assurance or if further action is required.",output:{encoding:"application/json",schema:{type:"ref",ref:"lex:app.bsky.unspecced.defs#ageAssuranceState"}}}}},AppBskyUnspeccedGetConfig:{lexicon:1,id:"app.bsky.unspecced.getConfig",defs:{main:{type:"query",description:"Get miscellaneous runtime configuration.",output:{encoding:"application/json",schema:{type:"object",required:[],properties:{checkEmailConfirmed:{type:"boolean"},liveNow:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.getConfig#liveNowConfig"}}}}}},liveNowConfig:{type:"object",required:["did","domains"],properties:{did:{type:"string",format:"did"},domains:{type:"array",items:{type:"string"}}}}}},AppBskyUnspeccedGetOnboardingSuggestedStarterPacks:{lexicon:1,id:"app.bsky.unspecced.getOnboardingSuggestedStarterPacks",defs:{main:{type:"query",description:"Get a list of suggested starterpacks for onboarding",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackView"}}}}}}}},AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton:{lexicon:1,id:"app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested starterpacks for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getOnboardingSuggestedStarterPacks",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{starterPacks:{type:"array",items:{type:"string",format:"at-uri"}}}}}}}},AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton:{lexicon:1,id:"app.bsky.unspecced.getOnboardingSuggestedUsersSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested users for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedOnboardingUsers",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},category:{type:"string",description:"Category of users to get suggestions for."},limit:{type:"integer",minimum:1,maximum:50,default:25}}},output:{encoding:"application/json",schema:{type:"object",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}},recId:{type:"string",description:"DEPRECATED: use recIdStr instead."},recIdStr:{type:"string",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyUnspeccedGetPopularFeedGenerators:{lexicon:1,id:"app.bsky.unspecced.getPopularFeedGenerators",defs:{main:{type:"query",description:"An unspecced view of globally popular feed generators.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},query:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{cursor:{type:"string"},feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyUnspeccedGetPostThreadOtherV2:{lexicon:1,id:"app.bsky.unspecced.getPostThreadOtherV2",defs:{main:{type:"query",description:"(NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get additional posts under a thread e.g. replies hidden by threadgate. Based on an anchor post at any depth of the tree, returns top-level replies below that anchor. It does not include ancestors nor the anch
1or itself. This should be called after exhausting `app.bsky.unspecced.getPostThreadV2`. Does not require auth, but additional metadata and filtering will be applied for authed requests.",parameters:{type:"params",required:["anchor"],properties:{anchor:{type:"string",format:"at-uri",description:"Reference (AT-URI) to post record. This is the anchor post."}}},output:{encoding:"application/json",schema:{type:"object",required:["thread"],properties:{thread:{type:"array",description:"A flat list of other thread items. The depth of each item is indicated by the depth property inside the item.",items:{type:"ref",ref:"lex:app.bsky.unspecced.getPostThreadOtherV2#threadItem"}}}}}},threadItem:{type:"object",required:["uri","depth","value"],properties:{uri:{type:"string",format:"at-uri"},depth:{type:"integer",description:"The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths."},value:{type:"union",refs:["lex:app.bsky.unspecced.defs#threadItemPost"]}}}}},AppBskyUnspeccedGetPostThreadV2:{lexicon:1,id:"app.bsky.unspecced.getPostThreadV2",defs:{main:{type:"query",description:"(NOTE: this endpoint is under development and WILL change without notice. Don't use it until it is moved out of `unspecced` or your application WILL break) Get posts in a thread. It is based in an anchor post at any depth of the tree, and returns posts above it (recursively resolving the parent, without further branching to their replies) and below it (recursive replies, with branching to their replies). Does not require auth, but additional metadata and filtering will be applied for authed requests.",parameters:{type:"params",required:["anchor"],properties:{anchor:{type:"string",format:"at-uri",description:"Reference (AT-URI) to post record. This is the anchor post, and the thread will be built around it. It can be any post in the tree, not necessarily a root post."},above:{type:"boolean",description:"Whether to include parents above the anchor.",default:!0},below:{type:"integer",description:"How many levels of replies to include below the anchor.",default:6,minimum:0,maximum:20},branchingFactor:{type:"integer",description:"Maximum of replies to include at each level of the thread, except for the direct replies to the anchor, which are (NOTE: currently, during unspecced phase) all returned (NOTE: later they might be paginated).",default:10,minimum:0,maximum:100},sort:{type:"string",description:"Sorting for the thread replies.",knownValues:["newest","oldest","top"],default:"oldest"}}},output:{encoding:"application/json",schema:{type:"object",required:["thread","hasOtherReplies"],properties:{thread:{type:"array",description:"A flat list of thread items. The depth of each item is indicated by the depth property inside the item.",items:{type:"ref",ref:"lex:app.bsky.unspecced.getPostThreadV2#threadItem"}},threadgate:{type:"ref",ref:"lex:app.bsky.feed.defs#threadgateView"},hasOtherReplies:{type:"boolean",description:"Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them."}}}}},threadItem:{type:"object",required:["uri","depth","value"],properties:{uri:{type:"string",format:"at-uri"},depth:{type:"integer",description:"The nesting level of this item in the thread. Depth 0 means the anchor item. Items above have negative depths, items below have positive depths."},value:{type:"union",refs:["lex:app.bsky.unspecced.defs#threadItemPost","lex:app.bsky.unspecced.defs#threadItemNoUnauthenticated","lex:app.bsky.unspecced.defs#threadItemNotFound","lex:app.bsky.unspecced.defs#threadItemBlocked"]}}}}},AppBskyUnspeccedGetSuggestedFeeds:{lexicon:1,id:"app.bsky.unspecced.getSuggestedFeeds",defs:{main:{type:"query",description:"Get a list of suggested feeds",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{feeds:{type:"array",items:{type:"ref",ref:"lex:app.bsky.feed.defs#generatorView"}}}}}}}},AppBskyUnspeccedGetSuggestedFeedsSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestedFeedsSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["feeds"],properties:{feeds:{type:"array",items:{type:"string",format:"at-uri"}}}}}}}},AppBskyUnspeccedGetSuggestedOnboardingUsers:{lexicon:1,id:"app.bsky.unspecced.getSuggestedOnboardingUsers",defs:{main:{type:"query",description:"Get a list of suggested users for onboarding",parameters:{type:"params",properties:{category:{type:"string",description:"Category of users to get suggestions for."},limit:{type:"integer",minimum:1,maximum:50,default:25}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}},recId:{type:"string",description:"DEPRECATED: use recIdStr instead."},recIdStr:{type:"string",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyUnspeccedGetSuggestedStarterPacks:{lexicon:1,id:"app.bsky.unspecced.getSuggestedStarterPacks",defs:{main:{type:"query",description:"Get a list of suggested starterpacks",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.graph.defs#starterPackView"}}}}}}}},AppBskyUnspeccedGetSuggestedStarterPacksSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestedStarterPacksSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested starterpacks. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedStarterpacks",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{starterPacks:{type:"array",items:{type:"string",format:"at-uri"}}}}}}}},AppBskyUnspeccedGetSuggestedUsers:{lexicon:1,id:"app.bsky.unspecced.getSuggestedUsers",defs:{main:{type:"query",description:"Get a list of suggested users",parameters:{type:"params",properties:{category:{type:"string",description:"Category of users to get suggestions for."},limit:{type:"integer",minimum:1,maximum:50,default:25}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}},recId:{type:"string",description:"DEPRECATED: use recIdStr instead."},recIdStr:{type:"string",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyUnspeccedGetSuggestedUsersForDiscover:{lexicon:1,id:"app.bsky.unspecced.getSuggestedUsersForDiscover",def
1s:{main:{type:"query",description:"Get a list of suggested users for the Discover page",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:50,default:25}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}},recIdStr:{type:"string",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestedUsersForDiscoverSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested users for the Discover page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForDiscover",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},limit:{type:"integer",minimum:1,maximum:50,default:25}}},output:{encoding:"application/json",schema:{type:"object",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}},recIdStr:{type:"string",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyUnspeccedGetSuggestedUsersForExplore:{lexicon:1,id:"app.bsky.unspecced.getSuggestedUsersForExplore",defs:{main:{type:"query",description:"Get a list of suggested users for the Explore page",parameters:{type:"params",properties:{category:{type:"string",description:"Category of users to get suggestions for."},limit:{type:"integer",minimum:1,maximum:50,default:25}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}},recIdStr:{type:"string",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestedUsersForExploreSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested users for the Explore page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForExplore",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},category:{type:"string",description:"Category of users to get suggestions for."},limit:{type:"integer",minimum:1,maximum:50,default:25}}},output:{encoding:"application/json",schema:{type:"object",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}},recIdStr:{type:"string",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyUnspeccedGetSuggestedUsersForSeeMore:{lexicon:1,id:"app.bsky.unspecced.getSuggestedUsersForSeeMore",defs:{main:{type:"query",description:"Get a list of suggested users for the See More page",parameters:{type:"params",properties:{category:{type:"string",description:"Category of users to get suggestions for."},limit:{type:"integer",minimum:1,maximum:50,default:25}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.actor.defs#profileView"}},recIdStr:{type:"string",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestedUsersForSeeMoreSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested users for the See More page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForSeeMore",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},category:{type:"string",description:"Category of users to get suggestions for."},limit:{type:"integer",minimum:1,maximum:50,default:25}}},output:{encoding:"application/json",schema:{type:"object",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}},recIdStr:{type:"string",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyUnspeccedGetSuggestedUsersSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestedUsersSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},category:{type:"string",description:"Category of users to get suggestions for."},limit:{type:"integer",minimum:1,maximum:50,default:25}}},output:{encoding:"application/json",schema:{type:"object",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}},recId:{type:"string",description:"DEPRECATED: use recIdStr instead."},recIdStr:{type:"string",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyUnspeccedGetSuggestionsSkeleton:{lexicon:1,id:"app.bsky.unspecced.getSuggestionsSkeleton",defs:{main:{type:"query",description:"Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},relativeToDid:{type:"string",format:"did",description:"DID of the account to get suggestions relative to. If not provided, suggestions will be based on the viewer."}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{cursor:{type:"string"},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonSearchActor"}},relativeToDid:{type:"string",format:"did",description:"DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer."},recId:{type:"integer",description:"DEPRECATED: use recIdStr instead."},recIdStr:{type:"string",description:"Snowflake for this recommendation, use when submitting recommendation events."}}}}}}},AppBskyUnspeccedGetTaggedSuggestions:{lexicon:1,id:"app.bsky.unspecced.getTaggedSuggestions",defs:{main:{type:"query",description:"Get a list of suggestions (feeds and users) tagged with categories",parameters:{type:"params",properties:{}},output:{encoding:"application/json",schema:{type:"object",required:["suggestions"],properties:{suggestions:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.getTaggedSuggestions#suggestion"}}}}}},suggestion:{type:"object",required:["tag","subjectType","subject"],properties:{tag:{type:"string"},subjectType:{type:"string",knownValues:["actor","feed"]},subject:{type:"string",format:"uri"}}}}},AppBskyUnspeccedGetTrendingTopics:{lexicon:1,id:"app.bsky.unspecced.getTrendingTopics",defs:{main:{type:"query",description:"Get a list of trending topics",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking."},limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["topics","suggested"],properties:{topics:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#trendingTopic"}},suggested:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#trendingTopic"}}}}}}}},AppBskyUnspeccedGetTrends:{lexicon:1,id:"app.bsky.unspecced.getTrends",defs:{main:{type:"query",description:"Get the current trends on the network",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["trends"],properties:{trends:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#trendView"}}}}}}}},AppBskyUnspeccedGetTrendsSkeleton:{lexicon:1,id:"app.bsky.unspecced.getTrendsSkeleton",defs:{main:{type:"query",description:"Get the skeleton of trends on the network. Intended to be called and then hydrated through app.bsky.unspecced.getTrends",parameters:{type:"params",properties:{viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},limit:{type:"integer",minimum:1,maximum:25,default:10}}},output:{encoding:"application/json",schema:{type:"object",required:["trends"],properties:{trends:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonTrend"}}}}}}}},AppBskyUnspeccedInitAgeAssurance:{lexicon:1,id:"app.bsky.unspecced.initAgeAssurance",def
1s:{main:{type:"procedure",description:"Initiate age assurance for an account. This is a one-time action that will start the process of verifying the user's age.",input:{encoding:"application/json",schema:{type:"object",required:["email","language","countryCode"],properties:{email:{type:"string",description:"The user's email address to receive assurance instructions."},language:{type:"string",description:"The user's preferred language for communication during the assurance process."},countryCode:{type:"string",description:"An ISO 3166-1 alpha-2 code of the user's location."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:app.bsky.unspecced.defs#ageAssuranceState"}},errors:[{name:"InvalidEmail"},{name:"DidTooLong"},{name:"InvalidInitiation"}]}}},AppBskyUnspeccedSearchActorsSkeleton:{lexicon:1,id:"app.bsky.unspecced.searchActorsSkeleton",defs:{main:{type:"query",description:"Backend Actors (profile) search, returns only skeleton.",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string;
1 syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax."},viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries). Used to boost followed accounts in ranking."},typeahead:{type:"boolean",description:"If true, acts as fast/simple 'typeahead' query."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string",description:"Optional pagination mechanism; may not necessarily allow scrolling through entire result set."}}},output:{encoding:"application/json",schema:{type:"object",required:["actors"],properties:{cursor:{type:"string"},hitsTotal:{type:"integer",description:"Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."},actors:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonSearchActor"}}}}},errors:[{name:"BadQueryString"}]}}},AppBskyUnspeccedSearchPostsSkeleton:{lexicon:1,id:"app.bsky.unspecced.searchPostsSkeleton",defs:{main:{type:"query",description:"Backend Posts search, returns only skeleton",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string;
1 syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."},sort:{type:"string",knownValues:["top","latest"],default:"latest",description:"Specifies the ranking order of results."},since:{type:"string",description:"Filter results for posts after the indicated datetime (inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYYY-MM-DD)."},until:{type:"string",description:"Filter results for posts before the indicated datetime (not inclusive). Expected to use 'sortAt' timestamp, which may not match 'createdAt'. Can be a datetime, or just an ISO date (YYY-MM-DD)."},mentions:{type:"string",format:"at-identifier",description:"Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions."},author:{type:"string",format:"at-identifier",description:"Filter to posts by the given account. Handles are resolved to DID before query-time."},lang:{type:"string",format:"language",description:"Filter to posts in the given language. Expected to be based on post language field, though server may override language detection."},domain:{type:"string",description:"Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization."},url:{type:"string",format:"uri",description:"Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching."},tag:{type:"array",items:{type:"string",maxLength:640,maxGraphemes:64},description:"Filter to posts with the given tag (hashtag), based on rich-text facet or tag field. Do not include the hash (#) prefix. Multiple tags can be specified, with 'AND' matching."},viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string",description:"Optional pagination mechanism; may not necessarily allow scrolling through entire result set."}}},output:{encoding:"application/json",schema:{type:"object",required:["posts"],properties:{cursor:{type:"string"},hitsTotal:{type:"integer",description:"Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."},posts:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonSearchPost"}}}}},errors:[{name:"BadQueryString"}]}}},AppBskyUnspeccedSearchStarterPacksSkeleton:{lexicon:1,id:"app.bsky.unspecced.searchStarterPacksSkeleton",defs:{main:{type:"query",description:"Backend Starter Pack search, returns only skeleton.",parameters:{type:"params",required:["q"],properties:{q:{type:"string",description:"Search query string;
1 syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended."},viewer:{type:"string",format:"did",description:"DID of the account making the request (not included for public/unauthenticated queries)."},limit:{type:"integer",minimum:1,maximum:100,default:25},cursor:{type:"string",description:"Optional pagination mechanism; may not necessarily allow scrolling through entire result set."}}},output:{encoding:"application/json",schema:{type:"object",required:["starterPacks"],properties:{cursor:{type:"string"},hitsTotal:{type:"integer",description:"Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits."},starterPacks:{type:"array",items:{type:"ref",ref:"lex:app.bsky.unspecced.defs#skeletonSearchStarterPack"}}}}},errors:[{name:"BadQueryString"}]}}},AppBskyVideoDefs:{lexicon:1,id:"app.bsky.video.defs",defs:{jobStatus:{type:"object",required:["jobId","did","state"],properties:{jobId:{type:"string"},did:{type:"string",format:"did"},state:{type:"string",description:"The state of the video processing job. All values not listed as a known value indicate that the job is in process.",knownValues:["JOB_STATE_COMPLETED","JOB_STATE_FAILED"]},progress:{type:"integer",minimum:0,maximum:100,description:"Progress within the current processing state."},blob:{type:"blob"},error:{type:"string"},message:{type:"string"}}}}},AppBskyVideoGetJobStatus:{lexicon:1,id:"app.bsky.video.getJobStatus",defs:{main:{type:"query",description:"Get status details for a video processing job.",parameters:{type:"params",required:["jobId"],properties:{jobId:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["jobStatus"],properties:{jobStatus:{type:"ref",ref:"lex:app.bsky.video.defs#jobStatus"}}}}}}},AppBskyVideoGetUploadLimits:{lexicon:1,id:"app.bsky.video.getUploadLimits",defs:{main:{type:"query",description:"Get video upload limits for the authenticated user.",output:{encoding:"application/json",schema:{type:"object",required:["canUpload"],properties:{canUpload:{type:"boolean"},remainingDailyVideos:{type:"integer"},remainingDailyBytes:{type:"integer"},message:{type:"string"},error:{type:"string"}}}}}}},AppBskyVideoUploadVideo:{lexicon:1,id:"app.bsky.video.uploadVideo",defs:{main:{type:"procedure",description:"Upload a video to be processed then stored on the PDS.",input:{encoding:"video/mp4"},output:{encoding:"application/json",schema:{type:"object",required:["jobStatus"],properties:{jobStatus:{type:"ref",ref:"lex:app.bsky.video.defs#jobStatus"}}}}}}},ChatBskyActorDeclaration:{lexicon:1,id:"chat.bsky.actor.declaration",defs:{main:{type:"record",description:"A declaration of a Bluesky chat account.",key:"literal:self",record:{type:"object",required:["allowIncoming"],properties:{allowIncoming:{type:"string",knownValues:["all","none","following"]},allowGroupInvites:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Declaration about group chat invitation preferences for the record owner.",type:"string",knownValues:["all","none","following"]}}}}}},ChatBskyActorDefs:{lexicon:1,id:"chat.bsky.actor.defs",defs:{memberRole:{type:"string",knownValues:["owner","standard"]},profileViewBasic:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},displayName:{type:"string",maxGraphemes:64,maxLength:640},avatar:{type:"string",format:"uri"},associated:{type:"ref",ref:"lex:app.bsky.actor.defs#profileAssociated"},viewer:{type:"ref",ref:"lex:app.bsky.actor.defs#viewerState"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},createdAt:{type:"string",format:"datetime"},chatDisabled:{type:"boolean",description:"Set to true when the actor cannot actively participate in conversations"},verification:{type:"ref",ref:"lex:app.bsky.actor.defs#verificationState"},kind:{description:"Union field that has data specific to different kinds of convos.",type:"union",refs:["lex:chat.bsky.actor.defs#directConvoMember","lex:chat.bsky.actor.defs#groupConvoMember","lex:chat.bsky.actor.defs#pastGroupConvoMember"]}}},directConvoMember:{description:"[NOTE: This is under active development and should be considered unstable while this note is here].",type:"object",properties:{}},groupConvoMember:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. A current group convo member.",type:"object",required:["role"],properties:{addedBy:{description:"Who added this member. Only present if the member was added (instead of joining via link).",type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"},role:{description:"The member's role within this conversation. Only present in group conversation member lists.",type:"ref",ref:"lex:chat.bsky.actor.defs#memberRole"}}
1},pastGroupConvoMember:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. A past group convo member.",type:"object",required:[],properties:{}}}},ChatBskyActorDeleteAccount:{lexicon:1,id:"chat.bsky.actor.deleteAccount",defs:{main:{type:"procedure",output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},ChatBskyActorExportAccountData:{lexicon:1,id:"chat.bsky.actor.exportAccountData",defs:{main:{type:"query",output:{encoding:"application/jsonl"}}}},ChatBskyActorGetStatus:{lexicon:1,id:"chat.bsky.actor.getStatus",defs:{main:{type:"query",description:"Get the authenticated viewer's chat status: whether their account is chat-disabled and whether their group-membership additions are restricted to accounts they follow.",output:{encoding:"application/json",schema:{type:"object",required:["chatDisabled","canCreateGroups","groupMemberLimit"],properties:{chatDisabled:{type:"boolean",description:"True when the viewer's account is disabled and cannot actively participate in chat."},canCreateGroups:{type:"boolean",description:"Whether the viewer's account is allowed to create group chats. New accounts are restricted from creating groups."},groupMemberLimit:{type:"integer",description:"The maximum number of members allowed in a group conversation."}}}}}}},ChatBskyConvoAcceptConvo:{lexicon:1,id:"chat.bsky.convo.acceptConvo",defs:{main:{type:"procedure",description:"Marks a conversation as accepted, so it is shown in the list of accepted convos instead on the request convos.",errors:[{name:"InvalidConvo"}],input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",properties:{rev:{description:"Rev when the convo was accepted. If not present, the convo was already accepted.",type:"string"}}}}}}},ChatBskyConvoAddReaction:{lexicon:1,id:"chat.bsky.convo.addReaction",defs:{main:{type:"procedure",description:"Adds an emoji reaction to a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in a single reaction.",input:{encoding:"application/json",schema:{type:"object",required:["convoId","messageId","value"],properties:{convoId:{type:"string"},messageId:{type:"string"},value:{type:"string",minLength:1,maxLength:64,minGraphemes:1,maxGraphemes:1}}}},output:{encoding:"application/json",schema:{type:"object",required:["message"],properties:{message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"}}}},errors:[{name:"InvalidConvo"},{name:"ReactionNotAllowed",description:"Indicates that reactions are not allowed on this message, e.g. because it is a system message."},{name:"ReactionMessageDeleted",description:"Indicates that the message has been deleted and reactions can no longer be added/removed."},{name:"ReactionLimitReached",description:"Indicates that the message has the maximum number of reactions allowed for a single user, and the requested reaction wasn't yet present. If it was already present, the request will not fail since it is idempotent."},{name:"ReactionInvalidValue",description:"Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji."}]}}},ChatBskyConvoDefs:{lexicon:1,id:"chat.bsky.convo.defs",defs:{convoKind:{type:"string",knownValues:["direct","group"]},convoLockStatus:{type:"string",knownValues:["unlocked","locked","locked-permanently"]},convoStatus:{type:"string",knownValues:["request","accepted"]},convoRef:{type:"object",required:["did","convoId"],properties:{did:{type:"string",format:"did"},convoId:{type:"string"}}},messageRef:{type:"object",required:["did","messageId","convoId"],properties:{did:{type:"string",format:"did"},convoId:{type:"string"},messageId:{type:"string"}}},messageInput:{type:"object",required:["text"],properties:{text:{type:"string",maxLength:1e4,maxGraphemes:1e3},facets:{type:"array",description:"Annotations of text (mentions, URLs, hashtags, etc)",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},embed:{type:"union",refs:["lex:app.bsky.embed.record"]}}},messageView:{type:"object",required:["id","rev","text","sender","sentAt"],properties:{id:{type:"string"},rev:{type:"string"},text:{type:"string",maxLength:1e4,maxGraphemes:1e3},facets:{type:"array",description:"Annotations of text (mentions, URLs, hashtags, etc)",items:{type:"ref",ref:"lex:app.bsky.richtext.facet"}},embed:{type:"union",refs:["lex:app.bsky.embed.record#view"]},reactions:{type:"array",description:"Reactions to this message, in ascending order of creation time.",items:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionView"}},sender:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageViewSender"},sentAt:{type:"string",format:"datetime"}}},systemMessageReferredUser:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},systemMessageView:{description:"[NOTE: This is under active development and should be considered unstable while this note is here].",type:"object",required:["id","rev","sentAt","data"],properties:{id:{type:"string"},rev:{type:"string"},sentAt:{type:"string",format:"datetime"},data:{type:"union",refs:["lex:chat.bsky.convo.defs#systemMessageDataAddMember","lex:chat.bsky.convo.defs#systemMessageDataRemoveMember","lex:chat.bsky.convo.defs#systemMessageDataMemberJoin","lex:chat.bsky.convo.defs#systemMessageDataMemberLeave","lex:chat.bsky.convo.defs#systemMessageDataLockConvo","lex:chat.bsky.convo.defs#systemMessageDataUnlockConvo","lex:chat.bsky.convo.defs#systemMessageDataLockConvoPermanently","lex:chat.bsky.convo.defs#systemMessageDataEditGroup","lex:chat.bsky.convo.defs#systemMessageDataCreateJoinLink","lex:chat.bsky.convo.defs#systemMessageDataEditJoinLink","lex:chat.bsky.convo.defs#systemMessageDataEnableJoinLink","lex:chat.bsky.convo.defs#systemMessageDataDisableJoinLink"]}}},systemMessageDataAddMember:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user was added to the group convo.",type:"object",required:["member","role","addedBy"],properties:{member:{description:"Current view of the member who was added.",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageReferredUser"},role:{description:"Role the user was added to the group with. The role from 'member' will reflect the current data, not historical.",type:"ref",ref:"lex:chat.bsky.actor.defs#memberRole"},addedBy:{type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageReferredUser"}}},systemMessageDataRemoveMember:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user was removed from the group convo.",type:"object",required:["member","removedBy"],properties:{member:{description:"Current view of the member who was removed.",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageReferredUser"},removedBy:{type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageReferredUser"}}},systemMessageDataMemberJoin:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user joined the group convo via join link.",type:"object",required:["member","role"],properties:{member:{description:"Current view of the member who joined.",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageReferredUser"},role:{description:"Role the user was added to the group with. The role from 'member' will reflect the current data, not historical.",type:"ref",ref:"lex:chat.bsky.actor.defs#memberRole"},approvedBy:{description:"If join link was configured to require approval, this will be set to who approved the request. Undefined if approval was not required.",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageReferredUser"}}},systemMessageDataMemberLeave:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating a user voluntarily left the group convo.",type:"object",required:["member"],properties:{member:{description:"Current view of the member who left the group.",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageReferredUser"}}},systemMessageDataLockConvo:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was locked.",type:"object",required:["lockedBy"],properties:{lockedBy:{description:"Current view of the member who locked the group.",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageReferredUser"}}},systemMessageDataUnlockConvo:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was unlocked.",type:"object",required:["unlockedBy"],properties:{unlockedBy:{description:"Current view of the member who unlocked the group.",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageReferredUser"}}},systemMessageDataLockConvoPermanently:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group convo was locked permanently.",type:"object",required:["lockedBy"],properties:{lockedBy:{description:"Current view of the member who locked the group.",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageReferredUser"}}},systemMessageDataEditGroup:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group info was edited.",type:"object",properties:{oldName:{description:"Group name that was replaced.",type:"string"},newName:{description:"Group name that replaced the old.",type:"string"}}},systemMessageDataCreateJoinLink:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was created.",type:"object",properties:{}},systemMessageDataEditJoinLink:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was edited.",type:"object",properties:{}},systemMessageDataEnableJoinLink:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was enabled.",type:"object",properties:{}},systemMessageDataDisableJoinLink:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. System message indicating the group join link was disabled.",type:"object",properties:{}},deletedMessageView:{type:"object",required:["id","rev","sender","sentAt"],properties:{id:{type:"string"},rev:{type:"string"},sender:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageViewSender"},sentAt:{type:"string",format:"datetime"}}},messageViewSender:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},reactionView:{type:"object",required:["value","sender","createdAt"],properties:{value:{type:"string"},sender:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionViewSender"},createdAt:{type:"string",format:"datetime"}}},reactionViewSender:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},messageAndReactionView:{type:"object",required:["message","reaction"],properties:{message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"},reaction:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionView"}}},convoView:{type:"object",required:["id","rev","members","muted","unreadCount"],properties:{id:{type:"string"},rev:{type:"string"},members:{description:"Members of this conversation. For direct convos, it will be an immutable list of the 2 members. For group convos, it will a list of important members (the first few members, the viewer, the member who added the viewer, the member who sent the last message, the member who sent the last reaction), but will not contain the full list of members. Use chat.bsky.convo.getConvoMembers to list all members.",type:"array",items:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}},lastMessage:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView","lex:chat.bsky.convo.defs#systemMessageView"]},lastReaction:{type:"union",refs:["lex:chat.bsky.convo.defs#messageAndReactionView"]},muted:{type:"boolean"},status:{description:"Convo status for the viewer member (not the convo itself).",type:"ref",ref:"lex:chat.bsky.convo.defs#convoStatus"},unreadCount:{type:"integer"},kind:{description:"Union field that has data specific to different kinds of convos.",type:"union",refs:["lex:chat.bsky.convo.defs#directConvo","lex:chat.bsky.convo.defs#groupConvo"]}}},directConvo:{description:"[NOTE: This is under active development and should be considered unstable while this note is here].",type:"object",properties:{}},groupConvo:{description:"[NOTE: This is under active development and should be considered unstable while this note is here].",type:"object",required:["name","lockStatus","memberCount","memberLimit","createdAt"],properties:{name:{type:"string",description:"The display name of the group conversation.",maxGraphemes:128,maxLength:1280},memberCount:{type:"integer",description:"The total number of members in the group conversation."},createdAt:{type:"string",format:"datetime"},joinRequestCount:{type:"integer",description:"The total number of pending join requests for the group conversation. Only present for the owner. C
1apped at 21."},joinLink:{type:"ref",ref:"lex:chat.bsky.group.defs#joinLinkView"},memberLimit:{type:"integer",description:"The maximum number of members allowed in the group conversation."},lockStatus:{description:"The lock status of the conversation.",type:"ref",ref:"lex:chat.bsky.convo.defs#convoLockStatus"}}},logBeginConvo:{description:"Event indicating a convo containing the viewer was started. Can be direct or group. When a member is added to a group convo, they also get this event.",type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logAcceptConvo:{description:"Event indicating the viewer accepted a convo, and it can be moved out of the request inbox. Can be direct or group.",type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logLeaveConvo:{description:"Event indicating the viewer left a convo. Can be direct or group.",type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logMuteConvo:{description:"Event indicating the viewer muted a convo. Can be direct or group.",type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logUnmuteConvo:{description:"Event indicating the viewer unmuted a convo. Can be direct or group.",type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}},logCreateMessage:{description:"Event indicating a user-originated message was created. Is not emitted for system messages.",type:"object",required:["rev","convoId","message"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]},relatedProfiles:{description:"Profiles referred to in the message view. This isn't required for compatibility, because it was added later, but should generally be present.",type:"array",items:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}}}},logDeleteMessage:{description:"Event indicating a user-originated message was deleted. Is not emitted for system messages.",type:"object",required:["rev","convoId","message"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]}}},logReadMessage:{description:"DEPRECATED: use logReadConvo instead. Event indicating a convo was read up to a certain message.",type:"object",required:["rev","convoId","message"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView","lex:chat.bsky.convo.defs#systemMessageView"]}}},logAddReaction:{description:"Event indicating a reaction was added to a message.",type:"object",required:["rev","convoId","message","reaction"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]},reaction:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionView"},relatedProfiles:{description:"Profiles referred in the message and reaction views. This isn't required for compatibility, because it was added later, but should generally be present.",type:"array",items:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}}}},logRemoveReaction:{description:"Event indicating a reaction was removed from a message.",type:"object",required:["rev","convoId","message","reaction"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView"]},reaction:{type:"ref",ref:"lex:chat.bsky.convo.defs#reactionView"},relatedProfiles:{description:"Profiles referred in the message and reaction views. This isn't required for compatibility, because it was added later, but should generally be present.",type:"array",items:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}}}},logReadConvo:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a convo was read up to a certain message.",type:"object",required:["rev","convoId","message"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView","lex:chat.bsky.convo.defs#systemMessageView"]}}},logAddMember:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member was added to a group convo. The member who was added gets a logBeginConvo (to create the convo) but also a logAddMember (to show the system message as the first message the user sees).",type:"object",required:["rev","convoId","message","relatedProfiles"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{description:"A system message with data of type #systemMessageDataAddMember",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageView"},relatedProfiles:{description:"Profiles referred in the system message.",type:"array",items:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}}}},logRemoveMember:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member was removed from a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logRemoveMember (because they already left, so can't see the system message).",type:"object",required:["rev","convoId","message","relatedProfiles"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{description:"A system message with data of type #systemMessageDataRemoveMember",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageView"},relatedProfiles:{description:"Profiles referred in the system message.",type:"array",items:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}}}},logMemberJoin:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member joined a group convo via join link. The member who was added gets a logBeginConvo (to create the convo) but also a logMemberJoin (to show the system message as the first message the user sees).",type:"object",required:["rev","convoId","message","relatedProfiles"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{description:"A system message with data of type #systemMessageDataMemberJoin",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageView"},relatedProfiles:{description:"Profiles referred in the system message.",type:"array",items:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}}}},logMemberLeave:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a member voluntarily left a group convo. The member who was removed gets a logLeaveConvo (to leave the convo) but not a logMemberLeave (because they already left, so can't see the system message).",type:"object",required:["rev","convoId","message","relatedProfiles"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{description:"A system message with data of type #systemMessageDataMemberLeave",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageView"},relatedProfiles:{description:"Profiles referred in the system message.",type:"array",items:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}}}},logLockConvo:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was locked.",type:"object",required:["rev","convoId","message","relatedProfiles"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{description:"A system message with data of type #systemMessageDataLockConvo",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageView"},relatedProfiles:{description:"Profiles referred in the system message.",type:"array",items:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}}}},logUnlockConvo:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was unlocked.",type:"object",required:["rev","convoId","message","relatedProfiles"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{description:"A system message with data of type #systemMessageDataUnlockConvo",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageView"},relatedProfiles:{description:"Profiles referred in the system message.",type:"array",items:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}}}},logLockConvoPermanently:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a group convo was locked permanently.",type:"object",required:["rev","convoId","message","relatedProfiles"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{description:"A system message with data of type #systemMessageDataLockConvoPermanently",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageView"},relatedProfiles:{description:"Profiles referred in the system message.",type:"array",items:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}}}},logEditGroup:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating info about group convo was edited.",type:"object",required:["rev","convoId","message"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{description:"A system message with data of type #systemMessageDataEditGroup",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageView"}}},logCreateJoinLink:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was created for a group convo.",type:"object",required:["rev","convoId","message"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{description:"A system message with data of type #systemMessageDataCreateJoinLink",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageView"}}},logEditJoinLink:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a settings about a join link for a group convo were edited.",type:"object",required:["rev","convoId","message"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{description:"A system message with data of type #systemMessageDataEditJoinLink",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageView"}}},logEnableJoinLink:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was enabled for a group convo.",type:"object",required:["rev","convoId","message"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{description:"A system message with data of type #systemMessageDataEnableJoinLink",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageView"}}},logDisableJoinLink:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join link was disabled for a group convo.",type:"object",required:["rev","convoId","message"],properties:{rev:{type:"string"},convoId:{type:"string"},message:{description:"A system message with data of type #systemMessageDataDisableJoinLink",type:"ref",ref:"lex:chat.bsky.convo.defs#systemMessageView"}}},logIncomingJoinRequest:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was made to a group the viewer owns. Only the owner gets this.",type:"object",required:["rev","convoId","member"],properties:{rev:{type:"string"},convoId:{type:"string"},member:{description:"Prospective member who requested to join.",type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}}},logApproveJoinRequest:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was approved by the viewer. Only the owner gets this. The approved member gets a logBeginConvo.",type:"object",required:["rev","convoId","member"],properties:{rev:{type:"string"},convoId:{type:"string"},member:{description:"Prospective member who requested to join.",type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}}},logRejectJoinRequest:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was rejected by the viewer. Only the owner gets this.",type:"object",required:["rev","convoId","member"],properties:{rev:{type:"string"},convoId:{type:"string"},member:{description:"Prospective member who requested to join.",type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}}},logOutgoingJoinRequest:{description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Event indicating a join request was made by the viewer.",type:"object",required:["rev","convoId"],properties:{rev:{type:"string"},convoId:{type:"string"}}}}},ChatBskyConvoDeleteMessageForSelf:{lexicon:1,id:"chat.bsky.convo.deleteMessageForSelf",defs:{main:{type:"procedure",description:"Marks a message as deleted for the viewer, so they won't see that message in future enumerations.",errors:[{name:"InvalidConvo"},{name:"MessageDeleteNotAllowed",description:"Indicates that this message cannot be deleted, e.g. be
1cause it is a system message."}],input:{encoding:"application/json",schema:{type:"object",required:["convoId","messageId"],properties:{convoId:{type:"string"},messageId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:chat.bsky.convo.defs#deletedMessageView"}}}}},ChatBskyConvoGetConvo:{lexicon:1,id:"chat.bsky.convo.getConvo",defs:{main:{type:"query",description:"Gets an existing conversation by its ID.",errors:[{name:"InvalidConvo"}],parameters:{type:"params",required:["convoId"],properties:{convoId:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoGetConvoAvailability:{lexicon:1,id:"chat.bsky.convo.getConvoAvailability",defs:{main:{type:"query",description:"Check whether the requester and the other members can start a 1-1 chat. Only applicable to direct (non-group) conversations. If an existing convo is found for these members, it is returned. Does not create a new convo if it doesn't exist.",parameters:{type:"params",required:["members"],properties:{members:{type:"array",minLength:1,maxLength:10,items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["canChat"],properties:{canChat:{type:"boolean"},convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoGetConvoForMembers:{lexicon:1,id:"chat.bsky.convo.getConvoForMembers",defs:{main:{type:"query",description:"Get or create a 1-1 conversation for the given members. Always returns the same direct (non-group) conversation. To create a group conversation, use createGroup.",errors:[{name:"AccountSuspended"},{name:"BlockedActor"},{name:"MessagesDisabled"},{name:"NotFollowedBySender"},{name:"RecipientNotFound"}],parameters:{type:"params",required:["members"],properties:{members:{type:"array",minLength:1,maxLength:10,items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoGetConvoMembers:{lexicon:1,id:"chat.bsky.convo.getConvoMembers",defs:{main:{type:"query",description:"Returns a paginated list of members from a conversation.",errors:[{name:"InvalidConvo"}],parameters:{type:"params",required:["convoId"],properties:{convoId:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["members"],properties:{cursor:{type:"string"},members:{type:"array",items:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}}}}}}}},ChatBskyConvoGetLog:{lexicon:1,id:"chat.bsky.convo.getLog",defs:{main:{type:"query",parameters:{type:"params",required:[],properties:{cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["logs"],properties:{cursor:{type:"string"},logs:{type:"array",items:{type:"union",refs:["lex:chat.bsky.convo.defs#logBeginConvo","lex:chat.bsky.convo.defs#logAcceptConvo","lex:chat.bsky.convo.defs#logLeaveConvo","lex:chat.bsky.convo.defs#logMuteConvo","lex:chat.bsky.convo.defs#logUnmuteConvo","lex:chat.bsky.convo.defs#logCreateMessage","lex:chat.bsky.convo.defs#logDeleteMessage","lex:chat.bsky.convo.defs#logReadMessage","lex:chat.bsky.convo.defs#logAddReaction","lex:chat.bsky.convo.defs#logRemoveReaction","lex:chat.bsky.convo.defs#logReadConvo","lex:chat.bsky.convo.defs#logAddMember","lex:chat.bsky.convo.defs#logRemoveMember","lex:chat.bsky.convo.defs#logMemberJoin","lex:chat.bsky.convo.defs#logMemberLeave","lex:chat.bsky.convo.defs#logLockConvo","lex:chat.bsky.convo.defs#logUnlockConvo","lex:chat.bsky.convo.defs#logLockConvoPermanently","lex:chat.bsky.convo.defs#logEditGroup","lex:chat.bsky.convo.defs#logCreateJoinLink","lex:chat.bsky.convo.defs#logEditJoinLink","lex:chat.bsky.convo.defs#logEnableJoinLink","lex:chat.bsky.convo.defs#logDisableJoinLink","lex:chat.bsky.convo.defs#logIncomingJoinRequest","lex:chat.bsky.convo.defs#logApproveJoinRequest","lex:chat.bsky.convo.defs#logRejectJoinRequest","lex:chat.bsky.convo.defs#logOutgoingJoinRequest"]}}}}}}}},ChatBskyConvoGetMessages:{lexicon:1,id:"chat.bsky.convo.getMessages",defs:{main:{type:"query",description:"Returns a page of messages from a conversation.",errors:[{name:"InvalidConvo"}
1],parameters:{type:"params",required:["convoId"],properties:{convoId:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["messages"],properties:{cursor:{type:"string"},messages:{type:"array",items:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#deletedMessageView","lex:chat.bsky.convo.defs#systemMessageView"]}},relatedProfiles:{description:"Set of all members who authored or reacted to the returned messages. Members referred to by system messages are also included.",type:"array",items:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}}}}}}}},ChatBskyConvoLeaveConvo:{lexicon:1,id:"chat.bsky.convo.leaveConvo",defs:{main:{type:"procedure",description:"Leaves a conversation (direct or group). For group, this effectively removes membership. For direct, membership is never removed, only changed to remove from enumerations by the user who left.",errors:[{name:"InvalidConvo"},{name:"OwnerCannotLeave",description:"The owner of a group conversation cannot leave before locking the group."}],input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convoId","rev"],properties:{convoId:{type:"string"},rev:{type:"string"}}}}}}},ChatBskyConvoListConvoRequests:{lexicon:1,id:"chat.bsky.convo.listConvoRequests",defs:{main:{type:"query",description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Returns a page of incoming conversation requests for the user. Direct convo requests are returned as convoView; group join requests made by the user are returned as joinRequestConvoView.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["requests"],properties:{cursor:{type:"string"},requests:{type:"array",items:{type:"union",refs:["lex:chat.bsky.convo.defs#convoView","lex:chat.bsky.group.defs#joinRequestConvoView"]}}}}}}}},ChatBskyConvoListConvos:{lexicon:1,id:"chat.bsky.convo.listConvos",defs:{main:{type:"query",description:"Returns a page of conversations (direct or group) for the user.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},readState:{type:"string",knownValues:["unread"]},status:{description:'Filter convos by their status. It is discouraged to call with "request" and preferred to call chat.bsky.convo.listConvoRequests, which also includes group join requests made by the user.',type:"string",knownValues:["request","accepted"]},kind:{type:"string",description:"Filter by conversation kind.",knownValues:["direct","group"]},lockStatus:{type:"string",description:"Filter by conversation lock status. Values follow chat.bsky.convo.defs#convoLockStatus.",knownValues:["unlocked","locked","locked-permanently"]}}},output:{encoding:"application/json",schema:{type:"object",required:["convos"],properties:{cursor:{type:"string"},convos:{type:"array",items:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}}},ChatBskyConvoLockConvo:{lexicon:1,id:"chat.bsky.convo.lockConvo",defs:{main:{type:"procedure",description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Locks a group convo so no more content (messages, reactions) can be added to it.",errors:[{name:"ConvoLocked"},{name:"InvalidConvo"},{name:"InsufficientRole"}],input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoMuteConvo:{lexicon:1,id:"chat.bsky.convo.muteConvo",defs:{main:{type:"procedure",description:"Mutes a conversation, preventing notifications related to it.",errors:[{name:"InvalidConvo"}
1],input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoRemoveReaction:{lexicon:1,id:"chat.bsky.convo.removeReaction",defs:{main:{type:"procedure",description:"Removes an emoji reaction from a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in that reaction not being present, even if it already wasn't.",input:{encoding:"application/json",schema:{type:"object",required:["convoId","messageId","value"],properties:{convoId:{type:"string"},messageId:{type:"string"},value:{type:"string",minLength:1,maxLength:64,minGraphemes:1,maxGraphemes:1}}}},output:{encoding:"application/json",schema:{type:"object",required:["message"],properties:{message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"}}}},errors:[{name:"InvalidConvo"},{name:"ReactionNotAllowed",description:"Indicates that reactions are not allowed on this message, e.g. because it is a system message."},{name:"ReactionMessageDeleted",description:"Indicates that the message has been deleted and reactions can no longer be added/removed."},{name:"ReactionInvalidValue",description:"Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji."}]}}},ChatBskyConvoSendMessage:{lexicon:1,id:"chat.bsky.convo.sendMessage",defs:{main:{type:"procedure",description:"Sends a message to a conversation.",errors:[{name:"ConvoLocked"},{name:"InvalidConvo"}],input:{encoding:"application/json",schema:{type:"object",required:["convoId","message"],properties:{convoId:{type:"string"},message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageInput"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"}}}}},ChatBskyConvoSendMessageBatch:{lexicon:1,id:"chat.bsky.convo.sendMessageBatch",defs:{main:{type:"procedure",description:"Sends a batch of messages to a conversation.",errors:[{name:"ConvoLocked"},{name:"InvalidConvo"}],input:{encoding:"application/json",schema:{type:"object",required:["items"],properties:{items:{type:"array",maxLength:100,items:{type:"ref",ref:"lex:chat.bsky.convo.sendMessageBatch#batchItem"}}}}},output:{encoding:"application/json",schema:{type:"object",required:["items"],properties:{items:{type:"array",items:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageView"}}}}}},batchItem:{type:"object",required:["convoId","message"],properties:{convoId:{type:"string"},message:{type:"ref",ref:"lex:chat.bsky.convo.defs#messageInput"}}}}},ChatBskyConvoUnlockConvo:{lexicon:1,id:"chat.bsky.convo.unlockConvo",defs:{main:{type:"procedure",description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Unlocks a group convo so it is able to receive new content.",errors:[{name:"InvalidConvo"},{name:"InsufficientRole"}],input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoUnmuteConvo:{lexicon:1,id:"chat.bsky.convo.unmuteConvo",defs:{main:{type:"procedure",description:"Unmutes a conversation, allowing notifications related to it.",errors:[{name:"InvalidConvo"}],input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyConvoUpdateAllRead:{lexicon:1,id:"chat.bsky.convo.updateAllRead",defs:{main:{type:"procedure",description:"Sets conversations from a user as read to the latest message, with filters.",input:{encoding:"application/json",schema:{type:"object",properties:{status:{type:"string",knownValues:["request","accepted"]}}}},output:{encoding:"application/json",schema:{type:"object",required:["updatedCount"],properties:{updatedCount:{description:"The count of updated convos.",type:"integer"}}}}}}},ChatBskyConvoUpdateRead:{lexicon:1,id:"chat.bsky.convo.updateRead",defs:{main:{type:"procedure",description:"Updates the read state of a conversation from, optionally specifying the last read message.",errors:[{name:"InvalidConvo"}
1],input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"},messageId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyGroupAddMembers:{lexicon:1,id:"chat.bsky.group.addMembers",defs:{main:{type:"procedure",description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Adds members to a group. The members are added in 'request' status, so they have to accept it. This creates convo memberships.",errors:[{name:"AccountSuspended"},{name:"BlockedActor"},{name:"ConvoLocked"},{name:"InsufficientRole"},{name:"InvalidConvo"},{name:"MemberLimitReached"},{name:"NotFollowedBySender"},{name:"RecipientNotFound"},{name:"UserForbidsGroups"}],input:{encoding:"application/json",schema:{type:"object",required:["convoId","members"],properties:{convoId:{type:"string"},members:{type:"array",items:{type:"string",format:"did"},minLength:1}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"},addedMembers:{type:"array",items:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"}}}}}}}},ChatBskyGroupApproveJoinRequest:{lexicon:1,id:"chat.bsky.group.approveJoinRequest",defs:{main:{type:"procedure",description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Approves a request to join a group (via join link) the user owns. Action taken by the group owner.",errors:[{name:"InvalidConvo"},{name:"InsufficientRole"},{name:"MemberLimitReached"}],input:{encoding:"application/json",schema:{type:"object",required:["convoId","member"],properties:{convoId:{type:"string"},member:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyGroupCreateGroup:{lexicon:1,id:"chat.bsky.group.createGroup",defs:{main:{type:"procedure",description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Creates a group convo, specifying the members to be added to it. Unlike getConvoForMembers, this isn't idempotent. It will create new groups even if the membership is identical to pre-existing groups. Will create 'pending' membership for all members, except the owner who is 'accepted'.",errors:[{name:"AccountSuspended"},{name:"BlockedActor"},{name:"NewAccountCannotCreateGroup"},{name:"NotFollowedBySender"},{name:"RecipientNotFound"},{name:"UserForbidsGroups"}],input:{encoding:"application/json",schema:{type:"object",required:["members","name"],properties:{members:{type:"array",maxLength:49,items:{type:"string",format:"did"}},name:{type:"string",minLength:1,maxGraphemes:128,maxLength:1280}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyGroupCreateJoinLink:{lexicon:1,id:"chat.bsky.group.createJoinLink",defs:{main:{type:"procedure",description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Creates a join link for the group convo.",errors:[{name:"EnabledJoinLinkAlreadyExists"},{name:"InvalidConvo"},{name:"InsufficientRole"}],input:{encoding:"application/json",schema:{type:"object",required:["convoId","joinRule"],properties:{convoId:{type:"string"},requireApproval:{type:"boolean",default:!1},joinRule:{type:"ref",ref:"lex:chat.bsky.group.defs#joinRule"}}}},output:{encoding:"application/json",schema:{type:"object",required:["joinLink"],properties:{joinLink:{type:"ref",ref:"lex:chat.bsky.group.defs#joinLinkView"}}}}}}},ChatBskyGroupDefs:{lexicon:1,id:"chat.bsky.group.defs",description:"[NOTE: This is under active development and should be considered unstable while this note is here].",defs:{linkEnabledStatus:{type:"string",knownValues:["enabled","disabled"]},joinRule:{type:"string",knownValues:["anyone","followedByOwner"]},joinLinkView:{type:"object",required:["code","enabledStatus","requireApproval","joinRule","createdAt"],properties:{code:{type:"string"},enabledStatus:{type:"ref",ref:"lex:chat.bsky.group.defs#linkEnabledStatus"},requireApproval:{type:"boolean"},joinRule:{type:"ref",ref:"lex:chat.bsky.group.defs#joinRule"},createdAt:{type:"string",format:"datetime"}}},joinLinkPreviewView:{type:"object",required:["code","name","owner","memberCount","memberLimit","requireApproval","joinRule","enabledStatus"],properties:{code:{type:"string"},name:{type:"string"},owner:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"},memberCount:{type:"integer"},memberLimit:{type:"integer"},requireApproval:{type:"boolean"},joinRule:{type:"ref",ref:"lex:chat.bsky.group.defs#joinRule"},enabledStatus:{type:"ref",ref:"lex:chat.bsky.group.defs#linkEnabledStatus"},convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView",description:"Present only if the request is authenticated and the user is a member of the group."},viewer:{type:"ref",ref:"lex:chat.bsky.group.defs#joinLinkViewerState"}}},joinLinkViewerState:{type:"object",properties:{requestedAt:{type:"string",format:"datetime"}}},joinRequestView:{type:"object",required:["convoId","requestedBy","requestedAt"],properties:{convoId:{type:"string"},requestedBy:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"},requestedAt:{type:"string",format:"datetime"}}},joinRequestConvoView:{description:"A join request from the perspective of the requester, including enough group context to render the request in a list (e.g. group name, owner, member count).",type:"object",required:["convoId","name","owner","memberCount","memberLimit","requestedAt"],properties:{convoId:{type:"string"},name:{type:"string"},owner:{type:"ref",ref:"lex:chat.bsky.actor.defs#profileViewBasic"},memberCount:{type:"integer"},memberLimit:{type:"integer"},requestedAt:{type:"string",format:"datetime"}}}}},ChatBskyGroupDisableJoinLink:{lexicon:1,id:"chat.bsky.group.disableJoinLink",defs:{main:{type:"procedure",description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Disables the active join link for the group convo.",errors:[{name:"InvalidConvo"},{name:"InsufficientRole"},{name:"NoJoinLink"}
1],input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["joinLink"],properties:{joinLink:{type:"ref",ref:"lex:chat.bsky.group.defs#joinLinkView"}}}}}}},ChatBskyGroupEditGroup:{lexicon:1,id:"chat.bsky.group.editGroup",defs:{main:{type:"procedure",description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Edits group settings.",errors:[{name:"ConvoLocked"},{name:"InvalidConvo"},{name:"InsufficientRole"}],input:{encoding:"application/json",schema:{type:"object",required:["convoId","name"],properties:{convoId:{type:"string"},name:{type:"string",minLength:1,maxGraphemes:128,maxLength:1280}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyGroupEditJoinLink:{lexicon:1,id:"chat.bsky.group.editJoinLink",defs:{main:{type:"procedure",description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Edits the existing join link settings for the group convo.",errors:[{name:"InvalidConvo"},{name:"InsufficientRole"},{name:"NoJoinLink"}],input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"},requireApproval:{type:"boolean"},joinRule:{type:"ref",ref:"lex:chat.bsky.group.defs#joinRule"}}}},output:{encoding:"application/json",schema:{type:"object",required:["joinLink"],properties:{joinLink:{type:"ref",ref:"lex:chat.bsky.group.defs#joinLinkView"}}}}}}},ChatBskyGroupEnableJoinLink:{lexicon:1,id:"chat.bsky.group.enableJoinLink",defs:{main:{type:"procedure",description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Re-enables a previously disabled join link for the group convo.",errors:[{name:"InvalidConvo"},{name:"InsufficientRole"},{name:"NoJoinLink"},{name:"LinkAlreadyEnabled"}],input:{encoding:"application/json",schema:{type:"object",required:["convoId"],properties:{convoId:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["joinLink"],properties:{joinLink:{type:"ref",ref:"lex:chat.bsky.group.defs#joinLinkView"}}}}}}},ChatBskyGroupGetJoinLinkPreviews:{lexicon:1,id:"chat.bsky.group.getJoinLinkPreviews",defs:{main:{type:"query",description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Get public information about groups from join links. Invalid or disabled codes are silently omitted from results.",parameters:{type:"params",required:["codes"],properties:{codes:{type:"array",minLength:1,maxLength:50,items:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["joinLinkPreviews"],properties:{joinLinkPreviews:{type:"array",items:{type:"ref",ref:"lex:chat.bsky.group.defs#joinLinkPreviewView"}}}}}}}},ChatBskyGroupListJoinRequests:{lexicon:1,id:"chat.bsky.group.listJoinRequests",defs:{main:{type:"query",description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Lists a page of request to join a group (via join link) the user owns. Shows the data from the owner's point of view.",errors:[{name:"InvalidConvo"},{name:"InsufficientRole"}],parameters:{type:"params",required:["convoId"],properties:{convoId:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["requests"],properties:{cursor:{type:"string"},requests:{type:"array",items:{type:"ref",ref:"lex:chat.bsky.group.defs#joinRequestView"}}}}}}}},ChatBskyGroupListMutualGroups:{lexicon:1,id:"chat.bsky.group.listMutualGroups",defs:{main:{type:"query",description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Returns a page of group conversations that both the requester and the specified actor are members of.",parameters:{type:"params",required:["subject"],properties:{subject:{type:"string",format:"did"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["convos"],properties:{cursor:{type:"string"},convos:{type:"array",items:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}}},ChatBskyGroupRejectJoinRequest:{lexicon:1,id:"chat.bsky.group.rejectJoinRequest",defs:{main:{type:"procedure",description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Rejects a request to join a group (via join link) the user owns. Action taken by the group owner.",errors:[{name:"InvalidConvo"},{name:"InsufficientRole"}
1],input:{encoding:"application/json",schema:{type:"object",required:["convoId","member"],properties:{convoId:{type:"string"},member:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:[],properties:{}}}}}},ChatBskyGroupRemoveMembers:{lexicon:1,id:"chat.bsky.group.removeMembers",defs:{main:{type:"procedure",description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Removes members from a group. This deletes convo memberships, doesn't just set a status.",errors:[{name:"InvalidConvo"},{name:"InsufficientRole"}],input:{encoding:"application/json",schema:{type:"object",required:["convoId","members"],properties:{convoId:{type:"string"},members:{type:"array",items:{type:"string",format:"did"},minLength:1}}}},output:{encoding:"application/json",schema:{type:"object",required:["convo"],properties:{convo:{type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyGroupRequestJoin:{lexicon:1,id:"chat.bsky.group.requestJoin",defs:{main:{type:"procedure",description:"[NOTE: This is under active development and should be considered unstable while this note is here]. Sends a request to join a group (via join link) to the group owner. Action taken by the prospective group member.",errors:[{name:"ConvoLocked"},{name:"FollowRequired"},{name:"InvalidCode"},{name:"LinkDisabled"},{name:"MemberLimitReached"},{name:"UserKicked"}],input:{encoding:"application/json",schema:{type:"object",required:["code"],properties:{code:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["status"],properties:{status:{type:"string",knownValues:["joined","pending"]},convo:{description:"The group convo joined. This is only present in the case of status=joined",type:"ref",ref:"lex:chat.bsky.convo.defs#convoView"}}}}}}},ChatBskyModerationGetActorMetadata:{lexicon:1,id:"chat.bsky.moderation.getActorMetadata",defs:{main:{type:"query",parameters:{type:"params",required:["actor"],properties:{actor:{type:"string",format:"did"}}},output:{encoding:"application/json",schema:{type:"object",required:["day","month","all"],properties:{day:{type:"ref",ref:"lex:chat.bsky.moderation.getActorMetadata#metadata"},month:{type:"ref",ref:"lex:chat.bsky.moderation.getActorMetadata#metadata"},all:{type:"ref",ref:"lex:chat.bsky.moderation.getActorMetadata#metadata"}}}}},metadata:{type:"object",required:["messagesSent","messagesReceived","convos","convosStarted"],properties:{messagesSent:{type:"integer"},messagesReceived:{type:"integer"},convos:{type:"integer"},convosStarted:{type:"integer"}}}}},ChatBskyModerationGetMessageContext:{lexicon:1,id:"chat.bsky.moderation.getMessageContext",defs:{main:{type:"query",parameters:{type:"params",required:["messageId"],properties:{convoId:{type:"string",description:"Conversation that the message is from. NOTE: this field will eventually be required."},messageId:{type:"string"},before:{type:"integer",default:5,description:"Number of user messages before the target to include. System messages between the earliest returned user message and the target are also included, capped per gap by `maxInterleavedSystemMessages`. If there are no user messages before the target, up to `maxInterleavedSystemMessages` system messages immediately preceding the target are returned instead."},after:{type:"integer",default:5,description:"Number of user messages after the target to include. System messages between the target and the latest returned user message are also included, capped per gap by `maxInterleavedSystemMessages`. If there are no user messages after the target, up to `maxInterleavedSystemMessages` system messages immediately following the target are returned instead."},maxInterleavedSystemMessages:{type:"integer",default:10,minimum:0,maximum:1e3,description:"Maximum number of system messages to include per gap between consecutive returned messages (and per side when there are no user messages on that side). Within a gap, the system messages closest to the earlier message are kept."}}},output:{encoding:"application/json",schema:{type:"object",required:["messages"],properties:{messages:{type:"array",items:{type:"union",refs:["lex:chat.bsky.convo.defs#messageView","lex:chat.bsky.convo.defs#systemMessageView"]}}}}}}}},ChatBskyModerationSubscribeModEvents:{lexicon:1,id:"chat.bsky.moderation.subscribeModEvents",defs:{main:{type:"subscription",description:"Subscribe to stream of chat events targeted to moderation. Private endpoint.",parameters:{type:"params",properties:{cursor:{type:"string",description:"The last known event seq number to backfill from. Use '2222222222222' to backfill from the beginning. Don't specify a cursor to listen only for new events."}}},message:{schema:{type:"union",refs:["lex:chat.bsky.moderation.subscribeModEvents#eventConvoFirstMessage","lex:chat.bsky.moderation.subscribeModEvents#eventGroupChatCreated","lex:chat.bsky.moderation.subscribeModEvents#eventGroupChatMemberAdded","lex:chat.bsky.moderation.subscribeModEvents#eventGroupChatMemberJoined","lex:chat.bsky.moderation.subscribeModEvents#eventGroupChatJoinRequest","lex:chat.bsky.moderation.subscribeModEvents#eventGroupChatJoinRequestApproved","lex:chat.bsky.moderation.subscribeModEvents#eventGroupChatJoinRequestRejected","lex:chat.bsky.moderation.subscribeModEvents#eventChatAccepted","lex:chat.bsky.moderation.subscribeModEvents#eventGroupChatMemberLeft","lex:chat.bsky.moderation.subscribeModEvents#eventGroupChatUpdated"]}},errors:[{name:"FutureCursor"},{name:"ConsumerTooSlow",description:"If the consumer of the stream can not keep up with events, and a backlog gets too large, the server will drop the connection."}]},eventConvoFirstMessage:{type:"object",description:"Fired when the first message was sent on a convo.",required:["createdAt","rev","convoId","user","recipients"],properties:{convoId:{type:"string"},createdAt:{type:"string",format:"datetime"},messageId:{type:"string"},recipients:{description:"The list of DIDs message recipients. Does not include the sender, which is in the `user` field",type:"array",items:{type:"string",format:"did"}},rev:{type:"string"},user:{description:"The DID of the message author.",type:"string",format:"did"}}},eventGroupChatCreated:{type:"object",description:"Fire when a group chat is created.",required:["actorDid","convoCreatedAt","convoId","createdAt","groupMemberCount","groupName","initialMemberDids","ownerDid","rev"],properties:{actorDid:{description:"The DID of the actor performing the action. For this event, same as ownerDid.",type:"string",format:"did"},convoCreatedAt:{description:"When the group was originally created.",type:"string",format:"datetime"},convoId:{type:"string"},createdAt:{type:"string",format:"datetime"},groupMemberCount:{description:"Current member count at the time of the event.",type:"integer"},groupName:{description:"The name set at creation time.",type:"string"},initialMemberDids:{description:"DIDs of everyone added at creation time.",type:"array",items:{type:"string",format:"did"}},ownerDid:{description:"The DID of the group chat owner.",type:"string",format:"did"},rev:{type:"string"}}},eventGroupChatMemberAdded:{type:"object",description:"Fired when a member is added to a group chat. Note that members are added in the 'request' state.",required:["actorDid","convoCreatedAt","convoId","createdAt","groupMemberCount","groupName","ownerDid","requestMembersCount","rev","subjectDid","subjectFollowsOwner"],properties:{actorDid:{description:"The DID of the actor performing the action. For this event, same as ownerDid.",type:"string",format:"did"},convoCreatedAt:{description:"When the group was originally created.",type:"string",format:"datetime"},convoId:{type:"string"},createdAt:{type:"string",format:"datetime"},groupMemberCount:{description:"Current member count at the time of the event.",type:"integer"},groupName:{type:"string"},ownerDid:{description:"The DID of the group chat owner.",type:"string",format:"did"},requestMembersCount:{description:"The number of members who have not yet accepted the convo.",type:"integer"},rev:{type:"string"},subjectDid:{description:"The DID of the member who was added.",type:"string",format:"did"},subjectFollowsOwner:{description:"Whether the added member follows the group owner.",type:"boolean"}}},eventGroupChatMemberJoined:{type:"object",description:"Fired when a member joins a group chat via an join link that does not require approval.",required:["actorDid","convoCreatedAt","convoId","createdAt","groupMemberCount","groupName","joinLinkCode","ownerDid","rev","subjectFollowsOwner"],properties:{actorDid:{description:"The DID of the person joining.",type:"string",format:"did"},convoCreatedAt:{description:"When the group was originally created.",type:"string",format:"datetime"},convoId:{type:"string"},createdAt:{type:"string",format:"datetime"},groupMemberCount:{description:"Current member count at the time of the event.",type:"integer"},groupName:{type:"string"},joinLinkCode:{description:"The code of the join link used to join.",type:"string"},ownerDid:{description:"The DID of the group chat owner.",type:"string",format:"did"},rev:{type:"string"},subjectFollowsOwner:{description:"Whether the joining member follows the group owner.",type:"boolean"}}},eventGroupChatJoinRequest:{type:"object",description:"Fired when a user requests to join a group chat via an join link that requires approval.",required:["actorDid","convoCreatedAt","convoId","createdAt","groupMemberCount","groupName","joinLinkCode","ownerDid","rev","subjectFollowsOwner"],properties:{actorDid:{description:"The DID of the person requesting to join.",type:"string",format:"did"},convoCreatedAt:{description:"When the group was originally created.",type:"string",format:"datetime"},convoId:{type:"string"},createdAt:{type:"string",format:"datetime"},groupMemberCount:{description:"Current member count at the time of the event.",type:"integer"},groupName:{type:"string"},joinLinkCode:{description:"The code of the join link used to request joining.",type:"string"},ownerDid:{description:"The DID of the group chat owner.",type:"string",format:"did"},rev:{type:"string"},subjectFollowsOwner:{description:"Whether the requesting member follows the group owner.",type:"boolean"}}},eventGroupChatJoinRequestApproved:{type:"object",description:"Fired when a join request is approved by the group owner.",required:["actorDid","convoCreatedAt","convoId","createdAt","groupMemberCount","groupName","ownerDid","rev","subjectDid"],properties:{actorDid:{description:"The DID of the owner approving the request.",type:"string",format:"did"},convoCreatedAt:{description:"When the group was originally created.",type:"string",format:"datetime"},convoId:{type:"string"},createdAt:{type:"string",format:"datetime"},groupMemberCount:{description:"Current member count at the time of the event.",type:"integer"},groupName:{type:"string"},ownerDid:{description:"The DID of the group chat owner.",type:"string",format:"did"},rev:{type:"string"},subjectDid:{description:"The DID of the member whose request was approved.",type:"string",format:"did"}}},eventGroupChatJoinRequestRejected:{type:"object",description:"Fired when a join request is rejected by the group owner.",required:["actorDid","convoCreatedAt","convoId","createdAt","groupMemberCount","groupName","ownerDid","rev","subjectDid"],properties:{actorDid:{description:"The DID of the owner rejecting the request.",type:"string",format:"did"},convoCreatedAt:{description:"When the group was originally created.",type:"string",format:"datetime"},convoId:{type:"string"},createdAt:{type:"string",format:"datetime"},groupMemberCount:{description:"Current member count at the time of the event.",type:"integer"},groupName:{type:"string"},ownerDid:{description:"The DID of the group chat owner.",type:"string",format:"did"},rev:{type:"string"},subjectDid:{description:"The DID of the member whose request was rejected.",type:"string",format:"did"}}},eventChatAccepted:{type:"object",description:"Fired when a user accepts a chat convo, either explicitly or by sending a message.",required:["actorDid","convoCreatedAt","convoId","createdAt","method","rev"],properties:{actorDid:{description:"The DID of the person accepting the convo.",type:"string",format:"did"},convoCreatedAt:{description:"When the convo was originally created.",type:"string",format:"datetime"},convoId:{type:"string"},createdAt:{type:"string",format:"datetime"},groupMemberCount:{description:"Current member count at the time of the event. Only present for group convos.",type:"integer"},groupName:{description:"The name of the group chat. Only present for group convos.",type:"string"},method:{description:"How the convo was accepted.",type:"string",knownValues:["explicit","message"]},ownerDid:{description:"The DID of the group chat owner. Only present for group convos.",type:"string",format:"did"},rev:{type:"string"}}},eventGroupChatMemberLeft:{type:"object",description:"Fired when a member leaves or is removed from a group chat.",required:["actorDid","convoCreatedAt","convoId","createdAt","groupMemberCount","groupName","leaveMethod","ownerDid","rev","subjectDid"],properties:{actorDid:{description:"The DID of the actor. For voluntary: the person leaving. For kicked: the owner.",type:"string",format:"did"},convoCreatedAt:{description:"When the group was originally created.",type:"string",format:"datetime"},convoId:{type:"string"},createdAt:{type:"string",format:"datetime"},groupMemberCount:{description:"Current member count at the time of the event.",type:"integer"},groupName:{type:"string"},leaveMethod:{description:"How the member left.",type:"string",knownValues:["voluntary","kicked"]},ownerDid:{description:"The DID of the group chat owner.",type:"string",format:"did"},rev:{type:"string"},subjectDid:{description:"The DID of the member who left or was removed.",type:"string",format:"did"}}},eventGroupChatUpdated:{type:"object",description:"Fired when a group chat's metadata or status changes.",required:["actorDid","convoCreatedAt","convoId","createdAt","groupMemberCount","groupName","ownerDid","rev","updateType"],properties:{actorDid:{description:"The DID of the actor performing the action (the owner).",type:"string",format:"did"},convoCreatedAt:{description:"When the group was originally created.",type:"string",format:"datetime"},convoId:{type:"string"},createdAt:{type:"string",format:"datetime"},groupMemberCount:{description:"Current member count at the time of the event.",type:"integer"},groupName:{description:"Current group name.",type:"string"},joinLinkCode:{description:"The code of the join link. Only present when updateType is join-link-related.",type:"string"}
1,joinLinkFollowersOnly:{description:"Whether the join link is restricted to followers of the owner. Only present when updateType is join-link-related.",type:"boolean"},joinLinkRequiresApproval:{description:"Whether the join link requires owner approval to join. Only present when updateType is join-link-related.",type:"boolean"},lockReason:{description:"Why the group was locked. Only present when updateType is 'locked'.",type:"string",knownValues:["owner_action","owner_left","owner_deactivated","owner_deleted","owner_suspended","owner_taken_down","label_applied"]},newName:{description:"The new group name. Only present when updateType is 'name_changed'.",type:"string"},oldName:{description:"The previous group name. Only present when updateType is 'name_changed'.",type:"string"},ownerDid:{description:"The DID of the group chat owner.",type:"string",format:"did"},rev:{type:"string"},updateType:{description:"What changed.",type:"string",knownValues:["name_changed","locked","locked_permanently","unlocked","join_link_created","join_link_disabled","join_link_settings_changed"]}}}}},ChatBskyModerationUpdateActorAccess:{lexicon:1,id:"chat.bsky.moderation.updateActorAccess",defs:{main:{type:"procedure",input:{encoding:"application/json",schema:{type:"object",required:["actor","allowAccess"],properties:{actor:{type:"string",format:"did"},allowAccess:{type:"boolean"},ref:{type:"string"}}}}}}},ComAtprotoAdminDefs:{lexicon:1,id:"com.atproto.admin.defs",defs:{statusAttr:{type:"object",required:["applied"],properties:{applied:{type:"boolean"},ref:{type:"string"}}},accountView:{type:"object",required:["did","handle","indexedAt"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},email:{type:"string"},relatedRecords:{type:"array",items:{type:"unknown"}},indexedAt:{type:"string",format:"datetime"},invitedBy:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"},invites:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}},invitesDisabled:{type:"boolean"},emailConfirmedAt:{type:"string",format:"datetime"},inviteNote:{type:"string"},deactivatedAt:{type:"string",format:"datetime"},threatSignatures:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#threatSignature"}}}},repoRef:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},repoBlobRef:{type:"object",required:["did","cid"],properties:{did:{type:"string",format:"did"},cid:{type:"string",format:"cid"},recordUri:{type:"string",format:"at-uri"}}},threatSignature:{type:"object",required:["property","value"],properties:{property:{type:"string"},value:{type:"string"}}}}},ComAtprotoAdminDeleteAccount:{lexicon:1,id:"com.atproto.admin.deleteAccount",defs:{main:{type:"procedure",description:"Delete a user account as an administrator.",input:{encoding:"application/json",schema:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}}}}}},ComAtprotoAdminDisableAccountInvites:{lexicon:1,id:"com.atproto.admin.disableAccountInvites",defs:{main:{type:"procedure",description:"Disable an account from receiving new invite codes, but does not invalidate existing codes.",input:{encoding:"application/json",schema:{type:"object",required:["account"],properties:{account:{type:"string",format:"did"},note:{type:"string",description:"Optional reason for disabled invites."}}}}}}},ComAtprotoAdminDisableInviteCodes:{lexicon:1,id:"com.atproto.admin.disableInviteCodes",defs:{main:{type:"procedure",description:"Disable some set of codes and/or all codes associated with a set of users.",input:{encoding:"application/json",schema:{type:"object",properties:{codes:{type:"array",items:{type:"string"}},accounts:{type:"array",items:{type:"string"}}}}}}}},ComAtprotoAdminEnableAccountInvites:{lexicon:1,id:"com.atproto.admin.enableAccountInvites",defs:{main:{type:"procedure",description:"Re-enable an account's ability to receive invite codes.",input:{encoding:"application/json",schema:{type:"object",required:["account"],properties:{account:{type:"string",format:"did"},note:{type:"string",description:"Optional reason for enabled invites."}}}}}}},ComAtprotoAdminGetAccountInfo:{lexicon:1,id:"com.atproto.admin.getAccountInfo",defs:{main:{type:"query",description:"Get details about an account.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"}}}}},ComAtprotoAdminGetAccountInfos:{lexicon:1,id:"com.atproto.admin.getAccountInfos",defs:{main:{type:"query",description:"Get details about some accounts.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["infos"],properties:{infos:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"}}}}}}}},ComAtprotoAdminGetInviteCodes:{lexicon:1,id:"com.atproto.admin.getInviteCodes",defs:{main:{type:"query",description:"Get an admin view of invite codes.",parameters:{type:"params",properties:{sort:{type:"string",knownValues:["recent","usage"],default:"recent"},limit:{type:"integer",minimum:1,maximum:500,default:100},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["codes"],properties:{cursor:{type:"string"},codes:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}}}}}}}},ComAtprotoAdminGetSubjectStatus:{lexicon:1,id:"com.atproto.admin.getSubjectStatus",defs:{main:{type:"query",description:"Get the service-specific admin status of a subject (account, record, or blob).",parameters:{type:"params",properties:{did:{type:"string",format:"did"},uri:{type:"string",format:"at-uri"},blob:{type:"string",format:"cid"}}},output:{encoding:"application/json",schema:{type:"object",required:["subject"],properties:{subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:com.atproto.admin.defs#repoBlobRef"]},takedown:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"},deactivated:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"}}}}}}},ComAtprotoAdminSearchAccounts:{lexicon:1,id:"com.atproto.admin.searchAccounts",defs:{main:{type:"query",description:"Get list of accounts that matches your search query.",parameters:{type:"params",properties:{email:{type:"string"},cursor:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["accounts"],properties:{cursor:{type:"string"},accounts:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"}}}}}}}},ComAtprotoAdminSendEmail:{lexicon:1,id:"com.atproto.admin.sendEmail",defs:{main:{type:"procedure",description:"Send email to a user's account email address.",input:{encoding:"application/json",schema:{type:"object",required:["recipientDid","content","senderDid"],properties:{recipientDid:{type:"string",format:"did"},content:{type:"string"},subject:{type:"string"},senderDid:{type:"string",format:"did"},comment:{type:"string",description:"Additional comment by the sender that won't be used in the email itself but helpful to provide more context for moderators/reviewers"}}}},output:{encoding:"application/json",schema:{type:"object",required:["sent"],properties:{sent:{type:"boolean"}}}}}}}
1,ComAtprotoAdminUpdateAccountEmail:{lexicon:1,id:"com.atproto.admin.updateAccountEmail",defs:{main:{type:"procedure",description:"Administrative action to update an account's email.",input:{encoding:"application/json",schema:{type:"object",required:["account","email"],properties:{account:{type:"string",format:"at-identifier",description:"The handle or DID of the repo."},email:{type:"string"}}}}}}},ComAtprotoAdminUpdateAccountHandle:{lexicon:1,id:"com.atproto.admin.updateAccountHandle",defs:{main:{type:"procedure",description:"Administrative action to update an account's handle.",input:{encoding:"application/json",schema:{type:"object",required:["did","handle"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"}}}}}}},ComAtprotoAdminUpdateAccountPassword:{lexicon:1,id:"com.atproto.admin.updateAccountPassword",defs:{main:{type:"procedure",description:"Update the password for a user account as an administrator.",input:{encoding:"application/json",schema:{type:"object",required:["did","password"],properties:{did:{type:"string",format:"did"},password:{type:"string"}}}}}}},ComAtprotoAdminUpdateAccountSigningKey:{lexicon:1,id:"com.atproto.admin.updateAccountSigningKey",defs:{main:{type:"procedure",description:"Administrative action to update an account's signing key in their Did document.",input:{encoding:"application/json",schema:{type:"object",required:["did","signingKey"],properties:{did:{type:"string",format:"did"},signingKey:{type:"string",format:"did",description:"Did-key formatted public key"}}}}}}},ComAtprotoAdminUpdateSubjectStatus:{lexicon:1,id:"com.atproto.admin.updateSubjectStatus",defs:{main:{type:"procedure",description:"Update the service-specific admin status of a subject (account, record, or blob).",input:{encoding:"application/json",schema:{type:"object",required:["subject"],properties:{subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:com.atproto.admin.defs#repoBlobRef"]},takedown:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"},deactivated:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"}}}},output:{encoding:"application/json",schema:{type:"object",required:["subject"],properties:{subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:com.atproto.admin.defs#repoBlobRef"]},takedown:{type:"ref",ref:"lex:com.atproto.admin.defs#statusAttr"}}}}}}},ComAtprotoIdentityDefs:{lexicon:1,id:"com.atproto.identity.defs",defs:{identityInfo:{type:"object",required:["did","handle","didDoc"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle",description:"The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document."},didDoc:{type:"unknown",description:"The complete DID document for the identity."}}}}},ComAtprotoIdentityGetRecommendedDidCredentials:{lexicon:1,id:"com.atproto.identity.getRecommendedDidCredentials",defs:{main:{type:"query",description:"Describe the credentials that should be included in the DID doc of an account that is migrating to this service.",output:{encoding:"application/json",schema:{type:"object",properties:{rotationKeys:{description:"Recommended rotation keys for PLC dids. Should be undefined (or ignored) for did:webs.",type:"array",items:{type:"string"}},alsoKnownAs:{type:"array",items:{type:"string"}},verificationMethods:{type:"unknown"},services:{type:"unknown"}}}}}}},ComAtprotoIdentityRefreshIdentity:{lexicon:1,id:"com.atproto.identity.refreshIdentity",defs:{main:{type:"procedure",description:"Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server.",input:{encoding:"application/json",schema:{type:"object",required:["identifier"],properties:{identifier:{type:"string",format:"at-identifier"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:com.atproto.identity.defs#identityInfo"}},errors:[{name:"HandleNotFound",description:"The resolution process confirmed that the handle does not resolve to any DID."},{name:"DidNotFound",description:"The DID resolution process confirmed that there is no current DID."},{name:"DidDeactivated",description:"The DID previously existed, but has been deactivated."}]}}},ComAtprotoIdentityRequestPlcOperationSignature:{lexicon:1,id:"com.atproto.identity.requestPlcOperationSignature",defs:{main:{type:"procedure",description:"Request an email with a code to in order to request a signed PLC operation. Requires Auth."}}},ComAtprotoIdentityResolveDid:{lexicon:1,id:"com.atproto.identity.resolveDid",defs:{main:{type:"query",description:"Resolves DID to DID document. Does not bi-directionally verify handle.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"DID to resolve."}}},output:{encoding:"application/json",schema:{type:"object",required:["didDoc"],properties:{didDoc:{type:"unknown",de
1scription:"The complete DID document for the identity."}}}},errors:[{name:"DidNotFound",description:"The DID resolution process confirmed that there is no current DID."},{name:"DidDeactivated",description:"The DID previously existed, but has been deactivated."}]}}},ComAtprotoIdentityResolveHandle:{lexicon:1,id:"com.atproto.identity.resolveHandle",defs:{main:{type:"query",description:"Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document.",parameters:{type:"params",required:["handle"],properties:{handle:{type:"string",format:"handle",description:"The handle to resolve."}}},output:{encoding:"application/json",schema:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}}},errors:[{name:"HandleNotFound",description:"The resolution process confirmed that the handle does not resolve to any DID."}]}}},ComAtprotoIdentityResolveIdentity:{lexicon:1,id:"com.atproto.identity.resolveIdentity",defs:{main:{type:"query",description:"Resolves an identity (DID or Handle) to a full identity (DID document and verified handle).",parameters:{type:"params",required:["identifier"],properties:{identifier:{type:"string",format:"at-identifier",description:"Handle or DID to resolve."}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:com.atproto.identity.defs#identityInfo"}},errors:[{name:"HandleNotFound",description:"The resolution process confirmed that the handle does not resolve to any DID."},{name:"DidNotFound",description:"The DID resolution process confirmed that there is no current DID."},{name:"DidDeactivated",description:"The DID previously existed, but has been deactivated."}]}}},ComAtprotoIdentitySignPlcOperation:{lexicon:1,id:"com.atproto.identity.signPlcOperation",defs:{main:{type:"procedure",description:"Signs a PLC operation to update some value(s) in the requesting DID's document.",input:{encoding:"application/json",schema:{type:"object",properties:{token:{description:"A token received through com.atproto.identity.requestPlcOperationSignature",type:"string"},rotationKeys:{type:"array",items:{type:"string"}},alsoKnownAs:{type:"array",items:{type:"string"}},verificationMethods:{type:"unknown"},services:{type:"unknown"}}}},output:{encoding:"application/json",schema:{type:"object",required:["operation"],properties:{operation:{type:"unknown",description:"A signed DID PLC operation."}}}}}}},ComAtprotoIdentitySubmitPlcOperation:{lexicon:1,id:"com.atproto.identity.submitPlcOperation",defs:{main:{type:"procedure",description:"Validates a PLC operation to ensure that it doesn't violate a service's constraints or get the identity into a bad state, then submits it to the PLC registry",input:{encoding:"application/json",schema:{type:"object",required:["operation"],properties:{operation:{type:"unknown"}}}}}}},ComAtprotoIdentityUpdateHandle:{lexicon:1,id:"com.atproto.identity.updateHandle",defs:{main:{type:"procedure",description:"Updates the current account's handle. Verifies handle validity, and updates did:plc document if necessary. Implemented by PDS, and requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["handle"],properties:{handle:{type:"string",format:"handle",description:"The new handle."}}}}}}},ComAtprotoLabelDefs:{lexicon:1,id:"com.atproto.label.defs",defs:{label:{type:"object",description:"Metadata tag on an atproto resource (eg, repo or record).",required:["src","uri","val","cts"],properties:{ver:{type:"integer",description:"The AT Protocol version of the label object."},src:{type:"string",format:"did",description:"DID of the actor who created this label."},uri:{type:"string",format:"uri",description:"AT URI of the record, repository (account), or other resource that this label applies to."},cid:{type:"string",format:"cid",description:"Optionally, CID specifying the specific version of 'uri' resource this label applies to."},val:{type:"string",maxLength:128,description:"The short string name of the value or type of this label."},neg:{type:"boolean",description:"If true, this is a negation label, overwriting a previous label."},cts:{type:"string",format:"datetime",description:"Timestamp when this label was created."},exp:{type:"string",format:"datetime",description:"Timestamp at which this label expires (no longer applies)."},sig:{type:"bytes",description:"Signature of dag-cbor encoded label."}}},selfLabels:{type:"object",description:"Metadata tags on an atproto record, published by the author within the record.",required:["values"],properties:{values:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#selfL
1abel"},maxLength:10}}},selfLabel:{type:"object",description:"Metadata tag on an atproto record, published by the author within the record. Note that schemas should use #selfLabels, not #selfLabel.",required:["val"],properties:{val:{type:"string",maxLength:128,description:"The short string name of the value or type of this label."}}},labelValueDefinition:{type:"object",description:"Declares a label value and its expected interpretations and behaviors.",required:["identifier","severity","blurs","locales"],properties:{identifier:{type:"string",description:"The value of the label being defined. Must only include lowercase ascii and the '-' character ([a-z-]+).",maxLength:100,maxGraphemes:100},severity:{type:"string",description:"How should a client visually convey this label? 'inform' means neutral and informational; 'alert' means negative and warning; 'none' means show nothing.",knownValues:["inform","alert","none"]},blurs:{type:"string",description:"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.",knownValues:["content","media","none"]},defaultSetting:{type:"string",description:"The default setting for this label.",knownValues:["ignore","warn","hide"],default:"warn"},adultOnly:{type:"boolean",description:"Does the user need to have adult content enabled in order to configure this label?"},locales:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#labelValueDefinitionStrings"}}}},labelValueDefinitionStrings:{type:"object",description:"Strings which describe the label in the UI, localized into a specific language.",required:["lang","name","description"],properties:{lang:{type:"string",description:"The code of the language these strings are written in.",format:"language"},name:{type:"string",description:"A short human-readable name for the label.",maxGraphemes:64,maxLength:640},description:{type:"string",description:"A longer description of what the label means and why it might be applied.",maxGraphemes:1e4,maxLength:1e5}}},labelValue:{type:"string",knownValues:["!hide","!warn","!no-unauthenticated","porn","sexual","nudity","graphic-media","bot"]}}},ComAtprotoLabelQueryLabels:{lexicon:1,id:"com.atproto.label.queryLabels",defs:{main:{type:"query",description:"Find labels relevant to the provided AT-URI patterns. Public endpoint for moderation services, though may return different or additional results with auth.",parameters:{type:"params",required:["uriPatterns"],properties:{uriPatterns:{type:"array",items:{type:"string"},description:"List of AT URI patterns to match (boolean 'OR'). Each may be a prefix (ending with '*'; will match inclusive of the string leading to '*'), or a full URI."},sources:{type:"array",items:{type:"string",format:"did"},description:"Optional list of label sources (DIDs) to filter on."},limit:{type:"integer",minimum:1,maximum:250,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["labels"],properties:{cursor:{type:"string"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}}}}}},ComAtprotoLabelSubscribeLabels:{lexicon:1,id:"com.atproto.label.subscribeLabels",defs:{main:{type:"subscription",description:"Subscribe to stream of labels (and negations). Public endpoint implemented by mod services. Uses same sequencing scheme as repo event stream.",parameters:{type:"params",properties:{cursor:{type:"integer",description:"The last known event seq number to backfill from."}}},message:{schema:{type:"union",refs:["lex:com.atproto.label.subscribeLabels#labels","lex:com.atproto.label.subscribeLabels#info"]}},errors:[{name:"FutureCursor"}]},labels:{type:"object",required:["seq","labels"],properties:{seq:{type:"integer"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}},info:{type:"object",required:["name"],properties:{name:{type:"string",knownValues:["OutdatedCursor"]},message:{type:"string"}}}}},ComAtprotoLexiconResolveLexicon:{lexicon:1,id:"com.atproto.lexicon.resolveLexicon",defs:{main:{type:"query",description:"Resolves an atproto lexicon (NSID) to a 
1schema.",parameters:{type:"params",properties:{nsid:{format:"nsid",type:"string",description:"The lexicon NSID to resolve."}},required:["nsid"]},output:{encoding:"application/json",schema:{type:"object",properties:{cid:{type:"string",format:"cid",description:"The CID of the lexicon schema record."},schema:{type:"ref",ref:"lex:com.atproto.lexicon.schema#main",description:"The resolved lexicon schema record."},uri:{type:"string",format:"at-uri",description:"The AT-URI of the lexicon schema record."}},required:["uri","cid","schema"]}},errors:[{description:"No lexicon was resolved for the NSID.",name:"LexiconNotFound"}]}}},ComAtprotoLexiconSchema:{lexicon:1,id:"com.atproto.lexicon.schema",defs:{main:{type:"record",description:"Representation of Lexicon schemas themselves, when published as atproto records. Note that the schema language is not defined in Lexicon; this meta schema currently only includes a single version field ('lexicon'). See the atproto specifications for description of the other expected top-level fields ('id', 'defs', etc).",key:"nsid",record:{type:"object",required:["lexicon"],properties:{lexicon:{type:"integer",description:"Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system."}}}}}},ComAtprotoModerationCreateReport:{lexicon:1,id:"com.atproto.moderation.createReport",defs:{main:{type:"procedure",description:"Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["reasonType","subject"],properties:{reasonType:{type:"ref",description:"Indicates the broad category of violation the report is for.",ref:"lex:com.atproto.moderation.defs#reasonType"},reason:{type:"string",maxGraphemes:2e3,maxLength:2e4,description:"Additional context about the content and violation."},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef"]},modTool:{type:"ref",ref:"lex:com.atproto.moderation.createReport#modTool"}}}},output:{encoding:"application/json",schema:{type:"object",required:["id","reasonType","subject","reportedBy","createdAt"],properties:{id:{type:"integer"},reasonType:{type:"ref",ref:"lex:com.atproto.moderation.defs#reasonType"},reason:{type:"string",maxGraphemes:2e3,maxLength:2e4},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef"]},reportedBy:{type:"string",format:"did"},createdAt:{type:"string",format:"datetime"}}}}},modTool:{type:"object",description:"Moderation tool information for tracing the source of the action",required:["name"],properties:{name:{type:"string",description:"Name/identifier of the source (e.g., 'bsky-app/android', 'bsky-web/chrome')"},meta:{type:"unknown",description:"Additional arbitrary metadata about the source"}}}}},ComAtprotoModerationDefs:{lexicon:1,id:"com.atproto.moderation.defs",defs:{reasonType:{type:"string",knownValues:["com.atproto.moderation.defs#reasonSpam","com.atproto.moderation.defs#reasonViolation","com.atproto.moderation.defs#reasonMisleading","com.atproto.moderation.defs#reasonSexual","com.atproto.moderation.defs#reasonRude","com.atproto.moderation.defs#reasonOther","com.atproto.moderation.defs#reasonAppeal","tools.ozone.report.defs#reasonAppeal","tools.ozone.report.defs#reasonOther","tools.ozone.report.defs#reasonViolenceAnimal","tools.ozone.report.defs#reasonViolenceThreats","tools.ozone.report.defs#reasonViolenceGraphicContent","tools.ozone.report.defs#reasonViolenceGlorification","tools.ozone.report.defs#reasonViolenceExtremistContent","tools.ozone.report.defs#reasonViolenceTrafficking","tools.ozone.report.defs#reasonViolenceOther","tools.ozone.report.defs#reasonSexualAbuseContent","tools.ozone.report.defs#reasonSexualNCII","tools.ozone.report.defs#reasonSexualDeepfake","tools.ozone.report.defs#reasonSexualAnimal","tools.ozone.report.defs#reasonSexualUnlabeled","tools.ozone.report.defs#reasonSexualOther","tools.ozone.report.defs#reasonChildSafetyCSAM","tools.ozone.report.defs#reasonChildSafetyGroom","tools.ozone.report.defs#reasonChildSafetyPrivacy","tools.ozone.report.defs#reasonChildSafetyHarassment","tools.ozone.report.defs#reasonChildSafetyOther","tools.ozone.report.defs#reasonHarassmentTroll","tools.ozone.report.defs#reasonHarassmentTargeted","tools.ozone.report.defs#reasonHarassmentHateSpeech","tools.ozone.report.defs#reasonHarassmentDoxxing","tools.ozone.report.defs#reasonHarassmentOther","tools.ozone.report.defs#reasonMisleadingBot","tools.ozone.report.defs#reasonMisleadingImpersonation","tools.ozone.report.defs#reasonMisleadingSpam","tools.ozone.report.defs#reasonMisleadingScam","tools.ozone.report.defs#reasonMisleadingElections","tools.ozone.report.defs#reasonMisleadingOther","tools.ozone.report.defs#reasonRuleSiteSecurity","tools.ozone.report.defs#reasonRuleProhibitedSales","tools.ozone.report.defs#reasonRuleBanEvasion","tools.ozone.report.defs#reasonRuleOther","tools.ozone.report.defs#reasonSelfHarmContent","tools.ozone.report.defs#reasonSelfHarmED","tools.ozone.report.defs#reasonSelfHarmStunts","tools.ozone.report.defs#reasonSelfHarmSubstances","tools.ozone.report.defs#reasonSelfHarmOther"]}
1,reasonSpam:{type:"token",description:"Spam: frequent unwanted promotion, replies, mentions. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingSpam`."},reasonViolation:{type:"token",description:"Direct violation of server rules, laws, terms of service. Prefer new lexicon definition `tools.ozone.report.defs#reasonRuleOther`."},reasonMisleading:{type:"token",description:"Misleading identity, affiliation, or content. Prefer new lexicon definition `tools.ozone.report.defs#reasonMisleadingOther`."},reasonSexual:{type:"token",description:"Unwanted or mislabeled sexual content. Prefer new lexicon definition `tools.ozone.report.defs#reasonSexualUnlabeled`."},reasonRude:{type:"token",description:"Rude, harassing, explicit, or otherwise unwelcoming behavior. Prefer new lexicon definition `tools.ozone.report.defs#reasonHarassmentOther`."},reasonOther:{type:"token",description:"Reports not falling under another report category. Prefer new lexicon definition `tools.ozone.report.defs#reasonOther`."},reasonAppeal:{type:"token",description:"Appeal a previously taken moderation action"},subjectType:{type:"string",description:"Tag describing a type of subject that might be reported.",knownValues:["account","record","chat"]}}},ComAtprotoRepoApplyWrites:{lexicon:1,id:"com.atproto.repo.applyWrites",defs:{main:{type:"procedure",description:"Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["repo","writes"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo (aka, current account)."},validate:{type:"boolean",description:"Can be set to 'false' to skip Lexicon schema validation of record data across all operations, 'true' to require it, or leave unset to validate only for known Lexicons."},writes:{type:"array",items:{type:"union",refs:["lex:com.atproto.repo.applyWrites#create","lex:com.atproto.repo.applyWrites#update","lex:com.atproto.repo.applyWrites#delete"],closed:!0}},swapCommit:{type:"string",description:"If provided, the entire operation will fail if the current repo commit CID does not match this value. Used to prevent conflicting repo mutations.",format:"cid"}}}},output:{encoding:"application/json",schema:{type:"object",required:[],properties:{commit:{type:"ref",ref:"lex:com.atproto.repo.defs#commitMeta"},results:{type:"array",items:{type:"union",refs:["lex:com.atproto.repo.applyWrites#createResult","lex:com.atproto.repo.applyWrites#updateResult","lex:com.atproto.repo.applyWrites#deleteResult"],closed:!0}}}}},errors:[{name:"InvalidSwap",description:"Indicates that the 'swapCommit' parameter did not match current commit."}]},create:{type:"object",description:"Operation which creates a new record.",required:["collection","value"],properties:{collection:{type:"string",format:"nsid"},rkey:{type:"string",maxLength:512,format:"record-key",description:"NOTE: maxLength is redundant with record-key format. Keeping it temporarily to ensure backwards compatibility."},value:{type:"unknown"}}},update:{type:"object",description:"Operation which updates an existing record.",required:["collection","rkey","value"],properties:{collection:{type:"string",format:"nsid"},rkey:{type:"string",format:"record-key"},value:{type:"unknown"}}},delete:{type:"object",description:"Operation which deletes an existing record.",required:["collection","rkey"],properties:{collection:{type:"string",format:"nsid"},rkey:{type:"string",format:"record-key"}}},createResult:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},validationStatus:{type:"string",knownValues:["valid","unknown"]}}},updateResult:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},validationStatus:{type:"string",knownValues:["valid","unknown"]}}},deleteResult:{type:"object",required:[],properties:{}}}},ComAtprotoRepoCreateRecord:{lexicon:1,id:"com.atproto.repo.createRecord",defs:{main:{type:"procedure",description:"Create a single new repository record. Requires auth, implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["repo","collection","record"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo (aka, current account)."},collection:{type:"string",format:"nsid",description:"The NSID of the record collection."},rkey:{type:"string",format:"record-key",description:"The Record Key.",maxLength:512},validate:{type:"boolean",description:"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."}
1,record:{type:"unknown",description:"The record itself. Must contain a $type field."},swapCommit:{type:"string",format:"cid",description:"Compare and swap with the previous commit by CID."}}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},commit:{type:"ref",ref:"lex:com.atproto.repo.defs#commitMeta"},validationStatus:{type:"string",knownValues:["valid","unknown"]}}}},errors:[{name:"InvalidSwap",description:"Indicates that 'swapCommit' didn't match current repo commit."}]}}},ComAtprotoRepoDefs:{lexicon:1,id:"com.atproto.repo.defs",defs:{commitMeta:{type:"object",required:["cid","rev"],properties:{cid:{type:"string",format:"cid"},rev:{type:"string",format:"tid"}}}}},ComAtprotoRepoDeleteRecord:{lexicon:1,id:"com.atproto.repo.deleteRecord",defs:{main:{type:"procedure",description:"Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["repo","collection","rkey"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo (aka, current account)."},collection:{type:"string",format:"nsid",description:"The NSID of the record collection."},rkey:{type:"string",format:"record-key",description:"The Record Key."},swapRecord:{type:"string",format:"cid",description:"Compare and swap with the previous record by CID."},swapCommit:{type:"string",format:"cid",description:"Compare and swap with the previous commit by CID."}}}},output:{encoding:"application/json",schema:{type:"object",properties:{commit:{type:"ref",ref:"lex:com.atproto.repo.defs#commitMeta"}}}},errors:[{name:"InvalidSwap"}]}}},ComAtprotoRepoDescribeRepo:{lexicon:1,id:"com.atproto.repo.describeRepo",defs:{main:{type:"query",description:"Get information about an account and repository, including the list of collections. Does not require auth.",parameters:{type:"params",required:["repo"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo."}}},output:{encoding:"application/json",schema:{type:"object",required:["handle","did","didDoc","collections","handleIsCorrect"],properties:{handle:{type:"string",format:"handle"},did:{type:"string",format:"did"},didDoc:{type:"unknown",description:"The complete DID document for this account."},collections:{type:"array",description:"List of all the collections (NSIDs) for which this repo contains at least one record.",items:{type:"string",format:"nsid"}},handleIsCorrect:{type:"boolean",description:"Indicates if handle is currently valid (resolves bi-directionally)"}}}}}}},ComAtprotoRepoGetRecord:{lexicon:1,id:"com.atproto.repo.getRecord",defs:{main:{type:"query",description:"Get a single record from a repository. Does not require auth.",parameters:{type:"params",required:["repo","collection","rkey"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo."},collection:{type:"string",format:"nsid",description:"The NSID of the record collection."},rkey:{type:"string",description:"The Record Key.",format:"record-key"},cid:{type:"string",format:"cid",description:"The CID of the version of the record. If not specified, then return the most recent version."}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","value"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},value:{type:"unknown"}}}},errors:[{name:"RecordNotFound"}]}}},ComAtprotoRepoImportRepo:{lexicon:1,id:"com.atproto.repo.importRepo",defs:{main:{type:"procedure",description:"Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set.",input:{encoding:"application/vnd.ipld.car"}}}},ComAtprotoRepoListMissingBlobs:{lexicon:1,id:"com.atproto.repo.listMissingBlobs",defs:{main:{type:"query",description:"Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:1e3,default:500},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["blobs"],properties:{cursor:{type:"string"},blobs:{type:"array",items:{type:"ref",ref:"lex:com.atproto.repo.listMissingBlobs#recordBlob"}}}}}},recordBlob:{type:"object",required:["cid","recordUri"],properties:{cid:{type:"string",format:"cid"},recordUri:{type:"string",format:"at-uri"}}}}},ComAtprotoRepoListRecords:{lexicon:1,id:"com.atproto.repo.listRecords",defs:{main:{type:"query",description:"List a range of records in a repository, matching a specific collection. Does not require auth.",parameters:{type:"params",required:["repo","collection"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo."},collection:{type:"string",format:"nsid",description:"The NSID of the record type."},limit:{type:"integer",minimum:1,maximum:100,default:50,description:"The number of records to return."},cursor:{type:"string"},reverse:{type:"boolean",description:"Flag to reverse the order of the returned records."}}},output:{encoding:"application/json",schema:{type:"object",required:["records"],properties:{cursor:{type:"string"},records:{type:"array",items:{type:"ref",ref:"lex:com.atproto.repo.listRecords#record"}}}}}},record:{type:"object",required:["uri","cid","value"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},value:{type:"unknown"}}}}},ComAtprotoRepoPutRecord:{lexicon:1,id:"com.atproto.repo.putRecord",defs:{main:{type:"procedure",description:"Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["repo","collection","rkey","record"],nullable:["swapRecord"],properties:{repo:{type:"string",format:"at-identifier",description:"The handle or DID of the repo (aka, current account)."},collection:{type:"string",format:"nsid",description:"The NSID of the record collection."},rkey:{type:"string",format:"record-key",description:"The Record Key.",maxLength:512},validate:{type:"boolean",description:"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."}
1,record:{type:"unknown",description:"The record to write."},swapRecord:{type:"string",format:"cid",description:"Compare and swap with the previous record by CID. WARNING: nullable and optional field; may cause problems with golang implementation"},swapCommit:{type:"string",format:"cid",description:"Compare and swap with the previous commit by CID."}}}},output:{encoding:"application/json",schema:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},commit:{type:"ref",ref:"lex:com.atproto.repo.defs#commitMeta"},validationStatus:{type:"string",knownValues:["valid","unknown"]}}}},errors:[{name:"InvalidSwap"}]}}},ComAtprotoRepoStrongRef:{lexicon:1,id:"com.atproto.repo.strongRef",description:"A URI with a content-hash fingerprint.",defs:{main:{type:"object",required:["uri","cid"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"}}}}},ComAtprotoRepoUploadBlob:{lexicon:1,id:"com.atproto.repo.uploadBlob",defs:{main:{type:"procedure",description:"Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.",input:{encoding:"*/*"},output:{encoding:"application/json",schema:{type:"object",required:["blob"],properties:{blob:{type:"blob"}}}}}}},ComAtprotoServerActivateAccount:{lexicon:1,id:"com.atproto.server.activateAccount",defs:{main:{type:"procedure",description:"Activates a currently deactivated account. Used to finalize account migration after the account's repo is imported and identity is setup."}}},ComAtprotoServerCheckAccountStatus:{lexicon:1,id:"com.atproto.server.checkAccountStatus",defs:{main:{type:"query",description:"Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself.",output:{encoding:"application/json",schema:{type:"object",required:["activated","validDid","repoCommit","repoRev","repoBlocks","indexedRecords","privateStateValues","expectedBlobs","importedBlobs"],properties:{activated:{type:"boolean"},validDid:{type:"boolean"},repoCommit:{type:"string",format:"cid"},repoRev:{type:"string"},repoBlocks:{type:"integer"},indexedRecords:{type:"integer"},privateStateValues:{type:"integer"},expectedBlobs:{type:"integer"},importedBlobs:{type:"integer"}}}}}}},ComAtprotoServerConfirmEmail:{lexicon:1,id:"com.atproto.server.confirmEmail",defs:{main:{type:"procedure",description:"Confirm an email using a token from com.atproto.server.requestEmailConfirmation.",input:{encoding:"application/json",schema:{type:"object",required:["email","token"],properties:{email:{type:"string"},token:{type:"string"}}}},errors:[{name:"AccountNotFound"},{name:"ExpiredToken"},{name:"InvalidToken"},{name:"InvalidEmail"}]}}},ComAtprotoServerCreateAccount:{lexicon:1,id:"com.atproto.server.createAccount",defs:{main:{type:"procedure",description:"Create an account. Implemented by PDS.",input:{encoding:"application/json",schema:{type:"object",required:["handle"],properties:{email:{type:"string"},handle:{type:"string",format:"handle",description:"Requested handle for the account."},did:{type:"string",format:"did",description:"Pre-existing atproto DID, being imported to a new account."},inviteCode:{type:"string"},verificationCode:{type:"string"},verificationPhone:{type:"string"},password:{type:"string",description:"Initial account password. May need to meet instance-specific password strength requirements."},recoveryKey:{type:"string",description:"DID PLC rotation key (aka, recovery key) to be included in PLC creation operation."},plcOp:{type:"unknown",description:"A signed DID PLC operation to be submitted as part of importing an existing account to this instance. NOTE: this optional field may be updated when full account migration is implemented."}}}},output:{encoding:"application/json",schema:{type:"object",description:"Account login session returned on successful account creation.",required:["accessJwt","refreshJwt","handle","did"],properties:{accessJwt:{type:"string"},refreshJwt:{type:"string"},handle:{type:"string",format:"handle"},did:{type:"string",format:"did",description:"The DID of the new account."}
1,didDoc:{type:"unknown",description:"Complete DID document."}}}},errors:[{name:"InvalidHandle"},{name:"InvalidPassword"},{name:"InvalidInviteCode"},{name:"HandleNotAvailable"},{name:"UnsupportedDomain"},{name:"UnresolvableDid"},{name:"IncompatibleDidDoc"}]}}},ComAtprotoServerCreateAppPassword:{lexicon:1,id:"com.atproto.server.createAppPassword",defs:{main:{type:"procedure",description:"Create an App Password.",input:{encoding:"application/json",schema:{type:"object",required:["name"],properties:{name:{type:"string",description:"A short name for the App Password, to help distinguish them."},privileged:{type:"boolean",description:"If an app password has 'privileged' access to possibly sensitive account state. Meant for use with trusted clients."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:com.atproto.server.createAppPassword#appPassword"}},errors:[{name:"AccountTakedown"}]},appPassword:{type:"object",required:["name","password","createdAt"],properties:{name:{type:"string"},password:{type:"string"},createdAt:{type:"string",format:"datetime"},privileged:{type:"boolean"}}}}},ComAtprotoServerCreateInviteCode:{lexicon:1,id:"com.atproto.server.createInviteCode",defs:{main:{type:"procedure",description:"Create an invite code.",input:{encoding:"application/json",schema:{type:"object",required:["useCount"],properties:{useCount:{type:"integer"},forAccount:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["code"],properties:{code:{type:"string"}}}}}}},ComAtprotoServerCreateInviteCodes:{lexicon:1,id:"com.atproto.server.createInviteCodes",defs:{main:{type:"procedure",description:"Create invite codes.",input:{encoding:"application/json",schema:{type:"object",required:["codeCount","useCount"],properties:{codeCount:{type:"integer",default:1},useCount:{type:"integer"},forAccounts:{type:"array",items:{type:"string",format:"did"}}}}},output:{encoding:"application/json",schema:{type:"object",required:["codes"],properties:{codes:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.createInviteCodes#accountCodes"}}}}}},accountCodes:{type:"object",required:["account","codes"],properties:{account:{type:"string"},codes:{type:"array",items:{type:"string"}}}}}},ComAtprotoServerCreateSession:{lexicon:1,id:"com.atproto.server.createSession",defs:{main:{type:"procedure",description:"Create an authentication session.",input:{encoding:"application/json",schema:{type:"object",required:["identifier","password"],properties:{identifier:{type:"string",description:"Handle or other identifier supported by the server for the authenticating user."},password:{type:"string"},authFactorToken:{type:"string"},allowTakendown:{type:"boolean",description:"When true, instead of throwing error for takendown accounts, a valid response with a narrow scoped token will be returned"}}}},output:{encoding:"application/json",schema:{type:"object",required:["accessJwt","refreshJwt","handle","did"],properties:{accessJwt:{type:"string"},refreshJwt:{type:"string"},handle:{type:"string",format:"handle"},did:{type:"string",format:"did"},didDoc:{type:"unknown"},email:{type:"string"},emailConfirmed:{type:"boolean"},emailAuthFactor:{type:"boolean"},active:{type:"boolean"},status:{type:"string",description:"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.",knownValues:["takendown","suspended","deactivated"]}}}},errors:[{name:"AccountTakedown"},{name:"AuthFactorTokenRequired"}]}}},ComAtprotoServerDeactivateAccount:{lexicon:1,id:"com.atproto.server.deactivateAccount",defs:{main:{type:"procedure",description:"Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host.",input:{encoding:"application/json",schema:{type:"object",properties:{deleteAfter:{type:"string",format:"datetime",description:"A recommendation to server as to how long they should hold onto the deactivated account before deleting."}}}}}}},ComAtprotoServerDefs:{lexicon:1,id:"com.atproto.server.defs",defs:{inviteCode:{type:"object",required:["code","available","disabled","forAccount","createdBy","createdAt","uses"],properties:{code:{type:"string"},available:{type:"integer"},disabled:{type:"boolean"},forAccount:{type:"string"},createdBy:{type:"string"},createdAt:{type:"string",format:"datetime"},uses:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCodeUse"}}}},inviteCodeUse:{type:"object",required:["usedBy","usedAt"],properties:{usedBy:{type:"string",format:"did"},usedAt:{type:"string",format:"datetime"}}}}},ComAtprotoServerDeleteAccount:{lexicon:1,id:"com.atproto.server.deleteAccount",defs:{main:{type:"procedure",description:"Delete an actor's account with a token and password. Can only be called after requesting a deletion token. Requires auth.",input:{encoding:"application/json",schema:{type:"object",required:["did","password","token"],properties:{did:{type:"string",format:"did"},password:{type:"string"},token:{type:"string"}}}},errors:[{name:"ExpiredToken"},{name:"InvalidToken"}]}}},ComAtprotoServerDeleteSession:{lexicon:1,id:"com.atproto.server.deleteSession",defs:{main:{type:"procedure",description:"Delete the current session. Requires auth using the 'refreshJwt' (not the 'accessJwt').",errors:[{name:"InvalidToken"},{name:"ExpiredToken"}]}}},ComAtprotoServerDescribeServer:{lexicon:1,id:"com.atproto.server.describeServer",defs:{main:{type:"query",description:"Describes the server's account creation requirements and capabilities. Implemented by PDS.",output:{encoding:"application/json",schema:{type:"object",required:["did","availableUserDomains"],properties:{inviteCodeRequired:{type:"boolean",description:"If true, an invite code must be supplied to create an account on this instance."},phoneVerificationRequired:{type:"boolean",description:"If true, a phone verification token must be supplied to create an account on this instance."},availableUserDomains:{type:"array",description:"List of domain suffixes that can be used in account handles.",items:{type:"string"}},links:{type:"ref",description:"URLs of service policy documents.",ref:"lex:com.atproto.server.describeServer#links"},contact:{type:"ref",description:"Contact information",ref:"lex:com.atproto.server.describeServer#contact"},did:{type:"string",format:"did"}}}}},links:{type:"object",properties:{privacyPolicy:{type:"string",format:"uri"},termsOfService:{type:"string",format:"uri"}}},contact:{type:"object",properties:{email:{type:"string"}}}}},ComAtprotoServerGetAccountInviteCodes:{lexicon:1,id:"com.atproto.server.getAccountInviteCodes",defs:{main:{type:"query",description:"Get all invite codes for the current account. Requires auth.",parameters:{type:"params",properties:{includeUsed:{type:"boolean",default:!0},createAvailable:{type:"boolean",default:!0,description:"Controls whether any new 'earned' but not 'created' invites should be created."}}},output:{encoding:"application/json",schema:{type:"object",required:["codes"],properties:{codes:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}}}}},errors:[{name:"DuplicateCreate"}]}}},ComAtprotoServerGetServiceAuth:{lexicon:1,id:"com.atproto.server.getServiceAuth",defs:{main:{type:"query",description:"Get a signed token on behalf of the requesting DID for the requested service.",parameters:{type:"params",required:["aud"],properties:{aud:{type:"string",maxLength:2048,description:"The DID or `did#serviceId` reference of the service that the token will be used to authenticate with."},exp:{type:"integer",description:"The time in Unix Epoch seconds that the JWT expires. Defaults to 60 seconds 
1in the future. The service may enforce certain time bounds on tokens depending on the requested scope."},lxm:{type:"string",format:"nsid",description:"Lexicon (XRPC) method to bind the requested token to"}}},output:{encoding:"application/json",schema:{type:"object",required:["token"],properties:{token:{type:"string"}}}},errors:[{name:"BadExpiration",description:"Indicates that the requested expiration date is not a valid. May be in the past or may be reliant on the requested scopes."}]}}},ComAtprotoServerGetSession:{lexicon:1,id:"com.atproto.server.getSession",defs:{main:{type:"query",description:"Get information about the current auth session. Requires auth.",output:{encoding:"application/json",schema:{type:"object",required:["handle","did"],properties:{handle:{type:"string",format:"handle"},did:{type:"string",format:"did"},didDoc:{type:"unknown"},email:{type:"string"},emailConfirmed:{type:"boolean"},emailAuthFactor:{type:"boolean"},active:{type:"boolean"},status:{type:"string",description:"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.",knownValues:["takendown","suspended","deactivated"]}}}}}}},ComAtprotoServerListAppPasswords:{lexicon:1,id:"com.atproto.server.listAppPasswords",defs:{main:{type:"query",description:"List all App Passwords.",output:{encoding:"application/json",schema:{type:"object",required:["passwords"],properties:{passwords:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.listAppPasswords#appPassword"}}}}},errors:[{name:"AccountTakedown"}]},appPassword:{type:"object",required:["name","createdAt"],properties:{name:{type:"string"},createdAt:{type:"string",format:"datetime"},privileged:{type:"boolean"}}}}},ComAtprotoServerRefreshSession:{lexicon:1,id:"com.atproto.server.refreshSession",defs:{main:{type:"procedure",description:"Refresh an authentication session. Requires auth using the 'refreshJwt' (not the 'accessJwt').",output:{encoding:"application/json",schema:{type:"object",required:["accessJwt","refreshJwt","handle","did"],properties:{accessJwt:{type:"string"},refreshJwt:{type:"string"},handle:{type:"string",format:"handle"},did:{type:"string",format:"did"},didDoc:{type:"unknown"},email:{type:"string"},emailConfirmed:{type:"boolean"},emailAuthFactor:{type:"boolean"},active:{type:"boolean"},status:{type:"string",description:"Hosting status of the account. If not specified, then assume 'active'.",knownValues:["takendown","suspended","deactivated"]}}}},errors:[{name:"AccountTakedown"},{name:"InvalidToken"},{name:"ExpiredToken"}]}}},ComAtprotoServerRequestAccountDelete:{lexicon:1,id:"com.atproto.server.requestAccountDelete",defs:{main:{type:"procedure",description:"Initiate a user account deletion via email."}}},ComAtprotoServerRequestEmailConfirmation:{lexicon:1,id:"com.atproto.server.requestEmailConfirmation",defs:{main:{type:"procedure",description:"Request an email with a code to confirm ownership of email."}}},ComAtprotoServerRequestEmailUpdate:{lexicon:1,id:"com.atproto.server.requestEmailUpdate",defs:{main:{type:"procedure",description:"Request a token in order to update email.",output:{encoding:"application/json",schema:{type:"object",required:["tokenRequired"],properties:{tokenRequired:{type:"boolean"}}}}}}},ComAtprotoServerRequestPasswordReset:{lexicon:1,id:"com.atproto.server.requestPasswordReset",defs:{main:{type:"procedure",description:"Initiate a user account password reset via email.",input:{encoding:"application/json",schema:{type:"object",required:["email"],properties:{email:{type:"string"}}}}}}},ComAtprotoServerReserveSigningKey:{lexicon:1,id:"com.atproto.server.reserveSigningKey",defs:{main:{type:"procedure",description:"Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented.",input:{encoding:"application/json",schema:{type:"object",properties:{did:{type:"string",format:"did",description:"The DID to reserve a key for."}}}},output:{encoding:"application/json",schema:{type:"object",required:["signingKey"],properties:{signingKey:{type:"string",description:"The public key for the reserved signing key, in did:key serialization."}}}}}}},ComAtprotoServerResetPassword:{lexicon:1,id:"com.atproto.server.resetPassword",defs:{main:{type:"procedure",description:"Reset a user account password using a token.",input:{encoding:"application/json",schema:{type:"object",required:["token","password"],properties:{token:{type:"string"},password:{type:"string"}}}},errors:[{name:"ExpiredToken"},{name:"InvalidToken"}]}}},ComAtprotoServerRevokeAppPassword:{lexicon:1,id:"com.atproto.server.revokeAppPassword",defs:{main:{type:"procedure",description:"Revoke an App Password by n
1ame.",input:{encoding:"application/json",schema:{type:"object",required:["name"],properties:{name:{type:"string"}}}}}}},ComAtprotoServerUpdateEmail:{lexicon:1,id:"com.atproto.server.updateEmail",defs:{main:{type:"procedure",description:"Update an account's email.",input:{encoding:"application/json",schema:{type:"object",required:["email"],properties:{email:{type:"string"},emailAuthFactor:{type:"boolean"},token:{type:"string",description:"Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed."}}}},errors:[{name:"ExpiredToken"},{name:"InvalidToken"},{name:"TokenRequired"}]}}},ComAtprotoSyncDefs:{lexicon:1,id:"com.atproto.sync.defs",defs:{hostStatus:{type:"string",knownValues:["active","idle","offline","throttled","banned"]}}},ComAtprotoSyncGetBlob:{lexicon:1,id:"com.atproto.sync.getBlob",defs:{main:{type:"query",description:"Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS.",parameters:{type:"params",required:["did","cid"],properties:{did:{type:"string",format:"did",description:"The DID of the account."},cid:{type:"string",format:"cid",description:"The CID of the blob to fetch"}}},output:{encoding:"*/*"},errors:[{name:"BlobNotFound"},{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetBlocks:{lexicon:1,id:"com.atproto.sync.getBlocks",defs:{main:{type:"query",description:"Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS.",parameters:{type:"params",required:["did","cids"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."},cids:{type:"array",items:{type:"string",format:"cid"}}}},output:{encoding:"application/vnd.ipld.car"},errors:[{name:"BlockNotFound"},{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetCheckout:{lexicon:1,id:"com.atproto.sync.getCheckout",defs:{main:{type:"query",description:"DEPRECATED - please use com.atproto.sync.getRepo instead",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."}}},output:{encoding:"application/vnd.ipld.car"}}}},ComAtprotoSyncGetHead:{lexicon:1,id:"com.atproto.sync.getHead",defs:{main:{type:"query",description:"DEPRECATED - please use com.atproto.sync.getLatestCommit instead",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."}}},output:{encoding:"application/json",schema:{type:"object",required:["root"],properties:{root:{type:"string",format:"cid"}}}},errors:[{name:"HeadNotFound"}]}}},ComAtprotoSyncGetHostStatus:{lexicon:1,id:"com.atproto.sync.getHostStatus",defs:{main:{type:"query",description:"Returns information about a specified upstream host, as consumed by the server. Implemented by relays.",parameters:{type:"params",required:["hostname"],properties:{hostname:{type:"string",description:"Hostname of the host (eg, PDS or relay) being queried."}}},output:{encoding:"application/json",schema:{type:"object",required:["hostname"],properties:{hostname:{type:"string"},seq:{type:"integer",description:"Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor)."},accountCount:{type:"integer",description:"Number of accounts on the server which are associated with the upstream host. Note that the upstream may actually have more accounts."},status:{type:"ref",ref:"lex:com.atproto.sync.defs#hostStatus"}}}},errors:[{name:"HostNotFound"}]}}},ComAtprotoSyncGetLatestCommit:{lexicon:1,id:"com.atproto.sync.getLatestCommit",defs:{main:{type:"query",description:"Get the current commit CID & revision of the specified repo. Does not require auth.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."}}},output:{encoding:"application/json",schema:{type:"object",required:["cid","rev"],properties:{cid:{type:"string",format:"cid"},rev:{type:"string",format:"tid"}}}},errors:[{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetRecord:{lexicon:1,id:"com.atproto.sync.getRecord",defs:{main:{type:"query",description:"Get data blocks needed to prove the existence or non-existence of record 
1in the current version of repo. Does not require auth.",parameters:{type:"params",required:["did","collection","rkey"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."},collection:{type:"string",format:"nsid"},rkey:{type:"string",description:"Record Key",format:"record-key"}}},output:{encoding:"application/vnd.ipld.car"},errors:[{name:"RecordNotFound"},{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetRepo:{lexicon:1,id:"com.atproto.sync.getRepo",defs:{main:{type:"query",description:"Download a repository export as CAR file. Optionally only a 'diff' since a previous revision. Does not require auth; implemented by PDS.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."},since:{type:"string",format:"tid",description:"The revision ('rev') of the repo to create a diff from."}}},output:{encoding:"application/vnd.ipld.car"},errors:[{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncGetRepoStatus:{lexicon:1,id:"com.atproto.sync.getRepoStatus",defs:{main:{type:"query",description:"Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."}}},output:{encoding:"application/json",schema:{type:"object",required:["did","active"],properties:{did:{type:"string",format:"did"},active:{type:"boolean"},status:{type:"string",description:"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.",knownValues:["takendown","suspended","deleted","deactivated","desynchronized","throttled"]},rev:{type:"string",format:"tid",description:"Optional field, the current rev of the repo, if active=true"}}}},errors:[{name:"RepoNotFound"}]}}},ComAtprotoSyncListBlobs:{lexicon:1,id:"com.atproto.sync.listBlobs",defs:{main:{type:"query",description:"List blob CIDs for an account, since some repo revision. Does not require auth; implemented by PDS.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did",description:"The DID of the repo."},since:{type:"string",format:"tid",description:"Optional revision of the repo to list blobs since."},limit:{type:"integer",minimum:1,maximum:1e3,default:500},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["cids"],properties:{cursor:{type:"string"},cids:{type:"array",items:{type:"string",format:"cid"}}}}},errors:[{name:"RepoNotFound"},{name:"RepoTakendown"},{name:"RepoSuspended"},{name:"RepoDeactivated"}]}}},ComAtprotoSyncListHosts:{lexicon:1,id:"com.atproto.sync.listHosts",defs:{main:{type:"query",description:"Enumerates upstream hosts (eg, PDS or relay instances) that this service consumes from. Implemented by relays.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:1e3,default:200},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["hosts"],properties:{cursor:{type:"string"},hosts:{type:"array",items:{type:"ref",ref:"lex:com.atproto.sync.listHosts#host"},description:"Sort order is not formally specified. Recommended order is by time host was first seen by the server, with oldest first."}}}}},host:{type:"object",required:["hostname"],properties:{hostname:{type:"string",description:"hostname of server; not a URL (no scheme)"},seq:{type:"integer",description:"Recent repo stream event sequence number. May be delayed from actual stream processing (eg, persisted cursor not in-memory cursor)."},accountCount:{type:"integer"},status:{type:"ref",ref:"lex:com.atproto.sync.defs#hostStatus"}}}}},ComAtprotoSyncListRepos:{lexicon:1,id:"com.atproto.sync.listRepos",defs:{main:{type:"query",description:"Enumerates all the DID, rev, and commit CID for all repos hosted by this 
1service. Does not require auth; implemented by PDS and Relay.",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:1e3,default:500},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["repos"],properties:{cursor:{type:"string"},repos:{type:"array",items:{type:"ref",ref:"lex:com.atproto.sync.listRepos#repo"}}}}}},repo:{type:"object",required:["did","head","rev"],properties:{did:{type:"string",format:"did"},head:{type:"string",format:"cid",description:"Current repo commit CID"},rev:{type:"string",format:"tid"},active:{type:"boolean"},status:{type:"string",description:"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.",knownValues:["takendown","suspended","deleted","deactivated","desynchronized","throttled"]}}}}},ComAtprotoSyncListReposByCollection:{lexicon:1,id:"com.atproto.sync.listReposByCollection",defs:{main:{type:"query",description:"Enumerates all the DIDs which have records with the given collection NSID.",parameters:{type:"params",required:["collection"],properties:{collection:{type:"string",format:"nsid"},limit:{type:"integer",description:"Maximum size of response set. Recommend setting a large maximum (1000+) when enumerating large DID lists.",minimum:1,maximum:2e3,default:500},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["repos"],properties:{cursor:{type:"string"},repos:{type:"array",items:{type:"ref",ref:"lex:com.atproto.sync.listReposByCollection#repo"}}}}}},repo:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}}}},ComAtprotoSyncNotifyOfUpdate:{lexicon:1,id:"com.atproto.sync.notifyOfUpdate",defs:{main:{type:"procedure",description:"Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay. DEPRECATED: just use com.atproto.sync.requestCrawl",input:{encoding:"application/json",schema:{type:"object",required:["hostname"],properties:{hostname:{type:"string",description:"Hostname of the current service (usually a PDS) that is notifying of update."}}}}}}},ComAtprotoSyncRequestCrawl:{lexicon:1,id:"com.atproto.sync.requestCrawl",defs:{main:{type:"procedure",description:"Request a service to persistently crawl hosted repos. Expected use is new PDS instances declaring their existence to Relays. Does not require auth.",input:{encoding:"application/json",schema:{type:"object",required:["hostname"],properties:{hostname:{type:"string",description:"Hostname of the current service (eg, PDS) that is requesting to be crawled."}}}},errors:[{name:"HostBanned"}]}}},ComAtprotoSyncSubscribeRepos:{lexicon:1,id:"com.atproto.sync.subscribeRepos",defs:{main:{type:"subscription",description:"Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does not require auth; implemented by PDS and Relay.",parameters:{type:"params",properties:{cursor:{type:"integer",description:"The last known event seq number to backfill from."}}},message:{schema:{type:"union",refs:["lex:com.atproto.sync.subscribeRepos#commit","lex:com.atproto.sync.subscribeRepos#sync","lex:com.atproto.sync.subscribeRepos#identity","lex:com.atproto.sync.subscribeRepos#account","lex:com.atproto.sync.subscribeRepos#info"]}},errors:[{name:"FutureCursor"},{name:"ConsumerTooSlow",description:"If the consumer of the stream can not keep up with events, and a backlog gets too large, the server will drop the connection."}]},commit:{type:"object",description:"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.",required:["seq","rebase","tooBig","repo","commit","rev","since","blocks","ops","blobs","time"],nullable:["since"],properties:{seq:{type:"integer",description:"The stream sequence number of this message."},rebase:{type:"boolean",description:"DEPRECATED -- unused"},tooBig:{type:"boolean",description:"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."},repo:{type:"string",format:"did",description:"The repo this event comes from. Note that all other message types name this field 'did'."},commit:{type:"cid-link",description:"Repo commit object CID."},rev:{type:"string",format:"tid",description:"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."},since:{type:"string",format:"tid",description:"The rev of the last emitted commit from this repo (if any)."},blocks:{type:"bytes",description:"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.",maxLength:2e6},ops:{type:"array",items:{type:"ref",ref:"lex:com.atproto.sync.subscribeRepos#repoOp",description:"List of repo mutation operations in this commit (eg, records created, updated, or deleted)."},maxLength:200},blobs:{type:"array",items:{type:"cid-link",description:"DEPRECATED -- will soon always be empty. List of new blobs (by CID) referenced by records in this commit."}},prevData:{type:"cid-link",description:"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."},time:{type:"string",format:"datetime",description:"Timestamp of when this message was originally broadcast."}}},sync:{type:"object",description:"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.",required:["seq","did","blocks","rev","time"],properties:{seq:{type:"integer",description:"The stream sequence number of this message."},did:{type:"string",format:"did",description:"The account this repo event corresponds to. Must match that in the commit object."},blocks:{type:"bytes",description:"CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'.",maxLength:1e4},rev:{type:"string",description:"The rev of the commit. This value must match that in the commit object."},time:{type:"string",format:"datetime",description:"Timestamp of when this message was originally broadcast."}}},identity:{type:"object",description:"Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache.",required:["seq","did","time"],properties:{seq:{type:"integer"},did:{type:"string",format:"did"},time:{type:"string",format:"datetime"},handle:{type:"string",format:"handle",description:"The current handle for the account, or 'handle.invali
1d' if validation fails. This field is optional, might have been validated or passed-through from an upstream source. Semantics and behaviors for PDS vs Relay may evolve in the future; see atproto specs for more details."}}},account:{type:"object",description:"Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active.",required:["seq","did","time","active"],properties:{seq:{type:"integer"},did:{type:"string",format:"did"},time:{type:"string",format:"datetime"},active:{type:"boolean",description:"Indicates that the account has a repository which can be fetched from the host that emitted this event."},status:{type:"string",description:"If active=false, this optional field indicates a reason for why the account is not active.",knownValues:["takendown","suspended","deleted","deactivated","desynchronized","throttled"]}}},info:{type:"object",required:["name"],properties:{name:{type:"string",knownValues:["OutdatedCursor"]},message:{type:"string"}}},repoOp:{type:"object",description:"A repo operation, ie a mutation of a single record.",required:["action","path","cid"],nullable:["cid"],properties:{action:{type:"string",knownValues:["create","update","delete"]},path:{type:"string"},cid:{type:"cid-link",description:"For creates and updates, the new record CID. For deletions, null."},prev:{type:"cid-link",description:"For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined."}}}}},ComAtprotoTempAddReservedHandle:{lexicon:1,id:"com.atproto.temp.addReservedHandle",defs:{main:{type:"procedure",description:"Add a handle to the set of reserved handles.",input:{encoding:"application/json",schema:{type:"object",required:["handle"],properties:{handle:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},ComAtprotoTempCheckHandleAvailability:{lexicon:1,id:"com.atproto.temp.checkHandleAvailability",defs:{main:{type:"query",description:"Checks whether the provided handle is available. If the handle is not available, available suggestions will be returned. Optional inputs will be used to generate suggestions.",parameters:{type:"params",required:["handle"],properties:{handle:{type:"string",format:"handle",description:"Tentative handle. Will be checked for availability or used to build handle suggestions."},email:{type:"string",description:"User-provided email. Might be used to build handle suggestions."},birthDate:{type:"string",format:"datetime",description:"User-provided birth date. Might be used to build handle suggestions."}}},output:{encoding:"application/json",schema:{type:"object",required:["handle","result"],properties:{handle:{type:"string",format:"handle",description:"Echo of the input handle."},result:{type:"union",refs:["lex:com.atproto.temp.checkHandleAvailability#resultAvailable","lex:com.atproto.temp.checkHandleAvailability#resultUnavailable"]}}}},errors:[{name:"InvalidEmail",description:"An invalid email was provided."}]},resultAvailable:{type:"object",description:"Indicates the provided handle is available.",properties:{}},resultUnavailable:{type:"object",description:"Indicates the provided handle is unavailable and gives suggestions of available handles.",required:["suggestions"],properties:{suggestions:{type:"array",description:"List of suggested handles based on the provided inputs.",items:{type:"ref",ref:"lex:com.atproto.temp.checkHandleAvailability#suggestion"}}}},suggestion:{type:"object",required:["handle","method"],properties:{handle:{type:"string",format:"handle"},method:{type:"string",description:"Method used to build this suggestion. Should be considered opaque to clients. Can be used for metrics."}}}}},ComAtprotoTempCheckSignupQueue:{lexicon:1,id:"com.atproto.temp.checkSignupQueue",defs:{main:{type:"query",description:"Check accounts location in signup queue.",output:{encoding:"application/json",schema:{type:"object",required:["activated"],properties:{activated:{type:"boolean"},placeInQueue:{type:"integer"},estimatedTimeMs:{type:"integer"}}}}}}},ComAtprotoTempDereferenceScope:{lexicon:1,id:"com.atproto.temp.dereferenceScope",defs:{main:{type:"query",description:"Allows finding the oauth permission scope from a reference",parameters:{type:"params",required:["scope"],properties:{scope:{type:"string",description:"The scope reference (starts with 'ref:')"}}},output:{encoding:"application/json",schema:{type:"object",required:["scope"],properties:{scope:{type:"string",description:"The full oauth permission scope"}}}},errors:[{name:"InvalidScopeReference",description:"An invalid scope reference was provided."}]}}},ComAtprotoTempFetchLabels:{lexicon:1,id:"com.atproto.temp.fetchLabels",defs:{main:{type:"query",description:"DEPRECATED: use queryLabels or subscribeLabels instead -- Fetch all labels from a labeler created after a certain date.",parameters:{type:"params",properties:{since:{type:"integer"},limit:{type:"integer",minimum:1,maximum:250,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["labels"],properties:{labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}}}}}}}},ComAtprotoTempRequestPhoneVerification:{lexicon:1,id:"com.atproto.temp.requestPhoneVerification",defs:{main:{type:"procedure",description:"Request a verification code to be sent to the supplied phone number",input:{encoding:"application/json",schema:{type:"object",required:["phoneNumber"],properties:{phoneNumber:{type:"string"}}}}}}},ComAtprotoTempRevokeAccountCredentials:{lexicon:1,id:"com.atproto.temp.revokeAccountCredentials",defs:{main:{type:"procedure",description:"Revoke sessions, password, and app passwords associated with account. May be resolved by a password reset.",input:{encoding:"application/json",schema:{type:"object",required:["account"],properties:{account:{type:"string",format:"at-identifier"}}}}}}},ComGermnetworkDeclaration:{lexicon:1,id:"com.germnetwork.declaration",defs:{main:{type:"record",description:"A declaration of a Germ Network account",key:"literal:self",record:{type:"object",required:["version","currentKey"],properties:{version:{type:"string",description:"Semver version number, without pre-release or build information, for the format of opaque content",minLength:5,maxLength:14},currentKey:{type:"bytes",description:"Opaque value, an ed25519 public key prefixed with a byte enum"},messageMe:{type:"ref",description:"Controls who can message this account",ref:"lex:com.germnetwork.declaration#messageMe"},keyPackage:{type:"bytes",description:"Opaque value, contains MLS KeyPackage(s), and other signature data, and is signed by the currentKey"},continuityProofs:{type:"array",description:"Array of opaque values to allow for key rolling",items:{type:"bytes"},maxLength:1e3}}}},messageMe:{type:"object",required:["showButtonTo","messageMeUrl"],properties:{messageMeUrl:{type:"string",description:"A URL to present to an account that does not have its own com.germnetwork.declaration record, must have an empty fragment component, where the app should fill in the fragment component with the DIDs of the two accounts who wish to message each other",format:"uri",minLength:1,maxLength:2047},showButtonTo:{type:"string",knownValues:["none","usersIFollow","everyone"],description:"The policy of who can message the account, this value is included in the keyPackage, but is duplicated here to allow applications to decide if they should show a 'Message on Germ' button to the viewer.",minLength:1,maxLength:100}}}}},ToolsOzoneCommunicationCreateTemplate:{lexicon:1,id:"tools.ozone.communication.createTemplate",defs:{main:{type:"procedure",description:"Administrative action to create a new, re-usable communication (email for now) template.",input:{encoding:"application/json",schema:{type:"object",required:["subject","contentMarkdown","name"],properties:{name:{type:"string",description:"Name of the template."}
1,contentMarkdown:{type:"string",description:"Content of the template, markdown supported, can contain variable placeholders."},subject:{type:"string",description:"Subject of the message, used in emails."},lang:{type:"string",format:"language",description:"Message language."},createdBy:{type:"string",format:"did",description:"DID of the user who is creating the template."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.communication.defs#templateView"}},errors:[{name:"DuplicateTemplateName"}]}}},ToolsOzoneCommunicationDefs:{lexicon:1,id:"tools.ozone.communication.defs",defs:{templateView:{type:"object",required:["id","name","contentMarkdown","disabled","lastUpdatedBy","createdAt","updatedAt"],properties:{id:{type:"string"},name:{type:"string",description:"Name of the template."},subject:{type:"string",description:"Content of the template, can contain markdown and variable placeholders."},contentMarkdown:{type:"string",description:"Subject of the message, used in emails."},disabled:{type:"boolean"},lang:{type:"string",format:"language",description:"Message language."},lastUpdatedBy:{type:"string",format:"did",description:"DID of the user who last updated the template."},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}},ToolsOzoneCommunicationDeleteTemplate:{lexicon:1,id:"tools.ozone.communication.deleteTemplate",defs:{main:{type:"procedure",description:"Delete a communication template.",input:{encoding:"application/json",schema:{type:"object",required:["id"],properties:{id:{type:"string"}}}}}}},ToolsOzoneCommunicationListTemplates:{lexicon:1,id:"tools.ozone.communication.listTemplates",defs:{main:{type:"query",description:"Get list of all communication templates.",output:{encoding:"application/json",schema:{type:"object",required:["communicationTemplates"],properties:{communicationTemplates:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.communication.defs#templateView"}}}}}}}},ToolsOzoneCommunicationUpdateTemplate:{lexicon:1,id:"tools.ozone.communication.updateTemplate",defs:{main:{type:"procedure",description:"Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.",input:{encoding:"application/json",schema:{type:"object",required:["id"],properties:{id:{type:"string",description:"ID of the template to be updated."},name:{type:"string",description:"Name of the template."},lang:{type:"string",format:"language",description:"Message language."},contentMarkdown:{type:"string",description:"Content of the template, markdown supported, can contain variable placeholders."},subject:{type:"string",description:"Subject of the message, used in emails."},updatedBy:{type:"string",format:"did",description:"DID of the user who is updating the template."},disabled:{type:"boolean"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.communication.defs#templateView"}},errors:[{name:"DuplicateTemplateName"}]}}},ToolsOzoneHostingGetAccountHistory:{lexicon:1,id:"tools.ozone.hosting.getAccountHistory",defs:{main:{type:"query",description:"Get account history, e.g. log of updated email addresses or other identity information.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"},events:{type:"array",items:{type:"string",knownValues:["accountCreated","emailUpdated","emailConfirmed","passwordUpdated","handleUpdated"]}},cursor:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["events"],properties:{cursor:{type:"string"},events:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.hosting.getAccountHistory#event"}}}}}},event:{type:"object",required:["details","createdBy","createdAt"],properties:{details:{type:"union",refs:["lex:tools.ozone.hosting.getAccountHistory#accountCreated","lex:tools.ozone.hosting.getAccountHistory#emailUpdated","lex:tools.ozone.hosting.getAccountHistory#emailConfirmed","lex:tools.ozone.hosting.getAccountHistory#passwordUpdated","lex:tools.ozone.hosting.getAccountHistory#handleUpdated"]},createdBy:{type:"string"},createdAt:{type:"string",format:"datetime"}}},accountCreated:{type:"object",required:[],properties:{email:{type:"string"},handle:{type:"string",format:"handle"}}},emailUpdated:{type:"object",required:["email"],properties:{email:{type:"string"}}},emailConfirmed:{type:"object",required:["email"],properties:{email:{type:"string"}}},passwordUpdated:{type:"object",required:[],properties:{}},handleUpdated:{type:"object",required:["handle"],properties:{handle:{type:"string",format:"handle"}}}}},ToolsOzoneModerationCancelScheduledActions:{lexicon:1,id:"tools.ozone.moderation.cancelScheduledActions",defs:{main:{type:"procedure",description:"Cancel all pending scheduled moderation actions for specified subjects",input:{encoding:"application/json",schema:{type:"object",required:["subjects"],properties:{subjects:{type:"array",maxLength:100,items:{type:"string",format:"did"},description:"Array of DID subjects to cancel scheduled actions for"},comment:{type:"string",description:"Optional comment describing the reason for cancellation"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.cancelScheduledActions#cancellationResults"}}},cancellationResults:{type:"object",required:["succeeded","failed"],properties:{succeeded:{type:"array",items:{type:"string",format:"did"},description:"DIDs for which all pending scheduled actions were successfully cancelled"},failed:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.cancelScheduledActions#failedCancellation"},description:"DIDs for which cancellation failed with error details"}}},failedCancellation:{type:"object",required:["did","error"],properties:{did:{type:"string",format:"did"},error:{type:"string"},errorCode:{type:"string"}}}}},ToolsOzoneModerationDefs:{lexicon:1,id:"tools.ozone.moderation.defs",defs:{modEventView:{type:"object",required:["id","event","subject","subjectBlobCids","createdBy","createdAt"],properties:{id:{type:"integer"},event:{type:"union",refs:["lex:tools.ozone.moderation.defs#modEventTakedown","lex:tools.ozone.moderation.defs#modEventReverseTakedown","lex:tools.ozone.moderation.defs#modEventComment","lex:tools.ozone.moderation.defs#modEventReport","lex:tools.ozone.moderation.defs#modEventLabel","lex:tools.ozone.moderation.defs#modEventAcknowledge","lex:tools.ozone.moderation.defs#modEventEscalate","lex:tools.ozone.moderation.defs#modEventMute","lex:tools.ozone.moderation.defs#modEventUnmute","lex:tools.ozone.moderation.defs#modEventMuteReporter","lex:tools.ozone.moderation.defs#modEventUnmuteReporter","lex:tools.ozone.moderation.defs#modEventEmail","lex:tools.ozone.moderation.defs#modEventResolveAppeal","lex:tools.ozone.moderation.defs#modEventDivert","lex:tools.ozone.moderation.defs#modEventTag","lex:tools.ozone.moderation.defs#accountEvent","lex:tools.ozone.moderation.defs#identityEvent","lex:tools.ozone.moderation.defs#recordEvent","lex:tools.ozone.moderation.defs#modEventPriorityScore","lex:tools.ozone.moderation.defs#ageAssuranceEvent","lex:tools.ozone.moderation.defs#ageAssuranceOverrideEvent","lex:tools.ozone.moderation.defs#ageAssurancePurgeEvent","lex:tools.ozone.moderation.defs#revokeAccountCredentialsEvent","lex:tools.ozone.moderation.defs#scheduleTakedownEvent","lex:tools.ozone.moderation.defs#cancelScheduledTakedownEvent"]},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:chat.bsky.convo.defs#messageRef"]},subjectBlobCids:{type:"array",items:{type:"string"}},createdBy:{type:"string",format:"did"},createdAt:{type:"string",format:"datetime"},creatorHandle:{type:"string"},subjectHandle:{type:"string"},modTool:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modTool"}}},modEventViewDetail:{type:"object",required:["id","event","subject","subjectBlobs","createdBy","createdAt"],properties:{id:{type:"integer"},event:{type:"union",refs:["lex:tools.ozone.moderation.defs#modEventTakedown","lex:tools.ozone.moderation.defs#modEventReverseTakedown","lex:tools.ozone.moderation.defs#modEventComment","lex:tools.ozone.moderation.defs#modEventReport","lex:tools.ozone.moderation.defs#modEventLabel","lex:tools.ozone.moderation.defs#modEventAcknowledge","lex:tools.ozone.moderation.defs#modEventEscalate","lex:tools.ozone.moderation.defs#modEventMute","lex:tools.ozone.moderation.defs#modEventUnmute","lex:tools.ozone.moderation.defs#modEventMuteReporter","lex:tools.ozone.moderation.defs#modEventUnmuteReporter","lex:tools.ozone.moderation.defs#modEventEmail","lex:tools.ozone.moderation.defs#modEventResolveAppeal","lex:tools.ozone.moderation.defs#modEventDivert","lex:tools.ozone.moderation.defs#modEventTag","lex:tools.ozone.moderation.defs#accountEvent","lex:tools.ozone.moderation.defs#identityEvent","lex:tools.ozone.moderation.defs#recordEvent","lex:tools.ozone.moderation.defs#modEventPriorityScore","lex:tools.ozone.moderation.defs#ageAssuranceEvent","lex:tools.ozone.moderation.defs#ageAssuranceOverrideEvent","lex:tools.ozone.moderation.defs#ageAssurancePurgeEvent","lex:tools.ozone.moderation.defs#revokeAccountCredentialsEvent","lex:tools.ozone.moderation.defs#scheduleTakedownEvent","lex:tools.ozone.moderation.defs#cancelScheduledTakedownEvent"]},subject:{type:"union",refs:["lex:tools.ozone.moderation.defs#repoView","lex:tools.ozone.moderation.defs#repoViewNotFound","lex:tools.ozone.moderation.defs#recordView","lex:tools.ozone.moderation.defs#recordViewNotFound"]},subjectBlobs:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#blobView"}},createdBy:{type:"string",format:"did"},createdAt:{type:"string",format:"datetime"},modTool:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modTool"}}},subjectStatusView:{type:"object",required:["id","subject","createdAt","updatedAt","reviewState"],properties:{id:{type:"integer"},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef","lex:chat.bsky.convo.defs#messageRef"]},hosting:{type:"union",refs:["lex:tools.ozone.moderation.defs#accountHosting","lex:tools.ozone.moderation.defs#recordHosting"]},subjectBlobCids:{type:"array",items:{type:"string",format:"cid"}},subjectRepoHandle:{type:"string"},updatedAt:{type:"string",format:"datetime",description:"Timestamp referencing when the last update was made to the moderation status of the subject"},createdAt:{type:"string",format:"datetime",description:"Timestamp referencing the first moderation status impacting event was emitted on the subject"},reviewState:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectReviewState"},comment:{type:"string",description:"Sticky comment on the subject."},priorityScore:{type:"integer",description:"Numeric value representing the level of priority. Higher score means higher priority.",minimum:0,maximum:100},muteUntil:{type:"string",format:"datetime"},muteReportingUntil:{type:"string",format:"datetime"},lastReviewedBy:{type:"string",format:"did"},lastReviewedAt:{type:"string",format:"datetime"},lastReportedAt:{type:"string",format:"datetime"},lastAppealedAt:{type:"string",format:"datetime",description:"Timestamp referencing when the author of the subject appealed a moderation action"},takendown:{type:"boolean"},appealed:{type:"boolean",description:"True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators."},suspendUntil:{type:"string",format:"datetime"},tags:{type:"array",items:{type:"string"}},accountStats:{description:"Statistics related to the account subject",type:"ref",ref:"lex:tools.ozone.moderation.defs#accountStats"},recordsStats:{description:"Statistics related to the record subjects authored by the subject's account",type:"ref",ref:"lex:tools.ozone.moderation.defs#recordsStats"},accountStrike:{description:"Strike information for the account (
1account-level only)",type:"ref",ref:"lex:tools.ozone.moderation.defs#accountStrike"},ageAssuranceState:{type:"string",description:"Current age assurance state of the subject.",knownValues:["pending","assured","unknown","reset","blocked"]},ageAssuranceUpdatedBy:{type:"string",description:"Whether or not the last successful update to age assurance was made by the user or admin.",knownValues:["admin","user"]}}},subjectView:{description:"Detailed view of a subject. For record subjects, the author's repo and profile will be returned.",type:"object",required:["type","subject"],properties:{type:{type:"ref",ref:"lex:com.atproto.moderation.defs#subjectType"},subject:{type:"string"},status:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectStatusView"},repo:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoViewDetail"},profile:{type:"union",refs:[]},record:{type:"ref",ref:"lex:tools.ozone.moderation.defs#recordViewDetail"}}},accountStats:{description:"Statistics about a particular account subject",type:"object",properties:{reportCount:{description:"Total number of reports on the account",type:"integer"},appealCount:{description:"Total number of appeals against a moderation action on the account",type:"integer"},suspendCount:{description:"Number of times the account was suspended",type:"integer"},escalateCount:{description:"Number of times the account was escalated",type:"integer"},takedownCount:{description:"Number of times the account was taken down",type:"integer"}}},recordsStats:{description:"Statistics about a set of record subject items",type:"object",properties:{totalReports:{description:"Cumulative sum of the number of reports on the items in the set",type:"integer"},reportedCount:{description:"Number of items that were reported at least once",type:"integer"},escalatedCount:{description:"Number of items that were escalated at least once",type:"integer"},appealedCount:{description:"Number of items that were appealed at least once",type:"integer"},subjectCount:{description:"Total number of item in the set",type:"integer"},pendingCount:{description:'Number of item currently in "reviewOpen" or "reviewEscalated" state',type:"integer"},processedCount:{description:'Number of item currently in "reviewNone" or "reviewClosed" state',type:"integer"},takendownCount:{description:"Number of item currently taken down",type:"integer"}}},accountStrike:{description:"Strike information for an account",type:"object",properties:{activeStrikeCount:{description:"Current number of active strikes (excluding expired strikes)",type:"integer"},totalStrikeCount:{description:"Total number of strikes ever received (including expired strikes)",type:"integer"},firstStrikeAt:{description:"Timestamp of the first strike received",type:"string",format:"datetime"},lastStrikeAt:{description:"Timestamp of the most recent strike received",type:"string",format:"datetime"}}},subjectReviewState:{type:"string",knownValues:["tools.ozone.moderation.defs#reviewOpen","tools.ozone.moderation.defs#reviewEscalated","tools.ozone.moderation.defs#reviewClosed","tools.ozone.moderation.defs#reviewNone"]},reviewOpen:{type:"token",description:"Moderator review status of a subject: Open. Indicates that the subject needs to be reviewed by a moderator"},reviewEscalated:{type:"token",description:"Moderator review status of a subject: Escalated. Indicates that the subject was escalated for review by a moderator"},reviewClosed:{type:"token",description:"Moderator review status of a subject: Closed. Indicates that the subject was already reviewed and resolved by a moderator"},reviewNone:{type:"token",description:"Moderator review status of a subject: Unnecessary. Indicates that the subject does not need a review at the moment but there is probably some moderation related metadata available for it"},modEventTakedown:{type:"object",description:"Take down a subject permanently or temporarily",properties:{comment:{type:"string"},durationInHours:{type:"integer",description:"Indicates how long the takedown should be in effect before automatically expiring."},acknowledgeAccountSubjects:{type:"boolean",description:"If true, all other reports on content authored by this account will be resolved (acknowledged)."},policies:{type:"array",maxLength:5,items:{type:"string"},description:"Names/Keywords of the policies that drove the decision."},severityLevel:{type:"string",description:"Severity level of the violation (e.g., 'sev-0', 'sev-1', 'sev-2', etc.)."},targetServices:{type:"array",items:{type:"string",knownValues:["appview","pds"]},description:"List of services where the takedown should be applied. If empty or not provided, takedown is applied on all configured services."},strikeCount:{type:"integer",description:"Number of strikes to assign to the user for this violation."},strikeExpiresAt:{type:"string",format:"datetime",description:"When the strike should expire. If not provided, the strike never expires."}}},modEventReverseTakedown:{type:"object",description:"Revert take down action on a subject",properties:{comment:{type:"string",description:"Describe reasoning behind the reversal."},policies:{type:"array",maxLength:5,items:{type:"string"},description:"Names/Keywords of the policy infraction for which takedown is being reversed."},severityLevel:{type:"string",description:"Severity level of the violation. Usually set from the last policy infraction's severity."},strikeCount:{type:"integer",description:"Number of strikes to subtract from the user's strike count. Usually set from the last policy infraction's severity."}}},modEventResolveAppeal:{type:"object",description:"Resolve appeal on a subject",properties:{comment:{type:"string",description:"Describe resolution."}}},modEventComment:{type:"object",description:"Add a comment to a subject. An empty comment will clear any previously set sticky comment.",properties:{comment:{type:"string"},sticky:{type:"boolean",description:"Make the comment persistent on the subject"}}},modEventReport:{type:"object",description:"Report a subject",required:["reportType"],properties:{comment:{type:"string"},isReporterMuted:{type:"boolean",description:"Set to true if the reporter was muted from reporting at the time of the event. These reports won't impact the reviewState of the subject."},reportType:{type:"ref",ref:"lex:com.atproto.moderation.defs#reasonType"}}},modEventLabel:{type:"object",description:"Apply/Negate labels on a subject",required:["createLabelVals","negateLabelVals"],properties:{comment:{type:"string"},createLabelVals:{type:"array",items:{type:"string"}},negateLabelVals:{type:"array",items:{type:"string"}},durationInHours:{type:"integer",description:"Indicates how long the label will remain on the subject. Only applies on labels that are being added."}}},modEventPriorityScore:{type:"object",description:"Set priority score of the subject. Higher score means higher priority.",required:["score"],properties:{comment:{type:"string"},score:{type:"integer",minimum:0,maximum:100}}},ageAssuranceEvent:{type:"object",description:"Age assurance info coming directly from users. Only works on DID subjects.",required:["createdAt","status","attemptId"],properties:{createdAt:{type:"string",format:"datetime",description:"The date and time of this write operation."},attemptId:{type:"string",description:"The unique identifier for this instance of the age assurance flow, in UUID format."},status:{type:"string",description:"The status of the Age Assurance process.",knownValues:["unknown","pending","assured"]},access:{type:"ref",ref:"lex:app.bsky.ageassurance.defs#access"},countryCode:{type:"string",description:"The ISO 3166-1 alpha-2 country code provided when beginning the Age Assurance flow."},regionCode:{type:"string",description:"The ISO 3166-2 region code provided when beginning the Age Assurance flow."},initIp:{type:"string",description:"The IP address used when initiating the AA flow."},initUa:{type:"string",description:"The user agent used when initiating the AA flow."},completeIp:{type:"string",description:"The IP address used when completing the AA flow."},completeUa:{type:"string",description:"The user agent used when completing the AA flow."}}},ageAssuranceOverrideEvent:{type:"object",description:"Age assurance status override by moderators. Only works on DID subjects.",required:["comment","status"],properties:{status:{type:"string",description:"The status to be set for the user decided by a moderator, overriding whatever value the user had previously. Use reset to default to original state.",knownValues:["assured","reset","blocked"]},access:{type:"ref",ref:"lex:app.bsky.ageassurance.defs#access"},comment:{type:"string",minLength:1,description:"Comment describing the reason for the override."}}},ageAssurancePurgeEvent:{type:"object",description:"Purges all age assurance events for the subject. Only works on DID subjects. Moderator-only.",required:["comment"],properties:{comment:{type:"string",minLength:1,description:"Comment describing the reason for the purge."}}},revokeAccountCredentialsEvent:{type:"object",description:"Account credentials revocation by moderators. Only works on DID subjects.",required:["comment"],properties:{comment:{minLength:1,type:"string",description:"Comment describing the reason for the revocation."}}},modEventAcknowledge:{type:"object",properties:{comment:{type:"string"},acknowledgeAccountSubjects:{type:"boolean",description:"If true, all other reports on content authored by this account will be resolved (acknowledged)."}}},modEventEscalate:{type:"object",properties:{comment:{type:"string"}}},modEventMute:{type:"object",description:"Mute incoming reports on a 
1subject",required:["durationInHours"],properties:{comment:{type:"string"},durationInHours:{type:"integer",description:"Indicates how long the subject should remain muted."}}},modEventUnmute:{type:"object",description:"Unmute action on a subject",properties:{comment:{type:"string",description:"Describe reasoning behind the reversal."}}},modEventMuteReporter:{type:"object",description:"Mute incoming reports from an account",properties:{comment:{type:"string"},durationInHours:{type:"integer",description:"Indicates how long the account should remain muted. Falsy value here means a permanent mute."}}},modEventUnmuteReporter:{type:"object",description:"Unmute incoming reports from an account",properties:{comment:{type:"string",description:"Describe reasoning behind the reversal."}}},modEventEmail:{type:"object",description:"Keep a log of outgoing email to a user",required:["subjectLine"],properties:{subjectLine:{type:"string",description:"The subject line of the email sent to the user."},content:{type:"string",description:"The content of the email sent to the user."},comment:{type:"string",description:"Additional comment about the outgoing comm."},policies:{type:"array",maxLength:5,items:{type:"string"},description:"Names/Keywords of the policies that necessitated the email."},severityLevel:{type:"string",description:"Severity level of the violation. Normally 'sev-1' that adds strike on repeat offense"},strikeCount:{type:"integer",description:"Number of strikes to assign to the user for this violation. Normally 0 as an indicator of a warning and only added as a strike on a repeat offense."},strikeExpiresAt:{type:"string",format:"datetime",description:"When the strike should expire. If not provided, the strike never expires."},isDelivered:{type:"boolean",description:"Indicates whether the email was successfully delivered to the user's inbox."}}},modEventDivert:{type:"object",description:"Divert a record's blobs to a 3rd party service for further scanning/tagging",properties:{comment:{type:"string"}}},modEventTag:{type:"object",description:"Add/Remove a tag on a subject",required:["add","remove"],properties:{add:{type:"array",items:{type:"string"},description:"Tags to be added to the subject. If already exists, won't be duplicated."},remove:{type:"array",items:{type:"string"},description:"Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated."},comment:{type:"string",description:"Additional comment about added/removed tags."},durationInHours:{type:"integer",description:"Indicates how long the tags being added should remain before automatically being removed. Only applies to tags being added."}}},accountEvent:{type:"object",description:"Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.",required:["timestamp","active"],properties:{comment:{type:"string"},active:{type:"boolean",description:"Indicates that the account has a repository which can be fetched from the host that emitted this event."},status:{type:"string",knownValues:["unknown","deactivated","deleted","takendown","suspended","tombstoned"]},timestamp:{type:"string",format:"datetime"}}},identityEvent:{type:"object",description:"Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.",required:["timestamp"],properties:{comment:{type:"string"},handle:{type:"string",format:"handle"},pdsHost:{type:"string",format:"uri"},tombstone:{type:"boolean"},timestamp:{type:"string",format:"datetime"}}},recordEvent:{type:"object",description:"Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.",required:["timestamp","op"],properties:{comment:{type:"string"},op:{type:"string",knownValues:["create","update","delete"]},cid:{type:"string",format:"cid"},timestamp:{type:"string",format:"datetime"}}},scheduleTakedownEvent:{type:"object",description:"Logs a scheduled takedown action for an account.",properties:{comment:{type:"string"},executeAt:{type:"string",format:"datetime"},executeAfter:{type:"string",format:"datetime"},executeUntil:{type:"string",format:"datetime"}}},cancelScheduledTakedownEvent:{type:"object",description:"Logs cancellation of a scheduled takedown action for an account.",properties:{comment:{type:"string"}}},repoView:{type:"object",required:["did","handle","relatedRecords","indexedAt","moderation"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},email:{type:"string"},relatedRecords:{type:"array",items:{type:"unknown"}},indexedAt:{type:"string",format:"datetime"},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderation"},invitedBy:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}
1,invitesDisabled:{type:"boolean"},inviteNote:{type:"string"},deactivatedAt:{type:"string",format:"datetime"},threatSignatures:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#threatSignature"}}}},repoViewDetail:{type:"object",required:["did","handle","relatedRecords","indexedAt","moderation"],properties:{did:{type:"string",format:"did"},handle:{type:"string",format:"handle"},email:{type:"string"},relatedRecords:{type:"array",items:{type:"unknown"}},indexedAt:{type:"string",format:"datetime"},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderationDetail"},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},invitedBy:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"},invites:{type:"array",items:{type:"ref",ref:"lex:com.atproto.server.defs#inviteCode"}},invitesDisabled:{type:"boolean"},inviteNote:{type:"string"},emailConfirmedAt:{type:"string",format:"datetime"},deactivatedAt:{type:"string",format:"datetime"},threatSignatures:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#threatSignature"}}}},repoViewNotFound:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}},recordView:{type:"object",required:["uri","cid","value","blobCids","indexedAt","moderation","repo"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},value:{type:"unknown"},blobCids:{type:"array",items:{type:"string",format:"cid"}},indexedAt:{type:"string",format:"datetime"},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderation"},repo:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoView"}}},recordViewDetail:{type:"object",required:["uri","cid","value","blobs","indexedAt","moderation","repo"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"},value:{type:"unknown"},blobs:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#blobView"}},labels:{type:"array",items:{type:"ref",ref:"lex:com.atproto.label.defs#label"}},indexedAt:{type:"string",format:"datetime"},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderationDetail"},repo:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoView"}}},recordViewNotFound:{type:"object",required:["uri"],properties:{uri:{type:"string",format:"at-uri"}}},moderation:{type:"object",properties:{subjectStatus:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectStatusView"}}},moderationDetail:{type:"object",properties:{subjectStatus:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectStatusView"}}},blobView:{type:"object",required:["cid","mimeType","size","createdAt"],properties:{cid:{type:"string",format:"cid"},mimeType:{type:"string"},size:{type:"integer"},createdAt:{type:"string",format:"datetime"},details:{type:"union",refs:["lex:tools.ozone.moderation.defs#imageDetails","lex:tools.ozone.moderation.defs#videoDetails"]},moderation:{type:"ref",ref:"lex:tools.ozone.moderation.defs#moderation"}}},imageDetails:{type:"object",required:["width","height"],properties:{width:{type:"integer"},height:{type:"integer"}}},videoDetails:{type:"object",required:["width","height","length"],properties:{width:{type:"integer"},height:{type:"integer"},length:{type:"integer"}}},accountHosting:{type:"object",required:["status"],properties:{status:{type:"string",knownValues:["takendown","suspended","deleted","deactivated","unknown"]},updatedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},deletedAt:{type:"string",format:"datetime"},deactivatedAt:{type:"string",format:"datetime"},reactivatedAt:{type:"string",format:"datetime"}}},recordHosting:{type:"object",required:["status"],properties:{status:{type:"string",knownValues:["deleted","unknown"]},updatedAt:{type:"string",format:"datetime"},createdAt:{type:"string",format:"datetime"},deletedAt:{type:"string",format:"datetime"}}},reporterStats:{type:"object",required:["did","accountReportCount","recordReportCount","reportedAccountCount","reportedRecordCount","takendownAccountCount","takendownRecordCount","labeledAccountCount","labeledRecordCount"],properties:{did:{type:"string",format:"did"},accountReportCount:{type:"integer",description:"The total number of reports made by the user on accounts."},recordReportCount:{type:"integer",description:"The total number of reports made by the user on records."},reportedAccountCount:{type:"integer",description:"The total number of accounts reported by the user."},reportedRecordCount:{type:"integer",description:"The total number of records reported by the user."},takendownAccountCount:{type:"integer",description:"The total number of accounts taken down as a result of the user's reports."},takendownRecordCount:{type:"integer",description:"The total number of records taken down as a result of the user's reports."},labeledAccountCount:{type:"integer",description:"The total number of accounts labeled as a result of the user's reports."},labeledRecordCount:{type:"integer",description:"The total number of records labeled as a result of the user's reports."}}},modTool:{type:"object",description:"Moderation tool information for tracing the source of the action",required:["name"],properties:{name:{type:"string",description:"Name/identifier of the source (e.g., 'automod', 'ozone/workspace')"}
1,meta:{type:"unknown",description:"Additional arbitrary metadata about the source"}}},timelineEventPlcCreate:{type:"token",description:"Moderation event timeline event for a PLC create operation"},timelineEventPlcOperation:{type:"token",description:"Moderation event timeline event for generic PLC operation"},timelineEventPlcTombstone:{type:"token",description:"Moderation event timeline event for a PLC tombstone operation"},scheduledActionView:{type:"object",description:"View of a scheduled moderation action",required:["id","action","did","createdBy","createdAt","status"],properties:{id:{type:"integer",description:"Auto-incrementing row ID"},action:{type:"string",knownValues:["takedown"],description:"Type of action to be executed"},eventData:{type:"unknown",description:"Serialized event object that will be propagated to the event when performed"},did:{type:"string",format:"did",description:"Subject DID for the action"},executeAt:{type:"string",format:"datetime",description:"Exact time to execute the action"},executeAfter:{type:"string",format:"datetime",description:"Earliest time to execute the action (for randomized scheduling)"},executeUntil:{type:"string",format:"datetime",description:"Latest time to execute the action (for randomized scheduling)"},randomizeExecution:{type:"boolean",description:"Whether execution time should be randomized within the specified range"},createdBy:{type:"string",format:"did",description:"DID of the user who created this scheduled action"},createdAt:{type:"string",format:"datetime",description:"When the scheduled action was created"},updatedAt:{type:"string",format:"datetime",description:"When the scheduled action was last updated"},status:{type:"string",knownValues:["pending","executed","cancelled","failed"],description:"Current status of the scheduled action"},lastExecutedAt:{type:"string",format:"datetime",description:"When the action was last attempted to be executed"},lastFailureReason:{type:"string",description:"Reason for the last execution failure"},executionEventId:{type:"integer",description:"ID of the moderation event created when action was successfully executed"}}}}},ToolsOzoneModerationEmitEvent:{lexicon:1,id:"tools.ozone.moderation.emitEvent",defs:{main:{type:"procedure",description:"Take a moderation action on an actor.",input:{encoding:"application/json",schema:{type:"object",required:["event","subject","createdBy"],properties:{event:{type:"union",refs:["lex:tools.ozone.moderation.defs#modEventTakedown","lex:tools.ozone.moderation.defs#modEventAcknowledge","lex:tools.ozone.moderation.defs#modEventEscalate","lex:tools.ozone.moderation.defs#modEventComment","lex:tools.ozone.moderation.defs#modEventLabel","lex:tools.ozone.moderation.defs#modEventReport","lex:tools.ozone.moderation.defs#modEventMute","lex:tools.ozone.moderation.defs#modEventUnmute","lex:tools.ozone.moderation.defs#modEventMuteReporter","lex:tools.ozone.moderation.defs#modEventUnmuteReporter","lex:tools.ozone.moderation.defs#modEventReverseTakedown","lex:tools.ozone.moderation.defs#modEventResolveAppeal","lex:tools.ozone.moderation.defs#modEventEmail","lex:tools.ozone.moderation.defs#modEventDivert","lex:tools.ozone.moderation.defs#modEventTag","lex:tools.ozone.moderation.defs#accountEvent","lex:tools.ozone.moderation.defs#identityEvent","lex:tools.ozone.moderation.defs#recordEvent","lex:tools.ozone.moderation.defs#modEventPriorityScore","lex:tools.ozone.moderation.defs#ageAssuranceEvent","lex:tools.ozone.moderation.defs#ageAssuranceOverrideEvent","lex:tools.ozone.moderation.defs#ageAssurancePurgeEvent","lex:tools.ozone.moderation.defs#revokeAccountCredentialsEvent","lex:tools.ozone.moderation.defs#scheduleTakedownEvent","lex:tools.ozone.moderation.defs#cancelScheduledTakedownEvent"]},subject:{type:"union",refs:["lex:com.atproto.admin.defs#repoRef","lex:com.atproto.repo.strongRef"]},subjectBlobCids:{type:"array",items:{type:"string",format:"cid"}},createdBy:{type:"string",format:"did"},modTool:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modTool"},externalId:{type:"string",description:"An optional external ID for the event, used to deduplicate events from external systems. Fails when an event of same type with the same external ID exists for the same subject."},reportAction:{type:"ref",ref:"lex:tools.ozone.moderation.emitEvent#reportAction",description:"Optional report-level targeting. If provided, this event will be linked to specific reports and reporters may be notified."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modEventView"}},errors:[{name:"SubjectHasAction"}
1,{name:"DuplicateExternalId",description:"An event with the same external ID already exists for the subject."}]},reportAction:{type:"object",description:"Target specific reports when emitting a moderation event",properties:{ids:{type:"array",items:{type:"integer"},description:"Target specific report IDs"},types:{type:"array",items:{type:"string"},description:"Target reports matching these report types on the subject (fully qualified NSIDs)"},all:{type:"boolean",description:"Target ALL reports on the subject"},note:{type:"string",description:"Note to send to reporter(s) when actioning their report"}}}}},ToolsOzoneModerationGetAccountTimeline:{lexicon:1,id:"tools.ozone.moderation.getAccountTimeline",defs:{main:{type:"query",description:"Get timeline of all available events of an account. This includes moderation events, account history and did history.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"}}},output:{encoding:"application/json",schema:{type:"object",required:["timeline"],properties:{timeline:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.getAccountTimeline#timelineItem"}}}}},errors:[{name:"RepoNotFound"}]},timelineItem:{type:"object",required:["day","summary"],properties:{day:{type:"string"},summary:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.getAccountTimeline#timelineItemSummary"}}}},timelineItemSummary:{type:"object",required:["eventSubjectType","eventType","count"],properties:{eventSubjectType:{type:"string",knownValues:["account","record","chat"]},eventType:{type:"string",knownValues:["tools.ozone.moderation.defs#modEventTakedown","tools.ozone.moderation.defs#modEventReverseTakedown","tools.ozone.moderation.defs#modEventComment","tools.ozone.moderation.defs#modEventReport","tools.ozone.moderation.defs#modEventLabel","tools.ozone.moderation.defs#modEventAcknowledge","tools.ozone.moderation.defs#modEventEscalate","tools.ozone.moderation.defs#modEventMute","tools.ozone.moderation.defs#modEventUnmute","tools.ozone.moderation.defs#modEventMuteReporter","tools.ozone.moderation.defs#modEventUnmuteReporter","tools.ozone.moderation.defs#modEventEmail","tools.ozone.moderation.defs#modEventResolveAppeal","tools.ozone.moderation.defs#modEventDivert","tools.ozone.moderation.defs#modEventTag","tools.ozone.moderation.defs#accountEvent","tools.ozone.moderation.defs#identityEvent","tools.ozone.moderation.defs#recordEvent","tools.ozone.moderation.defs#modEventPriorityScore","tools.ozone.moderation.defs#revokeAccountCredentialsEvent","tools.ozone.moderation.defs#ageAssuranceEvent","tools.ozone.moderation.defs#ageAssuranceOverrideEvent","tools.ozone.moderation.defs#timelineEventPlcCreate","tools.ozone.moderation.defs#timelineEventPlcOperation","tools.ozone.moderation.defs#timelineEventPlcTombstone","tools.ozone.hosting.getAccountHistory#accountCreated","tools.ozone.hosting.getAccountHistory#emailConfirmed","tools.ozone.hosting.getAccountHistory#passwordUpdated","tools.ozone.hosting.getAccountHistory#handleUpdated","tools.ozone.moderation.defs#scheduleTakedownEvent","tools.ozone.moderation.defs#cancelScheduledTakedownEvent"]},count:{type:"integer"}}}}},ToolsOzoneModerationGetEvent:{lexicon:1,id:"tools.ozone.moderation.getEvent",defs:{main:{type:"query",description:"Get details about a moderation event.",parameters:{type:"params",required:["id"],properties:{id:{type:"integer"}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modEventViewDetail"}}}}},ToolsOzoneModerationGetRecord:{lexicon:1,id:"tools.ozone.moderation.getRecord",defs:{main:{type:"query",description:"Get details about a record.",parameters:{type:"params",required:["uri"],properties:{uri:{type:"string",format:"at-uri"},cid:{type:"string",format:"cid"}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.defs#recordViewDetail"}},errors:[{name:"RecordNotFound"}]}}},ToolsOzoneModerationGetRecords:{lexicon:1,id:"tools.ozone.moderation.getRecords",defs:{main:{type:"query",description:"Get details about some records.",parameters:{type:"params",required:["uris"],properties:{uris:{type:"array",maxLength:100,items:{type:"string",format:"at-uri"}}}},output:{encoding:"application/json",schema:{type:"object",required:["records"],properties:{records:{type:"array",items:{type:"union",refs:["lex:tools.ozone.moderation.defs#recordViewDetail","lex:tools.ozone.moderation.defs#recordViewNotFound"]}}}}}}}},ToolsOzoneModerationGetRepo:{lexicon:1,id:"tools.ozone.moderation.getRepo",defs:{main:{type:"query",description:"Get details about a repository.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoViewDetail"}},errors:[{name:"RepoNotFound"}]}}},ToolsOzoneModerationGetReporterStats:{lexicon:1,id:"tools.ozone.moderation.getReporterStats",defs:{main:{type:"query",description:"Get reporter stats for a list of users.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",maxLength:100,items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["stats"],properties:{stats:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#reporterStats"}}}}}}}},ToolsOzoneModerationGetRepos:{lexicon:1,id:"tools.ozone.moderation.getRepos",defs:{main:{type:"query",description:"Get details about some repositories.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",maxLength:100,items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["repos"],properties:{repos:{type:"array",items:{type:"union",refs:["lex:tools.ozone.moderation.defs#repoViewDetail","lex:tools.ozone.moderation.defs#repoViewNotFound"]}}}}}}}},ToolsOzoneModerationGetSubjects:{lexicon:1,id:"tools.ozone.moderation.getSubjects",defs:{main:{type:"query",description:"Get details about subjects.",parameters:{type:"params",required:["subjects"],properties:{subjects:{type:"array",maxLength:100,minLength:1,items:{type:"string"}}}},output:{encoding:"application/json",schema:{type:"object",required:["subjects"],properties:{subjects:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectView"}}}}}}}},ToolsOzoneModerationListScheduledActions:{lexicon:1,id:"tools.ozone.moderation.listScheduledActions",defs:{main:{type:"procedure",description:"List scheduled moderation actions with optional filtering",input:{encoding:"application/json",schema:{type:"object",required:["statuses"],properties:{startsAfter:{type:"string",format:"datetime",description:"Filter actions scheduled to execute after this time"},endsBefore:{type:"string",format:"datetime",description:"Filter actions scheduled to execute before this time"},subjects:{type:"array",maxLength:100,items:{type:"string",format:"did"},description:"Filter actions for specific DID subjects"},statuses:{type:"array",minLength:1,items:{type:"string",knownValues:["pending","executed","cancelled","failed"]},description:"Filter actions by status"},limit:{type:"integer",minimum:1,maximum:100,default:50,description:"Maximum number of results to return"},cursor:{type:"string",description:"Cursor for pagination"}}}},output:{encoding:"application/json",schema:{type:"object",required:["actions"],properties:{actions:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#scheduledActionView"}},cursor:{type:"string",description:"Cursor for next page of results"}}}}}}},ToolsOzoneModerationQueryEvents:{lexicon:1,id:"tools.ozone.moderation.queryEvents",defs:{main:{type:"query",description:"List moderation events related to a subject.",parameters:{type:"params",properties:{types:{type:"array",items:{type:"string"},description:"The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent<name>) to filter by. If not specified, all events are returned."},createdBy:{type:"string",format:"did"},sortDirection:{type:"string",default:"desc",enum:["asc","desc"],description:"Sort direction for the events. Defaults to descending order of created at timestamp."},createdAfter:{type:"string",format:"datetime",description:"Retrieve events created after a given timestamp"},createdBefore:{type:"string",format:"datetime",description:"Retrieve events created before a given timestamp"},subject:{type:"string",format:"uri"},collections:{type:"array",maxLength:20,description:"If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",items:{type:"string",format:"nsid"}},subjectType:{type:"string",description:"If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.",knownValues:["account","record"]},includeAllUserRecords:{type:"boolean",default:!1,description:"If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned."},limit:{type:"integer",minimum:1,maximum:100,default:50},hasComment:{type:"boolean",description:"If true, only events with comments are returned"},comment:{type:"string",description:"If specified, only events with comments containing the keyword are returned. Apply || separator to use multiple keywords and match using OR condition."},addedLabels:{type:"array",items:{type:"string"},description:"If specified, only events where all of these labels were added are returned"},removedLabels:{type:"array",items:{type:"string"},description:"If specified, only events where all of these labels were removed are returned"},addedTags:{type:"array",items:{type:"string"},description:"If specified, only events where all of these tags were added are returned"},removedTags:{type:"array",items:{type:"string"},description:"If specified, only events where all of these tags were removed are returned"},reportTypes:{type:"array",items:{type:"string"}},policies:{type:"array",items:{type:"string",description:"If specified, only events where the action policies match any of the given policies are returned"}},modTool:{type:"array",items:{type:"string"},description:"If specified, only events where the modTool name matches any of the given values are returned"},batchId:{type:"string",description:"If specified, only events where the batchId matches the given value are returned"},ageAssuranceState:{type:"string",description:"If specified, only events where the age assurance state matches the given value are returned",knownValues:["pending","assured","unknown","reset","blocked"]},withStrike:{type:"boolean",description:"If specified, only events where strikeCount value is set are returned."},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["events"],properties:{cursor:{type:"string"},events:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modEventView"}}}}}}}},ToolsOzoneModerationQueryStatuses:{lexicon:1,id:"tools.ozone.moderation.queryStatuses",defs:{main:{type:"query",description:"View moderation statuses of subjects (record or repo).",parameters:{type:"params",properties:{queueCount:{type:"integer",description:"Number of queues being used by moderators. Subjects will be split among all queues."},queueIndex:{type:"integer",description:"Index of the queue to fetch subjects from. Works only when queueCount value is specified."},queueSeed:{type:"string",description:"A seeder to shuffle/balance the queue items."},includeAllUserRecords:{type:"boolean",description:"All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned."},subject:{type:"string",format:"uri",description:"The subject to get the status for."},comment:{type:"string",description:"Search subjects by keyword from comments"},reportedAfter:{type:"string",format:"datetime",description:"Search subjects reported after a given timestamp"},reportedBefore:{type:"string",format:"datetime",description:"Search subjects reported before a given timestamp"},reviewedAfter:{type:"string",format:"datetime",description:"Search subjects reviewed after a given timestamp"},hostingDeletedAfter:{type:"string",format:"datetime",description:"Search subjects where the associated record/account was deleted after a given timestamp"},hostingDeletedBefore:{type:"string",format:"datetime",description:"Search subjects where the associated record/account was deleted before a given timestamp"},hostingUpdatedAfter:{type:"string",format:"datetime",description:"Search subjects where the associated record/account was updated after a given timestamp"},hostingUpdatedBefore:{type:"string",format:"datetime",description:"Search subjects where the associated record/account was updated before a given timestamp"},hostingStatuses:{type:"array",items:{type:"string"},description:"Search subjects by the status of the associated record/account"},reviewedBefore:{type:"string",format:"datetime",description:"Search subjects reviewed before a given timestamp"},includeMuted:{type:"boolean",description:"By default, we don't include muted subjects in the results. Set this to true to include them."},onlyMuted:{type:"boolean",description:"When set to true, only muted subjects and reporters will be returned."},reviewState:{type:"string",description:"Specify when fetching subjects in a certain state",knownValues:["tools.ozone.moderation.defs#reviewOpen","tools.ozone.moderation.defs#reviewClosed","tools.ozone.moderation.defs#reviewEscalated","tools.ozone.moderation.defs#reviewNone"]},ignoreSubjects:{type:"array",items:{type:"string",format:"uri"}},lastReviewedBy:{type:"string",format:"did",description:"Get all subject statuses that were reviewed by a specific moderator"},sortField:{type:"string",default:"lastReportedAt",enum:["lastReviewedAt","lastReportedAt","reportedRecordsCount","taken
1downRecordsCount","priorityScore"]},sortDirection:{type:"string",default:"desc",enum:["asc","desc"]},takendown:{type:"boolean",description:"Get subjects that were taken down"},appealed:{type:"boolean",description:"Get subjects in unresolved appealed status"},limit:{type:"integer",minimum:1,maximum:100,default:50},tags:{type:"array",maxLength:25,items:{type:"string",description:"Items in this array are applied with OR filters. To apply AND filter, put all tags in the same string and separate using && characters"}},excludeTags:{type:"array",items:{type:"string"}},cursor:{type:"string"},collections:{type:"array",maxLength:20,description:"If specified, subjects belonging to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",items:{type:"string",format:"nsid"}},subjectType:{type:"string",description:"If specified, subjects of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.",knownValues:["account","record"]},minAccountSuspendCount:{type:"integer",description:"If specified, only subjects that belong to an account that has at least this many suspensions will be returned."},minReportedRecordsCount:{type:"integer",description:"If specified, only subjects that belong to an account that has at least this many reported records will be returned."},minTakendownRecordsCount:{type:"integer",description:"If specified, only subjects that belong to an account that has at least this many taken down records will be returned."},minPriorityScore:{minimum:0,maximum:100,type:"integer",description:"If specified, only subjects that have priority score value above the given value will be returned."},minStrikeCount:{type:"integer",minimum:1,description:"If specified, only subjects that belong to an account that has at least this many active strikes will be returned."},ageAssuranceState:{type:"string",description:"If specified, only subjects with the given age assurance state will be returned.",knownValues:["pending","assured","unknown","reset","blocked"]}}},output:{encoding:"application/json",schema:{type:"object",required:["subjectStatuses"],properties:{cursor:{type:"string"},subjectStatuses:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectStatusView"}}}}}}}},ToolsOzoneModerationScheduleAction:{lexicon:1,id:"tools.ozone.moderation.scheduleAction",defs:{main:{type:"procedure",description:"Schedule a moderation action to be executed at a future time",input:{encoding:"application/json",schema:{type:"object",required:["action","subjects","createdBy","scheduling"],properties:{action:{type:"union",refs:["lex:tools.ozone.moderation.scheduleAction#takedown"]},subjects:{type:"array",maxLength:100,items:{type:"string",format:"did"},description:"Array of DID subjects to schedule the action for"},createdBy:{type:"string",format:"did"},scheduling:{type:"ref",ref:"lex:tools.ozone.moderation.scheduleAction#schedulingConfig"},modTool:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modTool",description:"This will be propagated to the moderation event when it is applied"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.moderation.scheduleAction#scheduledActionResults"}}},takedown:{type:"object",description:"Schedule a takedown action",properties:{comment:{type:"string"},durationInHours:{type:"integer",description:"Indicates how long the takedown should be in effect before automatically expiring."},acknowledgeAccountSubjects:{type:"boolean",description:"If true, all other reports on content authored by this account will be resolved (acknowledged)."},policies:{type:"array",maxLength:5,items:{type:"string"},description:"Names/Keywords of the policies that drove the decision."},severityLevel:{type:"string",description:"Severity level of the violation (e.g., 'sev-0', 'sev-1', 'sev-2', etc.)."},strikeCount:{type:"integer",description:"Number of strikes to assign to the user when takedown is applied."},strikeExpiresAt:{type:"string",format:"datetime",description:"When the strike should expire. If not provided, the strike never expires."},emailContent:{type:"string",description:"Email content to be sent to the user upon takedown."},emailSubject:{type:"string",description:"Subject of the email to be sent to the user upon takedown."}}},schedulingConfig:{type:"object",description:"Configuration for when the action should be executed",properties:{executeAt:{type:"string",format:"datetime",description:"Exact time to execute the action"},executeAfter:{type:"string",format:"datetime",description:"Earliest time to execute the action (for randomized scheduling)"},executeUntil:{type:"string",format:"datetime",description:"Latest time to execute the action (for randomized scheduling)"}}},scheduledActionResults:{type:"object",required:["succeeded","failed"],properties:{succeeded:{type:"array",items:{type:"string",format:"did"}},failed:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.scheduleAction#failedScheduling"}}}},failedScheduling:{type:"object",required:["subject","error"],properties:{subject:{type:"string",format:"did"},error:{type:"string"},errorCode:{type:"string"}}}}},ToolsOzoneModerationSearchRepos:{lexicon:1,id:"tools.ozone.moderation.searchRepos",defs:{main:{type:"query",description:"Find repositories based on a search term.",parameters:{type:"params",properties:{term:{type:"string",description:"DEPRECATED: use 'q' instead"},q:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["repos"],properties:{cursor:{type:"string"},repos:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#repoView"}}}}}}}},ToolsOzoneQueueAssignModerator:{lexicon:1,id:"tools.ozone.queue.assignModerator",defs:{main:{type:"procedure",description:"Assign a user to a queue.",input:{encoding:"application/json",schema:{type:"object",required:["queueId","did"],properties:{queueId:{type:"integer",description:"The ID of the queue to assign the user to."},did:{type:"string",description:"DID to be assigned."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.queue.defs#assignmentView"}},errors:[{name:"InvalidAssignment",description:"The specified queue does not exist or is not enabled."}]}}},ToolsOzoneQueueCreateQueue:{lexicon:1,id:"tools.ozone.queue.createQueue",defs:{main:{type:"procedure",description:"Create a new moderation queue. Will fail if the queue configuration conflicts with an existing queue.",input:{encoding:"application/json",schema:{type:"object",required:["name","subjectTypes","reportTypes"],properties:{name:{type:"string",description:"Display name for the queue (must be unique)"},subjectTypes:{type:"array",minLength:1,items:{type:"string",knownValues:["account","record","message"]},description:"Subject types this queue accepts"},collection:{type:"string",format:"nsid",description:"Collection name for record subjects. Required if subjectTypes includes 'record'."},reportTypes:{type:"array",items:{type:"string"},minLength:1,maxLength:25,description:"Report reason types (fully qualified NSIDs)"},description:{type:"string",description:"Optional description of the queue"}}}},output:{encoding:"application/json",schema:{type:"object",required:["queue"],properties:{queue:{type:"ref",ref:"lex:tools.ozone.queue.defs#queueView"}}}},errors:[{name:"ConflictingQueue",description:"The queue configuration conflicts with an existing queue"}]}}},ToolsOzoneQueueDefs:{lexicon:1,id:"tools.ozone.queue.defs",defs:{queueView:{type:"object",required:["id","name","subjectTypes","reportTypes","createdBy","createdAt","updatedAt","enabled","stats"],properties:{id:{type:"integer",description:"Queue ID"},name:{type:"string",description:"Display name of the queue"},subjectTypes:{type:"array",minLength:1,items:{type:"string",knownValues:["account","record","message"]},description:"Subject types this queue accepts."},collection:{type:"string",format:"nsid",description:"Collection name for record subjects (e.g., 'app.bsky.feed.post')"},reportTypes:{type:"array",items:{type:"string"},minLength:1,description:"Report reason types this queue accepts (fully qualified NSIDs)"},description:{type:"string",description:"Optional description of the queue"},createdBy:{type:"string",format:"did",description:"DID of moderator who created this queue"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"},enabled:{type:"boolean",description:"Whether this queue is currently active"},deletedAt:{type:"string",format:"datetime",description:"When the queue was deleted, if applicable"},stats:{type:"ref",ref:"lex:tools.ozone.queue.defs#queueStats",description:"Statistics about this queue"}}},queueStats:{type:"object",required:[],properties:{pendingCount:{type:"integer",description:"Number of reports in 'open' status"},actionedCount:{type:"integer",description:"Number of reports in 'closed' status"},escalatedCount:{type:"integer",description:"Number of reports in 'escalated' status"},inboundCount:{type:"integer",description:"Reports received in this queue in the last 24 hours."},actionRate:{type:"integer",description:"Percentage of reports actioned (actionedCount / inboundCount * 100), rounded to nearest integer. Absent when inboundCount is 0."},avgHandlingTimeSec:{type:"integer",description:"Average time in seconds from report creation to close, for reports closed in this period."},lastUpdated:{type:"string",format:"datetime",description:"When these statistics were last computed"}}},assignmentView:{type:"object",required:["id","did","queue","startAt"],properties:{id:{type:"integer"},did:{type:"string",format:"did"},moderator:{type:"ref",ref:"lex:tools.ozone.team.defs#member",description:"The moderator assigned to this queue"},queue:{type:"ref",ref:"lex:tools.ozone.queue.defs#queueView"},startAt:{type:"string",format:"datetime"}
1,endAt:{type:"string",format:"datetime"}}}}},ToolsOzoneQueueDeleteQueue:{lexicon:1,id:"tools.ozone.queue.deleteQueue",defs:{main:{type:"procedure",description:"Delete a moderation queue. Optionally migrate reports to another queue.",input:{encoding:"application/json",schema:{type:"object",required:["queueId"],properties:{queueId:{type:"integer",description:"ID of the queue to delete"},migrateToQueueId:{type:"integer",description:"Optional: migrate all reports to this queue. If not specified, reports will be set to unassigned (-1)."}}}},output:{encoding:"application/json",schema:{type:"object",required:["deleted"],properties:{deleted:{type:"boolean"},reportsMigrated:{type:"integer",description:"Number of reports that were migrated (if migration occurred)"}}}}}}},ToolsOzoneQueueGetAssignments:{lexicon:1,id:"tools.ozone.queue.getAssignments",defs:{main:{type:"query",description:"Get moderator assignments, optionally filtered by active status, queue, or moderator.",parameters:{type:"params",properties:{onlyActive:{type:"boolean",default:!0,description:"When true, only returns active assignments."},queueIds:{type:"array",items:{type:"integer"},description:"If specified, returns assignments for these queues only."},dids:{type:"array",items:{type:"string",format:"did"},description:"If specified, returns assignments for these moderators only."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["assignments"],properties:{cursor:{type:"string"},assignments:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.queue.defs#assignmentView"}}}}}}}},ToolsOzoneQueueListQueues:{lexicon:1,id:"tools.ozone.queue.listQueues",defs:{main:{type:"query",description:"List all configured moderation queues with statistics.",parameters:{type:"params",properties:{enabled:{type:"boolean",description:"Filter by enabled status. If not specified, returns all queues."},subjectType:{type:"string",description:"Filter queues that handle this subject type ('account' or 'record')."},collection:{type:"string",description:"Filter queues by collection name (e.g. 'app.bsky.feed.post')."},reportTypes:{type:"array",items:{type:"string"},maxLength:10,description:"Filter queues that handle any of these report reason types."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["queues"],properties:{cursor:{type:"string"},queues:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.queue.defs#queueView"}}}}}}}},ToolsOzoneQueueRouteReports:{lexicon:1,id:"tools.ozone.queue.routeReports",defs:{main:{type:"procedure",description:"Route reports within an ID range to matching queues based.",input:{encoding:"application/json",schema:{type:"object",required:["startReportId","endReportId"],properties:{startReportId:{type:"integer",description:"Start of report ID range (inclusive)."},endReportId:{type:"integer",description:"End of report ID range (inclusive). Difference between start and end must be less than 5,000."}}}},output:{encoding:"application/json",schema:{type:"object",required:["assigned","unmatched"],properties:{assigned:{type:"integer",description:"The number of reports assigned to a queue."},unmatched:{type:"integer",description:"The number of reports with no matching queue."}}}},errors:[{name:"OutOfRange",description:"The request is invalid, such as missing required fields or invalid field values."}]}}},ToolsOzoneQueueUnassignModerator:{lexicon:1,id:"tools.ozone.queue.unassignModerator",defs:{main:{type:"procedure",description:"Remove a user's assignment from a queue.",input:{encoding:"application/json",schema:{type:"object",required:["queueId","did"],properties:{queueId:{type:"integer",description:"The ID of the queue to unassign the user from."},did:{type:"string",format:"did",description:"DID to be unassigned."}}}},errors:[{name:"InvalidAssignment",description:"No active assignment exists for the given queue and user."}]}}},ToolsOzoneQueueUpdateQueue:{lexicon:1,id:"tools.ozone.queue.updateQueue",defs:{main:{type:"procedure",description:"Update queue properties. Currently only supports updating the name and enabled status to prevent configuration conflicts.",input:{encoding:"application/json",schema:{type:"object",required:["queueId"],properties:{queueId:{type:"integer",description:"ID of the queue to update"},name:{type:"string",description:"New display name for the queue"},enabled:{type:"boolean",description:"Enable or disable the queue"},description:{type:"string",description:"Optional description of the queue"}}}},output:{encoding:"application/json",schema:{type:"object",required:["queue"],properties:{queue:{type:"ref",ref:"lex:tools.ozone.queue.defs#queueView"}}}}}}},ToolsOzoneReportAssignModerator:{lexicon:1,id:"tools.ozone.report.assignModerator",defs:{main:{type:"procedure",description:"Assign a report to a user. Defaults to the caller. Admins may assign to any moderator.",input:{encoding:"application/json",schema:{type:"object",required:["reportId"],properties:{reportId:{type:"integer",description:"The ID of the report to assign."},queueId:{type:"integer",description:"Optional queue ID to associate the assignment with. If not provided and the report has been assigned on a queue before, it will stay on that queue."},did:{type:"string",format:"did",description:"DID to be assigned. Defaults to the caller's DID. Admins may assign to any moderator."},isPermanent:{type:"boolean",description:"When true, the assignment has no expiry (endAt is null). Throws AlreadyAssigned if another user already has a permanent assignment on this report."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.report.defs#assignmentView"}}
1,errors:[{name:"AlreadyAssigned",description:"The report is already assigned to another user."},{name:"InvalidAssignment",description:"The report ID or queue ID is invalid."}]}}},ToolsOzoneReportCreateActivity:{lexicon:1,id:"tools.ozone.report.createActivity",defs:{main:{type:"procedure",description:"Register an activity on a report. For state-change activity types, validates the transition and updates report.status atomically.",input:{encoding:"application/json",schema:{type:"object",required:["reportId","activity"],properties:{reportId:{type:"integer",description:"ID of the report to record activity on"},activity:{type:"union",refs:["lex:tools.ozone.report.defs#queueActivity","lex:tools.ozone.report.defs#assignmentActivity","lex:tools.ozone.report.defs#escalationActivity","lex:tools.ozone.report.defs#closeActivity","lex:tools.ozone.report.defs#reopenActivity","lex:tools.ozone.report.defs#noteActivity"],description:"The type of activity to record."},internalNote:{type:"string",description:"Optional moderator-only note. Not visible to reporters."},publicNote:{type:"string",description:"Optional public-facing note, potentially visible to the reporter."},isAutomated:{type:"boolean",description:"Set true when this activity is triggered by an automated process. Defaults to false.",default:!1}}}},output:{encoding:"application/json",schema:{type:"object",required:["activity"],properties:{activity:{type:"ref",ref:"lex:tools.ozone.report.defs#reportActivityView"}}}},errors:[{name:"ReportNotFound",description:"No report exists with the given reportId"},{name:"InvalidStateTransition",description:"The requested state transition is not permitted from the report's current status"},{name:"AlreadyInTargetState",description:"The report is already in the status implied by this activity type"}]}}},ToolsOzoneReportDefs:{lexicon:1,id:"tools.ozone.report.defs",defs:{reasonType:{type:"string",knownValues:["tools.ozone.report.defs#reasonAppeal","tools.ozone.report.defs#reasonOther","tools.ozone.report.defs#reasonViolenceAnimal","tools.ozone.report.defs#reasonViolenceThreats","tools.ozone.report.defs#reasonViolenceGraphicContent","tools.ozone.report.defs#reasonViolenceGlorification","tools.ozone.report.defs#reasonViolenceExtremistContent","tools.ozone.report.defs#reasonViolenceTrafficking","tools.ozone.report.defs#reasonViolenceOther","tools.ozone.report.defs#reasonSexualAbuseContent","tools.ozone.report.defs#reasonSexualNCII","tools.ozone.report.defs#reasonSexualDeepfake","tools.ozone.report.defs#reasonSexualAnimal","tools.ozone.report.defs#reasonSexualUnlabeled","tools.ozone.report.defs#reasonSexualOther","tools.ozone.report.defs#reasonChildSafetyCSAM","tools.ozone.report.defs#reasonChildSafetyGroom","tools.ozone.report.defs#reasonChildSafetyPrivacy","tools.ozone.report.defs#reasonChildSafetyHarassment","tools.ozone.report.defs#reasonChildSafetyOther","tools.ozone.report.defs#reasonHarassmentTroll","tools.ozone.report.defs#reasonHarassmentTargeted","tools.ozone.report.defs#reasonHarassmentHateSpeech","tools.ozone.report.defs#reasonHarassmentDoxxing","tools.ozone.report.defs#reasonHarassmentOther","tools.ozone.report.defs#reasonMisleadingBot","tools.ozone.report.defs#reasonMisleadingImpersonation","tools.ozone.report.defs#reasonMisleadingSpam","tools.ozone.report.defs#reasonMisleadingScam","tools.ozone.report.defs#reasonMisleadingElections","tools.ozone.report.defs#reasonMisleadingOther","tools.ozone.report.defs#reasonRuleSiteSecurity","tools.ozone.report.defs#reasonRuleProhibitedSales","tools.ozone.report.defs#reasonRuleBanEvasion","tools.ozone.report.defs#reasonRuleOther","tools.ozone.report.defs#reasonSelfHarmContent","tools.ozone.report.defs#reasonSelfHarmED","tools.ozone.report.defs#reasonSelfHarmStunts","tools.ozone.report.defs#reasonSelfHarmSubstances","tools.ozone.report.defs#reasonSelfHarmOther"]},reasonAppeal:{type:"token",description:"Appeal a previously taken moderation action"},reasonOther:{type:"token",description:"An issue not included in these options"},reasonViolenceAnimal:{type:"token",description:"Animal welfare violations"},reasonViolenceThreats:{type:"token",description:"Threats or incitement"},reasonViolenceGraphicContent:{type:"token",description:"Graphic violent content"},reasonViolenceGlorification:{type:"token",description:"Glorification of violence"},reasonViolenceExtremistContent:{type:"token",description:"Extremist content. These reports will be sent only be sent to the application's Moderation Authority."},reasonViolenceTrafficking:{type:"token",description:"Human trafficking"},reasonViolenceOther:{type:"token",description:"Other violent content"},reasonSexualAbuseContent:{type:"token",description:"Adult sexual abuse content"},reasonSexualNCII:{type:"token",description:"Non-consensual intimate imagery"},reasonSexualDeepfake:{type:"token",description:"Deepfake adult content"},reasonSexualAnimal:{type:"token",description:"Animal sexual abuse"},reasonSexualUnlabeled:{type:"token",description:"Unlabelled adult content"},reasonSexualOther:{type:"token",description:"Other sexual violence content"},reasonChildSafetyCSAM:{type:"token",description:"Child sexual abuse material (CSAM). These reports will be sent only be sent to the application's Moderation Authority."},reasonChildSafetyGroom:{type:"token",description:"Grooming or predatory behavior. These reports will be sent only be sent to the application's Moderation Authority."},reasonChildSafetyPrivacy:{type:"token",description:"Privacy violation involving a minor"},reasonChildSafetyHarassment:{type:"token",description:"Harassment or bullying of minors"}
1,reasonChildSafetyOther:{type:"token",description:"Other child safety. These reports will be sent only be sent to the application's Moderation Authority."},reasonHarassmentTroll:{type:"token",description:"Trolling"},reasonHarassmentTargeted:{type:"token",description:"Targeted harassment"},reasonHarassmentHateSpeech:{type:"token",description:"Hate speech"},reasonHarassmentDoxxing:{type:"token",description:"Doxxing"},reasonHarassmentOther:{type:"token",description:"Other harassing or hateful content"},reasonMisleadingBot:{type:"token",description:"Fake account or bot"},reasonMisleadingImpersonation:{type:"token",description:"Impersonation"},reasonMisleadingSpam:{type:"token",description:"Spam"},reasonMisleadingScam:{type:"token",description:"Scam"},reasonMisleadingElections:{type:"token",description:"False information about elections"},reasonMisleadingOther:{type:"token",description:"Other misleading content"},reasonRuleSiteSecurity:{type:"token",description:"Hacking or system attacks"},reasonRuleProhibitedSales:{type:"token",description:"Promoting or selling prohibited items or services"},reasonRuleBanEvasion:{type:"token",description:"Banned user returning"},reasonRuleOther:{type:"token",description:"Other"},reasonSelfHarmContent:{type:"token",description:"Content promoting or depicting self-harm"},reasonSelfHarmED:{type:"token",description:"Eating disorders"},reasonSelfHarmStunts:{type:"token",description:"Dangerous challenges or activities"},reasonSelfHarmSubstances:{type:"token",description:"Dangerous substances or drug abuse"},reasonSelfHarmOther:{type:"token",description:"Other dangerous content"},reportAssignment:{type:"object",description:"Information about the moderator currently assigned to a report.",required:["did","assignedAt"],properties:{did:{type:"string",format:"did",description:"DID of the assigned moderator"},moderator:{type:"ref",ref:"lex:tools.ozone.team.defs#member",description:"Full member record of the assigned moderator"},assignedAt:{type:"string",format:"datetime",description:"When the report was assigned"}}},reportView:{type:"object",required:["id","eventId","status","subject","reportType","reportedBy","reporter","createdAt"],properties:{id:{type:"integer",description:"Report ID"},eventId:{type:"integer",description:"ID of the moderation event that created this report"},status:{type:"string",knownValues:["open","closed","escalated","queued","assigned"],description:"Current status of the report"},subject:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectView",description:"The subject that was reported with full details"},reportType:{type:"ref",ref:"lex:com.atproto.moderation.defs#reasonType",description:"Type of report"},reportedBy:{type:"string",format:"did",description:"DID of the user who made the report"},reporter:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectView",description:"Full subject view of the reporter account"},comment:{type:"string",description:"Comment provided by the reporter"},createdAt:{type:"string",format:"datetime",description:"When the report was created"},updatedAt:{type:"string",format:"datetime",description:"When the report was last updated"},queuedAt:{type:"string",format:"datetime",description:"When the report was assigned to its current queue"},actionEventIds:{type:"array",items:{type:"integer"},description:"Array of moderation event IDs representing actions taken on this report (sorted DESC, most recent first)"},actions:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.moderation.defs#modEventView"},description:"Optional: expanded action events"},actionNote:{type:"string",description:"Note sent to reporter when report was actioned"},subjectStatus:{type:"ref",ref:"lex:tools.ozone.moderation.defs#subjectStatusView",description:"Current status of the reported subject"},relatedReportCount:{type:"integer",description:"Number of other pending reports on the same subject"},assignment:{type:"ref",ref:"lex:tools.ozone.report.defs#reportAssignment",description:"Information about moderator currently assigned to this report (if any)"},queue:{type:"ref",ref:"lex:tools.ozone.queue.defs#queueView",description:"The queue this report is assigned to (if any)"},isMuted:{type:"boolean",description:"Whether this report is muted. A report is muted if the reporter was muted or the subject was muted at the time the report was created."}}},queueActivity:{type:"object",description:"Activity recording a report being routed to a queue.",properties:{previousStatus:{type:"string",knownValues:["open","closed","escalated","queued","assigned"],description:"The report's status before this activity. Populated automatically from the report row; not required in input."}}},assignmentActivity:{type:"object",description:"Activity recording a moderator being assigned to a report.",properties:{previousStatus:{type:"string",knownValues:["open","closed","escalated","queued","assigned"],description:"The report's status before this activity. Populated automatically from the report row; not required in input."}}},escalationActivity:{type:"object",description:"Activity recording a report being escalated.",properties:{previousStatus:{type:"string",knownValues:["open","closed","escalated","queued","assigned"],description:"The report's status before this activity. Populated automatically from the report row; not required in input."}}},closeActivity:{type:"object",description:"Activity recording a report being closed.",properties:{previousStatus:{type:"string",knownValues:["open","closed","escalated","queued","assigned"],description:"The report's status before this activity. Populated automatically from the report row; not required in input."}}},reopenActivity:{type:"object",description:"Activity recording a closed report being reopened. Only valid when the report is in 'closed' status.",properties:{previousStatus:{type:"string",knownValues:["open","closed","escalated","queued","assigned"],description:"The report's status before this activity. Populated automatically from the report row; not required in input."}}},noteActivity:{type:"object",description:"Activity recording a note on a report. Use internalNote for moderator-only notes or publicNote for reporter-visible notes (or both).",properties:{}},reportActivityView:{type:"object",description:"A single activity entry on a report.",required:["id","reportId","activity","isAutomated","createdBy","createdAt"],properties:{id:{type:"integer",description:"Activity ID"},reportId:{type:"integer",description:"ID of the report this activity belongs to"},activity:{type:"union",refs:["lex:tools.ozone.report.defs#queueActivity","lex:tools.ozone.report.defs#assignmentActivity","lex:tools.ozone.report.defs#escalationActivity","lex:tools.ozone.report.defs#closeActivity","lex:tools.ozone.report.defs#reopenActivity","lex:tools.ozone.report.defs#noteActivity"],description:"The typed activity object describing what occurred."},internalNote:{type:"string",description:"Optional moderator-only note. Not visible to reporters."},publicNote:{type:"string",description:"Optional public note, potentially visible to the reporter."}
1,meta:{type:"unknown",description:"Extensible JSON payload for loose activity-specific metadata (e.g. assignmentId)."},isAutomated:{type:"boolean",description:"True if this activity was created by an automated process (e.g. queue router) rather than a direct human action."},createdBy:{type:"string",format:"did",description:"DID of the actor who created this activity, or the service DID for automated activities."},moderator:{type:"ref",ref:"lex:tools.ozone.team.defs#member",description:"Full member record of the moderator who created this activity"},createdAt:{type:"string",format:"datetime",description:"When this activity was created"}}},liveStats:{description:"Live statistics for reports for the current calendar day, filterable by queue, moderator, or report type.",type:"object",properties:{pendingCount:{type:"integer",description:"Number of reports currently not closed."},actionedCount:{type:"integer",description:"Number of reports closed today."},escalatedCount:{type:"integer",description:"Number of reports escalated today."},inboundCount:{type:"integer",description:"Reports received today."},actionRate:{type:"integer",description:"Percentage of reports actioned (actionedCount / inboundCount * 100), rounded to nearest integer."},avgHandlingTimeSec:{type:"integer",description:"Average time in seconds from report creation (or moderator assignment) to close."},lastUpdated:{type:"string",format:"datetime",description:"When these statistics were last computed."}}},historicalStats:{description:"A single daily snapshot of report statistics for a calendar date.",type:"object",required:["date"],properties:{date:{type:"string",description:"The calendar date this snapshot covers (YYYY-MM-DD)."},computedAt:{type:"string",format:"datetime",description:"When this snapshot was last computed."},pendingCount:{type:"integer",description:"Number of reports not closed at time of computation."},actionedCount:{type:"integer",description:"Number of reports closed during this day."},escalatedCount:{type:"integer",description:"Number of reports escalated during this day."},inboundCount:{type:"integer",description:"Reports received during this day."},actionRate:{type:"integer",description:"Percentage of reports actioned (actionedCount / inboundCount * 100), rounded to nearest integer."},avgHandlingTimeSec:{type:"integer",description:"Average time in seconds from report creation (or moderator assignment) to close."}}},assignmentView:{type:"object",required:["id","did","reportId","startAt"],properties:{id:{type:"integer"},did:{type:"string",format:"did"},moderator:{type:"ref",ref:"lex:tools.ozone.team.defs#member",description:"The moderator assigned to this report"},queue:{type:"ref",ref:"lex:tools.ozone.queue.defs#queueView"},reportId:{type:"integer"},startAt:{type:"string",format:"datetime"},endAt:{type:"string",format:"datetime"}}}}},ToolsOzoneReportGetAssignments:{lexicon:1,id:"tools.ozone.report.getAssignments",defs:{main:{type:"query",description:"Get assignments for reports.",parameters:{type:"params",properties:{onlyActive:{type:"boolean",default:!0,description:"When true, only returns active assignments."},reportIds:{type:"array",items:{type:"integer"},maxLength:50,description:"If specified, returns assignments for these reports only."},dids:{type:"array",items:{type:"string",format:"did"},maxLength:50,description:"If specified, returns assignments for these moderators only."},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["assignments"],properties:{cursor:{type:"string"},assignments:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.report.defs#assignmentView"}}}}}}}},ToolsOzoneReportGetHistoricalStats:{lexicon:1,id:"tools.ozone.report.getHistoricalStats",defs:{main:{type:"query",description:"Get historical daily report statistics. Returns a paginated list of daily stat snapshots, newest first. Filter by queue, moderator, or report type.",parameters:{type:"params",properties:{queueId:{type:"integer",description:"Filter stats by queue. Use -1 for unqueued reports."},moderatorDid:{type:"string",format:"did",description:"Filter stats by moderator DID."},reportTypes:{type:"array",items:{type:"string"},description:"Filter stats by report types."},startDate:{type:"string",format:"datetime",description:"Earliest date to include (inclusive)."},endDate:{type:"string",format:"datetime",description:"Latest date to include (inclusive)."},limit:{type:"integer",minimum:1,maximum:100,default:30,description:"Maximum number of entries to return."},cursor:{type:"string",description:"Pagination cursor."}}},output:{encoding:"application/json",schema:{type:"object",required:["stats"],properties:{stats:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.report.defs#historicalStats"}},cursor:{type:"string"}}}}}}},ToolsOzoneReportGetLatestReport:{lexicon:1,id:"tools.ozone.report.getLatestReport",defs:{main:{type:"query",description:"Get the most recent report.",parameters:{type:"params",properties:{}},output:{encoding:"application/json",schema:{type:"object",required:["report"],properties:{report:{type:"ref",ref:"lex:tools.ozone.report.defs#reportView"}}}},errors:[{name:"NotFound",description:"No report found."}]}}},ToolsOzoneReportGetLiveStats:{lexicon:1,id:"tools.ozone.report.getLiveStats",defs:{main:{type:"query",description:"Get live report statistics from the past 24 hours. Filter by queue, moderator, or report type. Omit all parameters for aggregate stats.",parameters:{type:"params",properties:{queueId:{type:"integer",description:"Filter stats by queue. Use -1 for unqueued reports."},moderatorDid:{type:"string",format:"did",description:"Filter stats by moderator DID."},reportTypes:{type:"array",items:{type:"string"},description:"Filter stats by report types."}}},output:{encoding:"application/json",schema:{type:"object",required:["stats"],properties:{stats:{type:"ref",ref:"lex:tools.ozone.report.defs#liveStats",description:"Statistics for the requested filter."}}}}}}},ToolsOzoneReportGetReport:{lexicon:1,id:"tools.ozone.report.getReport",defs:{main:{type:"query",description:"Get details about a single moderation report by ID.",parameters:{type:"params",required:["id"],properties:{id:{type:"integer",description:"The ID of the report to retrieve."}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.report.defs#reportView"}},errors:[{name:"NotFound",description:"No report found."}]}}},ToolsOzoneReportListActivities:{lexicon:1,id:"tools.ozone.report.listActivities",defs:{main:{type:"query",description:"List all activities for a report, sorted most-recent-first.",parameters:{type:"params",required:["reportId"],properties:{reportId:{type:"integer",description:"ID of the report whose activities to list"},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["activities"],properties:{activities:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.report.defs#reportActivityView"}},cursor:{type:"string"}}}}}}},ToolsOzoneReportQueryReports:{lexicon:1,id:"tools.ozone.report.queryReports",defs:{main:{type:"query",description:"View moderation reports. Reports are individual instances of content being reported, as opposed to subject statuses which aggregate reports at the subject level.",parameters:{type:"params",required:["status"],properties:{queueId:{type:"integer",description:"Filter by queue ID. Use -1 for unassigned reports."},reportTypes:{type:"array",items:{type:"string"},description:"Filter by report types (fully qualified string in the format of com.atproto.moderation.defs#reason<name>)."},status:{type:"string",knownValues:["open","closed","escalated","queued","assigned"],description:"Filter by report status."},subject:{type:"string",format:"uri",description:"Filter by subject DID or AT-URI."},did:{type:"string",format:"did",description:"Filter to reports where the subject is this DID or any record owned by this DID. Unlike `subject` (which scopes to a 
1specific account or record), this returns all reports tied to the DID across both account-level and record-level subjects."},subjectType:{type:"string",description:"If specified, reports of the given type (account or record) will be returned.",knownValues:["account","record"]},collections:{type:"array",maxLength:20,description:"If specified, reports where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",items:{type:"string",format:"nsid"}},reportedAfter:{type:"string",format:"datetime",description:"Retrieve reports created after a given timestamp"},reportedBefore:{type:"string",format:"datetime",description:"Retrieve reports created before a given timestamp"},isMuted:{type:"boolean",default:!1,description:"Filter by muted status. true returns only muted reports, false returns only unmuted reports. Defaults to false."},assignedTo:{type:"string",format:"did",description:"Filter by the DID of the moderator permanently assigned to the report."},sortField:{type:"string",default:"createdAt",enum:["createdAt","updatedAt"]},sortDirection:{type:"string",default:"desc",enum:["asc","desc"]},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["reports"],properties:{cursor:{type:"string"},reports:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.report.defs#reportView"}}}}}}}},ToolsOzoneReportReassignQueue:{lexicon:1,id:"tools.ozone.report.reassignQueue",defs:{main:{type:"procedure",description:"Manually reassign a report to a different queue (or unassign it). Records a queueActivity entry on the report.",input:{encoding:"application/json",schema:{type:"object",required:["reportId","queueId"],properties:{reportId:{type:"integer",description:"ID of the report to reassign"},queueId:{type:"integer",description:"Target queue ID. Use -1 to unassign from any queue."},comment:{type:"string",description:"Optional moderator-only note recorded on the resulting queueActivity as internalNote."}}}},output:{encoding:"application/json",schema:{type:"object",required:["report"],properties:{report:{type:"ref",ref:"lex:tools.ozone.report.defs#reportView"}}}},errors:[{name:"ReportNotFound",description:"No report exists with the given reportId"},{name:"ReportClosed",description:"The report is closed and cannot be reassigned"},{name:"AlreadyInTargetQueue",description:"The report is already assigned to the target queue"},{name:"QueueNotFound",description:"No active queue exists with the given queueId"},{name:"QueueDisabled",description:"The target queue is disabled and cannot receive new assignments"}]}}},ToolsOzoneReportRefreshStats:{lexicon:1,id:"tools.ozone.report.refreshStats",defs:{main:{type:"procedure",description:"Recompute report statistics for a date range. Useful for backfilling after failures or data corrections.",input:{encoding:"application/json",schema:{type:"object",required:["startDate","endDate"],properties:{startDate:{type:"string",description:"Start date for recomputation, inclusive (YYYY-MM-DD)."},endDate:{type:"string",description:"End date for recomputation, inclusive (YYYY-MM-DD)."},queueIds:{type:"array",items:{type:"integer"},description:"Optional list of queue IDs to recompute. Omit to recompute all groups."}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},ToolsOzoneReportUnassignModerator:{lexicon:1,id:"tools.ozone.report.unassignModerator",defs:{main:{type:"procedure",description:"Remove report assignment.",input:{encoding:"application/json",schema:{type:"object",required:["reportId"],properties:{reportId:{type:"integer",description:"The ID of the report to unassign."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.report.defs#assignmentView"}},errors:[{name:"InvalidAssignment",description:"The report ID is invali
1d."}]}}},ToolsOzoneSafelinkAddRule:{lexicon:1,id:"tools.ozone.safelink.addRule",defs:{main:{type:"procedure",description:"Add a new URL safety rule",input:{encoding:"application/json",schema:{type:"object",required:["url","pattern","action","reason"],properties:{url:{type:"string",description:"The URL or domain to apply the rule to"},pattern:{type:"ref",ref:"lex:tools.ozone.safelink.defs#patternType"},action:{type:"ref",ref:"lex:tools.ozone.safelink.defs#actionType"},reason:{type:"ref",ref:"lex:tools.ozone.safelink.defs#reasonType"},comment:{type:"string",description:"Optional comment about the decision"},createdBy:{type:"string",format:"did",description:"Author DID. Only respected when using admin auth"}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.safelink.defs#event"}},errors:[{name:"InvalidUrl",description:"The provided URL is invalid"},{name:"RuleAlreadyExists",description:"A rule for this URL/domain already exists"}]}}},ToolsOzoneSafelinkDefs:{lexicon:1,id:"tools.ozone.safelink.defs",defs:{event:{type:"object",description:"An event for URL safety decisions",required:["id","eventType","url","pattern","action","reason","createdBy","createdAt"],properties:{id:{type:"integer",description:"Auto-incrementing row ID"},eventType:{type:"ref",ref:"lex:tools.ozone.safelink.defs#eventType"},url:{type:"string",description:"The URL that this rule applies to"},pattern:{type:"ref",ref:"lex:tools.ozone.safelink.defs#patternType"},action:{type:"ref",ref:"lex:tools.ozone.safelink.defs#actionType"},reason:{type:"ref",ref:"lex:tools.ozone.safelink.defs#reasonType"},createdBy:{type:"string",format:"did",description:"DID of the user who created this rule"},createdAt:{type:"string",format:"datetime"},comment:{type:"string",description:"Optional comment about the decision"}}},eventType:{type:"string",knownValues:["addRule","updateRule","removeRule"]},patternType:{type:"string",knownValues:["domain","url"]},actionType:{type:"string",knownValues:["block","warn","whitelist"]},reasonType:{type:"string",knownValues:["csam","spam","phishing","none"]},urlRule:{type:"object",description:"Input for creating a URL safety rule",required:["url","pattern","action","reason","createdBy","createdAt","updatedAt"],properties:{url:{type:"string",description:"The URL or domain to apply the rule to"},pattern:{type:"ref",ref:"lex:tools.ozone.safelink.defs#patternType"},action:{type:"ref",ref:"lex:tools.ozone.safelink.defs#actionType"},reason:{type:"ref",ref:"lex:tools.ozone.safelink.defs#reasonType"},comment:{type:"string",description:"Optional comment about the decision"},createdBy:{type:"string",format:"did",description:"DID of the user added the rule."},createdAt:{type:"string",format:"datetime",description:"Timestamp when the rule was created"},updatedAt:{type:"string",format:"datetime",description:"Timestamp when the rule was last updated"}}}}},ToolsOzoneSafelinkQueryEvents:{lexicon:1,id:"tools.ozone.safelink.queryEvents",defs:{main:{type:"procedure",description:"Query URL safety audit events",input:{encoding:"application/json",schema:{type:"object",properties:{cursor:{type:"string",description:"Cursor for pagination"},limit:{type:"integer",minimum:1,maximum:100,default:50,description:"Maximum number of results to return"},urls:{type:"array",items:{type:"string"},description:"Filter by specific URLs or domains"},patternType:{type:"string",description:"Filter by pattern type"},sortDirection:{type:"string",knownValues:["asc","desc"],default:"desc",description:"Sort direction"}}}},output:{encoding:"application/json",schema:{type:"object",required:["events"],properties:{cursor:{type:"string",description:"Next cursor for pagination. Only present if there are more results."},events:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.safelink.defs#event"}}}}}}}},ToolsOzoneSafelinkQueryRules:{lexicon:1,id:"tools.ozone.safelink.queryRules",defs:{main:{type:"procedure",description:"Query URL safety rules",input:{encoding:"application/json",schema:{type:"object",properties:{cursor:{type:"string",description:"Cursor for pagination"},limit:{type:"integer",minimum:1,maximum:100,default:50,description:"Maximum number of results to return"},urls:{type:"array",items:{type:"string"},description:"Filter by specific URLs or domains"},patternType:{type:"string",description:"Filter by pattern type"},actions:{type:"array",items:{type:"string"},description:"Filter by action types"},reason:{type:"string",description:"Filter by reason type"},createdBy:{type:"string",format:"did",description:"Filter by rule creator"},sortDirection:{type:"string",knownValues:["asc","desc"],default:"desc",description:"Sort direction"}}}},output:{encoding:"application/json",schema:{type:"object",required:["rules"],properties:{cursor:{type:"string",description:"Next cursor for pagination. Only present if there are more results."},rules:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.safelink.defs#urlRule"}}}}}}}},ToolsOzoneSafelinkRemoveRule:{lexicon:1,id:"tools.ozone.safelink.removeRule",defs:{main:{type:"procedure",description:"Remove an existing URL safety rule",input:{encoding:"application/json",schema:{type:"object",required:["url","pattern"],properties:{url:{type:"string",description:"The URL or domain to remove the rule for"},pattern:{type:"ref",ref:"lex:tools.ozone.safelink.defs#patternType"},comment:{type:"string",description:"Optional comment about why the rule is being removed"},createdBy:{type:"string",format:"did",description:"Optional DID of the user. Only respected when using admin auth."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.safelink.defs#event"}},errors:[{name:"RuleNotFound",description:"No active rule found for this URL/domain"}]}}},ToolsOzoneSafelinkUpdateRule:{lexicon:1,id:"tools.ozone.safelink.updateRule",defs:{main:{type:"procedure",description:"Update an existing URL safety rule",input:{encoding:"application/json",schema:{type:"object",required:["url","pattern","action","reason"],properties:{url:{type:"string",description:"The URL or domain to update the rule for"},pattern:{type:"ref",ref:"lex:tools.ozone.safelink.defs#patternType"},action:{type:"ref",ref:"lex:tools.ozone.safelink.defs#actionType"},reason:{type:"ref",ref:"lex:tools.ozone.safelink.defs#reasonType"},comment:{type:"string",description:"Optional comment about the update"},createdBy:{type:"string",format:"did",description:"Optional DID to credit as the creator. Only respected for admin_token authentication."}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.safelink.defs#event"}},errors:[{name:"RuleNotFound",description:"No active rule found for this URL/domain"}]}}},ToolsOzoneServerGetConfig:{lexicon:1,id:"tools.ozone.server.getConfig",defs:{main:{type:"query",description:"Get details about ozone's server configuration.",output:{encoding:"application/json",schema:{type:"object",properties:{appview:{type:"ref",ref:"lex:tools.ozone.server.getConfig#serviceConfig"},pds:{type:"ref",ref:"lex:tools.ozone.server.getConfig#serviceConfig"},blobDivert:{type:"ref",ref:"lex:tools.ozone.server.getConfig#serviceConfig"},chat:{type:"ref",ref:"lex:tools.ozone.server.getConfig#serviceConfig"},viewer:{type:"ref",ref:"lex:tools.ozone.server.getConfig#viewerConfig"},verifierDid:{type:"string",format:"did",description:"The did of the verifier used for verification."}}}}},serviceConfig:{type:"object",properties:{url:{type:"string",format:"uri"}}},viewerConfig:{type:"object",properties:{role:{type:"string",knownValues:["tools.ozone.team.defs#roleAdmin","tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleTriage","tools.ozone.team.defs#roleVerifier"]}}}}},ToolsOzoneSetAddValues:{lexicon:1,id:"tools.ozone.set.addValues",defs:{main:{type:"procedure",description:"Add values to a specific set. Attempting to add values to a set that does not exist will result in an error.",input:{encoding:"application/json",schema:{type:"object",required:["name","values"],properties:{name:{type:"string",description:"Name of the set to add values to"},values:{type:"array",minLength:1,maxLength:1e3,items:{type:"string"}
1,description:"Array of string values to add to the set"}}}}}}},ToolsOzoneSetDefs:{lexicon:1,id:"tools.ozone.set.defs",defs:{set:{type:"object",required:["name"],properties:{name:{type:"string",minLength:3,maxLength:128},description:{type:"string",maxGraphemes:1024,maxLength:10240}}},setView:{type:"object",required:["name","setSize","createdAt","updatedAt"],properties:{name:{type:"string",minLength:3,maxLength:128},description:{type:"string",maxGraphemes:1024,maxLength:10240},setSize:{type:"integer"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"}}}}},ToolsOzoneSetDeleteSet:{lexicon:1,id:"tools.ozone.set.deleteSet",defs:{main:{type:"procedure",description:"Delete an entire set. Attempting to delete a set that does not exist will result in an error.",input:{encoding:"application/json",schema:{type:"object",required:["name"],properties:{name:{type:"string",description:"Name of the set to delete"}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}},errors:[{name:"SetNotFound",description:"set with the given name does not exist"}]}}},ToolsOzoneSetDeleteValues:{lexicon:1,id:"tools.ozone.set.deleteValues",defs:{main:{type:"procedure",description:"Delete values from a specific set. Attempting to delete values that are not in the set will not result in an error",input:{encoding:"application/json",schema:{type:"object",required:["name","values"],properties:{name:{type:"string",description:"Name of the set to delete values from"},values:{type:"array",minLength:1,items:{type:"string"},description:"Array of string values to delete from the set"}}}},errors:[{name:"SetNotFound",description:"set with the given name does not exist"}]}}},ToolsOzoneSetGetValues:{lexicon:1,id:"tools.ozone.set.getValues",defs:{main:{type:"query",description:"Get a specific set and its values",parameters:{type:"params",required:["name"],properties:{name:{type:"string"},limit:{type:"integer",minimum:1,maximum:1e3,default:100},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["set","values"],properties:{set:{type:"ref",ref:"lex:tools.ozone.set.defs#setView"},values:{type:"array",items:{type:"string"}},cursor:{type:"string"}}}},errors:[{name:"SetNotFound",description:"set with the given name does not exist"}]}}},ToolsOzoneSetQuerySets:{lexicon:1,id:"tools.ozone.set.querySets",defs:{main:{type:"query",description:"Query available sets",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},namePrefix:{type:"string"},sortBy:{type:"string",enum:["name","createdAt","updatedAt"],default:"name"},sortDirection:{type:"string",default:"asc",enum:["asc","desc"],description:"Defaults to ascending order of name field."}}},output:{encoding:"application/json",schema:{type:"object",required:["sets"],properties:{sets:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.set.defs#setView"}},cursor:{type:"string"}}}}}}},ToolsOzoneSetUpsertSet:{lexicon:1,id:"tools.ozone.set.upsertSet",defs:{main:{type:"procedure",description:"Create or update set metadata",input:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.set.defs#set"}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.set.defs#setView"}}}}},ToolsOzoneSettingDefs:{lexicon:1,id:"tools.ozone.setting.defs",defs:{option:{type:"object",required:["key","value","did","scope","createdBy","lastUpdatedBy"],properties:{key:{type:"string",format:"nsid"},did:{type:"string",format:"did"},value:{type:"unknown"},description:{type:"string",maxGraphemes:1024,maxLength:10240},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"},managerRole:{type:"string",knownValues:["tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleTriage","tools.ozone.team.defs#roleAdmin","tools.ozone.team.defs#roleVerifier"]},scope:{type:"string",knownValues:["instance","personal"]},createdBy:{type:"string",format:"did"},lastUpdatedBy:{type:"string",format:"did"}}}}},ToolsOzoneSettingListOptions:{lexicon:1,id:"tools.ozone.setting.listOptions",defs:{main:{type:"query",description:"List settings with optional filtering",parameters:{type:"params",properties:{limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"},scope:{type:"string",knownValues:["instance","personal"],default:"instance"},prefix:{type:"string",description:"Filter keys by prefix"},keys:{type:"array",maxLength:100,items:{type:"string",format:"nsid"},description:"Filter for only the specified keys. Ignored if prefix is provided"}}},output:{encoding:"application/json",schema:{type:"object",required:["options"],properties:{cursor:{type:"string"},options:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.setting.defs#option"}}}}}}}},ToolsOzoneSettingRemoveOptions:{lexicon:1,id:"tools.ozone.setting.removeOptions",defs:{main:{type:"procedure",description:"Delete settings by key",input:{encoding:"application/json",schema:{type:"object",required:["keys","scope"],properties:{keys:{type:"array",minLength:1,maxLength:200,items:{type:"string",format:"nsid"}},scope:{type:"string",knownValues:["instance","personal"]}}}},output:{encoding:"application/json",schema:{type:"object",properties:{}}}}}},ToolsOzoneSettingUpsertOption:{lexicon:1,id:"tools.ozone.setting.upsertOption",defs:{main:{type:"procedure",description:"Create or update setting option",input:{encoding:"application/json",schema:{type:"object",required:["key","scope","value"],properties:{key:{type:"string",format:"nsid"},scope:{type:"string",knownValues:["instance","personal"]},value:{type:"unknown"},description:{type:"string",maxLength:2e3},managerRole:{type:"string",knownValues:["tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleTriage","tools.ozone.team.defs#roleVerifier","tools.ozone.team.defs#roleAdmin"]}}}},output:{encoding:"application/json",schema:{type:"object",required:["option"],properties:{option:{type:"ref",ref:"lex:tools.ozone.setting.defs#option"}}}}}}},ToolsOzoneSignatureDefs:{lexicon:1,id:"tools.ozone.signature.defs",defs:{sigDetail:{type:"object",required:["property","value"],properties:{property:{type:"string"},value:{type:"string"}}}}},ToolsOzoneSignatureFindCorrelation:{lexicon:1,id:"tools.ozone.signature.findCorrelation",defs:{main:{type:"query",description:"Find all correlated threat signatures between 2 or more accounts.",parameters:{type:"params",required:["dids"],properties:{dids:{type:"array",items:{type:"string",format:"did"}}}},output:{encoding:"application/json",schema:{type:"object",required:["details"],properties:{details:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.signature.defs#sigDetail"}}}}}}}},ToolsOzoneSignatureFindRelatedAccounts:{lexicon:1,id:"tools.ozone.signature.findRelatedAccounts",defs:{main:{type:"query",description:"Get accounts that share some matching threat signatures with the root account.",parameters:{type:"params",required:["did"],properties:{did:{type:"string",format:"did"},cursor:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["accounts"],properties:{cursor:{type:"string"},accounts:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.signature.findRelatedAccounts#relatedAccount"}}}}}},relatedAccount:{type:"object",required:["account"],properties:{account:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"},similarities:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.signature.defs#sigDetail"}}}}}},ToolsOzoneSignatureSearchAccounts:{lexicon:1,id:"tools.ozone.signature.searchAccounts",defs:{main:{type:"query",description:"Search for accounts that match one or more threat signature values.",parameters:{type:"params",required:["values"],properties:{values:{type:"array",items:{type:"string"}},cursor:{type:"string"},limit:{type:"integer",minimum:1,maximum:100,default:50}}},output:{encoding:"application/json",schema:{type:"object",required:["accounts"],properties:{cursor:{type:"string"},accounts:{type:"array",items:{type:"ref",ref:"lex:com.atproto.admin.defs#accountView"}}}}}}}},ToolsOzoneTeamAddMember:{lexicon:1,id:"tools.ozone.team.addMember",def
1s:{main:{type:"procedure",description:"Add a member to the ozone team. Requires admin role.",input:{encoding:"application/json",schema:{type:"object",required:["did","role"],properties:{did:{type:"string",format:"did"},role:{type:"string",knownValues:["tools.ozone.team.defs#roleAdmin","tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleVerifier","tools.ozone.team.defs#roleTriage"]}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.team.defs#member"}},errors:[{name:"MemberAlreadyExists",description:"Member already exists in the team."}]}}},ToolsOzoneTeamDefs:{lexicon:1,id:"tools.ozone.team.defs",defs:{member:{type:"object",required:["did","role"],properties:{did:{type:"string",format:"did"},disabled:{type:"boolean"},profile:{type:"ref",ref:"lex:app.bsky.actor.defs#profileViewDetailed"},createdAt:{type:"string",format:"datetime"},updatedAt:{type:"string",format:"datetime"},lastUpdatedBy:{type:"string"},role:{type:"string",knownValues:["tools.ozone.team.defs#roleAdmin","tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleTriage","tools.ozone.team.defs#roleVerifier"]}}},roleAdmin:{type:"token",description:"Admin role. Highest level of access, can perform all actions."},roleModerator:{type:"token",description:"Moderator role. Can perform most actions."},roleTriage:{type:"token",description:"Triage role. Mostly intended for monitoring and escalating issues."},roleVerifier:{type:"token",description:"Verifier role. Only allowed to issue verifications."}}},ToolsOzoneTeamDeleteMember:{lexicon:1,id:"tools.ozone.team.deleteMember",defs:{main:{type:"procedure",description:"Delete a member from ozone team. Requires admin role.",input:{encoding:"application/json",schema:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"}}}},errors:[{name:"MemberNotFound",description:"The member being deleted does not exist"},{name:"CannotDeleteSelf",description:"You can not delete yourself from the team"}]}}},ToolsOzoneTeamListMembers:{lexicon:1,id:"tools.ozone.team.listMembers",defs:{main:{type:"query",description:"List all members with access to the ozone service.",parameters:{type:"params",properties:{q:{type:"string"},disabled:{type:"boolean"},roles:{type:"array",items:{type:"string"}},limit:{type:"integer",minimum:1,maximum:100,default:50},cursor:{type:"string"}}},output:{encoding:"application/json",schema:{type:"object",required:["members"],properties:{cursor:{type:"string"},members:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.team.defs#member"}}}}}}}},ToolsOzoneTeamUpdateMember:{lexicon:1,id:"tools.ozone.team.updateMember",defs:{main:{type:"procedure",description:"Update a member in the ozone service. Requires admin role.",input:{encoding:"application/json",schema:{type:"object",required:["did"],properties:{did:{type:"string",format:"did"},disabled:{type:"boolean"},role:{type:"string",knownValues:["tools.ozone.team.defs#roleAdmin","tools.ozone.team.defs#roleModerator","tools.ozone.team.defs#roleVerifier","tools.ozone.team.defs#roleTriage"]}}}},output:{encoding:"application/json",schema:{type:"ref",ref:"lex:tools.ozone.team.defs#member"}},errors:[{name:"MemberNotFound",description:"The member being updated does not exist in the team"}]}}},ToolsOzoneVerificationDefs:{lexicon:1,id:"tools.ozone.verification.defs",defs:{verificationView:{type:"object",description:"Verification data for the associated subject.",required:["issuer","uri","subject","handle","displayName","createdAt"],properties:{issuer:{type:"string",description:"The user who issued this verification.",format:"did"},uri:{type:"string",description:"The AT-URI of the verification record.",format:"at-uri"},subject:{type:"string",format:"did",description:"The subject of the verification."},handle:{type:"string",description:"Handle of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current handle matches the one at the time of verifying.",format:"handle"},displayName:{type:"string",description:"Display name of the subject the verification applies to at the moment of verifying, which might not be the same at the time of viewing. The verification is only valid if the current displayName matches the one at the time of verifying."}
1,createdAt:{type:"string",description:"Timestamp when the verification was created.",format:"datetime"},revokeReason:{type:"string",description:"Describes the reason for revocation, also indicating that the verification is no longer valid."},revokedAt:{type:"string",description:"Timestamp when the verification was revoked.",format:"datetime"},revokedBy:{type:"string",description:"The user who revoked this verification.",format:"did"},subjectProfile:{type:"union",refs:[]},issuerProfile:{type:"union",refs:[]},subjectRepo:{type:"union",refs:["lex:tools.ozone.moderation.defs#repoViewDetail","lex:tools.ozone.moderation.defs#repoViewNotFound"]},issuerRepo:{type:"union",refs:["lex:tools.ozone.moderation.defs#repoViewDetail","lex:tools.ozone.moderation.defs#repoViewNotFound"]}}}}},ToolsOzoneVerificationGrantVerifications:{lexicon:1,id:"tools.ozone.verification.grantVerifications",defs:{main:{type:"procedure",description:"Grant verifications to multiple subjects. Allows batch processing of up to 100 verifications at once.",input:{encoding:"application/json",schema:{type:"object",required:["verifications"],properties:{verifications:{type:"array",description:"Array of verification requests to process",maxLength:100,items:{type:"ref",ref:"lex:tools.ozone.verification.grantVerifications#verificationInput"}}}}},output:{encoding:"application/json",schema:{type:"object",required:["verifications","failedVerifications"],properties:{verifications:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.verification.defs#verificationView"}},failedVerifications:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.verification.grantVerifications#grantError"}}}}}},verificationInput:{type:"object",required:["subject","handle","displayName"],properties:{subject:{type:"string",description:"The did of the subject being verified",format:"did"},handle:{type:"string",description:"Handle of the subject the verification applies to at the moment of verifying.",format:"handle"},displayName:{type:"string",description:"Display name of the subject the verification applies to at the moment of verifying."},createdAt:{type:"string",format:"datetime",description:"Timestamp for verification record. Defaults to current time when not specified."}}},grantError:{type:"object",description:"Error object for failed verifications.",required:["error","subject"],properties:{error:{type:"string",description:"Error message describing the reason for failure."},subject:{type:"string",description:"The did of the subject being verified",format:"did"}}}}},ToolsOzoneVerificationListVerifications:{lexicon:1,id:"tools.ozone.verification.listVerifications",defs:{main:{type:"query",description:"List verifications",parameters:{type:"params",properties:{cursor:{type:"string",description:"Pagination cursor"},limit:{type:"integer",description:"Maximum number of results to return",minimum:1,maximum:100,default:50},createdAfter:{type:"string",format:"datetime",description:"Filter to verifications created after this timestamp"},createdBefore:{type:"string",format:"datetime",description:"Filter to verifications created before this timestamp"},issuers:{type:"array",maxLength:100,description:"Filter to verifications from specific issuers",items:{type:"string",format:"did"}},subjects:{type:"array",description:"Filter to specific verified DIDs",maxLength:100,items:{type:"string",format:"did"}},sortDirection:{type:"string",description:"Sort direction for creation date",enum:["asc","desc"],default:"desc"},isRevoked:{type:"boolean",description:"Filter to verifications that are revoked or not. By default, includes both."}}},output:{encoding:"application/json",schema:{type:"object",required:["verifications"],properties:{cursor:{type:"string"},verifications:{type:"array",items:{type:"ref",ref:"lex:tools.ozone.verification.defs#verificationView"}}}}}}}},ToolsOzoneVerificationRevokeVerifications:{lexicon:1,id:"tools.ozone.verification.revokeVerifications",defs:{main:{type:"procedure",description:"Revoke previously granted verifications in batches of up to 100.",input:{encoding:"application/json",schema:{type:"object",required:["uris"],properties:{uris:{type:"array",description:"Array of verification record uris to revoke",maxLength:100,items:{type:"string",description:"The AT-URI of the verification record to revoke.",format:"at-uri"}},revokeReason:{type:"string",description:"Reason for revoking the verification. This is optional and can be omitted if not needed.",maxLength:1e3}}}},output:{encoding:"application/json",schema:{type:"object",required:["revokedVerifications","failedRevocations"],properties:{revokedVerifications:{type:"array",description:"List of verification uris successfully revoked",items:{type:"string",format:"at-uri"}},failedRevocations:{type:"array",description:"List of verification uris that couldn't be revoked, including failure reasons",items:{type:"ref",ref:"lex:tools.ozone.verification.revokeVerifications#revokeError"}}}}}},revokeError:{type:"object",description:"Error object for failed revocations",required:["uri","error"],properties:{uri:{type:"string",description:"The AT-URI of the verification record that failed to revoke.",format:"at-uri"},error:{type:"string",description:"Description of the error that occurred during revocation."}}}}}},Bt=Object.values(Qc),Lo=new fe(Bt);function Mt(t,e,r,o){return(o?Po:Jc)(t,e,r)?Lo.validate(`${e}#${r}`,t):{success:!1,error:new f(`Must be an object with "${r==="main"?e:`${e}#${r}`}" $type property`)}}const _o=b({error:l().optional(),message:l().optional()});var h;(function(t){t[t.Unknown=1]="Unknown",t[t.InvalidResponse=2]="InvalidResponse",t[t.Success=200]="Success",t[t.InvalidRequest=400]="InvalidRequest",t[t.AuthenticationRequired=401]="AuthenticationRequired",t[t.Forbidden=403]="Forbidden",t[t.XRPCNotSupported=404]="XRPCNotSupported",t[t.NotAcceptable=406]="NotAcceptable",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RateLimitExceeded=429]="RateLimitExceeded",t[t.InternalServerError=500]="InternalServerError",t[t.MethodNotImplemented=501]="MethodNotImplemented",t[t.UpstreamFailure=502]="UpstreamFailure",t[t.NotEnoughResources=503]="NotEnoughResources",t[t.UpstreamTimeout=504]="UpstreamTimeout"})(h||(h={}));function me(t){return t in h?t:t>
1=100&&t<200?h.XRPCNotSupported:t>=200&&t<300?h.Success:t>=300&&t<400?h.XRPCNotSupported:t>=400&&t<500?h.InvalidRequest:h.InternalServerError}function Xc(t){return h[me(t)]}const zo={[h.Unknown]:"Unknown",[h.InvalidResponse]:"Invalid Response",[h.Success]:"Success",[h.InvalidRequest]:"Invalid Request",[h.AuthenticationRequired]:"Authentication Required",[h.Forbidden]:"Forbidden",[h.XRPCNotSupported]:"XRPC Not Supported",[h.NotAcceptable]:"Not Acceptable",[h.PayloadTooLarge]:"Payload Too Large",[h.UnsupportedMediaType]:"Unsupported Media Type",[h.RateLimitExceeded]:"Rate Limit Exceeded",[h.InternalServerError]:"Internal Server Error",[h.MethodNotImplemented]:"Method Not Implemented",[h.UpstreamFailure]:"Upstream Failure",[h.NotEnoughResources]:"Not Enough Resources",[h.UpstreamTimeout]:"Upstream Timeout"};function Zc(t){return zo[me(t)]}class Yc{constructor(e,r){this.data=e,this.headers=r,this.success=!0}}class s extends Error{constructor(e,r=Xc(e),o,i,n){super(o||r||Zc(e),n),this.error=r,this.headers=i,this.success=!1,this.status=me(e);const a=n?.cause;this.cause===void 0&&a!==void 0&&(this.cause=a)}static from(e,r){if(e instanceof s)return e;const o=e instanceof Error?e:void 0,i=e instanceof Response?e:e?.response instanceof Response?e.response:void 0,n=o?.statusCode??o?.status??i?.status,a=typeof n=="number"?me(n):r??h.Unknown,c=o?.message??String(e),d=i?Object.fromEntries(i.headers.entries()):void 0;return new s(a,void 0,c,d,{cause:e})}}class ed extends s{constructor(e,r,o){super(h.InvalidResponse,zo[h.InvalidResponse],"The server gave an invalid response and may be out of date.",void 0,{cause:r}),this.lexiconNsid=e,this.validationError=r,this.responseBody=o}}const le=globalThis.ReadableStream||class{constructor(){throw new Error("ReadableStream is not supported in this environment")}};function td(t){return _o.safeParse(t).success}function rd(t){return t.type==="procedure"?"post":"get"}function od(t,e,r){const o=`/xrpc/${encodeURIComponent(t)}`;if(!r)return o;const i=[];for(const[n,a]of Object.entries(r)){const c=e.parameters?.properties?.[n];if(!c)throw new Error(`Invalid query parameter: ${n}`);if(a!==void 0)if(c.type==="array"){const d=Array.isArray(a)?a:[a];for(const p of d)i.push([n,Sr(c.items.type,p)])}else i.push([n,Sr(c.type,a)])}return i.length?`${o}?${new URLSearchParams(i).toString()}`:o}function Sr(t,e){if(t==="string"||t==="unknown")return String(e);if(t==="float")return String(Number(e));if(t==="integer")return String(Number(e)|0);if(t==="boolean")return e?"true":"false";if(t==="datetime")return e instanceof Date?e.toISOString():String(e);throw new Error(`Unsupported query param type: ${t}`)}function id(t,e,r){const o=new Headers;if(r?.headers)for(const i in r.headers){if(o.has(i))throw new TypeError(`Duplicate header: ${i}`);const n=r.headers[i];n!=null&&o.set(i,n)}if(t.type==="procedure"){if(r?.encoding)o.set("content-type",r.encoding);else if(!o.has("content-type")&&typeof e<"u")if(e instanceof ArrayBuffer||e instanceof le||ArrayBuffer.isView(e))o.set("content-type","application/octet-stream");else if(e instanceof FormData)o.set("content-type","multipart/form-data");else if(e instanceof URLSearchParams)o.set("content-type","application/x-www-form-urlencoded;charset=UTF-8");else if(Vo(e))o.set("content-type",e.type||"application/octet-stream");else if(typeof e=="string")o.set("content-type","text/plain;charset=UTF-8");else if(Bo(e))o.set("content-type","application/octet-stream");else if(typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="object")o.set("content-type","application/json");else throw new s(h.InvalidRequest,`Unsupported data type: ${typeof e}`)}return o}function Nt(t,e){if(!e)return t;let r;for(const[o,i]of e){if(i===void 0||(r??=new Headers(t),r.has(o)))continue;const n=typeof i=="function"?i():i;if(typeof n=="string")r.set(o,n);else if(n===null)r.delete(o);else throw new TypeError(`Invalid "${o}" header value: ${typeof n}`)}return r??t}function Vo(t){if(t==null||typeof t!="object")return!1;if(typeof Blob=="function"&&t instanceof Blob)return!0;const e=t[Symbol.toStringTag];return e==="Blob"||e==="File"?"stream"in t&&typeof t.stream=="function":!1}
1function nd(t){switch(typeof t){case"string":return!0;case"object":return t instanceof ArrayBuffer||t instanceof FormData||t instanceof URLSearchParams||t instanceof le||ArrayBuffer.isView(t)||Vo(t);default:return!1}}function Bo(t){return t!=null&&typeof t=="object"&&(Symbol.iterator in t||Symbol.asyncIterator in t)}function sd(t,e){const r=t.get("content-type");if(!r)return;if(typeof e>"u")throw new s(h.InvalidRequest,"A request body is expected but none was provided");if(nd(e))return e instanceof FormData&&r==="multipart/form-data"&&t.delete("content-type"),e;if(Bo(e))return ad(e);if(r.startsWith("text/"))return new TextEncoder().encode(String(e));if(r.startsWith("application/json")){const i=Hc(e);if(i===void 0)throw new s(h.InvalidRequest,"Failed to encode request body as JSON");return new TextEncoder().encode(i)}const o=!e||typeof e!="object"?typeof e:e.constructor!==Object&&typeof e.constructor=="function"&&typeof e.constructor?.name=="string"?e.constructor.name:"object";throw new s(h.InvalidRequest,`Unable to encode ${o} as ${r} data`)}function ad(t){if("from"in le&&typeof le.from=="function")return le.from(t);throw new TypeError("ReadableStream.from() is not supported in this environment. It is required to support using iterables as the request body. Consider using a polyfill or re-write your co
1de to use a different body type.")}function cd(t,e){try{if(t){if(t.includes("application/json")){const r=new TextDecoder().decode(e);return Kc(r)}if(t.startsWith("text/"))return new TextDecoder().decode(e)}return e instanceof ArrayBuffer?new Uint8Array(e):e}catch(r){throw new s(h.InvalidResponse,void 0,`Failed to parse response body: ${String(r)}`,void 0,{cause:r})}}function Mo(t){if(typeof t=="function")return t;if(typeof t=="object"&&"fetchHandler"in t)return t.fetchHandler.bind(t);const{service:e,headers:r=void 0,fetch:o=globalThis.fetch}=typeof t=="string"||t instanceof URL?{service:t}:t;if(typeof o!="function")throw new TypeError("XrpcDispatcher requires fetch() to be available in your environment.");const i=r!=null?Object.entries(r):void 0;return async function(n,a){const c=typeof e=="function"?e():e,d=new URL(n,c),p=Nt(a.headers,i);return o(d,{...a,headers:p})}}class Ft{constructor(e,r){this.headers=new Map,this.fetchHandler=Mo(e),this.lex=r instanceof fe?r:new fe(r)}setHeader(e,r){this.headers.set(e.toLowerCase(),r)}unsetHeader(e){this.headers.delete(e.toLowerCase())}clearHeaders(){this.headers.clear()}async call(e,r,o,i){const n=this.lex.getDefOrThrow(e);if(!n||n.type!=="query"&&n.type!=="procedure")throw new TypeError(`Invalid lexicon: ${e}. Must be a query or procedure.`);const a=od(e,n,r),c=rd(n),d=id(n,o,i),p=sd(d,o),u={method:c,headers:Nt(d,this.headers),body:p,duplex:"half",redirect:"follow",signal:i?.signal};try{const y=await this.fetchHandler.call(void 0,a,u),k=y.status,A=Object.fromEntries(y.headers.entries()),F=await y.arrayBuffer(),B=cd(y.headers.get("content-type"),F),C=me(k);if(C!==h.Success){const{error:T=void 0,message:$=void 0}=B&&td(B)?B:{};throw new s(C,T,$,A)}try{this.lex.assertValidXrpcOutput(e,B)}catch(T){throw T instanceof f?new ed(e,T,B):T}return new Yc(B,A)}catch(y){throw s.from(y)}}}class dd{constructor(){this.lex=new fe}get fetch(){throw new Error("Client.fetch is no longer supported. Use an XrpcClient instead.")}set fetch(e){throw new Error("Client.fetch is no longer supported. Use an XrpcClient instead.")}async call(e,r,o,i,n){return this.service(e).call(r,o,i,n)}service(e){return new pd(this,e)}addLexicon(e){this.lex.add(e)}addLexicons(e){for(const r of e)this.addLexicon(r)}removeLexicon(e){this.lex.remove(e)}}class pd extends Ft{constructor(e,r){super(async(o,i)=>{const n=Nt(i.headers,Object.entries(this.headers));return fetch(new URL(o,this.uri),{...i,headers:n})},e.lex),this.baseClient=e,this.uri=typeof r=="string"?new URL(r):r}}new dd;function ld(t){return!t.includes(" ")&&!t.includes("#")}function Le(t){if(!t.startsWith("did:")||t.length<8||t.length>2048)return!1;const e=t.indexOf(":",4);return e>4&&e<t.length-1}function ud(t){if(!Le(t))throw new TypeError(`Invalid DID: ${t}`)}function Xe(t){return ud(t),t}function fd(t){const{length:e,[0]:r,[1]:o}=t.split("#");return e===2&&Le(r)&&ld(o)}function md(t){if(!fd(t))throw new TypeError(`Invalid DID reference: ${t} (must be of the form did:example:alice#service)`)}function yd(t){return md(t),t}const hd="did:plc:ar7c4by46qjdydhdevvrndac";function Ir(t){return t.trim().replace(/^#(?!\ufe0f)/,"").replace(/[\r\n\u00AD\u2060\u200D\u200C\u200B]+/,"")}function gd(t){const e=[],r=[];for(const o of t)o.pinned&&e.push(o.value),r.push(o.value);return{pinned:e,saved:r}}function Rr(t){switch(new K(t).collection){case"app.bsky.feed.generator":return"feed";case"app.bsky.graph.list":return"list";default:return"unknown"}}function Ze(t){if(!t.id)throw new Error("Saved feed must have an `id` - use a TID");if(["feed","list"].includes(t.type)){const e=new K(t.value),r=e.collection==="app.bsky.feed.generator",o=e.collection==="app.bsky.graph.list";if(t.type==="feed"&&!r)throw new Error(`Saved feed of type 'feed' must be a feed, got ${e.collection}`);if(t.type==="list"&&!o)throw new Error(`Saved feed of type 'list' must be a list, got ${e.collection}`)}}const bd=b({id:l().max(64),completed:ie(),data:l().max(300).optional(),expiresAt:l().datetime().optional()}).strict();function vd(t){bd.parse(t)}let wd=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},kd=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},xd=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};class Ad extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}
1function jd(t){if(t instanceof s){if(t.error==="InvalidEmail")return new wd(t);if(t.error==="DidTooLong")return new kd(t);if(t.error==="InvalidInitiation")return new xd(t);if(t.error==="RegionNotSupported")return new Ad(t)}return t}let qd=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Sd(t){return t instanceof s&&t.error==="UnsupportedCollection"?new qd(t):t}class Id extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Rd(t){return t instanceof s&&t.error==="UnsupportedCollection"?new Id(t):t}let Ed=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Cd=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Td(t){if(t instanceof s){if(t.error==="InvalidDid")return new Ed(t);if(t.error==="InternalError")return new Cd(t)}return t}let Dd=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};class Pd extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Ld extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}let _d=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function zd(t){if(t instanceof s){if(t.error==="InvalidDid")return new Dd(t);if(t.error==="InvalidLimit")return new Pd(t);if(t.error==="InvalidCursor")return new Ld(t);if(t.error==="InternalError")return new _d(t)}return t}let Vd=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Bd=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Md(t){if(t instanceof s){if(t.error==="InvalidDid")return new Vd(t);if(t.error==="InternalError")return new Bd(t)}return t}let Nd=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};class Fd extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class $d extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}let Ud=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Od=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Gd(t){if(t instanceof s){if(t.error==="InvalidDid")return new Nd(t);if(t.error==="InvalidContacts")return new Fd(t);if(t.error==="TooManyContacts")return new $d(t);if(t.error==="InvalidToken")return new Ud(t);if(t.error==="InternalError")return new Od(t)}return t}let Hd=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Wd=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Kd(t){if(t instanceof s){if(t.error==="InvalidDid")return new Hd(t);if(t.error==="InternalError")return new Wd(t)}return t}let Jd=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Qd=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Xd=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Zd=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Yd(t){if(t instanceof s){if(t.error==="RateLimitExceeded")return new Jd(t);if(t.error==="InvalidDid")return new Qd(t);if(t.error==="InvalidPhone")return new Xd(t);if(t.error==="InternalError")return new Zd(t)}return t}class ep extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class tp extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class rp extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}let op=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};class ip extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function np(t){if(t instanceof s){if(t.error==="RateLimitExceeded")return new ep(t);if(t.error==="InvalidDid")return new tp(t);if(t.error==="InvalidPhone")return new rp(t);if(t.error==="InvalidCode")return new op(t);if(t.error==="InternalError")return new ip(t)}return t}class sp extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function ap(t){return t instanceof s&&t.error==="DraftLimitReached"?new sp(t):t}let cp=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},dp=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function pp(t){if(t instanceof s){if(t.error==="BlockedActor")return new cp(t);if(t.error==="BlockedByActor")return new dp(t)}return t}let lp=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};class up extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function fp(t){if(t instanceof s){if(t.error==="BlockedActor")return new lp(t);if(t.error==="BlockedByActor")return new up(t)}return t}let mp=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function yp(t){return t instanceof s&&t.error==="UnknownFeed"?new mp(t):t}class hp extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function gp(t){return t instanceof s&&t.error==="UnknownFeed"?new hp(t):t}class bp extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function vp(t){return t instanceof s&&t.error==="UnknownList"?new bp(t):t}let wp=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function kp(t){return t instanceof s&&t.error==="NotFound"?new wp(t):t}let xp=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Ap(t){return t instanceof s&&t.error==="BadQueryString"?new xp(t):t}class jp extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function qp(t){return t instanceof s&&t.error==="ActorNotFound"?new jp(t):t}let Sp=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};class Ip extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Rp extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Ep(t){if(t instanceof s){if(t.error==="InvalidEmail")return new Sp(t);if(t.error==="DidTooLong")return new Ip(t);if(t.error==="InvalidInitiation")return new Rp(t)}return t}let Cp=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Tp(t){return t instanceof s&&t.error==="BadQueryString"?new Cp(t):t}let Dp=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Pp(t){return t instanceof s&&t.error==="BadQueryString"?new Dp(t):t}class Lp extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function _p(t){return t instanceof s&&t.error==="BadQueryString"?new Lp(t):t}let zp=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Vp(t){return t instanceof s&&t.error==="InvalidConvo"?new zp(t):t}let Bp=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Mp=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Np=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};class Fp extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}let $p=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Up(t){if(t instanceof s){if(t.error==="InvalidConvo")return new Bp(t);if(t.error==="ReactionNotAllowed")return new Mp(t);if(t.error==="ReactionMessageDeleted")return new Np(t);if(t.error==="ReactionLimitReached")return new Fp(t);if(t.error==="ReactionInvalidValue")return new $p(t)}return t}let Op=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};class Gp extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Hp(t){if(t instanceof s){if(t.error==="InvalidConvo")return new Op(t);if(t.error==="MessageDeleteNotAllowed")return new Gp(t)}return t}let Wp=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Kp(t){return t instanceof s&&t.error==="InvalidConvo"?new Wp(t):t}let Jp=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Qp=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};class Xp extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}let Zp=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Yp=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function el(t){if(t instanceof s){if(t.error==="AccountSuspended")return new Jp(t);if(t.error==="BlockedActor")return new Qp(t);if(t.error==="MessagesDisabled")return new Xp(t);if(t.error==="NotFollowedBySender")return new Zp(t);if(t.error==="RecipientNotFound")return new Yp(t)}return t}let tl=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function rl(t){return t instanceof s&&t.error==="InvalidConvo"?new tl(t):t}let ol=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function il(t){return t instanceof s&&t.error==="InvalidConvo"?new ol(t):t}let nl=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};class sl extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function al(t){if(t instanceof s){if(t.error==="InvalidConvo")return new nl(t);if(t.error==="OwnerCannotLeave")return new sl(t)}return t}let cl=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},dl=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},pl=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function ll(t){if(t instanceof s){if(t.error==="ConvoLocked")return new cl(t);if(t.error==="InvalidConvo")return new dl(t);if(t.error==="InsufficientRole")return new pl(t)}return t}let ul=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function fl(t){return t instanceof s&&t.error==="InvalidConvo"?new ul(t):t}let ml=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};class yl extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class hl extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class gl extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function bl(t){if(t instanceof s){if(t.error==="InvalidConvo")return new ml(t);if(t.error==="ReactionNotAllowed")return new yl(t);if(t.error==="ReactionMessageDeleted")return new hl(t);if(t.error==="ReactionInvalidValue")return new gl(t)}return t}let vl=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},wl=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function kl(t){if(t instanceof s){if(t.error==="ConvoLocked")return new vl(t);if(t.error==="InvalidConvo")return new wl(t)}return t}let xl=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Al=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function jl(t){if(t instanceof s){if(t.error==="ConvoLocked")return new xl(t);if(t.error==="InvalidConvo")return new Al(t)}return t}let ql=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Sl=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Il(t){if(t instanceof s){if(t.error==="InvalidConvo")return new ql(t);if(t.error==="InsufficientRole")return new Sl(t)}return t}let Rl=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function El(t){return t instanceof s&&t.error==="InvalidConvo"?new Rl(t):t}let Cl=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Tl(t){return t instanceof s&&t.error==="InvalidConvo"?new Cl(t):t}let Dl=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Pl=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Ll=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},_l=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},zl=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Vl=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Bl=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Ml=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Nl=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Fl(t){if(t instanceof s){if(t.error==="AccountSuspended")return new Dl(t);if(t.error==="BlockedActor")return new Pl(t);if(t.error==="ConvoLocked")return new Ll(t);if(t.error==="InsufficientRole")return new _l(t);if(t.error==="InvalidConvo")return new zl(t);if(t.error==="MemberLimitReached")return new Vl(t);if(t.error==="NotFollowedBySender")return new Bl(t);if(t.error==="RecipientNotFound")return new Ml(t);if(t.error==="UserForbidsGroups")return new Nl(t)}return t}let $l=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Ul=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Ol=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Gl(t){if(t instanceof s){if(t.error==="InvalidConvo")return new $l(t);if(t.error==="InsufficientRole")return new Ul(t);if(t.error==="MemberLimitReached")return new Ol(t)}return t}class Hl extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Wl extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Kl extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Jl extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Ql extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Xl extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Zl(t){if(t instanceof s){if(t.error==="AccountSuspended")return new Hl(t);if(t.error==="BlockedActor")return new Wl(t);if(t.error==="NewAccountCannotCreateGroup")return new Kl(t);if(t.error==="NotFollowedBySender")return new Jl(t);if(t.error==="RecipientNotFound")return new Ql(t);if(t.error==="UserForbidsGroups")return new Xl(t)}return t}class Yl extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}let eu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},tu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function ru(t){if(t instanceof s){if(t.error==="EnabledJoinLinkAlreadyExists")return new Yl(t);if(t.error==="InvalidConvo")return new eu(t);if(t.error==="InsufficientRole")return new tu(t)}return t}let ou=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},iu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},nu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function su(t){if(t instanceof s){if(t.error==="InvalidConvo")return new ou(t);if(t.error==="InsufficientRole")return new iu(t);if(t.error==="NoJoinLink")return new nu(t)}return t}let au=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},cu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},du=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function pu(t){if(t instanceof s){if(t.error==="ConvoLocked")return new au(t);if(t.error==="InvalidConvo")return new cu(t);if(t.error==="InsufficientRole")return new du(t)}return t}let lu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},uu
1=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},fu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function mu(t){if(t instanceof s){if(t.error==="InvalidConvo")return new lu(t);if(t.error==="InsufficientRole")return new uu(t);if(t.error==="NoJoinLink")return new fu(t)}return t}let yu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},hu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};class gu extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class bu extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function vu(t){if(t instanceof s){if(t.error==="InvalidConvo")return new yu(t);if(t.error==="InsufficientRole")return new hu(t);if(t.error==="NoJoinLink")return new gu(t);if(t.error==="LinkAlreadyEnabled")return new bu(t)}return t}let wu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},ku=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function xu(t){if(t instanceof s){if(t.error==="InvalidConvo")return new wu(t);if(t.error==="InsufficientRole")return new ku(t)}return t}let Au=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},ju=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function qu(t){if(t instanceof s){if(t.error==="InvalidConvo")return new Au(t);if(t.error==="InsufficientRole")return new ju(t)}return t}class Su extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Iu extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Ru(t){if(t instanceof s){if(t.error==="InvalidConvo")return new Su(t);if(t.error==="InsufficientRole")return new Iu(t)}return t}class Eu extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Cu extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Tu extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Du extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Pu extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Lu extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function _u(t){if(t instanceof s){if(t.error==="ConvoLocked")return new Eu(t);if(t.error==="FollowRequired")return new Cu(t);if(t.error==="InvalidCode")return new Tu(t);if(t.error==="LinkDisabled")return new Du(t);if(t.error==="MemberLimitReached")return new Pu(t);if(t.error==="UserKicked")return new Lu(t)}return t}let zu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Vu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Bu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Mu(t){if(t instanceof s){if(t.error==="HandleNotFound")return new zu(t);if(t.error==="DidNotFound")return new Vu(t);if(t.error==="DidDeactivated")return new Bu(t)}return t}let Nu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Fu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function $u(t){if(t instanceof s){if(t.error==="DidNotFound")return new Nu(t);if(t.error==="DidDeactivated")return new Fu(t)}return t}let Uu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Ou(t){return t instanceof s&&t.error==="HandleNotFound"?new Uu(t):t}class Gu extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Hu extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Wu extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Ku(t){if(t instanceof s){if(t.error==="HandleNotFound")return new Gu(t);if(t.error==="DidNotFound")return new Hu(t);if(t.error==="DidDeactivated")return new Wu(t)}return t}class Ju extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Qu(t){return t instanceof s&&t.error==="LexiconNotFound"?new Ju(t):t}let Xu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Zu(t){return t instanceof s&&t.error==="InvalidSwap"?new Xu(t):t}let Yu=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function ef(t){return t instanceof s&&t.error==="InvalidSwap"?new Yu(t):t}let tf=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function rf(t){return t instanceof s&&t.error==="InvalidSwap"?new tf(t):t}let of=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function nf(t){return t instanceof s&&t.error==="RecordNotFound"?new of(t):t}class No extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function sf(t){return t instanceof s&&t.error==="InvalidSwap"?new No(t):t}class af extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}let cf=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},df=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},pf=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function lf(t){if(t instanceof s){if(t.error==="AccountNotFound")return new af(t);if(t.error==="ExpiredToken")return new cf(t);if(t.error==="InvalidToken")return new df(t);if(t.error==="InvalidEmail")return new pf(t)}return t}class uf extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class ff extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class mf extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class yf extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class hf extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class gf extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class bf extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function vf(t){if(t instanceof s){if(t.error==="InvalidHandle")return new uf(t);if(t.error==="InvalidPassword")return new ff(t);if(t.error==="InvalidInviteCode")return new mf(t);
1if(t.error==="HandleNotAvailable")return new yf(t);if(t.error==="UnsupportedDomain")return new hf(t);if(t.error==="UnresolvableDid")return new gf(t);if(t.error==="IncompatibleDidDoc")return new bf(t)}return t}let wf=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function kf(t){return t instanceof s&&t.error==="AccountTakedown"?new wf(t):t}let xf=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};class Af extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function jf(t){if(t instanceof s){if(t.error==="AccountTakedown")return new xf(t);if(t.error==="AuthFactorTokenRequired")return new Af(t)}return t}let qf=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Sf=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function If(t){if(t instanceof s){if(t.error==="ExpiredToken")return new qf(t);if(t.error==="InvalidToken")return new Sf(t)}return t}let Rf=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Ef=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Cf(t){if(t instanceof s){if(t.error==="InvalidToken")return new Rf(t);if(t.error==="ExpiredToken")return new Ef(t)}return t}class Tf extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Df(t){return t instanceof s&&t.error==="DuplicateCreate"?new Tf(t):t}class Pf extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Lf(t){return t instanceof s&&t.error==="BadExpiration"?new Pf(t):t}let _f=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function zf(t){return t instanceof s&&t.error==="AccountTakedown"?new _f(t):t}class Vf extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}let Bf=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Mf=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Nf(t){if(t instanceof s){if(t.error==="AccountTakedown")return new Vf(t);if(t.error==="InvalidToken")return new Bf(t);if(t.error==="ExpiredToken")return new Mf(t)}return t}let Ff=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},$f=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Uf(t){if(t instanceof s){if(t.error==="ExpiredToken")return new Ff(t);if(t.error==="InvalidToken")return new $f(t)}return t}class Of extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Gf extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Hf extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Wf(t){if(t instanceof s){if(t.error==="ExpiredToken")return new Of(t);if(t.error==="InvalidToken")return new Gf(t);if(t.error==="TokenRequired")return new Hf(t)}return t}class Kf extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}let Jf=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Qf=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Xf=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Zf=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Yf(t){if(t instanceof s){if(t.error==="BlobNotFound")return new Kf(t);if(t.error==="RepoNotFound")return new Jf(t);if(t.error==="RepoTakendown")return new Qf(t);if(t.error==="RepoSuspended")return new Xf(t);if(t.error==="RepoDeactivated")return new Zf(t)}return t}class em extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}let tm=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},rm=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},om=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},im=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function nm(t){if(t instanceof s){if(t.error==="BlockNotFound")return new em(t);if(t.error==="RepoNotFound")return new tm(t);if(t.error==="RepoTakendown")return new rm(t);if(t.error==="RepoSuspended")return new om(t);if(t.error==="RepoDeactivated")return new im(t)}return t}class sm extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function am(t){return t instanceof s&&t.error==="HeadNotFound"?new sm(t):t}class cm extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function dm(t){return t instanceof s&&t.error==="HostNotFound"?new cm(t):t}let pm=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},lm=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},um=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},fm=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function mm(t){if(t instanceof s){if(t.error==="RepoNotFound")return new pm(t);if(t.error==="RepoTakendown")return new lm(t);if(t.error==="RepoSuspended")return new um(t);if(t.error==="RepoDeactivated")return new fm(t)}return t}let ym=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},hm=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},gm=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},bm=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},vm=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function wm(t){if(t instanceof s){if(t.error==="RecordNotFound")return new ym(t);if(t.error==="RepoNotFound")return new hm(t);if(t.error==="RepoTakendown")return new gm(t);if(t.error==="RepoSuspended")return new bm(t);if(t.error==="RepoDeactivated")return new vm(t)}return t}let km=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},xm=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},Am=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}},jm=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function qm(t){if(t instanceof s){if(t.error==="RepoNotFound")return new km(t);if(t.error==="RepoTakendown")return new xm(t);if(t.error==="RepoSuspended")return new Am(t);if(t.error==="RepoDeactivated")return new jm(t)}return t}let Sm=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Im(t){return t instanceof s&&t.error==="RepoNotFound"?new Sm(t):t}let Rm=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};class Em extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Cm extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Tm extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Dm(t){if(t instanceof s){if(t.error==="RepoNotFound")return new Rm(t);if(t.error==="RepoTakendown")return new Em(t);if(t.error==="RepoSuspended")return new Cm(t);if(t.error==="RepoDeactivated")return new Tm(t)}return t}class Pm extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Lm(t){return t instanceof s&&t.error==="HostBanned"?new Pm(t):t}class _m extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function zm(t){return t instanceof s&&t.error==="InvalidEmail"?new _m(t):t}class Vm extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Bm(t){return t instanceof s&&t.error==="InvalidScopeReference"?new Vm(t):t}let Mm=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Nm(t){return t instanceof s&&t.error==="DuplicateTemplateName"?new Mm(t):t}class Fm extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function $m(t){return t instanceof s&&t.error==="DuplicateTemplateName"?new Fm(t):t}class Um extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Om extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Gm(t){if(t instanceof s){if(t.error==="SubjectHasAction")return new Um(t);
1if(t.error==="DuplicateExternalId")return new Om(t)}return t}let Hm=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Wm(t){return t instanceof s&&t.error==="RepoNotFound"?new Hm(t):t}class Km extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Jm(t){return t instanceof s&&t.error==="RecordNotFound"?new Km(t):t}class Qm extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Xm(t){return t instanceof s&&t.error==="RepoNotFound"?new Qm(t):t}let Zm=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Ym(t){return t instanceof s&&t.error==="InvalidAssignment"?new Zm(t):t}class ey extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function ty(t){return t instanceof s&&t.error==="ConflictingQueue"?new ey(t):t}class ry extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function oy(t){return t instanceof s&&t.error==="OutOfRange"?new ry(t):t}let iy=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function ny(t){return t instanceof s&&t.error==="InvalidAssignment"?new iy(t):t}class sy extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}let ay=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function cy(t){if(t instanceof s){if(t.error==="AlreadyAssigned")return new sy(t);if(t.error==="InvalidAssignment")return new ay(t)}return t}let dy=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};class py extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class ly extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function uy(t){if(t instanceof s){if(t.error==="ReportNotFound")return new dy(t);if(t.error==="InvalidStateTransition")return new py(t);if(t.error==="AlreadyInTargetState")return new ly(t)}return t}let fy=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function my(t){return t instanceof s&&t.error==="NotFound"?new fy(t):t}class yy extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function hy(t){return t instanceof s&&t.error==="NotFound"?new yy(t):t}class gy extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class by extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class vy extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class wy extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class ky extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function xy(t){if(t instanceof s){if(t.error==="ReportNotFound")return new gy(t);if(t.error==="ReportClosed")return new by(t);if(t.error==="AlreadyInTargetQueue")return new vy(t);if(t.error==="QueueNotFound")return new wy(t);if(t.error==="QueueDisabled")return new ky(t)}return t}class Ay extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function jy(t){return t instanceof s&&t.error==="InvalidAssignment"?new Ay(t):t}class qy extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}class Sy extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Iy(t){if(t instanceof s){if(t.error==="InvalidUrl")return new qy(t);if(t.error==="RuleAlreadyExists")return new Sy(t)}return t}let Ry=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Ey(t){return t instanceof s&&t.error==="RuleNotFound"?new Ry(t):t}class Cy extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Ty(t){return t instanceof s&&t.error==="RuleNotFound"?new Cy(t):t}let Dy=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function Py(t){return t instanceof s&&t.error==="SetNotFound"?new Dy(t):t}let Ly=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};function _y(t){return t instanceof s&&t.error==="SetNotFound"?new Ly(t):t}class zy extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Vy(t){return t instanceof s&&t.error==="SetNotFound"?new zy(t):t}class By extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function My(t){return t instanceof s&&t.error==="MemberAlreadyExists"?new By(t):t}let Ny=class extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}};class Fy extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function $y(t){if(t instanceof s){if(t.error==="MemberNotFound")return new Ny(t);if(t.error==="CannotDeleteSelf")return new Fy(t)}return t}class Uy extends s{constructor(e){super(e.status,e.error,e.message,e.headers,{cause:e})}}function Oy(t){return t instanceof s&&t.error==="MemberNotFound"?new Uy(t):t}const V=Po,P=Mt,v="app.bsky.actor.defs",Fo="adultContentPref";function Gy(t){return V(t,v,Fo)}function Hy(t){return P(t,v,Fo)}const $o="contentLabelPref";function Ye(t){return V(t,v,$o)}function Wy(t){return P(t,v,$o)}const Uo="savedFeedsPrefV2";function Ky(t){return V(t,v,Uo)}function Jy(t){return P(t,v,Uo)}const Oo="savedFeedsPref";function Er(t){return V(t,v,Oo)}function Qy(t){return P(t,v,Oo)}const Go="personalDetailsPref";function Xy(t){return V(t,v,Go)}function Zy(t){return P(t,v,Go)}const Yy="declaredAgePref";function eh(t){return P(t,v,Yy)}const Ho="feedViewPref";function th(t){return V(t,v,Ho)}function rh(t){return P(t,v,Ho)}const Wo="threadViewPref";function oh(t){return V(t,v,Wo)}function ih(t){return P(t,v,Wo)}const Ko="interestsPref";function nh(t){return V(t,v,Ko)}function sh(t){return P(t,v,Ko)}const Jo="mutedWordsPref";function et(t){return V(t,v,Jo)}function ah(t){return P(t,v,Jo)}const Qo="hiddenPostsPref";function ch(t){return V(t,v,Qo)}function dh(t){return P(t,v,Qo)}const Xo="labelersPref";function Cr(t){return V(t,v,Xo)}function ph(t){return P(t,v,Xo)}const Zo="bskyAppStatePref";function ce(t){return V(t,v,Zo)}function lh(t){return P(t,v,Zo)}const uh="bskyAppProgressGuide";function fh(t){return P(t,v,uh)}const Yo="verificationPrefs";function mh(t){return V(t,v,Yo)}function ei(t){return P(t,v,Yo)}const ti="liveEventPreferences";function yh(t){return V(t,v,ti)}function hh(t){return P(t,v,ti)}const ri="postInteractionSettingsPref";function gh(t){return V(t,v,ri)}function oi(t){return P(t,v,ri)}const bh=Mt,vh="app.bsky.actor.profile",wh="main";function ii(t){return bh(t,vh,wh,!0)}const kh=Mt,xh="com.atproto.label.defs",Ah="labelValueDefinition";function jh(t){return kh(t,xh,Ah)}class qh{constructor(e){this._client=e,this.bsky=new Sh(e)}}class Sh{constructor(e){this._client=e,this.actor=new Ih(e),this.ageassurance=new Ch(e),this.bookmark=new Th(e),this.contact=new Dh(e),this.draft=new Ph(e),this.embed=new Lh(e),this.feed=new _h(e),this.graph=new $h(e),this.labeler=new Qh(e),this.notification=new Zh(e),this.richtext=new eg(e),this.unspecced=new tg(e),this.video=new rg(e)}}class Ih{constructor(e){this._client=e,this.profile=new Rh(e),this.status=new Eh(e)}getPreferences(e,r){return this._client.call("app.bsky.actor.getPreferences",e,void 0,r)}getProfile(e,r){return this._client.call("app.bsky.actor.getProfile",e,void 0,r)}getProfiles(e,r){return this._client.call("app.bsky.actor.getProfiles",e,void 0,r)}getSuggestions(e,r){return this._client.call("app.bsky.actor.getSuggestions",e,void 0,r)}putPreferences(e,r){return this._client.call("app.bsky.actor.putPreferences",r?.qp,e,r)}searchActors(e,r){return this._client.call("app.bsky.actor.searchActors",e,void 0,r)}searchActorsTypeahead(e,r){return this._client.call("app.bsky.actor.searchActorsTypeahead",e,void 0,r)}}class Rh{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.actor.profile",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.actor.profile",...e})).data}async create(e,r,o){const i="app.bsky.actor.profile";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,rkey:"self",...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="app.bsky.actor.profile";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.actor.profile",...e},{headers:r})}}class Eh{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.actor.status",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.actor.status",...e})).data}async create(e,r,o){const i="app.bsky.actor.status";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,rkey:"self",...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="app.bsky.actor.status";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.actor.status",...e},{headers:r})}}class Ch{constructor(e){this._client=e}begin(e,r){return this._client.call("app.bsky.ageassurance.begin",r?.qp,e,r).catch(o=>{throw jd(o)})}getConfig(e,r){return this._client.call("app.bsky.ageassurance.getConfig",e,void 0,r)}getState(e,r){return this._client.call("app.bsky.ageassurance.getState",e,void 0,r)}}class Th{constructor(e){this._client=e}createBookmark(e,r){return this._client.call("app.bsky.bookmark.createBookmark",r?.qp,e,r).catch(o=>{throw Sd(o)})}deleteBookmark(e,r){return this._client.call("app.bsky.bookmark.deleteBookmark",r?.qp,e,r).catch(o=>{throw Rd(o)})}getBookmarks(e,r){return this._client.call("app.bsky.bookmark.getBookmarks",e,void 0,r)}}class Dh{constructor(e){this._client=e}dismissMatch(e,r){return this._client.call("app.bsky.contact.dismissMatch",r?.qp,e,r).catch(o=>{throw Td(o)})}getMatches(e,r){return this._client.call("app.bsky.contact.getMatches",e,void 0,r).catch(o=>{throw zd(o)})}getSyncStatus(e,r){return this._client.call("app.bsky.contact.getSyncStatus",e,void 0,r).catch(o=>{throw Md(o)})}
1importContacts(e,r){return this._client.call("app.bsky.contact.importContacts",r?.qp,e,r).catch(o=>{throw Gd(o)})}removeData(e,r){return this._client.call("app.bsky.contact.removeData",r?.qp,e,r).catch(o=>{throw Kd(o)})}sendNotification(e,r){return this._client.call("app.bsky.contact.sendNotification",r?.qp,e,r)}startPhoneVerification(e,r){return this._client.call("app.bsky.contact.startPhoneVerification",r?.qp,e,r).catch(o=>{throw Yd(o)})}verifyPhone(e,r){return this._client.call("app.bsky.contact.verifyPhone",r?.qp,e,r).catch(o=>{throw np(o)})}}class Ph{constructor(e){this._client=e}createDraft(e,r){return this._client.call("app.bsky.draft.createDraft",r?.qp,e,r).catch(o=>{throw ap(o)})}deleteDraft(e,r){return this._client.call("app.bsky.draft.deleteDraft",r?.qp,e,r)}getDrafts(e,r){return this._client.call("app.bsky.draft.getDrafts",e,void 0,r)}updateDraft(e,r){return this._client.call("app.bsky.draft.updateDraft",r?.qp,e,r)}}class Lh{constructor(e){this._client=e}getEmbedExternalView(e,r){return this._client.call("app.bsky.embed.getEmbedExternalView",e,void 0,r)}}class _h{constructor(e){this._client=e,this.generator=new zh(e),this.like=new Vh(e),this.post=new Bh(e),this.postgate=new Mh(e),this.repost=new Nh(e),this.threadgate=new Fh(e)}describeFeedGenerator(e,r){return this._client.call("app.bsky.feed.describeFeedGenerator",e,void 0,r)}getActorFeeds(e,r){return this._client.call("app.bsky.feed.getActorFeeds",e,void 0,r)}getActorLikes(e,r){return this._client.call("app.bsky.feed.getActorLikes",e,void 0,r).catch(o=>{throw pp(o)})}getAuthorFeed(e,r){return this._client.call("app.bsky.feed.getAuthorFeed",e,void 0,r).catch(o=>{throw fp(o)})}getFeed(e,r){return this._client.call("app.bsky.feed.getFeed",e,void 0,r).catch(o=>{throw yp(o)})}getFeedGenerator(e,r){return this._client.call("app.bsky.feed.getFeedGenerator",e,void 0,r)}getFeedGenerators(e,r){return this._client.call("app.bsky.feed.getFeedGenerators",e,void 0,r)}getFeedSkeleton(e,r){return this._client.call("app.bsky.feed.getFeedSkeleton",e,void 0,r).catch(o=>{throw gp(o)})}getLikes(e,r){return this._client.call("app.bsky.feed.getLikes",e,void 0,r)}getListFeed(e,r){return this._client.call("app.bsky.feed.getListFeed",e,void 0,r).catch(o=>{throw vp(o)})}getPostThread(e,r){return this._client.call("app.bsky.feed.getPostThread",e,void 0,r).catch(o=>{throw kp(o)})}getPosts(e,r){return this._client.call("app.bsky.feed.getPosts",e,void 0,r)}getQuotes(e,r){return this._client.call("app.bsky.feed.getQuotes",e,void 0,r)}getRepostedBy(e,r){return this._client.call("app.bsky.feed.getRepostedBy",e,void 0,r)}getSuggestedFeeds(e,r){return this._client.call("app.bsky.feed.getSuggestedFeeds",e,void 0,r)}getTimeline(e,r){return this._client.call("app.bsky.feed.getTimeline",e,void 0,r)}searchPosts(e,r){return this._client.call("app.bsky.feed.searchPosts",e,void 0,r).catch(o=>{throw Ap(o)})}sendInteractions(e,r){return this._client.call("app.bsky.feed.sendInteractions",r?.qp,e,r)}}class zh{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.generator",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.generator",...e})).data}async create(e,r,o){const i="app.bsky.feed.generator";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="app.bsky.feed.generator";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.generator",...e},{headers:r})}}class Vh{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.like",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.like",...e})).data}async create(e,r,o){const i="app.bsky.feed.like";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="app.bsky.feed.like";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.like",...e},{headers:r})}}class Bh{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.post",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.post",...e})).data}async create(e,r,o){const i="app.bsky.feed.post";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="app.bsky.feed.post";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.post",...e},{headers:r})}}class Mh{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.postgate",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.postgate",...e})).data}async create(e,r,o){const i="app.bsky.feed.postgate";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="app.bsky.feed.postgate";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.postgate",...e},{headers:r})}}class Nh{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.repost",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.repost",...e})).data}async create(e,r,o){const i="app.bsky.feed.repost";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="app.bsky.feed.repost";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.repost",...e},{headers:r})}}class Fh{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.feed.threadgate",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.feed.threadgate",...e})).data}async create(e,r,o){const i="app.bsky.feed.threadgate";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="app.bsky.feed.threadgate";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.feed.threadgate",...e},{headers:r})}}class $h{constructor(e){this._client=e,this.block=new Uh(e),this.follow=new Oh(e),this.list=new Gh(e),this.listblock=new Hh(e),this.listitem=new Wh(e),this.starterpack=new Kh(e),this.verification=new Jh(e)}getActorStarterPacks(e,r){return this._client.call("app.bsky.graph.getActorStarterPacks",e,void 0,r)}getBlocks(e,r){return this._client.call("app.bsky.graph.getBlocks",e,void 0,r)}getFollowers(e,r){return this._client.call("app.bsky.graph.getFollowers",e,void 0,r)}getFollows(e,r){return this._client.call("app.bsky.graph.getFollows",e,void 0,r)}getKnownFollowers(e,r){return this._client.call("app.bsky.graph.getKnownFollowers",e,void 0,r)}getList(e,r){return this._client.call("app.bsky.graph.getList",e,void 0,r)}getListBlocks(e,r){return this._client.call("app.bsky.graph.getListBlocks",e,void 0,r)}getListMutes(e,r){return this._client.call("app.bsky.graph.getListMutes",e,void 0,r)}getLists(e,r){return this._client.call("app.bsky.graph.getLists",e,void 0,r)}getListsWithMembership(e,r){return this._client.call("app.bsky.graph.getListsWithMembership",e,void 0,r)}getMutes(e,r){return this._client.call("app.bsky.graph.getMutes",e,void 0,r)}getRelationships(e,r){return this._client.call("app.bsky.graph.getRelationships",e,void 0,r).catch(o=>{throw qp(o)})}getStarterPack(e,r){return this._client.call("app.bsky.graph.getStarterPack",e,void 0,r)}getStarterPacks(e,r){return this._client.call("app.bsky.graph.getStarterPacks",e,void 0,r)}getStarterPacksWithMembership(e,r){return this._client.call("app.bsky.graph.getStarterPacksWithMembership",e,void 0,r)}getSuggestedFollowsByActor(e,r){return this._client.call("app.bsky.graph.getSuggestedFollowsByActor",e,void 0,r)}muteActor(e,r){return this._client.call("app.bsky.graph.muteActor",r?.qp,e,r)}muteActorList(e,r){return this._client.call("app.bsky.graph.muteActorList",r?.qp,e,r)}muteThread(e,r){return this._client.call("app.bsky.graph.muteThread",r?.qp,e,r)}searchStarterPacks(e,r){return this._client.call("app.bsky.graph.searchStarterPacks",e,void 0,r)}unmuteActor(e,r){return this._client.call("app.bsky.graph.unmuteActor",r?.qp,e,r)}unmuteActorList(e,r){return this._client.call("app.bsky.graph.unmuteActorList",r?.qp,e,r)}unmuteThread(e,r){return this._client.call("app.bsky.graph.unmuteThread",r?.qp,e,r)}}class Uh{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.block",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.block",...e})).data}async create(e,r,o){const i="app.bsky.graph.block";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="app.bsky.graph.block";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.block",...e},{headers:r})}}class Oh{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.follow",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.follow",...e})).data}async create(e,r,o){const i="app.bsky.graph.follow";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="app.bsky.graph.follow";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.follow",...e},{headers:r})}}class Gh{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.list",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.list",...e})).data}async create(e,r,o){const i="app.bsky.graph.list";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="app.bsky.graph.list";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.list",...e},{headers:r})}}class Hh{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.listblock",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.listblock",...e})).data}async create(e,r,o){const i="app.bsky.graph.listblock";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="app.bsky.graph.listblock";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.listblock",...e},{headers:r})}}class Wh{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.listitem",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.listitem",...e})).data}async create(e,r,o){const i="app.bsky.graph.listitem";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="app.bsky.graph.listitem";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.listitem",...e},{headers:r})}}class Kh{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.starterpack",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.starterpack",...e})).data}async create(e,r,o){const i="app.bsky.graph.starterpack";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="app.bsky.graph.starterpack";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.starterpack",...e},{headers:r})}}class Jh{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.graph.verification",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.graph.verification",...e})).data}async create(e,r,o){const i="app.bsky.graph.verification";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="app.bsky.graph.verification";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.graph.verification",...e},{headers:r})}}class Qh{constructor(e){this._client=e,this.service=new Xh(e)}getServices(e,r){return this._client.call("app.bsky.labeler.getServices",e,void 0,r)}}class Xh{construct
1or(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.labeler.service",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.labeler.service",...e})).data}async create(e,r,o){const i="app.bsky.labeler.service";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,rkey:"self",...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="app.bsky.labeler.service";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.labeler.service",...e},{headers:r})}}class Zh{constructor(e){this._client=e,this.declaration=new Yh(e)}getPreferences(e,r){return this._client.call("app.bsky.notification.getPreferences",e,void 0,r)}getUnreadCount(e,r){return this._client.call("app.bsky.notification.getUnreadCount",e,void 0,r)}listActivitySubscriptions(e,r){return this._client.call("app.bsky.notification.listActivitySubscriptions",e,void 0,r)}listNotifications(e,r){return this._client.call("app.bsky.notification.listNotifications",e,void 0,r)}putActivitySubscription(e,r){return this._client.call("app.bsky.notification.putActivitySubscription",r?.qp,e,r)}putPreferences(e,r){return this._client.call("app.bsky.notification.putPreferences",r?.qp,e,r)}putPreferencesV2(e,r){return this._client.call("app.bsky.notification.putPreferencesV2",r?.qp,e,r)}registerPush(e,r){return this._client.call("app.bsky.notification.registerPush",r?.qp,e,r)}unregisterPush(e,r){return this._client.call("app.bsky.notification.unregisterPush",r?.qp,e,r)}updateSeen(e,r){return this._client.call("app.bsky.notification.updateSeen",r?.qp,e,r)}}class Yh{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"app.bsky.notification.declaration",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"app.bsky.notification.declaration",...e})).data}async create(e,r,o){const i="app.bsky.notification.declaration";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,rkey:"self",...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="app.bsky.notification.declaration";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"app.bsky.notification.declaration",...e},{headers:r})}}class eg{constructor(e){this._client=e}}class tg{constructor(e){this._client=e}getAgeAssuranceState(e,r){return this._client.call("app.bsky.unspecced.getAgeAssuranceState",e,void 0,r)}getConfig(e,r){return this._client.call("app.bsky.unspecced.getConfig",e,void 0,r)}getOnboardingSuggestedStarterPacks(e,r){return this._client.call("app.bsky.unspecced.getOnboardingSuggestedStarterPacks",e,void 0,r)}getOnboardingSuggestedStarterPacksSkeleton(e,r){return this._client.call("app.bsky.unspecced.getOnboardingSuggestedStarterPacksSkeleton",e,void 0,r)}getOnboardingSuggestedUsersSkeleton(e,r){return this._client.call("app.bsky.unspecced.getOnboardingSuggestedUsersSkeleton",e,void 0,r)}getPopularFeedGenerators(e,r){return this._client.call("app.bsky.unspecced.getPopularFeedGenerators",e,void 0,r)}getPostThreadOtherV2(e,r){return this._client.call("app.bsky.unspecced.getPostThreadOtherV2",e,void 0,r)}getPostThreadV2(e,r){return this._client.call("app.bsky.unspecced.getPostThreadV2",e,void 0,r)}getSuggestedFeeds(e,r){return this._client.call("app.bsky.unspecced.getSuggestedFeeds",e,void 0,r)}getSuggestedFeedsSkeleton(e,r){return this._client.call("app.bsky.unspecced.getSuggestedFeedsSkeleton",e,void 0,r)}getSuggestedOnboardingUsers(e,r){return this._client.call("app.bsky.unspecced.getSuggestedOnboardingUsers",e,void 0,r)}getSuggestedStarterPacks(e,r){return this._client.call("app.bsky.unspecced.getSuggestedStarterPacks",e,void 0,r)}getSuggestedStarterPacksSkeleton(e,r){return this._client.call("app.bsky.unspecced.getSuggestedStarterPacksSkeleton",e,void 0,r)}getSuggestedUsers(e,r){return this._client.call("app.bsky.unspecced.getSuggestedUsers",e,void 0,r)}getSuggestedUsersForDiscover(e,r){return this._client.call("app.bsky.unspecced.getSuggestedUsersForDiscover",e,void 0,r)}getSuggestedUsersForDiscoverSkeleton(e,r){return this._client.call("app.bsky.unspecced.getSuggestedUsersForDiscoverSkeleton",e,void 0,r)}getSuggestedUsersForExplore(e,r){return this._client.call("app.bsky.unspecced.getSuggestedUsersForExplore",e,void 0,r)}getSuggestedUsersForExploreSkeleton(e,r){return this._client.call("app.bsky.unspecced.getSuggestedUsersForExploreSkeleton",e,void 0,r)}getSuggestedUsersForSeeMore(e,r){return this._client.call("app.bsky.unspecced.getSuggestedUsersForSeeMore",e,void 0,r)}getSuggestedUsersForSeeMoreSkeleton(e,r){return this._client.call("app.bsky.unspecced.getSuggestedUsersForSeeMoreSkeleton",e,void 0,r)}getSuggestedUsersSkeleton(e,r){return this._client.call("app.bsky.unspecced.getSuggestedUsersSkeleton",e,void 0,r)}getSuggestionsSkeleton(e,r){return this._client.call("app.bsky.unspecced.getSuggestionsSkeleton",e,void 0,r)}getTaggedSuggestions(e,r){return this._client.call("app.bsky.unspecced.getTaggedSuggestions",e,void 0,r)}getTrendingTopics(e,r){return this._client.call("app.bsky.unspecced.getTrendingTopics",e,void 0,r)}getTrends(e,r){return this._client.call("app.bsky.unspecced.getTrends",e,void 0,r)}getTrendsSkeleton(e,r){return this._client.call("app.bsky.unspecced.getTrendsSkeleton",e,void 0,r)}initAgeAssurance(e,r){return this._client.call("app.bsky.unspecced.initAgeAssurance",r?.qp,e,r).catch(o=>{throw Ep(o)})}searchActorsSkeleton(e,r){return this._client.call("app.bsky.unspecced.searchActorsSkeleton",e,void 0,r).catch(o=>{throw Tp(o)})}searchPostsSkeleton(e,r){return this._client.call("app.bsky.unspecced.searchPostsSkeleton",e,void 0,r).catch(o=>{throw Pp(o)})}searchStarterPacksSkeleton(e,r){return this._client.call("app.bsky.unspecced.searchStarterPacksSkeleton",e,void 0,r).catch(o=>{throw _p(o)})}}class rg{constructor(e){this._client=e}getJobStatus(e,r){return this._client.call("app.bsky.video.getJobStatus",e,void 0,r)}getUploadLimits(e,r){return this._client.call("app.bsky.video.getUploadLimits",e,void 0,r)}uploadVideo(e,r){return this._client.call("app.bsky.video.uploadVideo",r?.qp,e,r)}}class og{constructor(e){this._client=e,this.bsky=new ig(e)}}class ig{constructor(e){this._client=e,this.actor=new ng(e),this.convo=new ag(e),this.group=new cg(e),this.moderation=new dg(e)}}class ng{constructor(e){this._client=e,this.declaration=new sg(e)}deleteAccount(e,r){return this._client.call("chat.bsky.actor.deleteAccount",r?.qp,e,r)}exportAccountData(e,r){return this._client.call("chat.bsky.actor.exportAccountData",e,void 0,r)}getStatus(e,r){return this._client.call("chat.bsky.actor.getStatus",e,void 0,r)}}class sg{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"chat.bsky.actor.declaration",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"chat.bsky.actor.declaration",...e})).data}async create(e,r,o){const i="chat.bsky.actor.declaration";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,rkey:"self",...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="chat.bsky.actor.declaration";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"chat.bsky.actor.declaration",...e},{headers:r})}}class ag{constructor(e){this._client=e}acceptConvo(e,r){return this._client.call("chat.bsky.convo.acceptConvo",r?.qp,e,r).catch(o=>{throw Vp(o)})}addReaction(e,r){return this._client.call("chat.bsky.convo.addReaction",r?.qp,e,r).catch(o=>{throw Up(o)})}deleteMessageForSelf(e,r){return this._client.call("chat.bsky.convo.deleteMessageForSelf",r?.qp,e,r).catch(o=>{throw Hp(o)})}getConvo(e,r){return this._client.call("chat.bsky.convo.getConvo",e,void 0,r).catch(o=>{throw Kp(o)})}getConvoAvailability(e,r){return this._client.call("chat.bsky.convo.getConvoAvailability",e,void 0,r)}getConvoForMembers(e,r){return this._client.call("chat.bsky.convo.getConvoForMembers",e,void 0,r).catch(o=>{throw el(o)})}getConvoMembers(e,r){return this._client.call("chat.bsky.convo.getConvoMembers",e,void 0,r).catch(o=>{throw rl(o)})}getLog(e,r){return this._client.call("chat.bsky.convo.getLog",e,void 0,r)}getMessages(e,r){return this._client.call("chat.bsky.convo.getMessages",e,void 0,r).catch(o=>{throw il(o)})}leaveConvo(e,r){return this._client.call("chat.bsky.convo.leaveConvo",r?.qp,e,r).catch(o=>{throw al(o)})}listConvoRequests(e,r){return this._client.call("chat.bsky.convo.listConvoRequests",e,void 0,r)}listConvos(e,r){return this._client.call("chat.bsky.convo.listConvos",e,void 0,r)}lockConvo(e,r){return this._client.call("chat.bsky.convo.lockConvo",r?.qp,e,r).catch(o=>{throw ll(o)})}muteConvo(e,r){return this._client.call("chat.bsky.convo.muteConvo",r?.qp,e,r).catch(o=>{throw fl(o)})}removeReaction(e,r){return this._client.call("chat.bsky.convo.removeReaction",r?.qp,e,r).catch(o=>{throw bl(o)})}sendMessage(e,r){return this._client.call("chat.bsky.convo.sendMessage",r?.qp,e,r).catch(o=>{throw kl(o)})}sendMessageBatch(e,r){return this._client.call("chat.bsky.convo.sendMessageBatch",r?.qp,e,r).catch(o=>{throw jl(o)})}unlockConvo(e,r){return this._client.call("chat.bsky.convo.unlockConvo",r?.qp,e,r).catch(o=>{throw Il(o)})}unmuteConvo(e,r){return this._client.call("chat.bsky.convo.unmuteConvo",r?.qp,e,r).catch(o=>{throw El(o)})}updateAllRead(e,r){return this._client.call("chat.bsky.convo.updateAllRead",r?.qp,e,r)}updateRead(e,r){return this._client.call("chat.bsky.convo.updateRead",r?.qp,e,r).catch(o=>{throw Tl(o)})}}class cg{constructor(e){this._client=e}addMembers(e,r){return this._client.call("chat.bsky.group.addMembers",r?.qp,e,r).catch(o=>
1{throw Fl(o)})}approveJoinRequest(e,r){return this._client.call("chat.bsky.group.approveJoinRequest",r?.qp,e,r).catch(o=>{throw Gl(o)})}createGroup(e,r){return this._client.call("chat.bsky.group.createGroup",r?.qp,e,r).catch(o=>{throw Zl(o)})}createJoinLink(e,r){return this._client.call("chat.bsky.group.createJoinLink",r?.qp,e,r).catch(o=>{throw ru(o)})}disableJoinLink(e,r){return this._client.call("chat.bsky.group.disableJoinLink",r?.qp,e,r).catch(o=>{throw su(o)})}editGroup(e,r){return this._client.call("chat.bsky.group.editGroup",r?.qp,e,r).catch(o=>{throw pu(o)})}editJoinLink(e,r){return this._client.call("chat.bsky.group.editJoinLink",r?.qp,e,r).catch(o=>{throw mu(o)})}enableJoinLink(e,r){return this._client.call("chat.bsky.group.enableJoinLink",r?.qp,e,r).catch(o=>{throw vu(o)})}getJoinLinkPreviews(e,r){return this._client.call("chat.bsky.group.getJoinLinkPreviews",e,void 0,r)}listJoinRequests(e,r){return this._client.call("chat.bsky.group.listJoinRequests",e,void 0,r).catch(o=>{throw xu(o)})}listMutualGroups(e,r){return this._client.call("chat.bsky.group.listMutualGroups",e,void 0,r)}rejectJoinRequest(e,r){return this._client.call("chat.bsky.group.rejectJoinRequest",r?.qp,e,r).catch(o=>{throw qu(o)})}removeMembers(e,r){return this._client.call("chat.bsky.group.removeMembers",r?.qp,e,r).catch(o=>{throw Ru(o)})}requestJoin(e,r){return this._client.call("chat.bsky.group.requestJoin",r?.qp,e,r).catch(o=>{throw _u(o)})}}class dg{constructor(e){this._client=e}getActorMetadata(e,r){return this._client.call("chat.bsky.moderation.getActorMetadata",e,void 0,r)}getMessageContext(e,r){return this._client.call("chat.bsky.moderation.getMessageContext",e,void 0,r)}updateActorAccess(e,r){return this._client.call("chat.bsky.moderation.updateActorAccess",r?.qp,e,r)}}class pg{constructor(e){this._client=e,this.atproto=new lg(e),this.germnetwork=new kg(e)}}class lg{constructor(e){this._client=e,this.admin=new ug(e),this.identity=new fg(e),this.label=new mg(e),this.lexicon=new yg(e),this.moderation=new gg(e),this.repo=new bg(e),this.server=new ni(e),this.sync=new vg(e),this.temp=new wg(e)}}class ug{constructor(e){this._client=e}deleteAccount(e,r){return this._client.call("com.atproto.admin.deleteAccount",r?.qp,e,r)}disableAccountInvites(e,r){return this._client.call("com.atproto.admin.disableAccountInvites",r?.qp,e,r)}disableInviteCodes(e,r){return this._client.call("com.atproto.admin.disableInviteCodes",r?.qp,e,r)}enableAccountInvites(e,r){return this._client.call("com.atproto.admin.enableAccountInvites",r?.qp,e,r)}getAccountInfo(e,r){return this._client.call("com.atproto.admin.getAccountInfo",e,void 0,r)}getAccountInfos(e,r){return this._client.call("com.atproto.admin.getAccountInfos",e,void 0,r)}getInviteCodes(e,r){return this._client.call("com.atproto.admin.getInviteCodes",e,void 0,r)}getSubjectStatus(e,r){return this._client.call("com.atproto.admin.getSubjectStatus",e,void 0,r)}searchAccounts(e,r){return this._client.call("com.atproto.admin.searchAccounts",e,void 0,r)}sendEmail(e,r){return this._client.call("com.atproto.admin.sendEmail",r?.qp,e,r)}updateAccountEmail(e,r){return this._client.call("com.atproto.admin.updateAccountEmail",r?.qp,e,r)}updateAccountHandle(e,r){return this._client.call("com.atproto.admin.updateAccountHandle",r?.qp,e,r)}updateAccountPassword(e,r){return this._client.call("com.atproto.admin.updateAccountPassword",r?.qp,e,r)}updateAccountSigningKey(e,r){return this._client.call("com.atproto.admin.updateAccountSigningKey",r?.qp,e,r)}updateSubjectStatus(e,r){return this._client.call("com.atproto.admin.updateSubjectStatus",r?.qp,e,r)}}class fg{constructor(e){this._client=e}getRecommendedDidCredentials(e,r){return this._client.call("com.atproto.identity.getRecommendedDidCredentials",e,void 0,r)}refreshIdentity(e,r){return this._client.call("com.atproto.identity.refreshIdentity",r?.qp,e,r).catch(o=>{throw Mu(o)})}requestPlcOperationSignature(e,r){return this._client.call("com.atproto.identity.requestPlcOperationSignature",r?.qp,e,r)}resolveDid(e,r){return this._client.call("com.atproto.identity.resolveDid",e,void 0,r).catch(o=>{throw $u(o)})}resolveHandle(e,r){return this._client.call("com.atproto.identity.resolveHandle",e,void 0,r).catch(o=>{throw Ou(o)})}resolveIdentity(e,r){return this._client.call("com.atproto.identity.resolveIdentity",e,void 0,r).catch(o=>{throw Ku(o)})}signPlcOperation(e,r){return this._client.call("com.atproto.identity.signPlcOperation",r?.qp,e,r)}submitPlcOperation(e,r){return this._client.call("com.atproto.identity.submitPlcOperation",r?.qp,e,r)}updateHandle(e,r){return this._client.call("com.atproto.identity.updateHandle",r?.qp,e,r)}}
1class mg{constructor(e){this._client=e}queryLabels(e,r){return this._client.call("com.atproto.label.queryLabels",e,void 0,r)}}class yg{constructor(e){this._client=e,this.schema=new hg(e)}resolveLexicon(e,r){return this._client.call("com.atproto.lexicon.resolveLexicon",e,void 0,r).catch(o=>{throw Qu(o)})}}class hg{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"com.atproto.lexicon.schema",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"com.atproto.lexicon.schema",...e})).data}async create(e,r,o){const i="com.atproto.lexicon.schema";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="com.atproto.lexicon.schema";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"com.atproto.lexicon.schema",...e},{headers:r})}}class gg{constructor(e){this._client=e}createReport(e,r){return this._client.call("com.atproto.moderation.createReport",r?.qp,e,r)}}class bg{constructor(e){this._client=e}applyWrites(e,r){return this._client.call("com.atproto.repo.applyWrites",r?.qp,e,r).catch(o=>{throw Zu(o)})}createRecord(e,r){return this._client.call("com.atproto.repo.createRecord",r?.qp,e,r).catch(o=>{throw ef(o)})}deleteRecord(e,r){return this._client.call("com.atproto.repo.deleteRecord",r?.qp,e,r).catch(o=>{throw rf(o)})}describeRepo(e,r){return this._client.call("com.atproto.repo.describeRepo",e,void 0,r)}getRecord(e,r){return this._client.call("com.atproto.repo.getRecord",e,void 0,r).catch(o=>{throw nf(o)})}importRepo(e,r){return this._client.call("com.atproto.repo.importRepo",r?.qp,e,r)}listMissingBlobs(e,r){return this._client.call("com.atproto.repo.listMissingBlobs",e,void 0,r)}listRecords(e,r){return this._client.call("com.atproto.repo.listRecords",e,void 0,r)}putRecord(e,r){return this._client.call("com.atproto.repo.putRecord",r?.qp,e,r).catch(o=>{throw sf(o)})}uploadBlob(e,r){return this._client.call("com.atproto.repo.uploadBlob",r?.qp,e,r)}}class ni{constructor(e){this._client=e}activateAccount(e,r){return this._client.call("com.atproto.server.activateAccount",r?.qp,e,r)}checkAccountStatus(e,r){return this._client.call("com.atproto.server.checkAccountStatus",e,void 0,r)}confirmEmail(e,r){return this._client.call("com.atproto.server.confirmEmail",r?.qp,e,r).catch(o=>{throw lf(o)})}createAccount(e,r){return this._client.call("com.atproto.server.createAccount",r?.qp,e,r).catch(o=>{throw vf(o)})}createAppPassword(e,r){return this._client.call("com.atproto.server.createAppPassword",r?.qp,e,r).catch(o=>{throw kf(o)})}createInviteCode(e,r){return this._client.call("com.atproto.server.createInviteCode",r?.qp,e,r)}createInviteCodes(e,r){return this._client.call("com.atproto.server.createInviteCodes",r?.qp,e,r)}createSession(e,r){return this._client.call("com.atproto.server.createSession",r?.qp,e,r).catch(o=>{throw jf(o)})}deactivateAccount(e,r){return this._client.call("com.atproto.server.deactivateAccount",r?.qp,e,r)}deleteAccount(e,r){return this._client.call("com.atproto.server.deleteAccount",r?.qp,e,r).catch(o=>{throw If(o)})}deleteSession(e,r){return this._client.call("com.atproto.server.deleteSession",r?.qp,e,r).catch(o=>{throw Cf(o)})}describeServer(e,r){return this._client.call("com.atproto.server.describeServer",e,void 0,r)}getAccountInviteCodes(e,r){return this._client.call("com.atproto.server.getAccountInviteCodes",e,void 0,r).catch(o=>{throw Df(o)})}getServiceAuth(e,r){return this._client.call("com.atproto.server.getServiceAuth",e,void 0,r).catch(o=>{throw Lf(o)})}getSession(e,r){return this._client.call("com.atproto.server.getSession",e,void 0,r)}listAppPasswords(e,r){return this._client.call("com.atproto.server.listAppPasswords",e,void 0,r).catch(o=>{throw zf(o)})}refreshSession(e,r){return this._client.call("com.atproto.server.refreshSession",r?.qp,e,r).catch(o=>{throw Nf(o)})}requestAccountDelete(e,r){return this._client.call("com.atproto.server.requestAccountDelete",r?.qp,e,r)}requestEmailConfirmation(e,r){return this._client.call("com.atproto.server.requestEmailConfirmation",r?.qp,e,r)}requestEmailUpdate(e,r){return this._client.call("com.atproto.server.requestEmailUpdate",r?.qp,e,r)}requestPasswordReset(e,r){return this._client.call("com.atproto.server.requestPasswordReset",r?.qp,e,r)}reserveSigningKey(e,r){return this._client.call("com.atproto.server.reserveSigningKey",r?.qp,e,r)}resetPassword(e,r){return this._client.call("com.atproto.server.resetPassword",r?.qp,e,r).catch(o=>{throw Uf(o)})}revokeAppPassword(e,r){return this._client.call("com.atproto.server.revokeAppPassword",r?.qp,e,r)}updateEmail(e,r){return this._client.call("com.atproto.server.updateEmail",r?.qp,e,r).catch(o=>{throw Wf(o)})}}class vg{constructor(e){this._client=e}getBlob(e,r){return this._client.call("com.atproto.sync.getBlob",e,void 0,r).catch(o=>{throw Yf(o)})}getBlocks(e,r){return this._client.call("com.atproto.sync.getBlocks",e,void 0,r).catch(o=>{throw nm(o)})}getCheckout(e,r){return this._client.call("com.atproto.sync.getCheckout",e,void 0,r)}getHead(e,r){return this._client.call("com.atproto.sync.getHead",e,void 0,r).catch(o=>{throw am(o)})}getHostStatus(e,r){return this._client.call("com.atproto.sync.getHostStatus",e,void 0,r).catch(o=>{throw dm(o)})}getLatestCommit(e,r){return this._client.call("com.atproto.sync.getLatestCommit",e,void 0,r).catch(o=>{throw mm(o)})}getRecord(e,r){return this._client.call("com.atproto.sync.getRecord",e,void 0,r).catch(o=>{throw wm(o)})}getRepo(e,r){return this._client.call("com.atproto.sync.getRepo",e,void 0,r).catch(o=>{throw qm(o)})}getRepoStatus(e,r){return this._client.call("com.atproto.sync.getRepoStatus",e,void 0,r).catch(o=>{throw Im(o)})}listBlobs(e,r){return this._client.call("com.atproto.sync.listBlobs",e,void 0,r).catch(o=>{throw Dm(o)})}listHosts(e,r){return this._client.call("com.atproto.sync.listHosts",e,void 0,r)}listRepos(e,r){return this._client.call("com.atproto.sync.listRepos",e,void 0,r)}listReposByCollection(e,r){return this._client.call("com.atproto.sync.listReposByCollection",e,void 0,r)}notifyOfUpdate(e,r){return this._client.call("com.atproto.sync.notifyOfUpdate",r?.qp,e,r)}requestCrawl(e,r){return this._client.call("com.atproto.sync.requestCrawl",r?.qp,e,r).catch(o=>{throw Lm(o)})}}class wg{constructor(e){this._client=e}addReservedHandle(e,r){return this._client.call("com.atproto.temp.addReservedHandle",r?.qp,e,r)}checkHandleAvailability(e,r){return this._client.call("com.atproto.temp.checkHandleAvailability",e,void 0,r).catch(o=>{throw zm(o)})}checkSignupQueue(e,r){return this._client.call("com.atproto.temp.checkSignupQueue",e,void 0,r)}dereferenceScope(e,r){return this._client.call("com.atproto.temp.dereferenceScope",e,void 0,r).catch(o=>{throw Bm(o)})}fetchLabels(e,r){return this._client.call("com.atproto.temp.fetchLabels",e,void 0,r)}requestPhoneVerification(e,r){return this._client.call("com.atproto.temp.requestPhoneVerification",r?.qp,e,r)}revokeAccountCredentials(e,r){return this._client.call("com.atproto.temp.revokeAccountCredentials",r?.qp,e,r)}}class kg{constructor(e){this._client=e,this.declaration=new xg(e)}}class xg{constructor(e){this._client=e}async list(e){return(await this._client.call("com.atproto.repo.listRecords",{collection:"com.germnetwork.declaration",...e})).data}async get(e){return(await this._client.call("com.atproto.repo.getRecord",{collection:"com.germnetwork.declaration",...e})).data}async create(e,r,o){const i="com.germnetwork.declaration";return(await this._client.call("com.atproto.repo.createRecord",void 0,{collection:i,rkey:"self",...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async put(e,r,o){const i="com.germnetwork.declaration";return(await this._client.call("com.atproto.repo.putRecord",void 0,{collection:i,...e,record:{...r,$type:i}},{encoding:"application/json",headers:o})).data}async delete(e,r){await this._client.call("com.atproto.repo.deleteRecord",void 0,{collection:"com.germnetwork.declaration",...e},{headers:r})}}class Ag{constructor(e){this._client=e,this.ozone=new jg(e)}}class jg{constructor(e){this._client=e,this.communication=new qg(e),this.hosting=new Sg(e),this.moderation=new Ig(e),this.queue=new Rg(e),this.report=new Eg(e),this.safelink=new Cg(e),this.server=new Tg(e),this.set=new Dg(e),this.setting=new Pg(e),this.signature=new Lg(e),this.team=new _g(e),this.verification=new zg(e)}}class qg{constructor(e){this._client=e}createTemplate(e,r){return this._client.call("tools.ozone.communication.createTemplate",r?.qp,e,r).catch(o=>{throw Nm(o)})}deleteTemplate(e,r){return this._client.call("tools.ozone.communication.deleteTemplate",r?.qp,e,r)}listTemplates(e,r){return this._client.call("tools.ozone.communication.listTemplates",e,void 0,r)}updateTemplate(e,r){return this._client.call("tools.ozone.communication.updateTemplate",r?.qp,e,r).catch(o=>{throw $m(o)})}}class Sg{constructor(e){this._client=e}getAccountHistory(e,r){return this._client.call("tools.ozone.hosting.getAccountHistory",e,void 0,r)}}class Ig{constructor(e){this._client=e}cancelScheduledActions(e,r){return this._client.call("tools.ozone.moderation.cancelScheduledActions",r?.qp,e,r)}emitEvent(e,r){return this._client.call("tools.ozone.moderation.emitEvent",r?.qp,e,r).catch(o=>{throw Gm(o)})}getAccountTimeline(e,r){return this._client.call("tools.ozone.moderation.getAccountTimeline",e,void 0,r).catch(o=>{throw Wm(o)})}getEvent(e,r){return this._client.call("tools.ozone.moderation.getEvent",e,void 0,r)}getRecord(e,r){return this._client.call("tools.ozone.moderation.getRecord",e,void 0,r).catch(o=>{throw Jm(o)})}getRecords(e,r){return this._client.call("tools.ozone.moderation.getRecords",e,void 0,r)}getRepo(e,r){return this._client.call("tools.ozone.moderation.getRepo",e,void 0,r).catch(o=>{throw Xm(o)})}getReporterStats(e,r){return this._client.call("tools.ozone.moderation.getReporterStats",e,void 0,r)}getRepos(e,r){return this._client.call("tools.ozone.moderation.getRepos",e,void 0,r)}getSubjects(e,r){return this._client.call("tools.ozone.moderation.getSubjects",e,void 0,r)}listScheduledActions(e,r){return this._client.call("tools.ozone.moderation.listScheduledActions",r?.qp,e,r)}queryEvents(e,r){return this._client.call("tools.ozone.moderation.queryEvents",e,void 0,r)}queryStatuses(e,r){return this._client.call("tools.ozone.moderation.queryStatuses",e,void 0,r)}scheduleAction(e,r){return this._client.call("tools.ozone.moderation.scheduleAction",r?.qp,e,r)}searchRepos(e,r){return this._client.call("tools.ozone.moderation.searchRepos",e,void 0,r)}}class Rg{constructor(e){this._client=e}assignModerator(e,r){return this._client.call("tools.ozone.queue.assignModerator",r?.qp,e,r).catch(o=>{throw Ym(o)})}createQueue(e,r){return this._client.call("tools.ozone.queue.createQueue",r?.qp,e,r).catch(o=>{throw ty(o)})}deleteQueue(e,r){return this._client.call("tools.ozone.queue.deleteQueue",r?.qp,e,r)}getAssignments(e,r){return this._client.call("tools.ozone.queue.getAssignments",e,void 0,r)}listQueues(e,r){return this._client.call("tools.ozone.queue.listQueues",e,void 0,r)}routeReports(e,r){return this._client.call("tools.ozone.queue.routeReports",r?.qp,e,r).catch(o=>{throw oy(o)})}unassignModerator(e,r){return this._client.call("tools.ozone.queue.unassignModerator",r?.qp,e,r).catch(o=>{throw ny(o)})}updateQueue(e,r){return this._client.call("tools.ozone.queue.updateQueue",r?.qp,e,r)}}class Eg{constructor(e){this._client=e}assignModerator(e,r){return this._client.call("tools.ozone.report.assignModerator",r?.qp,e,r).catch(o=>{throw cy(o)})}createActivity(e,r){return this._client.call("tools.ozone.report.createActivity",r?.qp,e,r).catch(o=>{throw uy(o)})}getAssignments(e,r){return this._client.call("tools.ozone.report.getAssignments",e,void 0,r)}getHistoricalStats(e,r){return this._client.call("tools.ozone.report.getHistoricalStats",e,void 0,r)}getLatestReport(e,r){return this._client.call("tools.ozone.report.getLatestReport",e,void 0,r).catch(o=>{throw my(o)})}getLiveStats(e,r){return this._client.call("tools.ozone.report.getLiveStats",e,void 0,r)}getReport(e,r){return this._client.call("tools.ozone.report.getReport",e,void 0,r).catch(o=>{throw hy(o)})}listActivities(e,r){return this._client.call("tools.ozone.report.listActivities",e,void 0,r)}queryReports(e,r){return this._client.call("tools.ozone.report.queryReports",e,void 0,r)}reassignQueue(e,r){return this._client.call("tools.ozone.report.reassignQueue",r?.qp,e,r).catch(o=>{throw xy(o)})}refreshStats(e,r){return this._client.call("tools.ozone.report.refreshStats",r?.qp,e,r)}unassignModerator(e,r){return this._client.call("tools.ozone.report.unassignModerator",r?.qp,e,r).catch(o=>{throw jy(o)})}}class Cg{constructor(e){this._client=e}addRule(e,r){return this._client.call("tools.ozone.safelink.addRule",r?.qp,e,r).catch(o=>{throw Iy(o)})}queryEvents(e,r){return this._client.call("tools.ozone.safelink.queryEvents",r?.qp,e,r)}queryRules(e,r){return this._client.call("tools.ozone.safelink.queryRules",r?.qp,e,r)}removeRule(e,r){return this._client.call("tools.ozone.safelink.removeRule",r?.qp,e,r).catch(o=>{throw Ey(o)})}updateRule(e,r){return this._client.call("tools.ozone.safelink.updateRule",r?.qp,e,r).catch(o=>{throw Ty(o)})}}class Tg{constructor(e){this._client=e}getConfig(e,r){return this._client.call("tools.ozone.server.getConfig",e,void 0,r)}}class Dg{constructor(e){this._client=e}addValues(e,r){return this._client.call("tools.ozone.set.addValues",r?.qp,e,r)}deleteSet(e,r){return this._client.call("tools.ozone.set.deleteSet",r?.qp,e,r).catch(o=>{throw Py(o)})}deleteValues(e,r){return this._client.call("tools.ozone.set.deleteValues",r?.qp,e,r).catch(o=>{throw _y(o)})}getValues(e,r){return this._client.call("tools.ozone.set.getValues",e,void 0,r).catch(o=>{throw Vy(o)})}querySets(e,r){return this._client.call("tools.ozone.set.querySets",e,void 0,r)}upsertSet(e,r){return this._client.call("tools.ozone.set.upsertSet",r?.qp,e,r)}}class Pg{constructor(e){this._client=e}listOptions(e,r){return this._client.call("tools.ozone.setting.listOptions",e,void 0,r)}removeOptions(e,r){return this._client.call("tools.ozone.setting.removeOptions",r?.qp,e,r)}upsertOption(e,r){return this._client.call("tools.ozone.setting.upsertOption",r?.qp,e,r)}}class Lg{constructor(e){this._client=e}findCorrelation(e,r){return this._client.call("tools.ozone.signature.findCorrelation",e,void 0,r)}findRelatedAccounts(e,r){return this._client.call("tools.ozone.signature.findRelatedAccounts",e,void 0,r)}searchAccounts(e,r){return this._client.call("tools.ozone.signature.searchAccounts",e,void 0,r)}}class _g{constructor(e){this._client=e}addMember(e,r){return this._client.call("tools.ozone.team.addMember",r?.qp,e,r).catch(o=>{throw My(o)})}deleteMember(e,r){return this._client.call("tools.ozone.team.deleteMember",r?.qp,e,r).catch(o=>{throw $y(o)})}listMembers(e,r){return this._client.call("tools.ozone.team.listMembers",e,void 0,r)}updateMember(e,r){return this._client.call("tools.ozone.team.updateMember",r?.qp,e,r).catch(o=>{throw Oy(o)})}}class zg{constructor(e){this._client=e}grantVerifications(e,r){return this._client.call("tools.ozone.verification.grantVerifications",r?.qp,e,r)}listVerifications(e,r){return this._client.call("tools.ozone.verification.listVerifications",e,void 0,r)}revokeVerifications(e,r){return this._client.call("tools.ozone.verification.revokeVerifications",r?.qp,e,r)}}new TextEncoder;new TextDecoder;const Vg={porn:"hide",sexual:"warn",nudity:"ignore","graphic-media":"warn"};var Tr;(function(t){t[t.High=0]="High",t[t.Medium=1]="Medium",t[t.Low=2]="Low"})(Tr||(Tr={}));function Bg(t,e){const r={account:{},profile:{},content:{}},o=t.severity==="alert"?"alert":t.severity==="inform"?"inform":void 0;t.blurs==="content"?(r.account.profileList=o,r.account.profileView=o,r.account.contentList="blur",r.account.contentView=t.adultOnly?"blur":o,r.profile.profileList=o,r.profile.profileView=o,r.content.contentList="blur",r.content.contentView=t.adultOnly?"blur":o):t.blurs==="media"?(r.account.profileList=o,r.account.profileView=o,r.account.avat
1ar="blur",r.account.banner="blur",r.profile.profileList=o,r.profile.profileView=o,r.profile.avatar="blur",r.profile.banner="blur",r.content.contentMedia="blur"):t.blurs==="none"&&(r.account.profileList=o,r.account.profileView=o,r.account.contentList=o,r.account.contentView=o,r.profile.profileList=o,r.profile.profileView=o,r.content.contentList=o,r.content.contentView=o);let i="warn";(t.defaultSetting==="hide"||t.defaultSetting==="ignore")&&(i=t.defaultSetting);const n=["no-self"];return t.adultOnly&&n.push("adult"),{...t,definedBy:e,configurable:!0,defaultSetting:i,flags:n,behaviors:r}}function Mg(t){return(t.policies?.labelValueDefinitions||[]).filter(E(jh)).map(e=>Bg(e,t.creator.did))}class Ng{#e=!1;#t=new Set;get acquired(){return this.#e}acquireAsync({timeout:e}={}){if(!this.#e)return this.#e=!0,Promise.resolve();if(e==null)return new Promise(i=>{this.#t.add(i)});let r,o;return Promise.race([new Promise(i=>{r=()=>{clearTimeout(o),i()},this.#t.add(r)}),new Promise((i,n)=>{o=setTimeout(()=>{this.#t.delete(r),n(new Error("Timed out waiting for lock"))},e)})])}tryAcquire(){return this.#e?!1:(this.#e=!0,!0)}release(){if(!this.#e)throw new Error("Cannot release an unacquired lock");if(this.#t.size>0){const[e]=this.#t;this.#t.delete(e),e()}else this.#e=!1}}const Fg=E(ii),Dr=E(Hy),ee=E(lh),tt=E(Wy),Pr=E(rh),Lr=E(dh),_r=E(sh),qe=E(ph),xe=E(ah),zr=E(Zy),$g=E(eh),Vr=E(oi),rt=E(Qy),Br=E(Jy),Mr=E(ih),Nr=E(ei),Fr=E(hh),$r={hideReplies:!1,hideRepliesByUnfollowed:!0,hideRepliesByLikeCount:0,hideReposts:!1,hideQuotePosts:!1},Ug={sort:"hotness"};var oe;const Ve=class Ve extends Ft{constructor(r){const o=typeof r=="object"&&"fetchHandler"in r?r:{did:void 0,fetchHandler:Mo(r)};super((i,n)=>{const a=new Headers(n?.headers);return this.proxy&&!a.has("atproto-proxy")&&a.set("atproto-proxy",this.proxy),a.set("atproto-accept-labelers",[...this.appLabelers.map(c=>`${c};redact`),...this.labelers,a.get("atproto-accept-labelers")?.trim()].filter(Boolean).join(", ")),this.sessionManager.fetchHandler(i,{...n,headers:a})},Bt);Gt(this,oe);this.com=new pg(this),this.app=new qh(this),this.chat=new og(this),this.tools=new Ag(this),this.labelers=[],this.uploadBlob=(i,n)=>this.com.atproto.repo.uploadBlob(i,n),this.resolveHandle=(i,n)=>this.com.atproto.identity.resolveHandle(i,n),this.updateHandle=(i,n)=>this.com.atproto.identity.updateHandle(i,n),this.createModerationReport=(i,n)=>this.com.atproto.moderation.createReport(i,n),this.getTimeline=(i,n)=>this.app.bsky.feed.getTimeline(i,n),this.getAuthorFeed=(i,n)=>this.app.bsky.feed.getAuthorFeed(i,n),this.getActorLikes=(i,n)=>this.app.bsky.feed.getActorLikes(i,n),this.getPostThread=(i,n)=>this.app.bsky.feed.getPostThread(i,n),this.getPost=i=>this.app.bsky.feed.post.get(i),this.getPosts=(i,n)=>this.app.bsky.feed.getPosts(i,n),this.getLikes=(i,n)=>this.app.bsky.feed.getLikes(i,n),this.getRepostedBy=(i,n)=>this.app.bsky.feed.getRepostedBy(i,n),this.getFollows=(i,n)=>this.app.bsky.graph.getFollows(i,n),this.getFollowers=(i,n)=>this.app.bsky.graph.getFollowers(i,n),this.getProfile=(i,n)=>this.app.bsky.actor.getProfile(i,n),this.getProfiles=(i,n)=>this.app.bsky.actor.getProfiles(i,n),this.getSuggestions=(i,n)=>this.app.bsky.actor.getSuggestions(i,n),this.searchActors=(i,n)=>this.app.bsky.actor.searchActors(i,n),this.searchActorsTypeahead=(i,n)=>this.app.bsky.actor.searchActorsTypeahead(i,n),this.listNotifications=(i,n)=>this.app.bsky.notification.listNotifications(i,n),this.countUnreadNotifications=(i,n)=>this.app.bsky.notification.getUnreadCount(i,n),this.getLabelers=(i,n)=>this.app.bsky.labeler.getServices(i,n),Ht(this,oe,new Ng),this.sessionManager=o}static configure(r){r.appLabelers&&(this.appLabelers=r.appLabelers.map(Xe))}get xrpc(){return this}clone(){return this.copyInto(new Ve(this.sessionManager))}copyInto(r){r.configureLabelers(this.labelers),r.configureProxy(this.proxy??null),r.clearHeaders();for(const[o,i]of this.headers)r.setHeader(o,i);return r}withProxy(r,o){const i=this.clone();return i.configureProxy(`${Xe(o)}#${r}`),i}get appLabelers(){return this.constructor.appLabelers}configureLabelers(r){this.labelers=r.map(Xe)}configureLabelersHeader(r){this.configureLabelers(r.filter(Le))}configureProxy(r){r===null?this.proxy=void 0:this.proxy=yd(r)}configureProxyHeader(r,o){Le(o)&&this.configureProxy(`${o}#${r}`)}get did(){const{did:r}=this.sessionManager;if(r)return yt(r),r}get accountDid(){return this.assertDid}get assertDid(){return this.assertAuthenticated(),this.did}assertAuthenticated(){if(!this.did)throw new Error("Not logged in")}get api(){return this}async getLabelDefinitions(r){const o=[...this.appLabelers];Hg(r)?o.push(...r.moderationPrefs.labelers.map(a=>a.did)):si(r)?o.push(...r.labelers.map(a=>a.did)):o.push(...r);const i=await this.getLabelers({dids:o,detailed:!0}),n={};if(i.data)for(const a of i.data.views)n[a.creator.did]=Mg(a);return n}async post(r){return r.createdAt||=new Date().toISOString(),this.app.bsky.feed.post.create({repo:this.accountDid},r)}async deletePost(r){this.assertAuthenticated();const o=new K(r);return this.app.bsky.feed.post.delete({repo:o.hostname,rkey:o.rkey})}async like(r,o,i){return this.app.bsky.feed.like.create({repo:this.accountDid},{subject:{uri:r,cid:o},createdAt:new Date().toISOString(),via:i})}async deleteLike(r){this.assertAuthenticated();const o=new K(r);return this.app.bsky.feed.like.delete({repo:o.hostname,rkey:o.rkey})}async repost(r,o,i){return this.app.bsky.feed.repost.create({repo:this.accountDid},{subject:{uri:r,cid:o},createdAt:new Date().toISOString(),via:i})}async deleteRepost(r){this.assertAuthenticated();const o=new K(r);return this.app.bsky.feed.repost.delete({repo:o.hostname,rkey:o.rkey})}async follow(r,o){return this.app.bsky.graph.follow.create({repo:this.accountDid},{subject:r,createdAt:new Date().toISOString(),via:o})}async deleteFollow(r){this.assertAuthenticated();const o=new K(r);return this.app.bsky.graph.follow.delete({repo:o.hostname,rkey:o.rkey})}async upsertProfile(r){return da(async()=>{const i=this.assertDid,n="app.bsky.actor.profile",a=await this.com.atproto.repo.getRecord({repo:i,collection:n,rkey:"self"}).catch(u=>{}),c=a&&Fg(a.data.value)?a.data.value:void 0,d=await r(c),p=ii({$type:n,...d});if(!p.success)throw p.error;await this.com.atproto.repo.putRecord({repo:i,collection:n,rkey:"self",record:p.value,swapRecord:a?.data.cid||null})},{maxRetries:5,retryable:i=>i instanceof No})}async mute(r){return this.app.bsky.graph.muteActor({actor:r})}async unmute(r){return this.app.bsky.graph.unmuteActor({actor:r})}async muteModList(r){return this.app.bsky.graph.muteActorList({list:r})}async unmuteModList(r){return this.app.bsky.graph.unmuteActorList({list:r})}async blockModList(r){return this.app.bsky.graph.listblock.create({repo:this.accountDid},{subject:r,createdAt:new Date().toISOString()})}async unblockModList(r){const o=this.accountDid,n=(await this.app.bsky.graph.getList({list:r,limit:1})).data.list.viewer?.blocked;if(n){const{rkey:a}=new K(n);return this.app.bsky.graph.listblock.delete({repo:o,rkey:a})}}async updateSeenNotifications(r=new Date().toISOString()){return this.app.bsky.notification.updateSeen({seenAt:r})}async getPreferences(){const r={feeds:{saved:void 0,pinned:void 0},savedFeeds:void 0,feedViewPrefs:{home:{...$r}}
1,threadViewPrefs:{...Ug},moderationPrefs:{adultContentEnabled:!1,labels:{...Vg},labelers:this.appLabelers.map(n=>({did:n,labels:{}})),mutedWords:[],hiddenPosts:[]},birthDate:void 0,interests:{tags:[]},bskyAppState:{queuedNudges:[],activeProgressGuide:void 0,nuxs:[]},postInteractionSettings:{threadgateAllowRules:void 0,postgateEmbeddingRules:void 0},verificationPrefs:{hideBadges:!1},liveEventPreferences:{hiddenFeedIds:[],hideAllFeeds:!1}},o=await this.app.bsky.actor.getPreferences({}),i=[];for(const n of o.data.preferences)if(Dr(n))r.moderationPrefs.adultContentEnabled=n.enabled;else if(tt(n)){const a=Og(n);i.push(a)}else if(qe(n))r.moderationPrefs.labelers=this.appLabelers.map(a=>({did:a,labels:{}})).concat(n.labelers.map(a=>({...a,labels:{}})));else if(Br(n))r.savedFeeds=n.items;else if(rt(n))r.feeds.saved=n.saved,r.feeds.pinned=n.pinned;else if(zr(n))n.birthDate&&(r.birthDate=new Date(n.birthDate));else if($g(n)){const{$type:a,...c}=n;r.declaredAge=c}else if(Pr(n)){const{$type:a,feed:c,...d}=n;r.feedViewPrefs[c]={...$r,...d}}else if(Mr(n)){const{$type:a,...c}=n;r.threadViewPrefs={...r.threadViewPrefs,...c}}else if(_r(n)){const{$type:a,...c}=n;r.interests={...r.interests,...c}}else xe(n)?(r.moderationPrefs.mutedWords=n.items,r.moderationPrefs.mutedWords.length&&(r.moderationPrefs.mutedWords=r.moderationPrefs.mutedWords.map(a=>(a.actorTarget=a.actorTarget||"all",a)))):Lr(n)?r.moderationPrefs.hiddenPosts=n.items:ee(n)?(r.bskyAppState.queuedNudges=n.queuedNudges||[],r.bskyAppState.activeProgressGuide=n.activeProgressGuide,r.bskyAppState.nuxs=n.nuxs||[]):Vr(n)?(r.postInteractionSettings.threadgateAllowRules=n.threadgateAllowRules,r.postInteractionSettings.postgateEmbeddingRules=n.postgateEmbeddingRules):Nr(n)?r.verificationPrefs={hideBadges:n.hideBadges}:Fr(n)&&(r.liveEventPreferences={hiddenFeedIds:n.hiddenFeedIds||[],hideAllFeeds:n.hideAllFeeds??!1});if(r.savedFeeds==null){const{saved:n,pinned:a}=r.feeds;if(n&&a){const c=new Map;c.set("timeline",{id:z.nextStr(),type:"timeline",value:"following",pinned:!0});for(const d of a){const p=Rr(d);p!=="unknown"&&c.set(d,{id:z.nextStr(),type:p,value:d,pinned:!0})}for(const d of n)if(!c.has(d)){const p=Rr(d);if(p==="unknown")continue;c.set(d,{id:z.nextStr(),type:p,value:d,pinned:!1})}r.savedFeeds=Array.from(c.values())}else r.savedFeeds=[{id:z.nextStr(),type:"timeline",value:"following",pinned:!0}];await this.overwriteSavedFeeds(r.savedFeeds)}for(const n of i)if(n.labelerDid){const a=r.moderationPrefs.labelers.find(c=>c.did===n.labelerDid);if(!a)continue;a.labels[n.label]=n.visibility}else r.moderationPrefs.labels[n.label]=n.visibility;return r.moderationPrefs.labels=Gg(r.moderationPrefs.labels),this.configureLabelers(ot(o.data.preferences)),r}async overwriteSavedFeeds(r){r.forEach(Ze);const o=new Map;return r.forEach(i=>{o.has(i.id)&&o.delete(i.id),o.set(i.id,i)}),this.updateSavedFeedsV2Preferences(()=>Array.from(o.values()))}async updateSavedFeeds(r){return r.map(Ze),this.updateSavedFeedsV2Preferences(o=>o.map(i=>{const n=r.find(a=>i.id===a.id);return n?{...i,pinned:n.pinned}:i}))}async addSavedFeeds(r){const o=r.map(i=>({...i,id:z.nextStr()}));return o.forEach(Ze),this.updateSavedFeedsV2Preferences(i=>[...i,...o])}async removeSavedFeeds(r){return this.updateSavedFeedsV2Preferences(o=>[...o.filter(i=>!r.find(n=>i.id===n))])}async setSavedFeeds(r,o){return this.updateFeedPreferences(()=>({saved:r,pinned:o}))}async addSavedFeed(r){return this.updateFeedPreferences((o,i)=>({saved:[...o.filter(n=>n!==r),r],pinned:i}))}async removeSavedFeed(r){return this.updateFeedPreferences((o,i)=>({saved:o.filter(n=>n!==r),pinned:i.filter(n=>n!==r)}))}async addPinnedFeed(r){return this.updateFeedPreferences((o,i)=>({saved:[...o.filter(n=>n!==r),r],pinned:[...i.filter(n=>n!==r),r]}))}async removePinnedFeed(r){return this.updateFeedPreferences((o,i)=>({saved:o,pinned:i.filter(n=>n!==r)}))}async setAdultContentEnabled(r){await this.updatePreferences(o=>{const i=o.findLast(Dr)||{$type:"app.bsky.actor.defs#adultContentPref",enabled:r};return i.enabled=r,o.filter(n=>!Gy(n)).concat(i)})}async setContentLabelPref(r,o,i){i&&yt(i),await this.updatePreferences(n=>{const a=n.filter(tt).findLast(d=>d.label===r&&d.labelerDid===i)||{$type:"app.bsky.actor.defs#contentLabelPref",label:r,labelerDid:i,visibility:o};a.visibility=o;let c;if(Ye(a)&&!a.labelerDid){const d={"graphic-media":"gore",porn:"nsfw",sexual:"suggestive",__proto__:null}[a.label];d&&(c=n.filter(tt).findLast(p=>p.label===d&&p.labelerDid===void 0)||{$type:"app.bsky.actor.defs#contentLabelPref",label:d,labelerDid:void 0,visibility:o},c.visibility=o)}return n.filter(d=>!Ye(d)||!(d.label===r&&d.labelerDid===i)).concat(a).filter(d=>
1c?!Ye(d)||!(d.label===c.label&&d.labelerDid===void 0):!0).concat(c?[c]:[])})}async addLabeler(r){const o=await this.updatePreferences(i=>{const n=i.findLast(qe)||{$type:"app.bsky.actor.defs#labelersPref",labelers:[]};return n.labelers.some(a=>a.did===r)||n.labelers.push({did:r}),i.filter(a=>!Cr(a)).concat(n)});this.configureLabelers(ot(o))}async removeLabeler(r){const o=await this.updatePreferences(i=>{const n=i.findLast(qe)||{$type:"app.bsky.actor.defs#labelersPref",labelers:[]};return n.labelers=n.labelers.filter(a=>a.did!==r),i.filter(a=>!Cr(a)).concat(n)});this.configureLabelers(ot(o))}async setPersonalDetails({birthDate:r}){await this.updatePreferences(o=>{const i=o.findLast(zr)||{$type:"app.bsky.actor.defs#personalDetailsPref"};return i.birthDate=r instanceof Date?r.toISOString():r,o.filter(n=>!Xy(n)).concat(i)})}async setFeedViewPrefs(r,o){await this.updatePreferences(i=>{const n=i.filter(Pr).findLast(a=>a.feed===r);return i.filter(a=>!th(a)||a.feed!==r).concat({...n,...o,$type:"app.bsky.actor.defs#feedViewPref",feed:r})})}async setThreadViewPrefs(r){await this.updatePreferences(o=>{const i=o.findLast(Mr);return o.filter(n=>!oh(n)).concat({...i,...r,$type:"app.bsky.actor.defs#threadViewPref"})})}async setInterestsPref(r){await this.updatePreferences(o=>{const i=o.findLast(_r);return o.filter(n=>!nh(n)).concat({...i,...r,$type:"app.bsky.actor.defs#interestsPref"})})}async addMutedWord(r){const o=Ir(r.value);o&&await this.updatePreferences(i=>{let n=i.findLast(xe);const a={id:z.nextStr(),value:o,targets:r.targets||[],actorTarget:r.actorTarget||"all",expiresAt:r.expiresAt||void 0};return n?(n.items.push(a),n.items=it(n.items)):n={$type:"app.bsky.actor.defs#mutedWordsPref",items:[a]},i.filter(c=>!et(c)).concat(n)})}async addMutedWords(r){await Promise.all(r.map(o=>this.addMutedWord(o)))}async upsertMutedWords(r){await this.addMutedWords(r)}async updateMutedWord(r){await this.updatePreferences(o=>{const i=o.findLast(xe);return i?(i.items=i.items.map(n=>{if(Ur(n,r)){const c={...n,...r};return{id:n.id||z.nextStr(),value:Ir(c.value)||n.value,targets:c.targets||[],actorTarget:c.actorTarget||"all",expiresAt:c.expiresAt||void 0}}else return n}),i.items=it(i.items),o.filter(n=>!et(n)).concat(i)):o})}async removeMutedWord(r){await this.updatePreferences(o=>{const i=o.findLast(xe);if(i){for(let n=0;n<i.items.length;n++)if(Ur(i.items[n],r)){i.items.splice(n,1);break}return i.items=it(i.items),o.filter(n=>!et(n)).concat(i)}return o})}async removeMutedWords(r){await Promise.all(r.map(o=>this.removeMutedWord(o)))}async hidePost(r){await this.updateHiddenPost(r,"hide")}async unhidePost(r){await this.updateHiddenPost(r,"unhide")}async bskyAppQueueNudges(r){await this.updatePreferences(o=>{const i=o.findLast(ee)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};return i.queuedNudges=(i.queuedNudges||[]).concat(r),o.filter(n=>!ce(n)).concat(i)})}async bskyAppDismissNudges(r){await this.updatePreferences(o=>{const i=o.findLast(ee)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};return r=Array.isArray(r)?r:[r],i.queuedNudges=(i.queuedNudges||[]).filter(n=>!r.includes(n)),o.filter(n=>!ce(n)).concat(i)})}async bskyAppSetActiveProgressGuide(r){if(r){const o=fh(r);if(!o.success)throw o.error}await this.updatePreferences(o=>{const i=o.findLast(ee)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};return i.activeProgressGuide=r,o.filter(n=>!ce(n)).concat(i)})}async bskyAppUpsertNux(r){vd(r),await this.updatePreferences(o=>{const i=o.findLast(ee)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};i.nuxs=i.nuxs||[];const n=i.nuxs?.find(c=>c.id===r.id);let a;return n?a={id:n.id,completed:r.completed,data:r.data,expiresAt:r.expiresAt}:a=r,i.nuxs=i.nuxs.filter(c=>c.id!==r.id).concat(a),o.filter(c=>!ce(c)).concat(i)})}async bskyAppRemoveNuxs(r){await this.updatePreferences(o=>{const i=o.findLast(ee)||{$type:"app.bsky.actor.defs#bskyAppStatePref"};return i.nuxs=(i.nuxs||[]).filter(n=>!r.includes(n.id)),o.filter(n=>!ce(n)).concat(i)})}async setPostInteractionSettings(r){const o=oi(r);if(!o.success)throw o.error;await this.updatePreferences(i=>{const n=i.findLast(Vr)||{$type:"app.bsky.actor.defs#postInteractionSettingsPref"};return n.threadgateAllowRules=r.threadgateAllowRules,n.postgateEmbeddingRules=r.postgateEmbeddingRules,i.filter(a=>!gh(a)).concat(n)})}async setVerificationPrefs(r){const o=ei(r);if(!o.success)throw o.error;await this.updatePreferences(i=>{const n=i.findLast(Nr)||{$type:"app.bsky.actor.defs#verificationPrefs",hideBadges:!1};return n.hideBadges=r.hideBadges,i.filter(a=>!mh(a)).concat(n)})}async updateLiveEventPreferences(r){return this.updatePreferences(o=>{const i=o.findLast(Fr)||{$type:"app.bsky.actor.defs#liveEventPreferences",hiddenFeedIds:[],hideAllFeeds:!1},n=new Set(i.hiddenFeedIds||[]);switch(r.type){case"hideFeed":n.add(r.id);break;case"unhideFeed":n.delete(r.id);break;case"toggleHideAllFeeds":i.hideAllFeeds=!i.hideAllFeeds;break}return i.hiddenFeedIds=[...n],o.filter(a=>!yh(a)).concat(i)})}async updatePreferences(r){try{await Oe(this,oe).acquireAsync();const o=await this.app.bsky.actor.getPreferences({}),i=r(o.data.preferences);return i===!1?o.data.preferences:(await this.app.bsky.actor.putPreferences({preferences:i}),i)}finally{Oe(this,oe).release()}}async updateHiddenPost(r,o){await this.updatePreferences(i=>{const n=i.findLast(Lr)||{$type:"app.bsky.actor.defs#hiddenPostsPref",items:[]},a=new Set(n.items);return o==="hide"?a.add(r):a.delete(r),n.items=[...a],i.filter(c=>!ch(c)).concat(n)})}async updateFeedPreferences(r){let o;return await this.updatePreferences(i=>{const n=i.findLast(rt)||{$type:"app.bsky.actor.defs#savedFeedsPref",saved:[],pinned:[]};return o=r(n.saved,n.pinned),n.saved=o.saved,n.pinned=o.pinned,i.filter(a=>!Er(a)).concat(n)}),o}async updateSavedFeedsV2Preferences(r){let o=[];return await this.updatePreferences(i=>{const n=i.findLast(Br)||{$type:"app.bsky.actor.defs#savedFeedsPrefV2",items:[]},a=r(n.items);n.items=[...a].sort((p,u)=>p.pinned===u.pinned?0:p.pinned?-1:1),o=a;let c=i.filter(p=>!Ky(p)).concat(n),d=i.findLast(rt);if(d){const{saved:p,pinned:u}=d,y=gd(n.items.filter(k=>["feed","list"].includes(k.type)));d={...d,saved:Array.from(new Set([...p,...y.saved])),pinned:Array.from(new Set([...u,...y.pinned]))},c=c.filter(k=>!Er(k)).concat(d)}return c}),o}};oe=new WeakMap,Ve.appLabelers=[hd];let _e=Ve;function Og(t){let e=t.visibility;return e==="show"&&(e="ignore"),{...t,visibility:e}}function Gg(t){const e={...t},r={gore:"graphic-media",nsfw:"porn",suggestive:"sexual"};for(const o in e){const i=r[o];i&&(e[i]=e[o])}return e}function ot(t){const e=t.findLast(qe);let r=[];return e&&(r=e.labelers.map(o=>o.did)),r}function Hg(t){return t&&typeof t=="object"&&"moderationPrefs"in t&&si(t.moderationPrefs)}function si(t){return t&&typeof t=="object"&&"labelers"in t}function it(t){return t.map(e=>({...e,id:e.id||z.nextStr()}))}function Ur(t,e){const r=t.id,o=r&&r===e.id,i=!r&&t.value===e.value;return o||i}const Or=globalThis.ReadableStream;
1class ze extends _e{constructor(e){const r=e instanceof nt?e:new nt(new URL(e.service),e.fetch,e.persistSession);if(super(r),this.sessionManager=r,!(e instanceof nt)&&e.headers)for(const[o,i]of e.headers)this.setHeader(o,i)}clone(){return this.copyInto(new ze(this.sessionManager))}get session(){return this.sessionManager.session}get hasSession(){return this.sessionManager.hasSession}get serviceUrl(){return this.sessionManager.serviceUrl}get pdsUrl(){return this.sessionManager.pdsUrl}get dispatchUrl(){return this.sessionManager.dispatchUrl}get service(){return this.serviceUrl}get persistSession(){throw new Error('Cannot set persistSession directly. "persistSession" is defined through the constructor and will be invoked automatically when session data changes.')}set persistSession(e){throw new Error('Cannot set persistSession directly. "persistSession" must be defined in the constructor and can no longer be changed.')}getServiceUrl(){return this.serviceUrl}async resumeSession(e){return this.sessionManager.resumeSession(e)}async createAccount(e,r){return this.sessionManager.createAccount(e,r)}async login(e){return this.sessionManager.login(e)}async logout(){return this.sessionManager.logout()}}class nt{constructor(e,r=globalThis.fetch,o){this.serviceUrl=e,this.fetch=r,this.persistSession=o,this.server=new ni(new Ft((i,n)=>(0,this.fetch)(new URL(i,this.serviceUrl),n),Bt))}get did(){return this.session?.did}get dispatchUrl(){return this.pdsUrl||this.serviceUrl}get hasSession(){return!!this.session}setFetch(e=globalThis.fetch){this.fetch=e}async fetchHandler(e,r){await this.refreshSessionPromise;const o=new URL(e,this.dispatchUrl),i=new Request(o,r),n=this.session?.accessJwt;if(!n||i.headers.has("authorization"))return(0,this.fetch)(i);i.headers.set("authorization",`Bearer ${n}`);const a=await(0,this.fetch)(i);if(!this.session?.refreshJwt||!(a.status===401||await Kg(a,[400],["ExpiredToken"])))return a;try{await this.refreshSession()}catch{return a}if(r?.signal?.aborted||Or&&r?.body instanceof Or)return a;const d=this.session?.accessJwt;if(!d||d===n)return a;await a.body?.cancel();const p=new URL(e,this.dispatchUrl),u=new Request(p,r);return u.headers.set("authorization",`Bearer ${d}`),await(0,this.fetch)(u)}async createAccount(e,r){this.session=void 0,this.refreshSessionPromise=void 0;try{const o=await this.server.createAccount(e,r);return this.session={accessJwt:o.data.accessJwt,refreshJwt:o.data.refreshJwt,handle:o.data.handle,did:o.data.did,email:e.email,emailConfirmed:!1,emailAuthFactor:!1,active:!0},this.persistSession?.("create",this.session),this._updateApiEndpoint(o.data.didDoc),o}catch(o){throw this.session=void 0,this.persistSession?.("create-failed",void 0),o}}async login(e){this.session=void 0,this.refreshSessionPromise=void 0;try{const r=await this.server.createSession({identifier:e.identifier,password:e.password,authFactorToken:e.authFactorToken,allowTakendown:e.allowTakendown});if(this.session)throw new Error("Concurrent login detected");return this.session={accessJwt:r.data.accessJwt,refreshJwt:r.data.refreshJwt,handle:r.data.handle,did:r.data.did,email:r.data.email,emailConfirmed:r.data.emailConfirmed,emailAuthFactor:r.data.emailAuthFactor,active:r.data.active??!0,status:r.data.status},this._updateApiEndpoint(r.data.didDoc),this.persistSession?.("create",this.session),r}catch(r){throw this.session=void 0,this.persistSession?.("create-failed",void 0),r}}async logout(){if(this.session)try{await this.server.deleteSession(void 0,{headers:{authorization:`Bearer ${this.session.refreshJwt}`}})}catch{}finally{this.session=void 0,this.persistSession?.("expired",void 0)}}async resumeSession(e){e.refreshJwt!==this.session?.refreshJwt&&(this.session=e,this.refreshSessionPromise=void 0);const r=await this.refreshSession();if(e.did!==this.session?.did)throw new Error("DID mismatch on resumeSession");return r}async refreshSession(){if(!this.session)throw new Error("Unexpected state: no session to refresh");if(this.refreshSessionPromise)return this.refreshSessionPromise;const e=this._refreshSessionInner().finally(()=>{this.refreshSessionPromise===e&&(this.refreshSessionPromise=void 0)});return this.refreshSessionPromise=e,e}async _refreshSessionInner(){const{session:e}=this;if(!e)throw new Error("No session to refresh");try{const r=await this.server.refreshSession(void 0,{headers:{authorization:`Bearer ${e.refreshJwt}`}}),{data:o}=r;if(o.did!==e.did)throw new s(h.InvalidRequest,"Invalid session","InvalidDID");if(o.emailConfirmed==null||o.didDoc==null)try{const i=await this.server.getSession(void 0,{headers:{authorization:`Bearer ${o.accessJwt}`}});i.data.did===o.did&&Object.assign(o,i.data)}catch{}return this.session!==e?Promise.reject(new Error("Concurrent session update detected")):(this.session={did:o.did,accessJwt:o.accessJwt,refreshJwt:o.refreshJwt,handle:o.handle??e.handle,email:o.email??e.email,emailConfirmed:o.emailConfirmed??e.emailConfirmed,emailAuthFactor:o.emailAuthFactor??e.emailAuthFactor,active:o.active??e.active??!0,status:o.status},this._updateApiEndpoint(r.data.didDoc),this.persistSession?.("update",this.session),r)}catch(r){throw this.session===e&&(r instanceof s&&(r.status===401||r.error==="InvalidDID"||["
1ExpiredToken","InvalidToken"].includes(r.error))?(this.session=void 0,this.persistSession?.("expired",void 0)):(this.session=e,this.persistSession?.("network-error",e))),r}}_updateApiEndpoint(e){const r=Ka(e)?Ja(e):void 0;r?this.pdsUrl=new URL(r):this.pdsUrl=void 0}}function Wg(t){return _o.safeParse(t).success}async function Kg(t,e,r){if(!e.includes(t.status))return!1;try{const o=await Jg(t,10240);return Wg(o)&&r.includes(o.error)}catch{return!1}}async function Jg(t,e=1/0){if(Xg(t)!=="application/json")throw new Error("Not JSON");if(Qg(t)>e)throw new Error("Response too large");return t.clone().json()}function Qg({headers:t}){return t.get("Content-Length")?Number(t.get("Content-Length")):NaN}function Xg({headers:t}){return t.get("Content-Type")?.split(";")[0]?.trim()}new fe(Lo);function Zg(t,e){const r=Gr(),{$atproto:o}=te();switch(t){case"private":{if(!o.session.value)throw xi(),new Error("Not authenticated");const i=o.session.value.sub,n=de(Ai,()=>null),a=de(ji,()=>null);if(n.value&&a.value===i)return n.value;const c=new _e(o.session.value);return n.value=c,a.value=i,c}case"public":{const i=r.serviceEndpoint.public,n=Si(i),a=de(n,()=>null);if(a.value)return a.value;const c=new ze({service:i,fetch:e});return a.value=c,c}default:{const i=qi(t),n=de(i,()=>null);if(n.value)return n.value;const a=new ze({service:t,fetch:e});return n.value=a,a}}}function Yg(t,e){return Zg(t,e)}function eb(){const{session:t,isLogged:e,status:r}
1=Ti(),{signIn:o,signInWithHandle:i,signOut:n,restore:a}=un(),c=Kr(),{upsert:d,remove:p,profiles:u}=c,y=at(!1),k=at(null);async function A(C){y.value=!0,k.value=null;try{const T=Yg("public"),{data:$}=await T.getProfile({actor:C});d(C,{did:$.did,handle:$.handle,displayName:$.displayName,avatar:$.avatar,description:$.description})}catch(T){k.value=T instanceof Error?T.message:"Failed to load profile"}finally{y.value=!1}}function F(){const{hook:C}=te();C("atproto:sessionCreated",A),C("atproto:sessionRestored",A),C("atproto:sessionDeleted",T=>{p(T)})}const B=Me(()=>{const C=t.value?.sub;return C?u.value[C]??null:null});return{session:t,isLogged:e,status:r,signIn:o,signInWithHandle:i,signOut:n,restore:a,loadingProfile:y,profileError:k,currentEntry:B,fetchAndStoreProfile:A,registerSessionHooks:F}}const tb={key:0,class:"panel__section-title"},rb={key:1,class:"alert alert--loading",role:"status"},ob={key:2,class:"alert alert--error",role:"alert"},ib={key:4,class:"alert alert--loading"},nb={key:0,class:"panel__split",role:"separator"},sb={class:"panel__lead"},ab={key:2,class:"panel__accounts-label"},cb=["onClick"],db=Be({__name:"PlaygroundDemo",props:{showDevPanel:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},savedAccountsLead:{default:"Profiles cached locally after login. Switch without leaving the app."}},setup(t){const e=t,{session:r,isLogged:o,status:i,signIn:n,signInWithHandle:a,signOut:c,restore:d,loadingProfile:p,profileError:u,currentEntry:y,fetchAndStoreProfile:k,registerSessionHooks:A}=eb(),{loadFromStorage:F,entries:B,profiles:C}=Kr(),T=Me(()=>B.value.filter(J=>J.profile.did!==r.value?.sub));A();function $(){const J=r.value?.sub;J&&!C.value[J]&&!p.value&&k(J)}Ii(()=>{F(),$()}),Ri(()=>r.value?.sub,$);async function I(J){await a(J)}return(J,L)=>{const Ue=Ui,$t=nn,ai=ln;return g(),w("div",{class:U(["pg-demo pg-stack",{"pg-demo--compact":e.compact,"pg-demo--logged-in":j(o)}])},[j(o)?(g(),w("section",{key:1,class:U(["panel",{"panel--compact":e.compact,"panel--session-block":e.compact}])},[e.compact?_("",!0):(g(),w("h2",tb," Active session ")),j(p)?(g(),w("p",rb," Loading profile from the network… ")):j(u)?(g(),w("p",ob,M(j(u)),1)):_("",!0),j(y)?(g(),se($t,{key:3,entry:j(y),compact:e.compact,active:""},{actions:Jt(()=>[m("button",{type:"button",class:U(["btn btn--danger",{"btn--sm":e.compact}]),onClick:L[1]||(L[1]=G=>j(c)())}," Sign out ",2)]),_:1},8,["entry","compact"])):j(r)&&!j(p)?(g(),w("p",ib,[L[4]||(L[4]=Se(" Signed in as ",-1)),m("code",null,M(j(r).sub),1),L[5]||(L[5]=Se(" — waiting for profile cache. ",-1))])):_("",!0),e.compact?(g(),w(Ge,{key:5},[L[6]||(L[6]=m("div",{class:"panel__split",role:"separator"},null,-1)),Ei(Ue,{"add-account":"",embedded:"",onSignIn:L[2]||(L[2]=G=>j(n)()),onSignInWithHandle:I})],64)):_("",!0)],2)):(g(),se(Ue,{key:0,embedded:e.compact,onSignIn:L[0]||(L[0]=G=>j(n)()),onSignInWithHandle:I},null,8,["embedded"])),j(o)&&!e.compact?(g(),se(Ue,{key:2,"add-account":"",onSignIn:L[3]||(L[3]=G=>j(n)()),onSignInWithHandle:I})):_("",!0),j(T).length>0?(g(),w("section",{key:3,class:U(["panel",{"panel--compact":e.compact,"panel--accounts-compact":e.compact}])},[e.compact?(g(),w("div",nb)):_("",!0),e.compact?(g(),w("p",ab," Switch account ")):(g(),w(Ge,{key:1},[L[7]||(L[7]=m("h2",{class:"panel__section-title"}," Saved accounts ",-1)),m("p",sb,M(e.savedAccountsLead),1)],64)),m("div",{class:U(["pg-stack",{"pg-stack--dense":e.compact}])},[(g(!0),w(Ge,null,Ci(j(T),G=>(g(),se($t,{key:G.profile.did,entry:G,compact:e.compact,active:j(r)?.sub===G.profile.did},{actions:Jt(()=>[j(r)?.sub!==G.profile.did?(g(),w("button",{key:0,type:"button",class:U(["btn btn--secondary",{"btn--sm":e.compact}]),onClick:pb=>j(d)(G.profile.did)}," Switch ",10,cb)):(g(),w("span",{key:1,class:U(["btn btn--ghost",{"btn--sm":e.compact}]),style:{"pointer-events":"none"}}," Current ",2))]),_:2},1032,["entry","compact","active"]))),128))],2)],2)):_("",!0),e.showDevPanel?(g(),se(ai,{key:4,status:j(i),"is-logged":j(o)},null,8,["status","is-logged"])):_("",!0)],2)}}}),rk=Object.assign(db,{__name:"PlaygroundDemo"});export{rk as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.