Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lexicons fetched from ee9779d committed 2025-01-20T14:36:02Z #516

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/aliases_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
'models.ComAtprotoLabelDefs': 'atproto_client.models.com.atproto.label.defs',
'models.ComAtprotoLabelQueryLabels': 'atproto_client.models.com.atproto.label.query_labels',
'models.ComAtprotoLabelSubscribeLabels': 'atproto_client.models.com.atproto.label.subscribe_labels',
'models.ComAtprotoLexiconSchema': 'atproto_client.models.com.atproto.lexicon.schema',
'models.ComAtprotoModerationCreateReport': 'atproto_client.models.com.atproto.moderation.create_report',
'models.ComAtprotoModerationDefs': 'atproto_client.models.com.atproto.moderation.defs',
'models.ComAtprotoRepoApplyWrites': 'atproto_client.models.com.atproto.repo.apply_writes',
Expand Down
15 changes: 15 additions & 0 deletions docs/source/atproto/atproto_client.models.com.atproto.lexicon.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
com.atproto.lexicon
==========================================

.. automodule:: atproto_client.models.com.atproto.lexicon
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

.. toctree::
:maxdepth: 4

atproto_client.models.com.atproto.lexicon.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
com.atproto.lexicon.schema
=================================================

.. automodule:: atproto_client.models.com.atproto.lexicon.schema
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/source/atproto/atproto_client.models.com.atproto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Subpackages
atproto_client.models.com.atproto.admin
atproto_client.models.com.atproto.identity
atproto_client.models.com.atproto.label
atproto_client.models.com.atproto.lexicon
atproto_client.models.com.atproto.moderation
atproto_client.models.com.atproto.repo
atproto_client.models.com.atproto.server
Expand Down
4 changes: 4 additions & 0 deletions lexicons/app.bsky.actor.getSuggestions.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
"type": "ref",
"ref": "app.bsky.actor.defs#profileView"
}
},
"recId": {
"type": "integer",
"description": "Snowflake for this recommendation, use when submitting recommendation events."
}
}
}
Expand Down
15 changes: 15 additions & 0 deletions lexicons/app.bsky.feed.defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,13 @@
"items": { "type": "ref", "ref": "com.atproto.label.defs#label" }
},
"viewer": { "type": "ref", "ref": "#generatorViewerState" },
"contentMode": {
"type": "string",
"knownValues": [
"app.bsky.feed.defs#contentModeUnspecified",
"app.bsky.feed.defs#contentModeVideo"
]
},
"indexedAt": { "type": "string", "format": "datetime" }
}
},
Expand Down Expand Up @@ -262,6 +269,14 @@
"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"
Expand Down
7 changes: 7 additions & 0 deletions lexicons/app.bsky.feed.generator.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
"description": "Self-label values",
"refs": ["com.atproto.label.defs#selfLabels"]
},
"contentMode": {
"type": "string",
"knownValues": [
"app.bsky.feed.defs#contentModeUnspecified",
"app.bsky.feed.defs#contentModeVideo"
]
},
"createdAt": { "type": "string", "format": "datetime" }
}
}
Expand Down
4 changes: 4 additions & 0 deletions lexicons/app.bsky.graph.getSuggestedFollowsByActor.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
"type": "boolean",
"description": "If true, response has fallen-back to generic results, and is not scoped using relativeToDid",
"default": false
},
"recId": {
"type": "integer",
"description": "Snowflake for this recommendation, use when submitting recommendation events."
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions lexicons/app.bsky.unspecced.getSuggestionsSkeleton.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
"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": "Snowflake for this recommendation, use when submitting recommendation events."
}
}
}
Expand Down
21 changes: 21 additions & 0 deletions lexicons/com.atproto.lexicon.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"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."
}
}
}
}
}
}
74 changes: 74 additions & 0 deletions lexicons/tools.ozone.moderation.defs.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,80 @@
"tags": {
"type": "array",
"items": { "type": "string" }
},
"accountStats": {
"description": "Statistics related to the account subject",
"type": "ref",
"ref": "#accountStats"
},
"recordsStats": {
"description": "Statistics related to the record subjects authored by the subject's account",
"type": "ref",
"ref": "#recordsStats"
}
}
},
"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"
}
}
},
Expand Down
19 changes: 18 additions & 1 deletion lexicons/tools.ozone.moderation.queryStatuses.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@
"sortField": {
"type": "string",
"default": "lastReportedAt",
"enum": ["lastReviewedAt", "lastReportedAt"]
"enum": [
"lastReviewedAt",
"lastReportedAt",
"reportedRecordsCount",
"takendownRecordsCount"
]
},
"sortDirection": {
"type": "string",
Expand Down Expand Up @@ -158,6 +163,18 @@
"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."
}
}
},
Expand Down
2 changes: 2 additions & 0 deletions packages/atproto_client/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
from atproto_client.models.com.atproto.label import defs as ComAtprotoLabelDefs
from atproto_client.models.com.atproto.label import query_labels as ComAtprotoLabelQueryLabels
from atproto_client.models.com.atproto.label import subscribe_labels as ComAtprotoLabelSubscribeLabels
from atproto_client.models.com.atproto.lexicon import schema as ComAtprotoLexiconSchema
from atproto_client.models.com.atproto.moderation import create_report as ComAtprotoModerationCreateReport
from atproto_client.models.com.atproto.moderation import defs as ComAtprotoModerationDefs
from atproto_client.models.com.atproto.repo import apply_writes as ComAtprotoRepoApplyWrites
Expand Down Expand Up @@ -382,6 +383,7 @@ class _Ids:
ComAtprotoLabelDefs: str = 'com.atproto.label.defs'
ComAtprotoLabelQueryLabels: str = 'com.atproto.label.queryLabels'
ComAtprotoLabelSubscribeLabels: str = 'com.atproto.label.subscribeLabels'
ComAtprotoLexiconSchema: str = 'com.atproto.lexicon.schema'
ComAtprotoModerationCreateReport: str = 'com.atproto.moderation.createReport'
ComAtprotoModerationDefs: str = 'com.atproto.moderation.defs'
ComAtprotoRepoApplyWrites: str = 'com.atproto.repo.applyWrites'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ class Response(base.ResponseModelBase):

