valentina-python-client 2.5.0__tar.gz → 2.6.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.
Files changed (84) hide show
  1. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/PKG-INFO +1 -1
  2. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/pyproject.toml +1 -1
  3. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/__init__.py +1 -1
  4. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/registry.py +1 -1
  5. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/user_lookup.py +13 -1
  6. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/user_self_registration.py +2 -1
  7. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/users.py +11 -3
  8. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/__init__.py +2 -0
  9. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/users.py +13 -0
  10. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/registry.py +1 -1
  11. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/user_lookup.py +13 -1
  12. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/user_self_registration.py +2 -1
  13. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/users.py +11 -3
  14. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/testing/__init__.py +2 -0
  15. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/testing/_factories.py +7 -0
  16. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/LICENSE +0 -0
  17. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/README.md +0 -0
  18. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_codegen.py +0 -0
  19. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/__init__.py +0 -0
  20. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/client.py +0 -0
  21. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/__init__.py +0 -0
  22. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/_audit_params.py +0 -0
  23. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/base.py +0 -0
  24. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/campaign_book_chapters.py +0 -0
  25. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/campaign_books.py +0 -0
  26. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/campaigns.py +0 -0
  27. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/character_autogen.py +0 -0
  28. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/character_blueprint.py +0 -0
  29. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/character_traits.py +0 -0
  30. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/characters.py +0 -0
  31. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/companies.py +0 -0
  32. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/developers.py +0 -0
  33. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/dicerolls.py +0 -0
  34. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/dictionary.py +0 -0
  35. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/global_admin.py +0 -0
  36. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/options.py +0 -0
  37. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/services/system.py +0 -0
  38. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/testing/__init__.py +0 -0
  39. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/_sync/testing/_client.py +0 -0
  40. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/client.py +0 -0
  41. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/config.py +0 -0
  42. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/constants.py +0 -0
  43. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/endpoints.py +0 -0
  44. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/exceptions.py +0 -0
  45. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/audit_logs.py +0 -0
  46. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/books.py +0 -0
  47. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/campaigns.py +0 -0
  48. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/chapters.py +0 -0
  49. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/character_autogen.py +0 -0
  50. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/character_blueprint.py +0 -0
  51. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/character_trait.py +0 -0
  52. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/characters.py +0 -0
  53. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/companies.py +0 -0
  54. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/developers.py +0 -0
  55. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/diceroll.py +0 -0
  56. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/dictionary.py +0 -0
  57. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/full_sheet.py +0 -0
  58. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/global_admin.py +0 -0
  59. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/pagination.py +0 -0
  60. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/shared.py +0 -0
  61. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/system.py +0 -0
  62. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/models/user_lookup.py +0 -0
  63. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/py.typed +0 -0
  64. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/__init__.py +0 -0
  65. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/_audit_params.py +0 -0
  66. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/base.py +0 -0
  67. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/campaign_book_chapters.py +0 -0
  68. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/campaign_books.py +0 -0
  69. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/campaigns.py +0 -0
  70. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/character_autogen.py +0 -0
  71. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/character_blueprint.py +0 -0
  72. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/character_traits.py +0 -0
  73. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/characters.py +0 -0
  74. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/companies.py +0 -0
  75. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/developers.py +0 -0
  76. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/dicerolls.py +0 -0
  77. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/dictionary.py +0 -0
  78. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/global_admin.py +0 -0
  79. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/options.py +0 -0
  80. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/services/system.py +0 -0
  81. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/testing/_client.py +0 -0
  82. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/testing/_router.py +0 -0
  83. {valentina_python_client-2.5.0 → valentina_python_client-2.6.0}/src/vclient/testing/_routes.py +0 -0
  84. {valentina_python_client-2.5.0 → valentina_python_client-2.6.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: 2.5.0
3
+ Version: 2.6.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>
@@ -16,7 +16,7 @@
16
16
  name = "valentina-python-client"
17
17
  readme = "README.md"
18
18
  requires-python = ">=3.13"
19
- version = "2.5.0"
19
+ version = "2.6.0"
20
20
 
21
21
  [project.optional-dependencies]
22
22
  testing = ["polyfactory>=3.3.0"]
@@ -116,4 +116,4 @@ __all__ = (
116
116
  "users_service",
117
117
  )
118
118
 
119
- __version__ = "2.5.0"
119
+ __version__ = "2.6.0"
@@ -195,7 +195,7 @@ def sync_user_lookup_service() -> "SyncUserLookupService":
195
195
  """Create a SyncUserLookupService using the default client.
196
196
 
197
197
  Discover which companies a person has a user record in by searching
198
- via email, Discord ID, Google ID, or GitHub ID.
198
+ via email, Discord ID, Google ID, GitHub ID, or Apple ID.
199
199
 
200
200
  Returns:
201
201
  SyncUserLookupService: A service instance for cross-company user lookup.
@@ -10,7 +10,7 @@ class SyncUserLookupService(SyncBaseService):
10
10
  """Service for looking up users across companies.
11
11
 
12
12
  Discover which companies a person has a user record in by searching
13
- via email, Discord ID, Google ID, or GitHub ID.
13
+ via email, Discord ID, Google ID, GitHub ID, or Apple ID.
14
14
 
15
15
  Example:
16
16
  >>> async with SyncVClient() as client:
@@ -66,3 +66,15 @@ class SyncUserLookupService(SyncBaseService):
66
66
  """
67
67
  response = self._get(Endpoints.USERS_LOOKUP, params={"github_id": github_id})
68
68
  return [UserLookupResult.model_validate(item) for item in response.json()]
69
+
70
+ def by_apple_id(self, apple_id: str) -> list[UserLookupResult]:
71
+ """Look up a user by Apple profile ID.
72
+
73
+ Args:
74
+ apple_id: Apple profile ID to search for.
75
+
76
+ Returns:
77
+ List of companies where a matching user was found. Empty list if no matches.
78
+ """
79
+ response = self._get(Endpoints.USERS_LOOKUP, params={"apple_id": apple_id})
80
+ return [UserLookupResult.model_validate(item) for item in response.json()]
@@ -54,7 +54,8 @@ class SyncUserSelfRegistrationService(SyncBaseService):
54
54
  name_first (str | None), name_last (str | None),
55
55
  discord_profile (DiscordProfileUpdate | None),
56
56
  google_profile (GoogleProfile | None),
57
- github_profile (GitHubProfile | None).
57
+ github_profile (GitHubProfile | None),
58
+ apple_profile (AppleProfile | None).
58
59
 
59
60
  Returns:
60
61
  The newly registered User object.
@@ -288,7 +288,11 @@ class SyncUsersService(SyncBaseService):
288
288
  **kwargs: Fields for UserCreate if request is not provided.
289
289
  Accepts: username (str, required), email (str, required),
290
290
  role (UserRole, required),
291
- discord_profile (DiscordProfile | None).
291
+ name_first (str | None), name_last (str | None),
292
+ discord_profile (DiscordProfileUpdate | None),
293
+ google_profile (GoogleProfile | None),
294
+ github_profile (GitHubProfile | None),
295
+ apple_profile (AppleProfile | None).
292
296
 
293
297
  Returns:
294
298
  The newly created User object.
@@ -322,9 +326,13 @@ class SyncUsersService(SyncBaseService):
322
326
  user_id: The ID of the user to update.
323
327
  request: A UserUpdate model, OR pass fields as keyword arguments.
324
328
  **kwargs: Fields for UserUpdate if request is not provided.
325
- Accepts: name (str | None), email (str | None),
329
+ Accepts: username (str | None), email (str | None),
326
330
  role (UserRole | None),
327
- discord_profile (DiscordProfile | None).
331
+ name_first (str | None), name_last (str | None),
332
+ discord_profile (DiscordProfileUpdate | None),
333
+ google_profile (GoogleProfile | None),
334
+ github_profile (GitHubProfile | None),
335
+ apple_profile (AppleProfile | None).
328
336
 
329
337
  Returns:
330
338
  The updated User object.
@@ -130,6 +130,7 @@ from .users import (
130
130
  AdminUser,
131
131
  AdminUserCreate,
132
132
  AdminUserUpdate,
133
+ AppleProfile,
133
134
  CampaignExperience,
134
135
  DiscordProfile,
135
136
  DiscordProfileUpdate,
@@ -152,6 +153,7 @@ __all__ = [
152
153
  "AdminUser",
153
154
  "AdminUserCreate",
154
155
  "AdminUserUpdate",
156
+ "AppleProfile",
155
157
  "Asset",
156
158
  "AuditLog",
157
159
  "AuditLogDetail",
@@ -38,6 +38,14 @@ class GitHubProfile(BaseModel):
38
38
  profile_url: str | None = None
39
39
 
40
40
 
41
+ class AppleProfile(BaseModel):
42
+ """Apple profile model."""
43
+
44
+ id: str | None = None
45
+ email: str | None = None
46
+ fullname: str | None = None
47
+
48
+
41
49
  class DiscordProfile(BaseModel):
42
50
  """Discord profile information for a user.
43
51
 
@@ -92,6 +100,7 @@ class User(BaseModel):
92
100
  discord_profile: DiscordProfile | None = None
93
101
  google_profile: GoogleProfile | None = None
94
102
  github_profile: GitHubProfile | None = None
103
+ apple_profile: AppleProfile | None = None
95
104
  campaign_experience: list[CampaignExperience] = Field(default_factory=list)
96
105
  asset_ids: list[str] = Field(default_factory=list)
97
106
  lifetime_xp: int = 0
@@ -168,6 +177,7 @@ class UserRegisterDTO(BaseModel):
168
177
  discord_profile: DiscordProfileUpdate | None = None
169
178
  google_profile: GoogleProfile | None = None
170
179
  github_profile: GitHubProfile | None = None
180
+ apple_profile: AppleProfile | None = None
171
181
 
172
182
 
173
183
  class UserMergeDTO(BaseModel):
@@ -191,6 +201,7 @@ class UserCreate(BaseModel):
191
201
  discord_profile: DiscordProfileUpdate | None = None
192
202
  google_profile: GoogleProfile | None = None
193
203
  github_profile: GitHubProfile | None = None
204
+ apple_profile: AppleProfile | None = None
194
205
 
195
206
 
196
207
  class UserUpdate(BaseModel):
@@ -207,6 +218,7 @@ class UserUpdate(BaseModel):
207
218
  discord_profile: DiscordProfileUpdate | None = None
208
219
  google_profile: GoogleProfile | None = None
209
220
  github_profile: GitHubProfile | None = None
221
+ apple_profile: AppleProfile | None = None
210
222
 
211
223
 
212
224
  class AdminUserCreate(UserCreate):
@@ -301,6 +313,7 @@ __all__ = [
301
313
  "AdminUser",
302
314
  "AdminUserCreate",
303
315
  "AdminUserUpdate",
316
+ "AppleProfile",
304
317
  "CampaignExperience",
305
318
  "DiscordProfile",
306
319
  "GitHubProfile",
@@ -195,7 +195,7 @@ def user_lookup_service() -> "UserLookupService":
195
195
  """Create a UserLookupService using the default client.
196
196
 
197
197
  Discover which companies a person has a user record in by searching
198
- via email, Discord ID, Google ID, or GitHub ID.
198
+ via email, Discord ID, Google ID, GitHub ID, or Apple ID.
199
199
 
200
200
  Returns:
201
201
  UserLookupService: A service instance for cross-company user lookup.
@@ -9,7 +9,7 @@ class UserLookupService(BaseService):
9
9
  """Service for looking up users across companies.
10
10
 
11
11
  Discover which companies a person has a user record in by searching
12
- via email, Discord ID, Google ID, or GitHub ID.
12
+ via email, Discord ID, Google ID, GitHub ID, or Apple ID.
13
13
 
14
14
  Example:
15
15
  >>> async with VClient() as client:
@@ -65,3 +65,15 @@ class UserLookupService(BaseService):
65
65
  """
66
66
  response = await self._get(Endpoints.USERS_LOOKUP, params={"github_id": github_id})
67
67
  return [UserLookupResult.model_validate(item) for item in response.json()]
68
+
69
+ async def by_apple_id(self, apple_id: str) -> list[UserLookupResult]:
70
+ """Look up a user by Apple profile ID.
71
+
72
+ Args:
73
+ apple_id: Apple profile ID to search for.
74
+
75
+ Returns:
76
+ List of companies where a matching user was found. Empty list if no matches.
77
+ """
78
+ response = await self._get(Endpoints.USERS_LOOKUP, params={"apple_id": apple_id})
79
+ return [UserLookupResult.model_validate(item) for item in response.json()]
@@ -57,7 +57,8 @@ class UserSelfRegistrationService(BaseService):
57
57
  name_first (str | None), name_last (str | None),
58
58
  discord_profile (DiscordProfileUpdate | None),
59
59
  google_profile (GoogleProfile | None),
60
- github_profile (GitHubProfile | None).
60
+ github_profile (GitHubProfile | None),
61
+ apple_profile (AppleProfile | None).
61
62
 
62
63
  Returns:
63
64
  The newly registered User object.
@@ -334,7 +334,11 @@ class UsersService(BaseService):
334
334
  **kwargs: Fields for UserCreate if request is not provided.
335
335
  Accepts: username (str, required), email (str, required),
336
336
  role (UserRole, required),
337
- discord_profile (DiscordProfile | None).
337
+ name_first (str | None), name_last (str | None),
338
+ discord_profile (DiscordProfileUpdate | None),
339
+ google_profile (GoogleProfile | None),
340
+ github_profile (GitHubProfile | None),
341
+ apple_profile (AppleProfile | None).
338
342
 
339
343
  Returns:
340
344
  The newly created User object.
@@ -373,9 +377,13 @@ class UsersService(BaseService):
373
377
  user_id: The ID of the user to update.
374
378
  request: A UserUpdate model, OR pass fields as keyword arguments.
375
379
  **kwargs: Fields for UserUpdate if request is not provided.
376
- Accepts: name (str | None), email (str | None),
380
+ Accepts: username (str | None), email (str | None),
377
381
  role (UserRole | None),
378
- discord_profile (DiscordProfile | None).
382
+ name_first (str | None), name_last (str | None),
383
+ discord_profile (DiscordProfileUpdate | None),
384
+ google_profile (GoogleProfile | None),
385
+ github_profile (GitHubProfile | None),
386
+ apple_profile (AppleProfile | None).
379
387
 
380
388
  Returns:
381
389
  The updated User object.
@@ -16,6 +16,7 @@ from vclient._sync.testing import SyncFakeVClient
16
16
  from vclient.testing._client import FakeVClient
17
17
  from vclient.testing._factories import (
18
18
  AdminUserFactory,
19
+ AppleProfileFactory,
19
20
  AssetFactory,
20
21
  AuditLogDetailFactory,
21
22
  AuditLogFactory,
@@ -70,6 +71,7 @@ from vclient.testing._routes import Routes, RouteSpec
70
71
 
71
72
  __all__ = [
72
73
  "AdminUserFactory",
74
+ "AppleProfileFactory",
73
75
  "AssetFactory",
74
76
  "AuditLogDetailFactory",
75
77
  "AuditLogFactory",
@@ -4,6 +4,7 @@ from polyfactory.factories.pydantic_factory import ModelFactory
4
4
 
5
5
  from vclient.models import (
6
6
  AdminUser,
7
+ AppleProfile,
7
8
  Asset,
8
9
  AuditLog,
9
10
  AuditLogDetail,
@@ -66,6 +67,11 @@ class AuditLogDetailFactory(ModelFactory[AuditLogDetail]):
66
67
  __use_defaults__ = True
67
68
 
68
69
 
70
+ class AppleProfileFactory(ModelFactory[AppleProfile]):
71
+ __model__ = AppleProfile
72
+ __use_defaults__ = True
73
+
74
+
69
75
  class AssetFactory(ModelFactory[Asset]):
70
76
  __model__ = Asset
71
77
  __use_defaults__ = True
@@ -314,6 +320,7 @@ class WerewolfTribeFactory(ModelFactory[WerewolfTribe]):
314
320
 
315
321
  __all__ = [
316
322
  "AdminUserFactory",
323
+ "AppleProfileFactory",
317
324
  "AssetFactory",
318
325
  "AuditLogDetailFactory",
319
326
  "AuditLogFactory",