Skip to content

Commit 6ac75c3

Browse files
authored
Merge pull request #91 from hyperspell/release-please--branches--main--changes--next
release: 0.16.1
2 parents a2adc50 + 3620b47 commit 6ac75c3

16 files changed

+641
-109
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.13.0"
2+
".": "0.16.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 10
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-287b83fd66b657b044f4ab280ab0e72a2ed72c0da50e4a7d09ce98123982262f.yml
3-
openapi_spec_hash: fcef51b5cf5e602a2d8025546e27e24a
4-
config_hash: a39dfe90372d06d735dfb3d27b30409f
1+
configured_endpoints: 12
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-472f6034747ca75f970d64e57875f1cb24991ad422e17f3e9839757b84e2cb3d.yml
3+
openapi_spec_hash: 9759125c6a0c64da09c94923667f34a5
4+
config_hash: da009f16a6b9b4db17be2949180ace1e

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## 0.16.0 (2025-05-29)
4+
5+
Full Changelog: [v0.13.0...v0.16.0](https://github.com/hyperspell/python-sdk/compare/v0.13.0...v0.16.0)
6+
7+
### Features
8+
9+
* **api:** api update ([3334f14](https://github.com/hyperspell/python-sdk/commit/3334f14582bda6ec78c9b479317c8d818b1c1227))
10+
* **api:** api update ([b6ad9f4](https://github.com/hyperspell/python-sdk/commit/b6ad9f43113a8cbf23580027c37ecaf95cb37cb3))
11+
* **api:** update via SDK Studio ([bff74c9](https://github.com/hyperspell/python-sdk/commit/bff74c98b5b08e45e291381753340a22c6b04c89))
12+
313
## 0.13.0 (2025-05-26)
414

515
Full Changelog: [v0.12.0...v0.13.0](https://github.com/hyperspell/python-sdk/compare/v0.12.0...v0.13.0)

api.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,15 @@ Methods:
3939
Types:
4040

4141
```python
42-
from hyperspell.types import DocumentStatus, DocumentListResponse
42+
from hyperspell.types import Document, DocumentStatus, DocumentStatusResponse
4343
```
4444

4545
Methods:
4646

47-
- <code title="get /documents/list">client.documents.<a href="./src/hyperspell/resources/documents.py">list</a>(\*\*<a href="src/hyperspell/types/document_list_params.py">params</a>) -> <a href="./src/hyperspell/types/document_list_response.py">SyncCursorPage[DocumentListResponse]</a></code>
47+
- <code title="get /documents/list">client.documents.<a href="./src/hyperspell/resources/documents.py">list</a>(\*\*<a href="src/hyperspell/types/document_list_params.py">params</a>) -> <a href="./src/hyperspell/types/document.py">SyncCursorPage[Document]</a></code>
4848
- <code title="post /documents/add">client.documents.<a href="./src/hyperspell/resources/documents.py">add</a>(\*\*<a href="src/hyperspell/types/document_add_params.py">params</a>) -> <a href="./src/hyperspell/types/document_status.py">DocumentStatus</a></code>
49+
- <code title="get /documents/get/{source}/{resource_id}">client.documents.<a href="./src/hyperspell/resources/documents.py">get</a>(resource_id, \*, source) -> <a href="./src/hyperspell/types/document.py">Document</a></code>
50+
- <code title="get /documents/status">client.documents.<a href="./src/hyperspell/resources/documents.py">status</a>() -> <a href="./src/hyperspell/types/document_status_response.py">DocumentStatusResponse</a></code>
4951
- <code title="post /documents/upload">client.documents.<a href="./src/hyperspell/resources/documents.py">upload</a>(\*\*<a href="src/hyperspell/types/document_upload_params.py">params</a>) -> <a href="./src/hyperspell/types/document_status.py">DocumentStatus</a></code>
5052

5153
# Collections

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "hyperspell"
3-
version = "0.13.0"
3+
version = "0.16.0"
44
description = "The official Python library for the hyperspell API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/hyperspell/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "hyperspell"
4-
__version__ = "0.13.0" # x-release-please-version
4+
__version__ = "0.16.0" # x-release-please-version

src/hyperspell/resources/auth.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
6+
57
import httpx
68

79
from ..types import auth_user_token_params
@@ -65,6 +67,7 @@ def user_token(
6567
self,
6668
*,
6769
user_id: str,
70+
expires_in: Optional[str] | NotGiven = NOT_GIVEN,
6871
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6972
# The extra values given here take precedence over values defined on the client or passed to this method.
7073
extra_headers: Headers | None = None,
@@ -78,6 +81,8 @@ def user_token(
7881
safely passed to your user-facing front-end.
7982
8083
Args:
84+
expires_in: Token lifetime, e.g., '30m', '2h', '1d'. Defaults to 24 hours if not provided.
85+
8186
extra_headers: Send extra headers
8287
8388
extra_query: Add additional query parameters to the request
@@ -88,7 +93,13 @@ def user_token(
8893
"""
8994
return self._post(
9095
"/auth/user_token",
91-
body=maybe_transform({"user_id": user_id}, auth_user_token_params.AuthUserTokenParams),
96+
body=maybe_transform(
97+
{
98+
"user_id": user_id,
99+
"expires_in": expires_in,
100+
},
101+
auth_user_token_params.AuthUserTokenParams,
102+
),
92103
options=make_request_options(
93104
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
94105
),
@@ -139,6 +150,7 @@ async def user_token(
139150
self,
140151
*,
141152
user_id: str,
153+
expires_in: Optional[str] | NotGiven = NOT_GIVEN,
142154
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
143155
# The extra values given here take precedence over values defined on the client or passed to this method.
144156
extra_headers: Headers | None = None,
@@ -152,6 +164,8 @@ async def user_token(
152164
safely passed to your user-facing front-end.
153165
154166
Args:
167+
expires_in: Token lifetime, e.g., '30m', '2h', '1d'. Defaults to 24 hours if not provided.
168+
155169
extra_headers: Send extra headers
156170
157171
extra_query: Add additional query parameters to the request
@@ -162,7 +176,13 @@ async def user_token(
162176
"""
163177
return await self._post(
164178
"/auth/user_token",
165-
body=await async_maybe_transform({"user_id": user_id}, auth_user_token_params.AuthUserTokenParams),
179+
body=await async_maybe_transform(
180+
{
181+
"user_id": user_id,
182+
"expires_in": expires_in,
183+
},
184+
auth_user_token_params.AuthUserTokenParams,
185+
),
166186
options=make_request_options(
167187
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
168188
),

0 commit comments

Comments
 (0)