python-xbox 0.1.0rc2__tar.gz → 0.1.0rc3__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 (65) hide show
  1. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/PKG-INFO +3 -2
  2. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/pyproject.toml +15 -24
  3. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/__init__.py +1 -1
  4. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/achievements/models.py +13 -13
  5. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/catalog/__init__.py +1 -3
  6. python_xbox-0.1.0rc3/src/pythonxbox/api/provider/catalog/models.py +428 -0
  7. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/cqs/models.py +12 -12
  8. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/gameclips/models.py +4 -5
  9. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/lists/models.py +4 -6
  10. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/mediahub/models.py +15 -17
  11. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/message/models.py +14 -14
  12. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/presence/__init__.py +2 -4
  13. python_xbox-0.1.0rc3/src/pythonxbox/api/provider/presence/models.py +53 -0
  14. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/profile/__init__.py +2 -4
  15. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/profile/models.py +2 -3
  16. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/ratelimitedprovider.py +2 -4
  17. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/screenshots/models.py +5 -5
  18. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/smartglass/__init__.py +3 -4
  19. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/smartglass/models.py +26 -27
  20. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/titlehub/__init__.py +6 -8
  21. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/titlehub/models.py +30 -30
  22. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/usersearch/models.py +1 -3
  23. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/userstats/__init__.py +6 -8
  24. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/userstats/models.py +12 -14
  25. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/authentication/manager.py +3 -4
  26. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/authentication/models.py +21 -22
  27. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/authentication/xal.py +3 -3
  28. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/common/filetimes.py +4 -20
  29. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/common/ratelimits/__init__.py +6 -7
  30. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/common/request_signer.py +3 -4
  31. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/scripts/__init__.py +1 -1
  32. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/scripts/authenticate.py +1 -1
  33. python_xbox-0.1.0rc2/src/pythonxbox/api/provider/catalog/models.py +0 -428
  34. python_xbox-0.1.0rc2/src/pythonxbox/api/provider/presence/models.py +0 -54
  35. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/.gitignore +0 -0
  36. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/LICENSE +0 -0
  37. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/README.md +0 -0
  38. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/__init__.py +0 -0
  39. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/client.py +0 -0
  40. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/language.py +0 -0
  41. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/__init__.py +0 -0
  42. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/account/__init__.py +0 -0
  43. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/account/models.py +0 -0
  44. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/achievements/__init__.py +0 -0
  45. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/baseprovider.py +0 -0
  46. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/catalog/const.py +0 -0
  47. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/cqs/__init__.py +0 -0
  48. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/gameclips/__init__.py +0 -0
  49. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/lists/__init__.py +0 -0
  50. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/mediahub/__init__.py +0 -0
  51. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/message/__init__.py +0 -0
  52. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/people/__init__.py +0 -0
  53. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/people/models.py +0 -0
  54. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/screenshots/__init__.py +0 -0
  55. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/api/provider/usersearch/__init__.py +0 -0
  56. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/authentication/__init__.py +0 -0
  57. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/common/__init__.py +0 -0
  58. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/common/exceptions.py +0 -0
  59. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/common/models.py +0 -0
  60. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/common/ratelimits/models.py +0 -0
  61. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/common/signed_session.py +0 -0
  62. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/scripts/change_gamertag.py +0 -0
  63. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/scripts/friends.py +0 -0
  64. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/scripts/search.py +0 -0
  65. {python_xbox-0.1.0rc2 → python_xbox-0.1.0rc3}/src/pythonxbox/scripts/xal.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-xbox
3
- Version: 0.1.0rc2
3
+ Version: 0.1.0rc3
4
4
  Summary: A library to authenticate with Xbox Network and use their API
5
5
  Project-URL: Homepage, https://github.com/tr4nt0r/python-xbox
6
6
  Author: OpenXbox
@@ -17,11 +17,12 @@ Classifier: Programming Language :: Python :: 3.13
17
17
  Classifier: Programming Language :: Python :: 3.14
18
18
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
19
  Requires-Python: >=3.11
20
- Requires-Dist: appdirs
21
20
  Requires-Dist: ecdsa
22
21
  Requires-Dist: httpx
23
22
  Requires-Dist: ms-cv
