From b8fa9b4d185012a9110c477b361eb26f725498bd Mon Sep 17 00:00:00 2001 From: Ilya Siamionau Date: Fri, 13 Sep 2024 18:09:34 +0200 Subject: [PATCH] Update lexicons fetched from 33aa0c7 committed 2024-09-11T23:25:05Z (#398) --- lexicons/app.bsky.actor.defs.json | 35 +++++++++++++++++++ .../models/app/bsky/actor/defs.py | 18 ++++++++++ 2 files changed, 53 insertions(+) diff --git a/lexicons/app.bsky.actor.defs.json b/lexicons/app.bsky.actor.defs.json index 6ba7aaa7..cf2452e2 100644 --- a/lexicons/app.bsky.actor.defs.json +++ b/lexicons/app.bsky.actor.defs.json @@ -419,6 +419,15 @@ "type": "array", "maxLength": 1000, "items": { "type": "string", "maxLength": 100 } + }, + "nuxs": { + "description": "Storage for NUXs the user has encountered.", + "type": "array", + "maxLength": 100, + "items": { + "type": "ref", + "ref": "app.bsky.actor.defs#nux" + } } } }, @@ -429,6 +438,32 @@ "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": false + }, + "data": { + "description": "Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.", + "type": "string", + "maxLength": 3000, + "maxGraphemes": 300 + }, + "expiresAt": { + "type": "string", + "format": "datetime", + "description": "The date and time at which the NUX will expire and should be considered completed." + } + } } } } diff --git a/packages/atproto_client/models/app/bsky/actor/defs.py b/packages/atproto_client/models/app/bsky/actor/defs.py index 4378193e..2b668994 100644 --- a/packages/atproto_client/models/app/bsky/actor/defs.py +++ b/packages/atproto_client/models/app/bsky/actor/defs.py @@ -326,6 +326,9 @@ class BskyAppStatePref(base.ModelBase): """Definition model for :obj:`app.bsky.actor.defs`. A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.""" active_progress_guide: t.Optional['models.AppBskyActorDefs.BskyAppProgressGuide'] = None #: Active progress guide. + nuxs: t.Optional[t.List['models.AppBskyActorDefs.Nux']] = Field( + default=None, max_length=100 + ) #: Storage for NUXs the user has encountered. queued_nudges: t.Optional[t.List[str]] = Field( default=None, max_length=1000 ) #: An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. @@ -343,3 +346,18 @@ class BskyAppProgressGuide(base.ModelBase): py_type: t.Literal['app.bsky.actor.defs#bskyAppProgressGuide'] = Field( default='app.bsky.actor.defs#bskyAppProgressGuide', alias='$type', frozen=True ) + + +class Nux(base.ModelBase): + """Definition model for :obj:`app.bsky.actor.defs`. A new user experiences (NUX) storage object.""" + + completed: bool = False #: Completed. + id: str = Field(max_length=100) #: Id. + data: t.Optional[str] = Field( + default=None, max_length=3000 + ) #: Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. + expires_at: t.Optional[ + str + ] = None #: The date and time at which the NUX will expire and should be considered completed. + + py_type: t.Literal['app.bsky.actor.defs#nux'] = Field(default='app.bsky.actor.defs#nux', alias='$type', frozen=True)