Skip to content

Commit c05d86e

Browse files
feat(api): api update
1 parent 733ed75 commit c05d86e

File tree

9 files changed

+66
-9
lines changed

9 files changed

+66
-9
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: 14
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-f07c2593d45160174921c9c5bff09de2687f8cdcf157bde08d5e3b0427431f92.yml
3-
openapi_spec_hash: 64b83a6e3202e4fa676e26db3fcd8e78
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-41cc2c9708dd44636519f09907b8945c8d7a8c0d2f9586f4ff6b54dc87529afd.yml
3+
openapi_spec_hash: 13e20d1a1759b5a513d2441732a0851e
44
config_hash: a39dfe90372d06d735dfb3d27b30409f

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ response = client.query.search(
167167
"box": {},
168168
"collections": {"collections": ["string"]},
169169
"google_calendar": {"calendar_id": "calendar_id"},
170+
"google_drive": {},
170171
"notion": {"notion_page_ids": ["string"]},
171172
"reddit": {
172173
"period": "hour",

src/hyperspell/resources/query.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,17 @@ def search(
5353
max_results: int | NotGiven = NOT_GIVEN,
5454
options: query_search_params.Options | NotGiven = NOT_GIVEN,
5555
sources: List[
56-
Literal["collections", "notion", "slack", "hubspot", "google_calendar", "reddit", "web_crawler", "box"]
56+
Literal[
57+
"collections",
58+
"notion",
59+
"slack",
60+
"hubspot",
61+
"google_calendar",
62+
"reddit",
63+
"web_crawler",
64+
"box",
65+
"google_drive",
66+
]
5767
]
5868
| NotGiven = NOT_GIVEN,
5969
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -136,7 +146,17 @@ async def search(
136146
max_results: int | NotGiven = NOT_GIVEN,
137147
options: query_search_params.Options | NotGiven = NOT_GIVEN,
138148
sources: List[
139-
Literal["collections", "notion", "slack", "hubspot", "google_calendar", "reddit", "web_crawler", "box"]
149+
Literal[
150+
"collections",
151+
"notion",
152+
"slack",
153+
"hubspot",
154+
"google_calendar",
155+
"reddit",
156+
"web_crawler",
157+
"box",
158+
"google_drive",
159+
]
140160
]
141161
| NotGiven = NOT_GIVEN,
142162
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.

src/hyperspell/types/document_list_response.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,17 @@ class DocumentListResponse(BaseModel):
6363
sections_count: Optional[int] = None
6464

6565
source: Optional[
66-
Literal["collections", "notion", "slack", "hubspot", "google_calendar", "reddit", "web_crawler", "box"]
66+
Literal[
67+
"collections",
68+
"notion",
69+
"slack",
70+
"hubspot",
71+
"google_calendar",
72+
"reddit",
73+
"web_crawler",
74+
"box",
75+
"google_drive",
76+
]
6777
] = None
6878

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

src/hyperspell/types/document_status.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class DocumentStatus(BaseModel):
1313

1414
resource_id: str
1515

16-
source: Literal["collections", "notion", "slack", "hubspot", "google_calendar", "reddit", "web_crawler", "box"]
16+
source: Literal[
17+
"collections", "notion", "slack", "hubspot", "google_calendar", "reddit", "web_crawler", "box", "google_drive"
18+
]
1719

1820
status: Literal["pending", "processing", "completed", "failed"]

src/hyperspell/types/integrations/web_crawler_index_response.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
class WebCrawlerIndexResponse(BaseModel):
1111
resource_id: str
1212

13-
source: Literal["collections", "notion", "slack", "hubspot", "google_calendar", "reddit", "web_crawler", "box"]
13+
source: Literal[
14+
"collections", "notion", "slack", "hubspot", "google_calendar", "reddit", "web_crawler", "box", "google_drive"
15+
]
1416

1517
status: Literal["pending", "processing", "completed", "failed"]

src/hyperspell/types/query_search_params.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,17 @@ class QuerySearchParams(TypedDict, total=False):
4747
"""Search options for the query."""
4848

4949
sources: List[
50-
Literal["collections", "notion", "slack", "hubspot", "google_calendar", "reddit", "web_crawler", "box"]
50+
Literal[
51+
"collections",
52+
"notion",
53+
"slack",
54+
"hubspot",
55+
"google_calendar",
56+
"reddit",
57+
"web_crawler",
58+
"box",
59+
"google_drive",
60+
]
5161
]
5262
"""Only query documents from these sources."""
5363

@@ -123,6 +133,9 @@ class Filter(TypedDict, total=False):
123133
google_calendar: FilterGoogleCalendar
124134
"""Search options for Google Calendar"""
125135

136+
google_drive: object
137+
"""Search options for Google Drive"""
138+
126139
notion: FilterNotion
127140
"""Search options for Notion"""
128141

@@ -207,6 +220,9 @@ class Options(TypedDict, total=False):
207220
google_calendar: OptionsGoogleCalendar
208221
"""Search options for Google Calendar"""
209222

223+
google_drive: object
224+
"""Search options for Google Drive"""
225+
210226
notion: OptionsNotion
211227
"""Search options for Notion"""
212228

src/hyperspell/types/query_search_response.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ def __getattr__(self, attr: str) -> object: ...
2626
class Document(BaseModel):
2727
resource_id: str
2828

29-
source: Literal["collections", "notion", "slack", "hubspot", "google_calendar", "reddit", "web_crawler", "box"]
29+
source: Literal[
30+
"collections", "notion", "slack", "hubspot", "google_calendar", "reddit", "web_crawler", "box", "google_drive"
31+
]
3032

3133
metadata: Optional[DocumentMetadata] = None
3234

tests/api_resources/test_query.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def test_method_search_with_all_params(self, client: Hyperspell) -> None:
3636
"box": {},
3737
"collections": {"collections": ["string"]},
3838
"google_calendar": {"calendar_id": "calendar_id"},
39+
"google_drive": {},
3940
"notion": {"notion_page_ids": ["string"]},
4041
"reddit": {
4142
"period": "hour",
@@ -55,6 +56,7 @@ def test_method_search_with_all_params(self, client: Hyperspell) -> None:
5556
"box": {},
5657
"collections": {"collections": ["string"]},
5758
"google_calendar": {"calendar_id": "calendar_id"},
59+
"google_drive": {},
5860
"notion": {"notion_page_ids": ["string"]},
5961
"reddit": {
6062
"period": "hour",
@@ -117,6 +119,7 @@ async def test_method_search_with_all_params(self, async_client: AsyncHyperspell
117119
"box": {},
118120
"collections": {"collections": ["string"]},
119121
"google_calendar": {"calendar_id": "calendar_id"},
122+
"google_drive": {},
120123
"notion": {"notion_page_ids": ["string"]},
121124
"reddit": {
122125
"period": "hour",
@@ -136,6 +139,7 @@ async def test_method_search_with_all_params(self, async_client: AsyncHyperspell
136139
"box": {},
137140
"collections": {"collections": ["string"]},
138141
"google_calendar": {"calendar_id": "calendar_id"},
142+
"google_drive": {},
139143
"notion": {"notion_page_ids": ["string"]},
140144
"reddit": {
141145
"period": "hour",

0 commit comments

Comments
 (0)