24
23
  Requires-Dist: pydantic==2.*
24
+ Provides-Extra: cli
25
+ Requires-Dist: platformdirs>=4.5.0; extra == 'cli'
25
26
  Description-Content-Type: text/markdown
26
27
 
27
28
  # Xbox-WebAPI
@@ -5,7 +5,6 @@ authors = [
5
5
  {name = "OpenXbox"},
6
6
  ]
7
7
  dependencies = [
8
- "appdirs",
9
8
  "ecdsa",
10
9
  "httpx",
11
10
  "ms_cv",
@@ -31,6 +30,11 @@ dynamic = ["version"]
31
30
  [project.urls]
32
31
  Homepage = "https://github.com/tr4nt0r/python-xbox"
33
32
 
33
+ [project.optional-dependencies]
34
+ cli = [
35
+ "platformdirs>=4.5.0"
36
+ ]
37
+
34
38
  [project.scripts]
35
39
  xbox-authenticate = "pythonxbox.scripts.authenticate:main"
36
40
  xbox-change-gt = "pythonxbox.scripts.change_gamertag:main"
@@ -40,15 +44,21 @@ xbox-xal = "pythonxbox.scripts.xal:main"
40
44
 
41
45
  [tool.ruff]
42
46
  line-length = 88
43
- target-version = "py38"
47
+ target-version = "py311"
44
48
 
45
49
  [tool.ruff.lint]
46
- select = ["E4", "E7", "E9", "F"]
50
+ select = ["E4", "E7", "E9", "F", "UP", "S"]
47
51
  ignore = []
48
52
 
53
+
54
+ [tool.ruff.lint.per-file-ignores]
55
+ "**/scripts/*" = ["UP", "S104"]
56
+ "tests/*" = ["S101"]
57
+ "src/pythonxbox/authentication/xal.py" = ["S101"]
58
+
49
59
  [tool.ruff.lint.isort]
50
60
  force-sort-within-sections = true
51
- known-first-party = ["aiontfy"]
61
+ known-first-party = ["pythonxbox"]
52
62
  combine-as-imports = true
53
63
  split-on-trailing-comma = false
54
64
 
@@ -56,25 +66,6 @@ split-on-trailing-comma = false
56
66
  quote-style = "double"
57
67
  indent-style = "space"
58
68
 
59
-
60
- [tool.bandit]
61
- exclude_dirs = ["tests"]
62
- tests = [
63
- "B108",
64
- "B306",
65
- "B307",
66
- "B313",
67
- "B314",
68
- "B315",
69
- "B316",
70
- "B317",
71
- "B318",
72
- "B319",
73
- "B320",
74
- "B602",
75
- "B604"
76
- ]
77
-
78
69
  [tool.hatch.version]
79
70
  source = "regex_commit"
80
71
  commit_extra_args = ["-e"]
@@ -90,7 +81,7 @@ packages = ["src/pythonxbox"]
90
81
  [tool.hatch.envs.default]
91
82
  python = "3.13"
92
83
  dependencies = [
93
- "appdirs==1.4.4",
84
+ "platformdirs==4.5.0",
94
85
  "ecdsa==0.19.1",
95
86
  "httpx==0.28.1",
96
87
  "ms_cv==0.1.1",
@@ -1,4 +1,4 @@
1
1
  """Top-level package for xbox-webapi-python."""
2
2
 
3
3
  __author__ = """OpenXbox"""
4
- __version__ = "0.1.0rc2"
4
+ __version__ = "0.1.0rc3"
@@ -1,5 +1,5 @@
1
1
  from datetime import datetime, time
2
- from typing import Any, List, Optional
2
+ from typing import Any
3
3
 
4
4
  from pydantic import BaseModel
5
5
 
@@ -7,7 +7,7 @@ from pythonxbox.common.models import CamelCaseModel
7
7
 
8
8
 
9
9
  class PagingInfo(CamelCaseModel):
10
- continuation_token: Optional[str] = None
10
+ continuation_token: str | None = None
11
11
  total_records: int
12
12
 
13
13
 
@@ -37,20 +37,20 @@ class Title360(CamelCaseModel):
37
37
  sequence: int
38
38
  title_id: int
39
39
  title_type: int
40
- platforms: List[int]
40
+ platforms: list[int]
41
41
  name: str
42
42
  total_achievements: int
43
43
  total_gamerscore: int
44
44
 
45
45
 
46
46
  class Achievement360Response(CamelCaseModel):
47
- achievements: List[Achievement360]
47
+ achievements: list[Achievement360]
48
48
  paging_info: PagingInfo
49
49
  version: datetime
50
50
 
51
51
 
52
52
  class Achievement360ProgressResponse(CamelCaseModel):
53
- titles: List[Title360]
53
+ titles: list[Title360]
54
54
  paging_info: PagingInfo
55
55
  version: datetime
56
56
 
@@ -62,7 +62,7 @@ class TitleAssociation(BaseModel):
62
62
 
63
63
  class Requirement(CamelCaseModel):
64
64
  id: str
65
- current: Optional[str] = None
65
+ current: str | None = None
66
66
  target: str
67
67
  operation_type: str
68
68
  value_type: str
@@ -70,7 +70,7 @@ class Requirement(CamelCaseModel):
70
70
 
71
71
 
72
72
  class Progression(CamelCaseModel):
73
- requirements: List[Requirement]
73
+ requirements: list[Requirement]
74
74
  time_unlocked: datetime
75
75
 
76
76
 
@@ -93,11 +93,11 @@ class Achievement(CamelCaseModel):
93
93
  id: str
94
94
  service_config_id: str
95
95
  name: str
96
- title_associations: List[TitleAssociation]
96
+ title_associations: list[TitleAssociation]
97
97
  progress_state: str
98
98
  progression: Progression
99
- media_assets: List[MediaAsset]
100
- platforms: List[str]
99
+ media_assets: list[MediaAsset]
100
+ platforms: list[str]
101
101
  is_secret: bool
102
102
  description: str
103
103
  locked_description: str
@@ -105,14 +105,14 @@ class Achievement(CamelCaseModel):
105
105
  achievement_type: str
106
106
  participation_type: str
107
107
  time_window: Any = None
108
- rewards: List[Reward]
108
+ rewards: list[Reward]
109
109
  estimated_time: time
110
110
  deeplink: Any = None
111
111
  is_revoked: bool
112
112
 
113
113
 
114
114
  class AchievementResponse(CamelCaseModel):
115
- achievements: List[Achievement]
115
+ achievements: list[Achievement]
116
116
  paging_info: PagingInfo
117
117
 
118
118
 
@@ -129,5 +129,5 @@ class Title(CamelCaseModel):
129
129
 
130
130
 
131
131
  class RecentProgressResponse(CamelCaseModel):
132
- titles: List[Title]
132
+ titles: list[Title]
133
133
  paging_info: PagingInfo
@@ -2,8 +2,6 @@
2
2
  Store Catalog - Lookup Product Information
3
3
  """
4
4
 
5
- from typing import List
6
-
7
5
  from pythonxbox.api.provider.baseprovider import BaseProvider
8
6
  from pythonxbox.api.provider.catalog.models import (
9
7
  AlternateIdType,
@@ -20,7 +18,7 @@ class CatalogProvider(BaseProvider):
20
18
 
21
19
  async def get_products(
22
20
  self,
23
- big_ids: List[str],
21
+ big_ids: list[str],
24
22
  fields: FieldsTemplate = FieldsTemplate.DETAILS,
25
23
  **kwargs,
26
24
  ) -> CatalogResponse:
@@ -0,0 +1,428 @@
1
+ from datetime import datetime
2
+ from enum import Enum
3
+ from typing import Any
4
+
5
+ from pydantic import Field, field_validator
6
+
7
+ from pythonxbox.common.models import PascalCaseModel
8
+
9
+
10
+ class AlternateIdType(str, Enum):
11
+ LEGACY_XBOX_PRODUCT_ID = "LegacyXboxProductId"
12
+ XBOX_TITLE_ID = "XboxTitleId"
13
+ PACKAGE_FAMILY_NAME = "PackageFamilyName"
14
+
15
+
16
+ class FieldsTemplate(str, Enum):
17
+ BROWSE = "browse"
18
+ DETAILS = "details"
19
+
20
+
21
+ class PlatformType(str, Enum):
22
+ XBOX = "windows.xbox"
23
+ DESKTOP = "windows.desktop"
24
+
25
+
26
+ class Image(PascalCaseModel):
27
+ file_id: str | None = None
28
+ eis_listing_identifier: Any = Field(None, alias="EISListingIdentifier")
29
+ background_color: str | None = None
30
+ caption: str | None = None
31
+ file_size_in_bytes: int
32
+ foreground_color: str | None = None
33
+ height: int
34
+ image_position_info: str | None = None
35
+ image_purpose: str
36
+ unscaled_image_sha256_hash: str | None = Field(
37
+ None, alias="UnscaledImageSHA256Hash"
38
+ )
39
+ uri: str
40
+ width: int
41
+
42
+
43
+ class Video(PascalCaseModel):
44
+ uri: str
45
+ video_purpose: str
46
+ height: int
47
+ width: int
48
+ audio_encoding: str
49
+ video_encoding: str
50
+ video_position_info: str
51
+ caption: str
52
+ file_size_in_bytes: int
53
+ preview_image: Image
54
+ sort_order: int
55
+
56
+
57
+ class SearchTitle(PascalCaseModel):
58
+ search_title_string: str
59
+ search_title_type: str
60
+
61
+
62
+ class ContentRating(PascalCaseModel):
63
+ rating_system: str
64
+ rating_id: str
65
+ rating_descriptors: list[str]
66
+ rating_disclaimers: list
67
+ interactive_elements: list | None = None
68
+
69
+
70
+ class UsageData(PascalCaseModel):
71
+ aggregate_time_span: str
72
+ average_rating: float
73
+ play_count: int | None = None
74
+ rating_count: int
75
+ rental_count: str | None = None
76
+ trial_count: str | None = None
77
+ purchase_count: str | None = None
78
+
79
+
80
+ class ProductProperties(PascalCaseModel):
81
+ attributes: list | None = None
82
+ can_install_to_sd_card: bool | None = Field(None, alias="CanInstallToSDCard")
83
+ category: str | None = None
84
+ sub_category: str | None = None
85
+ categories: list[str] | None = None
86
+ extensions: Any = None
87
+ is_accessible: bool | None = None
88
+ is_line_of_business_app: bool | None = None
89
+ is_published_to_legacy_windows_phone_store: bool | None = None
90
+ is_published_to_legacy_windows_store: bool | None = None
91
+ is_settings_app: bool | None = None
92
+ package_family_name: str | None = None
93
+ package_identity_name: str | None = None
94
+ publisher_certificate_name: str | None = None
95
+ publisher_id: str
96
+ xbox_live_tier: Any = None
97
+ xbox_xpa: Any = Field(None, alias="XboxXPA")
98
+ xbox_cross_gen_set_id: Any = None
99
+ xbox_console_gen_optimized: Any = None
100
+ xbox_console_gen_compatible: Any = None
101
+ xbox_live_gold_required: bool | None = None
102
+ ownership_type: Any = None
103
+ pdp_background_color: str | None = None
104
+ has_add_ons: bool | None = None
105
+ revision_id: str
106
+ product_group_id: str | None = None
107
+ product_group_name: str | None = None
108
+
109
+
110
+ class AlternateId(PascalCaseModel):
111
+ id_type: str
112
+ value: str
113
+
114
+
115
+ class ValidationData(PascalCaseModel):
116
+ passed_validation: bool
117
+ revision_id: str
118
+ validation_result_uri: str | None = None
119
+
120
+
121
+ class FulfillmentData(PascalCaseModel):
122
+ product_id: str
123
+ wu_bundle_id: str | None = None
124
+ wu_category_id: str
125
+ package_family_name: str
126
+ sku_id: str
127
+ content: Any = None
128
+ package_features: Any = None
129
+
130
+
131
+ class HardwareProperties(PascalCaseModel):
132
+ minimum_hardware: list
133
+ recommended_hardware: list
134
+ minimum_processor: Any = None
135
+ recommended_processor: Any = None
136
+ minimum_graphics: Any = None
137
+ recommended_graphics: Any = None
138
+
139
+
140
+ class Application(PascalCaseModel):
141
+ application_id: str
142
+ declaration_order: int
143
+ extensions: list[str]
144
+
145
+
146
+ class FrameworkDependency(PascalCaseModel):
147
+ max_tested: int
148
+ min_version: int
149
+ package_identity: str
150
+
151
+
152
+ class PlatformDependency(PascalCaseModel):
153
+ max_tested: int | None = None
154
+ min_version: int | None = None
155
+ platform_name: str
156
+
157
+
158
+ class Package(PascalCaseModel):
159
+ applications: list[Application] | None = None
160
+ architectures: list[str]
161
+ capabilities: list[str] | None = None
162
+ device_capabilities: list[str] | None = None
163
+ experience_ids: list | None = None
164
+ framework_dependencies: list[FrameworkDependency] | None = None
165
+ hardware_dependencies: list | None = None
166
+ hardware_requirements: list | None = None
167
+ hash: str | None = None
168
+ hash_algorithm: str | None = None
169
+ is_streaming_app: bool | None = None
170
+ languages: list[str] | None = None
171
+ max_download_size_in_bytes: int
172
+ max_install_size_in_bytes: int | None = None
173
+ package_format: str
174
+ package_family_name: str | None = None
175
+ main_package_family_name_for_dlc: Any = None
176
+ package_full_name: str | None = None
177
+ package_id: str
178
+ content_id: str
179
+ key_id: str | None = None
180
+ package_rank: int | None = None
181
+ package_uri: str | None = None
182
+ platform_dependencies: list[PlatformDependency] | None = None
183
+ platform_dependency_xml_blob: str | None = None
184
+ resource_id: str | None = None
185
+ version: str | None = None
186
+ package_download_uris: Any = None
187
+ driver_dependencies: list | None = None
188
+ fulfillment_data: FulfillmentData | None = None
189
+
190
+
191
+ class LegalText(PascalCaseModel):
192
+ additional_license_terms: str
193
+ copyright: str
194
+ copyright_uri: str
195
+ privacy_policy: str
196
+ privacy_policy_uri: str
197
+ tou: str
198
+ tou_uri: str
199
+
200
+
201
+ class SkuLocalizedProperty(PascalCaseModel):
202
+ contributors: list | None = None
203
+ features: list | None = None
204
+ minimum_notes: str | None = None
205
+ recommended_notes: str | None = None
206
+ release_notes: str | None = None
207
+ display_platform_properties: Any = None
208
+ sku_description: str
209
+ sku_title: str
210
+ sku_button_title: str | None = None
211
+ delivery_date_overlay: Any = None
212
+ sku_display_rank: list | None = None
213
+ text_resources: Any = None
214
+ images: list | None = None
215
+ legal_text: LegalText | None = None
216
+ language: str
217
+ markets: list[str]
218
+
219
+
220
+ class SkuMarketProperty(PascalCaseModel):
221
+ first_available_date: datetime | str | None = None
222
+ supported_languages: list[str] | None = None
223
+ package_ids: Any = None
224
+ pi_filter: Any = Field(None, alias="PIFilter")
225
+ markets: list[str]
226
+
227
+
228
+ class SkuProperties(PascalCaseModel):
229
+ early_adopter_enrollment_url: Any = None
230
+ fulfillment_data: FulfillmentData | None = None
231
+ fulfillment_type: str | None = None
232
+ fulfillment_plugin_id: Any = None
233
+ has_third_party_iaps: bool | None = Field(None, alias="HasThirdPartyIAPs")
234
+ last_update_date: datetime | None = None
235
+ hardware_properties: HardwareProperties | None = None
236
+ hardware_requirements: list | None = None
237
+ hardware_warning_list: list | None = None
238
+ installation_terms: str
239
+ packages: list[Package] | None = None
240
+ version_string: str | None = None
241
+ visible_to_b2b_service_ids: list = Field(alias="VisibleToB2BServiceIds")
242
+ xbox_xpa: bool | None = Field(None, alias="XboxXPA")
243
+ bundled_skus: list | None = None
244
+ is_repurchasable: bool
245
+ sku_display_rank: int
246
+ display_physical_store_inventory: Any = None
247
+ additional_identifiers: list
248
+ is_trial: bool
249
+ is_pre_order: bool
250
+ is_bundle: bool
251
+
252
+ @field_validator("last_update_date", mode="before", check_fields=True)
253
+ def validator(x):
254
+ return x or None
255
+
256
+
257
+ class Sku(PascalCaseModel):
258
+ last_modified_date: datetime
259
+ localized_properties: list[SkuLocalizedProperty]
260
+ market_properties: list[SkuMarketProperty]
261
+ product_id: str
262
+ properties: SkuProperties
263
+ sku_a_schema: str
264
+ sku_b_schema: str
265
+ sku_id: str
266
+ sku_type: str
267
+ recurrence_policy: Any = None
268
+ subscription_policy_id: Any = None
269
+
270
+
271
+ class AllowedPlatform(PascalCaseModel):
272
+ max_version: int | None = None
273
+ min_version: int | None = None
274
+ platform_name: str
275
+
276
+
277
+ class ClientConditions(PascalCaseModel):
278
+ allowed_platforms: list[AllowedPlatform]
279
+
280
+
281
+ class Conditions(PascalCaseModel):
282
+ client_conditions: ClientConditions
283
+ end_date: datetime
284
+ resource_set_ids: list[str]
285
+ start_date: datetime
286
+
287
+
288
+ class PIFilter(PascalCaseModel):
289
+ exclusion_properties: list
290
+ inclusion_properties: list
291
+
292
+
293
+ class Price(PascalCaseModel):
294
+ currency_code: str
295
+ is_pi_required: bool = Field(alias="IsPIRequired")
296
+ list_price: float
297
+ msrp: float = Field(alias="MSRP")
298
+ tax_type: str
299
+ wholesale_currency_code: str
300
+
301
+
302
+ class OrderManagementData(PascalCaseModel):
303
+ granted_entitlement_keys: list | None = None
304
+ pi_filter: PIFilter | None = Field(None, alias="PIFilter")
305
+ price: Price
306
+
307
+
308
+ class AvailabilityProperties(PascalCaseModel):
309
+ original_release_date: datetime | None = None
310
+
311
+
312
+ class SatisfyingEntitlementKey(PascalCaseModel):
313
+ entitlement_keys: list[str]
314
+ licensing_key_ids: list[str]
315
+
316
+
317
+ class LicensingData(PascalCaseModel):
318
+ satisfying_entitlement_keys: list[SatisfyingEntitlementKey]
319
+
320
+
321
+ class Availability(PascalCaseModel):
322
+ actions: list[str]
323
+ availability_a_schema: str | None = None
324
+ availability_b_schema: str | None = None
325
+ availability_id: str | None = None
326
+ conditions: Conditions | None = None
327
+ last_modified_date: datetime | None = None
328
+ markets: list[str] | None = None
329
+ order_management_data: OrderManagementData | None = None
330
+ properties: AvailabilityProperties | None = None
331
+ sku_id: str | None = None
332
+ display_rank: int | None = None
333
+ remediation_required: bool | None = None
334
+ licensing_data: LicensingData | None = None
335
+
336
+
337
+ class DisplaySkuAvailability(PascalCaseModel):
338
+ sku: Sku | None = None
339
+ availabilities: list[Availability]
340
+
341
+
342
+ class LocalizedProperty(PascalCaseModel):
343
+ developer_name: str | None = None
344
+ display_platform_properties: Any | None = None
345
+ publisher_name: str | None = None
346
+ publisher_website_uri: str | None = None
347
+ support_uri: str | None = None
348
+ eligibility_properties: Any | None = None
349
+ franchises: list | None = None
350
+ images: list[Image]
351
+ videos: list[Video] | None = None
352
+ product_description: str | None = None
353
+ product_title: str
354
+ short_title: str | None = None
355
+ sort_title: str | None = None
356
+ friendly_title: str | None = None
357
+ short_description: str | None = None
358
+ search_titles: list[SearchTitle] | None = None
359
+ voice_title: str | None = None
360
+ render_group_details: Any | None = None
361
+ product_display_ranks: list | None = None
362
+ interactive_model_config: Any | None = None
363
+ interactive_3d_enabled: bool | None = Field(None, alias="Interactive3DEnabled")
364
+ language: str | None = None
365
+ markets: list[str] | None = None
366
+
367
+
368
+ class MarketProperty(PascalCaseModel):
369
+ original_release_date: datetime | None = None
370
+ original_release_friendly_name: str | None = None
371
+ minimum_user_age: int | None = None
372
+ content_ratings: list[ContentRating] | None = None
373
+ related_products: list | None = None
374
+ usage_data: list[UsageData]
375
+ bundle_config: Any | None = None
376
+ markets: list[str] | None = None
377
+
378
+
379
+ class Product(PascalCaseModel):
380
+ last_modified_date: datetime | None = None
381
+ localized_properties: list[LocalizedProperty]
382
+ market_properties: list[MarketProperty]
383
+ product_a_schema: str | None = None
384
+ product_b_schema: str | None = None
385
+ product_id: str
386
+ properties: ProductProperties | None = None
387
+ alternate_ids: list[AlternateId] | None = None
388
+ domain_data_version: Any | None = None
389
+ ingestion_source: str | None = None
390
+ is_microsoft_product: bool | None = None
391
+ preferred_sku_id: str | None = None
392
+ product_type: str | None = None
393
+ validation_data: ValidationData | None = None
394
+ merchandizing_tags: list | None = None
395
+ part_d: str | None = None
396
+ product_family: str
397
+ schema_version: str | None = None
398
+ product_kind: str
399
+ display_sku_availabilities: list[DisplaySkuAvailability]
400
+
401
+
402
+ class CatalogResponse(PascalCaseModel):
403
+ big_ids: list[str] | None = None
404
+ has_more_pages: bool | None = None
405
+ products: list[Product]
406
+ total_result_count: int | None = None
407
+
408
+
409
+ class SearchProduct(PascalCaseModel):
410
+ background_color: str | None = None
411
+ height: int | None = None
412
+ image_type: str | None = None
413
+ width: int | None = None
414
+ platform_properties: list
415
+ icon: str | None = None
416
+ product_id: str
417
+ type: str
418
+ title: str
419
+
420
+
421
+ class CatalogSearchResult(PascalCaseModel):
422
+ product_family_name: str
423
+ products: list[SearchProduct]
424
+
425
+
426
+ class CatalogSearchResponse(PascalCaseModel):
427
+ results: list[CatalogSearchResult]
428
+ total_result_count: int
@@ -1,4 +1,4 @@
1
- from typing import Any, Dict, List, Optional
1
+ from typing import Any
2
2
 
3
3
  from pythonxbox.common.models import PascalCaseModel
4
4
 
@@ -16,12 +16,12 @@ class ListChannel(PascalCaseModel):
16
16
  channel_number: str
17
17
  start_date: str
18
18
  end_date: str
19
- images: List[Image]
20
- is_HD: Optional[bool] = None
19
+ images: list[Image]
20
+ is_HD: bool | None = None
21
21
 
22
22
 
23
23
  class CqsChannelListResponse(PascalCaseModel):
24
- channels: List[ListChannel]
24
+ channels: list[ListChannel]
25
25
 
26
26
 
27
27
  class Genre(PascalCaseModel):
@@ -40,20 +40,20 @@ class Program(PascalCaseModel):
40
40
  end_date: str
41
41
  name: str
42
42
  is_repeat: bool
43
- parental_control: Optional[Dict[str, Any]] = None
44
- genres: List[Genre]
43
+ parental_control: dict[str, Any] | None = None
44
+ genres: list[Genre]
45
45
  category_id: int
46
- description: Optional[str] = None
47
- parent_series: Optional[ParentSeries] = None
48
- images: Optional[List[Image]] = None
46
+ description: str | None = None
47
+ parent_series: ParentSeries | None = None
48
+ images: list[Image] | None = None
49
49
 
50
50
 
51
51
  class ScheduleChannel(PascalCaseModel):
52
52
  id: str
53
53
  name: str
54
- images: List[Image]
55
- programs: List[Program]
54
+ images: list[Image]
55
+ programs: list[Program]
56
56
 
57
57
 
58
58
  class CqsScheduleResponse(PascalCaseModel):
59
- channels: List[ScheduleChannel]
59
+ channels: list[ScheduleChannel]