channel3-sdk 2.11.0__py3-none-any.whl

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 (64) hide show
  1. channel3_sdk/__init__.py +102 -0
  2. channel3_sdk/_base_client.py +2001 -0
  3. channel3_sdk/_client.py +636 -0
  4. channel3_sdk/_compat.py +219 -0
  5. channel3_sdk/_constants.py +14 -0
  6. channel3_sdk/_exceptions.py +108 -0
  7. channel3_sdk/_files.py +123 -0
  8. channel3_sdk/_models.py +857 -0
  9. channel3_sdk/_qs.py +150 -0
  10. channel3_sdk/_resource.py +43 -0
  11. channel3_sdk/_response.py +832 -0
  12. channel3_sdk/_streaming.py +333 -0
  13. channel3_sdk/_types.py +261 -0
  14. channel3_sdk/_utils/__init__.py +64 -0
  15. channel3_sdk/_utils/_compat.py +45 -0
  16. channel3_sdk/_utils/_datetime_parse.py +136 -0
  17. channel3_sdk/_utils/_logs.py +25 -0
  18. channel3_sdk/_utils/_proxy.py +65 -0
  19. channel3_sdk/_utils/_reflection.py +42 -0
  20. channel3_sdk/_utils/_resources_proxy.py +24 -0
  21. channel3_sdk/_utils/_streams.py +12 -0
  22. channel3_sdk/_utils/_sync.py +58 -0
  23. channel3_sdk/_utils/_transform.py +457 -0
  24. channel3_sdk/_utils/_typing.py +156 -0
  25. channel3_sdk/_utils/_utils.py +421 -0
  26. channel3_sdk/_version.py +4 -0
  27. channel3_sdk/lib/.keep +4 -0
  28. channel3_sdk/py.typed +0 -0
  29. channel3_sdk/resources/__init__.py +89 -0
  30. channel3_sdk/resources/brands.py +169 -0
  31. channel3_sdk/resources/enrich.py +169 -0
  32. channel3_sdk/resources/price_tracking.py +450 -0
  33. channel3_sdk/resources/products.py +206 -0
  34. channel3_sdk/resources/search.py +231 -0
  35. channel3_sdk/resources/websites.py +171 -0
  36. channel3_sdk/types/__init__.py +30 -0
  37. channel3_sdk/types/availability_status.py +9 -0
  38. channel3_sdk/types/brand.py +20 -0
  39. channel3_sdk/types/brand_find_params.py +11 -0
  40. channel3_sdk/types/enrich_enrich_url_params.py +12 -0
  41. channel3_sdk/types/paginated_subscriptions.py +14 -0
  42. channel3_sdk/types/price.py +18 -0
  43. channel3_sdk/types/price_history.py +43 -0
  44. channel3_sdk/types/price_tracking_get_history_params.py +12 -0
  45. channel3_sdk/types/price_tracking_list_subscriptions_params.py +14 -0
  46. channel3_sdk/types/price_tracking_start_params.py +11 -0
  47. channel3_sdk/types/price_tracking_stop_params.py +11 -0
  48. channel3_sdk/types/product.py +89 -0
  49. channel3_sdk/types/product_detail.py +84 -0
  50. channel3_sdk/types/product_retrieve_params.py +26 -0
  51. channel3_sdk/types/redirect_mode.py +7 -0
  52. channel3_sdk/types/search_config_param.py +27 -0
  53. channel3_sdk/types/search_filter_price_param.py +18 -0
  54. channel3_sdk/types/search_filters_param.py +44 -0
  55. channel3_sdk/types/search_perform_params.py +37 -0
  56. channel3_sdk/types/search_perform_response.py +10 -0
  57. channel3_sdk/types/subscription.py +16 -0
  58. channel3_sdk/types/variant.py +13 -0
  59. channel3_sdk/types/website.py +16 -0
  60. channel3_sdk/types/website_find_params.py +11 -0
  61. channel3_sdk-2.11.0.dist-info/METADATA +411 -0
  62. channel3_sdk-2.11.0.dist-info/RECORD +64 -0
  63. channel3_sdk-2.11.0.dist-info/WHEEL +4 -0
  64. channel3_sdk-2.11.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,206 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Optional
