diff --git a/crawlora/client.pyi b/crawlora/client.pyi
index 6c43bf9..7cb78b0 100644
--- a/crawlora/client.pyi
+++ b/crawlora/client.pyi
@@ -92586,7 +92586,7 @@ XboxBrowseParams = TypedDict('XboxBrowseParams', {
'sort': NotRequired[Literal['relevance', 'release_date_desc', 'most_popular', 'price_asc', 'price_desc', 'most_wishlisted', 'discount_desc', 'title_asc', 'title_desc']],
'genre': NotRequired[list[Literal['Action & adventure', 'Card & board', 'Casino', 'Classics', 'Companion', 'Educational', 'Family & kids', 'Fighting', 'Multi-Player Online Battle Arena', 'Music', 'Other', 'Platformer', 'Puzzle & trivia', 'Racing & flying', 'Role playing', 'Shooter', 'Simulation', 'Sports', 'Strategy', 'Tools', 'Word']]],
'price': NotRequired[list[Literal['OnSale', '0', '0.01To5', '5To10', '10To20', '20To40', '40To60', '60To']]],
- 'platform': NotRequired[list[Literal['XboxSeriesX\x7cS', 'XboxOne', 'PC', 'Handheld', 'CloudGaming', 'XboxPlayAnywhere']]],
+ 'platform': NotRequired[list[str]],
'subscription': NotRequired[list[Literal['CFQ7TTC0KHS0', 'CFQ7TTC0P85B', 'CFQ7TTC0K5DJ', 'CFQ7TTC0K6L8', 'CFQ7TTC0KGQ8', 'CFQ7TTC0K5DH', 'CFQ7TTC0QH5H']]],
'age_rating': NotRequired[list[Literal['ESRB:EC', 'ESRB:E', 'ESRB:E10', 'ESRB:T', 'ESRB:M', 'ESRB:AO', 'ESRB:RPEveryone', 'ESRB:RPMature', 'ESRB:RPTeen', 'ESRB:UR']]],
'multiplayer': NotRequired[list[Literal['CrossPlatformMultiplayer', 'CrossPlatformCoop', 'SinglePlayer', 'OnlineMultiplayerWithGold', 'CoopSupportOnline', 'CoopSupportLocal', 'LocalMultiplayer']]],
@@ -92639,7 +92639,7 @@ XboxSearchParams = TypedDict('XboxSearchParams', {
'sort': NotRequired[Literal['relevance', 'release_date_desc', 'most_popular', 'price_asc', 'price_desc', 'most_wishlisted', 'discount_desc', 'title_asc', 'title_desc']],
'genre': NotRequired[list[Literal['Action & adventure', 'Card & board', 'Casino', 'Classics', 'Companion', 'Educational', 'Family & kids', 'Fighting', 'Multi-Player Online Battle Arena', 'Music', 'Other', 'Platformer', 'Puzzle & trivia', 'Racing & flying', 'Role playing', 'Shooter', 'Simulation', 'Sports', 'Strategy', 'Tools', 'Word']]],
'price': NotRequired[list[Literal['OnSale', '0', '0.01To5', '5To10', '10To20', '20To40', '40To60', '60To']]],
- 'platform': NotRequired[list[Literal['XboxSeriesX\x7cS', 'XboxOne', 'PC', 'Handheld', 'CloudGaming', 'XboxPlayAnywhere']]],
+ 'platform': NotRequired[list[str]],
'subscription': NotRequired[list[Literal['CFQ7TTC0KHS0', 'CFQ7TTC0P85B', 'CFQ7TTC0K5DJ', 'CFQ7TTC0K6L8', 'CFQ7TTC0KGQ8', 'CFQ7TTC0K5DH', 'CFQ7TTC0QH5H']]],
'age_rating': NotRequired[list[Literal['ESRB:EC', 'ESRB:E', 'ESRB:E10', 'ESRB:T', 'ESRB:M', 'ESRB:AO', 'ESRB:RPEveryone', 'ESRB:RPMature', 'ESRB:RPTeen', 'ESRB:UR']]],
'multiplayer': NotRequired[list[Literal['CrossPlatformMultiplayer', 'CrossPlatformCoop', 'SinglePlayer', 'OnlineMultiplayerWithGold', 'CoopSupportOnline', 'CoopSupportLocal', 'LocalMultiplayer']]],
diff --git a/docs/operations.md b/docs/operations.md
index 9747fbd..16da921 100644
--- a/docs/operations.md
+++ b/docs/operations.md
@@ -3121,11 +3121,11 @@ Total operations: `3275`
| x | `x.post` | `x-post` | `GET /x/post/{id}` | `id` (path str required)
`username` (query str) | `ApiKeyAuth` | `XPostResponse` | |
| x | `x.profile` | `x-profile` | `GET /x/profile/{username}` | `username` (path str required) | `ApiKeyAuth` | `XProfileResponse` | |
| x | `x.profile_posts` | `x-profile-posts` | `GET /x/profile/{username}/posts` | `username` (path str required)
`limit` (query int) | `ApiKeyAuth` | `XProfilePostsResponse` | |
-| xbox | `xbox.browse` | `xbox-browse` | `GET /xbox/browse` | `cursor` (query str)
`sort` (query Literal['relevance', 'release_date_desc', 'most_popular', 'price_asc', 'price_desc', 'most_wishlisted', 'discount_desc', 'title_asc', 'title_desc'])
`genre` (query list[Literal['Action & adventure', 'Card & board', 'Casino', 'Classics', 'Companion', 'Educational', 'Family & kids', 'Fighting', 'Multi-Player Online Battle Arena', 'Music', 'Other', 'Platformer', 'Puzzle & trivia', 'Racing & flying', 'Role playing', 'Shooter', 'Simulation', 'Sports', 'Strategy', 'Tools', 'Word']])
`price` (query list[Literal['OnSale', '0', '0.01To5', '5To10', '10To20', '20To40', '40To60', '60To']])
`platform` (query list[Literal['XboxSeriesX\x7cS', 'XboxOne', 'PC', 'Handheld', 'CloudGaming', 'XboxPlayAnywhere']])
`subscription` (query list[Literal['CFQ7TTC0KHS0', 'CFQ7TTC0P85B', 'CFQ7TTC0K5DJ', 'CFQ7TTC0K6L8', 'CFQ7TTC0KGQ8', 'CFQ7TTC0K5DH', 'CFQ7TTC0QH5H']])
`age_rating` (query list[Literal['ESRB:EC', 'ESRB:E', 'ESRB:E10', 'ESRB:T', 'ESRB:M', 'ESRB:AO', 'ESRB:RPEveryone', 'ESRB:RPMature', 'ESRB:RPTeen', 'ESRB:UR']])
`multiplayer` (query list[Literal['CrossPlatformMultiplayer', 'CrossPlatformCoop', 'SinglePlayer', 'OnlineMultiplayerWithGold', 'CoopSupportOnline', 'CoopSupportLocal', 'LocalMultiplayer']])
`technical_features` (query list[Literal['CapabilityXboxEnhanced', 'ConsoleGen9Optimized', 'ConsoleCrossGen', 'Capability4k', 'CapabilityHDR', '60fps', '120fps', 'RayTracing']])
`handheld_compatibility` (query list[Literal['VERIFIED', 'PLAYABLE', 'UNSUPPORTED', 'UNKNOWN']])
`supported_language` (query list[Literal['ar-SA', 'zh-CN', 'zh-TW', 'cs-CZ', 'da-DK', 'nl-NL', 'en-GB', 'en-US', 'fi-FI', 'fr-FR', 'de-DE', 'el-GR', 'he-IL', 'hu-HU', 'it-IT', 'ja-JP', 'ko-KR', 'nb-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sk-SK', 'es-MX', 'es-ES', 'sv-SE', 'tr-TR']])
`accessibility` (query list[Literal['AccessibilityOnLaunch', 'AdjustableDifficulty', 'OnDemandTutorials', 'Pausable', 'ProgressSavingOptions', 'MonoSound', 'CustomVolumeControls', 'NarratedGameMenus', 'StereoSound', 'SpatialAudio', 'SteadyCamera', 'ContrastOptions', 'ColorOptions', 'SubtitleOptions', 'AdjustableTextSize', 'AdjustableInputSensitivity', 'BasicInputRemapping', 'TtsSttCommunications', 'InputRemapping', 'PlayableWithButtonsOnly', 'FullKeyboardSupport', 'PlayableWithMouseOnly', 'PlayableWithTouchOnly', 'NoButtonHolds', 'PlayableWithoutMotionControls', 'NoQuickTimeEvents', 'PlayableWithoutTouchControls', 'SingleStickGameplay', 'StickInversion']])
`locale` (query str) | `ApiKeyAuth` | `XboxBrowseResponse` | |
+| xbox | `xbox.browse` | `xbox-browse` | `GET /xbox/browse` | `cursor` (query str)
`sort` (query Literal['relevance', 'release_date_desc', 'most_popular', 'price_asc', 'price_desc', 'most_wishlisted', 'discount_desc', 'title_asc', 'title_desc'])
`genre` (query list[Literal['Action & adventure', 'Card & board', 'Casino', 'Classics', 'Companion', 'Educational', 'Family & kids', 'Fighting', 'Multi-Player Online Battle Arena', 'Music', 'Other', 'Platformer', 'Puzzle & trivia', 'Racing & flying', 'Role playing', 'Shooter', 'Simulation', 'Sports', 'Strategy', 'Tools', 'Word']])
`price` (query list[Literal['OnSale', '0', '0.01To5', '5To10', '10To20', '20To40', '40To60', '60To']])
`platform` (query list[str])
`subscription` (query list[Literal['CFQ7TTC0KHS0', 'CFQ7TTC0P85B', 'CFQ7TTC0K5DJ', 'CFQ7TTC0K6L8', 'CFQ7TTC0KGQ8', 'CFQ7TTC0K5DH', 'CFQ7TTC0QH5H']])
`age_rating` (query list[Literal['ESRB:EC', 'ESRB:E', 'ESRB:E10', 'ESRB:T', 'ESRB:M', 'ESRB:AO', 'ESRB:RPEveryone', 'ESRB:RPMature', 'ESRB:RPTeen', 'ESRB:UR']])
`multiplayer` (query list[Literal['CrossPlatformMultiplayer', 'CrossPlatformCoop', 'SinglePlayer', 'OnlineMultiplayerWithGold', 'CoopSupportOnline', 'CoopSupportLocal', 'LocalMultiplayer']])
`technical_features` (query list[Literal['CapabilityXboxEnhanced', 'ConsoleGen9Optimized', 'ConsoleCrossGen', 'Capability4k', 'CapabilityHDR', '60fps', '120fps', 'RayTracing']])
`handheld_compatibility` (query list[Literal['VERIFIED', 'PLAYABLE', 'UNSUPPORTED', 'UNKNOWN']])
`supported_language` (query list[Literal['ar-SA', 'zh-CN', 'zh-TW', 'cs-CZ', 'da-DK', 'nl-NL', 'en-GB', 'en-US', 'fi-FI', 'fr-FR', 'de-DE', 'el-GR', 'he-IL', 'hu-HU', 'it-IT', 'ja-JP', 'ko-KR', 'nb-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sk-SK', 'es-MX', 'es-ES', 'sv-SE', 'tr-TR']])
`accessibility` (query list[Literal['AccessibilityOnLaunch', 'AdjustableDifficulty', 'OnDemandTutorials', 'Pausable', 'ProgressSavingOptions', 'MonoSound', 'CustomVolumeControls', 'NarratedGameMenus', 'StereoSound', 'SpatialAudio', 'SteadyCamera', 'ContrastOptions', 'ColorOptions', 'SubtitleOptions', 'AdjustableTextSize', 'AdjustableInputSensitivity', 'BasicInputRemapping', 'TtsSttCommunications', 'InputRemapping', 'PlayableWithButtonsOnly', 'FullKeyboardSupport', 'PlayableWithMouseOnly', 'PlayableWithTouchOnly', 'NoButtonHolds', 'PlayableWithoutMotionControls', 'NoQuickTimeEvents', 'PlayableWithoutTouchControls', 'SingleStickGameplay', 'StickInversion']])
`locale` (query str) | `ApiKeyAuth` | `XboxBrowseResponse` | |
| xbox | `xbox.collection` | `xbox-collection` | `GET /xbox/collection` | `id` (query Literal['TopFreeGames', 'TopPaidGames', 'OptimizedSeriesXS', 'XboxPlayAnywhere'] required)
`cursor` (query str)
`locale` (query str) | `ApiKeyAuth` | `XboxCollectionResponse` | |
| xbox | `xbox.game` | `xbox-game` | `GET /xbox/game` | `product_id` (query str required)
`locale` (query str) | `ApiKeyAuth` | `XboxGameResponse` | |
| xbox | `xbox.reviews` | `xbox-reviews` | `GET /xbox/reviews` | `product_id` (query str required)
`item_count` (query int)
`order_by` (query Literal['MostHelpful', 'MostRecent'])
`star_filter` (query int)
`locale` (query str) | `ApiKeyAuth` | `XboxReviewsResponse` | |
-| xbox | `xbox.search` | `xbox-search` | `GET /xbox/search` | `query` (query str required)
`category` (query Literal['games', 'addons', 'hardware'])
`cursor` (query str)
`sort` (query Literal['relevance', 'release_date_desc', 'most_popular', 'price_asc', 'price_desc', 'most_wishlisted', 'discount_desc', 'title_asc', 'title_desc'])
`genre` (query list[Literal['Action & adventure', 'Card & board', 'Casino', 'Classics', 'Companion', 'Educational', 'Family & kids', 'Fighting', 'Multi-Player Online Battle Arena', 'Music', 'Other', 'Platformer', 'Puzzle & trivia', 'Racing & flying', 'Role playing', 'Shooter', 'Simulation', 'Sports', 'Strategy', 'Tools', 'Word']])
`price` (query list[Literal['OnSale', '0', '0.01To5', '5To10', '10To20', '20To40', '40To60', '60To']])
`platform` (query list[Literal['XboxSeriesX\x7cS', 'XboxOne', 'PC', 'Handheld', 'CloudGaming', 'XboxPlayAnywhere']])
`subscription` (query list[Literal['CFQ7TTC0KHS0', 'CFQ7TTC0P85B', 'CFQ7TTC0K5DJ', 'CFQ7TTC0K6L8', 'CFQ7TTC0KGQ8', 'CFQ7TTC0K5DH', 'CFQ7TTC0QH5H']])
`age_rating` (query list[Literal['ESRB:EC', 'ESRB:E', 'ESRB:E10', 'ESRB:T', 'ESRB:M', 'ESRB:AO', 'ESRB:RPEveryone', 'ESRB:RPMature', 'ESRB:RPTeen', 'ESRB:UR']])
`multiplayer` (query list[Literal['CrossPlatformMultiplayer', 'CrossPlatformCoop', 'SinglePlayer', 'OnlineMultiplayerWithGold', 'CoopSupportOnline', 'CoopSupportLocal', 'LocalMultiplayer']])
`technical_features` (query list[Literal['CapabilityXboxEnhanced', 'ConsoleGen9Optimized', 'ConsoleCrossGen', 'Capability4k', 'CapabilityHDR', '60fps', '120fps', 'RayTracing']])
`handheld_compatibility` (query list[Literal['VERIFIED', 'PLAYABLE', 'UNSUPPORTED', 'UNKNOWN']])
`supported_language` (query list[Literal['ar-SA', 'zh-CN', 'zh-TW', 'cs-CZ', 'da-DK', 'nl-NL', 'en-GB', 'en-US', 'fi-FI', 'fr-FR', 'de-DE', 'el-GR', 'he-IL', 'hu-HU', 'it-IT', 'ja-JP', 'ko-KR', 'nb-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sk-SK', 'es-MX', 'es-ES', 'sv-SE', 'tr-TR']])
`accessibility` (query list[Literal['AccessibilityOnLaunch', 'AdjustableDifficulty', 'OnDemandTutorials', 'Pausable', 'ProgressSavingOptions', 'MonoSound', 'CustomVolumeControls', 'NarratedGameMenus', 'StereoSound', 'SpatialAudio', 'SteadyCamera', 'ContrastOptions', 'ColorOptions', 'SubtitleOptions', 'AdjustableTextSize', 'AdjustableInputSensitivity', 'BasicInputRemapping', 'TtsSttCommunications', 'InputRemapping', 'PlayableWithButtonsOnly', 'FullKeyboardSupport', 'PlayableWithMouseOnly', 'PlayableWithTouchOnly', 'NoButtonHolds', 'PlayableWithoutMotionControls', 'NoQuickTimeEvents', 'PlayableWithoutTouchControls', 'SingleStickGameplay', 'StickInversion']])
`locale` (query str) | `ApiKeyAuth` | `XboxSearchResponse` | |
+| xbox | `xbox.search` | `xbox-search` | `GET /xbox/search` | `query` (query str required)
`category` (query Literal['games', 'addons', 'hardware'])
`cursor` (query str)
`sort` (query Literal['relevance', 'release_date_desc', 'most_popular', 'price_asc', 'price_desc', 'most_wishlisted', 'discount_desc', 'title_asc', 'title_desc'])
`genre` (query list[Literal['Action & adventure', 'Card & board', 'Casino', 'Classics', 'Companion', 'Educational', 'Family & kids', 'Fighting', 'Multi-Player Online Battle Arena', 'Music', 'Other', 'Platformer', 'Puzzle & trivia', 'Racing & flying', 'Role playing', 'Shooter', 'Simulation', 'Sports', 'Strategy', 'Tools', 'Word']])
`price` (query list[Literal['OnSale', '0', '0.01To5', '5To10', '10To20', '20To40', '40To60', '60To']])
`platform` (query list[str])
`subscription` (query list[Literal['CFQ7TTC0KHS0', 'CFQ7TTC0P85B', 'CFQ7TTC0K5DJ', 'CFQ7TTC0K6L8', 'CFQ7TTC0KGQ8', 'CFQ7TTC0K5DH', 'CFQ7TTC0QH5H']])
`age_rating` (query list[Literal['ESRB:EC', 'ESRB:E', 'ESRB:E10', 'ESRB:T', 'ESRB:M', 'ESRB:AO', 'ESRB:RPEveryone', 'ESRB:RPMature', 'ESRB:RPTeen', 'ESRB:UR']])
`multiplayer` (query list[Literal['CrossPlatformMultiplayer', 'CrossPlatformCoop', 'SinglePlayer', 'OnlineMultiplayerWithGold', 'CoopSupportOnline', 'CoopSupportLocal', 'LocalMultiplayer']])
`technical_features` (query list[Literal['CapabilityXboxEnhanced', 'ConsoleGen9Optimized', 'ConsoleCrossGen', 'Capability4k', 'CapabilityHDR', '60fps', '120fps', 'RayTracing']])
`handheld_compatibility` (query list[Literal['VERIFIED', 'PLAYABLE', 'UNSUPPORTED', 'UNKNOWN']])
`supported_language` (query list[Literal['ar-SA', 'zh-CN', 'zh-TW', 'cs-CZ', 'da-DK', 'nl-NL', 'en-GB', 'en-US', 'fi-FI', 'fr-FR', 'de-DE', 'el-GR', 'he-IL', 'hu-HU', 'it-IT', 'ja-JP', 'ko-KR', 'nb-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sk-SK', 'es-MX', 'es-ES', 'sv-SE', 'tr-TR']])
`accessibility` (query list[Literal['AccessibilityOnLaunch', 'AdjustableDifficulty', 'OnDemandTutorials', 'Pausable', 'ProgressSavingOptions', 'MonoSound', 'CustomVolumeControls', 'NarratedGameMenus', 'StereoSound', 'SpatialAudio', 'SteadyCamera', 'ContrastOptions', 'ColorOptions', 'SubtitleOptions', 'AdjustableTextSize', 'AdjustableInputSensitivity', 'BasicInputRemapping', 'TtsSttCommunications', 'InputRemapping', 'PlayableWithButtonsOnly', 'FullKeyboardSupport', 'PlayableWithMouseOnly', 'PlayableWithTouchOnly', 'NoButtonHolds', 'PlayableWithoutMotionControls', 'NoQuickTimeEvents', 'PlayableWithoutTouchControls', 'SingleStickGameplay', 'StickInversion']])
`locale` (query str) | `ApiKeyAuth` | `XboxSearchResponse` | |
| xda | `xda.article` | `xda-article` | `GET /xda/article` | `url` (query str required) | `ApiKeyAuth` | `XdaArticleResponse` | |
| xda | `xda.author` | `xda-author` | `GET /xda/author` | `url` (query str required) | `ApiKeyAuth` | `XdaAuthorResponse` | |
| xda | `xda.headlines` | `xda-headlines` | `GET /xda/headlines` | `section` (query Literal['news', 'features', 'reviews', 'buying-guides', 'tutorials', 'editorials', 'editor-columns', 'deals', 'commerce', 'evergreen', 'performance', 'beats', 'awards', 'hardware', 'processor', 'gpu', 'storage', 'monitors', 'input-devices', 'laptops', 'devices', 'single-board-computers', 'gaming-handhelds', 'prebuilt-pc', 'networking', 'smart-home', 'home', 'other-hardware', 'headset', 'cpu-cooler', 'printer', 'home-internet', 'other-computing-devices', 'phone-reviews', '3d-printing', 'esp32', 'home-lab', 'self-hosting', 'software', 'software-and-services', 'apps', 'ai-tools', 'claude', 'notebooklm', 'productivity', 'os', 'windows', 'windows-tutorials', 'linux-hub', 'linux-tutorials', 'macos', 'macos-tutorials', 'chromeos-tutorials', 'microsoft-edge', 'opera', 'spotify', 'bing', 'gaming', 'gaming-news', 'gaming-reviews', 'entertainment', 'entertainment-segment'] required) | `ApiKeyAuth` | `XdaHeadlinesResponse` | |
diff --git a/scripts/generate.py b/scripts/generate.py
index 6b27328..4e30b58 100644
--- a/scripts/generate.py
+++ b/scripts/generate.py
@@ -52,8 +52,15 @@ def schema_ref_name(schema):
def py_literal(value):
- """Render a Literal string while escaping type-syntax punctuation."""
- return repr(str(value)).replace("|", "\\x7c")
+ """Render a Literal string with Python's standard escaping."""
+ return repr(str(value))
+
+
+def py_enum_type(values):
+ """Render enum values, falling back to str for mypy's pipe parsing bug."""
+ if any("|" in str(value) for value in values):
+ return "str"
+ return "Literal[" + ", ".join(py_literal(value) for value in values) + "]"
def _py_schema_type(schema):
@@ -67,7 +74,7 @@ def _py_schema_type(schema):
return concrete[0] if len(concrete) == 1 else "Any"
enum_schema_values = schema.get("enum") or []
if enum_schema_values:
- return "Literal[" + ", ".join(py_literal(value) for value in enum_schema_values) + "]"
+ return py_enum_type(enum_schema_values)
typ = schema.get("type")
if typ == "integer":
return "int"
@@ -98,7 +105,7 @@ def py_schema_type(schema):
def py_type(param):
enum_values = param.get("enum") or []
if enum_values:
- return "Literal[" + ", ".join(py_literal(value) for value in enum_values) + "]"
+ return py_enum_type(enum_values)
typ = param.get("type")
if typ == "integer":
return "int"
diff --git a/tests/test_client.py b/tests/test_client.py
index c5057a9..28fd331 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -285,7 +285,8 @@ def test_generated_stub_includes_typed_endpoint_groups(self):
self.assertIn("'q': Required[str]", stub)
self.assertIn("'count': NotRequired[int]", stub)
self.assertIn("WebEmailVerifyBody = ModelContactVerifyRequest", stub)
- self.assertIn("'XboxSeriesX\\x7cS'", stub)
+ browse_stub = stub.split("XboxBrowseParams = TypedDict", 1)[1].split("\n\n", 1)[0]
+ self.assertIn("'platform': NotRequired[list[str]]", browse_stub)
self.assertIn("'review_count': NotRequired[int | None]", stub)
self.assertIn("def search(self, **params: Unpack[BingSearchParams]) -> BingSearchResponse: ...", stub)
self.assertIn("OperationId = Literal[", stub)