valentina-python-client 1.4.0__tar.gz → 1.4.1__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.4.0 → valentina_python_client-1.4.1}/PKG-INFO +1 -1
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/pyproject.toml +1 -1
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/__init__.py +1 -1
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/constants.py +2 -2
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/__init__.py +2 -2
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/shared.py +6 -6
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/campaign_book_chapters.py +10 -10
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/campaign_books.py +10 -10
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/campaigns.py +10 -10
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/characters.py +10 -10
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/users.py +10 -10
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/validate_constants.py +2 -2
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/LICENSE +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/README.md +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/client.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/config.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/endpoints.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/exceptions.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/books.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/campaigns.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/chapters.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/character_autogen.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/character_blueprint.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/character_trait.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/characters.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/companies.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/developers.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/diceroll.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/dictionary.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/global_admin.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/pagination.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/system.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/users.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/py.typed +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/registry.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/__init__.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/base.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/character_autogen.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/character_blueprint.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/character_traits.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/companies.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/developers.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/dicerolls.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/dictionary.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/global_admin.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/options.py +0 -0
- {valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/system.py +0 -0
|
@@ -55,10 +55,10 @@ HunterEdgeType = Literal["ASSETS", "APTITUDES", "ENDOWMENTS"]
|
|
|
55
55
|
ManageCampaignPermission = Literal["UNRESTRICTED", "STORYTELLER"]
|
|
56
56
|
PermissionLevel = Literal["USER", "ADMIN", "OWNER", "REVOKE"]
|
|
57
57
|
RollResultType = Literal["SUCCESS", "FAILURE", "BOTCH", "CRITICAL", "OTHER"]
|
|
58
|
-
|
|
58
|
+
AssetParentType = Literal[
|
|
59
59
|
"character", "campaign", "campaignbook", "campaignchapter", "user", "company", "unknown"
|
|
60
60
|
]
|
|
61
|
-
|
|
61
|
+
AssetType = Literal["image", "text", "audio", "video", "document", "archive", "other"]
|
|
62
62
|
SpecialtyType = Literal["ACTION", "OTHER", "PASSIVE", "RITUAL", "SPELL"]
|
|
63
63
|
UserRole = Literal["ADMIN", "STORYTELLER", "PLAYER"]
|
|
64
64
|
WerewolfRenown = Literal["HONOR", "GLORY", "WISDOM"]
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/__init__.py
RENAMED
|
@@ -95,13 +95,13 @@ from .global_admin import (
|
|
|
95
95
|
)
|
|
96
96
|
from .pagination import PaginatedResponse
|
|
97
97
|
from .shared import (
|
|
98
|
+
Asset,
|
|
98
99
|
CharacterSpecialty,
|
|
99
100
|
NameDescriptionSubDocument,
|
|
100
101
|
Note,
|
|
101
102
|
NoteCreate,
|
|
102
103
|
NoteUpdate,
|
|
103
104
|
RollStatistics,
|
|
104
|
-
S3Asset,
|
|
105
105
|
Trait,
|
|
106
106
|
WerewolfGift,
|
|
107
107
|
WerewolfRite,
|
|
@@ -120,6 +120,7 @@ from .users import (
|
|
|
120
120
|
)
|
|
121
121
|
|
|
122
122
|
__all__ = [
|
|
123
|
+
"Asset",
|
|
123
124
|
"BookCreate",
|
|
124
125
|
"BookUpdate",
|
|
125
126
|
"Campaign",
|
|
@@ -183,7 +184,6 @@ __all__ = [
|
|
|
183
184
|
"QuickrollCreate",
|
|
184
185
|
"QuickrollUpdate",
|
|
185
186
|
"RollStatistics",
|
|
186
|
-
"S3Asset",
|
|
187
187
|
"SheetSection",
|
|
188
188
|
"SystemHealth",
|
|
189
189
|
"Trait",
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/shared.py
RENAMED
|
@@ -6,10 +6,10 @@ from typing import Annotated, Any
|
|
|
6
6
|
from pydantic import BaseModel, Field
|
|
7
7
|
|
|
8
8
|
from vclient.constants import (
|
|
9
|
+
AssetParentType,
|
|
10
|
+
AssetType,
|
|
9
11
|
CharacterClass,
|
|
10
12
|
GameVersion,
|
|
11
|
-
S3AssetParentType,
|
|
12
|
-
S3AssetType,
|
|
13
13
|
SpecialtyType,
|
|
14
14
|
WerewolfRenown,
|
|
15
15
|
)
|
|
@@ -31,7 +31,7 @@ class NameDescriptionSubDocument(BaseModel):
|
|
|
31
31
|
# -----------------------------------------------------------------------------
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
class
|
|
34
|
+
class Asset(BaseModel):
|
|
35
35
|
"""Response model for an S3 asset.
|
|
36
36
|
|
|
37
37
|
Represents a file asset stored in S3, including its URL and metadata.
|
|
@@ -40,13 +40,13 @@ class S3Asset(BaseModel):
|
|
|
40
40
|
id: str
|
|
41
41
|
date_created: datetime
|
|
42
42
|
date_modified: datetime
|
|
43
|
-
asset_type:
|
|
43
|
+
asset_type: AssetType
|
|
44
44
|
mime_type: str
|
|
45
45
|
original_filename: str
|
|
46
46
|
public_url: str
|
|
47
47
|
uploaded_by: str
|
|
48
48
|
company_id: str
|
|
49
|
-
parent_type:
|
|
49
|
+
parent_type: AssetParentType | None = None
|
|
50
50
|
parent_id: str | None = None
|
|
51
51
|
|
|
52
52
|
|
|
@@ -197,13 +197,13 @@ class CharacterSpecialty(BaseModel):
|
|
|
197
197
|
|
|
198
198
|
|
|
199
199
|
__all__ = [
|
|
200
|
+
"Asset",
|
|
200
201
|
"CharacterSpecialty",
|
|
201
202
|
"NameDescriptionSubDocument",
|
|
202
203
|
"Note",
|
|
203
204
|
"NoteCreate",
|
|
204
205
|
"NoteUpdate",
|
|
205
206
|
"RollStatistics",
|
|
206
|
-
"S3Asset",
|
|
207
207
|
"Trait",
|
|
208
208
|
"WerewolfGift",
|
|
209
209
|
"WerewolfRite",
|
|
@@ -7,6 +7,7 @@ from typing import TYPE_CHECKING
|
|
|
7
7
|
from vclient.constants import DEFAULT_PAGE_LIMIT
|
|
8
8
|
from vclient.endpoints import Endpoints
|
|
9
9
|
from vclient.models import (
|
|
10
|
+
Asset,
|
|
10
11
|
CampaignChapter,
|
|
11
12
|
ChapterCreate,
|
|
12
13
|
ChapterUpdate,
|
|
@@ -14,7 +15,6 @@ from vclient.models import (
|
|
|
14
15
|
NoteCreate,
|
|
15
16
|
NoteUpdate,
|
|
16
17
|
PaginatedResponse,
|
|
17
|
-
S3Asset,
|
|
18
18
|
_ChapterRenumber,
|
|
19
19
|
)
|
|
20
20
|
from vclient.services.base import BaseService
|
|
@@ -348,7 +348,7 @@ class ChaptersService(BaseService):
|
|
|
348
348
|
*,
|
|
349
349
|
limit: int = DEFAULT_PAGE_LIMIT,
|
|
350
350
|
offset: int = 0,
|
|
351
|
-
) -> PaginatedResponse[
|
|
351
|
+
) -> PaginatedResponse[Asset]:
|
|
352
352
|
"""Retrieve a paginated list of assets for a chapter.
|
|
353
353
|
|
|
354
354
|
Args:
|
|
@@ -357,7 +357,7 @@ class ChaptersService(BaseService):
|
|
|
357
357
|
offset: Number of items to skip from the beginning (default 0).
|
|
358
358
|
|
|
359
359
|
Returns:
|
|
360
|
-
A PaginatedResponse containing
|
|
360
|
+
A PaginatedResponse containing Asset objects and pagination metadata.
|
|
361
361
|
|
|
362
362
|
Raises:
|
|
363
363
|
NotFoundError: If the chapter does not exist.
|
|
@@ -365,7 +365,7 @@ class ChaptersService(BaseService):
|
|
|
365
365
|
"""
|
|
366
366
|
return await self._get_paginated_as(
|
|
367
367
|
self._format_endpoint(Endpoints.BOOK_CHAPTER_ASSETS, chapter_id=chapter_id),
|
|
368
|
-
|
|
368
|
+
Asset,
|
|
369
369
|
limit=limit,
|
|
370
370
|
offset=offset,
|
|
371
371
|
)
|
|
@@ -374,7 +374,7 @@ class ChaptersService(BaseService):
|
|
|
374
374
|
self,
|
|
375
375
|
chapter_id: str,
|
|
376
376
|
asset_id: str,
|
|
377
|
-
) ->
|
|
377
|
+
) -> Asset:
|
|
378
378
|
"""Retrieve details of a specific asset including its URL and metadata.
|
|
379
379
|
|
|
380
380
|
Args:
|
|
@@ -382,7 +382,7 @@ class ChaptersService(BaseService):
|
|
|
382
382
|
asset_id: The ID of the asset to retrieve.
|
|
383
383
|
|
|
384
384
|
Returns:
|
|
385
|
-
The
|
|
385
|
+
The Asset object with full details.
|
|
386
386
|
|
|
387
387
|
Raises:
|
|
388
388
|
NotFoundError: If the asset does not exist.
|
|
@@ -393,7 +393,7 @@ class ChaptersService(BaseService):
|
|
|
393
393
|
Endpoints.BOOK_CHAPTER_ASSET, chapter_id=chapter_id, asset_id=asset_id
|
|
394
394
|
)
|
|
395
395
|
)
|
|
396
|
-
return
|
|
396
|
+
return Asset.model_validate(response.json())
|
|
397
397
|
|
|
398
398
|
async def upload_asset(
|
|
399
399
|
self,
|
|
@@ -401,7 +401,7 @@ class ChaptersService(BaseService):
|
|
|
401
401
|
filename: str,
|
|
402
402
|
content: bytes,
|
|
403
403
|
content_type: str | None = None,
|
|
404
|
-
) ->
|
|
404
|
+
) -> Asset:
|
|
405
405
|
"""Upload a new asset for a chapter.
|
|
406
406
|
|
|
407
407
|
Uploads a file to S3 storage and associates it with the chapter.
|
|
@@ -413,7 +413,7 @@ class ChaptersService(BaseService):
|
|
|
413
413
|
content_type: The MIME type of the file. If not provided, inferred from filename.
|
|
414
414
|
|
|
415
415
|
Returns:
|
|
416
|
-
The created
|
|
416
|
+
The created Asset object with the public URL and metadata.
|
|
417
417
|
|
|
418
418
|
Raises:
|
|
419
419
|
NotFoundError: If the chapter does not exist.
|
|
@@ -427,7 +427,7 @@ class ChaptersService(BaseService):
|
|
|
427
427
|
self._format_endpoint(Endpoints.BOOK_CHAPTER_ASSET_UPLOAD, chapter_id=chapter_id),
|
|
428
428
|
file=(filename, content, content_type),
|
|
429
429
|
)
|
|
430
|
-
return
|
|
430
|
+
return Asset.model_validate(response.json())
|
|
431
431
|
|
|
432
432
|
async def delete_asset(
|
|
433
433
|
self,
|
|
@@ -7,6 +7,7 @@ from typing import TYPE_CHECKING
|
|
|
7
7
|
from vclient.constants import DEFAULT_PAGE_LIMIT
|
|
8
8
|
from vclient.endpoints import Endpoints
|
|
9
9
|
from vclient.models import (
|
|
10
|
+
Asset,
|
|
10
11
|
BookCreate,
|
|
11
12
|
BookUpdate,
|
|
12
13
|
CampaignBook,
|
|
@@ -14,7 +15,6 @@ from vclient.models import (
|
|
|
14
15
|
NoteCreate,
|
|
15
16
|
NoteUpdate,
|
|
16
17
|
PaginatedResponse,
|
|
17
|
-
S3Asset,
|
|
18
18
|
_BookRenumber,
|
|
19
19
|
)
|
|
20
20
|
from vclient.services.base import BaseService
|
|
@@ -444,7 +444,7 @@ class BooksService(BaseService):
|
|
|
444
444
|
*,
|
|
445
445
|
limit: int = DEFAULT_PAGE_LIMIT,
|
|
446
446
|
offset: int = 0,
|
|
447
|
-
) -> PaginatedResponse[
|
|
447
|
+
) -> PaginatedResponse[Asset]:
|
|
448
448
|
"""Retrieve a paginated list of assets for a book.
|
|
449
449
|
|
|
450
450
|
Args:
|
|
@@ -453,7 +453,7 @@ class BooksService(BaseService):
|
|
|
453
453
|
offset: Number of items to skip from the beginning (default 0).
|
|
454
454
|
|
|
455
455
|
Returns:
|
|
456
|
-
A PaginatedResponse containing
|
|
456
|
+
A PaginatedResponse containing Asset objects and pagination metadata.
|
|
457
457
|
|
|
458
458
|
Raises:
|
|
459
459
|
NotFoundError: If the book does not exist.
|
|
@@ -461,7 +461,7 @@ class BooksService(BaseService):
|
|
|
461
461
|
"""
|
|
462
462
|
return await self._get_paginated_as(
|
|
463
463
|
self._format_endpoint(Endpoints.BOOK_ASSETS, book_id=book_id),
|
|
464
|
-
|
|
464
|
+
Asset,
|
|
465
465
|
limit=limit,
|
|
466
466
|
offset=offset,
|
|
467
467
|
)
|
|
@@ -470,7 +470,7 @@ class BooksService(BaseService):
|
|
|
470
470
|
self,
|
|
471
471
|
book_id: str,
|
|
472
472
|
asset_id: str,
|
|
473
|
-
) ->
|
|
473
|
+
) -> Asset:
|
|
474
474
|
"""Retrieve details of a specific asset including its URL and metadata.
|
|
475
475
|
|
|
476
476
|
Args:
|
|
@@ -478,7 +478,7 @@ class BooksService(BaseService):
|
|
|
478
478
|
asset_id: The ID of the asset to retrieve.
|
|
479
479
|
|
|
480
480
|
Returns:
|
|
481
|
-
The
|
|
481
|
+
The Asset object with full details.
|
|
482
482
|
|
|
483
483
|
Raises:
|
|
484
484
|
NotFoundError: If the asset does not exist.
|
|
@@ -487,7 +487,7 @@ class BooksService(BaseService):
|
|
|
487
487
|
response = await self._get(
|
|
488
488
|
self._format_endpoint(Endpoints.BOOK_ASSET, book_id=book_id, asset_id=asset_id)
|
|
489
489
|
)
|
|
490
|
-
return
|
|
490
|
+
return Asset.model_validate(response.json())
|
|
491
491
|
|
|
492
492
|
async def upload_asset(
|
|
493
493
|
self,
|
|
@@ -495,7 +495,7 @@ class BooksService(BaseService):
|
|
|
495
495
|
filename: str,
|
|
496
496
|
content: bytes,
|
|
497
497
|
content_type: str | None = None,
|
|
498
|
-
) ->
|
|
498
|
+
) -> Asset:
|
|
499
499
|
"""Upload a new asset for a book.
|
|
500
500
|
|
|
501
501
|
Uploads a file to S3 storage and associates it with the book.
|
|
@@ -507,7 +507,7 @@ class BooksService(BaseService):
|
|
|
507
507
|
content_type: The MIME type of the file. If not provided, inferred from filename.
|
|
508
508
|
|
|
509
509
|
Returns:
|
|
510
|
-
The created
|
|
510
|
+
The created Asset object with the public URL and metadata.
|
|
511
511
|
|
|
512
512
|
Raises:
|
|
513
513
|
NotFoundError: If the book does not exist.
|
|
@@ -521,7 +521,7 @@ class BooksService(BaseService):
|
|
|
521
521
|
self._format_endpoint(Endpoints.BOOK_ASSET_UPLOAD, book_id=book_id),
|
|
522
522
|
file=(filename, content, content_type),
|
|
523
523
|
)
|
|
524
|
-
return
|
|
524
|
+
return Asset.model_validate(response.json())
|
|
525
525
|
|
|
526
526
|
async def delete_asset(
|
|
527
527
|
self,
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/campaigns.py
RENAMED
|
@@ -7,6 +7,7 @@ from typing import TYPE_CHECKING
|
|
|
7
7
|
from vclient.constants import DEFAULT_PAGE_LIMIT
|
|
8
8
|
from vclient.endpoints import Endpoints
|
|
9
9
|
from vclient.models import (
|
|
10
|
+
Asset,
|
|
10
11
|
Campaign,
|
|
11
12
|
CampaignCreate,
|
|
12
13
|
CampaignUpdate,
|
|
@@ -15,7 +16,6 @@ from vclient.models import (
|
|
|
15
16
|
NoteUpdate,
|
|
16
17
|
PaginatedResponse,
|
|
17
18
|
RollStatistics,
|
|
18
|
-
S3Asset,
|
|
19
19
|
)
|
|
20
20
|
from vclient.services.base import BaseService
|
|
21
21
|
|
|
@@ -255,7 +255,7 @@ class CampaignsService(BaseService):
|
|
|
255
255
|
*,
|
|
256
256
|
limit: int = DEFAULT_PAGE_LIMIT,
|
|
257
257
|
offset: int = 0,
|
|
258
|
-
) -> PaginatedResponse[
|
|
258
|
+
) -> PaginatedResponse[Asset]:
|
|
259
259
|
"""Retrieve a paginated list of assets for a campaign.
|
|
260
260
|
|
|
261
261
|
Args:
|
|
@@ -264,7 +264,7 @@ class CampaignsService(BaseService):
|
|
|
264
264
|
offset: Number of items to skip from the beginning (default 0).
|
|
265
265
|
|
|
266
266
|
Returns:
|
|
267
|
-
A PaginatedResponse containing
|
|
267
|
+
A PaginatedResponse containing Asset objects and pagination metadata.
|
|
268
268
|
|
|
269
269
|
Raises:
|
|
270
270
|
NotFoundError: If the campaign does not exist.
|
|
@@ -272,7 +272,7 @@ class CampaignsService(BaseService):
|
|
|
272
272
|
"""
|
|
273
273
|
return await self._get_paginated_as(
|
|
274
274
|
self._format_endpoint(Endpoints.CAMPAIGN_ASSETS, campaign_id=campaign_id),
|
|
275
|
-
|
|
275
|
+
Asset,
|
|
276
276
|
limit=limit,
|
|
277
277
|
offset=offset,
|
|
278
278
|
)
|
|
@@ -281,7 +281,7 @@ class CampaignsService(BaseService):
|
|
|
281
281
|
self,
|
|
282
282
|
campaign_id: str,
|
|
283
283
|
asset_id: str,
|
|
284
|
-
) ->
|
|
284
|
+
) -> Asset:
|
|
285
285
|
"""Retrieve details of a specific asset including its URL and metadata.
|
|
286
286
|
|
|
287
287
|
Args:
|
|
@@ -289,7 +289,7 @@ class CampaignsService(BaseService):
|
|
|
289
289
|
asset_id: The ID of the asset to retrieve.
|
|
290
290
|
|
|
291
291
|
Returns:
|
|
292
|
-
The
|
|
292
|
+
The Asset object with full details.
|
|
293
293
|
|
|
294
294
|
Raises:
|
|
295
295
|
NotFoundError: If the asset does not exist.
|
|
@@ -300,7 +300,7 @@ class CampaignsService(BaseService):
|
|
|
300
300
|
Endpoints.CAMPAIGN_ASSET, campaign_id=campaign_id, asset_id=asset_id
|
|
301
301
|
)
|
|
302
302
|
)
|
|
303
|
-
return
|
|
303
|
+
return Asset.model_validate(response.json())
|
|
304
304
|
|
|
305
305
|
async def delete_asset(
|
|
306
306
|
self,
|
|
@@ -331,7 +331,7 @@ class CampaignsService(BaseService):
|
|
|
331
331
|
filename: str,
|
|
332
332
|
content: bytes,
|
|
333
333
|
content_type: str | None = None,
|
|
334
|
-
) ->
|
|
334
|
+
) -> Asset:
|
|
335
335
|
"""Upload a new asset for a campaign.
|
|
336
336
|
|
|
337
337
|
Uploads a file to S3 storage and associates it with the campaign.
|
|
@@ -343,7 +343,7 @@ class CampaignsService(BaseService):
|
|
|
343
343
|
content_type: The MIME type of the file. If not provided, inferred from filename.
|
|
344
344
|
|
|
345
345
|
Returns:
|
|
346
|
-
The created
|
|
346
|
+
The created Asset object with the public URL and metadata.
|
|
347
347
|
|
|
348
348
|
Raises:
|
|
349
349
|
NotFoundError: If the campaign does not exist.
|
|
@@ -357,7 +357,7 @@ class CampaignsService(BaseService):
|
|
|
357
357
|
self._format_endpoint(Endpoints.CAMPAIGN_ASSET_UPLOAD, campaign_id=campaign_id),
|
|
358
358
|
file=(filename, content, content_type),
|
|
359
359
|
)
|
|
360
|
-
return
|
|
360
|
+
return Asset.model_validate(response.json())
|
|
361
361
|
|
|
362
362
|
# -------------------------------------------------------------------------
|
|
363
363
|
# Notes Methods
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/characters.py
RENAMED
|
@@ -12,6 +12,7 @@ from vclient.constants import (
|
|
|
12
12
|
)
|
|
13
13
|
from vclient.endpoints import Endpoints
|
|
14
14
|
from vclient.models import (
|
|
15
|
+
Asset,
|
|
15
16
|
Character,
|
|
16
17
|
CharacterCreate,
|
|
17
18
|
CharacterUpdate,
|
|
@@ -25,7 +26,6 @@ from vclient.models import (
|
|
|
25
26
|
PaginatedResponse,
|
|
26
27
|
Perk,
|
|
27
28
|
RollStatistics,
|
|
28
|
-
S3Asset,
|
|
29
29
|
WerewolfGift,
|
|
30
30
|
WerewolfRite,
|
|
31
31
|
)
|
|
@@ -339,7 +339,7 @@ class CharactersService(BaseService):
|
|
|
339
339
|
*,
|
|
340
340
|
limit: int = DEFAULT_PAGE_LIMIT,
|
|
341
341
|
offset: int = 0,
|
|
342
|
-
) -> PaginatedResponse[
|
|
342
|
+
) -> PaginatedResponse[Asset]:
|
|
343
343
|
"""Retrieve a paginated list of assets for a campaign.
|
|
344
344
|
|
|
345
345
|
Args:
|
|
@@ -348,7 +348,7 @@ class CharactersService(BaseService):
|
|
|
348
348
|
offset: Number of items to skip from the beginning (default 0).
|
|
349
349
|
|
|
350
350
|
Returns:
|
|
351
|
-
A PaginatedResponse containing
|
|
351
|
+
A PaginatedResponse containing Asset objects and pagination metadata.
|
|
352
352
|
|
|
353
353
|
Raises:
|
|
354
354
|
NotFoundError: If the campaign does not exist.
|
|
@@ -356,7 +356,7 @@ class CharactersService(BaseService):
|
|
|
356
356
|
"""
|
|
357
357
|
return await self._get_paginated_as(
|
|
358
358
|
self._format_endpoint(Endpoints.CHARACTER_ASSETS, character_id=character_id),
|
|
359
|
-
|
|
359
|
+
Asset,
|
|
360
360
|
limit=limit,
|
|
361
361
|
offset=offset,
|
|
362
362
|
)
|
|
@@ -365,7 +365,7 @@ class CharactersService(BaseService):
|
|
|
365
365
|
self,
|
|
366
366
|
character_id: str,
|
|
367
367
|
asset_id: str,
|
|
368
|
-
) ->
|
|
368
|
+
) -> Asset:
|
|
369
369
|
"""Retrieve details of a specific asset including its URL and metadata.
|
|
370
370
|
|
|
371
371
|
Args:
|
|
@@ -373,7 +373,7 @@ class CharactersService(BaseService):
|
|
|
373
373
|
asset_id: The ID of the asset to retrieve.
|
|
374
374
|
|
|
375
375
|
Returns:
|
|
376
|
-
The
|
|
376
|
+
The Asset object with full details.
|
|
377
377
|
|
|
378
378
|
Raises:
|
|
379
379
|
NotFoundError: If the asset does not exist.
|
|
@@ -384,7 +384,7 @@ class CharactersService(BaseService):
|
|
|
384
384
|
Endpoints.CHARACTER_ASSET, character_id=character_id, asset_id=asset_id
|
|
385
385
|
)
|
|
386
386
|
)
|
|
387
|
-
return
|
|
387
|
+
return Asset.model_validate(response.json())
|
|
388
388
|
|
|
389
389
|
async def delete_asset(
|
|
390
390
|
self,
|
|
@@ -415,7 +415,7 @@ class CharactersService(BaseService):
|
|
|
415
415
|
filename: str,
|
|
416
416
|
content: bytes,
|
|
417
417
|
content_type: str | None = None,
|
|
418
|
-
) ->
|
|
418
|
+
) -> Asset:
|
|
419
419
|
"""Upload a new asset for a campaign.
|
|
420
420
|
|
|
421
421
|
Uploads a file to S3 storage and associates it with the campaign.
|
|
@@ -427,7 +427,7 @@ class CharactersService(BaseService):
|
|
|
427
427
|
content_type: The MIME type of the file. If not provided, inferred from filename.
|
|
428
428
|
|
|
429
429
|
Returns:
|
|
430
|
-
The created
|
|
430
|
+
The created Asset object with the public URL and metadata.
|
|
431
431
|
|
|
432
432
|
Raises:
|
|
433
433
|
NotFoundError: If the character does not exist.
|
|
@@ -441,7 +441,7 @@ class CharactersService(BaseService):
|
|
|
441
441
|
self._format_endpoint(Endpoints.CHARACTER_ASSET_UPLOAD, character_id=character_id),
|
|
442
442
|
file=(filename, content, content_type),
|
|
443
443
|
)
|
|
444
|
-
return
|
|
444
|
+
return Asset.model_validate(response.json())
|
|
445
445
|
|
|
446
446
|
# -------------------------------------------------------------------------
|
|
447
447
|
# Notes Methods
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/users.py
RENAMED
|
@@ -7,6 +7,7 @@ from typing import TYPE_CHECKING
|
|
|
7
7
|
from vclient.constants import DEFAULT_PAGE_LIMIT, UserRole
|
|
8
8
|
from vclient.endpoints import Endpoints
|
|
9
9
|
from vclient.models import (
|
|
10
|
+
Asset,
|
|
10
11
|
CampaignExperience,
|
|
11
12
|
Note,
|
|
12
13
|
NoteCreate,
|
|
@@ -16,7 +17,6 @@ from vclient.models import (
|
|
|
16
17
|
QuickrollCreate,
|
|
17
18
|
QuickrollUpdate,
|
|
18
19
|
RollStatistics,
|
|
19
|
-
S3Asset,
|
|
20
20
|
User,
|
|
21
21
|
UserCreate,
|
|
22
22
|
UserUpdate,
|
|
@@ -281,7 +281,7 @@ class UsersService(BaseService):
|
|
|
281
281
|
*,
|
|
282
282
|
limit: int = DEFAULT_PAGE_LIMIT,
|
|
283
283
|
offset: int = 0,
|
|
284
|
-
) -> PaginatedResponse[
|
|
284
|
+
) -> PaginatedResponse[Asset]:
|
|
285
285
|
"""Retrieve a paginated list of assets for a user.
|
|
286
286
|
|
|
287
287
|
Args:
|
|
@@ -290,7 +290,7 @@ class UsersService(BaseService):
|
|
|
290
290
|
offset: Number of items to skip from the beginning (default 0).
|
|
291
291
|
|
|
292
292
|
Returns:
|
|
293
|
-
A PaginatedResponse containing
|
|
293
|
+
A PaginatedResponse containing Asset objects and pagination metadata.
|
|
294
294
|
|
|
295
295
|
Raises:
|
|
296
296
|
NotFoundError: If the user does not exist.
|
|
@@ -298,7 +298,7 @@ class UsersService(BaseService):
|
|
|
298
298
|
"""
|
|
299
299
|
return await self._get_paginated_as(
|
|
300
300
|
self._format_endpoint(Endpoints.USER_ASSETS, user_id=user_id),
|
|
301
|
-
|
|
301
|
+
Asset,
|
|
302
302
|
limit=limit,
|
|
303
303
|
offset=offset,
|
|
304
304
|
)
|
|
@@ -307,7 +307,7 @@ class UsersService(BaseService):
|
|
|
307
307
|
self,
|
|
308
308
|
user_id: str,
|
|
309
309
|
asset_id: str,
|
|
310
|
-
) ->
|
|
310
|
+
) -> Asset:
|
|
311
311
|
"""Retrieve details of a specific asset including its URL and metadata.
|
|
312
312
|
|
|
313
313
|
Args:
|
|
@@ -315,7 +315,7 @@ class UsersService(BaseService):
|
|
|
315
315
|
asset_id: The ID of the asset to retrieve.
|
|
316
316
|
|
|
317
317
|
Returns:
|
|
318
|
-
The
|
|
318
|
+
The Asset object with full details.
|
|
319
319
|
|
|
320
320
|
Raises:
|
|
321
321
|
NotFoundError: If the asset does not exist.
|
|
@@ -324,7 +324,7 @@ class UsersService(BaseService):
|
|
|
324
324
|
response = await self._get(
|
|
325
325
|
self._format_endpoint(Endpoints.USER_ASSET, user_id=user_id, asset_id=asset_id)
|
|
326
326
|
)
|
|
327
|
-
return
|
|
327
|
+
return Asset.model_validate(response.json())
|
|
328
328
|
|
|
329
329
|
async def delete_asset(
|
|
330
330
|
self,
|
|
@@ -353,7 +353,7 @@ class UsersService(BaseService):
|
|
|
353
353
|
filename: str,
|
|
354
354
|
content: bytes,
|
|
355
355
|
content_type: str | None = None,
|
|
356
|
-
) ->
|
|
356
|
+
) -> Asset:
|
|
357
357
|
"""Upload a new asset for a user.
|
|
358
358
|
|
|
359
359
|
Uploads a file to S3 storage and associates it with the user.
|
|
@@ -365,7 +365,7 @@ class UsersService(BaseService):
|
|
|
365
365
|
content_type: The MIME type of the file. If not provided, inferred from filename.
|
|
366
366
|
|
|
367
367
|
Returns:
|
|
368
|
-
The created
|
|
368
|
+
The created Asset object with the public URL and metadata.
|
|
369
369
|
|
|
370
370
|
Raises:
|
|
371
371
|
NotFoundError: If the user does not exist.
|
|
@@ -379,7 +379,7 @@ class UsersService(BaseService):
|
|
|
379
379
|
self._format_endpoint(Endpoints.USER_ASSET_UPLOAD, user_id=user_id),
|
|
380
380
|
file=(filename, content, content_type),
|
|
381
381
|
)
|
|
382
|
-
return
|
|
382
|
+
return Asset.model_validate(response.json())
|
|
383
383
|
|
|
384
384
|
# -------------------------------------------------------------------------
|
|
385
385
|
# Experience Methods
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/validate_constants.py
RENAMED
|
@@ -77,8 +77,8 @@ CONSTANT_MAP: dict[str, ConstantMapping] = {
|
|
|
77
77
|
"ManageCampaignPermission": ConstantMapping("companies", "PermissionManageCampaign"),
|
|
78
78
|
"PermissionLevel": ConstantMapping("companies", "CompanyPermission"),
|
|
79
79
|
"RollResultType": ConstantMapping("gameplay", "RollResultType"),
|
|
80
|
-
"
|
|
81
|
-
"
|
|
80
|
+
"AssetParentType": ConstantMapping("assets", "AssetParentType"),
|
|
81
|
+
"AssetType": ConstantMapping("assets", "AssetType"),
|
|
82
82
|
"SpecialtyType": ConstantMapping("characters", "SpecialtyType"),
|
|
83
83
|
"TraitModifyCurrency": ConstantMapping("characters", "TraitModifyCurrency"),
|
|
84
84
|
"UserRole": ConstantMapping("users", "UserRole"),
|
|
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.4.0 → valentina_python_client-1.4.1}/src/vclient/models/campaigns.py
RENAMED
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/chapters.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/characters.py
RENAMED
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/companies.py
RENAMED
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/developers.py
RENAMED
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/diceroll.py
RENAMED
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/dictionary.py
RENAMED
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/global_admin.py
RENAMED
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/pagination.py
RENAMED
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/models/system.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/__init__.py
RENAMED
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/companies.py
RENAMED
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/developers.py
RENAMED
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/dicerolls.py
RENAMED
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/dictionary.py
RENAMED
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/global_admin.py
RENAMED
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/options.py
RENAMED
|
File without changes
|
{valentina_python_client-1.4.0 → valentina_python_client-1.4.1}/src/vclient/services/system.py
RENAMED
|
File without changes
|