6
+
7
+ import httpx
8
+
9
+ from ..types import RedirectMode, product_retrieve_params
10
+ from .._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
11
+ from .._utils import maybe_transform, async_maybe_transform
12
+ from .._compat import cached_property
13
+ from .._resource import SyncAPIResource, AsyncAPIResource
14
+ from .._response import (
15
+ to_raw_response_wrapper,
16
+ to_streamed_response_wrapper,
17
+ async_to_raw_response_wrapper,
18
+ async_to_streamed_response_wrapper,
19
+ )
20
+ from .._base_client import make_request_options
21
+ from ..types.redirect_mode import RedirectMode
22
+ from ..types.product_detail import ProductDetail
23
+
24
+ __all__ = ["ProductsResource", "AsyncProductsResource"]
25
+
26
+
27
+ class ProductsResource(SyncAPIResource):
28
+ @cached_property
29
+ def with_raw_response(self) -> ProductsResourceWithRawResponse:
30
+ """
31
+ This property can be used as a prefix for any HTTP method call to return
32
+ the raw response object instead of the parsed content.
33
+
34
+ For more information, see https://www.github.com/channel3-ai/sdk-python#accessing-raw-response-data-eg-headers
35
+ """
36
+ return ProductsResourceWithRawResponse(self)
37
+
38
+ @cached_property
39
+ def with_streaming_response(self) -> ProductsResourceWithStreamingResponse:
40
+ """
41
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
42
+
43
+ For more information, see https://www.github.com/channel3-ai/sdk-python#with_streaming_response
44
+ """
45
+ return ProductsResourceWithStreamingResponse(self)
46
+
47
+ def retrieve(
48
+ self,
49
+ product_id: str,
50
+ *,
51
+ redirect_mode: Optional[RedirectMode] | Omit = omit,
52
+ website_ids: Optional[SequenceNotStr[str]] | Omit = omit,
53
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
54
+ # The extra values given here take precedence over values defined on the client or passed to this method.
55
+ extra_headers: Headers | None = None,
56
+ extra_query: Query | None = None,
57
+ extra_body: Body | None = None,
58
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
59
+ ) -> ProductDetail:
60
+ """
61
+ Get detailed information about a specific product by its ID.
62
+
63
+ Args:
64
+ redirect_mode: "price" redirects to the product page with the lowest price "commission"
65
+ redirects to the product page with the highest commission rate "brand" redirects
66
+ to the brand's product page
67
+
68
+ website_ids: Optional list of website IDs to constrain the buy URL to, relevant if multiple
69
+ merchants exist
70
+
71
+ extra_headers: Send extra headers
72
+
73
+ extra_query: Add additional query parameters to the request
74
+
75
+ extra_body: Add additional JSON properties to the request
76
+
77
+ timeout: Override the client-level default timeout for this request, in seconds
78
+ """
79
+ if not product_id:
80
+ raise ValueError(f"Expected a non-empty value for `product_id` but received {product_id!r}")
81
+ return self._get(
82
+ f"/v0/products/{product_id}",
83
+ options=make_request_options(
84
+ extra_headers=extra_headers,
85
+ extra_query=extra_query,
86
+ extra_body=extra_body,
87
+ timeout=timeout,
88
+ query=maybe_transform(
89
+ {
90
+ "redirect_mode": redirect_mode,
91
+ "website_ids": website_ids,
92
+ },
93
+ product_retrieve_params.ProductRetrieveParams,
94
+ ),
95
+ ),
96
+ cast_to=ProductDetail,
97
+ )
98
+
99
+
100
+ class AsyncProductsResource(AsyncAPIResource):
101
+ @cached_property
102
+ def with_raw_response(self) -> AsyncProductsResourceWithRawResponse:
103
+ """
104
+ This property can be used as a prefix for any HTTP method call to return
105
+ the raw response object instead of the parsed content.
106
+
107
+ For more information, see https://www.github.com/channel3-ai/sdk-python#accessing-raw-response-data-eg-headers
108
+ """
109
+ return AsyncProductsResourceWithRawResponse(self)
110
+
111
+ @cached_property
112
+ def with_streaming_response(self) -> AsyncProductsResourceWithStreamingResponse:
113
+ """
114
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
115
+
116
+ For more information, see https://www.github.com/channel3-ai/sdk-python#with_streaming_response
117
+ """
118
+ return AsyncProductsResourceWithStreamingResponse(self)
119
+
120
+ async def retrieve(
121
+ self,
122
+ product_id: str,
123
+ *,
124
+ redirect_mode: Optional[RedirectMode] | Omit = omit,
125
+ website_ids: Optional[SequenceNotStr[str]] | Omit = omit,
126
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
127
+ # The extra values given here take precedence over values defined on the client or passed to this method.
128
+ extra_headers: Headers | None = None,
129
+ extra_query: Query | None = None,
130
+ extra_body: Body | None = None,
131
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
132
+ ) -> ProductDetail:
133
+ """
134
+ Get detailed information about a specific product by its ID.
135
+
136
+ Args:
137
+ redirect_mode: "price" redirects to the product page with the lowest price "commission"
138
+ redirects to the product page with the highest commission rate "brand" redirects
139
+ to the brand's product page
140
+
141
+ website_ids: Optional list of website IDs to constrain the buy URL to, relevant if multiple
142
+ merchants exist
143
+
144
+ extra_headers: Send extra headers
145
+
146
+ extra_query: Add additional query parameters to the request
147
+
148
+ extra_body: Add additional JSON properties to the request
149
+
150
+ timeout: Override the client-level default timeout for this request, in seconds
151
+ """
152
+ if not product_id:
153
+ raise ValueError(f"Expected a non-empty value for `product_id` but received {product_id!r}")
154
+ return await self._get(
155
+ f"/v0/products/{product_id}",
156
+ options=make_request_options(
157
+ extra_headers=extra_headers,
158
+ extra_query=extra_query,
159
+ extra_body=extra_body,
160
+ timeout=timeout,
161
+ query=await async_maybe_transform(
162
+ {
163
+ "redirect_mode": redirect_mode,
164
+ "website_ids": website_ids,
165
+ },
166
+ product_retrieve_params.ProductRetrieveParams,
167
+ ),
168
+ ),
169
+ cast_to=ProductDetail,
170
+ )
171
+
172
+
173
+ class ProductsResourceWithRawResponse:
174
+ def __init__(self, products: ProductsResource) -> None:
175
+ self._products = products
176
+
177
+ self.retrieve = to_raw_response_wrapper(
178
+ products.retrieve,
179
+ )
180
+
181
+
182
+ class AsyncProductsResourceWithRawResponse:
183
+ def __init__(self, products: AsyncProductsResource) -> None:
184
+ self._products = products
185
+
186
+ self.retrieve = async_to_raw_response_wrapper(
187
+ products.retrieve,
188
+ )
189
+
190
+
191
+ class ProductsResourceWithStreamingResponse:
192
+ def __init__(self, products: ProductsResource) -> None:
193
+ self._products = products
194
+
195
+ self.retrieve = to_streamed_response_wrapper(
196
+ products.retrieve,
197
+ )
198
+
199
+
200
+ class AsyncProductsResourceWithStreamingResponse:
201
+ def __init__(self, products: AsyncProductsResource) -> None:
202
+ self._products = products
203
+
204
+ self.retrieve = async_to_streamed_response_wrapper(
205
+ products.retrieve,
206
+ )
@@ -0,0 +1,231 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Optional
6
+
7
+ import httpx
8
+
9
+ from ..types import search_perform_params
10
+ from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
11
+ from .._utils import maybe_transform, async_maybe_transform
12
+ from .._compat import cached_property
13
+ from .._resource import SyncAPIResource, AsyncAPIResource
14
+ from .._response import (
15
+ to_raw_response_wrapper,
16
+ to_streamed_response_wrapper,
17
+ async_to_raw_response_wrapper,
18
+ async_to_streamed_response_wrapper,
19
+ )
20
+ from .._base_client import make_request_options
21
+ from ..types.search_config_param import SearchConfigParam
22
+ from ..types.search_filters_param import SearchFiltersParam
23
+ from ..types.search_perform_response import SearchPerformResponse
24
+
25
+ __all__ = ["SearchResource", "AsyncSearchResource"]
26
+
27
+
28
+ class SearchResource(SyncAPIResource):
29
+ @cached_property
30
+ def with_raw_response(self) -> SearchResourceWithRawResponse:
31
+ """
32
+ This property can be used as a prefix for any HTTP method call to return
33
+ the raw response object instead of the parsed content.
34
+
35
+ For more information, see https://www.github.com/channel3-ai/sdk-python#accessing-raw-response-data-eg-headers
36
+ """
37
+ return SearchResourceWithRawResponse(self)
38
+
39
+ @cached_property
40
+ def with_streaming_response(self) -> SearchResourceWithStreamingResponse:
41
+ """
42
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
43
+
44
+ For more information, see https://www.github.com/channel3-ai/sdk-python#with_streaming_response
45
+ """
46
+ return SearchResourceWithStreamingResponse(self)
47
+
48
+ def perform(
49
+ self,
50
+ *,
51
+ base64_image: Optional[str] | Omit = omit,
52
+ config: SearchConfigParam | Omit = omit,
53
+ context: Optional[str] | Omit = omit,
54
+ filters: SearchFiltersParam | Omit = omit,
55
+ image_url: Optional[str] | Omit = omit,
56
+ limit: Optional[int] | Omit = omit,
57
+ query: Optional[str] | Omit = omit,
58
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
59
+ # The extra values given here take precedence over values defined on the client or passed to this method.
60
+ extra_headers: Headers | None = None,
61
+ extra_query: Query | None = None,
62
+ extra_body: Body | None = None,
63
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
64
+ ) -> SearchPerformResponse:
65
+ """
66
+ Search for products.
67
+
68
+ Args:
69
+ base64_image: Base64 encoded image
70
+
71
+ config: Optional configuration
72
+
73
+ context: Optional customer information to personalize search results
74
+
75
+ filters: Optional filters. Search will only consider products that match all of the
76
+ filters.
77
+
78
+ image_url: Image URL
79
+
80
+ limit: Optional limit on the number of results. Default is 20, max is 30.
81
+
82
+ query: Search query
83
+
84
+ extra_headers: Send extra headers
85
+
86
+ extra_query: Add additional query parameters to the request
87
+
88
+ extra_body: Add additional JSON properties to the request
89
+
90
+ timeout: Override the client-level default timeout for this request, in seconds
91
+ """
92
+ return self._post(
93
+ "/v0/search",
94
+ body=maybe_transform(
95
+ {
96
+ "base64_image": base64_image,
97
+ "config": config,
98
+ "context": context,
99
+ "filters": filters,
100
+ "image_url": image_url,
101
+ "limit": limit,
102
+ "query": query,
103
+ },
104
+ search_perform_params.SearchPerformParams,
105
+ ),
106
+ options=make_request_options(
107
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
108
+ ),
109
+ cast_to=SearchPerformResponse,
110
+ )
111
+
112
+
113
+ class AsyncSearchResource(AsyncAPIResource):
114
+ @cached_property
115
+ def with_raw_response(self) -> AsyncSearchResourceWithRawResponse:
116
+ """
117
+ This property can be used as a prefix for any HTTP method call to return
118
+ the raw response object instead of the parsed content.
119
+
120
+ For more information, see https://www.github.com/channel3-ai/sdk-python#accessing-raw-response-data-eg-headers
121
+ """
122
+ return AsyncSearchResourceWithRawResponse(self)
123
+
124
+ @cached_property
125
+ def with_streaming_response(self) -> AsyncSearchResourceWithStreamingResponse:
126
+ """
127
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
128
+
129
+ For more information, see https://www.github.com/channel3-ai/sdk-python#with_streaming_response
130
+ """
131
+ return AsyncSearchResourceWithStreamingResponse(self)
132
+
133
+ async def perform(
134
+ self,
135
+ *,
136
+ base64_image: Optional[str] | Omit = omit,
137
+ config: SearchConfigParam | Omit = omit,
138
+ context: Optional[str] | Omit = omit,
139
+ filters: SearchFiltersParam | Omit = omit,
140
+ image_url: Optional[str] | Omit = omit,
141
+ limit: Optional[int] | Omit = omit,
142
+ query: Optional[str] | Omit = omit,
143
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
144
+ # The extra values given here take precedence over values defined on the client or passed to this method.
145
+ extra_headers: Headers | None = None,
146
+ extra_query: Query | None = None,
147
+ extra_body: Body | None = None,
148
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
149
+ ) -> SearchPerformResponse:
150
+ """
151
+ Search for products.
152
+
153
+ Args:
154
+ base64_image: Base64 encoded image
155
+
156
+ config: Optional configuration
157
+
158
+ context: Optional customer information to personalize search results
159
+
160
+ filters: Optional filters. Search will only consider products that match all of the
161
+ filters.
162
+
163
+ image_url: Image URL
164
+
165
+ limit: Optional limit on the number of results. Default is 20, max is 30.
166
+
167
+ query: Search query
168
+
169
+ extra_headers: Send extra headers
170
+
171
+ extra_query: Add additional query parameters to the request
172
+
173
+ extra_body: Add additional JSON properties to the request
174
+
175
+ timeout: Override the client-level default timeout for this request, in seconds
176
+ """
177
+ return await self._post(
178
+ "/v0/search",
179
+ body=await async_maybe_transform(
180
+ {
181
+ "base64_image": base64_image,
182
+ "config": config,
183
+ "context": context,
184
+ "filters": filters,
185
+ "image_url": image_url,
186
+ "limit": limit,
187
+ "query": query,
188
+ },
189
+ search_perform_params.SearchPerformParams,
190
+ ),
191
+ options=make_request_options(
192
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
193
+ ),
194
+ cast_to=SearchPerformResponse,
195
+ )
196
+
197
+
198
+ class SearchResourceWithRawResponse:
199
+ def __init__(self, search: SearchResource) -> None:
200
+ self._search = search
201
+
202
+ self.perform = to_raw_response_wrapper(
203
+ search.perform,
204
+ )
205
+
206
+
207
+ class AsyncSearchResourceWithRawResponse:
208
+ def __init__(self, search: AsyncSearchResource) -> None:
209
+ self._search = search
210
+
211
+ self.perform = async_to_raw_response_wrapper(
212
+ search.perform,
213
+ )
214
+
215
+
216
+ class SearchResourceWithStreamingResponse:
217
+ def __init__(self, search: SearchResource) -> None:
218
+ self._search = search
219
+
220
+ self.perform = to_streamed_response_wrapper(
221
+ search.perform,
222
+ )
223
+
224
+
225
+ class AsyncSearchResourceWithStreamingResponse:
226
+ def __init__(self, search: AsyncSearchResource) -> None:
227
+ self._search = search
228
+
229
+ self.perform = async_to_streamed_response_wrapper(
230
+ search.perform,
231
+ )
@@ -0,0 +1,171 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Optional
6
+
7
+ import httpx
8
+
9
+ from ..types import website_find_params
10
+ from .._types import Body, Query, Headers, NotGiven, not_given
11
+ from .._utils import maybe_transform, async_maybe_transform
12
+ from .._compat import cached_property
13
+ from .._resource import SyncAPIResource, AsyncAPIResource
14
+ from .._response import (
15
+ to_raw_response_wrapper,
16
+ to_streamed_response_wrapper,
17
+ async_to_raw_response_wrapper,
18
+ async_to_streamed_response_wrapper,
19
+ )
20
+ from .._base_client import make_request_options
21
+ from ..types.website import Website
22
+
23
+ __all__ = ["WebsitesResource", "AsyncWebsitesResource"]
24
+
25
+
26
+ class WebsitesResource(SyncAPIResource):
27
+ @cached_property
28
+ def with_raw_response(self) -> WebsitesResourceWithRawResponse:
29
+ """
30
+ This property can be used as a prefix for any HTTP method call to return
31
+ the raw response object instead of the parsed content.
32
+
33
+ For more information, see https://www.github.com/channel3-ai/sdk-python#accessing-raw-response-data-eg-headers
34
+ """
35
+ return WebsitesResourceWithRawResponse(self)
36
+
37
+ @cached_property
38
+ def with_streaming_response(self) -> WebsitesResourceWithStreamingResponse:
39
+ """
40
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
41
+
42
+ For more information, see https://www.github.com/channel3-ai/sdk-python#with_streaming_response
43
+ """
44
+ return WebsitesResourceWithStreamingResponse(self)
45
+
46
+ def find(
47
+ self,
48
+ *,
49
+ query: str,
50
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
51
+ # The extra values given here take precedence over values defined on the client or passed to this method.
52
+ extra_headers: Headers | None = None,
53
+ extra_query: Query | None = None,
54
+ extra_body: Body | None = None,
55
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
56
+ ) -> Optional[Website]:
57
+ """
58
+ Find a website by URL.
59
+
60
+ Args:
61
+ extra_headers: Send extra headers
62
+
63
+ extra_query: Add additional query parameters to the request
64
+
65
+ extra_body: Add additional JSON properties to the request
66
+
67
+ timeout: Override the client-level default timeout for this request, in seconds
68
+ """
69
+ return self._get(
70
+ "/v0/websites",
71
+ options=make_request_options(
72
+ extra_headers=extra_headers,
73
+ extra_query=extra_query,
74
+ extra_body=extra_body,
75
+ timeout=timeout,
76
+ query=maybe_transform({"query": query}, website_find_params.WebsiteFindParams),
77
+ ),
78
+ cast_to=Website,
79
+ )
80
+
81
+
82
+ class AsyncWebsitesResource(AsyncAPIResource):
83
+ @cached_property
84
+ def with_raw_response(self) -> AsyncWebsitesResourceWithRawResponse:
85
+ """
86
+ This property can be used as a prefix for any HTTP method call to return
87
+ the raw response object instead of the parsed content.
88
+
89
+ For more information, see https://www.github.com/channel3-ai/sdk-python#accessing-raw-response-data-eg-headers
90
+ """
91
+ return AsyncWebsitesResourceWithRawResponse(self)
92
+
93
+ @cached_property
94
+ def with_streaming_response(self) -> AsyncWebsitesResourceWithStreamingResponse:
95
+ """
96
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
97
+
98
+ For more information, see https://www.github.com/channel3-ai/sdk-python#with_streaming_response
99
+ """
100
+ return AsyncWebsitesResourceWithStreamingResponse(self)
101
+
102
+ async def find(
103
+ self,
104
+ *,
105
+ query: str,
106
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
107
+ # The extra values given here take precedence over values defined on the client or passed to this method.
108
+ extra_headers: Headers | None = None,
109
+ extra_query: Query | None = None,
110
+ extra_body: Body | None = None,
111
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
112
+ ) -> Optional[Website]:
113
+ """
114
+ Find a website by URL.
115
+
116
+ Args:
117
+ extra_headers: Send extra headers
118
+
119
+ extra_query: Add additional query parameters to the request
120
+
121
+ extra_body: Add additional JSON properties to the request
122
+
123
+ timeout: Override the client-level default timeout for this request, in seconds
124
+ """
125
+ return await self._get(
126
+ "/v0/websites",
127
+ options=make_request_options(
128
+ extra_headers=extra_headers,
129
+ extra_query=extra_query,
130
+ extra_body=extra_body,
131
+ timeout=timeout,
132
+ query=await async_maybe_transform({"query": query}, website_find_params.WebsiteFindParams),
133
+ ),
134
+ cast_to=Website,
135
+ )
136
+
137
+
138
+ class WebsitesResourceWithRawResponse:
139
+ def __init__(self, websites: WebsitesResource) -> None:
140
+ self._websites = websites
141
+
142
+ self.find = to_raw_response_wrapper(
143
+ websites.find,
144
+ )
145
+
146
+
147
+ class AsyncWebsitesResourceWithRawResponse:
148
+ def __init__(self, websites: AsyncWebsitesResource) -> None:
149
+ self._websites = websites
150
+
151
+ self.find = async_to_raw_response_wrapper(
152
+ websites.find,
153
+ )
154
+
155
+
156
+ class WebsitesResourceWithStreamingResponse:
157
+ def __init__(self, websites: WebsitesResource) -> None:
158
+ self._websites = websites
159
+
160
+ self.find = to_streamed_response_wrapper(
161
+ websites.find,
162
+ )
163
+
164
+
165
+ class AsyncWebsitesResourceWithStreamingResponse:
166
+ def __init__(self, websites: AsyncWebsitesResource) -> None:
167
+ self._websites = websites
168
+
169
+ self.find = async_to_streamed_response_wrapper(
170
+ websites.find,
171
+ )
@@ -0,0 +1,30 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .brand import Brand as Brand
6
+ from .price import Price as Price
7
+ from .product import Product as Product
8
+ from .variant import Variant as Variant
9
+ from .website import Website as Website
10
+ from .subscription import Subscription as Subscription
11
+ from .price_history import PriceHistory as PriceHistory
12
+ from .redirect_mode import RedirectMode as RedirectMode
13
+ from .product_detail import ProductDetail as ProductDetail
14
+ from .brand_find_params import BrandFindParams as BrandFindParams
15
+ from .availability_status import AvailabilityStatus as AvailabilityStatus
16
+ from .search_config_param import SearchConfigParam as SearchConfigParam
17
+ from .website_find_params import WebsiteFindParams as WebsiteFindParams
18
+ from .search_filters_param import SearchFiltersParam as SearchFiltersParam
19
+ from .search_perform_params import SearchPerformParams as SearchPerformParams
20
+ from .paginated_subscriptions import PaginatedSubscriptions as PaginatedSubscriptions
21
+ from .product_retrieve_params import ProductRetrieveParams as ProductRetrieveParams
22
+ from .search_perform_response import SearchPerformResponse as SearchPerformResponse
23
+ from .enrich_enrich_url_params import EnrichEnrichURLParams as EnrichEnrichURLParams
24
+ from .search_filter_price_param import SearchFilterPriceParam as SearchFilterPriceParam
25
+ from .price_tracking_stop_params import PriceTrackingStopParams as PriceTrackingStopParams
26
+ from .price_tracking_start_params import PriceTrackingStartParams as PriceTrackingStartParams
27
+ from .price_tracking_get_history_params import PriceTrackingGetHistoryParams as PriceTrackingGetHistoryParams
28
+ from .price_tracking_list_subscriptions_params import (
29
+ PriceTrackingListSubscriptionsParams as PriceTrackingListSubscriptionsParams,
30
+ )
@@ -0,0 +1,9 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal, TypeAlias
4
+
5
+ __all__ = ["AvailabilityStatus"]
6
+
7
+ AvailabilityStatus: TypeAlias = Literal[
8
+ "InStock", "LimitedAvailability", "PreOrder", "BackOrder", "SoldOut", "OutOfStock", "Discontinued", "Unknown"
9
+ ]
@@ -0,0 +1,20 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from .._models import BaseModel
6
+
7
+ __all__ = ["Brand"]
8
+
9
+
10
+ class Brand(BaseModel):
11
+ id: str
12
+
13
+ name: str
14
+
15
+ best_commission_rate: Optional[float] = None
16
+ """The maximum commission rate for the brand, as a percentage"""
17
+
18
+ description: Optional[str] = None
19
+
20
+ logo_url: Optional[str] = None
@@ -0,0 +1,11 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Required, TypedDict
6
+
7
+ __all__ = ["BrandFindParams"]
8
+
9
+
10
+ class BrandFindParams(TypedDict, total=False):
11
+ query: Required[str]
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Required, TypedDict
6
+
7
+ __all__ = ["EnrichEnrichURLParams"]
8
+
9
+
10
+ class EnrichEnrichURLParams(TypedDict, total=False):
11
+ url: Required[str]
12
+ """The URL of the product to enrich"""