actors: t.List['models.AppBskyActorDefs.ProfileView'] #: Actors.
cursor: t.Optional[str] = None #: Cursor.
rec_id: t.Optional[int] = None #: Snowflake for this recommendation, use when submitting recommendation events.
11 changes: 11 additions & 0 deletions packages/atproto_client/models/app/bsky/feed/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ class GeneratorView(base.ModelBase):
uri: string_formats.AtUri #: Uri.
accepts_interactions: t.Optional[bool] = None #: Accepts interactions.
avatar: t.Optional[string_formats.Uri] = None #: Avatar.
content_mode: t.Optional[
t.Union['models.AppBskyFeedDefs.ContentModeUnspecified', 'models.AppBskyFeedDefs.ContentModeVideo', str]
] = None #: Content mode.
description: t.Optional[str] = Field(default=None, max_length=3000) #: Description.
description_facets: t.Optional[t.List['models.AppBskyRichtextFacet.Main']] = None #: Description facets.
labels: t.Optional[t.List['models.ComAtprotoLabelDefs.Label']] = None #: Labels.
Expand Down Expand Up @@ -333,6 +336,14 @@ class Interaction(base.ModelBase):
'app.bsky.feed.defs#clickthroughEmbed'
] #: User clicked through to the embedded content of the feed item

ContentModeUnspecified = t.Literal[
'app.bsky.feed.defs#contentModeUnspecified'
] #: Declares the feed generator returns any types of posts.

ContentModeVideo = t.Literal[
'app.bsky.feed.defs#contentModeVideo'
] #: Declares the feed generator returns posts containing app.bsky.embed.video embeds.

InteractionSeen = t.Literal['app.bsky.feed.defs#interactionSeen'] #: Feed item was seen by user

InteractionLike = t.Literal['app.bsky.feed.defs#interactionLike'] #: User liked the feed item
Expand Down
3 changes: 3 additions & 0 deletions packages/atproto_client/models/app/bsky/feed/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ class Record(base.RecordModelBase):
None #: Declaration that a feed accepts feedback interactions from a client through app.bsky.feed.sendInteractions.
)
avatar: t.Optional['BlobRef'] = None #: Avatar.
content_mode: t.Optional[
t.Union['models.AppBskyFeedDefs.ContentModeUnspecified', 'models.AppBskyFeedDefs.ContentModeVideo', str]
] = None #: Content mode.
description: t.Optional[str] = Field(default=None, max_length=3000) #: Description.
description_facets: t.Optional[t.List['models.AppBskyRichtextFacet.Main']] = None #: Description facets.
labels: t.Optional[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ class Response(base.ResponseModelBase):
is_fallback: t.Optional[bool] = (
False #: If true, response has fallen-back to generic results, and is not scoped using relativeToDid.
)
rec_id: t.Optional[int] = None #: Snowflake for this recommendation, use when submitting recommendation events.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class Response(base.ResponseModelBase):

actors: t.List['models.AppBskyUnspeccedDefs.SkeletonSearchActor'] #: Actors.
cursor: t.Optional[str] = None #: Cursor.
rec_id: t.Optional[int] = None #: Snowflake for this recommendation, use when submitting recommendation events.
relative_to_did: t.Optional[string_formats.Did] = (
None #: DID of the account these suggestions are relative to. If this is returned undefined, suggestions are based on the viewer.
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
##################################################################
# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS!
# Copyright (C) 2024 Ilya (Marshal) <https://github.com/MarshalX>.
# This file is part of Python atproto SDK. Licenced under MIT.
##################################################################

46 changes: 46 additions & 0 deletions packages/atproto_client/models/com/atproto/lexicon/schema.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
##################################################################
# THIS IS THE AUTO-GENERATED CODE. DON'T EDIT IT BY HANDS!
# Copyright (C) 2024 Ilya (Marshal) <https://github.com/MarshalX>.
# This file is part of Python atproto SDK. Licenced under MIT.
##################################################################


import typing as t

from pydantic import Field

if t.TYPE_CHECKING:
from atproto_client import models
from atproto_client.models import base


class Record(base.RecordModelBase):
"""Record model for :obj:`com.atproto.lexicon.schema`."""

lexicon: int #: Indicates the 'version' of the Lexicon language. Must be '1' for the current atproto/Lexicon schema system.

py_type: t.Literal['com.atproto.lexicon.schema'] = Field(
default='com.atproto.lexicon.schema', alias='$type', frozen=True
)


class GetRecordResponse(base.SugarResponseModelBase):
"""Get record response for :obj:`models.ComAtprotoLexiconSchema.Record`."""

uri: str #: The URI of the record.
value: 'models.ComAtprotoLexiconSchema.Record' #: The record.
cid: t.Optional[str] = None #: The CID of the record.


class ListRecordsResponse(base.SugarResponseModelBase):
"""List records response for :obj:`models.ComAtprotoLexiconSchema.Record`."""

records: t.Dict[str, 'models.ComAtprotoLexiconSchema.Record'] #: Map of URIs to records.
cursor: t.Optional[str] = None #: Next page cursor.


class CreateRecordResponse(base.SugarResponseModelBase):
"""Create record response for :obj:`models.ComAtprotoLexiconSchema.Record`."""

uri: str #: The URI of the record.
cid: str #: The CID of the record.
Loading
Loading