channel3-sdk 0.2.2__py3-none-any.whl → 2.0.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.
Potentially problematic release.
This version of channel3-sdk might be problematic. Click here for more details.
- channel3_sdk/__init__.py +94 -38
- channel3_sdk/_base_client.py +1995 -0
- channel3_sdk/_client.py +549 -0
- channel3_sdk/_compat.py +219 -0
- channel3_sdk/_constants.py +14 -0
- channel3_sdk/_exceptions.py +108 -0
- channel3_sdk/_files.py +123 -0
- channel3_sdk/_models.py +829 -0
- channel3_sdk/_qs.py +150 -0
- channel3_sdk/_resource.py +43 -0
- channel3_sdk/_response.py +832 -0
- channel3_sdk/_streaming.py +333 -0
- channel3_sdk/_types.py +253 -0
- channel3_sdk/_utils/__init__.py +64 -0
- channel3_sdk/_utils/_compat.py +45 -0
- channel3_sdk/_utils/_datetime_parse.py +136 -0
- channel3_sdk/_utils/_logs.py +25 -0
- channel3_sdk/_utils/_proxy.py +65 -0
- channel3_sdk/_utils/_reflection.py +42 -0
- channel3_sdk/_utils/_resources_proxy.py +24 -0
- channel3_sdk/_utils/_streams.py +12 -0
- channel3_sdk/_utils/_sync.py +86 -0
- channel3_sdk/_utils/_transform.py +457 -0
- channel3_sdk/_utils/_typing.py +156 -0
- channel3_sdk/_utils/_utils.py +421 -0
- channel3_sdk/_version.py +4 -0
- channel3_sdk/lib/.keep +4 -0
- channel3_sdk/py.typed +0 -0
- channel3_sdk/resources/__init__.py +61 -0
- channel3_sdk/resources/brands.py +268 -0
- channel3_sdk/resources/enrich.py +167 -0
- channel3_sdk/resources/products.py +163 -0
- channel3_sdk/resources/search.py +227 -0
- channel3_sdk/types/__init__.py +15 -0
- channel3_sdk/types/availability_status.py +9 -0
- channel3_sdk/types/brand.py +17 -0
- channel3_sdk/types/brand_list_params.py +16 -0
- channel3_sdk/types/brand_list_response.py +25 -0
- channel3_sdk/types/enrich_enrich_url_params.py +12 -0
- channel3_sdk/types/enrich_enrich_url_response.py +20 -0
- channel3_sdk/types/price.py +18 -0
- channel3_sdk/types/product_retrieve_response.py +39 -0
- channel3_sdk/types/search_perform_params.py +61 -0
- channel3_sdk/types/search_perform_response.py +36 -0
- channel3_sdk/types/variant.py +13 -0
- channel3_sdk-2.0.0.dist-info/METADATA +414 -0
- channel3_sdk-2.0.0.dist-info/RECORD +49 -0
- {channel3_sdk-0.2.2.dist-info → channel3_sdk-2.0.0.dist-info}/WHEEL +1 -1
- channel3_sdk-2.0.0.dist-info/licenses/LICENSE +201 -0
- channel3_sdk/client.py +0 -574
- channel3_sdk/exceptions.py +0 -48
- channel3_sdk/models.py +0 -135
- channel3_sdk-0.2.2.dist-info/METADATA +0 -284
- channel3_sdk-0.2.2.dist-info/RECORD +0 -7
|
@@ -0,0 +1,227 @@
|
|
|
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 NOT_GIVEN, Body, Query, Headers, NotGiven
|
|
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_perform_response import SearchPerformResponse
|
|
22
|
+
|
|
23
|
+
__all__ = ["SearchResource", "AsyncSearchResource"]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class SearchResource(SyncAPIResource):
|
|
27
|
+
@cached_property
|
|
28
|
+
def with_raw_response(self) -> SearchResourceWithRawResponse:
|
|
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 SearchResourceWithRawResponse(self)
|
|
36
|
+
|
|
37
|
+
@cached_property
|
|
38
|
+
def with_streaming_response(self) -> SearchResourceWithStreamingResponse:
|
|
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 SearchResourceWithStreamingResponse(self)
|
|
45
|
+
|
|
46
|
+
def perform(
|
|
47
|
+
self,
|
|
48
|
+
*,
|
|
49
|
+
base64_image: Optional[str] | NotGiven = NOT_GIVEN,
|
|
50
|
+
config: search_perform_params.Config | NotGiven = NOT_GIVEN,
|
|
51
|
+
context: Optional[str] | NotGiven = NOT_GIVEN,
|
|
52
|
+
filters: search_perform_params.Filters | NotGiven = NOT_GIVEN,
|
|
53
|
+
image_url: Optional[str] | NotGiven = NOT_GIVEN,
|
|
54
|
+
limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
55
|
+
query: Optional[str] | NotGiven = NOT_GIVEN,
|
|
56
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
57
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
58
|
+
extra_headers: Headers | None = None,
|
|
59
|
+
extra_query: Query | None = None,
|
|
60
|
+
extra_body: Body | None = None,
|
|
61
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
62
|
+
) -> SearchPerformResponse:
|
|
63
|
+
"""
|
|
64
|
+
Search for products.
|
|
65
|
+
|
|
66
|
+
Args:
|
|
67
|
+
base64_image: Base64 encoded image
|
|
68
|
+
|
|
69
|
+
config: Optional configuration
|
|
70
|
+
|
|
71
|
+
context: Optional customer information to personalize search results
|
|
72
|
+
|
|
73
|
+
filters: Optional filters
|
|
74
|
+
|
|
75
|
+
image_url: Image URL
|
|
76
|
+
|
|
77
|
+
limit: Optional limit on the number of results
|
|
78
|
+
|
|
79
|
+
query: Search query
|
|
80
|
+
|
|
81
|
+
extra_headers: Send extra headers
|
|
82
|
+
|
|
83
|
+
extra_query: Add additional query parameters to the request
|
|
84
|
+
|
|
85
|
+
extra_body: Add additional JSON properties to the request
|
|
86
|
+
|
|
87
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
88
|
+
"""
|
|
89
|
+
return self._post(
|
|
90
|
+
"/v0/search",
|
|
91
|
+
body=maybe_transform(
|
|
92
|
+
{
|
|
93
|
+
"base64_image": base64_image,
|
|
94
|
+
"config": config,
|
|
95
|
+
"context": context,
|
|
96
|
+
"filters": filters,
|
|
97
|
+
"image_url": image_url,
|
|
98
|
+
"limit": limit,
|
|
99
|
+
"query": query,
|
|
100
|
+
},
|
|
101
|
+
search_perform_params.SearchPerformParams,
|
|
102
|
+
),
|
|
103
|
+
options=make_request_options(
|
|
104
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
105
|
+
),
|
|
106
|
+
cast_to=SearchPerformResponse,
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
class AsyncSearchResource(AsyncAPIResource):
|
|
111
|
+
@cached_property
|
|
112
|
+
def with_raw_response(self) -> AsyncSearchResourceWithRawResponse:
|
|
113
|
+
"""
|
|
114
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
115
|
+
the raw response object instead of the parsed content.
|
|
116
|
+
|
|
117
|
+
For more information, see https://www.github.com/channel3-ai/sdk-python#accessing-raw-response-data-eg-headers
|
|
118
|
+
"""
|
|
119
|
+
return AsyncSearchResourceWithRawResponse(self)
|
|
120
|
+
|
|
121
|
+
@cached_property
|
|
122
|
+
def with_streaming_response(self) -> AsyncSearchResourceWithStreamingResponse:
|
|
123
|
+
"""
|
|
124
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
125
|
+
|
|
126
|
+
For more information, see https://www.github.com/channel3-ai/sdk-python#with_streaming_response
|
|
127
|
+
"""
|
|
128
|
+
return AsyncSearchResourceWithStreamingResponse(self)
|
|
129
|
+
|
|
130
|
+
async def perform(
|
|
131
|
+
self,
|
|
132
|
+
*,
|
|
133
|
+
base64_image: Optional[str] | NotGiven = NOT_GIVEN,
|
|
134
|
+
config: search_perform_params.Config | NotGiven = NOT_GIVEN,
|
|
135
|
+
context: Optional[str] | NotGiven = NOT_GIVEN,
|
|
136
|
+
filters: search_perform_params.Filters | NotGiven = NOT_GIVEN,
|
|
137
|
+
image_url: Optional[str] | NotGiven = NOT_GIVEN,
|
|
138
|
+
limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
139
|
+
query: Optional[str] | NotGiven = NOT_GIVEN,
|
|
140
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
141
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
142
|
+
extra_headers: Headers | None = None,
|
|
143
|
+
extra_query: Query | None = None,
|
|
144
|
+
extra_body: Body | None = None,
|
|
145
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
146
|
+
) -> SearchPerformResponse:
|
|
147
|
+
"""
|
|
148
|
+
Search for products.
|
|
149
|
+
|
|
150
|
+
Args:
|
|
151
|
+
base64_image: Base64 encoded image
|
|
152
|
+
|
|
153
|
+
config: Optional configuration
|
|
154
|
+
|
|
155
|
+
context: Optional customer information to personalize search results
|
|
156
|
+
|
|
157
|
+
filters: Optional filters
|
|
158
|
+
|
|
159
|
+
image_url: Image URL
|
|
160
|
+
|
|
161
|
+
limit: Optional limit on the number of results
|
|
162
|
+
|
|
163
|
+
query: Search query
|
|
164
|
+
|
|
165
|
+
extra_headers: Send extra headers
|
|
166
|
+
|
|
167
|
+
extra_query: Add additional query parameters to the request
|
|
168
|
+
|
|
169
|
+
extra_body: Add additional JSON properties to the request
|
|
170
|
+
|
|
171
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
172
|
+
"""
|
|
173
|
+
return await self._post(
|
|
174
|
+
"/v0/search",
|
|
175
|
+
body=await async_maybe_transform(
|
|
176
|
+
{
|
|
177
|
+
"base64_image": base64_image,
|
|
178
|
+
"config": config,
|
|
179
|
+
"context": context,
|
|
180
|
+
"filters": filters,
|
|
181
|
+
"image_url": image_url,
|
|
182
|
+
"limit": limit,
|
|
183
|
+
"query": query,
|
|
184
|
+
},
|
|
185
|
+
search_perform_params.SearchPerformParams,
|
|
186
|
+
),
|
|
187
|
+
options=make_request_options(
|
|
188
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
189
|
+
),
|
|
190
|
+
cast_to=SearchPerformResponse,
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
class SearchResourceWithRawResponse:
|
|
195
|
+
def __init__(self, search: SearchResource) -> None:
|
|
196
|
+
self._search = search
|
|
197
|
+
|
|
198
|
+
self.perform = to_raw_response_wrapper(
|
|
199
|
+
search.perform,
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
class AsyncSearchResourceWithRawResponse:
|
|
204
|
+
def __init__(self, search: AsyncSearchResource) -> None:
|
|
205
|
+
self._search = search
|
|
206
|
+
|
|
207
|
+
self.perform = async_to_raw_response_wrapper(
|
|
208
|
+
search.perform,
|
|
209
|
+
)
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
class SearchResourceWithStreamingResponse:
|
|
213
|
+
def __init__(self, search: SearchResource) -> None:
|
|
214
|
+
self._search = search
|
|
215
|
+
|
|
216
|
+
self.perform = to_streamed_response_wrapper(
|
|
217
|
+
search.perform,
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
class AsyncSearchResourceWithStreamingResponse:
|
|
222
|
+
def __init__(self, search: AsyncSearchResource) -> None:
|
|
223
|
+
self._search = search
|
|
224
|
+
|
|
225
|
+
self.perform = async_to_streamed_response_wrapper(
|
|
226
|
+
search.perform,
|
|
227
|
+
)
|
|
@@ -0,0 +1,15 @@
|
|
|
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 .variant import Variant as Variant
|
|
8
|
+
from .brand_list_params import BrandListParams as BrandListParams
|
|
9
|
+
from .availability_status import AvailabilityStatus as AvailabilityStatus
|
|
10
|
+
from .brand_list_response import BrandListResponse as BrandListResponse
|
|
11
|
+
from .search_perform_params import SearchPerformParams as SearchPerformParams
|
|
12
|
+
from .search_perform_response import SearchPerformResponse as SearchPerformResponse
|
|
13
|
+
from .enrich_enrich_url_params import EnrichEnrichURLParams as EnrichEnrichURLParams
|
|
14
|
+
from .product_retrieve_response import ProductRetrieveResponse as ProductRetrieveResponse
|
|
15
|
+
from .enrich_enrich_url_response import EnrichEnrichURLResponse as EnrichEnrichURLResponse
|
|
@@ -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,17 @@
|
|
|
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
|
+
description: Optional[str] = None
|
|
16
|
+
|
|
17
|
+
logo_url: Optional[str] = None
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["BrandListParams"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class BrandListParams(TypedDict, total=False):
|
|
12
|
+
page: int
|
|
13
|
+
|
|
14
|
+
query: Optional[str]
|
|
15
|
+
|
|
16
|
+
size: int
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
from .brand import Brand
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["BrandListResponse", "Pagination"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Pagination(BaseModel):
|
|
12
|
+
current_page: int
|
|
13
|
+
|
|
14
|
+
page_size: int
|
|
15
|
+
|
|
16
|
+
total_count: int
|
|
17
|
+
|
|
18
|
+
total_pages: int
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class BrandListResponse(BaseModel):
|
|
22
|
+
items: List[Brand]
|
|
23
|
+
|
|
24
|
+
pagination: Pagination
|
|
25
|
+
"""Pagination metadata for responses"""
|
|
@@ -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"""
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
from .price import Price
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["EnrichEnrichURLResponse"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class EnrichEnrichURLResponse(BaseModel):
|
|
12
|
+
main_image_url: str
|
|
13
|
+
|
|
14
|
+
other_image_urls: List[str]
|
|
15
|
+
|
|
16
|
+
price: Price
|
|
17
|
+
|
|
18
|
+
title: str
|
|
19
|
+
|
|
20
|
+
url: str
|
|
@@ -0,0 +1,18 @@
|
|
|
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__ = ["Price"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Price(BaseModel):
|
|
11
|
+
currency: str
|
|
12
|
+
"""The currency code of the product, like USD, EUR, GBP, etc."""
|
|
13
|
+
|
|
14
|
+
price: float
|
|
15
|
+
"""The current price of the product, including any discounts."""
|
|
16
|
+
|
|
17
|
+
compare_at_price: Optional[float] = None
|
|
18
|
+
"""The original price of the product before any discounts."""
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from .price import Price
|
|
7
|
+
from .variant import Variant
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
from .availability_status import AvailabilityStatus
|
|
10
|
+
|
|
11
|
+
__all__ = ["ProductRetrieveResponse"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ProductRetrieveResponse(BaseModel):
|
|
15
|
+
id: str
|
|
16
|
+
|
|
17
|
+
availability: AvailabilityStatus
|
|
18
|
+
|
|
19
|
+
price: Price
|
|
20
|
+
|
|
21
|
+
title: str
|
|
22
|
+
|
|
23
|
+
url: str
|
|
24
|
+
|
|
25
|
+
brand_id: Optional[str] = None
|
|
26
|
+
|
|
27
|
+
brand_name: Optional[str] = None
|
|
28
|
+
|
|
29
|
+
description: Optional[str] = None
|
|
30
|
+
|
|
31
|
+
gender: Optional[Literal["male", "female", "unisex"]] = None
|
|
32
|
+
|
|
33
|
+
image_urls: Optional[List[str]] = None
|
|
34
|
+
|
|
35
|
+
key_features: Optional[List[str]] = None
|
|
36
|
+
|
|
37
|
+
materials: Optional[List[str]] = None
|
|
38
|
+
|
|
39
|
+
variants: Optional[List[Variant]] = None
|
|
@@ -0,0 +1,61 @@
|
|
|
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 List, Optional
|
|
6
|
+
from typing_extensions import Literal, TypedDict
|
|
7
|
+
|
|
8
|
+
from .._types import SequenceNotStr
|
|
9
|
+
from .availability_status import AvailabilityStatus
|
|
10
|
+
|
|
11
|
+
__all__ = ["SearchPerformParams", "Config", "Filters", "FiltersPrice"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class SearchPerformParams(TypedDict, total=False):
|
|
15
|
+
base64_image: Optional[str]
|
|
16
|
+
"""Base64 encoded image"""
|
|
17
|
+
|
|
18
|
+
config: Config
|
|
19
|
+
"""Optional configuration"""
|
|
20
|
+
|
|
21
|
+
context: Optional[str]
|
|
22
|
+
"""Optional customer information to personalize search results"""
|
|
23
|
+
|
|
24
|
+
filters: Filters
|
|
25
|
+
"""Optional filters"""
|
|
26
|
+
|
|
27
|
+
image_url: Optional[str]
|
|
28
|
+
"""Image URL"""
|
|
29
|
+
|
|
30
|
+
limit: Optional[int]
|
|
31
|
+
"""Optional limit on the number of results"""
|
|
32
|
+
|
|
33
|
+
query: Optional[str]
|
|
34
|
+
"""Search query"""
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class Config(TypedDict, total=False):
|
|
38
|
+
enrich_query: bool
|
|
39
|
+
|
|
40
|
+
semantic_search: bool
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class FiltersPrice(TypedDict, total=False):
|
|
44
|
+
max_price: Optional[float]
|
|
45
|
+
"""Maximum price, in dollars and cents"""
|
|
46
|
+
|
|
47
|
+
min_price: Optional[float]
|
|
48
|
+
"""Minimum price, in dollars and cents"""
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class Filters(TypedDict, total=False):
|
|
52
|
+
availability: Optional[List[AvailabilityStatus]]
|
|
53
|
+
"""List of availability statuses"""
|
|
54
|
+
|
|
55
|
+
brand_ids: Optional[SequenceNotStr[str]]
|
|
56
|
+
"""List of brand IDs"""
|
|
57
|
+
|
|
58
|
+
gender: Optional[Literal["male", "female", "unisex"]]
|
|
59
|
+
|
|
60
|
+
price: Optional[FiltersPrice]
|
|
61
|
+
"""Price filter. Values are inclusive."""
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from .price import Price
|
|
7
|
+
from .variant import Variant
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
from .availability_status import AvailabilityStatus
|
|
10
|
+
|
|
11
|
+
__all__ = ["SearchPerformResponse", "SearchPerformResponseItem"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class SearchPerformResponseItem(BaseModel):
|
|
15
|
+
id: str
|
|
16
|
+
|
|
17
|
+
availability: AvailabilityStatus
|
|
18
|
+
|
|
19
|
+
brand_name: str
|
|
20
|
+
|
|
21
|
+
image_url: str
|
|
22
|
+
|
|
23
|
+
price: Price
|
|
24
|
+
|
|
25
|
+
score: int
|
|
26
|
+
|
|
27
|
+
title: str
|
|
28
|
+
|
|
29
|
+
url: str
|
|
30
|
+
|
|
31
|
+
description: Optional[str] = None
|
|
32
|
+
|
|
33
|
+
variants: Optional[List[Variant]] = None
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
SearchPerformResponse: TypeAlias = List[SearchPerformResponseItem]
|