diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1b4ca550..22936c21 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -18,7 +18,7 @@ jobs:
lint:
timeout-minutes: 10
name: lint
- runs-on: ${{ github.repository == 'stainless-sdks/profound-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
+ runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -41,7 +41,7 @@ jobs:
permissions:
contents: read
id-token: write
- runs-on: ${{ github.repository == 'stainless-sdks/profound-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
+ runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -78,7 +78,7 @@ jobs:
test:
timeout-minutes: 10
name: test
- runs-on: ${{ github.repository == 'stainless-sdks/profound-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
+ runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index c3e01e1e..21fa4455 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.53.0"
+ ".": "0.54.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index edf51b3c..b636c14e 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 102
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-17587551addb077f3da29dd969fcd5f57c7272b4d3d3b1707dca00b1d04b7ee8.yml
-openapi_spec_hash: 261e4f33ccaac115058a54ffc28ad9f6
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-5f34810928a953e7787f5d7dff3a0da1e67ef9ac237d01b9aa4a9e596b0f2a0a.yml
+openapi_spec_hash: e4a76a9d25f44d1dfbd509828504e762
config_hash: 48130b77367435ca80edf565b73c49f9
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3c85f2e8..6bfffd4f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,26 @@
# Changelog
+## 0.54.0 (2026-07-22)
+
+Full Changelog: [v0.53.0...v0.54.0](https://github.com/cooper-square-technologies/profound-python-sdk/compare/v0.53.0...v0.54.0)
+
+### Features
+
+* **api:** api update ([edd5fb6](https://github.com/cooper-square-technologies/profound-python-sdk/commit/edd5fb6d807dd72234eeda6f0effddbed4086c9e))
+* **api:** api update ([79dcecf](https://github.com/cooper-square-technologies/profound-python-sdk/commit/79dcecf0ac4be6dbb3ec556677e21c6688818e5b))
+* **api:** api update ([949c8c4](https://github.com/cooper-square-technologies/profound-python-sdk/commit/949c8c4aecea50ff7fdf56dc3b3ab74a032aa2bb))
+* **api:** api update ([ee476f4](https://github.com/cooper-square-technologies/profound-python-sdk/commit/ee476f40439fd739ac8b3e97b028e55b98135a5d))
+* **api:** api update ([641081e](https://github.com/cooper-square-technologies/profound-python-sdk/commit/641081e222e99a24287f76aca3888d4752b4a07a))
+* **api:** api update ([dcd95d9](https://github.com/cooper-square-technologies/profound-python-sdk/commit/dcd95d9e47d35660760d6590073613d4ef0fc510))
+* **api:** api update ([7aa69a6](https://github.com/cooper-square-technologies/profound-python-sdk/commit/7aa69a6761298ead98c4092ce427303f0343b626))
+* **api:** api update ([bedb038](https://github.com/cooper-square-technologies/profound-python-sdk/commit/bedb0380d42036914f5b548f24d3e056a7672f19))
+* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([02477bf](https://github.com/cooper-square-technologies/profound-python-sdk/commit/02477bf17e69c20b0132cfafe82e54949e0fe960))
+
+
+### Bug Fixes
+
+* **internal:** resolve build failures ([a3e6d1f](https://github.com/cooper-square-technologies/profound-python-sdk/commit/a3e6d1f6665d12629d8c16e90bcc946b18b089bb))
+
## 0.53.0 (2026-07-13)
Full Changelog: [v0.52.0...v0.53.0](https://github.com/cooper-square-technologies/profound-python-sdk/compare/v0.52.0...v0.53.0)
diff --git a/api.md b/api.md
index 9a452da9..7a40c941 100644
--- a/api.md
+++ b/api.md
@@ -91,14 +91,18 @@ Methods:
Types:
```python
-from profound.types import PromptAnswersResponse, PromptAnswersV2Response
+from profound.types import (
+ PromptAnswersResponse,
+ PromptAnswersV2Response,
+ PromptStreamAnswersV2Response,
+)
```
Methods:
- client.prompts.answers(\*\*params) -> PromptAnswersResponse
- client.prompts.answers_v2(\*\*params) -> PromptAnswersV2Response
-- client.prompts.stream_answers_v2(\*\*params) -> None
+- client.prompts.stream_answers_v2(\*\*params) -> PromptStreamAnswersV2Response
# Reports
@@ -122,8 +126,12 @@ from profound.types import (
ReportQueryVisibilityResponse,
ReportSentimentV2Response,
ReportStreamCitationsResponse,
+ ReportStreamCitationsV2Response,
+ ReportStreamQueryFanoutsResponse,
ReportStreamSentimentResponse,
+ ReportStreamSentimentV2Response,
ReportStreamVisibilityResponse,
+ ReportStreamVisibilityV2Response,
)
```
@@ -142,12 +150,12 @@ Methods:
- client.reports.sentiment(\*\*params) -> ReportResponse
- client.reports.sentiment_v2(\*\*params) -> ReportSentimentV2Response
- client.reports.stream_citations(\*\*params) -> ReportStreamCitationsResponse
-- client.reports.stream_citations_v2(\*\*params) -> None
-- client.reports.stream_query_fanouts(\*\*params) -> None
+- client.reports.stream_citations_v2(\*\*params) -> ReportStreamCitationsV2Response
+- client.reports.stream_query_fanouts(\*\*params) -> ReportStreamQueryFanoutsResponse
- client.reports.stream_sentiment(\*\*params) -> ReportStreamSentimentResponse
-- client.reports.stream_sentiment_v2(\*\*params) -> None
+- client.reports.stream_sentiment_v2(\*\*params) -> ReportStreamSentimentV2Response
- client.reports.stream_visibility(\*\*params) -> ReportStreamVisibilityResponse
-- client.reports.stream_visibility_v2(\*\*params) -> None
+- client.reports.stream_visibility_v2(\*\*params) -> ReportStreamVisibilityV2Response
- client.reports.visibility(\*\*params) -> ReportResponse
## WebSearchResults
@@ -241,26 +249,26 @@ Methods:
Types:
```python
-from profound.types.reports import FactcheckQueryScoresResponse
+from profound.types.reports import FactcheckQueryScoresResponse, FactcheckStreamScoresResponse
```
Methods:
- client.reports.factcheck.query_scores(\*\*params) -> FactcheckQueryScoresResponse
-- client.reports.factcheck.stream_scores(\*\*params) -> None
+- client.reports.factcheck.stream_scores(\*\*params) -> FactcheckStreamScoresResponse
### Claims
Types:
```python
-from profound.types.reports.factcheck import ClaimQueryClaimsResponse
+from profound.types.reports.factcheck import ClaimQueryClaimsResponse, ClaimStreamClaimsResponse
```
Methods:
- client.reports.factcheck.claims.query_claims(\*\*params) -> ClaimQueryClaimsResponse
-- client.reports.factcheck.claims.stream_claims(\*\*params) -> None
+- client.reports.factcheck.claims.stream_claims(\*\*params) -> ClaimStreamClaimsResponse
# Content
@@ -312,7 +320,7 @@ from profound.types.agents import RunCreateResponse, RunRetrieveResponse
Methods:
- client.agents.runs.create(agent_id, \*\*params) -> RunCreateResponse
-- client.agents.runs.retrieve(run_id, \*, agent_id) -> RunRetrieveResponse
+- client.agents.runs.retrieve(run_id, \*, agent_id, \*\*params) -> RunRetrieveResponse
## NodeTypes
diff --git a/pyproject.toml b/pyproject.toml
index bd5d6bb6..ac99ab4a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "profound"
-version = "0.53.0"
+version = "0.54.0"
description = "The official Python library for the profound API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/scripts/lint b/scripts/lint
index ade6bb5b..02defcf3 100755
--- a/scripts/lint
+++ b/scripts/lint
@@ -13,7 +13,7 @@ else
fi
echo "==> Running pyright"
-uv run pyright
+uv run pyright -p .
echo "==> Running mypy"
uv run mypy .
diff --git a/src/profound/_version.py b/src/profound/_version.py
index fa206d86..735d55b2 100644
--- a/src/profound/_version.py
+++ b/src/profound/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "profound"
-__version__ = "0.53.0" # x-release-please-version
+__version__ = "0.54.0" # x-release-please-version
diff --git a/src/profound/resources/agents/node_types.py b/src/profound/resources/agents/node_types.py
index 38ea3f14..5ed9a877 100644
--- a/src/profound/resources/agents/node_types.py
+++ b/src/profound/resources/agents/node_types.py
@@ -78,7 +78,7 @@ def retrieve_schema(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> NodeTypeRetrieveSchemaResponse:
"""
- Retrieve the JSON schema and worked examples for a single node type.
+ Retrieve the JSON schema for a single node type.
The `schema` field is an opaque JSON Schema for the node's configuration. Use
`schema_version` as a cache key — it bumps whenever the schema changes.
@@ -162,7 +162,7 @@ async def retrieve_schema(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> NodeTypeRetrieveSchemaResponse:
"""
- Retrieve the JSON schema and worked examples for a single node type.
+ Retrieve the JSON schema for a single node type.
The `schema` field is an opaque JSON Schema for the node's configuration. Use
`schema_version` as a cache key — it bumps whenever the schema changes.
diff --git a/src/profound/resources/agents/runs.py b/src/profound/resources/agents/runs.py
index e53bc057..f50ca1b1 100644
--- a/src/profound/resources/agents/runs.py
+++ b/src/profound/resources/agents/runs.py
@@ -17,7 +17,7 @@
async_to_streamed_response_wrapper,
)
from ..._base_client import make_request_options
-from ...types.agents import run_create_params
+from ...types.agents import run_create_params, run_retrieve_params
from ...types.agents.run_create_response import RunCreateResponse
from ...types.agents.run_retrieve_response import RunRetrieveResponse
@@ -93,6 +93,7 @@ def retrieve(
run_id: str,
*,
agent_id: str,
+ verbose: bool | Omit = omit,
# 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,
@@ -108,6 +109,8 @@ def retrieve(
run_id: The ID of the run to retrieve.
+ verbose: Include each step's raw `outputs` payload in the execution trace.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -123,7 +126,11 @@ def retrieve(
return self._get(
path_template("/v1/agents/{agent_id}/runs/{run_id}", agent_id=agent_id, run_id=run_id),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"verbose": verbose}, run_retrieve_params.RunRetrieveParams),
),
cast_to=RunRetrieveResponse,
)
@@ -198,6 +205,7 @@ async def retrieve(
run_id: str,
*,
agent_id: str,
+ verbose: bool | Omit = omit,
# 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,
@@ -213,6 +221,8 @@ async def retrieve(
run_id: The ID of the run to retrieve.
+ verbose: Include each step's raw `outputs` payload in the execution trace.
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -228,7 +238,11 @@ async def retrieve(
return await self._get(
path_template("/v1/agents/{agent_id}/runs/{run_id}", agent_id=agent_id, run_id=run_id),
options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform({"verbose": verbose}, run_retrieve_params.RunRetrieveParams),
),
cast_to=RunRetrieveResponse,
)
diff --git a/src/profound/resources/organizations/categories.py b/src/profound/resources/organizations/categories.py
index 1bcc9525..a25f99a4 100644
--- a/src/profound/resources/organizations/categories.py
+++ b/src/profound/resources/organizations/categories.py
@@ -111,7 +111,7 @@ def assets(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CategoryAssetsResponse:
"""
- Get Category Assets
+ Get Assets
Args:
extra_headers: Send extra headers
@@ -193,7 +193,7 @@ def get_category_personas(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CategoryGetCategoryPersonasResponse:
"""
- Get Category Personas
+ Get Personas
Args:
extra_headers: Send extra headers
@@ -221,6 +221,7 @@ def prompts(
analysis_type: List[Literal["visibility", "sentiment", "sentiment_v2", "accuracy"]] | Omit = omit,
cursor: Optional[str] | Omit = omit,
limit: int | Omit = omit,
+ order_by: Literal["created_at", "prompt"] | Omit = omit,
order_dir: Literal["asc", "desc"] | Omit = omit,
persona_id: SequenceNotStr[str] | Omit = omit,
platform_id: SequenceNotStr[str] | Omit = omit,
@@ -247,7 +248,9 @@ def prompts(
limit: Maximum number of prompts to return.
- order_dir: Sort direction by creation date.
+ order_by: Field used to order prompts.
+
+ order_dir: Sort direction for the selected order field.
persona_id: Filter by persona IDs.
@@ -285,6 +288,7 @@ def prompts(
"analysis_type": analysis_type,
"cursor": cursor,
"limit": limit,
+ "order_by": order_by,
"order_dir": order_dir,
"persona_id": persona_id,
"platform_id": platform_id,
@@ -583,7 +587,7 @@ async def assets(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CategoryAssetsResponse:
"""
- Get Category Assets
+ Get Assets
Args:
extra_headers: Send extra headers
@@ -665,7 +669,7 @@ async def get_category_personas(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CategoryGetCategoryPersonasResponse:
"""
- Get Category Personas
+ Get Personas
Args:
extra_headers: Send extra headers
@@ -693,6 +697,7 @@ async def prompts(
analysis_type: List[Literal["visibility", "sentiment", "sentiment_v2", "accuracy"]] | Omit = omit,
cursor: Optional[str] | Omit = omit,
limit: int | Omit = omit,
+ order_by: Literal["created_at", "prompt"] | Omit = omit,
order_dir: Literal["asc", "desc"] | Omit = omit,
persona_id: SequenceNotStr[str] | Omit = omit,
platform_id: SequenceNotStr[str] | Omit = omit,
@@ -719,7 +724,9 @@ async def prompts(
limit: Maximum number of prompts to return.
- order_dir: Sort direction by creation date.
+ order_by: Field used to order prompts.
+
+ order_dir: Sort direction for the selected order field.
persona_id: Filter by persona IDs.
@@ -757,6 +764,7 @@ async def prompts(
"analysis_type": analysis_type,
"cursor": cursor,
"limit": limit,
+ "order_by": order_by,
"order_dir": order_dir,
"persona_id": persona_id,
"platform_id": platform_id,
diff --git a/src/profound/resources/prompts.py b/src/profound/resources/prompts.py
index 79fc3db1..aea37d94 100644
--- a/src/profound/resources/prompts.py
+++ b/src/profound/resources/prompts.py
@@ -2,14 +2,14 @@
from __future__ import annotations
-from typing import List, Union, Iterable, Optional
+from typing import Any, List, Union, Iterable, Optional, cast
from datetime import datetime
from typing_extensions import Literal
import httpx
from ..types import prompt_answers_params, prompt_answers_v2_params, prompt_stream_answers_v2_params
-from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
+from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from .._utils import maybe_transform, async_maybe_transform
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@@ -19,10 +19,12 @@
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
+from .._streaming import Stream, AsyncStream
from .._base_client import make_request_options
from ..types.prompt_answers_response import PromptAnswersResponse
from ..types.shared_params.pagination import Pagination
from ..types.prompt_answers_v2_response import PromptAnswersV2Response
+from ..types.prompt_stream_answers_v2_response import PromptStreamAnswersV2Response
__all__ = ["PromptsResource", "AsyncPromptsResource"]
@@ -153,7 +155,7 @@ def answers_v2(
`citations`, `search_queries`, `analysis_types`, `sentiment_claims`. Omit for
all of them.
- limit: Page size; default 10, max 50.
+ limit: Page size; default 10, max 200.
max_results: Stream endpoint only: cap the number of streamed rows (default: all).
@@ -225,7 +227,7 @@ def stream_answers_v2(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
+ ) -> Stream[PromptStreamAnswersV2Response]:
"""
Stream Answers V2
@@ -241,7 +243,7 @@ def stream_answers_v2(
`citations`, `search_queries`, `analysis_types`, `sentiment_claims`. Omit for
all of them.
- limit: Page size; default 10, max 50.
+ limit: Page size; default 10, max 200.
max_results: Stream endpoint only: cap the number of streamed rows (default: all).
@@ -253,7 +255,7 @@ def stream_answers_v2(
timeout: Override the client-level default timeout for this request, in seconds
"""
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
return self._post(
"/v2/prompts/answers/stream",
body=maybe_transform(
@@ -272,7 +274,11 @@ def stream_answers_v2(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=NoneType,
+ cast_to=cast(
+ Any, PromptStreamAnswersV2Response
+ ), # Union types cannot be passed in as arguments in the type system
+ stream=True,
+ stream_cls=Stream[PromptStreamAnswersV2Response],
)
@@ -402,7 +408,7 @@ async def answers_v2(
`citations`, `search_queries`, `analysis_types`, `sentiment_claims`. Omit for
all of them.
- limit: Page size; default 10, max 50.
+ limit: Page size; default 10, max 200.
max_results: Stream endpoint only: cap the number of streamed rows (default: all).
@@ -474,7 +480,7 @@ async def stream_answers_v2(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
+ ) -> AsyncStream[PromptStreamAnswersV2Response]:
"""
Stream Answers V2
@@ -490,7 +496,7 @@ async def stream_answers_v2(
`citations`, `search_queries`, `analysis_types`, `sentiment_claims`. Omit for
all of them.
- limit: Page size; default 10, max 50.
+ limit: Page size; default 10, max 200.
max_results: Stream endpoint only: cap the number of streamed rows (default: all).
@@ -502,7 +508,7 @@ async def stream_answers_v2(
timeout: Override the client-level default timeout for this request, in seconds
"""
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
return await self._post(
"/v2/prompts/answers/stream",
body=await async_maybe_transform(
@@ -521,7 +527,11 @@ async def stream_answers_v2(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=NoneType,
+ cast_to=cast(
+ Any, PromptStreamAnswersV2Response
+ ), # Union types cannot be passed in as arguments in the type system
+ stream=True,
+ stream_cls=AsyncStream[PromptStreamAnswersV2Response],
)
diff --git a/src/profound/resources/reports/factcheck/claims.py b/src/profound/resources/reports/factcheck/claims.py
index 3aac8630..e591f5d9 100644
--- a/src/profound/resources/reports/factcheck/claims.py
+++ b/src/profound/resources/reports/factcheck/claims.py
@@ -2,12 +2,12 @@
from __future__ import annotations
-from typing import List, Optional
+from typing import Any, List, Optional, cast
from typing_extensions import Literal
import httpx
-from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
+from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@@ -17,9 +17,11 @@
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
+from ...._streaming import Stream, AsyncStream
from ...._base_client import make_request_options
from ....types.reports.factcheck import claim_query_claims_params, claim_stream_claims_params
from ....types.reports.factcheck.claim_query_claims_response import ClaimQueryClaimsResponse
+from ....types.reports.factcheck.claim_stream_claims_response import ClaimStreamClaimsResponse
__all__ = ["ClaimsResource", "AsyncClaimsResource"]
@@ -130,7 +132,7 @@ def stream_claims(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
+ ) -> Stream[ClaimStreamClaimsResponse]:
"""
Stream Claims
@@ -158,7 +160,7 @@ def stream_claims(
timeout: Override the client-level default timeout for this request, in seconds
"""
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
return self._post(
"/v2/reports/factcheck/claims/stream",
body=maybe_transform(
@@ -178,7 +180,11 @@ def stream_claims(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=NoneType,
+ cast_to=cast(
+ Any, ClaimStreamClaimsResponse
+ ), # Union types cannot be passed in as arguments in the type system
+ stream=True,
+ stream_cls=Stream[ClaimStreamClaimsResponse],
)
@@ -288,7 +294,7 @@ async def stream_claims(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
+ ) -> AsyncStream[ClaimStreamClaimsResponse]:
"""
Stream Claims
@@ -316,7 +322,7 @@ async def stream_claims(
timeout: Override the client-level default timeout for this request, in seconds
"""
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
return await self._post(
"/v2/reports/factcheck/claims/stream",
body=await async_maybe_transform(
@@ -336,7 +342,11 @@ async def stream_claims(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=NoneType,
+ cast_to=cast(
+ Any, ClaimStreamClaimsResponse
+ ), # Union types cannot be passed in as arguments in the type system
+ stream=True,
+ stream_cls=AsyncStream[ClaimStreamClaimsResponse],
)
diff --git a/src/profound/resources/reports/factcheck/factcheck.py b/src/profound/resources/reports/factcheck/factcheck.py
index 48ab187a..b748ca0f 100644
--- a/src/profound/resources/reports/factcheck/factcheck.py
+++ b/src/profound/resources/reports/factcheck/factcheck.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import List, Optional
+from typing import Any, List, Optional, cast
from typing_extensions import Literal
import httpx
@@ -15,7 +15,7 @@
ClaimsResourceWithStreamingResponse,
AsyncClaimsResourceWithStreamingResponse,
)
-from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
+from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@@ -25,9 +25,11 @@
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
+from ...._streaming import Stream, AsyncStream
from ...._base_client import make_request_options
from ....types.reports import factcheck_query_scores_params, factcheck_stream_scores_params
from ....types.reports.factcheck_query_scores_response import FactcheckQueryScoresResponse
+from ....types.reports.factcheck_stream_scores_response import FactcheckStreamScoresResponse
__all__ = ["FactcheckResource", "AsyncFactcheckResource"]
@@ -139,7 +141,7 @@ def stream_scores(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
+ ) -> Stream[FactcheckStreamScoresResponse]:
"""
Stream Scores
@@ -165,7 +167,7 @@ def stream_scores(
timeout: Override the client-level default timeout for this request, in seconds
"""
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
return self._post(
"/v2/reports/factcheck/stream",
body=maybe_transform(
@@ -184,7 +186,11 @@ def stream_scores(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=NoneType,
+ cast_to=cast(
+ Any, FactcheckStreamScoresResponse
+ ), # Union types cannot be passed in as arguments in the type system
+ stream=True,
+ stream_cls=Stream[FactcheckStreamScoresResponse],
)
@@ -295,7 +301,7 @@ async def stream_scores(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
+ ) -> AsyncStream[FactcheckStreamScoresResponse]:
"""
Stream Scores
@@ -321,7 +327,7 @@ async def stream_scores(
timeout: Override the client-level default timeout for this request, in seconds
"""
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
return await self._post(
"/v2/reports/factcheck/stream",
body=await async_maybe_transform(
@@ -340,7 +346,11 @@ async def stream_scores(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=NoneType,
+ cast_to=cast(
+ Any, FactcheckStreamScoresResponse
+ ), # Union types cannot be passed in as arguments in the type system
+ stream=True,
+ stream_cls=AsyncStream[FactcheckStreamScoresResponse],
)
diff --git a/src/profound/resources/reports/reports.py b/src/profound/resources/reports/reports.py
index 685c9a37..8fa84fd5 100644
--- a/src/profound/resources/reports/reports.py
+++ b/src/profound/resources/reports/reports.py
@@ -30,7 +30,7 @@
report_stream_visibility_v2_params,
report_get_referrals_report_v2_params,
)
-from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
+from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from .accuracy import (
AccuracyResource,
@@ -85,6 +85,10 @@
from ...types.report_stream_sentiment_response import ReportStreamSentimentResponse
from ...types.report_stream_visibility_response import ReportStreamVisibilityResponse
from ...types.report_query_query_fanouts_response import ReportQueryQueryFanoutsResponse
+from ...types.report_stream_citations_v2_response import ReportStreamCitationsV2Response
+from ...types.report_stream_sentiment_v2_response import ReportStreamSentimentV2Response
+from ...types.report_stream_query_fanouts_response import ReportStreamQueryFanoutsResponse
+from ...types.report_stream_visibility_v2_response import ReportStreamVisibilityV2Response
__all__ = ["ReportsResource", "AsyncReportsResource"]
@@ -323,16 +327,18 @@ def get_bots_report_v2(
self,
*,
domain: str,
- metrics: List[Literal["count", "citations", "indexing", "training", "last_visit"]],
+ metrics: List[Literal["count", "citations", "indexing", "training", "last_visit", "agents"]],
start_date: Union[str, datetime],
date_interval: Literal["hour", "day", "week", "month", "quarter", "year", "relative_week"] | Omit = omit,
dimensions: List[Literal["date", "hour", "path", "bot_name", "bot_provider", "bot_type"]] | Omit = omit,
+ domain_id: Optional[str] | Omit = omit,
end_date: Union[str, datetime] | Omit = omit,
filters: Iterable[report_get_bots_report_v2_params.Filter] | Omit = omit,
metric_filters: Iterable[report_get_bots_report_v2_params.MetricFilter] | Omit = omit,
order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
organization_id: Optional[str] | Omit = omit,
pagination: Pagination | Omit = omit,
+ tags: SequenceNotStr[str] | Omit = omit,
# 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,
@@ -368,6 +374,8 @@ def get_bots_report_v2(
dimensions: Dimensions to group the report by.
+ domain_id: Domain UUID used for tag lookups.
+
end_date: End date in UTC. Accepts same formats as start_date. Defaults to now UTC if
omitted.
@@ -405,12 +413,14 @@ def get_bots_report_v2(
"start_date": start_date,
"date_interval": date_interval,
"dimensions": dimensions,
+ "domain_id": domain_id,
"end_date": end_date,
"filters": filters,
"metric_filters": metric_filters,
"order_by": order_by,
"organization_id": organization_id,
"pagination": pagination,
+ "tags": tags,
},
report_get_bots_report_v2_params.ReportGetBotsReportV2Params,
),
@@ -606,6 +616,7 @@ def query_citations(
end_date: str,
start_date: str,
cursor: Optional[str] | Omit = omit,
+ entity: Literal["domain", "page", "citation_category"] | Omit = omit,
filter: Optional[report_query_citations_params.Filter] | Omit = omit,
group_by: List[Literal["page", "date", "model", "topic", "region", "persona", "prompt"]] | Omit = omit,
interval: Literal["day", "week", "month"] | Omit = omit,
@@ -628,14 +639,20 @@ def query_citations(
start_date: YYYY-MM-DD, ET, inclusive
+ entity: What each row represents: `domain` (default), `page`, or `citation_category`.
+ Legacy: `group_by: ["page"]` (with `entity` omitted) is still accepted and is
+ equivalent to `entity: "page"`. `citation_category` uses the dashboard split
+ view: a citation counts under both its page-level and domain-level category, so
+ category shares can sum to more than 100%.
+
filter: A leaf (`field`/`op`/`value`) or an `and`/`or`/`not` group.
limit: Page size; default 10, max 50.
max_results: Stream endpoint only: cap the number of streamed rows (default: all).
- scope: `all` (every cited domain) or `owned` (only your owned domains, for easy
- client-side totals).
+ scope: `all` (every cited domain) or `owned` (only your owned domains). Applies to
+ `entity=domain`.
extra_headers: Send extra headers
@@ -653,6 +670,7 @@ def query_citations(
"end_date": end_date,
"start_date": start_date,
"cursor": cursor,
+ "entity": entity,
"filter": filter,
"group_by": group_by,
"interval": interval,
@@ -1258,6 +1276,7 @@ def stream_citations_v2(
end_date: str,
start_date: str,
cursor: Optional[str] | Omit = omit,
+ entity: Literal["domain", "page", "citation_category"] | Omit = omit,
filter: Optional[report_stream_citations_v2_params.Filter] | Omit = omit,
group_by: List[Literal["page", "date", "model", "topic", "region", "persona", "prompt"]] | Omit = omit,
interval: Literal["day", "week", "month"] | Omit = omit,
@@ -1271,7 +1290,7 @@ def stream_citations_v2(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
+ ) -> Stream[ReportStreamCitationsV2Response]:
"""
Stream Citations V2
@@ -1280,14 +1299,20 @@ def stream_citations_v2(
start_date: YYYY-MM-DD, ET, inclusive
+ entity: What each row represents: `domain` (default), `page`, or `citation_category`.
+ Legacy: `group_by: ["page"]` (with `entity` omitted) is still accepted and is
+ equivalent to `entity: "page"`. `citation_category` uses the dashboard split
+ view: a citation counts under both its page-level and domain-level category, so
+ category shares can sum to more than 100%.
+
filter: A leaf (`field`/`op`/`value`) or an `and`/`or`/`not` group.
limit: Page size; default 10, max 50.
max_results: Stream endpoint only: cap the number of streamed rows (default: all).
- scope: `all` (every cited domain) or `owned` (only your owned domains, for easy
- client-side totals).
+ scope: `all` (every cited domain) or `owned` (only your owned domains). Applies to
+ `entity=domain`.
extra_headers: Send extra headers
@@ -1297,7 +1322,7 @@ def stream_citations_v2(
timeout: Override the client-level default timeout for this request, in seconds
"""
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
return self._post(
"/v2/reports/citations/stream",
body=maybe_transform(
@@ -1306,6 +1331,7 @@ def stream_citations_v2(
"end_date": end_date,
"start_date": start_date,
"cursor": cursor,
+ "entity": entity,
"filter": filter,
"group_by": group_by,
"interval": interval,
@@ -1319,7 +1345,11 @@ def stream_citations_v2(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=NoneType,
+ cast_to=cast(
+ Any, ReportStreamCitationsV2Response
+ ), # Union types cannot be passed in as arguments in the type system
+ stream=True,
+ stream_cls=Stream[ReportStreamCitationsV2Response],
)
def stream_query_fanouts(
@@ -1343,7 +1373,7 @@ def stream_query_fanouts(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
+ ) -> Stream[ReportStreamQueryFanoutsResponse]:
"""
Stream Query Fanouts V2
@@ -1366,7 +1396,7 @@ def stream_query_fanouts(
timeout: Override the client-level default timeout for this request, in seconds
"""
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
return self._post(
"/v2/reports/query-fanouts/stream",
body=maybe_transform(
@@ -1388,7 +1418,11 @@ def stream_query_fanouts(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=NoneType,
+ cast_to=cast(
+ Any, ReportStreamQueryFanoutsResponse
+ ), # Union types cannot be passed in as arguments in the type system
+ stream=True,
+ stream_cls=Stream[ReportStreamQueryFanoutsResponse],
)
def stream_sentiment(
@@ -1521,7 +1555,7 @@ def stream_sentiment_v2(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
+ ) -> Stream[ReportStreamSentimentV2Response]:
"""
Stream Sentiment V2
@@ -1552,7 +1586,7 @@ def stream_sentiment_v2(
timeout: Override the client-level default timeout for this request, in seconds
"""
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
return self._post(
"/v2/reports/sentiment/stream",
body=maybe_transform(
@@ -1578,7 +1612,11 @@ def stream_sentiment_v2(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=NoneType,
+ cast_to=cast(
+ Any, ReportStreamSentimentV2Response
+ ), # Union types cannot be passed in as arguments in the type system
+ stream=True,
+ stream_cls=Stream[ReportStreamSentimentV2Response],
)
def stream_visibility(
@@ -1704,7 +1742,7 @@ def stream_visibility_v2(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
+ ) -> Stream[ReportStreamVisibilityV2Response]:
"""
Stream Visibility V2
@@ -1729,7 +1767,7 @@ def stream_visibility_v2(
timeout: Override the client-level default timeout for this request, in seconds
"""
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
return self._post(
"/v2/reports/visibility/stream",
body=maybe_transform(
@@ -1753,7 +1791,11 @@ def stream_visibility_v2(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=NoneType,
+ cast_to=cast(
+ Any, ReportStreamVisibilityV2Response
+ ), # Union types cannot be passed in as arguments in the type system
+ stream=True,
+ stream_cls=Stream[ReportStreamVisibilityV2Response],
)
def visibility(
@@ -2087,16 +2129,18 @@ async def get_bots_report_v2(
self,
*,
domain: str,
- metrics: List[Literal["count", "citations", "indexing", "training", "last_visit"]],
+ metrics: List[Literal["count", "citations", "indexing", "training", "last_visit", "agents"]],
start_date: Union[str, datetime],
date_interval: Literal["hour", "day", "week", "month", "quarter", "year", "relative_week"] | Omit = omit,
dimensions: List[Literal["date", "hour", "path", "bot_name", "bot_provider", "bot_type"]] | Omit = omit,
+ domain_id: Optional[str] | Omit = omit,
end_date: Union[str, datetime] | Omit = omit,
filters: Iterable[report_get_bots_report_v2_params.Filter] | Omit = omit,
metric_filters: Iterable[report_get_bots_report_v2_params.MetricFilter] | Omit = omit,
order_by: Dict[str, Literal["asc", "desc"]] | Omit = omit,
organization_id: Optional[str] | Omit = omit,
pagination: Pagination | Omit = omit,
+ tags: SequenceNotStr[str] | Omit = omit,
# 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,
@@ -2132,6 +2176,8 @@ async def get_bots_report_v2(
dimensions: Dimensions to group the report by.
+ domain_id: Domain UUID used for tag lookups.
+
end_date: End date in UTC. Accepts same formats as start_date. Defaults to now UTC if
omitted.
@@ -2169,12 +2215,14 @@ async def get_bots_report_v2(
"start_date": start_date,
"date_interval": date_interval,
"dimensions": dimensions,
+ "domain_id": domain_id,
"end_date": end_date,
"filters": filters,
"metric_filters": metric_filters,
"order_by": order_by,
"organization_id": organization_id,
"pagination": pagination,
+ "tags": tags,
},
report_get_bots_report_v2_params.ReportGetBotsReportV2Params,
),
@@ -2370,6 +2418,7 @@ async def query_citations(
end_date: str,
start_date: str,
cursor: Optional[str] | Omit = omit,
+ entity: Literal["domain", "page", "citation_category"] | Omit = omit,
filter: Optional[report_query_citations_params.Filter] | Omit = omit,
group_by: List[Literal["page", "date", "model", "topic", "region", "persona", "prompt"]] | Omit = omit,
interval: Literal["day", "week", "month"] | Omit = omit,
@@ -2392,14 +2441,20 @@ async def query_citations(
start_date: YYYY-MM-DD, ET, inclusive
+ entity: What each row represents: `domain` (default), `page`, or `citation_category`.
+ Legacy: `group_by: ["page"]` (with `entity` omitted) is still accepted and is
+ equivalent to `entity: "page"`. `citation_category` uses the dashboard split
+ view: a citation counts under both its page-level and domain-level category, so
+ category shares can sum to more than 100%.
+
filter: A leaf (`field`/`op`/`value`) or an `and`/`or`/`not` group.
limit: Page size; default 10, max 50.
max_results: Stream endpoint only: cap the number of streamed rows (default: all).
- scope: `all` (every cited domain) or `owned` (only your owned domains, for easy
- client-side totals).
+ scope: `all` (every cited domain) or `owned` (only your owned domains). Applies to
+ `entity=domain`.
extra_headers: Send extra headers
@@ -2417,6 +2472,7 @@ async def query_citations(
"end_date": end_date,
"start_date": start_date,
"cursor": cursor,
+ "entity": entity,
"filter": filter,
"group_by": group_by,
"interval": interval,
@@ -3022,6 +3078,7 @@ async def stream_citations_v2(
end_date: str,
start_date: str,
cursor: Optional[str] | Omit = omit,
+ entity: Literal["domain", "page", "citation_category"] | Omit = omit,
filter: Optional[report_stream_citations_v2_params.Filter] | Omit = omit,
group_by: List[Literal["page", "date", "model", "topic", "region", "persona", "prompt"]] | Omit = omit,
interval: Literal["day", "week", "month"] | Omit = omit,
@@ -3035,7 +3092,7 @@ async def stream_citations_v2(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
+ ) -> AsyncStream[ReportStreamCitationsV2Response]:
"""
Stream Citations V2
@@ -3044,14 +3101,20 @@ async def stream_citations_v2(
start_date: YYYY-MM-DD, ET, inclusive
+ entity: What each row represents: `domain` (default), `page`, or `citation_category`.
+ Legacy: `group_by: ["page"]` (with `entity` omitted) is still accepted and is
+ equivalent to `entity: "page"`. `citation_category` uses the dashboard split
+ view: a citation counts under both its page-level and domain-level category, so
+ category shares can sum to more than 100%.
+
filter: A leaf (`field`/`op`/`value`) or an `and`/`or`/`not` group.
limit: Page size; default 10, max 50.
max_results: Stream endpoint only: cap the number of streamed rows (default: all).
- scope: `all` (every cited domain) or `owned` (only your owned domains, for easy
- client-side totals).
+ scope: `all` (every cited domain) or `owned` (only your owned domains). Applies to
+ `entity=domain`.
extra_headers: Send extra headers
@@ -3061,7 +3124,7 @@ async def stream_citations_v2(
timeout: Override the client-level default timeout for this request, in seconds
"""
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
return await self._post(
"/v2/reports/citations/stream",
body=await async_maybe_transform(
@@ -3070,6 +3133,7 @@ async def stream_citations_v2(
"end_date": end_date,
"start_date": start_date,
"cursor": cursor,
+ "entity": entity,
"filter": filter,
"group_by": group_by,
"interval": interval,
@@ -3083,7 +3147,11 @@ async def stream_citations_v2(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=NoneType,
+ cast_to=cast(
+ Any, ReportStreamCitationsV2Response
+ ), # Union types cannot be passed in as arguments in the type system
+ stream=True,
+ stream_cls=AsyncStream[ReportStreamCitationsV2Response],
)
async def stream_query_fanouts(
@@ -3107,7 +3175,7 @@ async def stream_query_fanouts(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
+ ) -> AsyncStream[ReportStreamQueryFanoutsResponse]:
"""
Stream Query Fanouts V2
@@ -3130,7 +3198,7 @@ async def stream_query_fanouts(
timeout: Override the client-level default timeout for this request, in seconds
"""
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
return await self._post(
"/v2/reports/query-fanouts/stream",
body=await async_maybe_transform(
@@ -3152,7 +3220,11 @@ async def stream_query_fanouts(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=NoneType,
+ cast_to=cast(
+ Any, ReportStreamQueryFanoutsResponse
+ ), # Union types cannot be passed in as arguments in the type system
+ stream=True,
+ stream_cls=AsyncStream[ReportStreamQueryFanoutsResponse],
)
async def stream_sentiment(
@@ -3285,7 +3357,7 @@ async def stream_sentiment_v2(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
+ ) -> AsyncStream[ReportStreamSentimentV2Response]:
"""
Stream Sentiment V2
@@ -3316,7 +3388,7 @@ async def stream_sentiment_v2(
timeout: Override the client-level default timeout for this request, in seconds
"""
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
return await self._post(
"/v2/reports/sentiment/stream",
body=await async_maybe_transform(
@@ -3342,7 +3414,11 @@ async def stream_sentiment_v2(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=NoneType,
+ cast_to=cast(
+ Any, ReportStreamSentimentV2Response
+ ), # Union types cannot be passed in as arguments in the type system
+ stream=True,
+ stream_cls=AsyncStream[ReportStreamSentimentV2Response],
)
async def stream_visibility(
@@ -3468,7 +3544,7 @@ async def stream_visibility_v2(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
+ ) -> AsyncStream[ReportStreamVisibilityV2Response]:
"""
Stream Visibility V2
@@ -3493,7 +3569,7 @@ async def stream_visibility_v2(
timeout: Override the client-level default timeout for this request, in seconds
"""
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ extra_headers = {"Accept": "text/event-stream", **(extra_headers or {})}
return await self._post(
"/v2/reports/visibility/stream",
body=await async_maybe_transform(
@@ -3517,7 +3593,11 @@ async def stream_visibility_v2(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=NoneType,
+ cast_to=cast(
+ Any, ReportStreamVisibilityV2Response
+ ), # Union types cannot be passed in as arguments in the type system
+ stream=True,
+ stream_cls=AsyncStream[ReportStreamVisibilityV2Response],
)
async def visibility(
diff --git a/src/profound/resources/reports/shopping.py b/src/profound/resources/reports/shopping.py
index fcb60e87..60b4371c 100644
--- a/src/profound/resources/reports/shopping.py
+++ b/src/profound/resources/reports/shopping.py
@@ -260,6 +260,7 @@ def item_visibility(
dimensions: List[
Literal[
"period",
+ "product_key",
"product_name",
"brand_name",
"date",
@@ -1129,6 +1130,7 @@ async def item_visibility(
dimensions: List[
Literal[
"period",
+ "product_key",
"product_name",
"brand_name",
"date",
diff --git a/src/profound/types/__init__.py b/src/profound/types/__init__.py
index 59a43853..b071faa7 100644
--- a/src/profound/types/__init__.py
+++ b/src/profound/types/__init__.py
@@ -97,6 +97,7 @@
from .report_stream_citations_response import ReportStreamCitationsResponse as ReportStreamCitationsResponse
from .report_stream_sentiment_response import ReportStreamSentimentResponse as ReportStreamSentimentResponse
from .organization_list_assets_response import OrganizationListAssetsResponse as OrganizationListAssetsResponse
+from .prompt_stream_answers_v2_response import PromptStreamAnswersV2Response as PromptStreamAnswersV2Response
from .report_query_query_fanouts_params import ReportQueryQueryFanoutsParams as ReportQueryQueryFanoutsParams
from .report_stream_citations_v2_params import ReportStreamCitationsV2Params as ReportStreamCitationsV2Params
from .report_stream_sentiment_v2_params import ReportStreamSentimentV2Params as ReportStreamSentimentV2Params
@@ -106,4 +107,8 @@
from .report_stream_query_fanouts_params import ReportStreamQueryFanoutsParams as ReportStreamQueryFanoutsParams
from .report_stream_visibility_v2_params import ReportStreamVisibilityV2Params as ReportStreamVisibilityV2Params
from .report_query_query_fanouts_response import ReportQueryQueryFanoutsResponse as ReportQueryQueryFanoutsResponse
+from .report_stream_citations_v2_response import ReportStreamCitationsV2Response as ReportStreamCitationsV2Response
+from .report_stream_sentiment_v2_response import ReportStreamSentimentV2Response as ReportStreamSentimentV2Response
+from .report_stream_query_fanouts_response import ReportStreamQueryFanoutsResponse as ReportStreamQueryFanoutsResponse
+from .report_stream_visibility_v2_response import ReportStreamVisibilityV2Response as ReportStreamVisibilityV2Response
from .report_get_referrals_report_v2_params import ReportGetReferralsReportV2Params as ReportGetReferralsReportV2Params
diff --git a/src/profound/types/agents/__init__.py b/src/profound/types/agents/__init__.py
index 7aa0369e..34ea2ed6 100644
--- a/src/profound/types/agents/__init__.py
+++ b/src/profound/types/agents/__init__.py
@@ -4,6 +4,7 @@
from .run_create_params import RunCreateParams as RunCreateParams
from .run_create_response import RunCreateResponse as RunCreateResponse
+from .run_retrieve_params import RunRetrieveParams as RunRetrieveParams
from .run_retrieve_response import RunRetrieveResponse as RunRetrieveResponse
from .node_type_list_response import NodeTypeListResponse as NodeTypeListResponse
from .node_type_retrieve_schema_response import NodeTypeRetrieveSchemaResponse as NodeTypeRetrieveSchemaResponse
diff --git a/src/profound/types/agents/node_type_retrieve_schema_response.py b/src/profound/types/agents/node_type_retrieve_schema_response.py
index 9d9ad1ae..cc85b6d9 100644
--- a/src/profound/types/agents/node_type_retrieve_schema_response.py
+++ b/src/profound/types/agents/node_type_retrieve_schema_response.py
@@ -10,7 +10,7 @@
class NodeTypeRetrieveSchemaResponse(BaseModel):
- """JSON schema and worked examples for a single node type."""
+ """JSON schema for a single node type."""
node_type: str
"""Stable identifier for the node type, e.g. `llm`."""
@@ -53,10 +53,9 @@ class NodeTypeRetrieveSchemaResponse(BaseModel):
examples: Optional[List[Dict[str, object]]] = None
"""Worked example configurations for the node type, in the canonical graph dialect.
- These are curated guidance maintained by external-api, versioned by
- `docs_version` (NOT `schema_version`): they illustrate a valid shape at curation
- time but are a starting point, not the contract — they may lag the validator.
- The authoritative contract is `schema`, and the only authoritative check that a
- graph is valid is publishing it (or the agent-validation endpoint). Do not parse
- `examples` as the schema.
+ Curated authoring guidance, versioned by `docs_version` (NOT `schema_version`):
+ they illustrate a valid shape at curation time but are a starting point, not the
+ contract — they may lag the validator. The authoritative contract is `schema`,
+ and the only authoritative check that a graph is valid is publishing it (or the
+ agent-validation endpoint). Do not parse `examples` as the schema.
"""
diff --git a/src/profound/types/agents/run_retrieve_params.py b/src/profound/types/agents/run_retrieve_params.py
new file mode 100644
index 00000000..2a6c9179
--- /dev/null
+++ b/src/profound/types/agents/run_retrieve_params.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["RunRetrieveParams"]
+
+
+class RunRetrieveParams(TypedDict, total=False):
+ agent_id: Required[str]
+ """The ID of the agent that owns the run."""
+
+ verbose: bool
+ """Include each step's raw `outputs` payload in the execution trace."""
diff --git a/src/profound/types/agents/run_retrieve_response.py b/src/profound/types/agents/run_retrieve_response.py
index 8f0d258e..915c7aec 100644
--- a/src/profound/types/agents/run_retrieve_response.py
+++ b/src/profound/types/agents/run_retrieve_response.py
@@ -1,12 +1,47 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, Optional
+from typing import Dict, List, Optional
from datetime import datetime
from typing_extensions import Literal
from ..._models import BaseModel
-__all__ = ["RunRetrieveResponse"]
+__all__ = ["RunRetrieveResponse", "Step"]
+
+
+class Step(BaseModel):
+ """One executed node in a run's step trace, in execution order.
+
+ The lightweight fields always ship; ``outputs`` is populated only when the
+ run-retrieve request asks for ``verbose``.
+ """
+
+ node_id: str
+ """ID of the node that ran, within its agent graph."""
+
+ node_type: str
+ """Kind of node, e.g. "profound_visibility", "llm", "conditional"."""
+
+ status: str
+ """Terminal status of this node execution."""
+
+ title: str
+ """Human-readable title of the node."""
+
+ elapsed_time: Optional[float] = None
+ """Wall-clock seconds the node took, if recorded."""
+
+ error_message: Optional[str] = None
+ """Failure detail for this node, when it failed."""
+
+ finished_at: Optional[datetime] = None
+ """When the node finished, if it has."""
+
+ outputs: Optional[Dict[str, object]] = None
+ """Raw output payload this node produced.
+
+ Included only when the request asks for `verbose`.
+ """
class RunRetrieveResponse(BaseModel):
@@ -36,3 +71,10 @@ class RunRetrieveResponse(BaseModel):
started_at: Optional[datetime] = None
"""When the run started, if it has started."""
+
+ steps: Optional[List[Step]] = None
+ """
+ Ordered step-by-step execution trace — one entry per node that ran, in execution
+ order. Always present once the run has executed a node; per-node `outputs`
+ inside each step are included only when the request asks for `verbose`.
+ """
diff --git a/src/profound/types/category.py b/src/profound/types/category.py
index a2d7566c..becc978e 100644
--- a/src/profound/types/category.py
+++ b/src/profound/types/category.py
@@ -1,5 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+from typing import Optional
+
from .._models import BaseModel
__all__ = ["Category"]
@@ -9,3 +11,5 @@ class Category(BaseModel):
id: str
name: str
+
+ internal_name: Optional[str] = None
diff --git a/src/profound/types/organizations/category_list_response.py b/src/profound/types/organizations/category_list_response.py
index 3135cff2..61ed8ac0 100644
--- a/src/profound/types/organizations/category_list_response.py
+++ b/src/profound/types/organizations/category_list_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List
+from typing import List, Optional
from typing_extensions import TypeAlias
from ..._models import BaseModel
@@ -18,5 +18,7 @@ class CategoryListResponseItem(BaseModel):
organization: Organization
+ internal_name: Optional[str] = None
+
CategoryListResponse: TypeAlias = List[CategoryListResponseItem]
diff --git a/src/profound/types/organizations/category_prompts_params.py b/src/profound/types/organizations/category_prompts_params.py
index 19cc5952..d463ebf2 100644
--- a/src/profound/types/organizations/category_prompts_params.py
+++ b/src/profound/types/organizations/category_prompts_params.py
@@ -20,8 +20,11 @@ class CategoryPromptsParams(TypedDict, total=False):
limit: int
"""Maximum number of prompts to return."""
+ order_by: Literal["created_at", "prompt"]
+ """Field used to order prompts."""
+
order_dir: Literal["asc", "desc"]
- """Sort direction by creation date."""
+ """Sort direction for the selected order field."""
persona_id: SequenceNotStr[str]
"""Filter by persona IDs."""
diff --git a/src/profound/types/prompt_answers_v2_params.py b/src/profound/types/prompt_answers_v2_params.py
index 92005401..4700da28 100644
--- a/src/profound/types/prompt_answers_v2_params.py
+++ b/src/profound/types/prompt_answers_v2_params.py
@@ -52,7 +52,7 @@ class PromptAnswersV2Params(TypedDict, total=False):
"""
limit: Optional[int]
- """Page size; default 10, max 50."""
+ """Page size; default 10, max 200."""
max_results: Optional[int]
"""Stream endpoint only: cap the number of streamed rows (default: all)."""
diff --git a/src/profound/types/prompt_answers_v2_response.py b/src/profound/types/prompt_answers_v2_response.py
index 270f72b4..b8712765 100644
--- a/src/profound/types/prompt_answers_v2_response.py
+++ b/src/profound/types/prompt_answers_v2_response.py
@@ -1,8 +1,118 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict
-from typing_extensions import TypeAlias
+from typing import TYPE_CHECKING, Dict, List, Optional
-__all__ = ["PromptAnswersV2Response"]
+from pydantic import Field as FieldInfo
-PromptAnswersV2Response: TypeAlias = Dict[str, object]
+from .._models import BaseModel
+
+__all__ = ["PromptAnswersV2Response", "Data", "DataModel", "Info"]
+
+
+class DataModel(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class Data(BaseModel):
+ """One answer row.
+
+ Present fields depend on `include`; `model` is an `{id, name}` reference.
+ """
+
+ analysis_types: Optional[List[str]] = None
+
+ citations: Optional[List[str]] = None
+
+ date: Optional[str] = None
+
+ mentions: Optional[List[str]] = None
+
+ model: Optional[DataModel] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ persona: Optional[str] = None
+
+ prompt: Optional[str] = None
+
+ prompt_id: Optional[str] = None
+
+ region: Optional[str] = None
+
+ response: Optional[str] = None
+
+ run_id: Optional[str] = None
+
+ search_queries: Optional[List[str]] = None
+
+ sentiment_claims: Optional[List[Dict[str, object]]] = None
+
+ tags: Optional[List[str]] = None
+
+ topic: Optional[str] = None
+
+ topic_id: Optional[str] = None
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class Info(BaseModel):
+ count: int
+ """Number of rows returned in `data` for this page."""
+
+ end_date: str
+ """Echoed request end date (YYYY-MM-DD, ET)."""
+
+ include: List[str]
+ """Row fields returned (echoes `include`, or all fields when omitted)."""
+
+ models: List[str]
+ """Display names of the models the report covers."""
+
+ start_date: str
+ """Echoed request start date (YYYY-MM-DD, ET)."""
+
+ filter: Optional[Dict[str, object]] = None
+ """Echoed normalized filter tree, or null when no filter was sent."""
+
+ next_cursor: Optional[str] = None
+ """Opaque cursor for the next page; null on the last page."""
+
+ total_results: Optional[int] = None
+ """Total rows matching the query before pagination (null when not computed)."""
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class PromptAnswersV2Response(BaseModel):
+ data: List[Data]
+
+ info: Info
diff --git a/src/profound/types/prompt_stream_answers_v2_params.py b/src/profound/types/prompt_stream_answers_v2_params.py
index fd810415..10a7a2cb 100644
--- a/src/profound/types/prompt_stream_answers_v2_params.py
+++ b/src/profound/types/prompt_stream_answers_v2_params.py
@@ -52,7 +52,7 @@ class PromptStreamAnswersV2Params(TypedDict, total=False):
"""
limit: Optional[int]
- """Page size; default 10, max 50."""
+ """Page size; default 10, max 200."""
max_results: Optional[int]
"""Stream endpoint only: cap the number of streamed rows (default: all)."""
diff --git a/src/profound/types/prompt_stream_answers_v2_response.py b/src/profound/types/prompt_stream_answers_v2_response.py
new file mode 100644
index 00000000..6b19e3d2
--- /dev/null
+++ b/src/profound/types/prompt_stream_answers_v2_response.py
@@ -0,0 +1,115 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import TYPE_CHECKING, Dict, List, Union, Optional
+from typing_extensions import TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from .._models import BaseModel
+
+__all__ = ["PromptStreamAnswersV2Response", "AnswersV2Info", "AnswerRow", "AnswerRowModel"]
+
+
+class AnswersV2Info(BaseModel):
+ """`summary` event payload (the report `info` block)."""
+
+ count: int
+ """Number of rows returned in `data` for this page."""
+
+ end_date: str
+ """Echoed request end date (YYYY-MM-DD, ET)."""
+
+ include: List[str]
+ """Row fields returned (echoes `include`, or all fields when omitted)."""
+
+ models: List[str]
+ """Display names of the models the report covers."""
+
+ start_date: str
+ """Echoed request start date (YYYY-MM-DD, ET)."""
+
+ filter: Optional[Dict[str, object]] = None
+ """Echoed normalized filter tree, or null when no filter was sent."""
+
+ next_cursor: Optional[str] = None
+ """Opaque cursor for the next page; null on the last page."""
+
+ total_results: Optional[int] = None
+ """Total rows matching the query before pagination (null when not computed)."""
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class AnswerRowModel(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class AnswerRow(BaseModel):
+ """`result` event payload — one answer row."""
+
+ analysis_types: Optional[List[str]] = None
+
+ citations: Optional[List[str]] = None
+
+ date: Optional[str] = None
+
+ mentions: Optional[List[str]] = None
+
+ model: Optional[AnswerRowModel] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ persona: Optional[str] = None
+
+ prompt: Optional[str] = None
+
+ prompt_id: Optional[str] = None
+
+ region: Optional[str] = None
+
+ response: Optional[str] = None
+
+ run_id: Optional[str] = None
+
+ search_queries: Optional[List[str]] = None
+
+ sentiment_claims: Optional[List[Dict[str, object]]] = None
+
+ tags: Optional[List[str]] = None
+
+ topic: Optional[str] = None
+
+ topic_id: Optional[str] = None
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+PromptStreamAnswersV2Response: TypeAlias = Union[AnswersV2Info, AnswerRow]
diff --git a/src/profound/types/report_get_bots_report_v2_params.py b/src/profound/types/report_get_bots_report_v2_params.py
index 4279dbd6..ae7e3870 100644
--- a/src/profound/types/report_get_bots_report_v2_params.py
+++ b/src/profound/types/report_get_bots_report_v2_params.py
@@ -6,6 +6,7 @@
from datetime import datetime
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
+from .._types import SequenceNotStr
from .._utils import PropertyInfo
from .shared_params.pagination import Pagination
from .shared_params.path_filter import PathFilter
@@ -19,7 +20,7 @@ class ReportGetBotsReportV2Params(TypedDict, total=False):
domain: Required[str]
"""Domain to query logs for."""
- metrics: Required[List[Literal["count", "citations", "indexing", "training", "last_visit"]]]
+ metrics: Required[List[Literal["count", "citations", "indexing", "training", "last_visit", "agents"]]]
start_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
"""Start date for logs.
@@ -34,6 +35,9 @@ class ReportGetBotsReportV2Params(TypedDict, total=False):
dimensions: List[Literal["date", "hour", "path", "bot_name", "bot_provider", "bot_type"]]
"""Dimensions to group the report by."""
+ domain_id: Optional[str]
+ """Domain UUID used for tag lookups."""
+
end_date: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
"""End date in UTC.
@@ -64,6 +68,8 @@ class ReportGetBotsReportV2Params(TypedDict, total=False):
pagination: Pagination
"""Pagination settings for the report results."""
+ tags: SequenceNotStr[str]
+
class FilterBotTypeFilter(TypedDict, total=False):
"""Filter by bot_type column (v2 hourly table only)"""
diff --git a/src/profound/types/report_query_citations_params.py b/src/profound/types/report_query_citations_params.py
index 4441e22a..778fdf1f 100644
--- a/src/profound/types/report_query_citations_params.py
+++ b/src/profound/types/report_query_citations_params.py
@@ -19,6 +19,15 @@ class ReportQueryCitationsParams(TypedDict, total=False):
cursor: Optional[str]
+ entity: Literal["domain", "page", "citation_category"]
+ """What each row represents: `domain` (default), `page`, or `citation_category`.
+
+ Legacy: `group_by: ["page"]` (with `entity` omitted) is still accepted and is
+ equivalent to `entity: "page"`. `citation_category` uses the dashboard split
+ view: a citation counts under both its page-level and domain-level category, so
+ category shares can sum to more than 100%.
+ """
+
filter: Optional[Filter]
"""A leaf (`field`/`op`/`value`) or an `and`/`or`/`not` group."""
@@ -35,9 +44,9 @@ class ReportQueryCitationsParams(TypedDict, total=False):
metrics: Optional[List[Literal["count", "citation_share", "rank", "first_cited_at"]]]
scope: Literal["all", "owned"]
- """
- `all` (every cited domain) or `owned` (only your owned domains, for easy
- client-side totals).
+ """`all` (every cited domain) or `owned` (only your owned domains).
+
+ Applies to `entity=domain`.
"""
diff --git a/src/profound/types/report_query_citations_response.py b/src/profound/types/report_query_citations_response.py
index 9eab76aa..6827ccf0 100644
--- a/src/profound/types/report_query_citations_response.py
+++ b/src/profound/types/report_query_citations_response.py
@@ -1,8 +1,182 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict
-from typing_extensions import TypeAlias
+from typing import TYPE_CHECKING, Dict, List, Optional
-__all__ = ["ReportQueryCitationsResponse"]
+from pydantic import Field as FieldInfo
-ReportQueryCitationsResponse: TypeAlias = Dict[str, object]
+from .._models import BaseModel
+
+__all__ = [
+ "ReportQueryCitationsResponse",
+ "Data",
+ "DataModel",
+ "DataPersona",
+ "DataPrompt",
+ "DataRegion",
+ "DataTopic",
+ "Info",
+]
+
+
+class DataModel(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataPersona(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataPrompt(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataRegion(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataTopic(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class Data(BaseModel):
+ """One (source x group) row.
+
+ Each row carries `domain` or `page`; group dims/metrics vary.
+ """
+
+ citation_share: Optional[float] = None
+
+ count: Optional[int] = None
+
+ date: Optional[str] = None
+
+ domain: Optional[str] = None
+
+ first_cited_at: Optional[str] = None
+ """Pages only."""
+
+ model: Optional[DataModel] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ page: Optional[str] = None
+
+ persona: Optional[DataPersona] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ prompt: Optional[DataPrompt] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ rank: Optional[int] = None
+
+ region: Optional[DataRegion] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ topic: Optional[DataTopic] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class Info(BaseModel):
+ analysis_types: List[str]
+ """Analysis types the citations were drawn from."""
+
+ count: int
+ """Number of rows returned in `data` for this page."""
+
+ end_date: str
+ """Echoed request end date (YYYY-MM-DD, ET)."""
+
+ metrics: List[str]
+ """Metrics returned per row."""
+
+ models: List[str]
+ """Display names of the models the report covers."""
+
+ scope: str
+ """Citation scope: `all` or `owned`."""
+
+ start_date: str
+ """Echoed request start date (YYYY-MM-DD, ET)."""
+
+ filter: Optional[Dict[str, object]] = None
+ """Echoed normalized filter tree, or null when no filter was sent."""
+
+ next_cursor: Optional[str] = None
+ """Opaque cursor for the next page; null on the last page."""
+
+ total_results: Optional[int] = None
+ """Total rows matching the query before pagination (null when not computed)."""
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class ReportQueryCitationsResponse(BaseModel):
+ data: List[Data]
+
+ info: Info
diff --git a/src/profound/types/report_query_query_fanouts_response.py b/src/profound/types/report_query_query_fanouts_response.py
index cd517ad7..793cf301 100644
--- a/src/profound/types/report_query_query_fanouts_response.py
+++ b/src/profound/types/report_query_query_fanouts_response.py
@@ -1,8 +1,95 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict
-from typing_extensions import TypeAlias
+from typing import TYPE_CHECKING, Dict, List, Optional
-__all__ = ["ReportQueryQueryFanoutsResponse"]
+from pydantic import Field as FieldInfo
-ReportQueryQueryFanoutsResponse: TypeAlias = Dict[str, object]
+from .._models import BaseModel
+
+__all__ = ["ReportQueryQueryFanoutsResponse", "Data", "Info"]
+
+
+class Data(BaseModel):
+ """One row.
+
+ Group dimensions are plain values (not `{id, name}`); metrics present depend on `metrics`.
+ """
+
+ date: Optional[str] = None
+
+ fanouts_per_execution: Optional[float] = None
+
+ model: Optional[str] = None
+
+ prompt: Optional[str] = None
+
+ query: Optional[str] = None
+
+ query_variations: Optional[int] = None
+
+ rank: Optional[int] = None
+
+ region: Optional[str] = None
+
+ share: Optional[float] = None
+
+ total_fanouts: Optional[float] = None
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class Info(BaseModel):
+ count: int
+ """Number of rows returned in `data` for this page."""
+
+ coverage_note: str
+ """Caveat about which runs the fanout metrics cover."""
+
+ end_date: str
+ """Echoed request end date (YYYY-MM-DD, ET)."""
+
+ metrics: List[str]
+ """Fanout metrics returned per row."""
+
+ models: List[str]
+ """Display names of the models the report covers."""
+
+ start_date: str
+ """Echoed request start date (YYYY-MM-DD, ET)."""
+
+ filter: Optional[Dict[str, object]] = None
+ """Echoed normalized filter tree, or null when no filter was sent."""
+
+ next_cursor: Optional[str] = None
+ """Opaque cursor for the next page; null on the last page."""
+
+ total_results: Optional[int] = None
+ """Total rows matching the query before pagination (null when not computed)."""
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class ReportQueryQueryFanoutsResponse(BaseModel):
+ data: List[Data]
+
+ info: Info
diff --git a/src/profound/types/report_query_sentiment_response.py b/src/profound/types/report_query_sentiment_response.py
index 48876582..c0415c28 100644
--- a/src/profound/types/report_query_sentiment_response.py
+++ b/src/profound/types/report_query_sentiment_response.py
@@ -1,8 +1,295 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict
-from typing_extensions import TypeAlias
+from typing import TYPE_CHECKING, Dict, List, Optional
-__all__ = ["ReportQuerySentimentResponse"]
+from pydantic import Field as FieldInfo
-ReportQuerySentimentResponse: TypeAlias = Dict[str, object]
+from .._models import BaseModel
+
+__all__ = [
+ "ReportQuerySentimentResponse",
+ "Data",
+ "DataClaim",
+ "DataCompetitor",
+ "DataModel",
+ "DataPersona",
+ "DataPrevious",
+ "DataPrompt",
+ "DataRegion",
+ "DataRun",
+ "DataTag",
+ "DataTheme",
+ "DataTopic",
+ "Info",
+]
+
+
+class DataClaim(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataCompetitor(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataModel(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataPersona(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataPrevious(BaseModel):
+ """Comparison-window metrics (when requested)."""
+
+ negative_sentiment: Optional[float] = None
+
+ occurrence: Optional[float] = None
+
+ positive_sentiment: Optional[float] = None
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class DataPrompt(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataRegion(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataRun(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataTag(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataTheme(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataTopic(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class Data(BaseModel):
+ """One group-combination row.
+
+ Group dims and metrics present depend on `group_by`/`metrics`.
+ """
+
+ cited_websites: Optional[List[str]] = None
+
+ claim: Optional[DataClaim] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ competitor: Optional[DataCompetitor] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ date: Optional[str] = None
+
+ model: Optional[DataModel] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ negative_sentiment: Optional[float] = None
+
+ occurrence: Optional[float] = None
+
+ persona: Optional[DataPersona] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ positive_sentiment: Optional[float] = None
+
+ prev_date: Optional[str] = None
+
+ previous: Optional[DataPrevious] = None
+ """Comparison-window metrics (when requested)."""
+
+ prompt: Optional[DataPrompt] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ rank: Optional[int] = None
+
+ region: Optional[DataRegion] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ run: Optional[DataRun] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ tag: Optional[DataTag] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ theme: Optional[DataTheme] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ topic: Optional[DataTopic] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class Info(BaseModel):
+ asset: str
+ """The analyzed brand name."""
+
+ count: int
+ """Number of rows returned in `data` for this page."""
+
+ end_date: str
+ """Echoed request end date (YYYY-MM-DD, ET)."""
+
+ metrics: List[str]
+ """Sentiment metrics returned per row."""
+
+ models: List[str]
+ """Display names of the models the report covers."""
+
+ start_date: str
+ """Echoed request start date (YYYY-MM-DD, ET)."""
+
+ comparison_end_date: Optional[str] = None
+ """Comparison-window end (when requested)."""
+
+ comparison_start_date: Optional[str] = None
+ """Comparison-window start (when requested)."""
+
+ filter: Optional[Dict[str, object]] = None
+ """Echoed normalized filter tree, or null when no filter was sent."""
+
+ next_cursor: Optional[str] = None
+ """Opaque cursor for the next page; null on the last page."""
+
+ total_results: Optional[int] = None
+ """Total rows matching the query before pagination (null when not computed)."""
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class ReportQuerySentimentResponse(BaseModel):
+ data: List[Data]
+
+ info: Info
diff --git a/src/profound/types/report_query_visibility_response.py b/src/profound/types/report_query_visibility_response.py
index 39f6ed1a..41c6221f 100644
--- a/src/profound/types/report_query_visibility_response.py
+++ b/src/profound/types/report_query_visibility_response.py
@@ -1,8 +1,185 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict
-from typing_extensions import TypeAlias
+from typing import TYPE_CHECKING, Dict, List, Union, Optional
-__all__ = ["ReportQueryVisibilityResponse"]
+from pydantic import Field as FieldInfo
-ReportQueryVisibilityResponse: TypeAlias = Dict[str, object]
+from .._models import BaseModel
+
+__all__ = [
+ "ReportQueryVisibilityResponse",
+ "Data",
+ "DataAsset",
+ "DataModel",
+ "DataPersona",
+ "DataPrompt",
+ "DataRegion",
+ "DataTopic",
+ "Info",
+]
+
+
+class DataAsset(BaseModel):
+ name: Optional[str] = None
+
+ owned: Optional[bool] = None
+ """Whether the asset is owned by the category."""
+
+
+class DataModel(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataPersona(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataPrompt(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataRegion(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataTopic(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class Data(BaseModel):
+ """One (asset x group) row.
+
+ Group dimensions and metrics present depend on `group_by`/`metrics`.
+ """
+
+ asset: Optional[DataAsset] = None
+
+ average_position: Optional[float] = None
+
+ date: Optional[str] = None
+
+ model: Optional[DataModel] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ persona: Optional[DataPersona] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ prompt: Optional[DataPrompt] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ rank: Optional[int] = None
+ """Asset rank (only when not grouped)."""
+
+ region: Optional[DataRegion] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ share_of_voice: Optional[float] = None
+
+ topic: Optional[DataTopic] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ visibility_score: Optional[float] = None
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class Info(BaseModel):
+ count: int
+ """Number of rows returned in `data` for this page."""
+
+ end_date: str
+ """Echoed request end date (YYYY-MM-DD, ET)."""
+
+ models: List[str]
+ """Display names of the models the report covers."""
+
+ scope: str
+ """Asset scope: `all` or `owned`."""
+
+ start_date: str
+ """Echoed request start date (YYYY-MM-DD, ET)."""
+
+ asset_filter: Union[Dict[str, object], List[str], str, None] = None
+ """Echoed `assets` selection (filter clause, name, or list), or null."""
+
+ filter: Optional[Dict[str, object]] = None
+ """Echoed normalized filter tree, or null when no filter was sent."""
+
+ next_cursor: Optional[str] = None
+ """Opaque cursor for the next page; null on the last page."""
+
+ total_results: Optional[int] = None
+ """Total rows matching the query before pagination (null when not computed)."""
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class ReportQueryVisibilityResponse(BaseModel):
+ data: List[Data]
+
+ info: Info
diff --git a/src/profound/types/report_stream_citations_v2_params.py b/src/profound/types/report_stream_citations_v2_params.py
index 465d5943..4cb19270 100644
--- a/src/profound/types/report_stream_citations_v2_params.py
+++ b/src/profound/types/report_stream_citations_v2_params.py
@@ -19,6 +19,15 @@ class ReportStreamCitationsV2Params(TypedDict, total=False):
cursor: Optional[str]
+ entity: Literal["domain", "page", "citation_category"]
+ """What each row represents: `domain` (default), `page`, or `citation_category`.
+
+ Legacy: `group_by: ["page"]` (with `entity` omitted) is still accepted and is
+ equivalent to `entity: "page"`. `citation_category` uses the dashboard split
+ view: a citation counts under both its page-level and domain-level category, so
+ category shares can sum to more than 100%.
+ """
+
filter: Optional[Filter]
"""A leaf (`field`/`op`/`value`) or an `and`/`or`/`not` group."""
@@ -35,9 +44,9 @@ class ReportStreamCitationsV2Params(TypedDict, total=False):
metrics: Optional[List[Literal["count", "citation_share", "rank", "first_cited_at"]]]
scope: Literal["all", "owned"]
- """
- `all` (every cited domain) or `owned` (only your owned domains, for easy
- client-side totals).
+ """`all` (every cited domain) or `owned` (only your owned domains).
+
+ Applies to `entity=domain`.
"""
diff --git a/src/profound/types/report_stream_citations_v2_response.py b/src/profound/types/report_stream_citations_v2_response.py
new file mode 100644
index 00000000..71cfefec
--- /dev/null
+++ b/src/profound/types/report_stream_citations_v2_response.py
@@ -0,0 +1,179 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import TYPE_CHECKING, Dict, List, Union, Optional
+from typing_extensions import TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from .._models import BaseModel
+
+__all__ = [
+ "ReportStreamCitationsV2Response",
+ "CitationsV2Info",
+ "CitationRow",
+ "CitationRowModel",
+ "CitationRowPersona",
+ "CitationRowPrompt",
+ "CitationRowRegion",
+ "CitationRowTopic",
+]
+
+
+class CitationsV2Info(BaseModel):
+ """`summary` event payload (the report `info` block)."""
+
+ analysis_types: List[str]
+ """Analysis types the citations were drawn from."""
+
+ count: int
+ """Number of rows returned in `data` for this page."""
+
+ end_date: str
+ """Echoed request end date (YYYY-MM-DD, ET)."""
+
+ metrics: List[str]
+ """Metrics returned per row."""
+
+ models: List[str]
+ """Display names of the models the report covers."""
+
+ scope: str
+ """Citation scope: `all` or `owned`."""
+
+ start_date: str
+ """Echoed request start date (YYYY-MM-DD, ET)."""
+
+ filter: Optional[Dict[str, object]] = None
+ """Echoed normalized filter tree, or null when no filter was sent."""
+
+ next_cursor: Optional[str] = None
+ """Opaque cursor for the next page; null on the last page."""
+
+ total_results: Optional[int] = None
+ """Total rows matching the query before pagination (null when not computed)."""
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class CitationRowModel(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class CitationRowPersona(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class CitationRowPrompt(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class CitationRowRegion(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class CitationRowTopic(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class CitationRow(BaseModel):
+ """`result` event payload — one citation row."""
+
+ citation_share: Optional[float] = None
+
+ count: Optional[int] = None
+
+ date: Optional[str] = None
+
+ domain: Optional[str] = None
+
+ first_cited_at: Optional[str] = None
+ """Pages only."""
+
+ model: Optional[CitationRowModel] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ page: Optional[str] = None
+
+ persona: Optional[CitationRowPersona] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ prompt: Optional[CitationRowPrompt] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ rank: Optional[int] = None
+
+ region: Optional[CitationRowRegion] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ topic: Optional[CitationRowTopic] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+ReportStreamCitationsV2Response: TypeAlias = Union[CitationsV2Info, CitationRow]
diff --git a/src/profound/types/report_stream_query_fanouts_response.py b/src/profound/types/report_stream_query_fanouts_response.py
new file mode 100644
index 00000000..054beb8a
--- /dev/null
+++ b/src/profound/types/report_stream_query_fanouts_response.py
@@ -0,0 +1,92 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import TYPE_CHECKING, Dict, List, Union, Optional
+from typing_extensions import TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from .._models import BaseModel
+
+__all__ = ["ReportStreamQueryFanoutsResponse", "QueryFanoutsV2Info", "QueryFanoutRow"]
+
+
+class QueryFanoutsV2Info(BaseModel):
+ """`summary` event payload (the report `info` block)."""
+
+ count: int
+ """Number of rows returned in `data` for this page."""
+
+ coverage_note: str
+ """Caveat about which runs the fanout metrics cover."""
+
+ end_date: str
+ """Echoed request end date (YYYY-MM-DD, ET)."""
+
+ metrics: List[str]
+ """Fanout metrics returned per row."""
+
+ models: List[str]
+ """Display names of the models the report covers."""
+
+ start_date: str
+ """Echoed request start date (YYYY-MM-DD, ET)."""
+
+ filter: Optional[Dict[str, object]] = None
+ """Echoed normalized filter tree, or null when no filter was sent."""
+
+ next_cursor: Optional[str] = None
+ """Opaque cursor for the next page; null on the last page."""
+
+ total_results: Optional[int] = None
+ """Total rows matching the query before pagination (null when not computed)."""
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class QueryFanoutRow(BaseModel):
+ """`result` event payload — one query-fanout row."""
+
+ date: Optional[str] = None
+
+ fanouts_per_execution: Optional[float] = None
+
+ model: Optional[str] = None
+
+ prompt: Optional[str] = None
+
+ query: Optional[str] = None
+
+ query_variations: Optional[int] = None
+
+ rank: Optional[int] = None
+
+ region: Optional[str] = None
+
+ share: Optional[float] = None
+
+ total_fanouts: Optional[float] = None
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+ReportStreamQueryFanoutsResponse: TypeAlias = Union[QueryFanoutsV2Info, QueryFanoutRow]
diff --git a/src/profound/types/report_stream_sentiment_v2_response.py b/src/profound/types/report_stream_sentiment_v2_response.py
new file mode 100644
index 00000000..2fc57aad
--- /dev/null
+++ b/src/profound/types/report_stream_sentiment_v2_response.py
@@ -0,0 +1,292 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import TYPE_CHECKING, Dict, List, Union, Optional
+from typing_extensions import TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from .._models import BaseModel
+
+__all__ = [
+ "ReportStreamSentimentV2Response",
+ "SentimentV2Info",
+ "SentimentRow",
+ "SentimentRowClaim",
+ "SentimentRowCompetitor",
+ "SentimentRowModel",
+ "SentimentRowPersona",
+ "SentimentRowPrevious",
+ "SentimentRowPrompt",
+ "SentimentRowRegion",
+ "SentimentRowRun",
+ "SentimentRowTag",
+ "SentimentRowTheme",
+ "SentimentRowTopic",
+]
+
+
+class SentimentV2Info(BaseModel):
+ """`summary` event payload (the report `info` block)."""
+
+ asset: str
+ """The analyzed brand name."""
+
+ count: int
+ """Number of rows returned in `data` for this page."""
+
+ end_date: str
+ """Echoed request end date (YYYY-MM-DD, ET)."""
+
+ metrics: List[str]
+ """Sentiment metrics returned per row."""
+
+ models: List[str]
+ """Display names of the models the report covers."""
+
+ start_date: str
+ """Echoed request start date (YYYY-MM-DD, ET)."""
+
+ comparison_end_date: Optional[str] = None
+ """Comparison-window end (when requested)."""
+
+ comparison_start_date: Optional[str] = None
+ """Comparison-window start (when requested)."""
+
+ filter: Optional[Dict[str, object]] = None
+ """Echoed normalized filter tree, or null when no filter was sent."""
+
+ next_cursor: Optional[str] = None
+ """Opaque cursor for the next page; null on the last page."""
+
+ total_results: Optional[int] = None
+ """Total rows matching the query before pagination (null when not computed)."""
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class SentimentRowClaim(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class SentimentRowCompetitor(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class SentimentRowModel(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class SentimentRowPersona(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class SentimentRowPrevious(BaseModel):
+ """Comparison-window metrics (when requested)."""
+
+ negative_sentiment: Optional[float] = None
+
+ occurrence: Optional[float] = None
+
+ positive_sentiment: Optional[float] = None
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class SentimentRowPrompt(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class SentimentRowRegion(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class SentimentRowRun(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class SentimentRowTag(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class SentimentRowTheme(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class SentimentRowTopic(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class SentimentRow(BaseModel):
+ """`result` event payload — one sentiment row."""
+
+ cited_websites: Optional[List[str]] = None
+
+ claim: Optional[SentimentRowClaim] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ competitor: Optional[SentimentRowCompetitor] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ date: Optional[str] = None
+
+ model: Optional[SentimentRowModel] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ negative_sentiment: Optional[float] = None
+
+ occurrence: Optional[float] = None
+
+ persona: Optional[SentimentRowPersona] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ positive_sentiment: Optional[float] = None
+
+ prev_date: Optional[str] = None
+
+ previous: Optional[SentimentRowPrevious] = None
+ """Comparison-window metrics (when requested)."""
+
+ prompt: Optional[SentimentRowPrompt] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ rank: Optional[int] = None
+
+ region: Optional[SentimentRowRegion] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ run: Optional[SentimentRowRun] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ tag: Optional[SentimentRowTag] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ theme: Optional[SentimentRowTheme] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ topic: Optional[SentimentRowTopic] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+ReportStreamSentimentV2Response: TypeAlias = Union[SentimentV2Info, SentimentRow]
diff --git a/src/profound/types/report_stream_visibility_v2_response.py b/src/profound/types/report_stream_visibility_v2_response.py
new file mode 100644
index 00000000..75b3e58e
--- /dev/null
+++ b/src/profound/types/report_stream_visibility_v2_response.py
@@ -0,0 +1,182 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import TYPE_CHECKING, Dict, List, Union, Optional
+from typing_extensions import TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from .._models import BaseModel
+
+__all__ = [
+ "ReportStreamVisibilityV2Response",
+ "VisibilityV2Info",
+ "VisibilityRow",
+ "VisibilityRowAsset",
+ "VisibilityRowModel",
+ "VisibilityRowPersona",
+ "VisibilityRowPrompt",
+ "VisibilityRowRegion",
+ "VisibilityRowTopic",
+]
+
+
+class VisibilityV2Info(BaseModel):
+ """`summary` event payload (the report `info` block)."""
+
+ count: int
+ """Number of rows returned in `data` for this page."""
+
+ end_date: str
+ """Echoed request end date (YYYY-MM-DD, ET)."""
+
+ models: List[str]
+ """Display names of the models the report covers."""
+
+ scope: str
+ """Asset scope: `all` or `owned`."""
+
+ start_date: str
+ """Echoed request start date (YYYY-MM-DD, ET)."""
+
+ asset_filter: Union[Dict[str, object], List[str], str, None] = None
+ """Echoed `assets` selection (filter clause, name, or list), or null."""
+
+ filter: Optional[Dict[str, object]] = None
+ """Echoed normalized filter tree, or null when no filter was sent."""
+
+ next_cursor: Optional[str] = None
+ """Opaque cursor for the next page; null on the last page."""
+
+ total_results: Optional[int] = None
+ """Total rows matching the query before pagination (null when not computed)."""
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class VisibilityRowAsset(BaseModel):
+ name: Optional[str] = None
+
+ owned: Optional[bool] = None
+ """Whether the asset is owned by the category."""
+
+
+class VisibilityRowModel(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class VisibilityRowPersona(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class VisibilityRowPrompt(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class VisibilityRowRegion(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class VisibilityRowTopic(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class VisibilityRow(BaseModel):
+ """`result` event payload — one visibility row."""
+
+ asset: Optional[VisibilityRowAsset] = None
+
+ average_position: Optional[float] = None
+
+ date: Optional[str] = None
+
+ model: Optional[VisibilityRowModel] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ persona: Optional[VisibilityRowPersona] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ prompt: Optional[VisibilityRowPrompt] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ rank: Optional[int] = None
+ """Asset rank (only when not grouped)."""
+
+ region: Optional[VisibilityRowRegion] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ share_of_voice: Optional[float] = None
+
+ topic: Optional[VisibilityRowTopic] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ visibility_score: Optional[float] = None
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+ReportStreamVisibilityV2Response: TypeAlias = Union[VisibilityV2Info, VisibilityRow]
diff --git a/src/profound/types/reports/__init__.py b/src/profound/types/reports/__init__.py
index 9ad2e13a..ba3ddac3 100644
--- a/src/profound/types/reports/__init__.py
+++ b/src/profound/types/reports/__init__.py
@@ -21,6 +21,7 @@
from .web_search_result_stream_params import WebSearchResultStreamParams as WebSearchResultStreamParams
from .accuracy_create_breakdown_params import AccuracyCreateBreakdownParams as AccuracyCreateBreakdownParams
from .accuracy_create_topic_ids_params import AccuracyCreateTopicIDsParams as AccuracyCreateTopicIDsParams
+from .factcheck_stream_scores_response import FactcheckStreamScoresResponse as FactcheckStreamScoresResponse
from .shopping_merchant_share_response import ShoppingMerchantShareResponse as ShoppingMerchantShareResponse
from .web_search_result_query_response import WebSearchResultQueryResponse as WebSearchResultQueryResponse
from .accuracy_create_overview_response import AccuracyCreateOverviewResponse as AccuracyCreateOverviewResponse
diff --git a/src/profound/types/reports/factcheck/__init__.py b/src/profound/types/reports/factcheck/__init__.py
index d159fea5..0285e14a 100644
--- a/src/profound/types/reports/factcheck/__init__.py
+++ b/src/profound/types/reports/factcheck/__init__.py
@@ -5,3 +5,4 @@
from .claim_query_claims_params import ClaimQueryClaimsParams as ClaimQueryClaimsParams
from .claim_stream_claims_params import ClaimStreamClaimsParams as ClaimStreamClaimsParams
from .claim_query_claims_response import ClaimQueryClaimsResponse as ClaimQueryClaimsResponse
+from .claim_stream_claims_response import ClaimStreamClaimsResponse as ClaimStreamClaimsResponse
diff --git a/src/profound/types/reports/factcheck/claim_query_claims_response.py b/src/profound/types/reports/factcheck/claim_query_claims_response.py
index 232a7e48..aae68bb6 100644
--- a/src/profound/types/reports/factcheck/claim_query_claims_response.py
+++ b/src/profound/types/reports/factcheck/claim_query_claims_response.py
@@ -1,8 +1,322 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict
+from typing import TYPE_CHECKING, Dict, List, Union, Optional
from typing_extensions import TypeAlias
-__all__ = ["ClaimQueryClaimsResponse"]
+from pydantic import Field as FieldInfo
-ClaimQueryClaimsResponse: TypeAlias = Dict[str, object]
+from ...._models import BaseModel
+
+__all__ = [
+ "ClaimQueryClaimsResponse",
+ "Data",
+ "DataCitationSource",
+ "DataClaim",
+ "DataClaimCitationSource",
+ "DataClaimEvidence",
+ "DataClaimModel",
+ "DataEvidence",
+ "DataModel",
+ "DataPersona",
+ "DataPrompt",
+ "DataRegion",
+ "DataTag",
+ "DataTheme",
+ "DataThemeDimensionRef",
+ "DataTopic",
+ "Info",
+]
+
+
+class DataCitationSource(BaseModel):
+ citation_category: Optional[str] = None
+
+ citation_share: Optional[float] = None
+
+ domain_category: Optional[str] = None
+
+ hostname: Optional[str] = None
+
+ href: Optional[str] = None
+
+ snippet: Optional[str] = None
+
+
+class DataClaimCitationSource(BaseModel):
+ citation_category: Optional[str] = None
+
+ citation_share: Optional[float] = None
+
+ domain_category: Optional[str] = None
+
+ hostname: Optional[str] = None
+
+ href: Optional[str] = None
+
+ snippet: Optional[str] = None
+
+
+class DataClaimEvidence(BaseModel):
+ id: Optional[str] = None
+
+ kb_path: Optional[str] = None
+
+ kb_snippet: Optional[str] = None
+
+ source_updated_at: Optional[str] = None
+
+
+class DataClaimModel(BaseModel):
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+ occurrence: Optional[float] = None
+
+
+class DataClaim(BaseModel):
+ """One inaccurate claim.
+
+ `theme`/`reasoning`/`models`/`evidence`/`citation_sources` follow `include`.
+ """
+
+ citation_sources: Optional[List[DataClaimCitationSource]] = None
+
+ claim: Optional[str] = None
+
+ cluster_id: Optional[str] = None
+
+ evidence: Optional[List[DataClaimEvidence]] = None
+
+ models: Optional[List[DataClaimModel]] = None
+
+ occurrence: Optional[float] = None
+
+ reasoning: Optional[str] = None
+
+ theme: Optional[str] = None
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class DataEvidence(BaseModel):
+ id: Optional[str] = None
+
+ kb_path: Optional[str] = None
+
+ kb_snippet: Optional[str] = None
+
+ source_updated_at: Optional[str] = None
+
+
+class DataModel(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataPersona(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataPrompt(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataRegion(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataTag(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataThemeDimensionRef(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+DataTheme: TypeAlias = Union[str, DataThemeDimensionRef, None]
+
+
+class DataTopic(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class Data(BaseModel):
+ """
+ A flat claim, or (with `group_by`) a section: a dimension + accuracy rollup + its `claims`.
+
+ Present fields depend on `group_by`/`include`.
+ """
+
+ accuracy: Optional[float] = None
+
+ accurate: Optional[int] = None
+
+ citation_sources: Optional[List[DataCitationSource]] = None
+
+ claim: Optional[str] = None
+
+ claims: Optional[List[DataClaim]] = None
+
+ cluster_id: Optional[str] = None
+
+ evidence: Optional[List[DataEvidence]] = None
+
+ inaccurate: Optional[int] = None
+
+ model: Optional[DataModel] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ models: Optional[List[DataModel]] = None
+
+ occurrence: Optional[float] = None
+
+ persona: Optional[DataPersona] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ prompt: Optional[DataPrompt] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ reasoning: Optional[str] = None
+
+ region: Optional[DataRegion] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ tag: Optional[DataTag] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ theme: Optional[DataTheme] = None
+ """Claim theme (string), or an `{id, name}` ref when sectioning by `theme`."""
+
+ topic: Optional[DataTopic] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ total_claims: Optional[int] = None
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class Info(BaseModel):
+ count: int
+ """Number of rows returned in `data` for this page."""
+
+ end_date: str
+ """Echoed request end date (YYYY-MM-DD, ET)."""
+
+ group_by: List[str]
+ """Dimension the claims are sectioned by (empty → one flat list)."""
+
+ models: List[str]
+ """Display names of the models the report covers."""
+
+ start_date: str
+ """Echoed request start date (YYYY-MM-DD, ET)."""
+
+ filter: Optional[Dict[str, object]] = None
+ """Echoed normalized filter tree, or null when no filter was sent."""
+
+ include: Optional[List[str]] = None
+ """Per-claim detail fields requested."""
+
+ next_cursor: Optional[str] = None
+ """Opaque cursor for the next page; null on the last page."""
+
+ total_results: Optional[int] = None
+ """Total rows matching the query before pagination (null when not computed)."""
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class ClaimQueryClaimsResponse(BaseModel):
+ data: List[Data]
+
+ info: Info
diff --git a/src/profound/types/reports/factcheck/claim_stream_claims_response.py b/src/profound/types/reports/factcheck/claim_stream_claims_response.py
new file mode 100644
index 00000000..bac661f2
--- /dev/null
+++ b/src/profound/types/reports/factcheck/claim_stream_claims_response.py
@@ -0,0 +1,317 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import TYPE_CHECKING, Dict, List, Union, Optional
+from typing_extensions import TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ...._models import BaseModel
+
+__all__ = [
+ "ClaimStreamClaimsResponse",
+ "FactcheckClaimsInfo",
+ "FactcheckClaimsRow",
+ "FactcheckClaimsRowCitationSource",
+ "FactcheckClaimsRowClaim",
+ "FactcheckClaimsRowClaimCitationSource",
+ "FactcheckClaimsRowClaimEvidence",
+ "FactcheckClaimsRowClaimModel",
+ "FactcheckClaimsRowEvidence",
+ "FactcheckClaimsRowModel",
+ "FactcheckClaimsRowPersona",
+ "FactcheckClaimsRowPrompt",
+ "FactcheckClaimsRowRegion",
+ "FactcheckClaimsRowTag",
+ "FactcheckClaimsRowTheme",
+ "FactcheckClaimsRowThemeDimensionRef",
+ "FactcheckClaimsRowTopic",
+]
+
+
+class FactcheckClaimsInfo(BaseModel):
+ """`summary` event payload (the report `info` block)."""
+
+ count: int
+ """Number of rows returned in `data` for this page."""
+
+ end_date: str
+ """Echoed request end date (YYYY-MM-DD, ET)."""
+
+ group_by: List[str]
+ """Dimension the claims are sectioned by (empty → one flat list)."""
+
+ models: List[str]
+ """Display names of the models the report covers."""
+
+ start_date: str
+ """Echoed request start date (YYYY-MM-DD, ET)."""
+
+ filter: Optional[Dict[str, object]] = None
+ """Echoed normalized filter tree, or null when no filter was sent."""
+
+ include: Optional[List[str]] = None
+ """Per-claim detail fields requested."""
+
+ next_cursor: Optional[str] = None
+ """Opaque cursor for the next page; null on the last page."""
+
+ total_results: Optional[int] = None
+ """Total rows matching the query before pagination (null when not computed)."""
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class FactcheckClaimsRowCitationSource(BaseModel):
+ citation_category: Optional[str] = None
+
+ citation_share: Optional[float] = None
+
+ domain_category: Optional[str] = None
+
+ hostname: Optional[str] = None
+
+ href: Optional[str] = None
+
+ snippet: Optional[str] = None
+
+
+class FactcheckClaimsRowClaimCitationSource(BaseModel):
+ citation_category: Optional[str] = None
+
+ citation_share: Optional[float] = None
+
+ domain_category: Optional[str] = None
+
+ hostname: Optional[str] = None
+
+ href: Optional[str] = None
+
+ snippet: Optional[str] = None
+
+
+class FactcheckClaimsRowClaimEvidence(BaseModel):
+ id: Optional[str] = None
+
+ kb_path: Optional[str] = None
+
+ kb_snippet: Optional[str] = None
+
+ source_updated_at: Optional[str] = None
+
+
+class FactcheckClaimsRowClaimModel(BaseModel):
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+ occurrence: Optional[float] = None
+
+
+class FactcheckClaimsRowClaim(BaseModel):
+ """One inaccurate claim.
+
+ `theme`/`reasoning`/`models`/`evidence`/`citation_sources` follow `include`.
+ """
+
+ citation_sources: Optional[List[FactcheckClaimsRowClaimCitationSource]] = None
+
+ claim: Optional[str] = None
+
+ cluster_id: Optional[str] = None
+
+ evidence: Optional[List[FactcheckClaimsRowClaimEvidence]] = None
+
+ models: Optional[List[FactcheckClaimsRowClaimModel]] = None
+
+ occurrence: Optional[float] = None
+
+ reasoning: Optional[str] = None
+
+ theme: Optional[str] = None
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class FactcheckClaimsRowEvidence(BaseModel):
+ id: Optional[str] = None
+
+ kb_path: Optional[str] = None
+
+ kb_snippet: Optional[str] = None
+
+ source_updated_at: Optional[str] = None
+
+
+class FactcheckClaimsRowModel(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class FactcheckClaimsRowPersona(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class FactcheckClaimsRowPrompt(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class FactcheckClaimsRowRegion(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class FactcheckClaimsRowTag(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class FactcheckClaimsRowThemeDimensionRef(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+FactcheckClaimsRowTheme: TypeAlias = Union[str, FactcheckClaimsRowThemeDimensionRef, None]
+
+
+class FactcheckClaimsRowTopic(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class FactcheckClaimsRow(BaseModel):
+ """`result` event payload — one inaccurate claim."""
+
+ accuracy: Optional[float] = None
+
+ accurate: Optional[int] = None
+
+ citation_sources: Optional[List[FactcheckClaimsRowCitationSource]] = None
+
+ claim: Optional[str] = None
+
+ claims: Optional[List[FactcheckClaimsRowClaim]] = None
+
+ cluster_id: Optional[str] = None
+
+ evidence: Optional[List[FactcheckClaimsRowEvidence]] = None
+
+ inaccurate: Optional[int] = None
+
+ model: Optional[FactcheckClaimsRowModel] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ models: Optional[List[FactcheckClaimsRowModel]] = None
+
+ occurrence: Optional[float] = None
+
+ persona: Optional[FactcheckClaimsRowPersona] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ prompt: Optional[FactcheckClaimsRowPrompt] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ reasoning: Optional[str] = None
+
+ region: Optional[FactcheckClaimsRowRegion] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ tag: Optional[FactcheckClaimsRowTag] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ theme: Optional[FactcheckClaimsRowTheme] = None
+ """Claim theme (string), or an `{id, name}` ref when sectioning by `theme`."""
+
+ topic: Optional[FactcheckClaimsRowTopic] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ total_claims: Optional[int] = None
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+ClaimStreamClaimsResponse: TypeAlias = Union[FactcheckClaimsInfo, FactcheckClaimsRow]
diff --git a/src/profound/types/reports/factcheck_query_scores_response.py b/src/profound/types/reports/factcheck_query_scores_response.py
index 2e91d4b1..d199cf1e 100644
--- a/src/profound/types/reports/factcheck_query_scores_response.py
+++ b/src/profound/types/reports/factcheck_query_scores_response.py
@@ -1,8 +1,211 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict
-from typing_extensions import TypeAlias
+from typing import TYPE_CHECKING, Dict, List, Optional
-__all__ = ["FactcheckQueryScoresResponse"]
+from pydantic import Field as FieldInfo
-FactcheckQueryScoresResponse: TypeAlias = Dict[str, object]
+from ..._models import BaseModel
+
+__all__ = [
+ "FactcheckQueryScoresResponse",
+ "Data",
+ "DataCitation",
+ "DataModel",
+ "DataPersona",
+ "DataPrompt",
+ "DataRegion",
+ "DataTag",
+ "DataTheme",
+ "DataTopic",
+ "Info",
+]
+
+
+class DataCitation(BaseModel):
+ citation_category: Optional[str] = None
+
+ url: Optional[str] = None
+
+
+class DataModel(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataPersona(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataPrompt(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataRegion(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataTag(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataTheme(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class DataTopic(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class Data(BaseModel):
+ """
+ An accuracy score row: the headline (no dims), a daily point, or a per-dimension breakdown.
+ """
+
+ accuracy: Optional[float] = None
+
+ accurate: Optional[int] = None
+
+ citation: Optional[DataCitation] = None
+
+ date: Optional[str] = None
+
+ inaccurate: Optional[int] = None
+
+ model: Optional[DataModel] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ persona: Optional[DataPersona] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ prompt: Optional[DataPrompt] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ region: Optional[DataRegion] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ tag: Optional[DataTag] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ theme: Optional[DataTheme] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ topic: Optional[DataTopic] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class Info(BaseModel):
+ count: int
+ """Number of rows returned in `data` for this page."""
+
+ end_date: str
+ """Echoed request end date (YYYY-MM-DD, ET)."""
+
+ group_by: List[str]
+ """Dimensions the scores are sliced by (empty → headline)."""
+
+ models: List[str]
+ """Display names of the models the report covers."""
+
+ start_date: str
+ """Echoed request start date (YYYY-MM-DD, ET)."""
+
+ filter: Optional[Dict[str, object]] = None
+ """Echoed normalized filter tree, or null when no filter was sent."""
+
+ next_cursor: Optional[str] = None
+ """Opaque cursor for the next page; null on the last page."""
+
+ total_results: Optional[int] = None
+ """Total rows matching the query before pagination (null when not computed)."""
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class FactcheckQueryScoresResponse(BaseModel):
+ data: List[Data]
+
+ info: Info
diff --git a/src/profound/types/reports/factcheck_stream_scores_response.py b/src/profound/types/reports/factcheck_stream_scores_response.py
new file mode 100644
index 00000000..8e84473b
--- /dev/null
+++ b/src/profound/types/reports/factcheck_stream_scores_response.py
@@ -0,0 +1,209 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import TYPE_CHECKING, Dict, List, Union, Optional
+from typing_extensions import TypeAlias
+
+from pydantic import Field as FieldInfo
+
+from ..._models import BaseModel
+
+__all__ = [
+ "FactcheckStreamScoresResponse",
+ "FactcheckScoresInfo",
+ "FactcheckScoreRow",
+ "FactcheckScoreRowCitation",
+ "FactcheckScoreRowModel",
+ "FactcheckScoreRowPersona",
+ "FactcheckScoreRowPrompt",
+ "FactcheckScoreRowRegion",
+ "FactcheckScoreRowTag",
+ "FactcheckScoreRowTheme",
+ "FactcheckScoreRowTopic",
+]
+
+
+class FactcheckScoresInfo(BaseModel):
+ """`summary` event payload (the report `info` block)."""
+
+ count: int
+ """Number of rows returned in `data` for this page."""
+
+ end_date: str
+ """Echoed request end date (YYYY-MM-DD, ET)."""
+
+ group_by: List[str]
+ """Dimensions the scores are sliced by (empty → headline)."""
+
+ models: List[str]
+ """Display names of the models the report covers."""
+
+ start_date: str
+ """Echoed request start date (YYYY-MM-DD, ET)."""
+
+ filter: Optional[Dict[str, object]] = None
+ """Echoed normalized filter tree, or null when no filter was sent."""
+
+ next_cursor: Optional[str] = None
+ """Opaque cursor for the next page; null on the last page."""
+
+ total_results: Optional[int] = None
+ """Total rows matching the query before pagination (null when not computed)."""
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+class FactcheckScoreRowCitation(BaseModel):
+ citation_category: Optional[str] = None
+
+ url: Optional[str] = None
+
+
+class FactcheckScoreRowModel(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class FactcheckScoreRowPersona(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class FactcheckScoreRowPrompt(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class FactcheckScoreRowRegion(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class FactcheckScoreRowTag(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class FactcheckScoreRowTheme(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class FactcheckScoreRowTopic(BaseModel):
+ """
+ An ``{id, name}`` reference for a grouped dimension value (model, topic, region, …).
+ """
+
+ id: Optional[str] = None
+
+ name: Optional[str] = None
+
+
+class FactcheckScoreRow(BaseModel):
+ """`result` event payload — one accuracy score row."""
+
+ accuracy: Optional[float] = None
+
+ accurate: Optional[int] = None
+
+ citation: Optional[FactcheckScoreRowCitation] = None
+
+ date: Optional[str] = None
+
+ inaccurate: Optional[int] = None
+
+ model: Optional[FactcheckScoreRowModel] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ persona: Optional[FactcheckScoreRowPersona] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ prompt: Optional[FactcheckScoreRowPrompt] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ region: Optional[FactcheckScoreRowRegion] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ tag: Optional[FactcheckScoreRowTag] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ theme: Optional[FactcheckScoreRowTheme] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ topic: Optional[FactcheckScoreRowTopic] = None
+ """
+ An `{id, name}` reference for a grouped dimension value (model, topic, region,
+ …).
+ """
+
+ if TYPE_CHECKING:
+ # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
+ # value to this field, so for compatibility we avoid doing it at runtime.
+ __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
+
+ # Stub to indicate that arbitrary properties are accepted.
+ # To access properties that are not valid identifiers you can use `getattr`, e.g.
+ # `getattr(obj, '$type')`
+ def __getattr__(self, attr: str) -> object: ...
+ else:
+ __pydantic_extra__: Dict[str, object]
+
+
+FactcheckStreamScoresResponse: TypeAlias = Union[FactcheckScoresInfo, FactcheckScoreRow]
diff --git a/src/profound/types/reports/shopping_item_visibility_params.py b/src/profound/types/reports/shopping_item_visibility_params.py
index d1fecef8..85a19c6a 100644
--- a/src/profound/types/reports/shopping_item_visibility_params.py
+++ b/src/profound/types/reports/shopping_item_visibility_params.py
@@ -42,6 +42,7 @@ class ShoppingItemVisibilityParams(TypedDict, total=False):
dimensions: List[
Literal[
"period",
+ "product_key",
"product_name",
"brand_name",
"date",
diff --git a/tests/api_resources/agents/test_runs.py b/tests/api_resources/agents/test_runs.py
index f89ec572..3856c10d 100644
--- a/tests/api_resources/agents/test_runs.py
+++ b/tests/api_resources/agents/test_runs.py
@@ -77,6 +77,16 @@ def test_method_retrieve(self, client: Profound) -> None:
)
assert_matches_type(RunRetrieveResponse, run, path=["response"])
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_retrieve_with_all_params(self, client: Profound) -> None:
+ run = client.agents.runs.retrieve(
+ run_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ agent_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ verbose=True,
+ )
+ assert_matches_type(RunRetrieveResponse, run, path=["response"])
+
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_retrieve(self, client: Profound) -> None:
@@ -186,6 +196,16 @@ async def test_method_retrieve(self, async_client: AsyncProfound) -> None:
)
assert_matches_type(RunRetrieveResponse, run, path=["response"])
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_retrieve_with_all_params(self, async_client: AsyncProfound) -> None:
+ run = await async_client.agents.runs.retrieve(
+ run_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ agent_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ verbose=True,
+ )
+ assert_matches_type(RunRetrieveResponse, run, path=["response"])
+
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_retrieve(self, async_client: AsyncProfound) -> None:
diff --git a/tests/api_resources/organizations/test_categories.py b/tests/api_resources/organizations/test_categories.py
index 5b927599..421745b6 100644
--- a/tests/api_resources/organizations/test_categories.py
+++ b/tests/api_resources/organizations/test_categories.py
@@ -291,6 +291,7 @@ def test_method_prompts_with_all_params(self, client: Profound) -> None:
analysis_type=["visibility"],
cursor="cursor",
limit=1,
+ order_by="created_at",
order_dir="asc",
persona_id=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
platform_id=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
@@ -888,6 +889,7 @@ async def test_method_prompts_with_all_params(self, async_client: AsyncProfound)
analysis_type=["visibility"],
cursor="cursor",
limit=1,
+ order_by="created_at",
order_dir="asc",
persona_id=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
platform_id=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
diff --git a/tests/api_resources/reports/factcheck/test_claims.py b/tests/api_resources/reports/factcheck/test_claims.py
index d86839a8..47250a39 100644
--- a/tests/api_resources/reports/factcheck/test_claims.py
+++ b/tests/api_resources/reports/factcheck/test_claims.py
@@ -23,7 +23,7 @@ class TestClaims:
@parametrize
def test_method_query_claims(self, client: Profound) -> None:
claim = client.reports.factcheck.claims.query_claims(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -33,7 +33,7 @@ def test_method_query_claims(self, client: Profound) -> None:
@parametrize
def test_method_query_claims_with_all_params(self, client: Profound) -> None:
claim = client.reports.factcheck.claims.query_claims(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
@@ -55,7 +55,7 @@ def test_method_query_claims_with_all_params(self, client: Profound) -> None:
@parametrize
def test_raw_response_query_claims(self, client: Profound) -> None:
response = client.reports.factcheck.claims.with_raw_response.query_claims(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -69,7 +69,7 @@ def test_raw_response_query_claims(self, client: Profound) -> None:
@parametrize
def test_streaming_response_query_claims(self, client: Profound) -> None:
with client.reports.factcheck.claims.with_streaming_response.query_claims(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
@@ -84,18 +84,18 @@ def test_streaming_response_query_claims(self, client: Profound) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_stream_claims(self, client: Profound) -> None:
- claim = client.reports.factcheck.claims.stream_claims(
- category_id="category_id",
+ claim_stream = client.reports.factcheck.claims.stream_claims(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert claim is None
+ claim_stream.response.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_stream_claims_with_all_params(self, client: Profound) -> None:
- claim = client.reports.factcheck.claims.stream_claims(
- category_id="category_id",
+ claim_stream = client.reports.factcheck.claims.stream_claims(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
@@ -111,35 +111,34 @@ def test_method_stream_claims_with_all_params(self, client: Profound) -> None:
limit=1,
max_results=1,
)
- assert claim is None
+ claim_stream.response.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_stream_claims(self, client: Profound) -> None:
response = client.reports.factcheck.claims.with_raw_response.stream_claims(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- claim = response.parse()
- assert claim is None
+ stream = response.parse()
+ stream.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_stream_claims(self, client: Profound) -> None:
with client.reports.factcheck.claims.with_streaming_response.stream_claims(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- claim = response.parse()
- assert claim is None
+ stream = response.parse()
+ stream.close()
assert cast(Any, response.is_closed) is True
@@ -153,7 +152,7 @@ class TestAsyncClaims:
@parametrize
async def test_method_query_claims(self, async_client: AsyncProfound) -> None:
claim = await async_client.reports.factcheck.claims.query_claims(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -163,7 +162,7 @@ async def test_method_query_claims(self, async_client: AsyncProfound) -> None:
@parametrize
async def test_method_query_claims_with_all_params(self, async_client: AsyncProfound) -> None:
claim = await async_client.reports.factcheck.claims.query_claims(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
@@ -185,7 +184,7 @@ async def test_method_query_claims_with_all_params(self, async_client: AsyncProf
@parametrize
async def test_raw_response_query_claims(self, async_client: AsyncProfound) -> None:
response = await async_client.reports.factcheck.claims.with_raw_response.query_claims(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -199,7 +198,7 @@ async def test_raw_response_query_claims(self, async_client: AsyncProfound) -> N
@parametrize
async def test_streaming_response_query_claims(self, async_client: AsyncProfound) -> None:
async with async_client.reports.factcheck.claims.with_streaming_response.query_claims(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
@@ -214,18 +213,18 @@ async def test_streaming_response_query_claims(self, async_client: AsyncProfound
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_stream_claims(self, async_client: AsyncProfound) -> None:
- claim = await async_client.reports.factcheck.claims.stream_claims(
- category_id="category_id",
+ claim_stream = await async_client.reports.factcheck.claims.stream_claims(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert claim is None
+ await claim_stream.response.aclose()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_stream_claims_with_all_params(self, async_client: AsyncProfound) -> None:
- claim = await async_client.reports.factcheck.claims.stream_claims(
- category_id="category_id",
+ claim_stream = await async_client.reports.factcheck.claims.stream_claims(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
@@ -241,34 +240,33 @@ async def test_method_stream_claims_with_all_params(self, async_client: AsyncPro
limit=1,
max_results=1,
)
- assert claim is None
+ await claim_stream.response.aclose()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_stream_claims(self, async_client: AsyncProfound) -> None:
response = await async_client.reports.factcheck.claims.with_raw_response.stream_claims(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- claim = await response.parse()
- assert claim is None
+ stream = await response.parse()
+ await stream.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_stream_claims(self, async_client: AsyncProfound) -> None:
async with async_client.reports.factcheck.claims.with_streaming_response.stream_claims(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- claim = await response.parse()
- assert claim is None
+ stream = await response.parse()
+ await stream.close()
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/reports/test_factcheck.py b/tests/api_resources/reports/test_factcheck.py
index 075d48d2..68576b17 100644
--- a/tests/api_resources/reports/test_factcheck.py
+++ b/tests/api_resources/reports/test_factcheck.py
@@ -23,7 +23,7 @@ class TestFactcheck:
@parametrize
def test_method_query_scores(self, client: Profound) -> None:
factcheck = client.reports.factcheck.query_scores(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -33,7 +33,7 @@ def test_method_query_scores(self, client: Profound) -> None:
@parametrize
def test_method_query_scores_with_all_params(self, client: Profound) -> None:
factcheck = client.reports.factcheck.query_scores(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
@@ -54,7 +54,7 @@ def test_method_query_scores_with_all_params(self, client: Profound) -> None:
@parametrize
def test_raw_response_query_scores(self, client: Profound) -> None:
response = client.reports.factcheck.with_raw_response.query_scores(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -68,7 +68,7 @@ def test_raw_response_query_scores(self, client: Profound) -> None:
@parametrize
def test_streaming_response_query_scores(self, client: Profound) -> None:
with client.reports.factcheck.with_streaming_response.query_scores(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
@@ -83,18 +83,18 @@ def test_streaming_response_query_scores(self, client: Profound) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_stream_scores(self, client: Profound) -> None:
- factcheck = client.reports.factcheck.stream_scores(
- category_id="category_id",
+ factcheck_stream = client.reports.factcheck.stream_scores(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert factcheck is None
+ factcheck_stream.response.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_stream_scores_with_all_params(self, client: Profound) -> None:
- factcheck = client.reports.factcheck.stream_scores(
- category_id="category_id",
+ factcheck_stream = client.reports.factcheck.stream_scores(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
@@ -109,35 +109,34 @@ def test_method_stream_scores_with_all_params(self, client: Profound) -> None:
limit=1,
max_results=1,
)
- assert factcheck is None
+ factcheck_stream.response.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_stream_scores(self, client: Profound) -> None:
response = client.reports.factcheck.with_raw_response.stream_scores(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- factcheck = response.parse()
- assert factcheck is None
+ stream = response.parse()
+ stream.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_stream_scores(self, client: Profound) -> None:
with client.reports.factcheck.with_streaming_response.stream_scores(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- factcheck = response.parse()
- assert factcheck is None
+ stream = response.parse()
+ stream.close()
assert cast(Any, response.is_closed) is True
@@ -151,7 +150,7 @@ class TestAsyncFactcheck:
@parametrize
async def test_method_query_scores(self, async_client: AsyncProfound) -> None:
factcheck = await async_client.reports.factcheck.query_scores(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -161,7 +160,7 @@ async def test_method_query_scores(self, async_client: AsyncProfound) -> None:
@parametrize
async def test_method_query_scores_with_all_params(self, async_client: AsyncProfound) -> None:
factcheck = await async_client.reports.factcheck.query_scores(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
@@ -182,7 +181,7 @@ async def test_method_query_scores_with_all_params(self, async_client: AsyncProf
@parametrize
async def test_raw_response_query_scores(self, async_client: AsyncProfound) -> None:
response = await async_client.reports.factcheck.with_raw_response.query_scores(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -196,7 +195,7 @@ async def test_raw_response_query_scores(self, async_client: AsyncProfound) -> N
@parametrize
async def test_streaming_response_query_scores(self, async_client: AsyncProfound) -> None:
async with async_client.reports.factcheck.with_streaming_response.query_scores(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
@@ -211,18 +210,18 @@ async def test_streaming_response_query_scores(self, async_client: AsyncProfound
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_stream_scores(self, async_client: AsyncProfound) -> None:
- factcheck = await async_client.reports.factcheck.stream_scores(
- category_id="category_id",
+ factcheck_stream = await async_client.reports.factcheck.stream_scores(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert factcheck is None
+ await factcheck_stream.response.aclose()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_stream_scores_with_all_params(self, async_client: AsyncProfound) -> None:
- factcheck = await async_client.reports.factcheck.stream_scores(
- category_id="category_id",
+ factcheck_stream = await async_client.reports.factcheck.stream_scores(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
@@ -237,34 +236,33 @@ async def test_method_stream_scores_with_all_params(self, async_client: AsyncPro
limit=1,
max_results=1,
)
- assert factcheck is None
+ await factcheck_stream.response.aclose()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_stream_scores(self, async_client: AsyncProfound) -> None:
response = await async_client.reports.factcheck.with_raw_response.stream_scores(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- factcheck = await response.parse()
- assert factcheck is None
+ stream = await response.parse()
+ await stream.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_stream_scores(self, async_client: AsyncProfound) -> None:
async with async_client.reports.factcheck.with_streaming_response.stream_scores(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- factcheck = await response.parse()
- assert factcheck is None
+ stream = await response.parse()
+ await stream.close()
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/test_prompts.py b/tests/api_resources/test_prompts.py
index 8950cabd..b59bcb1e 100644
--- a/tests/api_resources/test_prompts.py
+++ b/tests/api_resources/test_prompts.py
@@ -112,7 +112,7 @@ def test_streaming_response_answers(self, client: Profound) -> None:
@parametrize
def test_method_answers_v2(self, client: Profound) -> None:
prompt = client.prompts.answers_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -122,7 +122,7 @@ def test_method_answers_v2(self, client: Profound) -> None:
@parametrize
def test_method_answers_v2_with_all_params(self, client: Profound) -> None:
prompt = client.prompts.answers_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
@@ -143,7 +143,7 @@ def test_method_answers_v2_with_all_params(self, client: Profound) -> None:
@parametrize
def test_raw_response_answers_v2(self, client: Profound) -> None:
response = client.prompts.with_raw_response.answers_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -157,7 +157,7 @@ def test_raw_response_answers_v2(self, client: Profound) -> None:
@parametrize
def test_streaming_response_answers_v2(self, client: Profound) -> None:
with client.prompts.with_streaming_response.answers_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
@@ -172,18 +172,18 @@ def test_streaming_response_answers_v2(self, client: Profound) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_stream_answers_v2(self, client: Profound) -> None:
- prompt = client.prompts.stream_answers_v2(
- category_id="category_id",
+ prompt_stream = client.prompts.stream_answers_v2(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert prompt is None
+ prompt_stream.response.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_stream_answers_v2_with_all_params(self, client: Profound) -> None:
- prompt = client.prompts.stream_answers_v2(
- category_id="category_id",
+ prompt_stream = client.prompts.stream_answers_v2(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
@@ -198,35 +198,34 @@ def test_method_stream_answers_v2_with_all_params(self, client: Profound) -> Non
limit=1,
max_results=1,
)
- assert prompt is None
+ prompt_stream.response.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_stream_answers_v2(self, client: Profound) -> None:
response = client.prompts.with_raw_response.stream_answers_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- prompt = response.parse()
- assert prompt is None
+ stream = response.parse()
+ stream.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_stream_answers_v2(self, client: Profound) -> None:
with client.prompts.with_streaming_response.stream_answers_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- prompt = response.parse()
- assert prompt is None
+ stream = response.parse()
+ stream.close()
assert cast(Any, response.is_closed) is True
@@ -327,7 +326,7 @@ async def test_streaming_response_answers(self, async_client: AsyncProfound) ->
@parametrize
async def test_method_answers_v2(self, async_client: AsyncProfound) -> None:
prompt = await async_client.prompts.answers_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -337,7 +336,7 @@ async def test_method_answers_v2(self, async_client: AsyncProfound) -> None:
@parametrize
async def test_method_answers_v2_with_all_params(self, async_client: AsyncProfound) -> None:
prompt = await async_client.prompts.answers_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
@@ -358,7 +357,7 @@ async def test_method_answers_v2_with_all_params(self, async_client: AsyncProfou
@parametrize
async def test_raw_response_answers_v2(self, async_client: AsyncProfound) -> None:
response = await async_client.prompts.with_raw_response.answers_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -372,7 +371,7 @@ async def test_raw_response_answers_v2(self, async_client: AsyncProfound) -> Non
@parametrize
async def test_streaming_response_answers_v2(self, async_client: AsyncProfound) -> None:
async with async_client.prompts.with_streaming_response.answers_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
@@ -387,18 +386,18 @@ async def test_streaming_response_answers_v2(self, async_client: AsyncProfound)
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_stream_answers_v2(self, async_client: AsyncProfound) -> None:
- prompt = await async_client.prompts.stream_answers_v2(
- category_id="category_id",
+ prompt_stream = await async_client.prompts.stream_answers_v2(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert prompt is None
+ await prompt_stream.response.aclose()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_stream_answers_v2_with_all_params(self, async_client: AsyncProfound) -> None:
- prompt = await async_client.prompts.stream_answers_v2(
- category_id="category_id",
+ prompt_stream = await async_client.prompts.stream_answers_v2(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
@@ -413,34 +412,33 @@ async def test_method_stream_answers_v2_with_all_params(self, async_client: Asyn
limit=1,
max_results=1,
)
- assert prompt is None
+ await prompt_stream.response.aclose()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_stream_answers_v2(self, async_client: AsyncProfound) -> None:
response = await async_client.prompts.with_raw_response.stream_answers_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- prompt = await response.parse()
- assert prompt is None
+ stream = await response.parse()
+ await stream.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_stream_answers_v2(self, async_client: AsyncProfound) -> None:
async with async_client.prompts.with_streaming_response.stream_answers_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- prompt = await response.parse()
- assert prompt is None
+ stream = await response.parse()
+ await stream.close()
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/test_reports.py b/tests/api_resources/test_reports.py
index 222ee0f5..d684f4fe 100644
--- a/tests/api_resources/test_reports.py
+++ b/tests/api_resources/test_reports.py
@@ -186,6 +186,7 @@ def test_method_get_bots_report_v2_with_all_params(self, client: Profound) -> No
start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
date_interval="hour",
dimensions=["date"],
+ domain_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
filters=[
{
@@ -207,6 +208,7 @@ def test_method_get_bots_report_v2_with_all_params(self, client: Profound) -> No
"limit": 1,
"offset": 0,
},
+ tags=["string"],
)
assert_matches_type(ReportResponse, report, path=["response"])
@@ -390,7 +392,7 @@ def test_streaming_response_get_referrals_report_v2(self, client: Profound) -> N
@parametrize
def test_method_query_citations(self, client: Profound) -> None:
report = client.reports.query_citations(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -400,10 +402,11 @@ def test_method_query_citations(self, client: Profound) -> None:
@parametrize
def test_method_query_citations_with_all_params(self, client: Profound) -> None:
report = client.reports.query_citations(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
+ entity="domain",
filter={
"and": [],
"field": "field",
@@ -424,7 +427,7 @@ def test_method_query_citations_with_all_params(self, client: Profound) -> None:
@parametrize
def test_raw_response_query_citations(self, client: Profound) -> None:
response = client.reports.with_raw_response.query_citations(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -438,7 +441,7 @@ def test_raw_response_query_citations(self, client: Profound) -> None:
@parametrize
def test_streaming_response_query_citations(self, client: Profound) -> None:
with client.reports.with_streaming_response.query_citations(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
@@ -522,7 +525,7 @@ def test_streaming_response_query_fanouts(self, client: Profound) -> None:
@parametrize
def test_method_query_query_fanouts(self, client: Profound) -> None:
report = client.reports.query_query_fanouts(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -532,7 +535,7 @@ def test_method_query_query_fanouts(self, client: Profound) -> None:
@parametrize
def test_method_query_query_fanouts_with_all_params(self, client: Profound) -> None:
report = client.reports.query_query_fanouts(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
@@ -559,7 +562,7 @@ def test_method_query_query_fanouts_with_all_params(self, client: Profound) -> N
@parametrize
def test_raw_response_query_query_fanouts(self, client: Profound) -> None:
response = client.reports.with_raw_response.query_query_fanouts(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -573,7 +576,7 @@ def test_raw_response_query_query_fanouts(self, client: Profound) -> None:
@parametrize
def test_streaming_response_query_query_fanouts(self, client: Profound) -> None:
with client.reports.with_streaming_response.query_query_fanouts(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
@@ -663,7 +666,7 @@ def test_streaming_response_query_sentiment(self, client: Profound) -> None:
@parametrize
def test_method_query_visibility(self, client: Profound) -> None:
report = client.reports.query_visibility(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -673,7 +676,7 @@ def test_method_query_visibility(self, client: Profound) -> None:
@parametrize
def test_method_query_visibility_with_all_params(self, client: Profound) -> None:
report = client.reports.query_visibility(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
assets="string",
@@ -699,7 +702,7 @@ def test_method_query_visibility_with_all_params(self, client: Profound) -> None
@parametrize
def test_raw_response_query_visibility(self, client: Profound) -> None:
response = client.reports.with_raw_response.query_visibility(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -713,7 +716,7 @@ def test_raw_response_query_visibility(self, client: Profound) -> None:
@parametrize
def test_streaming_response_query_visibility(self, client: Profound) -> None:
with client.reports.with_streaming_response.query_visibility(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
@@ -937,21 +940,22 @@ def test_streaming_response_stream_citations(self, client: Profound) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_stream_citations_v2(self, client: Profound) -> None:
- report = client.reports.stream_citations_v2(
- category_id="category_id",
+ report_stream = client.reports.stream_citations_v2(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert report is None
+ report_stream.response.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_stream_citations_v2_with_all_params(self, client: Profound) -> None:
- report = client.reports.stream_citations_v2(
- category_id="category_id",
+ report_stream = client.reports.stream_citations_v2(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
+ entity="domain",
filter={
"and": [],
"field": "field",
@@ -966,53 +970,52 @@ def test_method_stream_citations_v2_with_all_params(self, client: Profound) -> N
metrics=["count"],
scope="all",
)
- assert report is None
+ report_stream.response.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_stream_citations_v2(self, client: Profound) -> None:
response = client.reports.with_raw_response.stream_citations_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- report = response.parse()
- assert report is None
+ stream = response.parse()
+ stream.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_stream_citations_v2(self, client: Profound) -> None:
with client.reports.with_streaming_response.stream_citations_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- report = response.parse()
- assert report is None
+ stream = response.parse()
+ stream.close()
assert cast(Any, response.is_closed) is True
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_stream_query_fanouts(self, client: Profound) -> None:
- report = client.reports.stream_query_fanouts(
- category_id="category_id",
+ report_stream = client.reports.stream_query_fanouts(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert report is None
+ report_stream.response.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_stream_query_fanouts_with_all_params(self, client: Profound) -> None:
- report = client.reports.stream_query_fanouts(
- category_id="category_id",
+ report_stream = client.reports.stream_query_fanouts(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
@@ -1033,35 +1036,34 @@ def test_method_stream_query_fanouts_with_all_params(self, client: Profound) ->
"dir": "asc",
},
)
- assert report is None
+ report_stream.response.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_stream_query_fanouts(self, client: Profound) -> None:
response = client.reports.with_raw_response.stream_query_fanouts(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- report = response.parse()
- assert report is None
+ stream = response.parse()
+ stream.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_stream_query_fanouts(self, client: Profound) -> None:
with client.reports.with_streaming_response.stream_query_fanouts(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- report = response.parse()
- assert report is None
+ stream = response.parse()
+ stream.close()
assert cast(Any, response.is_closed) is True
@@ -1135,18 +1137,18 @@ def test_streaming_response_stream_sentiment(self, client: Profound) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_stream_sentiment_v2(self, client: Profound) -> None:
- report = client.reports.stream_sentiment_v2(
+ report_stream = client.reports.stream_sentiment_v2(
asset="asset",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert report is None
+ report_stream.response.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_stream_sentiment_v2_with_all_params(self, client: Profound) -> None:
- report = client.reports.stream_sentiment_v2(
+ report_stream = client.reports.stream_sentiment_v2(
asset="asset",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
@@ -1172,7 +1174,7 @@ def test_method_stream_sentiment_v2_with_all_params(self, client: Profound) -> N
"field": "occurrence",
},
)
- assert report is None
+ report_stream.response.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -1184,10 +1186,9 @@ def test_raw_response_stream_sentiment_v2(self, client: Profound) -> None:
start_date="start_date",
)
- assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- report = response.parse()
- assert report is None
+ stream = response.parse()
+ stream.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -1201,8 +1202,8 @@ def test_streaming_response_stream_sentiment_v2(self, client: Profound) -> None:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- report = response.parse()
- assert report is None
+ stream = response.parse()
+ stream.close()
assert cast(Any, response.is_closed) is True
@@ -1276,18 +1277,18 @@ def test_streaming_response_stream_visibility(self, client: Profound) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_stream_visibility_v2(self, client: Profound) -> None:
- report = client.reports.stream_visibility_v2(
- category_id="category_id",
+ report_stream = client.reports.stream_visibility_v2(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert report is None
+ report_stream.response.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_stream_visibility_v2_with_all_params(self, client: Profound) -> None:
- report = client.reports.stream_visibility_v2(
- category_id="category_id",
+ report_stream = client.reports.stream_visibility_v2(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
assets="string",
@@ -1307,35 +1308,34 @@ def test_method_stream_visibility_v2_with_all_params(self, client: Profound) ->
scope="owned",
sort={"field": "visibility_score"},
)
- assert report is None
+ report_stream.response.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_stream_visibility_v2(self, client: Profound) -> None:
response = client.reports.with_raw_response.stream_visibility_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- report = response.parse()
- assert report is None
+ stream = response.parse()
+ stream.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_stream_visibility_v2(self, client: Profound) -> None:
with client.reports.with_streaming_response.stream_visibility_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- report = response.parse()
- assert report is None
+ stream = response.parse()
+ stream.close()
assert cast(Any, response.is_closed) is True
@@ -1573,6 +1573,7 @@ async def test_method_get_bots_report_v2_with_all_params(self, async_client: Asy
start_date=parse_datetime("2019-12-27T18:11:19.117Z"),
date_interval="hour",
dimensions=["date"],
+ domain_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date=parse_datetime("2019-12-27T18:11:19.117Z"),
filters=[
{
@@ -1594,6 +1595,7 @@ async def test_method_get_bots_report_v2_with_all_params(self, async_client: Asy
"limit": 1,
"offset": 0,
},
+ tags=["string"],
)
assert_matches_type(ReportResponse, report, path=["response"])
@@ -1777,7 +1779,7 @@ async def test_streaming_response_get_referrals_report_v2(self, async_client: As
@parametrize
async def test_method_query_citations(self, async_client: AsyncProfound) -> None:
report = await async_client.reports.query_citations(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -1787,10 +1789,11 @@ async def test_method_query_citations(self, async_client: AsyncProfound) -> None
@parametrize
async def test_method_query_citations_with_all_params(self, async_client: AsyncProfound) -> None:
report = await async_client.reports.query_citations(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
+ entity="domain",
filter={
"and": [],
"field": "field",
@@ -1811,7 +1814,7 @@ async def test_method_query_citations_with_all_params(self, async_client: AsyncP
@parametrize
async def test_raw_response_query_citations(self, async_client: AsyncProfound) -> None:
response = await async_client.reports.with_raw_response.query_citations(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -1825,7 +1828,7 @@ async def test_raw_response_query_citations(self, async_client: AsyncProfound) -
@parametrize
async def test_streaming_response_query_citations(self, async_client: AsyncProfound) -> None:
async with async_client.reports.with_streaming_response.query_citations(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
@@ -1909,7 +1912,7 @@ async def test_streaming_response_query_fanouts(self, async_client: AsyncProfoun
@parametrize
async def test_method_query_query_fanouts(self, async_client: AsyncProfound) -> None:
report = await async_client.reports.query_query_fanouts(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -1919,7 +1922,7 @@ async def test_method_query_query_fanouts(self, async_client: AsyncProfound) ->
@parametrize
async def test_method_query_query_fanouts_with_all_params(self, async_client: AsyncProfound) -> None:
report = await async_client.reports.query_query_fanouts(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
@@ -1946,7 +1949,7 @@ async def test_method_query_query_fanouts_with_all_params(self, async_client: As
@parametrize
async def test_raw_response_query_query_fanouts(self, async_client: AsyncProfound) -> None:
response = await async_client.reports.with_raw_response.query_query_fanouts(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -1960,7 +1963,7 @@ async def test_raw_response_query_query_fanouts(self, async_client: AsyncProfoun
@parametrize
async def test_streaming_response_query_query_fanouts(self, async_client: AsyncProfound) -> None:
async with async_client.reports.with_streaming_response.query_query_fanouts(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
@@ -2050,7 +2053,7 @@ async def test_streaming_response_query_sentiment(self, async_client: AsyncProfo
@parametrize
async def test_method_query_visibility(self, async_client: AsyncProfound) -> None:
report = await async_client.reports.query_visibility(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -2060,7 +2063,7 @@ async def test_method_query_visibility(self, async_client: AsyncProfound) -> Non
@parametrize
async def test_method_query_visibility_with_all_params(self, async_client: AsyncProfound) -> None:
report = await async_client.reports.query_visibility(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
assets="string",
@@ -2086,7 +2089,7 @@ async def test_method_query_visibility_with_all_params(self, async_client: Async
@parametrize
async def test_raw_response_query_visibility(self, async_client: AsyncProfound) -> None:
response = await async_client.reports.with_raw_response.query_visibility(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
@@ -2100,7 +2103,7 @@ async def test_raw_response_query_visibility(self, async_client: AsyncProfound)
@parametrize
async def test_streaming_response_query_visibility(self, async_client: AsyncProfound) -> None:
async with async_client.reports.with_streaming_response.query_visibility(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
@@ -2324,21 +2327,22 @@ async def test_streaming_response_stream_citations(self, async_client: AsyncProf
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_stream_citations_v2(self, async_client: AsyncProfound) -> None:
- report = await async_client.reports.stream_citations_v2(
- category_id="category_id",
+ report_stream = await async_client.reports.stream_citations_v2(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert report is None
+ await report_stream.response.aclose()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_stream_citations_v2_with_all_params(self, async_client: AsyncProfound) -> None:
- report = await async_client.reports.stream_citations_v2(
- category_id="category_id",
+ report_stream = await async_client.reports.stream_citations_v2(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
+ entity="domain",
filter={
"and": [],
"field": "field",
@@ -2353,53 +2357,52 @@ async def test_method_stream_citations_v2_with_all_params(self, async_client: As
metrics=["count"],
scope="all",
)
- assert report is None
+ await report_stream.response.aclose()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_stream_citations_v2(self, async_client: AsyncProfound) -> None:
response = await async_client.reports.with_raw_response.stream_citations_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- report = await response.parse()
- assert report is None
+ stream = await response.parse()
+ await stream.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_stream_citations_v2(self, async_client: AsyncProfound) -> None:
async with async_client.reports.with_streaming_response.stream_citations_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- report = await response.parse()
- assert report is None
+ stream = await response.parse()
+ await stream.close()
assert cast(Any, response.is_closed) is True
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_stream_query_fanouts(self, async_client: AsyncProfound) -> None:
- report = await async_client.reports.stream_query_fanouts(
- category_id="category_id",
+ report_stream = await async_client.reports.stream_query_fanouts(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert report is None
+ await report_stream.response.aclose()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_stream_query_fanouts_with_all_params(self, async_client: AsyncProfound) -> None:
- report = await async_client.reports.stream_query_fanouts(
- category_id="category_id",
+ report_stream = await async_client.reports.stream_query_fanouts(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
cursor="cursor",
@@ -2420,35 +2423,34 @@ async def test_method_stream_query_fanouts_with_all_params(self, async_client: A
"dir": "asc",
},
)
- assert report is None
+ await report_stream.response.aclose()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_stream_query_fanouts(self, async_client: AsyncProfound) -> None:
response = await async_client.reports.with_raw_response.stream_query_fanouts(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- report = await response.parse()
- assert report is None
+ stream = await response.parse()
+ await stream.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_stream_query_fanouts(self, async_client: AsyncProfound) -> None:
async with async_client.reports.with_streaming_response.stream_query_fanouts(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- report = await response.parse()
- assert report is None
+ stream = await response.parse()
+ await stream.close()
assert cast(Any, response.is_closed) is True
@@ -2522,18 +2524,18 @@ async def test_streaming_response_stream_sentiment(self, async_client: AsyncProf
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_stream_sentiment_v2(self, async_client: AsyncProfound) -> None:
- report = await async_client.reports.stream_sentiment_v2(
+ report_stream = await async_client.reports.stream_sentiment_v2(
asset="asset",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert report is None
+ await report_stream.response.aclose()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_stream_sentiment_v2_with_all_params(self, async_client: AsyncProfound) -> None:
- report = await async_client.reports.stream_sentiment_v2(
+ report_stream = await async_client.reports.stream_sentiment_v2(
asset="asset",
category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
@@ -2559,7 +2561,7 @@ async def test_method_stream_sentiment_v2_with_all_params(self, async_client: As
"field": "occurrence",
},
)
- assert report is None
+ await report_stream.response.aclose()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -2571,10 +2573,9 @@ async def test_raw_response_stream_sentiment_v2(self, async_client: AsyncProfoun
start_date="start_date",
)
- assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- report = await response.parse()
- assert report is None
+ stream = await response.parse()
+ await stream.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -2588,8 +2589,8 @@ async def test_streaming_response_stream_sentiment_v2(self, async_client: AsyncP
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- report = await response.parse()
- assert report is None
+ stream = await response.parse()
+ await stream.close()
assert cast(Any, response.is_closed) is True
@@ -2663,18 +2664,18 @@ async def test_streaming_response_stream_visibility(self, async_client: AsyncPro
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_stream_visibility_v2(self, async_client: AsyncProfound) -> None:
- report = await async_client.reports.stream_visibility_v2(
- category_id="category_id",
+ report_stream = await async_client.reports.stream_visibility_v2(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert report is None
+ await report_stream.response.aclose()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_stream_visibility_v2_with_all_params(self, async_client: AsyncProfound) -> None:
- report = await async_client.reports.stream_visibility_v2(
- category_id="category_id",
+ report_stream = await async_client.reports.stream_visibility_v2(
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
assets="string",
@@ -2694,35 +2695,34 @@ async def test_method_stream_visibility_v2_with_all_params(self, async_client: A
scope="owned",
sort={"field": "visibility_score"},
)
- assert report is None
+ await report_stream.response.aclose()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_stream_visibility_v2(self, async_client: AsyncProfound) -> None:
response = await async_client.reports.with_raw_response.stream_visibility_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
)
- assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- report = await response.parse()
- assert report is None
+ stream = await response.parse()
+ await stream.close()
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_stream_visibility_v2(self, async_client: AsyncProfound) -> None:
async with async_client.reports.with_streaming_response.stream_visibility_v2(
- category_id="category_id",
+ category_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
end_date="end_date",
start_date="start_date",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- report = await response.parse()
- assert report is None
+ stream = await response.parse()
+ await stream.close()
assert cast(Any, response.is_closed) is True