Skip to content

Commit 5df0fc9

Browse files
feat(api): api update (#77)
1 parent 9b622ee commit 5df0fc9

File tree

6 files changed

+13
-8
lines changed

6 files changed

+13
-8
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 10
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-c562e6864fc7607b8a6ff45ad2abaf22344660501695ee0270350b37bbbf3bdf.yml
3-
openapi_spec_hash: c18e3e0b1f0e2602bf708ba3236f4fe0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-02e39575640aa33ba32d7e570c7e54a7e61fd0d26cd02c29932e3941d553fab7.yml
3+
openapi_spec_hash: da3348fde886ba1a2f4ba6577ebd6137
44
config_hash: 63e7969fd7c560b6105e1de79148b568

src/hyperspell/resources/documents.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ def add(
111111
text: str,
112112
collection: Optional[str] | NotGiven = NOT_GIVEN,
113113
date: Union[str, datetime] | NotGiven = NOT_GIVEN,
114-
source: Literal["generic", "slack", "s3", "gmail", "notion", "google_docs", "hubspot"] | NotGiven = NOT_GIVEN,
114+
source: Literal["generic", "mcp", "slack", "s3", "gmail", "notion", "google_docs", "hubspot"]
115+
| NotGiven = NOT_GIVEN,
115116
title: Optional[str] | NotGiven = NOT_GIVEN,
116117
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
117118
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -375,7 +376,8 @@ async def add(
375376
text: str,
376377
collection: Optional[str] | NotGiven = NOT_GIVEN,
377378
date: Union[str, datetime] | NotGiven = NOT_GIVEN,
378-
source: Literal["generic", "slack", "s3", "gmail", "notion", "google_docs", "hubspot"] | NotGiven = NOT_GIVEN,
379+
source: Literal["generic", "mcp", "slack", "s3", "gmail", "notion", "google_docs", "hubspot"]
380+
| NotGiven = NOT_GIVEN,
379381
title: Optional[str] | NotGiven = NOT_GIVEN,
380382
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
381383
# The extra values given here take precedence over values defined on the client or passed to this method.

src/hyperspell/types/document.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Document(BaseModel):
2929
resource_id: Optional[str] = None
3030
"""Along with service, uniquely identifies the source document"""
3131

32-
source: Optional[Literal["generic", "slack", "s3", "gmail", "notion", "google_docs", "hubspot"]] = None
32+
source: Optional[Literal["generic", "mcp", "slack", "s3", "gmail", "notion", "google_docs", "hubspot"]] = None
3333

3434
status: Optional[Literal["pending", "processing", "completed", "failed"]] = None
3535

@@ -38,6 +38,7 @@ class Document(BaseModel):
3838
type: Optional[
3939
Literal[
4040
"generic",
41+
"memory",
4142
"markdown",
4243
"chat",
4344
"email",

src/hyperspell/types/document_add_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class DocumentAddParams(TypedDict, total=False):
3131
range.
3232
"""
3333

34-
source: Literal["generic", "slack", "s3", "gmail", "notion", "google_docs", "hubspot"]
34+
source: Literal["generic", "mcp", "slack", "s3", "gmail", "notion", "google_docs", "hubspot"]
3535
"""Source of the document.
3636
3737
This helps in parsing the document. Note that some sources require the document

src/hyperspell/types/document_list_response.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class DocumentListResponse(BaseModel):
6565

6666
sections_count: Optional[int] = None
6767

68-
source: Optional[Literal["generic", "slack", "s3", "gmail", "notion", "google_docs", "hubspot"]] = None
68+
source: Optional[Literal["generic", "mcp", "slack", "s3", "gmail", "notion", "google_docs", "hubspot"]] = None
6969

7070
status: Optional[Literal["pending", "processing", "completed", "failed"]] = None
7171

@@ -74,6 +74,7 @@ class DocumentListResponse(BaseModel):
7474
type: Optional[
7575
Literal[
7676
"generic",
77+
"memory",
7778
"markdown",
7879
"chat",
7980
"email",

src/hyperspell/types/query_search_params.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Filter(TypedDict, total=False):
3838
end_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
3939
"""Only query documents before this date."""
4040

41-
source: List[Literal["generic", "slack", "s3", "gmail", "notion", "google_docs", "hubspot"]]
41+
source: List[Literal["generic", "mcp", "slack", "s3", "gmail", "notion", "google_docs", "hubspot"]]
4242
"""Only query documents from these sources."""
4343

4444
start_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
@@ -47,6 +47,7 @@ class Filter(TypedDict, total=False):
4747
types: List[
4848
Literal[
4949
"generic",
50+
"memory",
5051
"markdown",
5152
"chat",
5253
"email",

0 commit comments

Comments
 (0)