···11+Copyright 2026 comet.sh
22+33+Permission is hereby granted, free of charge, to any person obtaining a copy of
44+this software and associated documentation files (the “Software”), to deal in
55+the Software without restriction, including without limitation the rights to
66+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
77+the Software, and to permit persons to whom the Software is furnished to do so,
88+subject to the following conditions:
99+1010+The above copyright notice and this permission notice shall be included in all
1111+copies or substantial portions of the Software.
1212+1313+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1414+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
1515+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
1616+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
1717+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1818+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+22
README.md
···11+# atex_atproto
22+33+This package contains the [`app.bsky`] and [`chat.bsky`] lexicons translated
44+into Elixir modules for use with [atex].
55+66+## Installation
77+88+Add `atex_atproto` to your list of dependencies in `mix.exs`:
99+1010+```elixir
1111+def deps do
1212+ [
1313+ {:atex_atproto, "~> 0.1"}
1414+ ]
1515+end
1616+```
1717+1818+[`app.bsky`]:
1919+ https://github.com/bluesky-social/atproto/tree/main/lexicons/app/bsky
2020+[`chat.bsky`]:
2121+ https://github.com/bluesky-social/atproto/tree/main/lexicons/chat/bsky
2222+[atex]: https://github.com/cometsh/atex
···11+defmodule App.Bsky.Contact.Defs do
22+ @moduledoc false
33+ use Atex.Lexicon
44+55+ deflexicon(%{
66+ "defs" => %{
77+ "matchAndContactIndex" => %{
88+ "description" =>
99+ "Associates a profile with the positional index of the contact import input in the call to `app.bsky.contact.importContacts`, so clients can know which phone caused a particular match.",
1010+ "properties" => %{
1111+ "contactIndex" => %{
1212+ "description" => "The index of this match in the import contact input.",
1313+ "maximum" => 999,
1414+ "minimum" => 0,
1515+ "type" => "integer"
1616+ },
1717+ "match" => %{
1818+ "description" => "Profile of the matched user.",
1919+ "ref" => "app.bsky.actor.defs#profileView",
2020+ "type" => "ref"
2121+ }
2222+ },
2323+ "required" => ["match", "contactIndex"],
2424+ "type" => "object"
2525+ },
2626+ "notification" => %{
2727+ "description" =>
2828+ "A stash object to be sent via bsync representing a notification to be created.",
2929+ "properties" => %{
3030+ "from" => %{
3131+ "description" => "The DID of who this notification comes from.",
3232+ "format" => "did",
3333+ "type" => "string"
3434+ },
3535+ "to" => %{
3636+ "description" => "The DID of who this notification should go to.",
3737+ "format" => "did",
3838+ "type" => "string"
3939+ }
4040+ },
4141+ "required" => ["from", "to"],
4242+ "type" => "object"
4343+ },
4444+ "syncStatus" => %{
4545+ "properties" => %{
4646+ "matchesCount" => %{
4747+ "description" =>
4848+ "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.",
4949+ "minimum" => 0,
5050+ "type" => "integer"
5151+ },
5252+ "syncedAt" => %{
5353+ "description" => "Last date when contacts where imported.",
5454+ "format" => "datetime",
5555+ "type" => "string"
5656+ }
5757+ },
5858+ "required" => ["syncedAt", "matchesCount"],
5959+ "type" => "object"
6060+ }
6161+ },
6262+ "id" => "app.bsky.contact.defs",
6363+ "lexicon" => 1
6464+ })
6565+end
+35
lib/atproto/app/bsky/contact/dismissMatch.ex
···11+defmodule App.Bsky.Contact.DismissMatch do
22+ @moduledoc false
33+ use Atex.Lexicon
44+55+ deflexicon(%{
66+ "defs" => %{
77+ "main" => %{
88+ "description" =>
99+ "Removes a match that was found via contact import. It shouldn't appear again if the same contact is re-imported. Requires authentication.",
1010+ "errors" => [%{"name" => "InvalidDid"}, %{"name" => "InternalError"}],
1111+ "input" => %{
1212+ "encoding" => "application/json",
1313+ "schema" => %{
1414+ "properties" => %{
1515+ "subject" => %{
1616+ "description" => "The subject's DID to dismiss the match with.",
1717+ "format" => "did",
1818+ "type" => "string"
1919+ }
2020+ },
2121+ "required" => ["subject"],
2222+ "type" => "object"
2323+ }
2424+ },
2525+ "output" => %{
2626+ "encoding" => "application/json",
2727+ "schema" => %{"properties" => %{}, "type" => "object"}
2828+ },
2929+ "type" => "procedure"
3030+ }
3131+ },
3232+ "id" => "app.bsky.contact.dismissMatch",
3333+ "lexicon" => 1
3434+ })
3535+end
···11+defmodule App.Bsky.Feed.Postgate do
22+ @moduledoc false
33+ use Atex.Lexicon
44+55+ deflexicon(%{
66+ "defs" => %{
77+ "disableRule" => %{
88+ "description" => "Disables embedding of this post.",
99+ "properties" => %{},
1010+ "type" => "object"
1111+ },
1212+ "main" => %{
1313+ "description" =>
1414+ "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.",
1515+ "key" => "tid",
1616+ "record" => %{
1717+ "properties" => %{
1818+ "createdAt" => %{"format" => "datetime", "type" => "string"},
1919+ "detachedEmbeddingUris" => %{
2020+ "description" =>
2121+ "List of AT-URIs embedding this post that the author has detached from.",
2222+ "items" => %{"format" => "at-uri", "type" => "string"},
2323+ "maxLength" => 50,
2424+ "type" => "array"
2525+ },
2626+ "embeddingRules" => %{
2727+ "description" =>
2828+ "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.",
2929+ "items" => %{"refs" => ["#disableRule"], "type" => "union"},
3030+ "maxLength" => 5,
3131+ "type" => "array"
3232+ },
3333+ "post" => %{
3434+ "description" => "Reference (AT-URI) to the post record.",
3535+ "format" => "at-uri",
3636+ "type" => "string"
3737+ }
3838+ },
3939+ "required" => ["post", "createdAt"],
4040+ "type" => "object"
4141+ },
4242+ "type" => "record"
4343+ }
4444+ },
4545+ "id" => "app.bsky.feed.postgate",
4646+ "lexicon" => 1
4747+ })
4848+end
···11+defmodule App.Bsky.Feed.SearchPosts do
22+ @moduledoc false
33+ use Atex.Lexicon
44+55+ deflexicon(%{
66+ "defs" => %{
77+ "main" => %{
88+ "description" =>
99+ "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.",
1010+ "errors" => [%{"name" => "BadQueryString"}],
1111+ "output" => %{
1212+ "encoding" => "application/json",
1313+ "schema" => %{
1414+ "properties" => %{
1515+ "cursor" => %{"type" => "string"},
1616+ "hitsTotal" => %{
1717+ "description" =>
1818+ "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.",
1919+ "type" => "integer"
2020+ },
2121+ "posts" => %{
2222+ "items" => %{
2323+ "ref" => "app.bsky.feed.defs#postView",
2424+ "type" => "ref"
2525+ },
2626+ "type" => "array"
2727+ }
2828+ },
2929+ "required" => ["posts"],
3030+ "type" => "object"
3131+ }
3232+ },
3333+ "parameters" => %{
3434+ "properties" => %{
3535+ "author" => %{
3636+ "description" =>
3737+ "Filter to posts by the given account. Handles are resolved to DID before query-time.",
3838+ "format" => "at-identifier",
3939+ "type" => "string"
4040+ },
4141+ "cursor" => %{
4242+ "description" =>
4343+ "Optional pagination mechanism; may not necessarily allow scrolling through entire result set.",
4444+ "type" => "string"
4545+ },
4646+ "domain" => %{
4747+ "description" =>
4848+ "Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization.",
4949+ "type" => "string"
5050+ },
5151+ "lang" => %{
5252+ "description" =>
5353+ "Filter to posts in the given language. Expected to be based on post language field, though server may override language detection.",
5454+ "format" => "language",
5555+ "type" => "string"
5656+ },
5757+ "limit" => %{
5858+ "default" => 25,
5959+ "maximum" => 100,
6060+ "minimum" => 1,
6161+ "type" => "integer"
6262+ },
6363+ "mentions" => %{
6464+ "description" =>
6565+ "Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions.",
6666+ "format" => "at-identifier",
6767+ "type" => "string"
6868+ },
6969+ "q" => %{
7070+ "description" =>
7171+ "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.",
7272+ "type" => "string"
7373+ },
7474+ "since" => %{
7575+ "description" =>
7676+ "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).",
7777+ "type" => "string"
7878+ },
7979+ "sort" => %{
8080+ "default" => "latest",
8181+ "description" => "Specifies the ranking order of results.",
8282+ "knownValues" => ["top", "latest"],
8383+ "type" => "string"
8484+ },
8585+ "tag" => %{
8686+ "description" =>
8787+ "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.",
8888+ "items" => %{
8989+ "maxGraphemes" => 64,
9090+ "maxLength" => 640,
9191+ "type" => "string"
9292+ },
9393+ "type" => "array"
9494+ },
9595+ "until" => %{
9696+ "description" =>
9797+ "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).",
9898+ "type" => "string"
9999+ },
100100+ "url" => %{
101101+ "description" =>
102102+ "Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching.",
103103+ "format" => "uri",
104104+ "type" => "string"
105105+ }
106106+ },
107107+ "required" => ["q"],
108108+ "type" => "params"
109109+ },
110110+ "type" => "query"
111111+ }
112112+ },
113113+ "id" => "app.bsky.feed.searchPosts",
114114+ "lexicon" => 1
115115+ })
116116+end
···11+defmodule App.Bsky.Graph.Verification do
22+ @moduledoc false
33+ use Atex.Lexicon
44+55+ deflexicon(%{
66+ "defs" => %{
77+ "main" => %{
88+ "description" =>
99+ "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.",
1010+ "key" => "tid",
1111+ "record" => %{
1212+ "properties" => %{
1313+ "createdAt" => %{
1414+ "description" => "Date of when the verification was created.",
1515+ "format" => "datetime",
1616+ "type" => "string"
1717+ },
1818+ "displayName" => %{
1919+ "description" =>
2020+ "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.",
2121+ "type" => "string"
2222+ },
2323+ "handle" => %{
2424+ "description" =>
2525+ "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.",
2626+ "format" => "handle",
2727+ "type" => "string"
2828+ },
2929+ "subject" => %{
3030+ "description" => "DID of the subject the verification applies to.",
3131+ "format" => "did",
3232+ "type" => "string"
3333+ }
3434+ },
3535+ "required" => ["subject", "handle", "displayName", "createdAt"],
3636+ "type" => "object"
3737+ },
3838+ "type" => "record"
3939+ }
4040+ },
4141+ "id" => "app.bsky.graph.verification",
4242+ "lexicon" => 1
4343+ })
4444+end
+105
lib/atproto/app/bsky/labeler/defs.ex
···11+defmodule App.Bsky.Labeler.Defs do
22+ @moduledoc false
33+ use Atex.Lexicon
44+55+ deflexicon(%{
66+ "defs" => %{
77+ "labelerPolicies" => %{
88+ "properties" => %{
99+ "labelValueDefinitions" => %{
1010+ "description" =>
1111+ "Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler.",
1212+ "items" => %{
1313+ "ref" => "com.atproto.label.defs#labelValueDefinition",
1414+ "type" => "ref"
1515+ },
1616+ "type" => "array"
1717+ },
1818+ "labelValues" => %{
1919+ "description" =>
2020+ "The label values which this labeler publishes. May include global or custom labels.",
2121+ "items" => %{
2222+ "ref" => "com.atproto.label.defs#labelValue",
2323+ "type" => "ref"
2424+ },
2525+ "type" => "array"
2626+ }
2727+ },
2828+ "required" => ["labelValues"],
2929+ "type" => "object"
3030+ },
3131+ "labelerView" => %{
3232+ "properties" => %{
3333+ "cid" => %{"format" => "cid", "type" => "string"},
3434+ "creator" => %{
3535+ "ref" => "app.bsky.actor.defs#profileView",
3636+ "type" => "ref"
3737+ },
3838+ "indexedAt" => %{"format" => "datetime", "type" => "string"},
3939+ "labels" => %{
4040+ "items" => %{"ref" => "com.atproto.label.defs#label", "type" => "ref"},
4141+ "type" => "array"
4242+ },
4343+ "likeCount" => %{"minimum" => 0, "type" => "integer"},
4444+ "uri" => %{"format" => "at-uri", "type" => "string"},
4545+ "viewer" => %{"ref" => "#labelerViewerState", "type" => "ref"}
4646+ },
4747+ "required" => ["uri", "cid", "creator", "indexedAt"],
4848+ "type" => "object"
4949+ },
5050+ "labelerViewDetailed" => %{
5151+ "properties" => %{
5252+ "cid" => %{"format" => "cid", "type" => "string"},
5353+ "creator" => %{
5454+ "ref" => "app.bsky.actor.defs#profileView",
5555+ "type" => "ref"
5656+ },
5757+ "indexedAt" => %{"format" => "datetime", "type" => "string"},
5858+ "labels" => %{
5959+ "items" => %{"ref" => "com.atproto.label.defs#label", "type" => "ref"},
6060+ "type" => "array"
6161+ },
6262+ "likeCount" => %{"minimum" => 0, "type" => "integer"},
6363+ "policies" => %{
6464+ "ref" => "app.bsky.labeler.defs#labelerPolicies",
6565+ "type" => "ref"
6666+ },
6767+ "reasonTypes" => %{
6868+ "description" =>
6969+ "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.",
7070+ "items" => %{
7171+ "ref" => "com.atproto.moderation.defs#reasonType",
7272+ "type" => "ref"
7373+ },
7474+ "type" => "array"
7575+ },
7676+ "subjectCollections" => %{
7777+ "description" =>
7878+ "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.",
7979+ "items" => %{"format" => "nsid", "type" => "string"},
8080+ "type" => "array"
8181+ },
8282+ "subjectTypes" => %{
8383+ "description" =>
8484+ "The set of subject types (account, record, etc) this service accepts reports on.",
8585+ "items" => %{
8686+ "ref" => "com.atproto.moderation.defs#subjectType",
8787+ "type" => "ref"
8888+ },
8989+ "type" => "array"
9090+ },
9191+ "uri" => %{"format" => "at-uri", "type" => "string"},
9292+ "viewer" => %{"ref" => "#labelerViewerState", "type" => "ref"}
9393+ },
9494+ "required" => ["uri", "cid", "creator", "policies", "indexedAt"],
9595+ "type" => "object"
9696+ },
9797+ "labelerViewerState" => %{
9898+ "properties" => %{"like" => %{"format" => "at-uri", "type" => "string"}},
9999+ "type" => "object"
100100+ }
101101+ },
102102+ "id" => "app.bsky.labeler.defs",
103103+ "lexicon" => 1
104104+ })
105105+end
···11+defmodule App.Bsky.Unspecced.GetAgeAssuranceState do
22+ @moduledoc false
33+ use Atex.Lexicon
44+55+ deflexicon(%{
66+ "defs" => %{
77+ "main" => %{
88+ "description" =>
99+ "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.",
1010+ "output" => %{
1111+ "encoding" => "application/json",
1212+ "schema" => %{
1313+ "ref" => "app.bsky.unspecced.defs#ageAssuranceState",
1414+ "type" => "ref"
1515+ }
1616+ },
1717+ "type" => "query"
1818+ }
1919+ },
2020+ "id" => "app.bsky.unspecced.getAgeAssuranceState",
2121+ "lexicon" => 1
2222+ })
2323+end
···11+defmodule App.Bsky.Unspecced.GetPostThreadOtherV2 do
22+ @moduledoc false
33+ use Atex.Lexicon
44+55+ deflexicon(%{
66+ "defs" => %{
77+ "main" => %{
88+ "description" =>
99+ "(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 anchor 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.",
1010+ "output" => %{
1111+ "encoding" => "application/json",
1212+ "schema" => %{
1313+ "properties" => %{
1414+ "thread" => %{
1515+ "description" =>
1616+ "A flat list of other thread items. The depth of each item is indicated by the depth property inside the item.",
1717+ "items" => %{"ref" => "#threadItem", "type" => "ref"},
1818+ "type" => "array"
1919+ }
2020+ },
2121+ "required" => ["thread"],
2222+ "type" => "object"
2323+ }
2424+ },
2525+ "parameters" => %{
2626+ "properties" => %{
2727+ "anchor" => %{
2828+ "description" => "Reference (AT-URI) to post record. This is the anchor post.",
2929+ "format" => "at-uri",
3030+ "type" => "string"
3131+ }
3232+ },
3333+ "required" => ["anchor"],
3434+ "type" => "params"
3535+ },
3636+ "type" => "query"
3737+ },
3838+ "threadItem" => %{
3939+ "properties" => %{
4040+ "depth" => %{
4141+ "description" =>
4242+ "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.",
4343+ "type" => "integer"
4444+ },
4545+ "uri" => %{"format" => "at-uri", "type" => "string"},
4646+ "value" => %{
4747+ "refs" => ["app.bsky.unspecced.defs#threadItemPost"],
4848+ "type" => "union"
4949+ }
5050+ },
5151+ "required" => ["uri", "depth", "value"],
5252+ "type" => "object"
5353+ }
5454+ },
5555+ "id" => "app.bsky.unspecced.getPostThreadOtherV2",
5656+ "lexicon" => 1
5757+ })
5858+end
+99
lib/atproto/app/bsky/unspecced/getPostThreadV2.ex
···11+defmodule App.Bsky.Unspecced.GetPostThreadV2 do
22+ @moduledoc false
33+ use Atex.Lexicon
44+55+ deflexicon(%{
66+ "defs" => %{
77+ "main" => %{
88+ "description" =>
99+ "(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.",
1010+ "output" => %{
1111+ "encoding" => "application/json",
1212+ "schema" => %{
1313+ "properties" => %{
1414+ "hasOtherReplies" => %{
1515+ "description" =>
1616+ "Whether this thread has additional replies. If true, a call can be made to the `getPostThreadOtherV2` endpoint to retrieve them.",
1717+ "type" => "boolean"
1818+ },
1919+ "thread" => %{
2020+ "description" =>
2121+ "A flat list of thread items. The depth of each item is indicated by the depth property inside the item.",
2222+ "items" => %{"ref" => "#threadItem", "type" => "ref"},
2323+ "type" => "array"
2424+ },
2525+ "threadgate" => %{
2626+ "ref" => "app.bsky.feed.defs#threadgateView",
2727+ "type" => "ref"
2828+ }
2929+ },
3030+ "required" => ["thread", "hasOtherReplies"],
3131+ "type" => "object"
3232+ }
3333+ },
3434+ "parameters" => %{
3535+ "properties" => %{
3636+ "above" => %{
3737+ "default" => true,
3838+ "description" => "Whether to include parents above the anchor.",
3939+ "type" => "boolean"
4040+ },
4141+ "anchor" => %{
4242+ "description" =>
4343+ "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.",
4444+ "format" => "at-uri",
4545+ "type" => "string"
4646+ },
4747+ "below" => %{
4848+ "default" => 6,
4949+ "description" => "How many levels of replies to include below the anchor.",
5050+ "maximum" => 20,
5151+ "minimum" => 0,
5252+ "type" => "integer"
5353+ },
5454+ "branchingFactor" => %{
5555+ "default" => 10,
5656+ "description" =>
5757+ "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).",
5858+ "maximum" => 100,
5959+ "minimum" => 0,
6060+ "type" => "integer"
6161+ },
6262+ "sort" => %{
6363+ "default" => "oldest",
6464+ "description" => "Sorting for the thread replies.",
6565+ "knownValues" => ["newest", "oldest", "top"],
6666+ "type" => "string"
6767+ }
6868+ },
6969+ "required" => ["anchor"],
7070+ "type" => "params"
7171+ },
7272+ "type" => "query"
7373+ },
7474+ "threadItem" => %{
7575+ "properties" => %{
7676+ "depth" => %{
7777+ "description" =>
7878+ "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.",
7979+ "type" => "integer"
8080+ },
8181+ "uri" => %{"format" => "at-uri", "type" => "string"},
8282+ "value" => %{
8383+ "refs" => [
8484+ "app.bsky.unspecced.defs#threadItemPost",
8585+ "app.bsky.unspecced.defs#threadItemNoUnauthenticated",
8686+ "app.bsky.unspecced.defs#threadItemNotFound",
8787+ "app.bsky.unspecced.defs#threadItemBlocked"
8888+ ],
8989+ "type" => "union"
9090+ }
9191+ },
9292+ "required" => ["uri", "depth", "value"],
9393+ "type" => "object"
9494+ }
9595+ },
9696+ "id" => "app.bsky.unspecced.getPostThreadV2",
9797+ "lexicon" => 1
9898+ })
9999+end
···11+defmodule App.Bsky.Unspecced.SearchPostsSkeleton do
22+ @moduledoc false
33+ use Atex.Lexicon
44+55+ deflexicon(%{
66+ "defs" => %{
77+ "main" => %{
88+ "description" => "Backend Posts search, returns only skeleton",
99+ "errors" => [%{"name" => "BadQueryString"}],
1010+ "output" => %{
1111+ "encoding" => "application/json",
1212+ "schema" => %{
1313+ "properties" => %{
1414+ "cursor" => %{"type" => "string"},
1515+ "hitsTotal" => %{
1616+ "description" =>
1717+ "Count of search hits. Optional, may be rounded/truncated, and may not be possible to paginate through all hits.",
1818+ "type" => "integer"
1919+ },
2020+ "posts" => %{
2121+ "items" => %{
2222+ "ref" => "app.bsky.unspecced.defs#skeletonSearchPost",
2323+ "type" => "ref"
2424+ },
2525+ "type" => "array"
2626+ }
2727+ },
2828+ "required" => ["posts"],
2929+ "type" => "object"
3030+ }
3131+ },
3232+ "parameters" => %{
3333+ "properties" => %{
3434+ "author" => %{
3535+ "description" =>
3636+ "Filter to posts by the given account. Handles are resolved to DID before query-time.",
3737+ "format" => "at-identifier",
3838+ "type" => "string"
3939+ },
4040+ "cursor" => %{
4141+ "description" =>
4242+ "Optional pagination mechanism; may not necessarily allow scrolling through entire result set.",
4343+ "type" => "string"
4444+ },
4545+ "domain" => %{
4646+ "description" =>
4747+ "Filter to posts with URLs (facet links or embeds) linking to the given domain (hostname). Server may apply hostname normalization.",
4848+ "type" => "string"
4949+ },
5050+ "lang" => %{
5151+ "description" =>
5252+ "Filter to posts in the given language. Expected to be based on post language field, though server may override language detection.",
5353+ "format" => "language",
5454+ "type" => "string"
5555+ },
5656+ "limit" => %{
5757+ "default" => 25,
5858+ "maximum" => 100,
5959+ "minimum" => 1,
6060+ "type" => "integer"
6161+ },
6262+ "mentions" => %{
6363+ "description" =>
6464+ "Filter to posts which mention the given account. Handles are resolved to DID before query-time. Only matches rich-text facet mentions.",
6565+ "format" => "at-identifier",
6666+ "type" => "string"
6767+ },
6868+ "q" => %{
6969+ "description" =>
7070+ "Search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended.",
7171+ "type" => "string"
7272+ },
7373+ "since" => %{
7474+ "description" =>
7575+ "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).",
7676+ "type" => "string"
7777+ },
7878+ "sort" => %{
7979+ "default" => "latest",
8080+ "description" => "Specifies the ranking order of results.",
8181+ "knownValues" => ["top", "latest"],
8282+ "type" => "string"
8383+ },
8484+ "tag" => %{
8585+ "description" =>
8686+ "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.",
8787+ "items" => %{
8888+ "maxGraphemes" => 64,
8989+ "maxLength" => 640,
9090+ "type" => "string"
9191+ },
9292+ "type" => "array"
9393+ },
9494+ "until" => %{
9595+ "description" =>
9696+ "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).",
9797+ "type" => "string"
9898+ },
9999+ "url" => %{
100100+ "description" =>
101101+ "Filter to posts with links (facet links or embeds) pointing to this URL. Server may apply URL normalization or fuzzy matching.",
102102+ "format" => "uri",
103103+ "type" => "string"
104104+ },
105105+ "viewer" => %{
106106+ "description" =>
107107+ "DID of the account making the request (not included for public/unauthenticated queries). Used for 'from:me' queries.",
108108+ "format" => "did",
109109+ "type" => "string"
110110+ }
111111+ },
112112+ "required" => ["q"],
113113+ "type" => "params"
114114+ },
115115+ "type" => "query"
116116+ }
117117+ },
118118+ "id" => "app.bsky.unspecced.searchPostsSkeleton",
119119+ "lexicon" => 1
120120+ })
121121+end
···11+defmodule Chat.Bsky.Convo.AddReaction do
22+ @moduledoc false
33+ use Atex.Lexicon
44+55+ deflexicon(%{
66+ "defs" => %{
77+ "main" => %{
88+ "description" =>
99+ "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.",
1010+ "errors" => [
1111+ %{
1212+ "description" =>
1313+ "Indicates that the message has been deleted and reactions can no longer be added/removed.",
1414+ "name" => "ReactionMessageDeleted"
1515+ },
1616+ %{
1717+ "description" =>
1818+ "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.",
1919+ "name" => "ReactionLimitReached"
2020+ },
2121+ %{
2222+ "description" =>
2323+ "Indicates the value for the reaction is not acceptable. In general, this means it is not an emoji.",
2424+ "name" => "ReactionInvalidValue"
2525+ }
2626+ ],
2727+ "input" => %{
2828+ "encoding" => "application/json",
2929+ "schema" => %{
3030+ "properties" => %{
3131+ "convoId" => %{"type" => "string"},
3232+ "messageId" => %{"type" => "string"},
3333+ "value" => %{
3434+ "maxGraphemes" => 1,
3535+ "maxLength" => 64,
3636+ "minGraphemes" => 1,
3737+ "minLength" => 1,
3838+ "type" => "string"
3939+ }
4040+ },
4141+ "required" => ["convoId", "messageId", "value"],
4242+ "type" => "object"
4343+ }
4444+ },
4545+ "output" => %{
4646+ "encoding" => "application/json",
4747+ "schema" => %{
4848+ "properties" => %{
4949+ "message" => %{
5050+ "ref" => "chat.bsky.convo.defs#messageView",
5151+ "type" => "ref"
5252+ }
5353+ },
5454+ "required" => ["message"],
5555+ "type" => "object"
5656+ }
5757+ },
5858+ "type" => "procedure"
5959+ }
6060+ },
6161+ "id" => "chat.bsky.convo.addReaction",
6262+ "lexicon" => 1
6363+ })
6464+end