Skip to content

Commit 538a766

Browse files
feat(api): manual updates
1 parent dac3f38 commit 538a766

9 files changed

Lines changed: 626 additions & 4 deletions

File tree

‎.stats.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 29
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-27dde3a14459d2e2ade277b142906f33c1b9e04c05b91ae9eb10b798eb82eb0b.yml
1+
configured_endpoints: 30
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-c90f13e3cf4b9ae6a1d8f22c0e7285ab12d412d3a659a51a247a97adc7f08121.yml
33
openapi_spec_hash: bf7879be38ebf3397a939c80b261a47a
4-
config_hash: ff35e224e809656528c44163aa41bebd
4+
config_hash: daabb160675d86b354711da1e77e5129

‎api.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# Parse
2+
3+
Types:
4+
5+
```python
6+
from context.dev.types import ParseHandleResponse
7+
```
8+
9+
Methods:
10+
11+
- <code title="post /parse">client.parse.<a href="./src/context/dev/resources/parse.py">handle</a>(body, \*\*<a href="src/context/dev/types/parse_handle_params.py">params</a>) -> <a href="./src/context/dev/types/parse_handle_response.py">ParseHandleResponse</a></code>
12+
113
# Web
214

315
Types:

‎src/context/dev/_client.py‎

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@
3535
)
3636

3737
if TYPE_CHECKING:
38-
from .resources import ai, web, brand, utility, industry, monitors
38+
from .resources import ai, web, brand, parse, utility, industry, monitors
3939
from .resources.ai import AIResource, AsyncAIResource
4040
from .resources.web import WebResource, AsyncWebResource
4141
from .resources.brand import BrandResource, AsyncBrandResource
42+
from .resources.parse import ParseResource, AsyncParseResource
4243
from .resources.utility import UtilityResource, AsyncUtilityResource
4344
from .resources.industry import IndustryResource, AsyncIndustryResource
4445
from .resources.monitors import MonitorsResource, AsyncMonitorsResource
@@ -119,6 +120,12 @@ def __init__(
119120
_strict_response_validation=_strict_response_validation,
120121
)
121122

123+
@cached_property
124+
def parse(self) -> ParseResource:
125+
from .resources.parse import ParseResource
126+
127+
return ParseResource(self)
128+
122129
@cached_property
123130
def web(self) -> WebResource:
124131
from .resources.web import WebResource
@@ -335,6 +342,12 @@ def __init__(
335342
_strict_response_validation=_strict_response_validation,
336343
)
337344

345+
@cached_property
346+
def parse(self) -> AsyncParseResource:
347+
from .resources.parse import AsyncParseResource
348+
349+
return AsyncParseResource(self)
350+
338351
@cached_property
339352
def web(self) -> AsyncWebResource:
340353
from .resources.web import AsyncWebResource
@@ -493,6 +506,12 @@ class ContextDevWithRawResponse:
493506
def __init__(self, client: ContextDev) -> None:
494507
self._client = client
495508

509+
@cached_property
510+
def parse(self) -> parse.ParseResourceWithRawResponse:
511+
from .resources.parse import ParseResourceWithRawResponse
512+
513+
return ParseResourceWithRawResponse(self._client.parse)
514+
496515
@cached_property
497516
def web(self) -> web.WebResourceWithRawResponse:
498517
from .resources.web import WebResourceWithRawResponse
@@ -539,6 +558,12 @@ class AsyncContextDevWithRawResponse:
539558
def __init__(self, client: AsyncContextDev) -> None:
540559
self._client = client
541560

561+
@cached_property
562+
def parse(self) -> parse.AsyncParseResourceWithRawResponse:
563+
from .resources.parse import AsyncParseResourceWithRawResponse
564+
565+
return AsyncParseResourceWithRawResponse(self._client.parse)
566+
542567
@cached_property
543568
def web(self) -> web.AsyncWebResourceWithRawResponse:
544569
from .resources.web import AsyncWebResourceWithRawResponse
@@ -585,6 +610,12 @@ class ContextDevWithStreamedResponse:
585610
def __init__(self, client: ContextDev) -> None:
586611
self._client = client
587612

613+
@cached_property
614+
def parse(self) -> parse.ParseResourceWithStreamingResponse:
615+
from .resources.parse import ParseResourceWithStreamingResponse
616+
617+
return ParseResourceWithStreamingResponse(self._client.parse)
618+
588619
@cached_property
589620
def web(self) -> web.WebResourceWithStreamingResponse:
590621
from .resources.web import WebResourceWithStreamingResponse
@@ -631,6 +662,12 @@ class AsyncContextDevWithStreamedResponse:
631662
def __init__(self, client: AsyncContextDev) -> None:
632663
self._client = client
633664

665+
@cached_property
666+
def parse(self) -> parse.AsyncParseResourceWithStreamingResponse:
667+
from .resources.parse import AsyncParseResourceWithStreamingResponse
668+
669+
return AsyncParseResourceWithStreamingResponse(self._client.parse)
670+
634671
@cached_property
635672
def web(self) -> web.AsyncWebResourceWithStreamingResponse:
636673
from .resources.web import AsyncWebResourceWithStreamingResponse

‎src/context/dev/resources/__init__.py‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
BrandResourceWithStreamingResponse,
2525
AsyncBrandResourceWithStreamingResponse,
2626
)
27+
from .parse import (
28+
ParseResource,
29+
AsyncParseResource,
30+
ParseResourceWithRawResponse,
31+
AsyncParseResourceWithRawResponse,
32+
ParseResourceWithStreamingResponse,
33+
AsyncParseResourceWithStreamingResponse,
34+
)
2735
from .utility import (
2836
UtilityResource,
2937
AsyncUtilityResource,
@@ -50,6 +58,12 @@
5058
)
5159

5260
__all__ = [
61+
"ParseResource",
62+
"AsyncParseResource",
63+
"ParseResourceWithRawResponse",
64+
"AsyncParseResourceWithRawResponse",
65+
"ParseResourceWithStreamingResponse",
66+
"AsyncParseResourceWithStreamingResponse",
5367
"WebResource",
5468
"AsyncWebResource",
5569
"WebResourceWithRawResponse",

0 commit comments

Comments
 (0)