Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.13.0"
".": "0.16.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 10
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-287b83fd66b657b044f4ab280ab0e72a2ed72c0da50e4a7d09ce98123982262f.yml
openapi_spec_hash: fcef51b5cf5e602a2d8025546e27e24a
config_hash: a39dfe90372d06d735dfb3d27b30409f
configured_endpoints: 12
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-472f6034747ca75f970d64e57875f1cb24991ad422e17f3e9839757b84e2cb3d.yml
openapi_spec_hash: 9759125c6a0c64da09c94923667f34a5
config_hash: da009f16a6b9b4db17be2949180ace1e
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.16.0 (2025-05-29)

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

### Features

* **api:** api update ([3334f14](https://github.com/hyperspell/python-sdk/commit/3334f14582bda6ec78c9b479317c8d818b1c1227))
* **api:** api update ([b6ad9f4](https://github.com/hyperspell/python-sdk/commit/b6ad9f43113a8cbf23580027c37ecaf95cb37cb3))
* **api:** update via SDK Studio ([bff74c9](https://github.com/hyperspell/python-sdk/commit/bff74c98b5b08e45e291381753340a22c6b04c89))

## 0.13.0 (2025-05-26)

Full Changelog: [v0.12.0...v0.13.0](https://github.com/hyperspell/python-sdk/compare/v0.12.0...v0.13.0)
Expand Down
6 changes: 4 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@ Methods:
Types:

```python
from hyperspell.types import DocumentStatus, DocumentListResponse
from hyperspell.types import Document, DocumentStatus, DocumentStatusResponse
```

Methods:

- <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>
- <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>
- <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>
- <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>
- <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>
- <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>

# Collections
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "hyperspell"
version = "0.13.0"
version = "0.16.0"
description = "The official Python library for the hyperspell API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/hyperspell/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "hyperspell"
__version__ = "0.13.0" # x-release-please-version
__version__ = "0.16.0" # x-release-please-version
24 changes: 22 additions & 2 deletions src/hyperspell/resources/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

from typing import Optional

import httpx

from ..types import auth_user_token_params
Expand Down Expand Up @@ -65,6 +67,7 @@ def user_token(
self,
*,
user_id: str,
expires_in: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -78,6 +81,8 @@ def user_token(
safely passed to your user-facing front-end.

Args:
expires_in: Token lifetime, e.g., '30m', '2h', '1d'. Defaults to 24 hours if not provided.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -88,7 +93,13 @@ def user_token(
"""
return self._post(
"/auth/user_token",
body=maybe_transform({"user_id": user_id}, auth_user_token_params.AuthUserTokenParams),
body=maybe_transform(
{
"user_id": user_id,
"expires_in": expires_in,
},
auth_user_token_params.AuthUserTokenParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand Down Expand Up @@ -139,6 +150,7 @@ async def user_token(
self,
*,
user_id: str,
expires_in: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -152,6 +164,8 @@ async def user_token(
safely passed to your user-facing front-end.

Args:
expires_in: Token lifetime, e.g., '30m', '2h', '1d'. Defaults to 24 hours if not provided.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -162,7 +176,13 @@ async def user_token(
"""
return await self._post(
"/auth/user_token",
body=await async_maybe_transform({"user_id": user_id}, auth_user_token_params.AuthUserTokenParams),
body=await async_maybe_transform(
{
"user_id": user_id,
"expires_in": expires_in,
},
auth_user_token_params.AuthUserTokenParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand Down
Loading