valentina-python-client 1.23.0__tar.gz → 2.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/PKG-INFO +4 -4
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/pyproject.toml +15 -15
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/__init__.py +1 -1
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/companies.py +2 -2
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/dicerolls.py +55 -7
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/__init__.py +4 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/companies.py +39 -5
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/system.py +4 -1
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/companies.py +2 -2
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/dicerolls.py +49 -5
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/users.py +0 -12
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/LICENSE +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/README.md +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_codegen.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/__init__.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/client.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/registry.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/__init__.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/_audit_params.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/base.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/campaign_book_chapters.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/campaign_books.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/campaigns.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/character_autogen.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/character_blueprint.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/character_traits.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/characters.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/developers.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/dictionary.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/global_admin.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/options.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/system.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/user_lookup.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/user_self_registration.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/users.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/testing/__init__.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/testing/_client.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/client.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/config.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/constants.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/endpoints.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/exceptions.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/audit_logs.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/books.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/campaigns.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/chapters.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/character_autogen.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/character_blueprint.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/character_trait.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/characters.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/developers.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/diceroll.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/dictionary.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/full_sheet.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/global_admin.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/pagination.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/shared.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/user_lookup.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/users.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/py.typed +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/registry.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/__init__.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/_audit_params.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/base.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/campaign_book_chapters.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/campaign_books.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/campaigns.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/character_autogen.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/character_blueprint.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/character_traits.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/characters.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/developers.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/dictionary.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/global_admin.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/options.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/system.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/user_lookup.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/user_self_registration.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/testing/__init__.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/testing/_client.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/testing/_factories.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/testing/_router.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/testing/_routes.py +0 -0
- {valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/validate_constants.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: valentina-python-client
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: Async Python client library for the Valentina Noir API
|
|
5
5
|
Author: Nate Landau
|
|
6
6
|
Author-email: Nate Landau <github@natenate.org>
|
|
@@ -15,11 +15,11 @@ License: MIT License
|
|
|
15
15
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
-
Requires-Dist: anyio>=4.13.0
|
|
18
|
+
Requires-Dist: anyio>=4.13.0,<5.0.0
|
|
19
19
|
Requires-Dist: httpx>=0.28.1
|
|
20
20
|
Requires-Dist: loguru>=0.7.3
|
|
21
|
-
Requires-Dist: polyfactory>=3.3.0
|
|
22
|
-
Requires-Dist: pydantic[email]>=2.
|
|
21
|
+
Requires-Dist: polyfactory>=3.3.0,<4.0.0
|
|
22
|
+
Requires-Dist: pydantic[email]>=2.13.4,<3.0.0
|
|
23
23
|
Requires-Dist: polyfactory>=3.3.0 ; extra == 'testing'
|
|
24
24
|
Requires-Python: >=3.13
|
|
25
25
|
Project-URL: Homepage, https://docs.valentina-noir.com/python-api-client/
|
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
"Programming Language :: Python :: 3.14",
|
|
6
6
|
]
|
|
7
7
|
dependencies = [
|
|
8
|
-
"anyio>=4.13.0",
|
|
8
|
+
"anyio>=4.13.0, <5.0.0",
|
|
9
9
|
"httpx>=0.28.1",
|
|
10
10
|
"loguru>=0.7.3",
|
|
11
|
-
"polyfactory>=3.3.0",
|
|
12
|
-
"pydantic[email]>=2.
|
|
11
|
+
"polyfactory>=3.3.0, <4.0.0",
|
|
12
|
+
"pydantic[email]>=2.13.4, <3.0.0",
|
|
13
13
|
]
|
|
14
14
|
description = "Async Python client library for the Valentina Noir API"
|
|
15
15
|
license = { file = "LICENSE" }
|
|
16
16
|
name = "valentina-python-client"
|
|
17
17
|
readme = "README.md"
|
|
18
18
|
requires-python = ">=3.13"
|
|
19
|
-
version = "1.
|
|
19
|
+
version = "2.1.0"
|
|
20
20
|
|
|
21
21
|
[project.optional-dependencies]
|
|
22
22
|
testing = ["polyfactory>=3.3.0"]
|
|
@@ -27,35 +27,35 @@
|
|
|
27
27
|
|
|
28
28
|
[build-system]
|
|
29
29
|
build-backend = "uv_build"
|
|
30
|
-
requires = ["uv_build>=0.
|
|
30
|
+
requires = ["uv_build>=0.11.15,<0.12.0"]
|
|
31
31
|
|
|
32
32
|
[tool.uv.build-backend]
|
|
33
33
|
module-name = "vclient"
|
|
34
34
|
|
|
35
35
|
[dependency-groups]
|
|
36
36
|
dev = [
|
|
37
|
-
"commitizen>=4.
|
|
38
|
-
"coverage>=7.
|
|
37
|
+
"commitizen>=4.16.2",
|
|
38
|
+
"coverage>=7.14.0",
|
|
39
39
|
"duty>=1.9.0",
|
|
40
|
-
"prek>=0.
|
|
40
|
+
"prek>=0.4.1",
|
|
41
41
|
"pytest-anyio>=0.0.0",
|
|
42
42
|
"pytest-clarity>=1.0.1",
|
|
43
43
|
"pytest-cov>=7.1.0",
|
|
44
|
-
"pytest-devtools>=1.
|
|
44
|
+
"pytest-devtools>=1.2.0",
|
|
45
45
|
"pytest-mock>=3.15.1",
|
|
46
46
|
"pytest-repeat>=0.9.4",
|
|
47
47
|
"pytest-sugar>=1.1.1",
|
|
48
48
|
"pytest-xdist>=3.8.0",
|
|
49
|
-
"pytest>=9.0.
|
|
50
|
-
"respx>=0.
|
|
51
|
-
"ruff>=0.15.
|
|
49
|
+
"pytest>=9.0.3",
|
|
50
|
+
"respx>=0.23.1",
|
|
51
|
+
"ruff>=0.15.14",
|
|
52
52
|
"shellcheck-py>=0.11.0.1",
|
|
53
|
-
"ty>=0.0.
|
|
54
|
-
"typos>=1.
|
|
53
|
+
"ty>=0.0.39",
|
|
54
|
+
"typos>=1.46.2",
|
|
55
55
|
"vulture>=2.16",
|
|
56
56
|
"yamllint>=1.38.0",
|
|
57
57
|
]
|
|
58
|
-
docs = ["zensical>=0.0.
|
|
58
|
+
docs = ["zensical>=0.0.43"]
|
|
59
59
|
|
|
60
60
|
[tool.commitizen]
|
|
61
61
|
bump_message = "bump(release): v$current_version → v$new_version"
|
|
@@ -115,7 +115,7 @@ class SyncCompaniesService(SyncBaseService):
|
|
|
115
115
|
request: A CompanyCreate model, OR pass fields as keyword arguments.
|
|
116
116
|
**kwargs: Fields for CompanyCreate if request is not provided.
|
|
117
117
|
Accepts: name (str, required), email (str, required),
|
|
118
|
-
description (str | None), settings (
|
|
118
|
+
description (str | None), settings (CompanySettingsCreate | None).
|
|
119
119
|
|
|
120
120
|
Returns:
|
|
121
121
|
The newly created NewCompanyResponse object containing the company and admin user.
|
|
@@ -141,7 +141,7 @@ class SyncCompaniesService(SyncBaseService):
|
|
|
141
141
|
request: A CompanyUpdate model, OR pass fields as keyword arguments.
|
|
142
142
|
**kwargs: Fields for CompanyUpdate if request is not provided.
|
|
143
143
|
Accepts: name (str | None), email (str | None),
|
|
144
|
-
description (str | None), settings (
|
|
144
|
+
description (str | None), settings (CompanySettingsUpdate | None).
|
|
145
145
|
|
|
146
146
|
Returns:
|
|
147
147
|
The updated Company object.
|
|
@@ -5,7 +5,7 @@ from collections.abc import Iterator
|
|
|
5
5
|
from typing import TYPE_CHECKING
|
|
6
6
|
|
|
7
7
|
from vclient._sync.services.base import SyncBaseService
|
|
8
|
-
from vclient.constants import DEFAULT_PAGE_LIMIT
|
|
8
|
+
from vclient.constants import DEFAULT_PAGE_LIMIT, CharacterType
|
|
9
9
|
from vclient.endpoints import Endpoints
|
|
10
10
|
from vclient.models import Diceroll, DicerollCreate, PaginatedResponse, _DicerollQuickrollCreate
|
|
11
11
|
|
|
@@ -40,15 +40,32 @@ class SyncDicerollService(SyncBaseService):
|
|
|
40
40
|
userid: str | None = None,
|
|
41
41
|
characterid: str | None = None,
|
|
42
42
|
campaignid: str | None = None,
|
|
43
|
+
character_type: CharacterType | None = None,
|
|
43
44
|
) -> PaginatedResponse[Diceroll]:
|
|
44
|
-
"""Retrieve a paginated page of dice rolls.
|
|
45
|
+
"""Retrieve a paginated page of dice rolls.
|
|
46
|
+
|
|
47
|
+
Args:
|
|
48
|
+
limit: Maximum number of items to return (0-100, default 10).
|
|
49
|
+
offset: Number of items to skip from the beginning (default 0).
|
|
50
|
+
userid: Filter by user ID.
|
|
51
|
+
characterid: Filter by character ID.
|
|
52
|
+
campaignid: Filter by campaign ID.
|
|
53
|
+
character_type: Filter by the associated character's type. Rolls with
|
|
54
|
+
no character are excluded when this filter is set.
|
|
55
|
+
|
|
56
|
+
Returns:
|
|
57
|
+
A PaginatedResponse containing Diceroll objects and pagination metadata.
|
|
58
|
+
"""
|
|
45
59
|
return self._get_paginated_as(
|
|
46
60
|
self._format_endpoint(Endpoints.DICEROLLS),
|
|
47
61
|
Diceroll,
|
|
48
62
|
limit=limit,
|
|
49
63
|
offset=offset,
|
|
50
64
|
params=self._build_params(
|
|
51
|
-
userid=userid,
|
|
65
|
+
userid=userid,
|
|
66
|
+
characterid=characterid,
|
|
67
|
+
campaignid=campaignid,
|
|
68
|
+
character_type=character_type,
|
|
52
69
|
),
|
|
53
70
|
)
|
|
54
71
|
|
|
@@ -58,12 +75,27 @@ class SyncDicerollService(SyncBaseService):
|
|
|
58
75
|
userid: str | None = None,
|
|
59
76
|
characterid: str | None = None,
|
|
60
77
|
campaignid: str | None = None,
|
|
78
|
+
character_type: CharacterType | None = None,
|
|
61
79
|
) -> list[Diceroll]:
|
|
62
|
-
"""Retrieve all dice rolls.
|
|
80
|
+
"""Retrieve all dice rolls.
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
userid: Filter by user ID.
|
|
84
|
+
characterid: Filter by character ID.
|
|
85
|
+
campaignid: Filter by campaign ID.
|
|
86
|
+
character_type: Filter by the associated character's type. Rolls with
|
|
87
|
+
no character are excluded when this filter is set.
|
|
88
|
+
|
|
89
|
+
Returns:
|
|
90
|
+
A list of all Diceroll objects.
|
|
91
|
+
"""
|
|
63
92
|
return [
|
|
64
93
|
diceroll
|
|
65
94
|
for diceroll in self.iter_all(
|
|
66
|
-
userid=userid,
|
|
95
|
+
userid=userid,
|
|
96
|
+
characterid=characterid,
|
|
97
|
+
campaignid=campaignid,
|
|
98
|
+
character_type=character_type,
|
|
67
99
|
)
|
|
68
100
|
]
|
|
69
101
|
|
|
@@ -73,14 +105,30 @@ class SyncDicerollService(SyncBaseService):
|
|
|
73
105
|
userid: str | None = None,
|
|
74
106
|
characterid: str | None = None,
|
|
75
107
|
campaignid: str | None = None,
|
|
108
|
+
character_type: CharacterType | None = None,
|
|
76
109
|
limit: int = 100,
|
|
77
110
|
) -> Iterator[Diceroll]:
|
|
78
|
-
"""Iterate through all dice rolls.
|
|
111
|
+
"""Iterate through all dice rolls.
|
|
112
|
+
|
|
113
|
+
Args:
|
|
114
|
+
userid: Filter by user ID.
|
|
115
|
+
characterid: Filter by character ID.
|
|
116
|
+
campaignid: Filter by campaign ID.
|
|
117
|
+
character_type: Filter by the associated character's type. Rolls with
|
|
118
|
+
no character are excluded when this filter is set.
|
|
119
|
+
limit: Items per page (default 100 for efficiency).
|
|
120
|
+
|
|
121
|
+
Yields:
|
|
122
|
+
Individual Diceroll objects.
|
|
123
|
+
"""
|
|
79
124
|
for item in self._iter_all_pages(
|
|
80
125
|
self._format_endpoint(Endpoints.DICEROLLS),
|
|
81
126
|
limit=limit,
|
|
82
127
|
params=self._build_params(
|
|
83
|
-
userid=userid,
|
|
128
|
+
userid=userid,
|
|
129
|
+
characterid=characterid,
|
|
130
|
+
campaignid=campaignid,
|
|
131
|
+
character_type=character_type,
|
|
84
132
|
),
|
|
85
133
|
):
|
|
86
134
|
yield Diceroll.model_validate(item)
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/__init__.py
RENAMED
|
@@ -73,6 +73,8 @@ from .companies import (
|
|
|
73
73
|
CompanyCreate,
|
|
74
74
|
CompanyPermissions,
|
|
75
75
|
CompanySettings,
|
|
76
|
+
CompanySettingsCreate,
|
|
77
|
+
CompanySettingsUpdate,
|
|
76
78
|
CompanyUpdate,
|
|
77
79
|
NewCompanyResponse,
|
|
78
80
|
_GrantAccess as _GrantAccess,
|
|
@@ -177,6 +179,8 @@ __all__ = [
|
|
|
177
179
|
"CompanyCreate",
|
|
178
180
|
"CompanyPermissions",
|
|
179
181
|
"CompanySettings",
|
|
182
|
+
"CompanySettingsCreate",
|
|
183
|
+
"CompanySettingsUpdate",
|
|
180
184
|
"CompanyUpdate",
|
|
181
185
|
"CreateAutogenerateDTO",
|
|
182
186
|
"Developer",
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/companies.py
RENAMED
|
@@ -16,14 +16,46 @@ from vclient.models.users import User
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class CompanySettings(BaseModel):
|
|
19
|
-
"""
|
|
19
|
+
"""Company configuration settings as returned by the API.
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
Strict response model — every field is always populated by the server.
|
|
22
|
+
For partial create/update payloads, use CompanySettingsCreate or
|
|
23
|
+
CompanySettingsUpdate instead.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
character_autogen_xp_cost: int
|
|
27
|
+
character_autogen_num_choices: int
|
|
28
|
+
character_autogen_starting_points: int
|
|
29
|
+
permission_manage_campaign: ManageCampaignPermission
|
|
30
|
+
permission_grant_xp: GrantXPPermission
|
|
31
|
+
permission_free_trait_changes: FreeTraitChangesPermission
|
|
32
|
+
permission_recoup_xp: RecoupXPPermission
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class CompanySettingsCreate(BaseModel):
|
|
36
|
+
"""Partial CompanySettings payload for POST /companies.
|
|
37
|
+
|
|
38
|
+
All fields optional — the server applies defaults for anything omitted.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
character_autogen_xp_cost: int | None = None
|
|
42
|
+
character_autogen_num_choices: int | None = None
|
|
43
|
+
character_autogen_starting_points: int | None = None
|
|
44
|
+
permission_manage_campaign: ManageCampaignPermission | None = None
|
|
45
|
+
permission_grant_xp: GrantXPPermission | None = None
|
|
46
|
+
permission_free_trait_changes: FreeTraitChangesPermission | None = None
|
|
47
|
+
permission_recoup_xp: RecoupXPPermission | None = None
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class CompanySettingsUpdate(BaseModel):
|
|
51
|
+
"""Partial CompanySettings payload for PATCH /companies/{id}.
|
|
52
|
+
|
|
53
|
+
All fields optional — omitted fields remain unchanged on the server.
|
|
23
54
|
"""
|
|
24
55
|
|
|
25
56
|
character_autogen_xp_cost: int | None = None
|
|
26
57
|
character_autogen_num_choices: int | None = None
|
|
58
|
+
character_autogen_starting_points: int | None = None
|
|
27
59
|
permission_manage_campaign: ManageCampaignPermission | None = None
|
|
28
60
|
permission_grant_xp: GrantXPPermission | None = None
|
|
29
61
|
permission_free_trait_changes: FreeTraitChangesPermission | None = None
|
|
@@ -86,7 +118,7 @@ class CompanyCreate(BaseModel):
|
|
|
86
118
|
name: str = Field(min_length=3, max_length=50)
|
|
87
119
|
email: str
|
|
88
120
|
description: Annotated[str, Field(min_length=3)] | None = None
|
|
89
|
-
settings:
|
|
121
|
+
settings: CompanySettingsCreate | None = None
|
|
90
122
|
|
|
91
123
|
|
|
92
124
|
class CompanyUpdate(BaseModel):
|
|
@@ -98,7 +130,7 @@ class CompanyUpdate(BaseModel):
|
|
|
98
130
|
name: Annotated[str, Field(min_length=3, max_length=50)] | None = None
|
|
99
131
|
email: str | None = None
|
|
100
132
|
description: Annotated[str, Field(min_length=3)] | None = None
|
|
101
|
-
settings:
|
|
133
|
+
settings: CompanySettingsUpdate | None = None
|
|
102
134
|
|
|
103
135
|
|
|
104
136
|
class _GrantAccess(BaseModel):
|
|
@@ -113,6 +145,8 @@ __all__ = [
|
|
|
113
145
|
"CompanyCreate",
|
|
114
146
|
"CompanyPermissions",
|
|
115
147
|
"CompanySettings",
|
|
148
|
+
"CompanySettingsCreate",
|
|
149
|
+
"CompanySettingsUpdate",
|
|
116
150
|
"CompanyUpdate",
|
|
117
151
|
"NewCompanyResponse",
|
|
118
152
|
"_GrantAccess",
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/system.py
RENAMED
|
@@ -7,9 +7,12 @@ class SystemHealth(BaseModel):
|
|
|
7
7
|
"""Response model for system health check.
|
|
8
8
|
|
|
9
9
|
Represents the health status of the API and its dependencies including
|
|
10
|
-
database and cache connectivity.
|
|
10
|
+
database and cache connectivity, latency metrics, and uptime information.
|
|
11
11
|
"""
|
|
12
12
|
|
|
13
13
|
database_status: str
|
|
14
14
|
cache_status: str
|
|
15
|
+
database_latency_ms: float | None
|
|
16
|
+
cache_latency_ms: float | None
|
|
17
|
+
uptime: str
|
|
15
18
|
version: str
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/companies.py
RENAMED
|
@@ -126,7 +126,7 @@ class CompaniesService(BaseService):
|
|
|
126
126
|
request: A CompanyCreate model, OR pass fields as keyword arguments.
|
|
127
127
|
**kwargs: Fields for CompanyCreate if request is not provided.
|
|
128
128
|
Accepts: name (str, required), email (str, required),
|
|
129
|
-
description (str | None), settings (
|
|
129
|
+
description (str | None), settings (CompanySettingsCreate | None).
|
|
130
130
|
|
|
131
131
|
Returns:
|
|
132
132
|
The newly created NewCompanyResponse object containing the company and admin user.
|
|
@@ -157,7 +157,7 @@ class CompaniesService(BaseService):
|
|
|
157
157
|
request: A CompanyUpdate model, OR pass fields as keyword arguments.
|
|
158
158
|
**kwargs: Fields for CompanyUpdate if request is not provided.
|
|
159
159
|
Accepts: name (str | None), email (str | None),
|
|
160
|
-
description (str | None), settings (
|
|
160
|
+
description (str | None), settings (CompanySettingsUpdate | None).
|
|
161
161
|
|
|
162
162
|
Returns:
|
|
163
163
|
The updated Company object.
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/dicerolls.py
RENAMED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from collections.abc import AsyncIterator
|
|
4
4
|
from typing import TYPE_CHECKING
|
|
5
5
|
|
|
6
|
-
from vclient.constants import DEFAULT_PAGE_LIMIT
|
|
6
|
+
from vclient.constants import DEFAULT_PAGE_LIMIT, CharacterType
|
|
7
7
|
from vclient.endpoints import Endpoints
|
|
8
8
|
from vclient.models import (
|
|
9
9
|
Diceroll,
|
|
@@ -48,8 +48,22 @@ class DicerollService(BaseService):
|
|
|
48
48
|
userid: str | None = None,
|
|
49
49
|
characterid: str | None = None,
|
|
50
50
|
campaignid: str | None = None,
|
|
51
|
+
character_type: CharacterType | None = None,
|
|
51
52
|
) -> PaginatedResponse[Diceroll]:
|
|
52
|
-
"""Retrieve a paginated page of dice rolls.
|
|
53
|
+
"""Retrieve a paginated page of dice rolls.
|
|
54
|
+
|
|
55
|
+
Args:
|
|
56
|
+
limit: Maximum number of items to return (0-100, default 10).
|
|
57
|
+
offset: Number of items to skip from the beginning (default 0).
|
|
58
|
+
userid: Filter by user ID.
|
|
59
|
+
characterid: Filter by character ID.
|
|
60
|
+
campaignid: Filter by campaign ID.
|
|
61
|
+
character_type: Filter by the associated character's type. Rolls with
|
|
62
|
+
no character are excluded when this filter is set.
|
|
63
|
+
|
|
64
|
+
Returns:
|
|
65
|
+
A PaginatedResponse containing Diceroll objects and pagination metadata.
|
|
66
|
+
"""
|
|
53
67
|
return await self._get_paginated_as(
|
|
54
68
|
self._format_endpoint(Endpoints.DICEROLLS),
|
|
55
69
|
Diceroll,
|
|
@@ -59,6 +73,7 @@ class DicerollService(BaseService):
|
|
|
59
73
|
userid=userid,
|
|
60
74
|
characterid=characterid,
|
|
61
75
|
campaignid=campaignid,
|
|
76
|
+
character_type=character_type,
|
|
62
77
|
),
|
|
63
78
|
)
|
|
64
79
|
|
|
@@ -68,12 +83,27 @@ class DicerollService(BaseService):
|
|
|
68
83
|
userid: str | None = None,
|
|
69
84
|
characterid: str | None = None,
|
|
70
85
|
campaignid: str | None = None,
|
|
86
|
+
character_type: CharacterType | None = None,
|
|
71
87
|
) -> list[Diceroll]:
|
|
72
|
-
"""Retrieve all dice rolls.
|
|
88
|
+
"""Retrieve all dice rolls.
|
|
89
|
+
|
|
90
|
+
Args:
|
|
91
|
+
userid: Filter by user ID.
|
|
92
|
+
characterid: Filter by character ID.
|
|
93
|
+
campaignid: Filter by campaign ID.
|
|
94
|
+
character_type: Filter by the associated character's type. Rolls with
|
|
95
|
+
no character are excluded when this filter is set.
|
|
96
|
+
|
|
97
|
+
Returns:
|
|
98
|
+
A list of all Diceroll objects.
|
|
99
|
+
"""
|
|
73
100
|
return [
|
|
74
101
|
diceroll
|
|
75
102
|
async for diceroll in self.iter_all(
|
|
76
|
-
userid=userid,
|
|
103
|
+
userid=userid,
|
|
104
|
+
characterid=characterid,
|
|
105
|
+
campaignid=campaignid,
|
|
106
|
+
character_type=character_type,
|
|
77
107
|
)
|
|
78
108
|
]
|
|
79
109
|
|
|
@@ -83,9 +113,22 @@ class DicerollService(BaseService):
|
|
|
83
113
|
userid: str | None = None,
|
|
84
114
|
characterid: str | None = None,
|
|
85
115
|
campaignid: str | None = None,
|
|
116
|
+
character_type: CharacterType | None = None,
|
|
86
117
|
limit: int = 100,
|
|
87
118
|
) -> AsyncIterator[Diceroll]:
|
|
88
|
-
"""Iterate through all dice rolls.
|
|
119
|
+
"""Iterate through all dice rolls.
|
|
120
|
+
|
|
121
|
+
Args:
|
|
122
|
+
userid: Filter by user ID.
|
|
123
|
+
characterid: Filter by character ID.
|
|
124
|
+
campaignid: Filter by campaign ID.
|
|
125
|
+
character_type: Filter by the associated character's type. Rolls with
|
|
126
|
+
no character are excluded when this filter is set.
|
|
127
|
+
limit: Items per page (default 100 for efficiency).
|
|
128
|
+
|
|
129
|
+
Yields:
|
|
130
|
+
Individual Diceroll objects.
|
|
131
|
+
"""
|
|
89
132
|
async for item in self._iter_all_pages(
|
|
90
133
|
self._format_endpoint(Endpoints.DICEROLLS),
|
|
91
134
|
limit=limit,
|
|
@@ -93,6 +136,7 @@ class DicerollService(BaseService):
|
|
|
93
136
|
userid=userid,
|
|
94
137
|
characterid=characterid,
|
|
95
138
|
campaignid=campaignid,
|
|
139
|
+
character_type=character_type,
|
|
96
140
|
),
|
|
97
141
|
):
|
|
98
142
|
yield Diceroll.model_validate(item)
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/users.py
RENAMED
|
@@ -63,9 +63,7 @@ class UsersService(BaseService):
|
|
|
63
63
|
"""Format an endpoint with the scoped company_id plus any extra params."""
|
|
64
64
|
return endpoint.format(company_id=self._company_id, **kwargs)
|
|
65
65
|
|
|
66
|
-
# -------------------------------------------------------------------------
|
|
67
66
|
# Unapproved User Methods
|
|
68
|
-
# -------------------------------------------------------------------------
|
|
69
67
|
|
|
70
68
|
async def get_unapproved_page(
|
|
71
69
|
self,
|
|
@@ -202,9 +200,7 @@ class UsersService(BaseService):
|
|
|
202
200
|
)
|
|
203
201
|
return User.model_validate(response.json())
|
|
204
202
|
|
|
205
|
-
# -------------------------------------------------------------------------
|
|
206
203
|
# User CRUD Methods
|
|
207
|
-
# -------------------------------------------------------------------------
|
|
208
204
|
|
|
209
205
|
async def get_page(
|
|
210
206
|
self,
|
|
@@ -445,9 +441,7 @@ class UsersService(BaseService):
|
|
|
445
441
|
)
|
|
446
442
|
return RollStatistics.model_validate(response.json())
|
|
447
443
|
|
|
448
|
-
# -------------------------------------------------------------------------
|
|
449
444
|
# Asset Methods
|
|
450
|
-
# -------------------------------------------------------------------------
|
|
451
445
|
|
|
452
446
|
async def get_assets_page(
|
|
453
447
|
self,
|
|
@@ -604,9 +598,7 @@ class UsersService(BaseService):
|
|
|
604
598
|
)
|
|
605
599
|
return Asset.model_validate(response.json())
|
|
606
600
|
|
|
607
|
-
# -------------------------------------------------------------------------
|
|
608
601
|
# Experience Methods
|
|
609
|
-
# -------------------------------------------------------------------------
|
|
610
602
|
|
|
611
603
|
async def get_experience(
|
|
612
604
|
self,
|
|
@@ -740,9 +732,7 @@ class UsersService(BaseService):
|
|
|
740
732
|
)
|
|
741
733
|
return CampaignExperience.model_validate(response.json())
|
|
742
734
|
|
|
743
|
-
# -------------------------------------------------------------------------
|
|
744
735
|
# Notes Methods
|
|
745
|
-
# -------------------------------------------------------------------------
|
|
746
736
|
|
|
747
737
|
async def get_notes_page(
|
|
748
738
|
self,
|
|
@@ -931,9 +921,7 @@ class UsersService(BaseService):
|
|
|
931
921
|
self._format_endpoint(Endpoints.USER_NOTE, user_id=user_id, note_id=note_id)
|
|
932
922
|
)
|
|
933
923
|
|
|
934
|
-
# -------------------------------------------------------------------------
|
|
935
924
|
# Quickroll Methods
|
|
936
|
-
# -------------------------------------------------------------------------
|
|
937
925
|
|
|
938
926
|
async def get_quickrolls_page(
|
|
939
927
|
self,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/__init__.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/client.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/registry.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/_sync/services/users.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/audit_logs.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/books.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/campaigns.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/chapters.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/characters.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/developers.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/diceroll.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/dictionary.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/full_sheet.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/global_admin.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/pagination.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/shared.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/user_lookup.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/models/users.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/campaigns.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/characters.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/developers.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/dictionary.py
RENAMED
|
File without changes
|
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/options.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/system.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/services/user_lookup.py
RENAMED
|
File without changes
|
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/testing/__init__.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/testing/_client.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/testing/_factories.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/testing/_router.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/testing/_routes.py
RENAMED
|
File without changes
|
{valentina_python_client-1.23.0 → valentina_python_client-2.1.0}/src/vclient/validate_constants.py
RENAMED
|
File without changes
|