Skip to content

Commit 99a0776

Browse files
committed
Added notes about disabling expiration date and password on public resources
1 parent f85db44 commit 99a0776

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

docs/locales/ru/LC_MESSAGES/api_reference.po

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
#
66
msgid ""
77
msgstr ""
8-
"Project-Id-Version: YaDisk 3.3.0\n"
8+
"Project-Id-Version: YaDisk 3.4.0\n"
99
"Report-Msgid-Bugs-To: [email protected]\n"
10-
"POT-Creation-Date: 2025-07-09 19:35+0500\n"
11-
"PO-Revision-Date: 2025-02-03 19:21+0500\n"
10+
"POT-Creation-Date: 2025-07-10 18:15+0500\n"
11+
"PO-Revision-Date: 2025-07-10 18:19+0500\n"
1212
"Last-Translator: Ivan Konovalov <[email protected]>\n"
1313
"Language-Team: Russian\n"
1414
"MIME-Version: 1.0\n"
@@ -6915,6 +6915,18 @@ msgstr ""
69156915
msgid "`List[PublicSettingsAccess]`, list of access settings"
69166916
msgstr "`List[PublicSettingsAccess]`, список настроек доступа"
69176917

6918+
#: of yadisk.types.PublicSettings:17
6919+
msgid ""
6920+
"It appears that passing :code:`available_until` as an empty string "
6921+
"disables the expiration date. Similarly, password can be disabled by "
6922+
"passing :code:`False` or :code:`0`. This is not officially documented, "
6923+
"though."
6924+
msgstr ""
6925+
"Как показывает практика, передача пустой строки в поле "
6926+
":code:`available_until` отключает дату истечения доступа. Аналогично, "
6927+
"пароль можно отключить, передав :code:`False` или :code:`0`. Но подобное "
6928+
"поведение не задокументировано."
6929+
69186930
#: of yadisk.types.PublicSettingsAccess:7
69196931
msgid "`List[str]`, list of user IDs"
69206932
msgstr "`List[str]`, список идентификаторов пользователей"

src/yadisk/types.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,19 @@ class PublicSettings(TypedDict, total=False):
281281
:ivar external_organization_id_verbose: :any:`ExternalOrganizationIdVerbose`,
282282
verbose information about the external organization ID
283283
:ivar accesses: `List[PublicSettingsAccess]`, list of access settings
284+
285+
.. note::
286+
287+
It appears that passing :code:`available_until` as an empty string
288+
disables the expiration date. Similarly, password can be disabled
289+
by passing :code:`False` or :code:`0`. This is not officially
290+
documented, though.
284291
"""
285292

286-
available_until: int
293+
available_until: Union[int, str]
287294
read_only: bool
288295
available_until_verbose: "AvailableUntilVerbose"
289-
password: str
296+
password: Union[str, Literal[False, 0]]
290297
password_verbose: "PasswordVerbose"
291298
external_organization_id: str
292299
external_organization_id_verbose: "ExternalOrganizationIdVerbose"

0 commit comments

Comments
 (0)