valentina-python-client 1.22.0__tar.gz → 1.23.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.22.0 → valentina_python_client-1.23.0}/PKG-INFO +1 -1
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/pyproject.toml +1 -1
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/__init__.py +5 -1
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_codegen.py +5 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/__init__.py +2 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/client.py +112 -48
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/registry.py +95 -50
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/__init__.py +2 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/base.py +20 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/campaign_book_chapters.py +17 -5
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/campaign_books.py +8 -13
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/campaigns.py +8 -8
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/character_autogen.py +20 -17
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/character_blueprint.py +5 -2
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/character_traits.py +5 -16
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/characters.py +19 -19
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/dicerolls.py +5 -5
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/dictionary.py +5 -1
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/options.py +5 -1
- valentina_python_client-1.23.0/src/vclient/_sync/services/user_self_registration.py +71 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/users.py +27 -106
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/client.py +135 -49
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/constants.py +1 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/endpoints.py +3 -3
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/__init__.py +0 -2
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/characters.py +1 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/users.py +1 -11
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/registry.py +119 -50
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/__init__.py +2 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/base.py +24 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/campaign_book_chapters.py +17 -5
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/campaign_books.py +13 -8
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/campaigns.py +7 -8
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/character_autogen.py +20 -11
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/character_blueprint.py +3 -2
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/character_traits.py +8 -8
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/characters.py +18 -13
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/dicerolls.py +5 -5
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/dictionary.py +3 -1
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/options.py +3 -1
- valentina_python_client-1.23.0/src/vclient/services/user_self_registration.py +74 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/users.py +10 -73
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/testing/_routes.py +3 -1
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/LICENSE +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/README.md +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/_audit_params.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/companies.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/developers.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/global_admin.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/system.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/services/user_lookup.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/testing/__init__.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/testing/_client.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/config.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/exceptions.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/audit_logs.py +1 -1
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/books.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/campaigns.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/chapters.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/character_autogen.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/character_blueprint.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/character_trait.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/companies.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/developers.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/diceroll.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/dictionary.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/full_sheet.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/global_admin.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/pagination.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/shared.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/system.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/models/user_lookup.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/py.typed +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/_audit_params.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/companies.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/developers.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/global_admin.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/system.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/services/user_lookup.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/testing/__init__.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/testing/_client.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/testing/_factories.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/testing/_router.py +0 -0
- {valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/validate_constants.py +0 -0
|
@@ -50,6 +50,7 @@ from vclient._sync import ( # noqa: E402
|
|
|
50
50
|
sync_options_service,
|
|
51
51
|
sync_system_service,
|
|
52
52
|
sync_user_lookup_service,
|
|
53
|
+
sync_user_self_registration_service,
|
|
53
54
|
sync_users_service,
|
|
54
55
|
)
|
|
55
56
|
from vclient.client import VClient # noqa: E402
|
|
@@ -69,6 +70,7 @@ from vclient.registry import ( # noqa: E402
|
|
|
69
70
|
options_service,
|
|
70
71
|
system_service,
|
|
71
72
|
user_lookup_service,
|
|
73
|
+
user_self_registration_service,
|
|
72
74
|
users_service,
|
|
73
75
|
)
|
|
74
76
|
|
|
@@ -103,10 +105,12 @@ __all__ = (
|
|
|
103
105
|
"sync_options_service",
|
|
104
106
|
"sync_system_service",
|
|
105
107
|
"sync_user_lookup_service",
|
|
108
|
+
"sync_user_self_registration_service",
|
|
106
109
|
"sync_users_service",
|
|
107
110
|
"system_service",
|
|
108
111
|
"user_lookup_service",
|
|
112
|
+
"user_self_registration_service",
|
|
109
113
|
"users_service",
|
|
110
114
|
)
|
|
111
115
|
|
|
112
|
-
__version__ = "1.
|
|
116
|
+
__version__ = "1.23.0"
|
|
@@ -29,6 +29,7 @@ RENAME_CLASSES: dict[str, str] = {
|
|
|
29
29
|
"OptionsService": "SyncOptionsService",
|
|
30
30
|
"SystemService": "SyncSystemService",
|
|
31
31
|
"UserLookupService": "SyncUserLookupService",
|
|
32
|
+
"UserSelfRegistrationService": "SyncUserSelfRegistrationService",
|
|
32
33
|
"UsersService": "SyncUsersService",
|
|
33
34
|
"VClient": "SyncVClient",
|
|
34
35
|
"FakeVClient": "SyncFakeVClient",
|
|
@@ -51,6 +52,7 @@ FACTORY_RENAMES: dict[str, str] = {
|
|
|
51
52
|
"options_service": "sync_options_service",
|
|
52
53
|
"character_autogen_service": "sync_character_autogen_service",
|
|
53
54
|
"user_lookup_service": "sync_user_lookup_service",
|
|
55
|
+
"user_self_registration_service": "sync_user_self_registration_service",
|
|
54
56
|
"configure_default_client": "sync_configure_default_client",
|
|
55
57
|
"clear_default_client": "sync_clear_default_client",
|
|
56
58
|
"default_client": "sync_default_client",
|
|
@@ -76,6 +78,7 @@ IMPORT_REWRITES: dict[str, str] = {
|
|
|
76
78
|
"vclient.services.options": "vclient._sync.services.options",
|
|
77
79
|
"vclient.services.character_autogen": "vclient._sync.services.character_autogen",
|
|
78
80
|
"vclient.services.user_lookup": "vclient._sync.services.user_lookup",
|
|
81
|
+
"vclient.services.user_self_registration": "vclient._sync.services.user_self_registration",
|
|
79
82
|
"vclient.registry": "vclient._sync.registry",
|
|
80
83
|
"vclient.testing._client": "vclient._sync.testing._client",
|
|
81
84
|
}
|
|
@@ -311,6 +314,7 @@ def _write_sync_init(path: Path) -> None:
|
|
|
311
314
|
" sync_options_service,",
|
|
312
315
|
" sync_system_service,",
|
|
313
316
|
" sync_user_lookup_service,",
|
|
317
|
+
" sync_user_self_registration_service,",
|
|
314
318
|
" sync_users_service,",
|
|
315
319
|
")",
|
|
316
320
|
"",
|
|
@@ -334,6 +338,7 @@ def _write_sync_init(path: Path) -> None:
|
|
|
334
338
|
' "sync_options_service",',
|
|
335
339
|
' "sync_system_service",',
|
|
336
340
|
' "sync_user_lookup_service",',
|
|
341
|
+
' "sync_user_self_registration_service",',
|
|
337
342
|
' "sync_users_service",',
|
|
338
343
|
"]",
|
|
339
344
|
"",
|
{valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/__init__.py
RENAMED
|
@@ -20,6 +20,7 @@ from vclient._sync.registry import (
|
|
|
20
20
|
sync_options_service,
|
|
21
21
|
sync_system_service,
|
|
22
22
|
sync_user_lookup_service,
|
|
23
|
+
sync_user_self_registration_service,
|
|
23
24
|
sync_users_service,
|
|
24
25
|
)
|
|
25
26
|
|
|
@@ -43,5 +44,6 @@ __all__ = [
|
|
|
43
44
|
"sync_options_service",
|
|
44
45
|
"sync_system_service",
|
|
45
46
|
"sync_user_lookup_service",
|
|
47
|
+
"sync_user_self_registration_service",
|
|
46
48
|
"sync_users_service",
|
|
47
49
|
]
|
{valentina_python_client-1.22.0 → valentina_python_client-1.23.0}/src/vclient/_sync/client.py
RENAMED
|
@@ -38,6 +38,7 @@ if TYPE_CHECKING:
|
|
|
38
38
|
SyncOptionsService,
|
|
39
39
|
SyncSystemService,
|
|
40
40
|
SyncUserLookupService,
|
|
41
|
+
SyncUserSelfRegistrationService,
|
|
41
42
|
SyncUsersService,
|
|
42
43
|
)
|
|
43
44
|
|
|
@@ -293,13 +294,14 @@ class SyncVClient:
|
|
|
293
294
|
self._user_lookup = SyncUserLookupService(self)
|
|
294
295
|
return self._user_lookup
|
|
295
296
|
|
|
296
|
-
def users(self, company_id: str | None = None) -> "SyncUsersService":
|
|
297
|
+
def users(self, on_behalf_of: str, *, company_id: str | None = None) -> "SyncUsersService":
|
|
297
298
|
"""Get a SyncUsersService scoped to a specific company.
|
|
298
299
|
|
|
299
300
|
Provides methods to create, retrieve, update, and delete users,
|
|
300
301
|
as well as access user statistics and assets.
|
|
301
302
|
|
|
302
303
|
Args:
|
|
304
|
+
on_behalf_of: User ID to impersonate via On-Behalf-Of header.
|
|
303
305
|
company_id: The ID of the company to operate within. If not provided,
|
|
304
306
|
uses the default_company_id from config.
|
|
305
307
|
|
|
@@ -310,27 +312,57 @@ class SyncVClient:
|
|
|
310
312
|
ValueError: If no company_id provided and no default configured.
|
|
311
313
|
|
|
312
314
|
Example:
|
|
313
|
-
>>> users = client.users("company_id")
|
|
315
|
+
>>> users = client.users("user_id", "company_id")
|
|
314
316
|
>>> all_users = await users.list_all()
|
|
315
317
|
>>> user = await users.get("user_id")
|
|
316
318
|
"""
|
|
317
319
|
from vclient._sync.services.users import SyncUsersService
|
|
318
320
|
|
|
319
|
-
return SyncUsersService(
|
|
321
|
+
return SyncUsersService(
|
|
322
|
+
self, company_id=self._resolve_company_id(company_id), on_behalf_of=on_behalf_of
|
|
323
|
+
)
|
|
324
|
+
|
|
325
|
+
def user_self_registration(
|
|
326
|
+
self, *, company_id: str | None = None
|
|
327
|
+
) -> "SyncUserSelfRegistrationService":
|
|
328
|
+
"""Get a SyncUserSelfRegistrationService scoped to a specific company.
|
|
329
|
+
|
|
330
|
+
Handles user self-registration via SSO onboarding. Does not require
|
|
331
|
+
an acting user — only developer API key authentication.
|
|
332
|
+
|
|
333
|
+
Args:
|
|
334
|
+
company_id: The ID of the company to register users in. If not
|
|
335
|
+
provided, uses the default_company_id from config.
|
|
336
|
+
|
|
337
|
+
Returns:
|
|
338
|
+
A SyncUserSelfRegistrationService instance.
|
|
339
|
+
|
|
340
|
+
Raises:
|
|
341
|
+
ValueError: If no company_id provided and no default configured.
|
|
320
342
|
|
|
321
|
-
|
|
322
|
-
|
|
343
|
+
Example:
|
|
344
|
+
>>> registration = client.user_self_registration()
|
|
345
|
+
>>> user = await registration.register(username="alice", email="a@b.com")
|
|
346
|
+
"""
|
|
347
|
+
from vclient._sync.services.user_self_registration import SyncUserSelfRegistrationService
|
|
348
|
+
|
|
349
|
+
return SyncUserSelfRegistrationService(self, self._resolve_company_id(company_id))
|
|
350
|
+
|
|
351
|
+
def campaigns(
|
|
352
|
+
self, on_behalf_of: str, *, company_id: str | None = None
|
|
353
|
+
) -> "SyncCampaignsService":
|
|
354
|
+
"""Get a SyncCampaignsService scoped to a specific company.
|
|
323
355
|
|
|
324
356
|
Provides methods to create, retrieve, update, and delete campaigns,
|
|
325
357
|
as well as access campaign statistics, assets, and notes.
|
|
326
358
|
|
|
327
359
|
Args:
|
|
328
|
-
|
|
360
|
+
on_behalf_of: User ID to impersonate via On-Behalf-Of header.
|
|
329
361
|
company_id: The ID of the company to operate within. If not provided,
|
|
330
362
|
uses the default_company_id from config.
|
|
331
363
|
|
|
332
364
|
Returns:
|
|
333
|
-
A SyncCampaignsService instance scoped to the specified company
|
|
365
|
+
A SyncCampaignsService instance scoped to the specified company.
|
|
334
366
|
|
|
335
367
|
Raises:
|
|
336
368
|
ValueError: If no company_id provided and no default configured.
|
|
@@ -342,19 +374,21 @@ class SyncVClient:
|
|
|
342
374
|
"""
|
|
343
375
|
from vclient._sync.services.campaigns import SyncCampaignsService
|
|
344
376
|
|
|
345
|
-
return SyncCampaignsService(
|
|
377
|
+
return SyncCampaignsService(
|
|
378
|
+
self, company_id=self._resolve_company_id(company_id), on_behalf_of=on_behalf_of
|
|
379
|
+
)
|
|
346
380
|
|
|
347
381
|
def books(
|
|
348
|
-
self,
|
|
382
|
+
self, campaign_id: str, on_behalf_of: str, *, company_id: str | None = None
|
|
349
383
|
) -> "SyncBooksService":
|
|
350
|
-
"""Get a SyncBooksService scoped to a specific company
|
|
384
|
+
"""Get a SyncBooksService scoped to a specific company and campaign.
|
|
351
385
|
|
|
352
386
|
Provides methods to create, retrieve, update, and delete campaign books,
|
|
353
387
|
as well as access book notes and assets.
|
|
354
388
|
|
|
355
389
|
Args:
|
|
356
|
-
user_id: The ID of the user to operate as.
|
|
357
390
|
campaign_id: The ID of the campaign to operate within.
|
|
391
|
+
on_behalf_of: User ID to impersonate via On-Behalf-Of header.
|
|
358
392
|
company_id: The ID of the company to operate within. If not provided,
|
|
359
393
|
uses the default_company_id from config.
|
|
360
394
|
|
|
@@ -365,26 +399,31 @@ class SyncVClient:
|
|
|
365
399
|
ValueError: If no company_id provided and no default configured.
|
|
366
400
|
|
|
367
401
|
Example:
|
|
368
|
-
>>> books = client.books("
|
|
402
|
+
>>> books = client.books("campaign_id", "user_id")
|
|
369
403
|
>>> all_books = await books.list_all()
|
|
370
404
|
>>> book = await books.get("book_id")
|
|
371
405
|
"""
|
|
372
406
|
from vclient._sync.services.campaign_books import SyncBooksService
|
|
373
407
|
|
|
374
|
-
return SyncBooksService(
|
|
408
|
+
return SyncBooksService(
|
|
409
|
+
self,
|
|
410
|
+
company_id=self._resolve_company_id(company_id),
|
|
411
|
+
campaign_id=campaign_id,
|
|
412
|
+
on_behalf_of=on_behalf_of,
|
|
413
|
+
)
|
|
375
414
|
|
|
376
415
|
def chapters(
|
|
377
|
-
self,
|
|
416
|
+
self, campaign_id: str, book_id: str, on_behalf_of: str, *, company_id: str | None = None
|
|
378
417
|
) -> "SyncChaptersService":
|
|
379
|
-
"""Get a SyncChaptersService scoped to a specific company,
|
|
418
|
+
"""Get a SyncChaptersService scoped to a specific company, campaign, and book.
|
|
380
419
|
|
|
381
420
|
Provides methods to create, retrieve, update, and delete campaign book chapters,
|
|
382
421
|
as well as access chapter notes and assets.
|
|
383
422
|
|
|
384
423
|
Args:
|
|
385
|
-
user_id: The ID of the user to operate as.
|
|
386
424
|
campaign_id: The ID of the campaign to operate within.
|
|
387
425
|
book_id: The ID of the book to operate within.
|
|
426
|
+
on_behalf_of: User ID to impersonate via On-Behalf-Of header.
|
|
388
427
|
company_id: The ID of the company to operate within. If not provided,
|
|
389
428
|
uses the default_company_id from config.
|
|
390
429
|
|
|
@@ -395,27 +434,30 @@ class SyncVClient:
|
|
|
395
434
|
ValueError: If no company_id provided and no default configured.
|
|
396
435
|
|
|
397
436
|
Example:
|
|
398
|
-
>>> chapters = client.chapters("
|
|
437
|
+
>>> chapters = client.chapters("campaign_id", "book_id", "user_id")
|
|
399
438
|
>>> all_chapters = await chapters.list_all()
|
|
400
439
|
>>> chapter = await chapters.get("chapter_id")
|
|
401
440
|
"""
|
|
402
441
|
from vclient._sync.services.campaign_book_chapters import SyncChaptersService
|
|
403
442
|
|
|
404
443
|
return SyncChaptersService(
|
|
405
|
-
self,
|
|
444
|
+
self,
|
|
445
|
+
company_id=self._resolve_company_id(company_id),
|
|
446
|
+
campaign_id=campaign_id,
|
|
447
|
+
book_id=book_id,
|
|
448
|
+
on_behalf_of=on_behalf_of,
|
|
406
449
|
)
|
|
407
450
|
|
|
408
451
|
def characters(
|
|
409
|
-
self,
|
|
452
|
+
self, on_behalf_of: str, *, company_id: str | None = None
|
|
410
453
|
) -> "SyncCharactersService":
|
|
411
|
-
"""Get a SyncCharactersService scoped to a specific company
|
|
454
|
+
"""Get a SyncCharactersService scoped to a specific company.
|
|
412
455
|
|
|
413
|
-
Provides methods to create, retrieve, update, and delete characters
|
|
414
|
-
a campaign.
|
|
456
|
+
Provides methods to create, retrieve, update, and delete characters.
|
|
457
|
+
Use the optional ``campaign_id`` filter on list methods to scope to a campaign.
|
|
415
458
|
|
|
416
459
|
Args:
|
|
417
|
-
|
|
418
|
-
campaign_id: The ID of the campaign to operate within.
|
|
460
|
+
on_behalf_of: User ID to impersonate via On-Behalf-Of header.
|
|
419
461
|
company_id: The ID of the company to operate within. If not provided,
|
|
420
462
|
uses the default_company_id from config.
|
|
421
463
|
|
|
@@ -426,28 +468,27 @@ class SyncVClient:
|
|
|
426
468
|
ValueError: If no company_id provided and no default configured.
|
|
427
469
|
|
|
428
470
|
Example:
|
|
429
|
-
>>> characters = client.characters("user_id"
|
|
471
|
+
>>> characters = client.characters("user_id")
|
|
430
472
|
>>> all_characters = await characters.list_all()
|
|
431
473
|
>>> character = await characters.get("character_id")
|
|
432
474
|
"""
|
|
433
475
|
from vclient._sync.services.characters import SyncCharactersService
|
|
434
476
|
|
|
435
477
|
return SyncCharactersService(
|
|
436
|
-
self, self._resolve_company_id(company_id),
|
|
478
|
+
self, company_id=self._resolve_company_id(company_id), on_behalf_of=on_behalf_of
|
|
437
479
|
)
|
|
438
480
|
|
|
439
481
|
def character_traits(
|
|
440
|
-
self,
|
|
482
|
+
self, character_id: str, on_behalf_of: str, *, company_id: str | None = None
|
|
441
483
|
) -> "SyncCharacterTraitsService":
|
|
442
|
-
"""Get a SyncCharacterTraitsService scoped to a specific company
|
|
484
|
+
"""Get a SyncCharacterTraitsService scoped to a specific company and character.
|
|
443
485
|
|
|
444
486
|
Provides methods to create, retrieve, update, and delete character traits within
|
|
445
487
|
a character.
|
|
446
488
|
|
|
447
489
|
Args:
|
|
448
|
-
user_id: The ID of the user to operate as.
|
|
449
|
-
campaign_id: The ID of the campaign to operate within.
|
|
450
490
|
character_id: The ID of the character to operate within.
|
|
491
|
+
on_behalf_of: User ID to impersonate via On-Behalf-Of header.
|
|
451
492
|
company_id: The ID of the company to operate within. If not provided,
|
|
452
493
|
uses the default_company_id from config.
|
|
453
494
|
|
|
@@ -458,23 +499,29 @@ class SyncVClient:
|
|
|
458
499
|
ValueError: If no company_id provided and no default configured.
|
|
459
500
|
|
|
460
501
|
Example:
|
|
461
|
-
>>> character_traits = client.character_traits("
|
|
502
|
+
>>> character_traits = client.character_traits("character_id", "user_id")
|
|
462
503
|
>>> all_character_traits = await character_traits.list_all()
|
|
463
504
|
>>> character_trait = await character_traits.get("character_trait_id")
|
|
464
505
|
"""
|
|
465
506
|
from vclient._sync.services.character_traits import SyncCharacterTraitsService
|
|
466
507
|
|
|
467
508
|
return SyncCharacterTraitsService(
|
|
468
|
-
self,
|
|
509
|
+
self,
|
|
510
|
+
company_id=self._resolve_company_id(company_id),
|
|
511
|
+
character_id=character_id,
|
|
512
|
+
on_behalf_of=on_behalf_of,
|
|
469
513
|
)
|
|
470
514
|
|
|
471
|
-
def character_blueprint(
|
|
515
|
+
def character_blueprint(
|
|
516
|
+
self, on_behalf_of: str | None = None, *, company_id: str | None = None
|
|
517
|
+
) -> "SyncCharacterBlueprintService":
|
|
472
518
|
"""Get a SyncCharacterBlueprintService scoped to a specific company.
|
|
473
519
|
|
|
474
520
|
Provides methods to create, retrieve, update, and delete character blueprint sections,
|
|
475
521
|
categories, and traits.
|
|
476
522
|
|
|
477
523
|
Args:
|
|
524
|
+
on_behalf_of: User ID to impersonate via On-Behalf-Of header.
|
|
478
525
|
company_id: The ID of the company to operate within. If not provided,
|
|
479
526
|
uses the default_company_id from config.
|
|
480
527
|
|
|
@@ -483,14 +530,19 @@ class SyncVClient:
|
|
|
483
530
|
"""
|
|
484
531
|
from vclient._sync.services.character_blueprint import SyncCharacterBlueprintService
|
|
485
532
|
|
|
486
|
-
return SyncCharacterBlueprintService(
|
|
533
|
+
return SyncCharacterBlueprintService(
|
|
534
|
+
self, company_id=self._resolve_company_id(company_id), on_behalf_of=on_behalf_of
|
|
535
|
+
)
|
|
487
536
|
|
|
488
|
-
def dictionary(
|
|
537
|
+
def dictionary(
|
|
538
|
+
self, on_behalf_of: str | None = None, *, company_id: str | None = None
|
|
539
|
+
) -> "SyncDictionaryService":
|
|
489
540
|
"""Get a SyncDictionaryService scoped to a specific company.
|
|
490
541
|
|
|
491
542
|
Provides methods to create, retrieve, update, and delete dictionary terms.
|
|
492
543
|
|
|
493
544
|
Args:
|
|
545
|
+
on_behalf_of: User ID to impersonate via On-Behalf-Of header.
|
|
494
546
|
company_id: The ID of the company to operate within. If not provided,
|
|
495
547
|
uses the default_company_id from config.
|
|
496
548
|
|
|
@@ -499,15 +551,19 @@ class SyncVClient:
|
|
|
499
551
|
"""
|
|
500
552
|
from vclient._sync.services.dictionary import SyncDictionaryService
|
|
501
553
|
|
|
502
|
-
return SyncDictionaryService(
|
|
554
|
+
return SyncDictionaryService(
|
|
555
|
+
self, company_id=self._resolve_company_id(company_id), on_behalf_of=on_behalf_of
|
|
556
|
+
)
|
|
503
557
|
|
|
504
|
-
def dicerolls(
|
|
505
|
-
|
|
558
|
+
def dicerolls(
|
|
559
|
+
self, on_behalf_of: str, *, company_id: str | None = None
|
|
560
|
+
) -> "SyncDicerollService":
|
|
561
|
+
"""Get a SyncDicerollService scoped to a specific company.
|
|
506
562
|
|
|
507
563
|
Provides methods to create, retrieve, and list dice rolls.
|
|
508
564
|
|
|
509
565
|
Args:
|
|
510
|
-
|
|
566
|
+
on_behalf_of: User ID to impersonate via On-Behalf-Of header.
|
|
511
567
|
company_id: The ID of the company to operate within. If not provided,
|
|
512
568
|
uses the default_company_id from config.
|
|
513
569
|
|
|
@@ -516,14 +572,19 @@ class SyncVClient:
|
|
|
516
572
|
"""
|
|
517
573
|
from vclient._sync.services.dicerolls import SyncDicerollService
|
|
518
574
|
|
|
519
|
-
return SyncDicerollService(
|
|
575
|
+
return SyncDicerollService(
|
|
576
|
+
self, company_id=self._resolve_company_id(company_id), on_behalf_of=on_behalf_of
|
|
577
|
+
)
|
|
520
578
|
|
|
521
|
-
def options(
|
|
579
|
+
def options(
|
|
580
|
+
self, on_behalf_of: str | None = None, *, company_id: str | None = None
|
|
581
|
+
) -> "SyncOptionsService":
|
|
522
582
|
"""Get a SyncOptionsService scoped to a specific company.
|
|
523
583
|
|
|
524
584
|
Provides methods to retrieve all options and enumerations for the api.
|
|
525
585
|
|
|
526
586
|
Args:
|
|
587
|
+
on_behalf_of: User ID to impersonate via On-Behalf-Of header.
|
|
527
588
|
company_id: The ID of the company to operate within. If not provided,
|
|
528
589
|
uses the default_company_id from config.
|
|
529
590
|
|
|
@@ -532,18 +593,21 @@ class SyncVClient:
|
|
|
532
593
|
"""
|
|
533
594
|
from vclient._sync.services.options import SyncOptionsService
|
|
534
595
|
|
|
535
|
-
return SyncOptionsService(
|
|
596
|
+
return SyncOptionsService(
|
|
597
|
+
self, company_id=self._resolve_company_id(company_id), on_behalf_of=on_behalf_of
|
|
598
|
+
)
|
|
536
599
|
|
|
537
600
|
def character_autogen(
|
|
538
|
-
self,
|
|
601
|
+
self, on_behalf_of: str, *, company_id: str | None = None
|
|
539
602
|
) -> "SyncCharacterAutogenService":
|
|
540
|
-
"""Get a SyncCharacterAutogenService scoped to a specific company
|
|
603
|
+
"""Get a SyncCharacterAutogenService scoped to a specific company.
|
|
541
604
|
|
|
542
|
-
Provides methods to
|
|
605
|
+
Provides methods to autogenerate characters and manage chargen sessions.
|
|
606
|
+
Pass ``campaign_id`` directly to ``generate_character()`` and
|
|
607
|
+
``start_chargen_session()`` to scope each call to a specific campaign.
|
|
543
608
|
|
|
544
609
|
Args:
|
|
545
|
-
|
|
546
|
-
campaign_id: The ID of the campaign to operate within.
|
|
610
|
+
on_behalf_of: User ID to impersonate via On-Behalf-Of header.
|
|
547
611
|
company_id: The ID of the company to operate within. If not provided,
|
|
548
612
|
uses the default_company_id from config.
|
|
549
613
|
|
|
@@ -553,5 +617,5 @@ class SyncVClient:
|
|
|
553
617
|
from vclient._sync.services.character_autogen import SyncCharacterAutogenService
|
|
554
618
|
|
|
555
619
|
return SyncCharacterAutogenService(
|
|
556
|
-
self, self._resolve_company_id(company_id),
|
|
620
|
+
self, company_id=self._resolve_company_id(company_id), on_behalf_of=on_behalf_of
|
|
557
621
|
)
|