diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index c373724d..46b9b6b2 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.1.0-alpha.8"
+ ".": "0.1.0-alpha.9"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 9441a68d..60d51403 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 955
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hubspot/hubspot-sdk-8aa2c4935982d3998769d656b2caae13c71151b5f00caaa875357ceb83f6e0a6.yml
-openapi_spec_hash: 47d20b6496315d47f4f64441d4682f47
-config_hash: 9c2a17b9755f3edac92a3ec4b93ac51c
+configured_endpoints: 959
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hubspot/hubspot-sdk-5471b42def181422e461f5657935bcc5d80f62e169b34b60d017257cab8ed6a7.yml
+openapi_spec_hash: 93b8671a542b331e067319184c943fdd
+config_hash: 42a440e814378897b5ca0c2ad29c7f99
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c0eae381..d4dd17bb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,20 @@
# Changelog
+## 0.1.0-alpha.9 (2026-05-25)
+
+Full Changelog: [v0.1.0-alpha.8...v0.1.0-alpha.9](https://github.com/HubSpot/hubspot-sdk-python/compare/v0.1.0-alpha.8...v0.1.0-alpha.9)
+
+### Features
+
+* **api:** manual updates ([dd6d95a](https://github.com/HubSpot/hubspot-sdk-python/commit/dd6d95aa6794f1ccc276ee5415677a560d5e55c7))
+* **api:** manual updates ([36c571b](https://github.com/HubSpot/hubspot-sdk-python/commit/36c571b41e29defa39498e56944b2fabae301192))
+
+
+### Chores
+
+* configure new SDK language ([cc42975](https://github.com/HubSpot/hubspot-sdk-python/commit/cc42975455695e24cb98a8fd645c1e4e89e3506b))
+* remove mypy from lint pipeline ([d690050](https://github.com/HubSpot/hubspot-sdk-python/commit/d6900507e7300d6f005e9cda5073b013b0b84656))
+
## 0.1.0-alpha.8 (2026-05-18)
Full Changelog: [v0.1.0-alpha.7...v0.1.0-alpha.8](https://github.com/HubSpot/hubspot-sdk-python/compare/v0.1.0-alpha.7...v0.1.0-alpha.8)
diff --git a/api.md b/api.md
index 2dcc50aa..2e448369 100644
--- a/api.md
+++ b/api.md
@@ -3,21 +3,39 @@
```python
from hubspot_sdk.types import (
AbTestCreateRequestVNext,
+ ActionOverrideRequest,
ActionResponse,
+ AppLifecycleEventSubscriptionUpsertRequest,
AssociationDefinition,
AssociationDefinitionEgg,
AssociationSpec,
+ AssociationSubscriptionUpsertRequest,
AutomationActionsOption,
BatchInputPropertyCreate,
BatchInputPropertyName,
BatchInputPublicObjectID,
BatchInputString,
BatchReadInputPropertyName,
+ BatchResponseJournalFetchResponse,
+ BatchResponseJournalFetchResponseWithErrors,
CollectionResponsePropertyGroupNoPaging,
+ Condition,
+ CrmObjectSnapshotBatchRequest,
+ CrmObjectSnapshotBatchResponse,
+ CrmObjectSnapshotRequest,
+ CrmObjectSnapshotResponse,
ErrorData,
ErrorDetail,
+ Filter,
+ FilterCreateRequest,
+ FilterCreateResponse,
+ FilterResponse,
ForwardPaging,
+ GdprPrivacyDeletionSubscriptionUpsertRequest,
+ JournalFetchResponse,
+ ListMembershipSubscriptionUpsertRequest,
NextPage,
+ ObjectSubscriptionUpsertRequest,
ObjectTypeDefinition,
ObjectTypeDefinitionLabels,
ObjectTypeDefinitionPatch,
@@ -34,7 +52,9 @@ from hubspot_sdk.types import (
PropertyName,
PropertyValue,
PublicObjectID,
+ SnapshotStatusResponse,
StandardError,
+ SubscriptionUpsertRequest,
TaskLocator,
VersionUser,
)
@@ -69,3 +89,5 @@ from hubspot_sdk.types import (
# [Settings](src/hubspot_sdk/resources/settings/api.md)
# [Webhooks](src/hubspot_sdk/resources/webhooks/api.md)
+
+# [WebhooksJournal](src/hubspot_sdk/resources/webhooks_journal/api.md)
diff --git a/pyproject.toml b/pyproject.toml
index 35d2ce67..0b7ea629 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "hubspot-sdk"
-version = "0.1.0-alpha.8"
+version = "0.1.0-alpha.9"
description = "The official Python library for the hubspot API"
dynamic = ["readme"]
license = "Apache-2.0"
@@ -57,7 +57,7 @@ conflicts = [
# version pins are in uv.lock
dev = [
"pyright==1.1.399",
- "mypy==1.17",
+
"respx",
"pytest",
"pytest-asyncio",
diff --git a/scripts/lint b/scripts/lint
index 3c50c851..d7b14a42 100755
--- a/scripts/lint
+++ b/scripts/lint
@@ -15,8 +15,5 @@ fi
echo "==> Running pyright"
uv run pyright
-echo "==> Running mypy"
-uv run mypy .
-
echo "==> Making sure it imports"
uv run python -c 'import hubspot_sdk'
diff --git a/src/hubspot_sdk/_client.py b/src/hubspot_sdk/_client.py
index 9302c0b3..98669de5 100644
--- a/src/hubspot_sdk/_client.py
+++ b/src/hubspot_sdk/_client.py
@@ -50,6 +50,7 @@
automation,
conversations,
business_units,
+ webhooks_journal,
communication_preferences,
)
from .resources.cms.cms import CmsResource, AsyncCmsResource
@@ -66,6 +67,7 @@
from .resources.automation.automation import AutomationResource, AsyncAutomationResource
from .resources.conversations.conversations import ConversationsResource, AsyncConversationsResource
from .resources.business_units.business_units import BusinessUnitsResource, AsyncBusinessUnitsResource
+ from .resources.webhooks_journal.webhooks_journal import WebhooksJournalResource, AsyncWebhooksJournalResource
from .resources.communication_preferences.communication_preferences import (
CommunicationPreferencesResource,
AsyncCommunicationPreferencesResource,
@@ -223,6 +225,12 @@ def webhooks(self) -> WebhooksResource:
return WebhooksResource(self)
+ @cached_property
+ def webhooks_journal(self) -> WebhooksJournalResource:
+ from .resources.webhooks_journal import WebhooksJournalResource
+
+ return WebhooksJournalResource(self)
+
@cached_property
def with_raw_response(self) -> HubSpotWithRawResponse:
return HubSpotWithRawResponse(self)
@@ -498,6 +506,12 @@ def webhooks(self) -> AsyncWebhooksResource:
return AsyncWebhooksResource(self)
+ @cached_property
+ def webhooks_journal(self) -> AsyncWebhooksJournalResource:
+ from .resources.webhooks_journal import AsyncWebhooksJournalResource
+
+ return AsyncWebhooksJournalResource(self)
+
@cached_property
def with_raw_response(self) -> AsyncHubSpotWithRawResponse:
return AsyncHubSpotWithRawResponse(self)
@@ -720,6 +734,12 @@ def webhooks(self) -> webhooks.WebhooksResourceWithRawResponse:
return WebhooksResourceWithRawResponse(self._client.webhooks)
+ @cached_property
+ def webhooks_journal(self) -> webhooks_journal.WebhooksJournalResourceWithRawResponse:
+ from .resources.webhooks_journal import WebhooksJournalResourceWithRawResponse
+
+ return WebhooksJournalResourceWithRawResponse(self._client.webhooks_journal)
+
class AsyncHubSpotWithRawResponse:
_client: AsyncHubSpot
@@ -819,6 +839,12 @@ def webhooks(self) -> webhooks.AsyncWebhooksResourceWithRawResponse:
return AsyncWebhooksResourceWithRawResponse(self._client.webhooks)
+ @cached_property
+ def webhooks_journal(self) -> webhooks_journal.AsyncWebhooksJournalResourceWithRawResponse:
+ from .resources.webhooks_journal import AsyncWebhooksJournalResourceWithRawResponse
+
+ return AsyncWebhooksJournalResourceWithRawResponse(self._client.webhooks_journal)
+
class HubSpotWithStreamedResponse:
_client: HubSpot
@@ -918,6 +944,12 @@ def webhooks(self) -> webhooks.WebhooksResourceWithStreamingResponse:
return WebhooksResourceWithStreamingResponse(self._client.webhooks)
+ @cached_property
+ def webhooks_journal(self) -> webhooks_journal.WebhooksJournalResourceWithStreamingResponse:
+ from .resources.webhooks_journal import WebhooksJournalResourceWithStreamingResponse
+
+ return WebhooksJournalResourceWithStreamingResponse(self._client.webhooks_journal)
+
class AsyncHubSpotWithStreamedResponse:
_client: AsyncHubSpot
@@ -1017,6 +1049,12 @@ def webhooks(self) -> webhooks.AsyncWebhooksResourceWithStreamingResponse:
return AsyncWebhooksResourceWithStreamingResponse(self._client.webhooks)
+ @cached_property
+ def webhooks_journal(self) -> webhooks_journal.AsyncWebhooksJournalResourceWithStreamingResponse:
+ from .resources.webhooks_journal import AsyncWebhooksJournalResourceWithStreamingResponse
+
+ return AsyncWebhooksJournalResourceWithStreamingResponse(self._client.webhooks_journal)
+
Client = HubSpot
diff --git a/src/hubspot_sdk/_version.py b/src/hubspot_sdk/_version.py
index 2657f1ed..1f6245da 100644
--- a/src/hubspot_sdk/_version.py
+++ b/src/hubspot_sdk/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "hubspot_sdk"
-__version__ = "0.1.0-alpha.8" # x-release-please-version
+__version__ = "0.1.0-alpha.9" # x-release-please-version
diff --git a/src/hubspot_sdk/resources/auth/api.md b/src/hubspot_sdk/resources/auth/api.md
index b1bda6f9..557fc01f 100644
--- a/src/hubspot_sdk/resources/auth/api.md
+++ b/src/hubspot_sdk/resources/auth/api.md
@@ -6,15 +6,18 @@ Types:
```python
from hubspot_sdk.types.auth import (
+ AccessTokenResponse,
+ ClientCredentialsTokenResponse,
PublicAccessTokenInfoResponse,
PublicRefreshTokenInfoResponse,
SignedAccessToken,
TokenInfoResponseBaseIf,
+ TokenResponseIf,
)
```
Methods:
-- client.auth.oauth.create_token(\*\*params) -> BinaryAPIResponse
+- client.auth.oauth.create_token(\*\*params) -> TokenResponseIf
- client.auth.oauth.introspect_token(\*\*params) -> TokenInfoResponseBaseIf
- client.auth.oauth.revoke_token(\*\*params) -> BinaryAPIResponse
diff --git a/src/hubspot_sdk/resources/auth/oauth.py b/src/hubspot_sdk/resources/auth/oauth.py
index 939a4b53..f4f35bf5 100644
--- a/src/hubspot_sdk/resources/auth/oauth.py
+++ b/src/hubspot_sdk/resources/auth/oauth.py
@@ -27,6 +27,7 @@
)
from ...types.auth import oauth_create_token_params, oauth_revoke_token_params, oauth_introspect_token_params
from ..._base_client import make_request_options
+from ...types.auth.token_response_if import TokenResponseIf
from ...types.auth.token_info_response_base_if import TokenInfoResponseBaseIf
__all__ = ["OAuthResource", "AsyncOAuthResource"]
@@ -59,7 +60,7 @@ def create_token(
client_secret: str | Omit = omit,
code: str | Omit = omit,
code_verifier: str | Omit = omit,
- grant_type: Literal["authorization_code", "refresh_token"] | Omit = omit,
+ grant_type: Literal["authorization_code", "client_credentials", "refresh_token"] | Omit = omit,
redirect_uri: str | Omit = omit,
refresh_token: str | Omit = omit,
scope: str | Omit = omit,
@@ -69,7 +70,7 @@ def create_token(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> BinaryAPIResponse:
+ ) -> TokenResponseIf:
"""
Authenticates a client and returns access and refresh tokens.
@@ -82,26 +83,28 @@ def create_token(
timeout: Override the client-level default timeout for this request, in seconds
"""
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
- return self._post(
- "/oauth/2026-03/token",
- body=maybe_transform(
- {
- "client_id": client_id,
- "client_secret": client_secret,
- "code": code,
- "code_verifier": code_verifier,
- "grant_type": grant_type,
- "redirect_uri": redirect_uri,
- "refresh_token": refresh_token,
- "scope": scope,
- },
- oauth_create_token_params.OAuthCreateTokenParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ return cast(
+ TokenResponseIf,
+ self._post(
+ "/oauth/2026-03/token",
+ body=maybe_transform(
+ {
+ "client_id": client_id,
+ "client_secret": client_secret,
+ "code": code,
+ "code_verifier": code_verifier,
+ "grant_type": grant_type,
+ "redirect_uri": redirect_uri,
+ "refresh_token": refresh_token,
+ "scope": scope,
+ },
+ oauth_create_token_params.OAuthCreateTokenParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=cast(Any, TokenResponseIf), # Union types cannot be passed in as arguments in the type system
),
- cast_to=BinaryAPIResponse,
)
def introspect_token(
@@ -224,7 +227,7 @@ async def create_token(
client_secret: str | Omit = omit,
code: str | Omit = omit,
code_verifier: str | Omit = omit,
- grant_type: Literal["authorization_code", "refresh_token"] | Omit = omit,
+ grant_type: Literal["authorization_code", "client_credentials", "refresh_token"] | Omit = omit,
redirect_uri: str | Omit = omit,
refresh_token: str | Omit = omit,
scope: str | Omit = omit,
@@ -234,7 +237,7 @@ async def create_token(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> AsyncBinaryAPIResponse:
+ ) -> TokenResponseIf:
"""
Authenticates a client and returns access and refresh tokens.
@@ -247,26 +250,28 @@ async def create_token(
timeout: Override the client-level default timeout for this request, in seconds
"""
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
- return await self._post(
- "/oauth/2026-03/token",
- body=await async_maybe_transform(
- {
- "client_id": client_id,
- "client_secret": client_secret,
- "code": code,
- "code_verifier": code_verifier,
- "grant_type": grant_type,
- "redirect_uri": redirect_uri,
- "refresh_token": refresh_token,
- "scope": scope,
- },
- oauth_create_token_params.OAuthCreateTokenParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ return cast(
+ TokenResponseIf,
+ await self._post(
+ "/oauth/2026-03/token",
+ body=await async_maybe_transform(
+ {
+ "client_id": client_id,
+ "client_secret": client_secret,
+ "code": code,
+ "code_verifier": code_verifier,
+ "grant_type": grant_type,
+ "redirect_uri": redirect_uri,
+ "refresh_token": refresh_token,
+ "scope": scope,
+ },
+ oauth_create_token_params.OAuthCreateTokenParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=cast(Any, TokenResponseIf), # Union types cannot be passed in as arguments in the type system
),
- cast_to=AsyncBinaryAPIResponse,
)
async def introspect_token(
@@ -366,9 +371,8 @@ class OAuthResourceWithRawResponse:
def __init__(self, oauth: OAuthResource) -> None:
self._oauth = oauth
- self.create_token = to_custom_raw_response_wrapper(
+ self.create_token = to_raw_response_wrapper(
oauth.create_token,
- BinaryAPIResponse,
)
self.introspect_token = to_raw_response_wrapper(
oauth.introspect_token,
@@ -383,9 +387,8 @@ class AsyncOAuthResourceWithRawResponse:
def __init__(self, oauth: AsyncOAuthResource) -> None:
self._oauth = oauth
- self.create_token = async_to_custom_raw_response_wrapper(
+ self.create_token = async_to_raw_response_wrapper(
oauth.create_token,
- AsyncBinaryAPIResponse,
)
self.introspect_token = async_to_raw_response_wrapper(
oauth.introspect_token,
@@ -400,9 +403,8 @@ class OAuthResourceWithStreamingResponse:
def __init__(self, oauth: OAuthResource) -> None:
self._oauth = oauth
- self.create_token = to_custom_streamed_response_wrapper(
+ self.create_token = to_streamed_response_wrapper(
oauth.create_token,
- StreamedBinaryAPIResponse,
)
self.introspect_token = to_streamed_response_wrapper(
oauth.introspect_token,
@@ -417,9 +419,8 @@ class AsyncOAuthResourceWithStreamingResponse:
def __init__(self, oauth: AsyncOAuthResource) -> None:
self._oauth = oauth
- self.create_token = async_to_custom_streamed_response_wrapper(
+ self.create_token = async_to_streamed_response_wrapper(
oauth.create_token,
- AsyncStreamedBinaryAPIResponse,
)
self.introspect_token = async_to_streamed_response_wrapper(
oauth.introspect_token,
diff --git a/src/hubspot_sdk/resources/cms/api.md b/src/hubspot_sdk/resources/cms/api.md
index 3f3b3bb6..b02a81cc 100644
--- a/src/hubspot_sdk/resources/cms/api.md
+++ b/src/hubspot_sdk/resources/cms/api.md
@@ -672,12 +672,7 @@ Methods:
Types:
```python
-from hubspot_sdk.types.cms import (
- ContentSearchResult,
- IndexedData,
- IndexedField,
- PublicSearchResults,
-)
+from hubspot_sdk.types.cms import IndexedData, IndexedField
```
Methods:
@@ -730,4 +725,8 @@ Methods:
- client.cms.url_redirects.update(url_redirect_id, \*\*params) -> URLMapping
- client.cms.url_redirects.list(\*\*params) -> SyncPage[URLMapping]
- client.cms.url_redirects.delete(url_redirect_id) -> None
+- client.cms.url_redirects.create_url_mapping(\*\*params) -> BinaryAPIResponse
+- client.cms.url_redirects.delete_url_mapping(id) -> None
- client.cms.url_redirects.get(url_redirect_id) -> URLMapping
+- client.cms.url_redirects.get_url_mapping(id) -> BinaryAPIResponse
+- client.cms.url_redirects.list_url_mappings() -> BinaryAPIResponse
diff --git a/src/hubspot_sdk/resources/cms/url_redirects.py b/src/hubspot_sdk/resources/cms/url_redirects.py
index d380c981..cbdcf250 100644
--- a/src/hubspot_sdk/resources/cms/url_redirects.py
+++ b/src/hubspot_sdk/resources/cms/url_redirects.py
@@ -12,12 +12,25 @@
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
+ BinaryAPIResponse,
+ AsyncBinaryAPIResponse,
+ StreamedBinaryAPIResponse,
+ AsyncStreamedBinaryAPIResponse,
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
+ to_custom_raw_response_wrapper,
async_to_streamed_response_wrapper,
+ to_custom_streamed_response_wrapper,
+ async_to_custom_raw_response_wrapper,
+ async_to_custom_streamed_response_wrapper,
+)
+from ...types.cms import (
+ url_redirect_list_params,
+ url_redirect_create_params,
+ url_redirect_update_params,
+ url_redirect_create_url_mapping_params,
)
-from ...types.cms import url_redirect_list_params, url_redirect_create_params, url_redirect_update_params
from ...pagination import SyncPage, AsyncPage
from ..._base_client import AsyncPaginator, make_request_options
from ...types.cms.url_mapping import URLMapping
@@ -333,6 +346,129 @@ def delete(
cast_to=NoneType,
)
+ def create_url_mapping(
+ self,
+ *,
+ id: str,
+ created: Union[str, datetime],
+ destination: str,
+ is_match_full_url: bool,
+ is_match_query_string: bool,
+ is_only_after_not_found: bool,
+ is_pattern: bool,
+ is_protocol_agnostic: bool,
+ is_trailing_slash_optional: bool,
+ precedence: int,
+ redirect_style: int,
+ route_prefix: str,
+ updated: Union[str, datetime],
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BinaryAPIResponse:
+ """
+ Args:
+ id: The unique ID of this URL redirect.
+
+ created: The date and time when the URL mapping was initially created.
+
+ destination: The destination URL, where the target URL should be redirected if it matches the
+ `routePrefix`.
+
+ is_match_full_url: Whether the `routePrefix` should match on the entire URL, including the domain.
+
+ is_match_query_string: Whether the `routePrefix` should match on the entire URL path, including the
+ query string.
+
+ is_only_after_not_found: Whether the URL redirect mapping should apply only if a live page on the URL
+ isn't found. If False, the URL redirect mapping will take precedence over any
+ existing page.
+
+ is_pattern: Whether the `routePrefix` should match based on pattern.
+
+ is_protocol_agnostic: Whether the `routePrefix` should match both HTTP and HTTPS protocols.
+
+ is_trailing_slash_optional: Whether a trailing slash will be ignored.
+
+ precedence: Used to prioritize URL redirection. If a given URL matches more than one
+ redirect, the one with the **lower** precedence will be used.
+
+ redirect_style: The type of redirect to create. Options include: 301 (permanent), 302
+ (temporary), or 305 (proxy). Find more details
+ [here](https://knowledge.hubspot.com/cos-general/how-to-redirect-a-hubspot-page).
+
+ route_prefix: The target incoming URL, path, or pattern to match for redirection.
+
+ updated: The date and time when the URL mapping was last modified.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return self._post(
+ "/cms/url-redirects/2026-03/url-mappings",
+ body=maybe_transform(
+ {
+ "id": id,
+ "created": created,
+ "destination": destination,
+ "is_match_full_url": is_match_full_url,
+ "is_match_query_string": is_match_query_string,
+ "is_only_after_not_found": is_only_after_not_found,
+ "is_pattern": is_pattern,
+ "is_protocol_agnostic": is_protocol_agnostic,
+ "is_trailing_slash_optional": is_trailing_slash_optional,
+ "precedence": precedence,
+ "redirect_style": redirect_style,
+ "route_prefix": route_prefix,
+ "updated": updated,
+ },
+ url_redirect_create_url_mapping_params.URLRedirectCreateURLMappingParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=BinaryAPIResponse,
+ )
+
+ def delete_url_mapping(
+ self,
+ id: int,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> None:
+ """
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return self._delete(
+ path_template("/cms/url-redirects/2026-03/url-mappings/{id}", id=id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
def get(
self,
url_redirect_id: str,
@@ -366,6 +502,55 @@ def get(
cast_to=URLMapping,
)
+ def get_url_mapping(
+ self,
+ id: int,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BinaryAPIResponse:
+ """
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return self._get(
+ path_template("/cms/url-redirects/2026-03/url-mappings/{id}", id=id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=BinaryAPIResponse,
+ )
+
+ def list_url_mappings(
+ self,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BinaryAPIResponse:
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return self._get(
+ "/cms/url-redirects/2026-03/url-mappings",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=BinaryAPIResponse,
+ )
+
class AsyncURLRedirectsResource(AsyncAPIResource):
@cached_property
@@ -675,6 +860,129 @@ async def delete(
cast_to=NoneType,
)
+ async def create_url_mapping(
+ self,
+ *,
+ id: str,
+ created: Union[str, datetime],
+ destination: str,
+ is_match_full_url: bool,
+ is_match_query_string: bool,
+ is_only_after_not_found: bool,
+ is_pattern: bool,
+ is_protocol_agnostic: bool,
+ is_trailing_slash_optional: bool,
+ precedence: int,
+ redirect_style: int,
+ route_prefix: str,
+ updated: Union[str, datetime],
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> AsyncBinaryAPIResponse:
+ """
+ Args:
+ id: The unique ID of this URL redirect.
+
+ created: The date and time when the URL mapping was initially created.
+
+ destination: The destination URL, where the target URL should be redirected if it matches the
+ `routePrefix`.
+
+ is_match_full_url: Whether the `routePrefix` should match on the entire URL, including the domain.
+
+ is_match_query_string: Whether the `routePrefix` should match on the entire URL path, including the
+ query string.
+
+ is_only_after_not_found: Whether the URL redirect mapping should apply only if a live page on the URL
+ isn't found. If False, the URL redirect mapping will take precedence over any
+ existing page.
+
+ is_pattern: Whether the `routePrefix` should match based on pattern.
+
+ is_protocol_agnostic: Whether the `routePrefix` should match both HTTP and HTTPS protocols.
+
+ is_trailing_slash_optional: Whether a trailing slash will be ignored.
+
+ precedence: Used to prioritize URL redirection. If a given URL matches more than one
+ redirect, the one with the **lower** precedence will be used.
+
+ redirect_style: The type of redirect to create. Options include: 301 (permanent), 302
+ (temporary), or 305 (proxy). Find more details
+ [here](https://knowledge.hubspot.com/cos-general/how-to-redirect-a-hubspot-page).
+
+ route_prefix: The target incoming URL, path, or pattern to match for redirection.
+
+ updated: The date and time when the URL mapping was last modified.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return await self._post(
+ "/cms/url-redirects/2026-03/url-mappings",
+ body=await async_maybe_transform(
+ {
+ "id": id,
+ "created": created,
+ "destination": destination,
+ "is_match_full_url": is_match_full_url,
+ "is_match_query_string": is_match_query_string,
+ "is_only_after_not_found": is_only_after_not_found,
+ "is_pattern": is_pattern,
+ "is_protocol_agnostic": is_protocol_agnostic,
+ "is_trailing_slash_optional": is_trailing_slash_optional,
+ "precedence": precedence,
+ "redirect_style": redirect_style,
+ "route_prefix": route_prefix,
+ "updated": updated,
+ },
+ url_redirect_create_url_mapping_params.URLRedirectCreateURLMappingParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=AsyncBinaryAPIResponse,
+ )
+
+ async def delete_url_mapping(
+ self,
+ id: int,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> None:
+ """
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return await self._delete(
+ path_template("/cms/url-redirects/2026-03/url-mappings/{id}", id=id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
async def get(
self,
url_redirect_id: str,
@@ -708,6 +1016,55 @@ async def get(
cast_to=URLMapping,
)
+ async def get_url_mapping(
+ self,
+ id: int,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> AsyncBinaryAPIResponse:
+ """
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return await self._get(
+ path_template("/cms/url-redirects/2026-03/url-mappings/{id}", id=id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=AsyncBinaryAPIResponse,
+ )
+
+ async def list_url_mappings(
+ self,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> AsyncBinaryAPIResponse:
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return await self._get(
+ "/cms/url-redirects/2026-03/url-mappings",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=AsyncBinaryAPIResponse,
+ )
+
class URLRedirectsResourceWithRawResponse:
def __init__(self, url_redirects: URLRedirectsResource) -> None:
@@ -725,9 +1082,24 @@ def __init__(self, url_redirects: URLRedirectsResource) -> None:
self.delete = to_raw_response_wrapper(
url_redirects.delete,
)
+ self.create_url_mapping = to_custom_raw_response_wrapper(
+ url_redirects.create_url_mapping,
+ BinaryAPIResponse,
+ )
+ self.delete_url_mapping = to_raw_response_wrapper(
+ url_redirects.delete_url_mapping,
+ )
self.get = to_raw_response_wrapper(
url_redirects.get,
)
+ self.get_url_mapping = to_custom_raw_response_wrapper(
+ url_redirects.get_url_mapping,
+ BinaryAPIResponse,
+ )
+ self.list_url_mappings = to_custom_raw_response_wrapper(
+ url_redirects.list_url_mappings,
+ BinaryAPIResponse,
+ )
class AsyncURLRedirectsResourceWithRawResponse:
@@ -746,9 +1118,24 @@ def __init__(self, url_redirects: AsyncURLRedirectsResource) -> None:
self.delete = async_to_raw_response_wrapper(
url_redirects.delete,
)
+ self.create_url_mapping = async_to_custom_raw_response_wrapper(
+ url_redirects.create_url_mapping,
+ AsyncBinaryAPIResponse,
+ )
+ self.delete_url_mapping = async_to_raw_response_wrapper(
+ url_redirects.delete_url_mapping,
+ )
self.get = async_to_raw_response_wrapper(
url_redirects.get,
)
+ self.get_url_mapping = async_to_custom_raw_response_wrapper(
+ url_redirects.get_url_mapping,
+ AsyncBinaryAPIResponse,
+ )
+ self.list_url_mappings = async_to_custom_raw_response_wrapper(
+ url_redirects.list_url_mappings,
+ AsyncBinaryAPIResponse,
+ )
class URLRedirectsResourceWithStreamingResponse:
@@ -767,9 +1154,24 @@ def __init__(self, url_redirects: URLRedirectsResource) -> None:
self.delete = to_streamed_response_wrapper(
url_redirects.delete,
)
+ self.create_url_mapping = to_custom_streamed_response_wrapper(
+ url_redirects.create_url_mapping,
+ StreamedBinaryAPIResponse,
+ )
+ self.delete_url_mapping = to_streamed_response_wrapper(
+ url_redirects.delete_url_mapping,
+ )
self.get = to_streamed_response_wrapper(
url_redirects.get,
)
+ self.get_url_mapping = to_custom_streamed_response_wrapper(
+ url_redirects.get_url_mapping,
+ StreamedBinaryAPIResponse,
+ )
+ self.list_url_mappings = to_custom_streamed_response_wrapper(
+ url_redirects.list_url_mappings,
+ StreamedBinaryAPIResponse,
+ )
class AsyncURLRedirectsResourceWithStreamingResponse:
@@ -788,6 +1190,21 @@ def __init__(self, url_redirects: AsyncURLRedirectsResource) -> None:
self.delete = async_to_streamed_response_wrapper(
url_redirects.delete,
)
+ self.create_url_mapping = async_to_custom_streamed_response_wrapper(
+ url_redirects.create_url_mapping,
+ AsyncStreamedBinaryAPIResponse,
+ )
+ self.delete_url_mapping = async_to_streamed_response_wrapper(
+ url_redirects.delete_url_mapping,
+ )
self.get = async_to_streamed_response_wrapper(
url_redirects.get,
)
+ self.get_url_mapping = async_to_custom_streamed_response_wrapper(
+ url_redirects.get_url_mapping,
+ AsyncStreamedBinaryAPIResponse,
+ )
+ self.list_url_mappings = async_to_custom_streamed_response_wrapper(
+ url_redirects.list_url_mappings,
+ AsyncStreamedBinaryAPIResponse,
+ )
diff --git a/src/hubspot_sdk/resources/conversations/visitor_identification.py b/src/hubspot_sdk/resources/conversations/visitor_identification.py
index b5ae65bf..e40cb851 100644
--- a/src/hubspot_sdk/resources/conversations/visitor_identification.py
+++ b/src/hubspot_sdk/resources/conversations/visitor_identification.py
@@ -2,6 +2,8 @@
from __future__ import annotations
+from typing import Dict
+
import httpx
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
@@ -45,6 +47,7 @@ def generate_token(
self,
*,
email: str,
+ hs_customer_agent_context: Dict[str, str],
first_name: str | Omit = omit,
last_name: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -85,6 +88,7 @@ def generate_token(
body=maybe_transform(
{
"email": email,
+ "hs_customer_agent_context": hs_customer_agent_context,
"first_name": first_name,
"last_name": last_name,
},
@@ -121,6 +125,7 @@ async def generate_token(
self,
*,
email: str,
+ hs_customer_agent_context: Dict[str, str],
first_name: str | Omit = omit,
last_name: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -161,6 +166,7 @@ async def generate_token(
body=await async_maybe_transform(
{
"email": email,
+ "hs_customer_agent_context": hs_customer_agent_context,
"first_name": first_name,
"last_name": last_name,
},
diff --git a/src/hubspot_sdk/resources/crm/api.md b/src/hubspot_sdk/resources/crm/api.md
index 4488a210..b269edff 100644
--- a/src/hubspot_sdk/resources/crm/api.md
+++ b/src/hubspot_sdk/resources/crm/api.md
@@ -16,8 +16,8 @@ from hubspot_sdk.types.crm import (
BatchResponsePublicDefaultAssociation,
CollectionResponseMultiAssociatedObjectWithLabelForwardPaging,
CollectionResponseWithTotalSimplePublicObject,
+ CrmFilter,
DateTime,
- Filter,
FilterGroup,
LabelsBetweenObjectPair,
MultiAssociatedObjectWithLabel,
@@ -144,7 +144,7 @@ from hubspot_sdk.types.crm import (
Methods:
-- client.crm.exports.create_async() -> TaskLocator
+- client.crm.exports.create_async(\*\*params) -> TaskLocator
- client.crm.exports.get(export_id) -> PublicExportResponse
- client.crm.exports.get_status(task_id) -> ActionResponseWithSingleResultUri
@@ -406,7 +406,6 @@ from hubspot_sdk.types.crm import (
PublicBatchMigrationMapping,
PublicBoolPropertyOperation,
PublicCalendarDatePropertyOperation,
- PublicCampaignInfluencedFilter,
PublicCommunicationSubscriptionFilter,
PublicComparativeDatePropertyOperation,
PublicComparativePropertyUpdatedOperation,
@@ -442,7 +441,6 @@ from hubspot_sdk.types.crm import (
PublicNotAllFilterBranch,
PublicNotAnyFilterBranch,
PublicNowReference,
- PublicNumAssociationsFilter,
PublicNumOccurrencesRefineBy,
PublicNumberPropertyOperation,
PublicObjectList,
@@ -450,8 +448,6 @@ from hubspot_sdk.types.crm import (
PublicOrFilterBranch,
PublicPageViewAnalyticsFilter,
PublicPrivacyAnalyticsFilter,
- PublicPropertyAssociationFilterBranch,
- PublicPropertyAssociationInListFilter,
PublicPropertyFilter,
PublicPropertyReferencedTime,
PublicQuarterReference,
diff --git a/src/hubspot_sdk/resources/crm/exports.py b/src/hubspot_sdk/resources/crm/exports.py
index a53215d1..ef566c05 100644
--- a/src/hubspot_sdk/resources/crm/exports.py
+++ b/src/hubspot_sdk/resources/crm/exports.py
@@ -2,12 +2,13 @@
from __future__ import annotations
-from typing_extensions import overload
+from typing import List
+from typing_extensions import Literal, overload
import httpx
-from ..._types import Body, Query, Headers, NotGiven, not_given
-from ..._utils import path_template
+from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
+from ..._utils import path_template, required_args, maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
@@ -16,9 +17,11 @@
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
+from ...types.crm import export_create_async_params
from ..._base_client import make_request_options
from ...types.shared.task_locator import TaskLocator
from ...types.crm.public_export_response import PublicExportResponse
+from ...types.crm.public_crm_search_request_param import PublicCrmSearchRequestParam
from ...types.crm.action_response_with_single_result_uri import ActionResponseWithSingleResultUri
__all__ = ["ExportsResource", "AsyncExportsResource"]
@@ -48,6 +51,64 @@ def with_streaming_response(self) -> ExportsResourceWithStreamingResponse:
def create_async(
self,
*,
+ associated_object_type: SequenceNotStr[str],
+ export_internal_values_options: List[Literal["NAMES", "VALUES"]],
+ export_name: str,
+ export_type: Literal["VIEW"],
+ format: Literal["CSV", "XLS", "XLSX"],
+ include_labeled_associations: bool,
+ include_primary_display_property_for_associated_objects: bool,
+ language: Literal[
+ "AF_ZA",
+ "AR_EG",
+ "BG",
+ "BN",
+ "CA_ES",
+ "CS",
+ "DA_DK",
+ "DE",
+ "EL_GR",
+ "EN",
+ "EN_GB",
+ "ES",
+ "ES_MX",
+ "ET_EE",
+ "FI",
+ "FR",
+ "FR_CA",
+ "HE_IL",
+ "HI_IN",
+ "HR",
+ "HU",
+ "ID",
+ "IT",
+ "JA",
+ "KO_KR",
+ "LT_LT",
+ "MS",
+ "NL",
+ "NO",
+ "PL",
+ "PT_BR",
+ "PT_PT",
+ "RO",
+ "RU",
+ "SK_SK",
+ "SL",
+ "SV",
+ "TH",
+ "TL",
+ "TR",
+ "UK",
+ "VI_VN",
+ "ZH_CN",
+ "ZH_HK",
+ "ZH_TW",
+ ],
+ object_properties: SequenceNotStr[str],
+ object_type: str,
+ override_associated_objects_per_definition_per_row_limit: bool,
+ public_crm_search_request: PublicCrmSearchRequestParam | 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,
@@ -55,13 +116,82 @@ def create_async(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TaskLocator:
- """Begins exporting CRM data for the portal as specified in the request body"""
+ """
+ Begins exporting CRM data for the portal as specified in the request body
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
...
@overload
def create_async(
self,
*,
+ associated_object_type: SequenceNotStr[str],
+ export_internal_values_options: List[Literal["NAMES", "VALUES"]],
+ export_name: str,
+ export_type: Literal["LIST"],
+ format: Literal["CSV", "XLS", "XLSX"],
+ include_labeled_associations: bool,
+ include_primary_display_property_for_associated_objects: bool,
+ language: Literal[
+ "AF_ZA",
+ "AR_EG",
+ "BG",
+ "BN",
+ "CA_ES",
+ "CS",
+ "DA_DK",
+ "DE",
+ "EL_GR",
+ "EN",
+ "EN_GB",
+ "ES",
+ "ES_MX",
+ "ET_EE",
+ "FI",
+ "FR",
+ "FR_CA",
+ "HE_IL",
+ "HI_IN",
+ "HR",
+ "HU",
+ "ID",
+ "IT",
+ "JA",
+ "KO_KR",
+ "LT_LT",
+ "MS",
+ "NL",
+ "NO",
+ "PL",
+ "PT_BR",
+ "PT_PT",
+ "RO",
+ "RU",
+ "SK_SK",
+ "SL",
+ "SV",
+ "TH",
+ "TL",
+ "TR",
+ "UK",
+ "VI_VN",
+ "ZH_CN",
+ "ZH_HK",
+ "ZH_TW",
+ ],
+ list_id: str,
+ object_properties: SequenceNotStr[str],
+ object_type: str,
+ override_associated_objects_per_definition_per_row_limit: bool,
# 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,
@@ -69,12 +199,111 @@ def create_async(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TaskLocator:
- """Begins exporting CRM data for the portal as specified in the request body"""
+ """
+ Begins exporting CRM data for the portal as specified in the request body
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
...
+ @required_args(
+ [
+ "associated_object_type",
+ "export_internal_values_options",
+ "export_name",
+ "export_type",
+ "format",
+ "include_labeled_associations",
+ "include_primary_display_property_for_associated_objects",
+ "language",
+ "object_properties",
+ "object_type",
+ "override_associated_objects_per_definition_per_row_limit",
+ ],
+ [
+ "associated_object_type",
+ "export_internal_values_options",
+ "export_name",
+ "export_type",
+ "format",
+ "include_labeled_associations",
+ "include_primary_display_property_for_associated_objects",
+ "language",
+ "list_id",
+ "object_properties",
+ "object_type",
+ "override_associated_objects_per_definition_per_row_limit",
+ ],
+ )
def create_async(
self,
*,
+ associated_object_type: SequenceNotStr[str],
+ export_internal_values_options: List[Literal["NAMES", "VALUES"]],
+ export_name: str,
+ export_type: Literal["VIEW"] | Literal["LIST"],
+ format: Literal["CSV", "XLS", "XLSX"],
+ include_labeled_associations: bool,
+ include_primary_display_property_for_associated_objects: bool,
+ language: Literal[
+ "AF_ZA",
+ "AR_EG",
+ "BG",
+ "BN",
+ "CA_ES",
+ "CS",
+ "DA_DK",
+ "DE",
+ "EL_GR",
+ "EN",
+ "EN_GB",
+ "ES",
+ "ES_MX",
+ "ET_EE",
+ "FI",
+ "FR",
+ "FR_CA",
+ "HE_IL",
+ "HI_IN",
+ "HR",
+ "HU",
+ "ID",
+ "IT",
+ "JA",
+ "KO_KR",
+ "LT_LT",
+ "MS",
+ "NL",
+ "NO",
+ "PL",
+ "PT_BR",
+ "PT_PT",
+ "RO",
+ "RU",
+ "SK_SK",
+ "SL",
+ "SV",
+ "TH",
+ "TL",
+ "TR",
+ "UK",
+ "VI_VN",
+ "ZH_CN",
+ "ZH_HK",
+ "ZH_TW",
+ ],
+ object_properties: SequenceNotStr[str],
+ object_type: str,
+ override_associated_objects_per_definition_per_row_limit: bool,
+ public_crm_search_request: PublicCrmSearchRequestParam | Omit = omit,
+ list_id: 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,
@@ -84,6 +313,24 @@ def create_async(
) -> TaskLocator:
return self._post(
"/crm/exports/2026-03/export/async",
+ body=maybe_transform(
+ {
+ "associated_object_type": associated_object_type,
+ "export_internal_values_options": export_internal_values_options,
+ "export_name": export_name,
+ "export_type": export_type,
+ "format": format,
+ "include_labeled_associations": include_labeled_associations,
+ "include_primary_display_property_for_associated_objects": include_primary_display_property_for_associated_objects,
+ "language": language,
+ "object_properties": object_properties,
+ "object_type": object_type,
+ "override_associated_objects_per_definition_per_row_limit": override_associated_objects_per_definition_per_row_limit,
+ "public_crm_search_request": public_crm_search_request,
+ "list_id": list_id,
+ },
+ export_create_async_params.ExportCreateAsyncParams,
+ ),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
@@ -179,6 +426,64 @@ def with_streaming_response(self) -> AsyncExportsResourceWithStreamingResponse:
async def create_async(
self,
*,
+ associated_object_type: SequenceNotStr[str],
+ export_internal_values_options: List[Literal["NAMES", "VALUES"]],
+ export_name: str,
+ export_type: Literal["VIEW"],
+ format: Literal["CSV", "XLS", "XLSX"],
+ include_labeled_associations: bool,
+ include_primary_display_property_for_associated_objects: bool,
+ language: Literal[
+ "AF_ZA",
+ "AR_EG",
+ "BG",
+ "BN",
+ "CA_ES",
+ "CS",
+ "DA_DK",
+ "DE",
+ "EL_GR",
+ "EN",
+ "EN_GB",
+ "ES",
+ "ES_MX",
+ "ET_EE",
+ "FI",
+ "FR",
+ "FR_CA",
+ "HE_IL",
+ "HI_IN",
+ "HR",
+ "HU",
+ "ID",
+ "IT",
+ "JA",
+ "KO_KR",
+ "LT_LT",
+ "MS",
+ "NL",
+ "NO",
+ "PL",
+ "PT_BR",
+ "PT_PT",
+ "RO",
+ "RU",
+ "SK_SK",
+ "SL",
+ "SV",
+ "TH",
+ "TL",
+ "TR",
+ "UK",
+ "VI_VN",
+ "ZH_CN",
+ "ZH_HK",
+ "ZH_TW",
+ ],
+ object_properties: SequenceNotStr[str],
+ object_type: str,
+ override_associated_objects_per_definition_per_row_limit: bool,
+ public_crm_search_request: PublicCrmSearchRequestParam | 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,
@@ -186,13 +491,82 @@ async def create_async(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TaskLocator:
- """Begins exporting CRM data for the portal as specified in the request body"""
+ """
+ Begins exporting CRM data for the portal as specified in the request body
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
...
@overload
async def create_async(
self,
*,
+ associated_object_type: SequenceNotStr[str],
+ export_internal_values_options: List[Literal["NAMES", "VALUES"]],
+ export_name: str,
+ export_type: Literal["LIST"],
+ format: Literal["CSV", "XLS", "XLSX"],
+ include_labeled_associations: bool,
+ include_primary_display_property_for_associated_objects: bool,
+ language: Literal[
+ "AF_ZA",
+ "AR_EG",
+ "BG",
+ "BN",
+ "CA_ES",
+ "CS",
+ "DA_DK",
+ "DE",
+ "EL_GR",
+ "EN",
+ "EN_GB",
+ "ES",
+ "ES_MX",
+ "ET_EE",
+ "FI",
+ "FR",
+ "FR_CA",
+ "HE_IL",
+ "HI_IN",
+ "HR",
+ "HU",
+ "ID",
+ "IT",
+ "JA",
+ "KO_KR",
+ "LT_LT",
+ "MS",
+ "NL",
+ "NO",
+ "PL",
+ "PT_BR",
+ "PT_PT",
+ "RO",
+ "RU",
+ "SK_SK",
+ "SL",
+ "SV",
+ "TH",
+ "TL",
+ "TR",
+ "UK",
+ "VI_VN",
+ "ZH_CN",
+ "ZH_HK",
+ "ZH_TW",
+ ],
+ list_id: str,
+ object_properties: SequenceNotStr[str],
+ object_type: str,
+ override_associated_objects_per_definition_per_row_limit: bool,
# 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,
@@ -200,12 +574,111 @@ async def create_async(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TaskLocator:
- """Begins exporting CRM data for the portal as specified in the request body"""
+ """
+ Begins exporting CRM data for the portal as specified in the request body
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
...
+ @required_args(
+ [
+ "associated_object_type",
+ "export_internal_values_options",
+ "export_name",
+ "export_type",
+ "format",
+ "include_labeled_associations",
+ "include_primary_display_property_for_associated_objects",
+ "language",
+ "object_properties",
+ "object_type",
+ "override_associated_objects_per_definition_per_row_limit",
+ ],
+ [
+ "associated_object_type",
+ "export_internal_values_options",
+ "export_name",
+ "export_type",
+ "format",
+ "include_labeled_associations",
+ "include_primary_display_property_for_associated_objects",
+ "language",
+ "list_id",
+ "object_properties",
+ "object_type",
+ "override_associated_objects_per_definition_per_row_limit",
+ ],
+ )
async def create_async(
self,
*,
+ associated_object_type: SequenceNotStr[str],
+ export_internal_values_options: List[Literal["NAMES", "VALUES"]],
+ export_name: str,
+ export_type: Literal["VIEW"] | Literal["LIST"],
+ format: Literal["CSV", "XLS", "XLSX"],
+ include_labeled_associations: bool,
+ include_primary_display_property_for_associated_objects: bool,
+ language: Literal[
+ "AF_ZA",
+ "AR_EG",
+ "BG",
+ "BN",
+ "CA_ES",
+ "CS",
+ "DA_DK",
+ "DE",
+ "EL_GR",
+ "EN",
+ "EN_GB",
+ "ES",
+ "ES_MX",
+ "ET_EE",
+ "FI",
+ "FR",
+ "FR_CA",
+ "HE_IL",
+ "HI_IN",
+ "HR",
+ "HU",
+ "ID",
+ "IT",
+ "JA",
+ "KO_KR",
+ "LT_LT",
+ "MS",
+ "NL",
+ "NO",
+ "PL",
+ "PT_BR",
+ "PT_PT",
+ "RO",
+ "RU",
+ "SK_SK",
+ "SL",
+ "SV",
+ "TH",
+ "TL",
+ "TR",
+ "UK",
+ "VI_VN",
+ "ZH_CN",
+ "ZH_HK",
+ "ZH_TW",
+ ],
+ object_properties: SequenceNotStr[str],
+ object_type: str,
+ override_associated_objects_per_definition_per_row_limit: bool,
+ public_crm_search_request: PublicCrmSearchRequestParam | Omit = omit,
+ list_id: 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,
@@ -215,6 +688,24 @@ async def create_async(
) -> TaskLocator:
return await self._post(
"/crm/exports/2026-03/export/async",
+ body=await async_maybe_transform(
+ {
+ "associated_object_type": associated_object_type,
+ "export_internal_values_options": export_internal_values_options,
+ "export_name": export_name,
+ "export_type": export_type,
+ "format": format,
+ "include_labeled_associations": include_labeled_associations,
+ "include_primary_display_property_for_associated_objects": include_primary_display_property_for_associated_objects,
+ "language": language,
+ "object_properties": object_properties,
+ "object_type": object_type,
+ "override_associated_objects_per_definition_per_row_limit": override_associated_objects_per_definition_per_row_limit,
+ "public_crm_search_request": public_crm_search_request,
+ "list_id": list_id,
+ },
+ export_create_async_params.ExportCreateAsyncParams,
+ ),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
diff --git a/src/hubspot_sdk/resources/webhooks/api.md b/src/hubspot_sdk/resources/webhooks/api.md
index 03b072c6..a982c420 100644
--- a/src/hubspot_sdk/resources/webhooks/api.md
+++ b/src/hubspot_sdk/resources/webhooks/api.md
@@ -4,38 +4,18 @@ Types:
```python
from hubspot_sdk.types.webhooks import (
- ActionOverrideRequest,
- AppLifecycleEventSubscriptionUpsertRequest,
- AssociationSubscriptionUpsertRequest,
BatchInputSubscriptionBatchUpdateRequest,
- BatchResponseJournalFetchResponse,
- BatchResponseJournalFetchResponseWithErrors,
BatchResponseSubscriptionResponse,
BatchResponseSubscriptionResponseWithErrors,
CollectionResponseSubscriptionResponseNoPaging,
- Condition,
- CrmObjectSnapshotBatchRequest,
- CrmObjectSnapshotBatchResponse,
- CrmObjectSnapshotRequest,
- CrmObjectSnapshotResponse,
- Filter,
- FilterCreateRequest,
- FilterCreateResponse,
- FilterResponse,
- GdprPrivacyDeletionSubscriptionUpsertRequest,
- JournalFetchResponse,
- ListMembershipSubscriptionUpsertRequest,
- ObjectSubscriptionUpsertRequest,
SettingsChangeRequest,
SettingsResponse,
- SnapshotStatusResponse,
SubscriptionBatchUpdateRequest,
SubscriptionCreateRequest,
SubscriptionListResponse,
SubscriptionPatchRequest,
SubscriptionResponse,
SubscriptionResponse1,
- SubscriptionUpsertRequest,
ThrottlingSettings,
WebhookListSubscriptionFiltersResponse,
)
@@ -44,37 +24,37 @@ from hubspot_sdk.types.webhooks import (
Methods:
- client.webhooks.create_batch_event_subscriptions(app_id, \*\*params) -> BatchResponseSubscriptionResponse
-- client.webhooks.create_crm_snapshots(\*\*params) -> CrmObjectSnapshotBatchResponse
+- client.webhooks.create_crm_snapshots(\*\*params) -> CrmObjectSnapshotBatchResponse
- client.webhooks.create_event_subscription(app_id, \*\*params) -> SubscriptionResponse
-- client.webhooks.create_journal_subscription() -> SubscriptionResponse1
-- client.webhooks.create_subscription_filter(\*\*params) -> FilterCreateResponse
+- client.webhooks.create_journal_subscription(\*\*params) -> SubscriptionResponse
+- client.webhooks.create_subscription_filter(\*\*params) -> FilterCreateResponse
- client.webhooks.delete_event_subscription(subscription_id, \*, app_id) -> None
- client.webhooks.delete_journal_subscription(subscription_id) -> None
- client.webhooks.delete_journal_subscription_for_portal(portal_id) -> None
- client.webhooks.delete_settings(app_id) -> None
- client.webhooks.delete_subscription_filter(filter_id) -> None
-- client.webhooks.get_earliest_journal_batch(count, \*\*params) -> BatchResponseJournalFetchResponse
+- client.webhooks.get_earliest_journal_batch(count, \*\*params) -> BatchResponseJournalFetchResponse
- client.webhooks.get_earliest_journal_entry(\*\*params) -> BinaryAPIResponse
-- client.webhooks.get_earliest_local_journal_batch(count, \*\*params) -> BatchResponseJournalFetchResponse
+- client.webhooks.get_earliest_local_journal_batch(count, \*\*params) -> BatchResponseJournalFetchResponse
- client.webhooks.get_earliest_local_journal_entry(\*\*params) -> BinaryAPIResponse
- client.webhooks.get_event_subscription(subscription_id, \*, app_id) -> SubscriptionResponse
-- client.webhooks.get_journal_batch_by_request(\*\*params) -> BatchResponseJournalFetchResponse
-- client.webhooks.get_journal_batch_from_offset(count, \*, offset, \*\*params) -> BatchResponseJournalFetchResponse
-- client.webhooks.get_journal_status(status_id) -> SnapshotStatusResponse
-- client.webhooks.get_journal_subscription(subscription_id) -> SubscriptionResponse1
-- client.webhooks.get_latest_journal_batch(count, \*\*params) -> BatchResponseJournalFetchResponse
+- client.webhooks.get_journal_batch_by_request(\*\*params) -> BatchResponseJournalFetchResponse
+- client.webhooks.get_journal_batch_from_offset(count, \*, offset, \*\*params) -> BatchResponseJournalFetchResponse
+- client.webhooks.get_journal_status(status_id) -> SnapshotStatusResponse
+- client.webhooks.get_journal_subscription(subscription_id) -> SubscriptionResponse
+- client.webhooks.get_latest_journal_batch(count, \*\*params) -> BatchResponseJournalFetchResponse
- client.webhooks.get_latest_journal_entry(\*\*params) -> BinaryAPIResponse
-- client.webhooks.get_latest_local_journal_batch(count, \*\*params) -> BatchResponseJournalFetchResponse
+- client.webhooks.get_latest_local_journal_batch(count, \*\*params) -> BatchResponseJournalFetchResponse
- client.webhooks.get_latest_local_journal_entry(\*\*params) -> BinaryAPIResponse
-- client.webhooks.get_local_journal_batch_by_request(\*\*params) -> BatchResponseJournalFetchResponse
-- client.webhooks.get_local_journal_batch_from_offset(count, \*, offset, \*\*params) -> BatchResponseJournalFetchResponse
-- client.webhooks.get_local_journal_status(status_id) -> SnapshotStatusResponse
+- client.webhooks.get_local_journal_batch_by_request(\*\*params) -> BatchResponseJournalFetchResponse
+- client.webhooks.get_local_journal_batch_from_offset(count, \*, offset, \*\*params) -> BatchResponseJournalFetchResponse
+- client.webhooks.get_local_journal_status(status_id) -> SnapshotStatusResponse
- client.webhooks.get_next_journal_entries(offset, \*\*params) -> BinaryAPIResponse
- client.webhooks.get_next_local_journal_entries(offset, \*\*params) -> BinaryAPIResponse
- client.webhooks.get_settings(app_id) -> SettingsResponse
-- client.webhooks.get_subscription_filter(filter_id) -> FilterResponse
+- client.webhooks.get_subscription_filter(filter_id) -> FilterResponse
- client.webhooks.list_event_subscriptions(app_id) -> SubscriptionListResponse
-- client.webhooks.list_journal_subscriptions() -> CollectionResponseSubscriptionResponseNoPaging
+- client.webhooks.list_journal_subscriptions() -> CollectionResponseSubscriptionResponseNoPaging
- client.webhooks.list_subscription_filters(subscription_id) -> WebhookListSubscriptionFiltersResponse
- client.webhooks.update_event_subscription(subscription_id, \*, app_id, \*\*params) -> SubscriptionResponse
- client.webhooks.update_settings(app_id, \*\*params) -> SettingsResponse
diff --git a/src/hubspot_sdk/resources/webhooks/webhooks.py b/src/hubspot_sdk/resources/webhooks/webhooks.py
index fc5f914b..87afc2e4 100644
--- a/src/hubspot_sdk/resources/webhooks/webhooks.py
+++ b/src/hubspot_sdk/resources/webhooks/webhooks.py
@@ -2,13 +2,13 @@
from __future__ import annotations
-from typing import Iterable
+from typing import List, Iterable
from typing_extensions import Literal, overload
import httpx
from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
-from ..._utils import path_template, maybe_transform, async_maybe_transform
+from ..._utils import path_template, required_args, maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
@@ -37,6 +37,7 @@
webhook_create_subscription_filter_params,
webhook_get_earliest_journal_batch_params,
webhook_get_earliest_journal_entry_params,
+ webhook_create_journal_subscription_params,
webhook_get_journal_batch_by_request_params,
webhook_get_journal_batch_from_offset_params,
webhook_get_latest_local_journal_batch_params,
@@ -48,22 +49,22 @@
webhook_get_local_journal_batch_by_request_params,
webhook_get_local_journal_batch_from_offset_params,
)
-from ...types.webhooks.filter_param import FilterParam
-from ...types.webhooks.filter_response import FilterResponse
+from ...types.shared_params.filter import Filter
+from ...types.shared.filter_response import FilterResponse
from ...types.webhooks.settings_response import SettingsResponse
-from ...types.webhooks.subscription_response import SubscriptionResponse
-from ...types.webhooks.filter_create_response import FilterCreateResponse
-from ...types.webhooks.subscription_response_1 import SubscriptionResponse1
-from ...types.webhooks.snapshot_status_response import SnapshotStatusResponse
+from ...types.shared.filter_create_response import FilterCreateResponse
+from ...types.webhooks.subscription_response import SubscriptionResponse as WebhooksSubscriptionResponse
+from ...types.shared.snapshot_status_response import SnapshotStatusResponse
from ...types.webhooks.throttling_settings_param import ThrottlingSettingsParam
from ...types.webhooks.subscription_list_response import SubscriptionListResponse
-from ...types.webhooks.crm_object_snapshot_request_param import CrmObjectSnapshotRequestParam
-from ...types.webhooks.crm_object_snapshot_batch_response import CrmObjectSnapshotBatchResponse
+from ...types.webhooks_journal.subscription_response import SubscriptionResponse as WebhooksJournalSubscriptionResponse
+from ...types.shared.crm_object_snapshot_batch_response import CrmObjectSnapshotBatchResponse
+from ...types.shared_params.crm_object_snapshot_request import CrmObjectSnapshotRequest
+from ...types.shared.batch_response_journal_fetch_response import BatchResponseJournalFetchResponse
from ...types.webhooks.batch_response_subscription_response import BatchResponseSubscriptionResponse
-from ...types.webhooks.batch_response_journal_fetch_response import BatchResponseJournalFetchResponse
from ...types.webhooks.subscription_batch_update_request_param import SubscriptionBatchUpdateRequestParam
from ...types.webhooks.webhook_list_subscription_filters_response import WebhookListSubscriptionFiltersResponse
-from ...types.webhooks.collection_response_subscription_response_no_paging import (
+from ...types.webhooks_journal.collection_response_subscription_response_no_paging import (
CollectionResponseSubscriptionResponseNoPaging,
)
@@ -132,7 +133,7 @@ def create_batch_event_subscriptions(
def create_crm_snapshots(
self,
*,
- snapshot_requests: Iterable[CrmObjectSnapshotRequestParam],
+ snapshot_requests: Iterable[CrmObjectSnapshotRequest],
# 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,
@@ -140,13 +141,12 @@ def create_crm_snapshots(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CrmObjectSnapshotBatchResponse:
- """Create a batch of CRM object snapshots for the specified portal.
+ """Create a batch of CRM object snapshots in HubSpot.
- This endpoint
- allows you to capture the state of CRM objects at a specific point in time,
- which can be useful for auditing or historical analysis. The request requires a
- list of CRM object snapshot requests, each specifying the portal ID, object ID,
- object type ID, and properties to include in the snapshot.
+ This endpoint is used to
+ capture the current state of specified CRM objects for later reference or
+ analysis. It requires a JSON payload containing the details of the CRM objects
+ to snapshot. This operation is exempt from daily and ten-secondly rate limits.
Args:
snapshot_requests: An array of CrmObjectSnapshotRequest objects, each representing a request to
@@ -236,7 +236,7 @@ def create_event_subscription(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse:
+ ) -> WebhooksSubscriptionResponse:
"""
Create new event subscription for the specified app.
@@ -278,26 +278,58 @@ def create_event_subscription(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=SubscriptionResponse,
+ cast_to=WebhooksSubscriptionResponse,
)
@overload
def create_journal_subscription(
self,
*,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ],
+ object_ids: Iterable[int],
+ object_type_id: str,
+ portal_id: int,
+ properties: SequenceNotStr[str],
+ subscription_type: Literal["OBJECT"],
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse1:
+ ) -> WebhooksJournalSubscriptionResponse:
"""
- Create a new webhook subscription for the specified portal in the HubSpot
- account. This endpoint allows you to define the subscription details, including
- the types of events you want to subscribe to. The request body must include the
- necessary subscription information as defined by the SubscriptionUpsertRequest
- schema.
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
"""
...
@@ -305,19 +337,51 @@ def create_journal_subscription(
def create_journal_subscription(
self,
*,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ],
+ associated_object_type_ids: SequenceNotStr[str],
+ object_ids: Iterable[int],
+ object_type_id: str,
+ portal_id: int,
+ subscription_type: Literal["ASSOCIATION"],
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse1:
+ ) -> WebhooksJournalSubscriptionResponse:
"""
- Create a new webhook subscription for the specified portal in the HubSpot
- account. This endpoint allows you to define the subscription details, including
- the types of events you want to subscribe to. The request body must include the
- necessary subscription information as defined by the SubscriptionUpsertRequest
- schema.
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
"""
...
@@ -325,19 +389,32 @@ def create_journal_subscription(
def create_journal_subscription(
self,
*,
+ event_type_id: str,
+ properties: SequenceNotStr[str],
+ subscription_type: Literal["APP_LIFECYCLE_EVENT"],
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse1:
+ ) -> WebhooksJournalSubscriptionResponse:
"""
- Create a new webhook subscription for the specified portal in the HubSpot
- account. This endpoint allows you to define the subscription details, including
- the types of events you want to subscribe to. The request body must include the
- necessary subscription information as defined by the SubscriptionUpsertRequest
- schema.
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
"""
...
@@ -345,19 +422,50 @@ def create_journal_subscription(
def create_journal_subscription(
self,
*,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ],
+ list_ids: Iterable[int],
+ object_ids: Iterable[int],
+ portal_id: int,
+ subscription_type: Literal["LIST_MEMBERSHIP"],
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse1:
+ ) -> WebhooksJournalSubscriptionResponse:
"""
- Create a new webhook subscription for the specified portal in the HubSpot
- account. This endpoint allows you to define the subscription details, including
- the types of events you want to subscribe to. The request body must include the
- necessary subscription information as defined by the SubscriptionUpsertRequest
- schema.
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
"""
...
@@ -365,44 +473,125 @@ def create_journal_subscription(
def create_journal_subscription(
self,
*,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ],
+ object_type_id: str,
+ portal_id: int,
+ subscription_type: Literal["GDPR_PRIVACY_DELETION"],
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse1:
+ ) -> WebhooksJournalSubscriptionResponse:
"""
- Create a new webhook subscription for the specified portal in the HubSpot
- account. This endpoint allows you to define the subscription details, including
- the types of events you want to subscribe to. The request body must include the
- necessary subscription information as defined by the SubscriptionUpsertRequest
- schema.
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
"""
...
+ @required_args(
+ ["actions", "object_ids", "object_type_id", "portal_id", "properties", "subscription_type"],
+ ["actions", "associated_object_type_ids", "object_ids", "object_type_id", "portal_id", "subscription_type"],
+ ["event_type_id", "properties", "subscription_type"],
+ ["actions", "list_ids", "object_ids", "portal_id", "subscription_type"],
+ ["actions", "object_type_id", "portal_id", "subscription_type"],
+ )
def create_journal_subscription(
self,
*,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ]
+ | Omit = omit,
+ object_ids: Iterable[int] | Omit = omit,
+ object_type_id: str | Omit = omit,
+ portal_id: int | Omit = omit,
+ properties: SequenceNotStr[str] | Omit = omit,
+ subscription_type: Literal["OBJECT"]
+ | Literal["ASSOCIATION"]
+ | Literal["APP_LIFECYCLE_EVENT"]
+ | Literal["LIST_MEMBERSHIP"]
+ | Literal["GDPR_PRIVACY_DELETION"],
+ associated_object_type_ids: SequenceNotStr[str] | Omit = omit,
+ event_type_id: str | Omit = omit,
+ list_ids: Iterable[int] | 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse1:
+ ) -> WebhooksJournalSubscriptionResponse:
return self._post(
"/webhooks-journal/subscriptions/2026-03",
+ body=maybe_transform(
+ {
+ "actions": actions,
+ "object_ids": object_ids,
+ "object_type_id": object_type_id,
+ "portal_id": portal_id,
+ "properties": properties,
+ "subscription_type": subscription_type,
+ "associated_object_type_ids": associated_object_type_ids,
+ "event_type_id": event_type_id,
+ "list_ids": list_ids,
+ },
+ webhook_create_journal_subscription_params.WebhookCreateJournalSubscriptionParams,
+ ),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=SubscriptionResponse1,
+ cast_to=WebhooksJournalSubscriptionResponse,
)
def create_subscription_filter(
self,
*,
- filter: FilterParam,
+ filter: Filter,
subscription_id: int,
# 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.
@@ -411,12 +600,11 @@ def create_subscription_filter(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FilterCreateResponse:
- """Create a new filter for a webhook subscription in your HubSpot account.
-
- This
- endpoint allows you to define specific conditions that a webhook event must meet
- to trigger the subscription. It is useful for managing and customizing the
- behavior of webhook subscriptions based on specific criteria.
+ """
+ Create a new filter for a specific webhook subscription in the HubSpot account.
+ This endpoint allows you to define conditions that determine when a webhook
+ should be triggered. The filter is associated with a subscription identified by
+ its ID, and the request must include the filter details.
Args:
filter: Defines a single condition for searching CRM objects, specifying the property to
@@ -501,7 +689,7 @@ def delete_journal_subscription(
This
operation is useful for managing and cleaning up subscriptions that are no
- longer needed or relevant.
+ longer needed in your HubSpot account.
Args:
extra_headers: Send extra headers
@@ -535,8 +723,9 @@ def delete_journal_subscription_for_portal(
"""Delete a webhook journal subscription for a specific portal.
This operation
- removes the subscription associated with the given portalId, and no content is
- returned upon successful deletion.
+ removes the subscription associated with the given portalId, ensuring that no
+ further webhook events are sent for this portal. Use this endpoint to manage and
+ clean up subscriptions that are no longer needed.
Args:
extra_headers: Send extra headers
@@ -601,12 +790,11 @@ def delete_subscription_filter(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
- """Delete a specific filter associated with a webhook journal subscription.
+ """Remove a specific filter from the webhooks journal subscriptions.
- This
- operation is useful for managing and cleaning up filters that are no longer
- needed in your subscription setup. The endpoint requires the unique identifier
- of the filter to be deleted.
+ This operation
+ is useful for managing and cleaning up filters that are no longer needed. Once
+ deleted, the filter cannot be recovered.
Args:
extra_headers: Send extra headers
@@ -638,15 +826,15 @@ def get_earliest_journal_batch(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BatchResponseJournalFetchResponse:
- """Retrieve the earliest batch of webhook journal entries up to the specified
- count.
-
- This endpoint is useful for fetching historical webhook data in batches,
- allowing you to process or analyze the earliest entries first.
+ """
+ Retrieve the earliest batch of webhook journal entries for a specified count.
+ This endpoint is useful for accessing historical webhook data in batches,
+ allowing you to process or analyze older entries. The number of entries
+ retrieved is determined by the count parameter.
Args:
- install_portal_id: The ID of the portal installation to filter the webhook journal entries by. This
- is an integer value.
+ install_portal_id: The ID of the portal installation. This is an integer value that specifies which
+ portal's data to access.
extra_headers: Send extra headers
@@ -683,13 +871,13 @@ def get_earliest_journal_entry(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BinaryAPIResponse:
"""
- Retrieve the earliest entry from the webhooks journal for the specified version.
- This endpoint is useful for accessing the oldest records available in the
- journal, which can be helpful for auditing or historical data analysis.
+ Retrieve the earliest entry from the webhooks journal for the specified portal.
+ This endpoint is useful for accessing the first recorded webhook event in the
+ journal, which can be helpful for auditing or debugging purposes.
Args:
- install_portal_id: The ID of the portal installation to filter the journal entries. It is an
- integer.
+ install_portal_id: The ID of the portal installation to filter the journal entries by. This is an
+ integer value.
extra_headers: Send extra headers
@@ -727,13 +915,16 @@ def get_earliest_local_journal_batch(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BatchResponseJournalFetchResponse:
- """
- Retrieve the earliest batch of webhook journal entries based on the specified
- count. This endpoint is useful for fetching a specific number of the earliest
- entries in the webhook journal for analysis or processing.
+ """Retrieve the earliest batch of webhook journal entries.
+
+ This endpoint is useful
+ for accessing the oldest available data in the webhook journal, allowing users
+ to process or analyze historical webhook events. The number of entries to fetch
+ is specified by the 'count' path parameter.
Args:
- install_portal_id: The ID of the portal where the webhooks are installed. This is an integer value.
+ install_portal_id: The ID of the portal installation to filter the webhook journal entries. This is
+ an optional integer parameter.
extra_headers: Send extra headers
@@ -769,14 +960,15 @@ def get_earliest_local_journal_entry(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BinaryAPIResponse:
- """
- Retrieve the earliest entry from the webhooks journal for the specified portal.
- This endpoint is useful for accessing the oldest records in the journal, which
- can be helpful for auditing or tracking purposes.
+ """Retrieve the earliest webhook journal entries for the specified portal.
+
+ This
+ endpoint can be used to access the oldest records available in the webhook
+ journal, which may be useful for auditing or historical analysis.
Args:
- install_portal_id: The ID of the portal installation to filter the journal entries by. This
- parameter is optional and should be an integer.
+ install_portal_id: The ID of the portal for which to retrieve the earliest webhook journal entries.
+ This parameter is optional and should be an integer.
extra_headers: Send extra headers
@@ -813,7 +1005,7 @@ def get_event_subscription(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse:
+ ) -> WebhooksSubscriptionResponse:
"""
Retrieve a specific event subscription by ID.
@@ -835,7 +1027,7 @@ def get_event_subscription(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=SubscriptionResponse,
+ cast_to=WebhooksSubscriptionResponse,
)
def get_journal_batch_by_request(
@@ -851,15 +1043,17 @@ def get_journal_batch_by_request(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BatchResponseJournalFetchResponse:
"""
- Perform a batch read operation on the webhooks journal for the specified date.
- This endpoint allows you to retrieve multiple entries from the webhooks journal
- in a single request, which can be useful for processing large amounts of data
- efficiently.
+ Execute a batch read operation on the webhooks journal for the specified date,
+ 2026-03. This endpoint allows you to retrieve multiple entries from the webhooks
+ journal in a single request, which can be useful for processing large amounts of
+ data efficiently. Ensure that the request body is provided in the required
+ format.
Args:
inputs: Strings to input.
- install_portal_id: The ID of the portal where the webhooks are installed. This is an integer value.
+ install_portal_id: An integer representing the ID of the portal installation for which the webhooks
+ journal data should be retrieved.
extra_headers: Send extra headers
@@ -902,12 +1096,11 @@ def get_journal_batch_from_offset(
) -> BatchResponseJournalFetchResponse:
"""
Retrieve a batch of webhook journal entries starting from a specified offset.
- This endpoint allows you to fetch a specified number of entries, making it
- useful for paginating through large sets of webhook journal data.
+ This endpoint allows you to fetch a defined number of entries, which can be
+ useful for processing large datasets in manageable chunks.
Args:
- install_portal_id: The ID of the portal installation. This is an integer value used to specify the
- portal context for the request.
+ install_portal_id: The ID of the portal installation. This is an integer value.
extra_headers: Send extra headers
@@ -946,9 +1139,10 @@ def get_journal_status(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SnapshotStatusResponse:
"""
- Retrieve the status of a specific webhook journal entry using its status ID.
- This endpoint is useful for checking the current state of a webhook process,
- such as whether it is pending, in progress, completed, failed, or expired.
+ Retrieve the status of a specific webhook journal entry using its unique status
+ ID. This endpoint provides detailed information about the status, including
+ whether it is pending, in progress, completed, failed, or expired. It is useful
+ for monitoring and managing the state of webhook journal entries.
Args:
extra_headers: Send extra headers
@@ -979,11 +1173,11 @@ def get_journal_subscription(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse1:
+ ) -> WebhooksJournalSubscriptionResponse:
"""
Retrieve details of a specific webhook subscription using its unique identifier.
This endpoint is useful for obtaining information about a particular
- subscription's configuration and status within the HubSpot account.
+ subscription, such as its actions, object type, and associated properties.
Args:
extra_headers: Send extra headers
@@ -999,7 +1193,7 @@ def get_journal_subscription(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=SubscriptionResponse1,
+ cast_to=WebhooksJournalSubscriptionResponse,
)
def get_latest_journal_batch(
@@ -1014,15 +1208,15 @@ def get_latest_journal_batch(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BatchResponseJournalFetchResponse:
- """Retrieve the latest batch of webhook journal entries.
-
- This endpoint allows you
- to specify the number of entries to fetch, providing a way to access recent
- webhook activity within your HubSpot account.
+ """
+ Retrieve the latest batch of webhook journal entries up to the specified count.
+ This endpoint is useful for fetching recent webhook data for analysis or
+ processing. The count parameter determines the maximum number of entries to
+ return.
Args:
- install_portal_id: The ID of the portal installation. This is an integer value used to identify the
- specific portal.
+ install_portal_id: The ID of the portal installation. This is an integer value used to specify the
+ portal context for the request.
extra_headers: Send extra headers
@@ -1060,13 +1254,12 @@ def get_latest_journal_entry(
) -> BinaryAPIResponse:
"""
Retrieve the latest entries from the webhooks journal for the specified portal.
- This endpoint is useful for accessing the most recent webhook events processed
- by your HubSpot account. It allows you to filter the results by the portal ID to
- ensure you are retrieving data relevant to a specific installation.
+ This endpoint is useful for accessing the most recent webhook events and their
+ statuses, allowing you to monitor and debug webhook activity effectively.
Args:
- install_portal_id: The ID of the portal installation to filter the journal entries. It is an
- integer value.
+ install_portal_id: The unique identifier of the portal installation for which to retrieve the
+ latest journal entries. This parameter is optional and should be an integer.
extra_headers: Send extra headers
@@ -1106,13 +1299,13 @@ def get_latest_local_journal_batch(
) -> BatchResponseJournalFetchResponse:
"""Retrieve the latest batch of webhook journal entries.
- This endpoint is useful
- for accessing the most recent data entries processed by the webhook journal. It
- requires specifying the number of entries to retrieve.
+ This endpoint allows you
+ to specify the number of entries to fetch, providing a way to access the most
+ recent webhook events processed by your HubSpot account.
Args:
- install_portal_id: The ID of the portal installation. This parameter is optional and used to filter
- the journal entries by a specific portal.
+ install_portal_id: The ID of the portal where the webhook journal is installed. This parameter is
+ optional and used to specify the target portal.
extra_headers: Send extra headers
@@ -1151,11 +1344,12 @@ def get_latest_local_journal_entry(
"""
Retrieve the latest entries from the webhooks journal for the specified portal.
This endpoint is useful for accessing the most recent webhook events that have
- been logged, allowing you to process or analyze them as needed.
+ been logged, allowing for real-time monitoring or debugging of webhook
+ activities.
Args:
- install_portal_id: The ID of the portal for which to retrieve the latest journal entries. This
- parameter is optional and should be an integer.
+ install_portal_id: The ID of the portal for which to retrieve the latest journal entries. This is
+ an integer value.
extra_headers: Send extra headers
@@ -1193,19 +1387,18 @@ def get_local_journal_batch_by_request(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BatchResponseJournalFetchResponse:
- """Perform a batch read operation on the webhooks journal.
+ """Execute a batch read operation on the webhooks journal.
This endpoint allows you
- to read multiple entries from the journal in a single request. It requires a
- JSON request body specifying the inputs to be read. The response includes the
- results of the batch read operation, and may return multiple statuses if there
- are errors.
+ to retrieve a batch of webhook journal entries by providing the necessary input
+ data. It is useful for processing multiple records in a single request,
+ streamlining data retrieval tasks.
Args:
inputs: Strings to input.
install_portal_id: The ID of the portal where the webhooks are installed. This parameter is
- optional and is used to specify the target portal.
+ optional and is used to specify the target portal for the operation.
extra_headers: Send extra headers
@@ -1249,12 +1442,12 @@ def get_local_journal_batch_from_offset(
) -> BatchResponseJournalFetchResponse:
"""
Retrieve a batch of webhook journal entries starting from a specified offset.
- This endpoint allows you to fetch a defined number of entries, facilitating the
- processing of webhook data in manageable chunks.
+ This endpoint is useful for paginating through large sets of webhook data. The
+ number of entries returned is determined by the 'count' parameter.
Args:
- install_portal_id: The ID of the portal installation. This is an integer value used to specify the
- portal context for the request.
+ install_portal_id: The ID of the portal where the webhooks are installed. This is an optional
+ parameter.
extra_headers: Send extra headers
@@ -1296,8 +1489,9 @@ def get_local_journal_status(
) -> SnapshotStatusResponse:
"""
Retrieve the status of a specific webhook journal entry using its unique status
- ID. This endpoint is useful for monitoring the progress or completion of webhook
- processing tasks.
+ ID. This endpoint is useful for monitoring the progress or outcome of webhook
+ journal entries, allowing you to check if an entry is pending, in progress,
+ completed, failed, or expired.
Args:
extra_headers: Send extra headers
@@ -1331,13 +1525,12 @@ def get_next_journal_entries(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BinaryAPIResponse:
"""
- Retrieve the next batch of webhook journal entries starting from a specified
- offset. This endpoint is useful for paginating through large sets of webhook
- data, allowing you to continue fetching entries from where you last left off.
+ Retrieve the next set of entries from the webhooks journal starting from a
+ specified offset. This endpoint is useful for paginating through journal entries
+ to process or analyze webhook events sequentially.
Args:
- install_portal_id: The ID of the portal installation to filter the webhook journal entries. This is
- an optional parameter.
+ install_portal_id: The ID of the portal where the webhooks are installed. This is an integer value.
extra_headers: Send extra headers
@@ -1379,11 +1572,12 @@ def get_next_local_journal_entries(
) -> BinaryAPIResponse:
"""
Retrieve the next set of webhook journal entries starting from a specified
- offset. This endpoint is useful for paginating through webhook journal data in a
- sequential manner, allowing you to fetch entries beyond a given point.
+ offset. This endpoint is useful for paginating through large sets of webhook
+ data, allowing you to continue from where a previous request left off.
Args:
- install_portal_id: The ID of the portal where the webhook is installed. This is an integer value.
+ install_portal_id: The ID of the portal installation to filter the webhook journal entries. This is
+ an integer value.
extra_headers: Send extra headers
@@ -1454,10 +1648,12 @@ def get_subscription_filter(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FilterResponse:
- """
- Retrieve details of a specific filter associated with a webhook subscription in
- the HubSpot account. This endpoint is useful for accessing the configuration and
- conditions of a filter by its unique identifier.
+ """Retrieve a specific filter associated with a webhook journal subscription.
+
+ This
+ endpoint allows you to access the details of the filter identified by the
+ filterId, which is useful for managing and understanding the conditions applied
+ to webhook events.
Args:
extra_headers: Send extra headers
@@ -1517,11 +1713,12 @@ def list_journal_subscriptions(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CollectionResponseSubscriptionResponseNoPaging:
- """
- Retrieve a list of webhook journal subscriptions for the specified API version.
- This endpoint provides details about each subscription, including actions,
- object types, and associated properties. It is useful for managing and reviewing
- current webhook subscriptions.
+ """Retrieve a list of webhook journal subscriptions for the specified version.
+
+ This
+ endpoint allows you to view all active subscriptions without pagination. It is
+ useful for monitoring and managing webhook subscriptions in your HubSpot
+ account.
"""
return self._get(
"/webhooks-journal/subscriptions/2026-03",
@@ -1542,11 +1739,11 @@ def list_subscription_filters(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> WebhookListSubscriptionFiltersResponse:
- """
- Retrieve the filters associated with a specific webhook subscription in the
- HubSpot account. This endpoint is useful for obtaining detailed information
- about the filters applied to a given subscription, identified by its
- subscription ID.
+ """Retrieve the filters associated with a specific webhook subscription.
+
+ This
+ endpoint allows you to view the filters applied to a subscription, which can
+ help in managing and understanding the conditions set for webhook events.
Args:
extra_headers: Send extra headers
@@ -1580,7 +1777,7 @@ def update_event_subscription(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse:
+ ) -> WebhooksSubscriptionResponse:
"""
Update an existing event subscription by ID.
@@ -1608,7 +1805,7 @@ def update_event_subscription(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=SubscriptionResponse,
+ cast_to=WebhooksSubscriptionResponse,
)
def update_settings(
@@ -1716,7 +1913,7 @@ async def create_batch_event_subscriptions(
async def create_crm_snapshots(
self,
*,
- snapshot_requests: Iterable[CrmObjectSnapshotRequestParam],
+ snapshot_requests: Iterable[CrmObjectSnapshotRequest],
# 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,
@@ -1724,13 +1921,12 @@ async def create_crm_snapshots(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CrmObjectSnapshotBatchResponse:
- """Create a batch of CRM object snapshots for the specified portal.
+ """Create a batch of CRM object snapshots in HubSpot.
- This endpoint
- allows you to capture the state of CRM objects at a specific point in time,
- which can be useful for auditing or historical analysis. The request requires a
- list of CRM object snapshot requests, each specifying the portal ID, object ID,
- object type ID, and properties to include in the snapshot.
+ This endpoint is used to
+ capture the current state of specified CRM objects for later reference or
+ analysis. It requires a JSON payload containing the details of the CRM objects
+ to snapshot. This operation is exempt from daily and ten-secondly rate limits.
Args:
snapshot_requests: An array of CrmObjectSnapshotRequest objects, each representing a request to
@@ -1820,7 +2016,7 @@ async def create_event_subscription(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse:
+ ) -> WebhooksSubscriptionResponse:
"""
Create new event subscription for the specified app.
@@ -1862,26 +2058,58 @@ async def create_event_subscription(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=SubscriptionResponse,
+ cast_to=WebhooksSubscriptionResponse,
)
@overload
async def create_journal_subscription(
self,
*,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ],
+ object_ids: Iterable[int],
+ object_type_id: str,
+ portal_id: int,
+ properties: SequenceNotStr[str],
+ subscription_type: Literal["OBJECT"],
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse1:
+ ) -> WebhooksJournalSubscriptionResponse:
"""
- Create a new webhook subscription for the specified portal in the HubSpot
- account. This endpoint allows you to define the subscription details, including
- the types of events you want to subscribe to. The request body must include the
- necessary subscription information as defined by the SubscriptionUpsertRequest
- schema.
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
"""
...
@@ -1889,19 +2117,51 @@ async def create_journal_subscription(
async def create_journal_subscription(
self,
*,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ],
+ associated_object_type_ids: SequenceNotStr[str],
+ object_ids: Iterable[int],
+ object_type_id: str,
+ portal_id: int,
+ subscription_type: Literal["ASSOCIATION"],
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse1:
+ ) -> WebhooksJournalSubscriptionResponse:
"""
- Create a new webhook subscription for the specified portal in the HubSpot
- account. This endpoint allows you to define the subscription details, including
- the types of events you want to subscribe to. The request body must include the
- necessary subscription information as defined by the SubscriptionUpsertRequest
- schema.
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
"""
...
@@ -1909,19 +2169,32 @@ async def create_journal_subscription(
async def create_journal_subscription(
self,
*,
+ event_type_id: str,
+ properties: SequenceNotStr[str],
+ subscription_type: Literal["APP_LIFECYCLE_EVENT"],
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse1:
+ ) -> WebhooksJournalSubscriptionResponse:
"""
- Create a new webhook subscription for the specified portal in the HubSpot
- account. This endpoint allows you to define the subscription details, including
- the types of events you want to subscribe to. The request body must include the
- necessary subscription information as defined by the SubscriptionUpsertRequest
- schema.
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
"""
...
@@ -1929,19 +2202,50 @@ async def create_journal_subscription(
async def create_journal_subscription(
self,
*,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ],
+ list_ids: Iterable[int],
+ object_ids: Iterable[int],
+ portal_id: int,
+ subscription_type: Literal["LIST_MEMBERSHIP"],
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse1:
+ ) -> WebhooksJournalSubscriptionResponse:
"""
- Create a new webhook subscription for the specified portal in the HubSpot
- account. This endpoint allows you to define the subscription details, including
- the types of events you want to subscribe to. The request body must include the
- necessary subscription information as defined by the SubscriptionUpsertRequest
- schema.
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
"""
...
@@ -1949,44 +2253,125 @@ async def create_journal_subscription(
async def create_journal_subscription(
self,
*,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ],
+ object_type_id: str,
+ portal_id: int,
+ subscription_type: Literal["GDPR_PRIVACY_DELETION"],
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse1:
+ ) -> WebhooksJournalSubscriptionResponse:
"""
- Create a new webhook subscription for the specified portal in the HubSpot
- account. This endpoint allows you to define the subscription details, including
- the types of events you want to subscribe to. The request body must include the
- necessary subscription information as defined by the SubscriptionUpsertRequest
- schema.
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
"""
...
+ @required_args(
+ ["actions", "object_ids", "object_type_id", "portal_id", "properties", "subscription_type"],
+ ["actions", "associated_object_type_ids", "object_ids", "object_type_id", "portal_id", "subscription_type"],
+ ["event_type_id", "properties", "subscription_type"],
+ ["actions", "list_ids", "object_ids", "portal_id", "subscription_type"],
+ ["actions", "object_type_id", "portal_id", "subscription_type"],
+ )
async def create_journal_subscription(
self,
*,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ]
+ | Omit = omit,
+ object_ids: Iterable[int] | Omit = omit,
+ object_type_id: str | Omit = omit,
+ portal_id: int | Omit = omit,
+ properties: SequenceNotStr[str] | Omit = omit,
+ subscription_type: Literal["OBJECT"]
+ | Literal["ASSOCIATION"]
+ | Literal["APP_LIFECYCLE_EVENT"]
+ | Literal["LIST_MEMBERSHIP"]
+ | Literal["GDPR_PRIVACY_DELETION"],
+ associated_object_type_ids: SequenceNotStr[str] | Omit = omit,
+ event_type_id: str | Omit = omit,
+ list_ids: Iterable[int] | 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse1:
+ ) -> WebhooksJournalSubscriptionResponse:
return await self._post(
"/webhooks-journal/subscriptions/2026-03",
+ body=await async_maybe_transform(
+ {
+ "actions": actions,
+ "object_ids": object_ids,
+ "object_type_id": object_type_id,
+ "portal_id": portal_id,
+ "properties": properties,
+ "subscription_type": subscription_type,
+ "associated_object_type_ids": associated_object_type_ids,
+ "event_type_id": event_type_id,
+ "list_ids": list_ids,
+ },
+ webhook_create_journal_subscription_params.WebhookCreateJournalSubscriptionParams,
+ ),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=SubscriptionResponse1,
+ cast_to=WebhooksJournalSubscriptionResponse,
)
async def create_subscription_filter(
self,
*,
- filter: FilterParam,
+ filter: Filter,
subscription_id: int,
# 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.
@@ -1995,12 +2380,11 @@ async def create_subscription_filter(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FilterCreateResponse:
- """Create a new filter for a webhook subscription in your HubSpot account.
-
- This
- endpoint allows you to define specific conditions that a webhook event must meet
- to trigger the subscription. It is useful for managing and customizing the
- behavior of webhook subscriptions based on specific criteria.
+ """
+ Create a new filter for a specific webhook subscription in the HubSpot account.
+ This endpoint allows you to define conditions that determine when a webhook
+ should be triggered. The filter is associated with a subscription identified by
+ its ID, and the request must include the filter details.
Args:
filter: Defines a single condition for searching CRM objects, specifying the property to
@@ -2085,7 +2469,7 @@ async def delete_journal_subscription(
This
operation is useful for managing and cleaning up subscriptions that are no
- longer needed or relevant.
+ longer needed in your HubSpot account.
Args:
extra_headers: Send extra headers
@@ -2119,8 +2503,9 @@ async def delete_journal_subscription_for_portal(
"""Delete a webhook journal subscription for a specific portal.
This operation
- removes the subscription associated with the given portalId, and no content is
- returned upon successful deletion.
+ removes the subscription associated with the given portalId, ensuring that no
+ further webhook events are sent for this portal. Use this endpoint to manage and
+ clean up subscriptions that are no longer needed.
Args:
extra_headers: Send extra headers
@@ -2185,12 +2570,11 @@ async def delete_subscription_filter(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
- """Delete a specific filter associated with a webhook journal subscription.
+ """Remove a specific filter from the webhooks journal subscriptions.
- This
- operation is useful for managing and cleaning up filters that are no longer
- needed in your subscription setup. The endpoint requires the unique identifier
- of the filter to be deleted.
+ This operation
+ is useful for managing and cleaning up filters that are no longer needed. Once
+ deleted, the filter cannot be recovered.
Args:
extra_headers: Send extra headers
@@ -2222,15 +2606,15 @@ async def get_earliest_journal_batch(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BatchResponseJournalFetchResponse:
- """Retrieve the earliest batch of webhook journal entries up to the specified
- count.
-
- This endpoint is useful for fetching historical webhook data in batches,
- allowing you to process or analyze the earliest entries first.
+ """
+ Retrieve the earliest batch of webhook journal entries for a specified count.
+ This endpoint is useful for accessing historical webhook data in batches,
+ allowing you to process or analyze older entries. The number of entries
+ retrieved is determined by the count parameter.
Args:
- install_portal_id: The ID of the portal installation to filter the webhook journal entries by. This
- is an integer value.
+ install_portal_id: The ID of the portal installation. This is an integer value that specifies which
+ portal's data to access.
extra_headers: Send extra headers
@@ -2267,13 +2651,13 @@ async def get_earliest_journal_entry(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncBinaryAPIResponse:
"""
- Retrieve the earliest entry from the webhooks journal for the specified version.
- This endpoint is useful for accessing the oldest records available in the
- journal, which can be helpful for auditing or historical data analysis.
+ Retrieve the earliest entry from the webhooks journal for the specified portal.
+ This endpoint is useful for accessing the first recorded webhook event in the
+ journal, which can be helpful for auditing or debugging purposes.
Args:
- install_portal_id: The ID of the portal installation to filter the journal entries. It is an
- integer.
+ install_portal_id: The ID of the portal installation to filter the journal entries by. This is an
+ integer value.
extra_headers: Send extra headers
@@ -2311,13 +2695,16 @@ async def get_earliest_local_journal_batch(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BatchResponseJournalFetchResponse:
- """
- Retrieve the earliest batch of webhook journal entries based on the specified
- count. This endpoint is useful for fetching a specific number of the earliest
- entries in the webhook journal for analysis or processing.
+ """Retrieve the earliest batch of webhook journal entries.
+
+ This endpoint is useful
+ for accessing the oldest available data in the webhook journal, allowing users
+ to process or analyze historical webhook events. The number of entries to fetch
+ is specified by the 'count' path parameter.
Args:
- install_portal_id: The ID of the portal where the webhooks are installed. This is an integer value.
+ install_portal_id: The ID of the portal installation to filter the webhook journal entries. This is
+ an optional integer parameter.
extra_headers: Send extra headers
@@ -2353,14 +2740,15 @@ async def get_earliest_local_journal_entry(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncBinaryAPIResponse:
- """
- Retrieve the earliest entry from the webhooks journal for the specified portal.
- This endpoint is useful for accessing the oldest records in the journal, which
- can be helpful for auditing or tracking purposes.
+ """Retrieve the earliest webhook journal entries for the specified portal.
+
+ This
+ endpoint can be used to access the oldest records available in the webhook
+ journal, which may be useful for auditing or historical analysis.
Args:
- install_portal_id: The ID of the portal installation to filter the journal entries by. This
- parameter is optional and should be an integer.
+ install_portal_id: The ID of the portal for which to retrieve the earliest webhook journal entries.
+ This parameter is optional and should be an integer.
extra_headers: Send extra headers
@@ -2397,7 +2785,7 @@ async def get_event_subscription(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse:
+ ) -> WebhooksSubscriptionResponse:
"""
Retrieve a specific event subscription by ID.
@@ -2419,7 +2807,7 @@ async def get_event_subscription(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=SubscriptionResponse,
+ cast_to=WebhooksSubscriptionResponse,
)
async def get_journal_batch_by_request(
@@ -2435,15 +2823,17 @@ async def get_journal_batch_by_request(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BatchResponseJournalFetchResponse:
"""
- Perform a batch read operation on the webhooks journal for the specified date.
- This endpoint allows you to retrieve multiple entries from the webhooks journal
- in a single request, which can be useful for processing large amounts of data
- efficiently.
+ Execute a batch read operation on the webhooks journal for the specified date,
+ 2026-03. This endpoint allows you to retrieve multiple entries from the webhooks
+ journal in a single request, which can be useful for processing large amounts of
+ data efficiently. Ensure that the request body is provided in the required
+ format.
Args:
inputs: Strings to input.
- install_portal_id: The ID of the portal where the webhooks are installed. This is an integer value.
+ install_portal_id: An integer representing the ID of the portal installation for which the webhooks
+ journal data should be retrieved.
extra_headers: Send extra headers
@@ -2486,12 +2876,11 @@ async def get_journal_batch_from_offset(
) -> BatchResponseJournalFetchResponse:
"""
Retrieve a batch of webhook journal entries starting from a specified offset.
- This endpoint allows you to fetch a specified number of entries, making it
- useful for paginating through large sets of webhook journal data.
+ This endpoint allows you to fetch a defined number of entries, which can be
+ useful for processing large datasets in manageable chunks.
Args:
- install_portal_id: The ID of the portal installation. This is an integer value used to specify the
- portal context for the request.
+ install_portal_id: The ID of the portal installation. This is an integer value.
extra_headers: Send extra headers
@@ -2530,9 +2919,10 @@ async def get_journal_status(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SnapshotStatusResponse:
"""
- Retrieve the status of a specific webhook journal entry using its status ID.
- This endpoint is useful for checking the current state of a webhook process,
- such as whether it is pending, in progress, completed, failed, or expired.
+ Retrieve the status of a specific webhook journal entry using its unique status
+ ID. This endpoint provides detailed information about the status, including
+ whether it is pending, in progress, completed, failed, or expired. It is useful
+ for monitoring and managing the state of webhook journal entries.
Args:
extra_headers: Send extra headers
@@ -2563,11 +2953,11 @@ async def get_journal_subscription(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse1:
+ ) -> WebhooksJournalSubscriptionResponse:
"""
Retrieve details of a specific webhook subscription using its unique identifier.
This endpoint is useful for obtaining information about a particular
- subscription's configuration and status within the HubSpot account.
+ subscription, such as its actions, object type, and associated properties.
Args:
extra_headers: Send extra headers
@@ -2583,7 +2973,7 @@ async def get_journal_subscription(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=SubscriptionResponse1,
+ cast_to=WebhooksJournalSubscriptionResponse,
)
async def get_latest_journal_batch(
@@ -2598,15 +2988,15 @@ async def get_latest_journal_batch(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BatchResponseJournalFetchResponse:
- """Retrieve the latest batch of webhook journal entries.
-
- This endpoint allows you
- to specify the number of entries to fetch, providing a way to access recent
- webhook activity within your HubSpot account.
+ """
+ Retrieve the latest batch of webhook journal entries up to the specified count.
+ This endpoint is useful for fetching recent webhook data for analysis or
+ processing. The count parameter determines the maximum number of entries to
+ return.
Args:
- install_portal_id: The ID of the portal installation. This is an integer value used to identify the
- specific portal.
+ install_portal_id: The ID of the portal installation. This is an integer value used to specify the
+ portal context for the request.
extra_headers: Send extra headers
@@ -2644,13 +3034,12 @@ async def get_latest_journal_entry(
) -> AsyncBinaryAPIResponse:
"""
Retrieve the latest entries from the webhooks journal for the specified portal.
- This endpoint is useful for accessing the most recent webhook events processed
- by your HubSpot account. It allows you to filter the results by the portal ID to
- ensure you are retrieving data relevant to a specific installation.
+ This endpoint is useful for accessing the most recent webhook events and their
+ statuses, allowing you to monitor and debug webhook activity effectively.
Args:
- install_portal_id: The ID of the portal installation to filter the journal entries. It is an
- integer value.
+ install_portal_id: The unique identifier of the portal installation for which to retrieve the
+ latest journal entries. This parameter is optional and should be an integer.
extra_headers: Send extra headers
@@ -2690,13 +3079,13 @@ async def get_latest_local_journal_batch(
) -> BatchResponseJournalFetchResponse:
"""Retrieve the latest batch of webhook journal entries.
- This endpoint is useful
- for accessing the most recent data entries processed by the webhook journal. It
- requires specifying the number of entries to retrieve.
+ This endpoint allows you
+ to specify the number of entries to fetch, providing a way to access the most
+ recent webhook events processed by your HubSpot account.
Args:
- install_portal_id: The ID of the portal installation. This parameter is optional and used to filter
- the journal entries by a specific portal.
+ install_portal_id: The ID of the portal where the webhook journal is installed. This parameter is
+ optional and used to specify the target portal.
extra_headers: Send extra headers
@@ -2735,11 +3124,12 @@ async def get_latest_local_journal_entry(
"""
Retrieve the latest entries from the webhooks journal for the specified portal.
This endpoint is useful for accessing the most recent webhook events that have
- been logged, allowing you to process or analyze them as needed.
+ been logged, allowing for real-time monitoring or debugging of webhook
+ activities.
Args:
- install_portal_id: The ID of the portal for which to retrieve the latest journal entries. This
- parameter is optional and should be an integer.
+ install_portal_id: The ID of the portal for which to retrieve the latest journal entries. This is
+ an integer value.
extra_headers: Send extra headers
@@ -2777,19 +3167,18 @@ async def get_local_journal_batch_by_request(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BatchResponseJournalFetchResponse:
- """Perform a batch read operation on the webhooks journal.
+ """Execute a batch read operation on the webhooks journal.
This endpoint allows you
- to read multiple entries from the journal in a single request. It requires a
- JSON request body specifying the inputs to be read. The response includes the
- results of the batch read operation, and may return multiple statuses if there
- are errors.
+ to retrieve a batch of webhook journal entries by providing the necessary input
+ data. It is useful for processing multiple records in a single request,
+ streamlining data retrieval tasks.
Args:
inputs: Strings to input.
install_portal_id: The ID of the portal where the webhooks are installed. This parameter is
- optional and is used to specify the target portal.
+ optional and is used to specify the target portal for the operation.
extra_headers: Send extra headers
@@ -2833,12 +3222,12 @@ async def get_local_journal_batch_from_offset(
) -> BatchResponseJournalFetchResponse:
"""
Retrieve a batch of webhook journal entries starting from a specified offset.
- This endpoint allows you to fetch a defined number of entries, facilitating the
- processing of webhook data in manageable chunks.
+ This endpoint is useful for paginating through large sets of webhook data. The
+ number of entries returned is determined by the 'count' parameter.
Args:
- install_portal_id: The ID of the portal installation. This is an integer value used to specify the
- portal context for the request.
+ install_portal_id: The ID of the portal where the webhooks are installed. This is an optional
+ parameter.
extra_headers: Send extra headers
@@ -2880,8 +3269,9 @@ async def get_local_journal_status(
) -> SnapshotStatusResponse:
"""
Retrieve the status of a specific webhook journal entry using its unique status
- ID. This endpoint is useful for monitoring the progress or completion of webhook
- processing tasks.
+ ID. This endpoint is useful for monitoring the progress or outcome of webhook
+ journal entries, allowing you to check if an entry is pending, in progress,
+ completed, failed, or expired.
Args:
extra_headers: Send extra headers
@@ -2915,13 +3305,12 @@ async def get_next_journal_entries(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncBinaryAPIResponse:
"""
- Retrieve the next batch of webhook journal entries starting from a specified
- offset. This endpoint is useful for paginating through large sets of webhook
- data, allowing you to continue fetching entries from where you last left off.
+ Retrieve the next set of entries from the webhooks journal starting from a
+ specified offset. This endpoint is useful for paginating through journal entries
+ to process or analyze webhook events sequentially.
Args:
- install_portal_id: The ID of the portal installation to filter the webhook journal entries. This is
- an optional parameter.
+ install_portal_id: The ID of the portal where the webhooks are installed. This is an integer value.
extra_headers: Send extra headers
@@ -2963,11 +3352,12 @@ async def get_next_local_journal_entries(
) -> AsyncBinaryAPIResponse:
"""
Retrieve the next set of webhook journal entries starting from a specified
- offset. This endpoint is useful for paginating through webhook journal data in a
- sequential manner, allowing you to fetch entries beyond a given point.
+ offset. This endpoint is useful for paginating through large sets of webhook
+ data, allowing you to continue from where a previous request left off.
Args:
- install_portal_id: The ID of the portal where the webhook is installed. This is an integer value.
+ install_portal_id: The ID of the portal installation to filter the webhook journal entries. This is
+ an integer value.
extra_headers: Send extra headers
@@ -3038,10 +3428,12 @@ async def get_subscription_filter(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FilterResponse:
- """
- Retrieve details of a specific filter associated with a webhook subscription in
- the HubSpot account. This endpoint is useful for accessing the configuration and
- conditions of a filter by its unique identifier.
+ """Retrieve a specific filter associated with a webhook journal subscription.
+
+ This
+ endpoint allows you to access the details of the filter identified by the
+ filterId, which is useful for managing and understanding the conditions applied
+ to webhook events.
Args:
extra_headers: Send extra headers
@@ -3101,11 +3493,12 @@ async def list_journal_subscriptions(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> CollectionResponseSubscriptionResponseNoPaging:
- """
- Retrieve a list of webhook journal subscriptions for the specified API version.
- This endpoint provides details about each subscription, including actions,
- object types, and associated properties. It is useful for managing and reviewing
- current webhook subscriptions.
+ """Retrieve a list of webhook journal subscriptions for the specified version.
+
+ This
+ endpoint allows you to view all active subscriptions without pagination. It is
+ useful for monitoring and managing webhook subscriptions in your HubSpot
+ account.
"""
return await self._get(
"/webhooks-journal/subscriptions/2026-03",
@@ -3126,11 +3519,11 @@ async def list_subscription_filters(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> WebhookListSubscriptionFiltersResponse:
- """
- Retrieve the filters associated with a specific webhook subscription in the
- HubSpot account. This endpoint is useful for obtaining detailed information
- about the filters applied to a given subscription, identified by its
- subscription ID.
+ """Retrieve the filters associated with a specific webhook subscription.
+
+ This
+ endpoint allows you to view the filters applied to a subscription, which can
+ help in managing and understanding the conditions set for webhook events.
Args:
extra_headers: Send extra headers
@@ -3164,7 +3557,7 @@ async def update_event_subscription(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SubscriptionResponse:
+ ) -> WebhooksSubscriptionResponse:
"""
Update an existing event subscription by ID.
@@ -3192,7 +3585,7 @@ async def update_event_subscription(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=SubscriptionResponse,
+ cast_to=WebhooksSubscriptionResponse,
)
async def update_settings(
diff --git a/src/hubspot_sdk/resources/webhooks_journal/__init__.py b/src/hubspot_sdk/resources/webhooks_journal/__init__.py
new file mode 100644
index 00000000..6ca48580
--- /dev/null
+++ b/src/hubspot_sdk/resources/webhooks_journal/__init__.py
@@ -0,0 +1,75 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .journal import (
+ JournalResource,
+ AsyncJournalResource,
+ JournalResourceWithRawResponse,
+ AsyncJournalResourceWithRawResponse,
+ JournalResourceWithStreamingResponse,
+ AsyncJournalResourceWithStreamingResponse,
+)
+from .snapshots import (
+ SnapshotsResource,
+ AsyncSnapshotsResource,
+ SnapshotsResourceWithRawResponse,
+ AsyncSnapshotsResourceWithRawResponse,
+ SnapshotsResourceWithStreamingResponse,
+ AsyncSnapshotsResourceWithStreamingResponse,
+)
+from .journal_local import (
+ JournalLocalResource,
+ AsyncJournalLocalResource,
+ JournalLocalResourceWithRawResponse,
+ AsyncJournalLocalResourceWithRawResponse,
+ JournalLocalResourceWithStreamingResponse,
+ AsyncJournalLocalResourceWithStreamingResponse,
+)
+from .subscriptions import (
+ SubscriptionsResource,
+ AsyncSubscriptionsResource,
+ SubscriptionsResourceWithRawResponse,
+ AsyncSubscriptionsResourceWithRawResponse,
+ SubscriptionsResourceWithStreamingResponse,
+ AsyncSubscriptionsResourceWithStreamingResponse,
+)
+from .webhooks_journal import (
+ WebhooksJournalResource,
+ AsyncWebhooksJournalResource,
+ WebhooksJournalResourceWithRawResponse,
+ AsyncWebhooksJournalResourceWithRawResponse,
+ WebhooksJournalResourceWithStreamingResponse,
+ AsyncWebhooksJournalResourceWithStreamingResponse,
+)
+
+__all__ = [
+ "JournalResource",
+ "AsyncJournalResource",
+ "JournalResourceWithRawResponse",
+ "AsyncJournalResourceWithRawResponse",
+ "JournalResourceWithStreamingResponse",
+ "AsyncJournalResourceWithStreamingResponse",
+ "JournalLocalResource",
+ "AsyncJournalLocalResource",
+ "JournalLocalResourceWithRawResponse",
+ "AsyncJournalLocalResourceWithRawResponse",
+ "JournalLocalResourceWithStreamingResponse",
+ "AsyncJournalLocalResourceWithStreamingResponse",
+ "SnapshotsResource",
+ "AsyncSnapshotsResource",
+ "SnapshotsResourceWithRawResponse",
+ "AsyncSnapshotsResourceWithRawResponse",
+ "SnapshotsResourceWithStreamingResponse",
+ "AsyncSnapshotsResourceWithStreamingResponse",
+ "SubscriptionsResource",
+ "AsyncSubscriptionsResource",
+ "SubscriptionsResourceWithRawResponse",
+ "AsyncSubscriptionsResourceWithRawResponse",
+ "SubscriptionsResourceWithStreamingResponse",
+ "AsyncSubscriptionsResourceWithStreamingResponse",
+ "WebhooksJournalResource",
+ "AsyncWebhooksJournalResource",
+ "WebhooksJournalResourceWithRawResponse",
+ "AsyncWebhooksJournalResourceWithRawResponse",
+ "WebhooksJournalResourceWithStreamingResponse",
+ "AsyncWebhooksJournalResourceWithStreamingResponse",
+]
diff --git a/src/hubspot_sdk/resources/webhooks_journal/api.md b/src/hubspot_sdk/resources/webhooks_journal/api.md
new file mode 100644
index 00000000..bf2e9125
--- /dev/null
+++ b/src/hubspot_sdk/resources/webhooks_journal/api.md
@@ -0,0 +1,75 @@
+# WebhooksJournal
+
+Types:
+
+```python
+from hubspot_sdk.types.webhooks_journal import (
+ CollectionResponseSubscriptionResponseNoPaging,
+ SubscriptionResponse,
+)
+```
+
+## Journal
+
+Methods:
+
+- client.webhooks_journal.journal.get_earliest(\*\*params) -> BinaryAPIResponse
+- client.webhooks_journal.journal.get_next_from_offset(offset, \*\*params) -> BinaryAPIResponse
+- client.webhooks_journal.journal.get_status(status_id) -> SnapshotStatusResponse
+
+### Batch
+
+Methods:
+
+- client.webhooks_journal.journal.batch.get(\*\*params) -> BatchResponseJournalFetchResponse
+- client.webhooks_journal.journal.batch.get_earliest(count, \*\*params) -> BatchResponseJournalFetchResponse
+- client.webhooks_journal.journal.batch.get_from_offset(count, \*, offset, \*\*params) -> BatchResponseJournalFetchResponse
+- client.webhooks_journal.journal.batch.get_latest(count, \*\*params) -> BatchResponseJournalFetchResponse
+
+## JournalLocal
+
+Methods:
+
+- client.webhooks_journal.journal_local.get_earliest(\*\*params) -> BinaryAPIResponse
+- client.webhooks_journal.journal_local.get_latest(\*\*params) -> BinaryAPIResponse
+- client.webhooks_journal.journal_local.get_next_from_offset(offset, \*\*params) -> BinaryAPIResponse
+- client.webhooks_journal.journal_local.get_status(status_id) -> SnapshotStatusResponse
+
+### Batch
+
+Methods:
+
+- client.webhooks_journal.journal_local.batch.get(\*\*params) -> BatchResponseJournalFetchResponse
+- client.webhooks_journal.journal_local.batch.get_earliest(count, \*\*params) -> BatchResponseJournalFetchResponse
+- client.webhooks_journal.journal_local.batch.get_from_offset(count, \*, offset, \*\*params) -> BatchResponseJournalFetchResponse
+
+## Snapshots
+
+Methods:
+
+- client.webhooks_journal.snapshots.create(\*\*params) -> CrmObjectSnapshotBatchResponse
+
+## Subscriptions
+
+Methods:
+
+- client.webhooks_journal.subscriptions.create(\*\*params) -> SubscriptionResponse
+- client.webhooks_journal.subscriptions.list() -> CollectionResponseSubscriptionResponseNoPaging
+- client.webhooks_journal.subscriptions.delete(subscription_id) -> None
+- client.webhooks_journal.subscriptions.delete_for_portal(portal_id) -> None
+- client.webhooks_journal.subscriptions.get(subscription_id) -> SubscriptionResponse
+
+### Filters
+
+Types:
+
+```python
+from hubspot_sdk.types.webhooks_journal.subscriptions import FilterListResponse
+```
+
+Methods:
+
+- client.webhooks_journal.subscriptions.filters.create(\*\*params) -> FilterCreateResponse
+- client.webhooks_journal.subscriptions.filters.list(subscription_id) -> FilterListResponse
+- client.webhooks_journal.subscriptions.filters.delete(filter_id) -> None
+- client.webhooks_journal.subscriptions.filters.get(filter_id) -> FilterResponse
diff --git a/src/hubspot_sdk/resources/webhooks_journal/journal/__init__.py b/src/hubspot_sdk/resources/webhooks_journal/journal/__init__.py
new file mode 100644
index 00000000..10691be0
--- /dev/null
+++ b/src/hubspot_sdk/resources/webhooks_journal/journal/__init__.py
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .batch import (
+ BatchResource,
+ AsyncBatchResource,
+ BatchResourceWithRawResponse,
+ AsyncBatchResourceWithRawResponse,
+ BatchResourceWithStreamingResponse,
+ AsyncBatchResourceWithStreamingResponse,
+)
+from .journal import (
+ JournalResource,
+ AsyncJournalResource,
+ JournalResourceWithRawResponse,
+ AsyncJournalResourceWithRawResponse,
+ JournalResourceWithStreamingResponse,
+ AsyncJournalResourceWithStreamingResponse,
+)
+
+__all__ = [
+ "BatchResource",
+ "AsyncBatchResource",
+ "BatchResourceWithRawResponse",
+ "AsyncBatchResourceWithRawResponse",
+ "BatchResourceWithStreamingResponse",
+ "AsyncBatchResourceWithStreamingResponse",
+ "JournalResource",
+ "AsyncJournalResource",
+ "JournalResourceWithRawResponse",
+ "AsyncJournalResourceWithRawResponse",
+ "JournalResourceWithStreamingResponse",
+ "AsyncJournalResourceWithStreamingResponse",
+]
diff --git a/src/hubspot_sdk/resources/webhooks_journal/journal/batch.py b/src/hubspot_sdk/resources/webhooks_journal/journal/batch.py
new file mode 100644
index 00000000..c0b4ea19
--- /dev/null
+++ b/src/hubspot_sdk/resources/webhooks_journal/journal/batch.py
@@ -0,0 +1,500 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import httpx
+
+from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
+from ...._utils import path_template, maybe_transform, async_maybe_transform
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from ...._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from ...._base_client import make_request_options
+from ....types.webhooks_journal.journal import (
+ batch_get_params,
+ batch_get_latest_params,
+ batch_get_earliest_params,
+ batch_get_from_offset_params,
+)
+from ....types.shared.batch_response_journal_fetch_response import BatchResponseJournalFetchResponse
+
+__all__ = ["BatchResource", "AsyncBatchResource"]
+
+
+class BatchResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> BatchResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return BatchResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> BatchResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#with_streaming_response
+ """
+ return BatchResourceWithStreamingResponse(self)
+
+ def get(
+ self,
+ *,
+ inputs: SequenceNotStr[str],
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BatchResponseJournalFetchResponse:
+ """
+ Execute a batch read operation on the webhooks journal for the specified date,
+ 2026-03. This endpoint allows you to retrieve multiple entries from the webhooks
+ journal in a single request, which can be useful for processing large amounts of
+ data efficiently. Ensure that the request body is provided in the required
+ format.
+
+ Args:
+ inputs: Strings to input.
+
+ install_portal_id: An integer representing the ID of the portal installation for which the webhooks
+ journal data should be retrieved.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._post(
+ "/webhooks-journal/journal/2026-03/batch/read",
+ body=maybe_transform({"inputs": inputs}, batch_get_params.BatchGetParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"install_portal_id": install_portal_id}, batch_get_params.BatchGetParams),
+ ),
+ cast_to=BatchResponseJournalFetchResponse,
+ )
+
+ def get_earliest(
+ self,
+ count: int,
+ *,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BatchResponseJournalFetchResponse:
+ """
+ Retrieve the earliest batch of webhook journal entries for a specified count.
+ This endpoint is useful for accessing historical webhook data in batches,
+ allowing you to process or analyze older entries. The number of entries
+ retrieved is determined by the count parameter.
+
+ Args:
+ install_portal_id: The ID of the portal installation. This is an integer value that specifies which
+ portal's data to access.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._get(
+ path_template("/webhooks-journal/journal/2026-03/batch/earliest/{count}", count=count),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"install_portal_id": install_portal_id}, batch_get_earliest_params.BatchGetEarliestParams
+ ),
+ ),
+ cast_to=BatchResponseJournalFetchResponse,
+ )
+
+ def get_from_offset(
+ self,
+ count: int,
+ *,
+ offset: str,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BatchResponseJournalFetchResponse:
+ """
+ Retrieve a batch of webhook journal entries starting from a specified offset.
+ This endpoint allows you to fetch a defined number of entries, which can be
+ useful for processing large datasets in manageable chunks.
+
+ Args:
+ install_portal_id: The ID of the portal installation. This is an integer value.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not offset:
+ raise ValueError(f"Expected a non-empty value for `offset` but received {offset!r}")
+ return self._get(
+ path_template("/webhooks-journal/journal/2026-03/batch/{offset}/next/{count}", offset=offset, count=count),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"install_portal_id": install_portal_id}, batch_get_from_offset_params.BatchGetFromOffsetParams
+ ),
+ ),
+ cast_to=BatchResponseJournalFetchResponse,
+ )
+
+ def get_latest(
+ self,
+ count: int,
+ *,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BatchResponseJournalFetchResponse:
+ """
+ Retrieve the latest batch of webhook journal entries up to the specified count.
+ This endpoint is useful for fetching recent webhook data for analysis or
+ processing. The count parameter determines the maximum number of entries to
+ return.
+
+ Args:
+ install_portal_id: The ID of the portal installation. This is an integer value used to specify the
+ portal context for the request.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._get(
+ path_template("/webhooks-journal/journal/2026-03/batch/latest/{count}", count=count),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"install_portal_id": install_portal_id}, batch_get_latest_params.BatchGetLatestParams
+ ),
+ ),
+ cast_to=BatchResponseJournalFetchResponse,
+ )
+
+
+class AsyncBatchResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncBatchResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncBatchResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncBatchResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#with_streaming_response
+ """
+ return AsyncBatchResourceWithStreamingResponse(self)
+
+ async def get(
+ self,
+ *,
+ inputs: SequenceNotStr[str],
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BatchResponseJournalFetchResponse:
+ """
+ Execute a batch read operation on the webhooks journal for the specified date,
+ 2026-03. This endpoint allows you to retrieve multiple entries from the webhooks
+ journal in a single request, which can be useful for processing large amounts of
+ data efficiently. Ensure that the request body is provided in the required
+ format.
+
+ Args:
+ inputs: Strings to input.
+
+ install_portal_id: An integer representing the ID of the portal installation for which the webhooks
+ journal data should be retrieved.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._post(
+ "/webhooks-journal/journal/2026-03/batch/read",
+ body=await async_maybe_transform({"inputs": inputs}, batch_get_params.BatchGetParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"install_portal_id": install_portal_id}, batch_get_params.BatchGetParams
+ ),
+ ),
+ cast_to=BatchResponseJournalFetchResponse,
+ )
+
+ async def get_earliest(
+ self,
+ count: int,
+ *,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BatchResponseJournalFetchResponse:
+ """
+ Retrieve the earliest batch of webhook journal entries for a specified count.
+ This endpoint is useful for accessing historical webhook data in batches,
+ allowing you to process or analyze older entries. The number of entries
+ retrieved is determined by the count parameter.
+
+ Args:
+ install_portal_id: The ID of the portal installation. This is an integer value that specifies which
+ portal's data to access.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._get(
+ path_template("/webhooks-journal/journal/2026-03/batch/earliest/{count}", count=count),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"install_portal_id": install_portal_id}, batch_get_earliest_params.BatchGetEarliestParams
+ ),
+ ),
+ cast_to=BatchResponseJournalFetchResponse,
+ )
+
+ async def get_from_offset(
+ self,
+ count: int,
+ *,
+ offset: str,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BatchResponseJournalFetchResponse:
+ """
+ Retrieve a batch of webhook journal entries starting from a specified offset.
+ This endpoint allows you to fetch a defined number of entries, which can be
+ useful for processing large datasets in manageable chunks.
+
+ Args:
+ install_portal_id: The ID of the portal installation. This is an integer value.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not offset:
+ raise ValueError(f"Expected a non-empty value for `offset` but received {offset!r}")
+ return await self._get(
+ path_template("/webhooks-journal/journal/2026-03/batch/{offset}/next/{count}", offset=offset, count=count),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"install_portal_id": install_portal_id}, batch_get_from_offset_params.BatchGetFromOffsetParams
+ ),
+ ),
+ cast_to=BatchResponseJournalFetchResponse,
+ )
+
+ async def get_latest(
+ self,
+ count: int,
+ *,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BatchResponseJournalFetchResponse:
+ """
+ Retrieve the latest batch of webhook journal entries up to the specified count.
+ This endpoint is useful for fetching recent webhook data for analysis or
+ processing. The count parameter determines the maximum number of entries to
+ return.
+
+ Args:
+ install_portal_id: The ID of the portal installation. This is an integer value used to specify the
+ portal context for the request.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._get(
+ path_template("/webhooks-journal/journal/2026-03/batch/latest/{count}", count=count),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"install_portal_id": install_portal_id}, batch_get_latest_params.BatchGetLatestParams
+ ),
+ ),
+ cast_to=BatchResponseJournalFetchResponse,
+ )
+
+
+class BatchResourceWithRawResponse:
+ def __init__(self, batch: BatchResource) -> None:
+ self._batch = batch
+
+ self.get = to_raw_response_wrapper(
+ batch.get,
+ )
+ self.get_earliest = to_raw_response_wrapper(
+ batch.get_earliest,
+ )
+ self.get_from_offset = to_raw_response_wrapper(
+ batch.get_from_offset,
+ )
+ self.get_latest = to_raw_response_wrapper(
+ batch.get_latest,
+ )
+
+
+class AsyncBatchResourceWithRawResponse:
+ def __init__(self, batch: AsyncBatchResource) -> None:
+ self._batch = batch
+
+ self.get = async_to_raw_response_wrapper(
+ batch.get,
+ )
+ self.get_earliest = async_to_raw_response_wrapper(
+ batch.get_earliest,
+ )
+ self.get_from_offset = async_to_raw_response_wrapper(
+ batch.get_from_offset,
+ )
+ self.get_latest = async_to_raw_response_wrapper(
+ batch.get_latest,
+ )
+
+
+class BatchResourceWithStreamingResponse:
+ def __init__(self, batch: BatchResource) -> None:
+ self._batch = batch
+
+ self.get = to_streamed_response_wrapper(
+ batch.get,
+ )
+ self.get_earliest = to_streamed_response_wrapper(
+ batch.get_earliest,
+ )
+ self.get_from_offset = to_streamed_response_wrapper(
+ batch.get_from_offset,
+ )
+ self.get_latest = to_streamed_response_wrapper(
+ batch.get_latest,
+ )
+
+
+class AsyncBatchResourceWithStreamingResponse:
+ def __init__(self, batch: AsyncBatchResource) -> None:
+ self._batch = batch
+
+ self.get = async_to_streamed_response_wrapper(
+ batch.get,
+ )
+ self.get_earliest = async_to_streamed_response_wrapper(
+ batch.get_earliest,
+ )
+ self.get_from_offset = async_to_streamed_response_wrapper(
+ batch.get_from_offset,
+ )
+ self.get_latest = async_to_streamed_response_wrapper(
+ batch.get_latest,
+ )
diff --git a/src/hubspot_sdk/resources/webhooks_journal/journal/journal.py b/src/hubspot_sdk/resources/webhooks_journal/journal/journal.py
new file mode 100644
index 00000000..a89c3203
--- /dev/null
+++ b/src/hubspot_sdk/resources/webhooks_journal/journal/journal.py
@@ -0,0 +1,421 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import httpx
+
+from .batch import (
+ BatchResource,
+ AsyncBatchResource,
+ BatchResourceWithRawResponse,
+ AsyncBatchResourceWithRawResponse,
+ BatchResourceWithStreamingResponse,
+ AsyncBatchResourceWithStreamingResponse,
+)
+from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ...._utils import path_template, maybe_transform, async_maybe_transform
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from ...._response import (
+ BinaryAPIResponse,
+ AsyncBinaryAPIResponse,
+ StreamedBinaryAPIResponse,
+ AsyncStreamedBinaryAPIResponse,
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ to_custom_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+ to_custom_streamed_response_wrapper,
+ async_to_custom_raw_response_wrapper,
+ async_to_custom_streamed_response_wrapper,
+)
+from ...._base_client import make_request_options
+from ....types.webhooks_journal import journal_get_earliest_params, journal_get_next_from_offset_params
+from ....types.shared.snapshot_status_response import SnapshotStatusResponse
+
+__all__ = ["JournalResource", "AsyncJournalResource"]
+
+
+class JournalResource(SyncAPIResource):
+ @cached_property
+ def batch(self) -> BatchResource:
+ return BatchResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> JournalResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return JournalResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> JournalResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#with_streaming_response
+ """
+ return JournalResourceWithStreamingResponse(self)
+
+ def get_earliest(
+ self,
+ *,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BinaryAPIResponse:
+ """
+ Retrieve the earliest entry from the webhooks journal for the specified portal.
+ This endpoint is useful for accessing the first recorded webhook event in the
+ journal, which can be helpful for auditing or debugging purposes.
+
+ Args:
+ install_portal_id: The ID of the portal installation to filter the journal entries by. This is an
+ integer value.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return self._get(
+ "/webhooks-journal/journal/2026-03/earliest",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"install_portal_id": install_portal_id}, journal_get_earliest_params.JournalGetEarliestParams
+ ),
+ ),
+ cast_to=BinaryAPIResponse,
+ )
+
+ def get_next_from_offset(
+ self,
+ offset: str,
+ *,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BinaryAPIResponse:
+ """
+ Retrieve the next set of entries from the webhooks journal starting from a
+ specified offset. This endpoint is useful for paginating through journal entries
+ to process or analyze webhook events sequentially.
+
+ Args:
+ install_portal_id: The ID of the portal where the webhooks are installed. This is an integer value.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not offset:
+ raise ValueError(f"Expected a non-empty value for `offset` but received {offset!r}")
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return self._get(
+ path_template("/webhooks-journal/journal/2026-03/offset/{offset}/next", offset=offset),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"install_portal_id": install_portal_id},
+ journal_get_next_from_offset_params.JournalGetNextFromOffsetParams,
+ ),
+ ),
+ cast_to=BinaryAPIResponse,
+ )
+
+ def get_status(
+ self,
+ status_id: str,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SnapshotStatusResponse:
+ """
+ Retrieve the status of a specific webhook journal entry using its unique status
+ ID. This endpoint provides detailed information about the status, including
+ whether it is pending, in progress, completed, failed, or expired. It is useful
+ for monitoring and managing the state of webhook journal entries.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not status_id:
+ raise ValueError(f"Expected a non-empty value for `status_id` but received {status_id!r}")
+ return self._get(
+ path_template("/webhooks-journal/journal/2026-03/status/{status_id}", status_id=status_id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=SnapshotStatusResponse,
+ )
+
+
+class AsyncJournalResource(AsyncAPIResource):
+ @cached_property
+ def batch(self) -> AsyncBatchResource:
+ return AsyncBatchResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> AsyncJournalResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncJournalResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncJournalResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#with_streaming_response
+ """
+ return AsyncJournalResourceWithStreamingResponse(self)
+
+ async def get_earliest(
+ self,
+ *,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> AsyncBinaryAPIResponse:
+ """
+ Retrieve the earliest entry from the webhooks journal for the specified portal.
+ This endpoint is useful for accessing the first recorded webhook event in the
+ journal, which can be helpful for auditing or debugging purposes.
+
+ Args:
+ install_portal_id: The ID of the portal installation to filter the journal entries by. This is an
+ integer value.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return await self._get(
+ "/webhooks-journal/journal/2026-03/earliest",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"install_portal_id": install_portal_id}, journal_get_earliest_params.JournalGetEarliestParams
+ ),
+ ),
+ cast_to=AsyncBinaryAPIResponse,
+ )
+
+ async def get_next_from_offset(
+ self,
+ offset: str,
+ *,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> AsyncBinaryAPIResponse:
+ """
+ Retrieve the next set of entries from the webhooks journal starting from a
+ specified offset. This endpoint is useful for paginating through journal entries
+ to process or analyze webhook events sequentially.
+
+ Args:
+ install_portal_id: The ID of the portal where the webhooks are installed. This is an integer value.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not offset:
+ raise ValueError(f"Expected a non-empty value for `offset` but received {offset!r}")
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return await self._get(
+ path_template("/webhooks-journal/journal/2026-03/offset/{offset}/next", offset=offset),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"install_portal_id": install_portal_id},
+ journal_get_next_from_offset_params.JournalGetNextFromOffsetParams,
+ ),
+ ),
+ cast_to=AsyncBinaryAPIResponse,
+ )
+
+ async def get_status(
+ self,
+ status_id: str,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SnapshotStatusResponse:
+ """
+ Retrieve the status of a specific webhook journal entry using its unique status
+ ID. This endpoint provides detailed information about the status, including
+ whether it is pending, in progress, completed, failed, or expired. It is useful
+ for monitoring and managing the state of webhook journal entries.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not status_id:
+ raise ValueError(f"Expected a non-empty value for `status_id` but received {status_id!r}")
+ return await self._get(
+ path_template("/webhooks-journal/journal/2026-03/status/{status_id}", status_id=status_id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=SnapshotStatusResponse,
+ )
+
+
+class JournalResourceWithRawResponse:
+ def __init__(self, journal: JournalResource) -> None:
+ self._journal = journal
+
+ self.get_earliest = to_custom_raw_response_wrapper(
+ journal.get_earliest,
+ BinaryAPIResponse,
+ )
+ self.get_next_from_offset = to_custom_raw_response_wrapper(
+ journal.get_next_from_offset,
+ BinaryAPIResponse,
+ )
+ self.get_status = to_raw_response_wrapper(
+ journal.get_status,
+ )
+
+ @cached_property
+ def batch(self) -> BatchResourceWithRawResponse:
+ return BatchResourceWithRawResponse(self._journal.batch)
+
+
+class AsyncJournalResourceWithRawResponse:
+ def __init__(self, journal: AsyncJournalResource) -> None:
+ self._journal = journal
+
+ self.get_earliest = async_to_custom_raw_response_wrapper(
+ journal.get_earliest,
+ AsyncBinaryAPIResponse,
+ )
+ self.get_next_from_offset = async_to_custom_raw_response_wrapper(
+ journal.get_next_from_offset,
+ AsyncBinaryAPIResponse,
+ )
+ self.get_status = async_to_raw_response_wrapper(
+ journal.get_status,
+ )
+
+ @cached_property
+ def batch(self) -> AsyncBatchResourceWithRawResponse:
+ return AsyncBatchResourceWithRawResponse(self._journal.batch)
+
+
+class JournalResourceWithStreamingResponse:
+ def __init__(self, journal: JournalResource) -> None:
+ self._journal = journal
+
+ self.get_earliest = to_custom_streamed_response_wrapper(
+ journal.get_earliest,
+ StreamedBinaryAPIResponse,
+ )
+ self.get_next_from_offset = to_custom_streamed_response_wrapper(
+ journal.get_next_from_offset,
+ StreamedBinaryAPIResponse,
+ )
+ self.get_status = to_streamed_response_wrapper(
+ journal.get_status,
+ )
+
+ @cached_property
+ def batch(self) -> BatchResourceWithStreamingResponse:
+ return BatchResourceWithStreamingResponse(self._journal.batch)
+
+
+class AsyncJournalResourceWithStreamingResponse:
+ def __init__(self, journal: AsyncJournalResource) -> None:
+ self._journal = journal
+
+ self.get_earliest = async_to_custom_streamed_response_wrapper(
+ journal.get_earliest,
+ AsyncStreamedBinaryAPIResponse,
+ )
+ self.get_next_from_offset = async_to_custom_streamed_response_wrapper(
+ journal.get_next_from_offset,
+ AsyncStreamedBinaryAPIResponse,
+ )
+ self.get_status = async_to_streamed_response_wrapper(
+ journal.get_status,
+ )
+
+ @cached_property
+ def batch(self) -> AsyncBatchResourceWithStreamingResponse:
+ return AsyncBatchResourceWithStreamingResponse(self._journal.batch)
diff --git a/src/hubspot_sdk/resources/webhooks_journal/journal_local/__init__.py b/src/hubspot_sdk/resources/webhooks_journal/journal_local/__init__.py
new file mode 100644
index 00000000..2d267633
--- /dev/null
+++ b/src/hubspot_sdk/resources/webhooks_journal/journal_local/__init__.py
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .batch import (
+ BatchResource,
+ AsyncBatchResource,
+ BatchResourceWithRawResponse,
+ AsyncBatchResourceWithRawResponse,
+ BatchResourceWithStreamingResponse,
+ AsyncBatchResourceWithStreamingResponse,
+)
+from .journal_local import (
+ JournalLocalResource,
+ AsyncJournalLocalResource,
+ JournalLocalResourceWithRawResponse,
+ AsyncJournalLocalResourceWithRawResponse,
+ JournalLocalResourceWithStreamingResponse,
+ AsyncJournalLocalResourceWithStreamingResponse,
+)
+
+__all__ = [
+ "BatchResource",
+ "AsyncBatchResource",
+ "BatchResourceWithRawResponse",
+ "AsyncBatchResourceWithRawResponse",
+ "BatchResourceWithStreamingResponse",
+ "AsyncBatchResourceWithStreamingResponse",
+ "JournalLocalResource",
+ "AsyncJournalLocalResource",
+ "JournalLocalResourceWithRawResponse",
+ "AsyncJournalLocalResourceWithRawResponse",
+ "JournalLocalResourceWithStreamingResponse",
+ "AsyncJournalLocalResourceWithStreamingResponse",
+]
diff --git a/src/hubspot_sdk/resources/webhooks_journal/journal_local/batch.py b/src/hubspot_sdk/resources/webhooks_journal/journal_local/batch.py
new file mode 100644
index 00000000..b1f9c791
--- /dev/null
+++ b/src/hubspot_sdk/resources/webhooks_journal/journal_local/batch.py
@@ -0,0 +1,407 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import httpx
+
+from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
+from ...._utils import path_template, maybe_transform, async_maybe_transform
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from ...._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from ...._base_client import make_request_options
+from ....types.webhooks_journal.journal_local import (
+ batch_get_params,
+ batch_get_earliest_params,
+ batch_get_from_offset_params,
+)
+from ....types.shared.batch_response_journal_fetch_response import BatchResponseJournalFetchResponse
+
+__all__ = ["BatchResource", "AsyncBatchResource"]
+
+
+class BatchResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> BatchResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return BatchResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> BatchResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#with_streaming_response
+ """
+ return BatchResourceWithStreamingResponse(self)
+
+ def get(
+ self,
+ *,
+ inputs: SequenceNotStr[str],
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BatchResponseJournalFetchResponse:
+ """Execute a batch read operation on the webhooks journal.
+
+ This endpoint allows you
+ to retrieve a batch of webhook journal entries by providing the necessary input
+ data. It is useful for processing multiple records in a single request,
+ streamlining data retrieval tasks.
+
+ Args:
+ inputs: Strings to input.
+
+ install_portal_id: The ID of the portal where the webhooks are installed. This parameter is
+ optional and is used to specify the target portal for the operation.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._post(
+ "/webhooks-journal/journal-local/2026-03/batch/read",
+ body=maybe_transform({"inputs": inputs}, batch_get_params.BatchGetParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform({"install_portal_id": install_portal_id}, batch_get_params.BatchGetParams),
+ ),
+ cast_to=BatchResponseJournalFetchResponse,
+ )
+
+ def get_earliest(
+ self,
+ count: int,
+ *,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BatchResponseJournalFetchResponse:
+ """Retrieve the earliest batch of webhook journal entries.
+
+ This endpoint is useful
+ for accessing the oldest available data in the webhook journal, allowing users
+ to process or analyze historical webhook events. The number of entries to fetch
+ is specified by the 'count' path parameter.
+
+ Args:
+ install_portal_id: The ID of the portal installation to filter the webhook journal entries. This is
+ an optional integer parameter.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._get(
+ path_template("/webhooks-journal/journal-local/2026-03/batch/earliest/{count}", count=count),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"install_portal_id": install_portal_id}, batch_get_earliest_params.BatchGetEarliestParams
+ ),
+ ),
+ cast_to=BatchResponseJournalFetchResponse,
+ )
+
+ def get_from_offset(
+ self,
+ count: int,
+ *,
+ offset: str,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BatchResponseJournalFetchResponse:
+ """
+ Retrieve a batch of webhook journal entries starting from a specified offset.
+ This endpoint is useful for paginating through large sets of webhook data. The
+ number of entries returned is determined by the 'count' parameter.
+
+ Args:
+ install_portal_id: The ID of the portal where the webhooks are installed. This is an optional
+ parameter.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not offset:
+ raise ValueError(f"Expected a non-empty value for `offset` but received {offset!r}")
+ return self._get(
+ path_template(
+ "/webhooks-journal/journal-local/2026-03/batch/{offset}/next/{count}", offset=offset, count=count
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"install_portal_id": install_portal_id}, batch_get_from_offset_params.BatchGetFromOffsetParams
+ ),
+ ),
+ cast_to=BatchResponseJournalFetchResponse,
+ )
+
+
+class AsyncBatchResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncBatchResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncBatchResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncBatchResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#with_streaming_response
+ """
+ return AsyncBatchResourceWithStreamingResponse(self)
+
+ async def get(
+ self,
+ *,
+ inputs: SequenceNotStr[str],
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BatchResponseJournalFetchResponse:
+ """Execute a batch read operation on the webhooks journal.
+
+ This endpoint allows you
+ to retrieve a batch of webhook journal entries by providing the necessary input
+ data. It is useful for processing multiple records in a single request,
+ streamlining data retrieval tasks.
+
+ Args:
+ inputs: Strings to input.
+
+ install_portal_id: The ID of the portal where the webhooks are installed. This parameter is
+ optional and is used to specify the target portal for the operation.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._post(
+ "/webhooks-journal/journal-local/2026-03/batch/read",
+ body=await async_maybe_transform({"inputs": inputs}, batch_get_params.BatchGetParams),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"install_portal_id": install_portal_id}, batch_get_params.BatchGetParams
+ ),
+ ),
+ cast_to=BatchResponseJournalFetchResponse,
+ )
+
+ async def get_earliest(
+ self,
+ count: int,
+ *,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BatchResponseJournalFetchResponse:
+ """Retrieve the earliest batch of webhook journal entries.
+
+ This endpoint is useful
+ for accessing the oldest available data in the webhook journal, allowing users
+ to process or analyze historical webhook events. The number of entries to fetch
+ is specified by the 'count' path parameter.
+
+ Args:
+ install_portal_id: The ID of the portal installation to filter the webhook journal entries. This is
+ an optional integer parameter.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._get(
+ path_template("/webhooks-journal/journal-local/2026-03/batch/earliest/{count}", count=count),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"install_portal_id": install_portal_id}, batch_get_earliest_params.BatchGetEarliestParams
+ ),
+ ),
+ cast_to=BatchResponseJournalFetchResponse,
+ )
+
+ async def get_from_offset(
+ self,
+ count: int,
+ *,
+ offset: str,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BatchResponseJournalFetchResponse:
+ """
+ Retrieve a batch of webhook journal entries starting from a specified offset.
+ This endpoint is useful for paginating through large sets of webhook data. The
+ number of entries returned is determined by the 'count' parameter.
+
+ Args:
+ install_portal_id: The ID of the portal where the webhooks are installed. This is an optional
+ parameter.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not offset:
+ raise ValueError(f"Expected a non-empty value for `offset` but received {offset!r}")
+ return await self._get(
+ path_template(
+ "/webhooks-journal/journal-local/2026-03/batch/{offset}/next/{count}", offset=offset, count=count
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"install_portal_id": install_portal_id}, batch_get_from_offset_params.BatchGetFromOffsetParams
+ ),
+ ),
+ cast_to=BatchResponseJournalFetchResponse,
+ )
+
+
+class BatchResourceWithRawResponse:
+ def __init__(self, batch: BatchResource) -> None:
+ self._batch = batch
+
+ self.get = to_raw_response_wrapper(
+ batch.get,
+ )
+ self.get_earliest = to_raw_response_wrapper(
+ batch.get_earliest,
+ )
+ self.get_from_offset = to_raw_response_wrapper(
+ batch.get_from_offset,
+ )
+
+
+class AsyncBatchResourceWithRawResponse:
+ def __init__(self, batch: AsyncBatchResource) -> None:
+ self._batch = batch
+
+ self.get = async_to_raw_response_wrapper(
+ batch.get,
+ )
+ self.get_earliest = async_to_raw_response_wrapper(
+ batch.get_earliest,
+ )
+ self.get_from_offset = async_to_raw_response_wrapper(
+ batch.get_from_offset,
+ )
+
+
+class BatchResourceWithStreamingResponse:
+ def __init__(self, batch: BatchResource) -> None:
+ self._batch = batch
+
+ self.get = to_streamed_response_wrapper(
+ batch.get,
+ )
+ self.get_earliest = to_streamed_response_wrapper(
+ batch.get_earliest,
+ )
+ self.get_from_offset = to_streamed_response_wrapper(
+ batch.get_from_offset,
+ )
+
+
+class AsyncBatchResourceWithStreamingResponse:
+ def __init__(self, batch: AsyncBatchResource) -> None:
+ self._batch = batch
+
+ self.get = async_to_streamed_response_wrapper(
+ batch.get,
+ )
+ self.get_earliest = async_to_streamed_response_wrapper(
+ batch.get_earliest,
+ )
+ self.get_from_offset = async_to_streamed_response_wrapper(
+ batch.get_from_offset,
+ )
diff --git a/src/hubspot_sdk/resources/webhooks_journal/journal_local/journal_local.py b/src/hubspot_sdk/resources/webhooks_journal/journal_local/journal_local.py
new file mode 100644
index 00000000..a72b611d
--- /dev/null
+++ b/src/hubspot_sdk/resources/webhooks_journal/journal_local/journal_local.py
@@ -0,0 +1,535 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import httpx
+
+from .batch import (
+ BatchResource,
+ AsyncBatchResource,
+ BatchResourceWithRawResponse,
+ AsyncBatchResourceWithRawResponse,
+ BatchResourceWithStreamingResponse,
+ AsyncBatchResourceWithStreamingResponse,
+)
+from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ...._utils import path_template, maybe_transform, async_maybe_transform
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from ...._response import (
+ BinaryAPIResponse,
+ AsyncBinaryAPIResponse,
+ StreamedBinaryAPIResponse,
+ AsyncStreamedBinaryAPIResponse,
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ to_custom_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+ to_custom_streamed_response_wrapper,
+ async_to_custom_raw_response_wrapper,
+ async_to_custom_streamed_response_wrapper,
+)
+from ...._base_client import make_request_options
+from ....types.webhooks_journal import (
+ journal_local_get_latest_params,
+ journal_local_get_earliest_params,
+ journal_local_get_next_from_offset_params,
+)
+from ....types.shared.snapshot_status_response import SnapshotStatusResponse
+
+__all__ = ["JournalLocalResource", "AsyncJournalLocalResource"]
+
+
+class JournalLocalResource(SyncAPIResource):
+ @cached_property
+ def batch(self) -> BatchResource:
+ return BatchResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> JournalLocalResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return JournalLocalResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> JournalLocalResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#with_streaming_response
+ """
+ return JournalLocalResourceWithStreamingResponse(self)
+
+ def get_earliest(
+ self,
+ *,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BinaryAPIResponse:
+ """Retrieve the earliest webhook journal entries for the specified portal.
+
+ This
+ endpoint can be used to access the oldest records available in the webhook
+ journal, which may be useful for auditing or historical analysis.
+
+ Args:
+ install_portal_id: The ID of the portal for which to retrieve the earliest webhook journal entries.
+ This parameter is optional and should be an integer.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return self._get(
+ "/webhooks-journal/journal-local/2026-03/earliest",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"install_portal_id": install_portal_id},
+ journal_local_get_earliest_params.JournalLocalGetEarliestParams,
+ ),
+ ),
+ cast_to=BinaryAPIResponse,
+ )
+
+ def get_latest(
+ self,
+ *,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BinaryAPIResponse:
+ """
+ Retrieve the latest entries from the webhooks journal for the specified portal.
+ This endpoint is useful for accessing the most recent webhook events and their
+ statuses, allowing you to monitor and debug webhook activity effectively.
+
+ Args:
+ install_portal_id: The unique identifier of the portal installation for which to retrieve the
+ latest journal entries. This parameter is optional and should be an integer.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return self._get(
+ "/webhooks-journal/journal/2026-03/latest",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"install_portal_id": install_portal_id},
+ journal_local_get_latest_params.JournalLocalGetLatestParams,
+ ),
+ ),
+ cast_to=BinaryAPIResponse,
+ )
+
+ def get_next_from_offset(
+ self,
+ offset: str,
+ *,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> BinaryAPIResponse:
+ """
+ Retrieve the next set of webhook journal entries starting from a specified
+ offset. This endpoint is useful for paginating through large sets of webhook
+ data, allowing you to continue from where a previous request left off.
+
+ Args:
+ install_portal_id: The ID of the portal installation to filter the webhook journal entries. This is
+ an integer value.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not offset:
+ raise ValueError(f"Expected a non-empty value for `offset` but received {offset!r}")
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return self._get(
+ path_template("/webhooks-journal/journal-local/2026-03/offset/{offset}/next", offset=offset),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {"install_portal_id": install_portal_id},
+ journal_local_get_next_from_offset_params.JournalLocalGetNextFromOffsetParams,
+ ),
+ ),
+ cast_to=BinaryAPIResponse,
+ )
+
+ def get_status(
+ self,
+ status_id: str,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SnapshotStatusResponse:
+ """
+ Retrieve the status of a specific webhook journal entry using its unique status
+ ID. This endpoint is useful for monitoring the progress or outcome of webhook
+ journal entries, allowing you to check if an entry is pending, in progress,
+ completed, failed, or expired.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not status_id:
+ raise ValueError(f"Expected a non-empty value for `status_id` but received {status_id!r}")
+ return self._get(
+ path_template("/webhooks-journal/journal-local/2026-03/status/{status_id}", status_id=status_id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=SnapshotStatusResponse,
+ )
+
+
+class AsyncJournalLocalResource(AsyncAPIResource):
+ @cached_property
+ def batch(self) -> AsyncBatchResource:
+ return AsyncBatchResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> AsyncJournalLocalResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncJournalLocalResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncJournalLocalResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#with_streaming_response
+ """
+ return AsyncJournalLocalResourceWithStreamingResponse(self)
+
+ async def get_earliest(
+ self,
+ *,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> AsyncBinaryAPIResponse:
+ """Retrieve the earliest webhook journal entries for the specified portal.
+
+ This
+ endpoint can be used to access the oldest records available in the webhook
+ journal, which may be useful for auditing or historical analysis.
+
+ Args:
+ install_portal_id: The ID of the portal for which to retrieve the earliest webhook journal entries.
+ This parameter is optional and should be an integer.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return await self._get(
+ "/webhooks-journal/journal-local/2026-03/earliest",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"install_portal_id": install_portal_id},
+ journal_local_get_earliest_params.JournalLocalGetEarliestParams,
+ ),
+ ),
+ cast_to=AsyncBinaryAPIResponse,
+ )
+
+ async def get_latest(
+ self,
+ *,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> AsyncBinaryAPIResponse:
+ """
+ Retrieve the latest entries from the webhooks journal for the specified portal.
+ This endpoint is useful for accessing the most recent webhook events and their
+ statuses, allowing you to monitor and debug webhook activity effectively.
+
+ Args:
+ install_portal_id: The unique identifier of the portal installation for which to retrieve the
+ latest journal entries. This parameter is optional and should be an integer.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return await self._get(
+ "/webhooks-journal/journal/2026-03/latest",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"install_portal_id": install_portal_id},
+ journal_local_get_latest_params.JournalLocalGetLatestParams,
+ ),
+ ),
+ cast_to=AsyncBinaryAPIResponse,
+ )
+
+ async def get_next_from_offset(
+ self,
+ offset: str,
+ *,
+ install_portal_id: int | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> AsyncBinaryAPIResponse:
+ """
+ Retrieve the next set of webhook journal entries starting from a specified
+ offset. This endpoint is useful for paginating through large sets of webhook
+ data, allowing you to continue from where a previous request left off.
+
+ Args:
+ install_portal_id: The ID of the portal installation to filter the webhook journal entries. This is
+ an integer value.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not offset:
+ raise ValueError(f"Expected a non-empty value for `offset` but received {offset!r}")
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return await self._get(
+ path_template("/webhooks-journal/journal-local/2026-03/offset/{offset}/next", offset=offset),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {"install_portal_id": install_portal_id},
+ journal_local_get_next_from_offset_params.JournalLocalGetNextFromOffsetParams,
+ ),
+ ),
+ cast_to=AsyncBinaryAPIResponse,
+ )
+
+ async def get_status(
+ self,
+ status_id: str,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SnapshotStatusResponse:
+ """
+ Retrieve the status of a specific webhook journal entry using its unique status
+ ID. This endpoint is useful for monitoring the progress or outcome of webhook
+ journal entries, allowing you to check if an entry is pending, in progress,
+ completed, failed, or expired.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not status_id:
+ raise ValueError(f"Expected a non-empty value for `status_id` but received {status_id!r}")
+ return await self._get(
+ path_template("/webhooks-journal/journal-local/2026-03/status/{status_id}", status_id=status_id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=SnapshotStatusResponse,
+ )
+
+
+class JournalLocalResourceWithRawResponse:
+ def __init__(self, journal_local: JournalLocalResource) -> None:
+ self._journal_local = journal_local
+
+ self.get_earliest = to_custom_raw_response_wrapper(
+ journal_local.get_earliest,
+ BinaryAPIResponse,
+ )
+ self.get_latest = to_custom_raw_response_wrapper(
+ journal_local.get_latest,
+ BinaryAPIResponse,
+ )
+ self.get_next_from_offset = to_custom_raw_response_wrapper(
+ journal_local.get_next_from_offset,
+ BinaryAPIResponse,
+ )
+ self.get_status = to_raw_response_wrapper(
+ journal_local.get_status,
+ )
+
+ @cached_property
+ def batch(self) -> BatchResourceWithRawResponse:
+ return BatchResourceWithRawResponse(self._journal_local.batch)
+
+
+class AsyncJournalLocalResourceWithRawResponse:
+ def __init__(self, journal_local: AsyncJournalLocalResource) -> None:
+ self._journal_local = journal_local
+
+ self.get_earliest = async_to_custom_raw_response_wrapper(
+ journal_local.get_earliest,
+ AsyncBinaryAPIResponse,
+ )
+ self.get_latest = async_to_custom_raw_response_wrapper(
+ journal_local.get_latest,
+ AsyncBinaryAPIResponse,
+ )
+ self.get_next_from_offset = async_to_custom_raw_response_wrapper(
+ journal_local.get_next_from_offset,
+ AsyncBinaryAPIResponse,
+ )
+ self.get_status = async_to_raw_response_wrapper(
+ journal_local.get_status,
+ )
+
+ @cached_property
+ def batch(self) -> AsyncBatchResourceWithRawResponse:
+ return AsyncBatchResourceWithRawResponse(self._journal_local.batch)
+
+
+class JournalLocalResourceWithStreamingResponse:
+ def __init__(self, journal_local: JournalLocalResource) -> None:
+ self._journal_local = journal_local
+
+ self.get_earliest = to_custom_streamed_response_wrapper(
+ journal_local.get_earliest,
+ StreamedBinaryAPIResponse,
+ )
+ self.get_latest = to_custom_streamed_response_wrapper(
+ journal_local.get_latest,
+ StreamedBinaryAPIResponse,
+ )
+ self.get_next_from_offset = to_custom_streamed_response_wrapper(
+ journal_local.get_next_from_offset,
+ StreamedBinaryAPIResponse,
+ )
+ self.get_status = to_streamed_response_wrapper(
+ journal_local.get_status,
+ )
+
+ @cached_property
+ def batch(self) -> BatchResourceWithStreamingResponse:
+ return BatchResourceWithStreamingResponse(self._journal_local.batch)
+
+
+class AsyncJournalLocalResourceWithStreamingResponse:
+ def __init__(self, journal_local: AsyncJournalLocalResource) -> None:
+ self._journal_local = journal_local
+
+ self.get_earliest = async_to_custom_streamed_response_wrapper(
+ journal_local.get_earliest,
+ AsyncStreamedBinaryAPIResponse,
+ )
+ self.get_latest = async_to_custom_streamed_response_wrapper(
+ journal_local.get_latest,
+ AsyncStreamedBinaryAPIResponse,
+ )
+ self.get_next_from_offset = async_to_custom_streamed_response_wrapper(
+ journal_local.get_next_from_offset,
+ AsyncStreamedBinaryAPIResponse,
+ )
+ self.get_status = async_to_streamed_response_wrapper(
+ journal_local.get_status,
+ )
+
+ @cached_property
+ def batch(self) -> AsyncBatchResourceWithStreamingResponse:
+ return AsyncBatchResourceWithStreamingResponse(self._journal_local.batch)
diff --git a/src/hubspot_sdk/resources/webhooks_journal/snapshots.py b/src/hubspot_sdk/resources/webhooks_journal/snapshots.py
new file mode 100644
index 00000000..22521c58
--- /dev/null
+++ b/src/hubspot_sdk/resources/webhooks_journal/snapshots.py
@@ -0,0 +1,182 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Iterable
+
+import httpx
+
+from ..._types import Body, Query, Headers, NotGiven, not_given
+from ..._utils import maybe_transform, async_maybe_transform
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from ..._base_client import make_request_options
+from ...types.webhooks_journal import snapshot_create_params
+from ...types.shared.crm_object_snapshot_batch_response import CrmObjectSnapshotBatchResponse
+from ...types.shared_params.crm_object_snapshot_request import CrmObjectSnapshotRequest
+
+__all__ = ["SnapshotsResource", "AsyncSnapshotsResource"]
+
+
+class SnapshotsResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> SnapshotsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return SnapshotsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> SnapshotsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#with_streaming_response
+ """
+ return SnapshotsResourceWithStreamingResponse(self)
+
+ def create(
+ self,
+ *,
+ snapshot_requests: Iterable[CrmObjectSnapshotRequest],
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> CrmObjectSnapshotBatchResponse:
+ """Create a batch of CRM object snapshots in HubSpot.
+
+ This endpoint is used to
+ capture the current state of specified CRM objects for later reference or
+ analysis. It requires a JSON payload containing the details of the CRM objects
+ to snapshot. This operation is exempt from daily and ten-secondly rate limits.
+
+ Args:
+ snapshot_requests: An array of CrmObjectSnapshotRequest objects, each representing a request to
+ create a snapshot for a specific CRM object. This property is required.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._post(
+ "/webhooks-journal/snapshots/2026-03/crm",
+ body=maybe_transform({"snapshot_requests": snapshot_requests}, snapshot_create_params.SnapshotCreateParams),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CrmObjectSnapshotBatchResponse,
+ )
+
+
+class AsyncSnapshotsResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncSnapshotsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncSnapshotsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncSnapshotsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#with_streaming_response
+ """
+ return AsyncSnapshotsResourceWithStreamingResponse(self)
+
+ async def create(
+ self,
+ *,
+ snapshot_requests: Iterable[CrmObjectSnapshotRequest],
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> CrmObjectSnapshotBatchResponse:
+ """Create a batch of CRM object snapshots in HubSpot.
+
+ This endpoint is used to
+ capture the current state of specified CRM objects for later reference or
+ analysis. It requires a JSON payload containing the details of the CRM objects
+ to snapshot. This operation is exempt from daily and ten-secondly rate limits.
+
+ Args:
+ snapshot_requests: An array of CrmObjectSnapshotRequest objects, each representing a request to
+ create a snapshot for a specific CRM object. This property is required.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._post(
+ "/webhooks-journal/snapshots/2026-03/crm",
+ body=await async_maybe_transform(
+ {"snapshot_requests": snapshot_requests}, snapshot_create_params.SnapshotCreateParams
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CrmObjectSnapshotBatchResponse,
+ )
+
+
+class SnapshotsResourceWithRawResponse:
+ def __init__(self, snapshots: SnapshotsResource) -> None:
+ self._snapshots = snapshots
+
+ self.create = to_raw_response_wrapper(
+ snapshots.create,
+ )
+
+
+class AsyncSnapshotsResourceWithRawResponse:
+ def __init__(self, snapshots: AsyncSnapshotsResource) -> None:
+ self._snapshots = snapshots
+
+ self.create = async_to_raw_response_wrapper(
+ snapshots.create,
+ )
+
+
+class SnapshotsResourceWithStreamingResponse:
+ def __init__(self, snapshots: SnapshotsResource) -> None:
+ self._snapshots = snapshots
+
+ self.create = to_streamed_response_wrapper(
+ snapshots.create,
+ )
+
+
+class AsyncSnapshotsResourceWithStreamingResponse:
+ def __init__(self, snapshots: AsyncSnapshotsResource) -> None:
+ self._snapshots = snapshots
+
+ self.create = async_to_streamed_response_wrapper(
+ snapshots.create,
+ )
diff --git a/src/hubspot_sdk/resources/webhooks_journal/subscriptions/__init__.py b/src/hubspot_sdk/resources/webhooks_journal/subscriptions/__init__.py
new file mode 100644
index 00000000..2eedcfbe
--- /dev/null
+++ b/src/hubspot_sdk/resources/webhooks_journal/subscriptions/__init__.py
@@ -0,0 +1,33 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .filters import (
+ FiltersResource,
+ AsyncFiltersResource,
+ FiltersResourceWithRawResponse,
+ AsyncFiltersResourceWithRawResponse,
+ FiltersResourceWithStreamingResponse,
+ AsyncFiltersResourceWithStreamingResponse,
+)
+from .subscriptions import (
+ SubscriptionsResource,
+ AsyncSubscriptionsResource,
+ SubscriptionsResourceWithRawResponse,
+ AsyncSubscriptionsResourceWithRawResponse,
+ SubscriptionsResourceWithStreamingResponse,
+ AsyncSubscriptionsResourceWithStreamingResponse,
+)
+
+__all__ = [
+ "FiltersResource",
+ "AsyncFiltersResource",
+ "FiltersResourceWithRawResponse",
+ "AsyncFiltersResourceWithRawResponse",
+ "FiltersResourceWithStreamingResponse",
+ "AsyncFiltersResourceWithStreamingResponse",
+ "SubscriptionsResource",
+ "AsyncSubscriptionsResource",
+ "SubscriptionsResourceWithRawResponse",
+ "AsyncSubscriptionsResourceWithRawResponse",
+ "SubscriptionsResourceWithStreamingResponse",
+ "AsyncSubscriptionsResourceWithStreamingResponse",
+]
diff --git a/src/hubspot_sdk/resources/webhooks_journal/subscriptions/filters.py b/src/hubspot_sdk/resources/webhooks_journal/subscriptions/filters.py
new file mode 100644
index 00000000..7394cde8
--- /dev/null
+++ b/src/hubspot_sdk/resources/webhooks_journal/subscriptions/filters.py
@@ -0,0 +1,450 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import httpx
+
+from ...._types import Body, Query, Headers, NoneType, NotGiven, not_given
+from ...._utils import path_template, maybe_transform, async_maybe_transform
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from ...._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from ...._base_client import make_request_options
+from ....types.shared_params.filter import Filter
+from ....types.shared.filter_response import FilterResponse
+from ....types.shared.filter_create_response import FilterCreateResponse
+from ....types.webhooks_journal.subscriptions import filter_create_params
+from ....types.webhooks_journal.subscriptions.filter_list_response import FilterListResponse
+
+__all__ = ["FiltersResource", "AsyncFiltersResource"]
+
+
+class FiltersResource(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> FiltersResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return FiltersResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> FiltersResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#with_streaming_response
+ """
+ return FiltersResourceWithStreamingResponse(self)
+
+ def create(
+ self,
+ *,
+ filter: Filter,
+ subscription_id: int,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> FilterCreateResponse:
+ """
+ Create a new filter for a specific webhook subscription in the HubSpot account.
+ This endpoint allows you to define conditions that determine when a webhook
+ should be triggered. The filter is associated with a subscription identified by
+ its ID, and the request must include the filter details.
+
+ Args:
+ filter: Defines a single condition for searching CRM objects, specifying the property to
+ filter on, the operator to use (such as equals, greater than, or contains), and
+ the value(s) to compare against.
+
+ subscription_id: The unique identifier of the subscription to which the filter will be applied.
+ It is an integer formatted as int64.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._post(
+ "/webhooks-journal/subscriptions/2026-03/filters",
+ body=maybe_transform(
+ {
+ "filter": filter,
+ "subscription_id": subscription_id,
+ },
+ filter_create_params.FilterCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=FilterCreateResponse,
+ )
+
+ def list(
+ self,
+ subscription_id: int,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> FilterListResponse:
+ """Retrieve the filters associated with a specific webhook subscription.
+
+ This
+ endpoint allows you to view the filters applied to a subscription, which can
+ help in managing and understanding the conditions set for webhook events.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._get(
+ path_template(
+ "/webhooks-journal/subscriptions/2026-03/filters/subscription/{subscription_id}",
+ subscription_id=subscription_id,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=FilterListResponse,
+ )
+
+ def delete(
+ self,
+ filter_id: int,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> None:
+ """Remove a specific filter from the webhooks journal subscriptions.
+
+ This operation
+ is useful for managing and cleaning up filters that are no longer needed. Once
+ deleted, the filter cannot be recovered.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return self._delete(
+ path_template("/webhooks-journal/subscriptions/2026-03/filters/{filter_id}", filter_id=filter_id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
+ def get(
+ self,
+ filter_id: int,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> FilterResponse:
+ """Retrieve a specific filter associated with a webhook journal subscription.
+
+ This
+ endpoint allows you to access the details of the filter identified by the
+ filterId, which is useful for managing and understanding the conditions applied
+ to webhook events.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._get(
+ path_template("/webhooks-journal/subscriptions/2026-03/filters/{filter_id}", filter_id=filter_id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=FilterResponse,
+ )
+
+
+class AsyncFiltersResource(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncFiltersResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncFiltersResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncFiltersResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#with_streaming_response
+ """
+ return AsyncFiltersResourceWithStreamingResponse(self)
+
+ async def create(
+ self,
+ *,
+ filter: Filter,
+ subscription_id: int,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> FilterCreateResponse:
+ """
+ Create a new filter for a specific webhook subscription in the HubSpot account.
+ This endpoint allows you to define conditions that determine when a webhook
+ should be triggered. The filter is associated with a subscription identified by
+ its ID, and the request must include the filter details.
+
+ Args:
+ filter: Defines a single condition for searching CRM objects, specifying the property to
+ filter on, the operator to use (such as equals, greater than, or contains), and
+ the value(s) to compare against.
+
+ subscription_id: The unique identifier of the subscription to which the filter will be applied.
+ It is an integer formatted as int64.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._post(
+ "/webhooks-journal/subscriptions/2026-03/filters",
+ body=await async_maybe_transform(
+ {
+ "filter": filter,
+ "subscription_id": subscription_id,
+ },
+ filter_create_params.FilterCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=FilterCreateResponse,
+ )
+
+ async def list(
+ self,
+ subscription_id: int,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> FilterListResponse:
+ """Retrieve the filters associated with a specific webhook subscription.
+
+ This
+ endpoint allows you to view the filters applied to a subscription, which can
+ help in managing and understanding the conditions set for webhook events.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._get(
+ path_template(
+ "/webhooks-journal/subscriptions/2026-03/filters/subscription/{subscription_id}",
+ subscription_id=subscription_id,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=FilterListResponse,
+ )
+
+ async def delete(
+ self,
+ filter_id: int,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> None:
+ """Remove a specific filter from the webhooks journal subscriptions.
+
+ This operation
+ is useful for managing and cleaning up filters that are no longer needed. Once
+ deleted, the filter cannot be recovered.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return await self._delete(
+ path_template("/webhooks-journal/subscriptions/2026-03/filters/{filter_id}", filter_id=filter_id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
+ async def get(
+ self,
+ filter_id: int,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> FilterResponse:
+ """Retrieve a specific filter associated with a webhook journal subscription.
+
+ This
+ endpoint allows you to access the details of the filter identified by the
+ filterId, which is useful for managing and understanding the conditions applied
+ to webhook events.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._get(
+ path_template("/webhooks-journal/subscriptions/2026-03/filters/{filter_id}", filter_id=filter_id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=FilterResponse,
+ )
+
+
+class FiltersResourceWithRawResponse:
+ def __init__(self, filters: FiltersResource) -> None:
+ self._filters = filters
+
+ self.create = to_raw_response_wrapper(
+ filters.create,
+ )
+ self.list = to_raw_response_wrapper(
+ filters.list,
+ )
+ self.delete = to_raw_response_wrapper(
+ filters.delete,
+ )
+ self.get = to_raw_response_wrapper(
+ filters.get,
+ )
+
+
+class AsyncFiltersResourceWithRawResponse:
+ def __init__(self, filters: AsyncFiltersResource) -> None:
+ self._filters = filters
+
+ self.create = async_to_raw_response_wrapper(
+ filters.create,
+ )
+ self.list = async_to_raw_response_wrapper(
+ filters.list,
+ )
+ self.delete = async_to_raw_response_wrapper(
+ filters.delete,
+ )
+ self.get = async_to_raw_response_wrapper(
+ filters.get,
+ )
+
+
+class FiltersResourceWithStreamingResponse:
+ def __init__(self, filters: FiltersResource) -> None:
+ self._filters = filters
+
+ self.create = to_streamed_response_wrapper(
+ filters.create,
+ )
+ self.list = to_streamed_response_wrapper(
+ filters.list,
+ )
+ self.delete = to_streamed_response_wrapper(
+ filters.delete,
+ )
+ self.get = to_streamed_response_wrapper(
+ filters.get,
+ )
+
+
+class AsyncFiltersResourceWithStreamingResponse:
+ def __init__(self, filters: AsyncFiltersResource) -> None:
+ self._filters = filters
+
+ self.create = async_to_streamed_response_wrapper(
+ filters.create,
+ )
+ self.list = async_to_streamed_response_wrapper(
+ filters.list,
+ )
+ self.delete = async_to_streamed_response_wrapper(
+ filters.delete,
+ )
+ self.get = async_to_streamed_response_wrapper(
+ filters.get,
+ )
diff --git a/src/hubspot_sdk/resources/webhooks_journal/subscriptions/subscriptions.py b/src/hubspot_sdk/resources/webhooks_journal/subscriptions/subscriptions.py
new file mode 100644
index 00000000..fe9bbab9
--- /dev/null
+++ b/src/hubspot_sdk/resources/webhooks_journal/subscriptions/subscriptions.py
@@ -0,0 +1,1057 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Iterable
+from typing_extensions import Literal, overload
+
+import httpx
+
+from .filters import (
+ FiltersResource,
+ AsyncFiltersResource,
+ FiltersResourceWithRawResponse,
+ AsyncFiltersResourceWithRawResponse,
+ FiltersResourceWithStreamingResponse,
+ AsyncFiltersResourceWithStreamingResponse,
+)
+from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
+from ...._utils import path_template, required_args, maybe_transform, async_maybe_transform
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from ...._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from ...._base_client import make_request_options
+from ....types.webhooks_journal import subscription_create_params
+from ....types.webhooks_journal.subscription_response import SubscriptionResponse
+from ....types.webhooks_journal.collection_response_subscription_response_no_paging import (
+ CollectionResponseSubscriptionResponseNoPaging,
+)
+
+__all__ = ["SubscriptionsResource", "AsyncSubscriptionsResource"]
+
+
+class SubscriptionsResource(SyncAPIResource):
+ @cached_property
+ def filters(self) -> FiltersResource:
+ return FiltersResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> SubscriptionsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return SubscriptionsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> SubscriptionsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#with_streaming_response
+ """
+ return SubscriptionsResourceWithStreamingResponse(self)
+
+ @overload
+ def create(
+ self,
+ *,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ],
+ object_ids: Iterable[int],
+ object_type_id: str,
+ portal_id: int,
+ properties: SequenceNotStr[str],
+ subscription_type: Literal["OBJECT"],
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SubscriptionResponse:
+ """
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ def create(
+ self,
+ *,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ],
+ associated_object_type_ids: SequenceNotStr[str],
+ object_ids: Iterable[int],
+ object_type_id: str,
+ portal_id: int,
+ subscription_type: Literal["ASSOCIATION"],
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SubscriptionResponse:
+ """
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ def create(
+ self,
+ *,
+ event_type_id: str,
+ properties: SequenceNotStr[str],
+ subscription_type: Literal["APP_LIFECYCLE_EVENT"],
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SubscriptionResponse:
+ """
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ def create(
+ self,
+ *,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ],
+ list_ids: Iterable[int],
+ object_ids: Iterable[int],
+ portal_id: int,
+ subscription_type: Literal["LIST_MEMBERSHIP"],
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SubscriptionResponse:
+ """
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ def create(
+ self,
+ *,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ],
+ object_type_id: str,
+ portal_id: int,
+ subscription_type: Literal["GDPR_PRIVACY_DELETION"],
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SubscriptionResponse:
+ """
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @required_args(
+ ["actions", "object_ids", "object_type_id", "portal_id", "properties", "subscription_type"],
+ ["actions", "associated_object_type_ids", "object_ids", "object_type_id", "portal_id", "subscription_type"],
+ ["event_type_id", "properties", "subscription_type"],
+ ["actions", "list_ids", "object_ids", "portal_id", "subscription_type"],
+ ["actions", "object_type_id", "portal_id", "subscription_type"],
+ )
+ def create(
+ self,
+ *,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ]
+ | Omit = omit,
+ object_ids: Iterable[int] | Omit = omit,
+ object_type_id: str | Omit = omit,
+ portal_id: int | Omit = omit,
+ properties: SequenceNotStr[str] | Omit = omit,
+ subscription_type: Literal["OBJECT"]
+ | Literal["ASSOCIATION"]
+ | Literal["APP_LIFECYCLE_EVENT"]
+ | Literal["LIST_MEMBERSHIP"]
+ | Literal["GDPR_PRIVACY_DELETION"],
+ associated_object_type_ids: SequenceNotStr[str] | Omit = omit,
+ event_type_id: str | Omit = omit,
+ list_ids: Iterable[int] | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SubscriptionResponse:
+ return self._post(
+ "/webhooks-journal/subscriptions/2026-03",
+ body=maybe_transform(
+ {
+ "actions": actions,
+ "object_ids": object_ids,
+ "object_type_id": object_type_id,
+ "portal_id": portal_id,
+ "properties": properties,
+ "subscription_type": subscription_type,
+ "associated_object_type_ids": associated_object_type_ids,
+ "event_type_id": event_type_id,
+ "list_ids": list_ids,
+ },
+ subscription_create_params.SubscriptionCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=SubscriptionResponse,
+ )
+
+ def list(
+ self,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> CollectionResponseSubscriptionResponseNoPaging:
+ """Retrieve a list of webhook journal subscriptions for the specified version.
+
+ This
+ endpoint allows you to view all active subscriptions without pagination. It is
+ useful for monitoring and managing webhook subscriptions in your HubSpot
+ account.
+ """
+ return self._get(
+ "/webhooks-journal/subscriptions/2026-03",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CollectionResponseSubscriptionResponseNoPaging,
+ )
+
+ def delete(
+ self,
+ subscription_id: int,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> None:
+ """Delete a specific webhook journal subscription using its unique identifier.
+
+ This
+ operation is useful for managing and cleaning up subscriptions that are no
+ longer needed in your HubSpot account.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return self._delete(
+ path_template("/webhooks-journal/subscriptions/2026-03/{subscription_id}", subscription_id=subscription_id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
+ def delete_for_portal(
+ self,
+ portal_id: int,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> None:
+ """Delete a webhook journal subscription for a specific portal.
+
+ This operation
+ removes the subscription associated with the given portalId, ensuring that no
+ further webhook events are sent for this portal. Use this endpoint to manage and
+ clean up subscriptions that are no longer needed.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return self._delete(
+ path_template("/webhooks-journal/subscriptions/2026-03/portals/{portal_id}", portal_id=portal_id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
+ def get(
+ self,
+ subscription_id: int,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SubscriptionResponse:
+ """
+ Retrieve details of a specific webhook subscription using its unique identifier.
+ This endpoint is useful for obtaining information about a particular
+ subscription, such as its actions, object type, and associated properties.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._get(
+ path_template("/webhooks-journal/subscriptions/2026-03/{subscription_id}", subscription_id=subscription_id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=SubscriptionResponse,
+ )
+
+
+class AsyncSubscriptionsResource(AsyncAPIResource):
+ @cached_property
+ def filters(self) -> AsyncFiltersResource:
+ return AsyncFiltersResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> AsyncSubscriptionsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncSubscriptionsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncSubscriptionsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#with_streaming_response
+ """
+ return AsyncSubscriptionsResourceWithStreamingResponse(self)
+
+ @overload
+ async def create(
+ self,
+ *,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ],
+ object_ids: Iterable[int],
+ object_type_id: str,
+ portal_id: int,
+ properties: SequenceNotStr[str],
+ subscription_type: Literal["OBJECT"],
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SubscriptionResponse:
+ """
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ async def create(
+ self,
+ *,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ],
+ associated_object_type_ids: SequenceNotStr[str],
+ object_ids: Iterable[int],
+ object_type_id: str,
+ portal_id: int,
+ subscription_type: Literal["ASSOCIATION"],
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SubscriptionResponse:
+ """
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ async def create(
+ self,
+ *,
+ event_type_id: str,
+ properties: SequenceNotStr[str],
+ subscription_type: Literal["APP_LIFECYCLE_EVENT"],
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SubscriptionResponse:
+ """
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ async def create(
+ self,
+ *,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ],
+ list_ids: Iterable[int],
+ object_ids: Iterable[int],
+ portal_id: int,
+ subscription_type: Literal["LIST_MEMBERSHIP"],
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SubscriptionResponse:
+ """
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @overload
+ async def create(
+ self,
+ *,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ],
+ object_type_id: str,
+ portal_id: int,
+ subscription_type: Literal["GDPR_PRIVACY_DELETION"],
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SubscriptionResponse:
+ """
+ Create a new subscription in the Webhooks Journal for the specified version.
+ This endpoint allows you to define the subscription details by providing the
+ necessary information in the request body. It supports various types of
+ subscriptions, including object, association, event, app lifecycle event, list
+ membership, and GDPR privacy deletion. Ensure that all required fields are
+ included in the request to successfully create a subscription.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ ...
+
+ @required_args(
+ ["actions", "object_ids", "object_type_id", "portal_id", "properties", "subscription_type"],
+ ["actions", "associated_object_type_ids", "object_ids", "object_type_id", "portal_id", "subscription_type"],
+ ["event_type_id", "properties", "subscription_type"],
+ ["actions", "list_ids", "object_ids", "portal_id", "subscription_type"],
+ ["actions", "object_type_id", "portal_id", "subscription_type"],
+ )
+ async def create(
+ self,
+ *,
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ]
+ | Omit = omit,
+ object_ids: Iterable[int] | Omit = omit,
+ object_type_id: str | Omit = omit,
+ portal_id: int | Omit = omit,
+ properties: SequenceNotStr[str] | Omit = omit,
+ subscription_type: Literal["OBJECT"]
+ | Literal["ASSOCIATION"]
+ | Literal["APP_LIFECYCLE_EVENT"]
+ | Literal["LIST_MEMBERSHIP"]
+ | Literal["GDPR_PRIVACY_DELETION"],
+ associated_object_type_ids: SequenceNotStr[str] | Omit = omit,
+ event_type_id: str | Omit = omit,
+ list_ids: Iterable[int] | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SubscriptionResponse:
+ return await self._post(
+ "/webhooks-journal/subscriptions/2026-03",
+ body=await async_maybe_transform(
+ {
+ "actions": actions,
+ "object_ids": object_ids,
+ "object_type_id": object_type_id,
+ "portal_id": portal_id,
+ "properties": properties,
+ "subscription_type": subscription_type,
+ "associated_object_type_ids": associated_object_type_ids,
+ "event_type_id": event_type_id,
+ "list_ids": list_ids,
+ },
+ subscription_create_params.SubscriptionCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=SubscriptionResponse,
+ )
+
+ async def list(
+ self,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> CollectionResponseSubscriptionResponseNoPaging:
+ """Retrieve a list of webhook journal subscriptions for the specified version.
+
+ This
+ endpoint allows you to view all active subscriptions without pagination. It is
+ useful for monitoring and managing webhook subscriptions in your HubSpot
+ account.
+ """
+ return await self._get(
+ "/webhooks-journal/subscriptions/2026-03",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CollectionResponseSubscriptionResponseNoPaging,
+ )
+
+ async def delete(
+ self,
+ subscription_id: int,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> None:
+ """Delete a specific webhook journal subscription using its unique identifier.
+
+ This
+ operation is useful for managing and cleaning up subscriptions that are no
+ longer needed in your HubSpot account.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return await self._delete(
+ path_template("/webhooks-journal/subscriptions/2026-03/{subscription_id}", subscription_id=subscription_id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
+ async def delete_for_portal(
+ self,
+ portal_id: int,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> None:
+ """Delete a webhook journal subscription for a specific portal.
+
+ This operation
+ removes the subscription associated with the given portalId, ensuring that no
+ further webhook events are sent for this portal. Use this endpoint to manage and
+ clean up subscriptions that are no longer needed.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ extra_headers = {"Accept": "*/*", **(extra_headers or {})}
+ return await self._delete(
+ path_template("/webhooks-journal/subscriptions/2026-03/portals/{portal_id}", portal_id=portal_id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
+ async def get(
+ self,
+ subscription_id: int,
+ *,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SubscriptionResponse:
+ """
+ Retrieve details of a specific webhook subscription using its unique identifier.
+ This endpoint is useful for obtaining information about a particular
+ subscription, such as its actions, object type, and associated properties.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._get(
+ path_template("/webhooks-journal/subscriptions/2026-03/{subscription_id}", subscription_id=subscription_id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=SubscriptionResponse,
+ )
+
+
+class SubscriptionsResourceWithRawResponse:
+ def __init__(self, subscriptions: SubscriptionsResource) -> None:
+ self._subscriptions = subscriptions
+
+ self.create = to_raw_response_wrapper(
+ subscriptions.create,
+ )
+ self.list = to_raw_response_wrapper(
+ subscriptions.list,
+ )
+ self.delete = to_raw_response_wrapper(
+ subscriptions.delete,
+ )
+ self.delete_for_portal = to_raw_response_wrapper(
+ subscriptions.delete_for_portal,
+ )
+ self.get = to_raw_response_wrapper(
+ subscriptions.get,
+ )
+
+ @cached_property
+ def filters(self) -> FiltersResourceWithRawResponse:
+ return FiltersResourceWithRawResponse(self._subscriptions.filters)
+
+
+class AsyncSubscriptionsResourceWithRawResponse:
+ def __init__(self, subscriptions: AsyncSubscriptionsResource) -> None:
+ self._subscriptions = subscriptions
+
+ self.create = async_to_raw_response_wrapper(
+ subscriptions.create,
+ )
+ self.list = async_to_raw_response_wrapper(
+ subscriptions.list,
+ )
+ self.delete = async_to_raw_response_wrapper(
+ subscriptions.delete,
+ )
+ self.delete_for_portal = async_to_raw_response_wrapper(
+ subscriptions.delete_for_portal,
+ )
+ self.get = async_to_raw_response_wrapper(
+ subscriptions.get,
+ )
+
+ @cached_property
+ def filters(self) -> AsyncFiltersResourceWithRawResponse:
+ return AsyncFiltersResourceWithRawResponse(self._subscriptions.filters)
+
+
+class SubscriptionsResourceWithStreamingResponse:
+ def __init__(self, subscriptions: SubscriptionsResource) -> None:
+ self._subscriptions = subscriptions
+
+ self.create = to_streamed_response_wrapper(
+ subscriptions.create,
+ )
+ self.list = to_streamed_response_wrapper(
+ subscriptions.list,
+ )
+ self.delete = to_streamed_response_wrapper(
+ subscriptions.delete,
+ )
+ self.delete_for_portal = to_streamed_response_wrapper(
+ subscriptions.delete_for_portal,
+ )
+ self.get = to_streamed_response_wrapper(
+ subscriptions.get,
+ )
+
+ @cached_property
+ def filters(self) -> FiltersResourceWithStreamingResponse:
+ return FiltersResourceWithStreamingResponse(self._subscriptions.filters)
+
+
+class AsyncSubscriptionsResourceWithStreamingResponse:
+ def __init__(self, subscriptions: AsyncSubscriptionsResource) -> None:
+ self._subscriptions = subscriptions
+
+ self.create = async_to_streamed_response_wrapper(
+ subscriptions.create,
+ )
+ self.list = async_to_streamed_response_wrapper(
+ subscriptions.list,
+ )
+ self.delete = async_to_streamed_response_wrapper(
+ subscriptions.delete,
+ )
+ self.delete_for_portal = async_to_streamed_response_wrapper(
+ subscriptions.delete_for_portal,
+ )
+ self.get = async_to_streamed_response_wrapper(
+ subscriptions.get,
+ )
+
+ @cached_property
+ def filters(self) -> AsyncFiltersResourceWithStreamingResponse:
+ return AsyncFiltersResourceWithStreamingResponse(self._subscriptions.filters)
diff --git a/src/hubspot_sdk/resources/webhooks_journal/webhooks_journal.py b/src/hubspot_sdk/resources/webhooks_journal/webhooks_journal.py
new file mode 100644
index 00000000..080e1404
--- /dev/null
+++ b/src/hubspot_sdk/resources/webhooks_journal/webhooks_journal.py
@@ -0,0 +1,198 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from ..._compat import cached_property
+from .snapshots import (
+ SnapshotsResource,
+ AsyncSnapshotsResource,
+ SnapshotsResourceWithRawResponse,
+ AsyncSnapshotsResourceWithRawResponse,
+ SnapshotsResourceWithStreamingResponse,
+ AsyncSnapshotsResourceWithStreamingResponse,
+)
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from .journal.journal import (
+ JournalResource,
+ AsyncJournalResource,
+ JournalResourceWithRawResponse,
+ AsyncJournalResourceWithRawResponse,
+ JournalResourceWithStreamingResponse,
+ AsyncJournalResourceWithStreamingResponse,
+)
+from .journal_local.journal_local import (
+ JournalLocalResource,
+ AsyncJournalLocalResource,
+ JournalLocalResourceWithRawResponse,
+ AsyncJournalLocalResourceWithRawResponse,
+ JournalLocalResourceWithStreamingResponse,
+ AsyncJournalLocalResourceWithStreamingResponse,
+)
+from .subscriptions.subscriptions import (
+ SubscriptionsResource,
+ AsyncSubscriptionsResource,
+ SubscriptionsResourceWithRawResponse,
+ AsyncSubscriptionsResourceWithRawResponse,
+ SubscriptionsResourceWithStreamingResponse,
+ AsyncSubscriptionsResourceWithStreamingResponse,
+)
+
+__all__ = ["WebhooksJournalResource", "AsyncWebhooksJournalResource"]
+
+
+class WebhooksJournalResource(SyncAPIResource):
+ @cached_property
+ def journal(self) -> JournalResource:
+ return JournalResource(self._client)
+
+ @cached_property
+ def journal_local(self) -> JournalLocalResource:
+ return JournalLocalResource(self._client)
+
+ @cached_property
+ def snapshots(self) -> SnapshotsResource:
+ return SnapshotsResource(self._client)
+
+ @cached_property
+ def subscriptions(self) -> SubscriptionsResource:
+ return SubscriptionsResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> WebhooksJournalResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return WebhooksJournalResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> WebhooksJournalResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#with_streaming_response
+ """
+ return WebhooksJournalResourceWithStreamingResponse(self)
+
+
+class AsyncWebhooksJournalResource(AsyncAPIResource):
+ @cached_property
+ def journal(self) -> AsyncJournalResource:
+ return AsyncJournalResource(self._client)
+
+ @cached_property
+ def journal_local(self) -> AsyncJournalLocalResource:
+ return AsyncJournalLocalResource(self._client)
+
+ @cached_property
+ def snapshots(self) -> AsyncSnapshotsResource:
+ return AsyncSnapshotsResource(self._client)
+
+ @cached_property
+ def subscriptions(self) -> AsyncSubscriptionsResource:
+ return AsyncSubscriptionsResource(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> AsyncWebhooksJournalResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncWebhooksJournalResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncWebhooksJournalResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/HubSpot/hubspot-sdk-python#with_streaming_response
+ """
+ return AsyncWebhooksJournalResourceWithStreamingResponse(self)
+
+
+class WebhooksJournalResourceWithRawResponse:
+ def __init__(self, webhooks_journal: WebhooksJournalResource) -> None:
+ self._webhooks_journal = webhooks_journal
+
+ @cached_property
+ def journal(self) -> JournalResourceWithRawResponse:
+ return JournalResourceWithRawResponse(self._webhooks_journal.journal)
+
+ @cached_property
+ def journal_local(self) -> JournalLocalResourceWithRawResponse:
+ return JournalLocalResourceWithRawResponse(self._webhooks_journal.journal_local)
+
+ @cached_property
+ def snapshots(self) -> SnapshotsResourceWithRawResponse:
+ return SnapshotsResourceWithRawResponse(self._webhooks_journal.snapshots)
+
+ @cached_property
+ def subscriptions(self) -> SubscriptionsResourceWithRawResponse:
+ return SubscriptionsResourceWithRawResponse(self._webhooks_journal.subscriptions)
+
+
+class AsyncWebhooksJournalResourceWithRawResponse:
+ def __init__(self, webhooks_journal: AsyncWebhooksJournalResource) -> None:
+ self._webhooks_journal = webhooks_journal
+
+ @cached_property
+ def journal(self) -> AsyncJournalResourceWithRawResponse:
+ return AsyncJournalResourceWithRawResponse(self._webhooks_journal.journal)
+
+ @cached_property
+ def journal_local(self) -> AsyncJournalLocalResourceWithRawResponse:
+ return AsyncJournalLocalResourceWithRawResponse(self._webhooks_journal.journal_local)
+
+ @cached_property
+ def snapshots(self) -> AsyncSnapshotsResourceWithRawResponse:
+ return AsyncSnapshotsResourceWithRawResponse(self._webhooks_journal.snapshots)
+
+ @cached_property
+ def subscriptions(self) -> AsyncSubscriptionsResourceWithRawResponse:
+ return AsyncSubscriptionsResourceWithRawResponse(self._webhooks_journal.subscriptions)
+
+
+class WebhooksJournalResourceWithStreamingResponse:
+ def __init__(self, webhooks_journal: WebhooksJournalResource) -> None:
+ self._webhooks_journal = webhooks_journal
+
+ @cached_property
+ def journal(self) -> JournalResourceWithStreamingResponse:
+ return JournalResourceWithStreamingResponse(self._webhooks_journal.journal)
+
+ @cached_property
+ def journal_local(self) -> JournalLocalResourceWithStreamingResponse:
+ return JournalLocalResourceWithStreamingResponse(self._webhooks_journal.journal_local)
+
+ @cached_property
+ def snapshots(self) -> SnapshotsResourceWithStreamingResponse:
+ return SnapshotsResourceWithStreamingResponse(self._webhooks_journal.snapshots)
+
+ @cached_property
+ def subscriptions(self) -> SubscriptionsResourceWithStreamingResponse:
+ return SubscriptionsResourceWithStreamingResponse(self._webhooks_journal.subscriptions)
+
+
+class AsyncWebhooksJournalResourceWithStreamingResponse:
+ def __init__(self, webhooks_journal: AsyncWebhooksJournalResource) -> None:
+ self._webhooks_journal = webhooks_journal
+
+ @cached_property
+ def journal(self) -> AsyncJournalResourceWithStreamingResponse:
+ return AsyncJournalResourceWithStreamingResponse(self._webhooks_journal.journal)
+
+ @cached_property
+ def journal_local(self) -> AsyncJournalLocalResourceWithStreamingResponse:
+ return AsyncJournalLocalResourceWithStreamingResponse(self._webhooks_journal.journal_local)
+
+ @cached_property
+ def snapshots(self) -> AsyncSnapshotsResourceWithStreamingResponse:
+ return AsyncSnapshotsResourceWithStreamingResponse(self._webhooks_journal.snapshots)
+
+ @cached_property
+ def subscriptions(self) -> AsyncSubscriptionsResourceWithStreamingResponse:
+ return AsyncSubscriptionsResourceWithStreamingResponse(self._webhooks_journal.subscriptions)
diff --git a/src/hubspot_sdk/types/__init__.py b/src/hubspot_sdk/types/__init__.py
index 2da98b0d..39cff804 100644
--- a/src/hubspot_sdk/types/__init__.py
+++ b/src/hubspot_sdk/types/__init__.py
@@ -3,10 +3,12 @@
from __future__ import annotations
from .shared import (
+ Filter as Filter,
Option as Option,
Paging as Paging,
NextPage as NextPage,
Property as Property,
+ Condition as Condition,
ErrorData as ErrorData,
ErrorDetail as ErrorDetail,
OptionInput as OptionInput,
@@ -19,23 +21,41 @@
PropertyValue as PropertyValue,
StandardError as StandardError,
ActionResponse as ActionResponse,
+ FilterResponse as FilterResponse,
PropertyCreate as PropertyCreate,
PublicObjectID as PublicObjectID,
AssociationSpec as AssociationSpec,
BatchInputString as BatchInputString,
+ FilterCreateRequest as FilterCreateRequest,
PropertyGroupCreate as PropertyGroupCreate,
PropertyGroupUpdate as PropertyGroupUpdate,
+ FilterCreateResponse as FilterCreateResponse,
+ JournalFetchResponse as JournalFetchResponse,
ObjectTypeDefinition as ObjectTypeDefinition,
+ ActionOverrideRequest as ActionOverrideRequest,
AssociationDefinition as AssociationDefinition,
BatchInputPropertyName as BatchInputPropertyName,
+ SnapshotStatusResponse as SnapshotStatusResponse,
AutomationActionsOption as AutomationActionsOption,
AbTestCreateRequestVNext as AbTestCreateRequestVNext,
AssociationDefinitionEgg as AssociationDefinitionEgg,
BatchInputPropertyCreate as BatchInputPropertyCreate,
BatchInputPublicObjectID as BatchInputPublicObjectID,
+ CrmObjectSnapshotRequest as CrmObjectSnapshotRequest,
+ CrmObjectSnapshotResponse as CrmObjectSnapshotResponse,
ObjectTypeDefinitionPatch as ObjectTypeDefinitionPatch,
+ SubscriptionUpsertRequest as SubscriptionUpsertRequest,
BatchReadInputPropertyName as BatchReadInputPropertyName,
ObjectTypeDefinitionLabels as ObjectTypeDefinitionLabels,
PropertyModificationMetadata as PropertyModificationMetadata,
+ CrmObjectSnapshotBatchRequest as CrmObjectSnapshotBatchRequest,
+ CrmObjectSnapshotBatchResponse as CrmObjectSnapshotBatchResponse,
+ ObjectSubscriptionUpsertRequest as ObjectSubscriptionUpsertRequest,
+ BatchResponseJournalFetchResponse as BatchResponseJournalFetchResponse,
+ AssociationSubscriptionUpsertRequest as AssociationSubscriptionUpsertRequest,
CollectionResponsePropertyGroupNoPaging as CollectionResponsePropertyGroupNoPaging,
+ ListMembershipSubscriptionUpsertRequest as ListMembershipSubscriptionUpsertRequest,
+ AppLifecycleEventSubscriptionUpsertRequest as AppLifecycleEventSubscriptionUpsertRequest,
+ BatchResponseJournalFetchResponseWithErrors as BatchResponseJournalFetchResponseWithErrors,
+ GdprPrivacyDeletionSubscriptionUpsertRequest as GdprPrivacyDeletionSubscriptionUpsertRequest,
)
diff --git a/src/hubspot_sdk/types/auth/__init__.py b/src/hubspot_sdk/types/auth/__init__.py
index cfe6ba55..053dad7f 100644
--- a/src/hubspot_sdk/types/auth/__init__.py
+++ b/src/hubspot_sdk/types/auth/__init__.py
@@ -2,10 +2,13 @@
from __future__ import annotations
+from .token_response_if import TokenResponseIf as TokenResponseIf
from .signed_access_token import SignedAccessToken as SignedAccessToken
+from .access_token_response import AccessTokenResponse as AccessTokenResponse
from .oauth_create_token_params import OAuthCreateTokenParams as OAuthCreateTokenParams
from .oauth_revoke_token_params import OAuthRevokeTokenParams as OAuthRevokeTokenParams
from .token_info_response_base_if import TokenInfoResponseBaseIf as TokenInfoResponseBaseIf
from .oauth_introspect_token_params import OAuthIntrospectTokenParams as OAuthIntrospectTokenParams
+from .client_credentials_token_response import ClientCredentialsTokenResponse as ClientCredentialsTokenResponse
from .public_access_token_info_response import PublicAccessTokenInfoResponse as PublicAccessTokenInfoResponse
from .public_refresh_token_info_response import PublicRefreshTokenInfoResponse as PublicRefreshTokenInfoResponse
diff --git a/src/hubspot_sdk/types/auth/access_token_response.py b/src/hubspot_sdk/types/auth/access_token_response.py
new file mode 100644
index 00000000..b5247289
--- /dev/null
+++ b/src/hubspot_sdk/types/auth/access_token_response.py
@@ -0,0 +1,28 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["AccessTokenResponse"]
+
+
+class AccessTokenResponse(BaseModel):
+ access_token: str
+
+ expires_in: int
+
+ refresh_token: str
+
+ token_type: str
+
+ token_use: Literal["access_token"]
+
+ hub_id: Optional[int] = None
+
+ id_token: Optional[str] = None
+
+ scopes: Optional[List[str]] = None
+
+ user_id: Optional[int] = None
diff --git a/src/hubspot_sdk/types/auth/client_credentials_token_response.py b/src/hubspot_sdk/types/auth/client_credentials_token_response.py
new file mode 100644
index 00000000..43ad98c3
--- /dev/null
+++ b/src/hubspot_sdk/types/auth/client_credentials_token_response.py
@@ -0,0 +1,26 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Optional
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["ClientCredentialsTokenResponse"]
+
+
+class ClientCredentialsTokenResponse(BaseModel):
+ access_token: str
+
+ expires_in: int
+
+ token_type: str
+
+ token_use: Literal["client_credentials"]
+
+ hub_id: Optional[int] = None
+
+ id_token: Optional[str] = None
+
+ scopes: Optional[List[str]] = None
+
+ user_id: Optional[int] = None
diff --git a/src/hubspot_sdk/types/auth/oauth_create_token_params.py b/src/hubspot_sdk/types/auth/oauth_create_token_params.py
index 38e05428..0338fc4c 100644
--- a/src/hubspot_sdk/types/auth/oauth_create_token_params.py
+++ b/src/hubspot_sdk/types/auth/oauth_create_token_params.py
@@ -16,7 +16,7 @@ class OAuthCreateTokenParams(TypedDict, total=False):
code_verifier: str
- grant_type: Literal["authorization_code", "refresh_token"]
+ grant_type: Literal["authorization_code", "client_credentials", "refresh_token"]
redirect_uri: str
diff --git a/src/hubspot_sdk/types/auth/token_response_if.py b/src/hubspot_sdk/types/auth/token_response_if.py
new file mode 100644
index 00000000..7b4b7b86
--- /dev/null
+++ b/src/hubspot_sdk/types/auth/token_response_if.py
@@ -0,0 +1,11 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Union
+from typing_extensions import TypeAlias
+
+from .access_token_response import AccessTokenResponse
+from .client_credentials_token_response import ClientCredentialsTokenResponse
+
+__all__ = ["TokenResponseIf"]
+
+TokenResponseIf: TypeAlias = Union[AccessTokenResponse, ClientCredentialsTokenResponse]
diff --git a/src/hubspot_sdk/types/automation/array_field_schema.py b/src/hubspot_sdk/types/automation/array_field_schema.py
index e8382cac..24fe8afe 100644
--- a/src/hubspot_sdk/types/automation/array_field_schema.py
+++ b/src/hubspot_sdk/types/automation/array_field_schema.py
@@ -10,5 +10,5 @@
class ArrayFieldSchema(BaseModel):
items: object
- type: Literal["ARRAY", "BOOLEAN", "DOUBLE", "INTEGER", "LONG", "OBJECT", "STRING"]
+ type: Literal["ARRAY"]
"""Specifies that the field is of type 'ARRAY'."""
diff --git a/src/hubspot_sdk/types/automation/array_field_schema_param.py b/src/hubspot_sdk/types/automation/array_field_schema_param.py
index ddb1cffd..a83e0c60 100644
--- a/src/hubspot_sdk/types/automation/array_field_schema_param.py
+++ b/src/hubspot_sdk/types/automation/array_field_schema_param.py
@@ -10,5 +10,5 @@
class ArrayFieldSchemaParam(TypedDict, total=False):
items: Required[object]
- type: Required[Literal["ARRAY", "BOOLEAN", "DOUBLE", "INTEGER", "LONG", "OBJECT", "STRING"]]
+ type: Required[Literal["ARRAY"]]
"""Specifies that the field is of type 'ARRAY'."""
diff --git a/src/hubspot_sdk/types/automation/boolean_field_schema.py b/src/hubspot_sdk/types/automation/boolean_field_schema.py
index 18650d87..4c696863 100644
--- a/src/hubspot_sdk/types/automation/boolean_field_schema.py
+++ b/src/hubspot_sdk/types/automation/boolean_field_schema.py
@@ -8,7 +8,7 @@
class BooleanFieldSchema(BaseModel):
- type: Literal["ARRAY", "BOOLEAN", "DOUBLE", "INTEGER", "LONG", "OBJECT", "STRING"]
+ type: Literal["BOOLEAN"]
"""
Specifies the field type as BOOLEAN, indicating that the field can hold a true
or false value.
diff --git a/src/hubspot_sdk/types/automation/boolean_field_schema_param.py b/src/hubspot_sdk/types/automation/boolean_field_schema_param.py
index bd75f937..8295432c 100644
--- a/src/hubspot_sdk/types/automation/boolean_field_schema_param.py
+++ b/src/hubspot_sdk/types/automation/boolean_field_schema_param.py
@@ -8,7 +8,7 @@
class BooleanFieldSchemaParam(TypedDict, total=False):
- type: Required[Literal["ARRAY", "BOOLEAN", "DOUBLE", "INTEGER", "LONG", "OBJECT", "STRING"]]
+ type: Required[Literal["BOOLEAN"]]
"""
Specifies the field type as BOOLEAN, indicating that the field can hold a true
or false value.
diff --git a/src/hubspot_sdk/types/automation/double_field_schema.py b/src/hubspot_sdk/types/automation/double_field_schema.py
index bcd0de52..82e0e004 100644
--- a/src/hubspot_sdk/types/automation/double_field_schema.py
+++ b/src/hubspot_sdk/types/automation/double_field_schema.py
@@ -9,7 +9,7 @@
class DoubleFieldSchema(BaseModel):
- type: Literal["ARRAY", "BOOLEAN", "DOUBLE", "INTEGER", "LONG", "OBJECT", "STRING"]
+ type: Literal["DOUBLE"]
"""Indicates the field type as DOUBLE."""
maximum: Optional[float] = None
diff --git a/src/hubspot_sdk/types/automation/double_field_schema_param.py b/src/hubspot_sdk/types/automation/double_field_schema_param.py
index 287a2057..e90e1e13 100644
--- a/src/hubspot_sdk/types/automation/double_field_schema_param.py
+++ b/src/hubspot_sdk/types/automation/double_field_schema_param.py
@@ -8,7 +8,7 @@
class DoubleFieldSchemaParam(TypedDict, total=False):
- type: Required[Literal["ARRAY", "BOOLEAN", "DOUBLE", "INTEGER", "LONG", "OBJECT", "STRING"]]
+ type: Required[Literal["DOUBLE"]]
"""Indicates the field type as DOUBLE."""
maximum: float
diff --git a/src/hubspot_sdk/types/automation/integer_field_schema.py b/src/hubspot_sdk/types/automation/integer_field_schema.py
index 7038b379..dc1f0fd6 100644
--- a/src/hubspot_sdk/types/automation/integer_field_schema.py
+++ b/src/hubspot_sdk/types/automation/integer_field_schema.py
@@ -9,7 +9,7 @@
class IntegerFieldSchema(BaseModel):
- type: Literal["ARRAY", "BOOLEAN", "DOUBLE", "INTEGER", "LONG", "OBJECT", "STRING"]
+ type: Literal["INTEGER"]
"""The type of the field, which is set to INTEGER."""
maximum: Optional[int] = None
diff --git a/src/hubspot_sdk/types/automation/integer_field_schema_param.py b/src/hubspot_sdk/types/automation/integer_field_schema_param.py
index e4f7077d..0fec44ee 100644
--- a/src/hubspot_sdk/types/automation/integer_field_schema_param.py
+++ b/src/hubspot_sdk/types/automation/integer_field_schema_param.py
@@ -8,7 +8,7 @@
class IntegerFieldSchemaParam(TypedDict, total=False):
- type: Required[Literal["ARRAY", "BOOLEAN", "DOUBLE", "INTEGER", "LONG", "OBJECT", "STRING"]]
+ type: Required[Literal["INTEGER"]]
"""The type of the field, which is set to INTEGER."""
maximum: int
diff --git a/src/hubspot_sdk/types/automation/long_field_schema.py b/src/hubspot_sdk/types/automation/long_field_schema.py
index e8da6645..a558587d 100644
--- a/src/hubspot_sdk/types/automation/long_field_schema.py
+++ b/src/hubspot_sdk/types/automation/long_field_schema.py
@@ -9,7 +9,7 @@
class LongFieldSchema(BaseModel):
- type: Literal["ARRAY", "BOOLEAN", "DOUBLE", "INTEGER", "LONG", "OBJECT", "STRING"]
+ type: Literal["LONG"]
"""The type of the field, which is LONG by default."""
maximum: Optional[int] = None
diff --git a/src/hubspot_sdk/types/automation/long_field_schema_param.py b/src/hubspot_sdk/types/automation/long_field_schema_param.py
index ac9ae350..8f4ee3aa 100644
--- a/src/hubspot_sdk/types/automation/long_field_schema_param.py
+++ b/src/hubspot_sdk/types/automation/long_field_schema_param.py
@@ -8,7 +8,7 @@
class LongFieldSchemaParam(TypedDict, total=False):
- type: Required[Literal["ARRAY", "BOOLEAN", "DOUBLE", "INTEGER", "LONG", "OBJECT", "STRING"]]
+ type: Required[Literal["LONG"]]
"""The type of the field, which is LONG by default."""
maximum: int
diff --git a/src/hubspot_sdk/types/automation/object_field_schema.py b/src/hubspot_sdk/types/automation/object_field_schema.py
index 0ceb45ae..290114f4 100644
--- a/src/hubspot_sdk/types/automation/object_field_schema.py
+++ b/src/hubspot_sdk/types/automation/object_field_schema.py
@@ -11,5 +11,5 @@ class ObjectFieldSchema(BaseModel):
properties: object
"""Contains the properties of the object."""
- type: Literal["ARRAY", "BOOLEAN", "DOUBLE", "INTEGER", "LONG", "OBJECT", "STRING"]
+ type: Literal["OBJECT"]
"""Specifies the type of the field, which is 'OBJECT' by default."""
diff --git a/src/hubspot_sdk/types/automation/object_field_schema_param.py b/src/hubspot_sdk/types/automation/object_field_schema_param.py
index 8c628ba1..781ef3aa 100644
--- a/src/hubspot_sdk/types/automation/object_field_schema_param.py
+++ b/src/hubspot_sdk/types/automation/object_field_schema_param.py
@@ -11,5 +11,5 @@ class ObjectFieldSchemaParam(TypedDict, total=False):
properties: Required[object]
"""Contains the properties of the object."""
- type: Required[Literal["ARRAY", "BOOLEAN", "DOUBLE", "INTEGER", "LONG", "OBJECT", "STRING"]]
+ type: Required[Literal["OBJECT"]]
"""Specifies the type of the field, which is 'OBJECT' by default."""
diff --git a/src/hubspot_sdk/types/automation/string_field_schema.py b/src/hubspot_sdk/types/automation/string_field_schema.py
index 950789ff..53f3eb7e 100644
--- a/src/hubspot_sdk/types/automation/string_field_schema.py
+++ b/src/hubspot_sdk/types/automation/string_field_schema.py
@@ -9,7 +9,7 @@
class StringFieldSchema(BaseModel):
- type: Literal["ARRAY", "BOOLEAN", "DOUBLE", "INTEGER", "LONG", "OBJECT", "STRING"]
+ type: Literal["STRING"]
"""Indicates that the type is a string, with the default value being STRING."""
format: Optional[Literal["DATE", "DATE_TIME", "OBJECT_COORDINATE", "TIME", "URI"]] = None
diff --git a/src/hubspot_sdk/types/automation/string_field_schema_param.py b/src/hubspot_sdk/types/automation/string_field_schema_param.py
index 1dd8bbbc..404a443b 100644
--- a/src/hubspot_sdk/types/automation/string_field_schema_param.py
+++ b/src/hubspot_sdk/types/automation/string_field_schema_param.py
@@ -8,7 +8,7 @@
class StringFieldSchemaParam(TypedDict, total=False):
- type: Required[Literal["ARRAY", "BOOLEAN", "DOUBLE", "INTEGER", "LONG", "OBJECT", "STRING"]]
+ type: Required[Literal["STRING"]]
"""Indicates that the type is a string, with the default value being STRING."""
format: Literal["DATE", "DATE_TIME", "OBJECT_COORDINATE", "TIME", "URI"]
diff --git a/src/hubspot_sdk/types/cms/__init__.py b/src/hubspot_sdk/types/cms/__init__.py
index 7a8983b4..30ad1443 100644
--- a/src/hubspot_sdk/types/cms/__init__.py
+++ b/src/hubspot_sdk/types/cms/__init__.py
@@ -130,6 +130,9 @@
from .media_bridge_create_object_type_params import (
MediaBridgeCreateObjectTypeParams as MediaBridgeCreateObjectTypeParams,
)
+from .url_redirect_create_url_mapping_params import (
+ URLRedirectCreateURLMappingParams as URLRedirectCreateURLMappingParams,
+)
from .media_bridge_list_oembed_domains_params import (
MediaBridgeListOembedDomainsParams as MediaBridgeListOembedDomainsParams,
)
diff --git a/src/hubspot_sdk/types/cms/inbound_db_object_type.py b/src/hubspot_sdk/types/cms/inbound_db_object_type.py
index 8823e5f8..e003a83f 100644
--- a/src/hubspot_sdk/types/cms/inbound_db_object_type.py
+++ b/src/hubspot_sdk/types/cms/inbound_db_object_type.py
@@ -104,6 +104,10 @@ class InboundDBObjectType(BaseModel):
status: Optional[Literal["Deprecated", "In development", "Live"]] = None
+ visibilities: Optional[
+ List[Literal["Customer-facing", "Internal only", "Customer-facing UI", "Customer-facing public API"]]
+ ] = None
+
visibility: Optional[
Literal["Customer-facing", "Customer-facing public API", "Customer-facing UI", "Internal only"]
] = None
diff --git a/src/hubspot_sdk/types/cms/url_redirect_create_url_mapping_params.py b/src/hubspot_sdk/types/cms/url_redirect_create_url_mapping_params.py
new file mode 100644
index 00000000..b164e2bb
--- /dev/null
+++ b/src/hubspot_sdk/types/cms/url_redirect_create_url_mapping_params.py
@@ -0,0 +1,71 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Union
+from datetime import datetime
+from typing_extensions import Required, Annotated, TypedDict
+
+from ..._utils import PropertyInfo
+
+__all__ = ["URLRedirectCreateURLMappingParams"]
+
+
+class URLRedirectCreateURLMappingParams(TypedDict, total=False):
+ id: Required[str]
+ """The unique ID of this URL redirect."""
+
+ created: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
+ """The date and time when the URL mapping was initially created."""
+
+ destination: Required[str]
+ """
+ The destination URL, where the target URL should be redirected if it matches the
+ `routePrefix`.
+ """
+
+ is_match_full_url: Required[Annotated[bool, PropertyInfo(alias="isMatchFullUrl")]]
+ """Whether the `routePrefix` should match on the entire URL, including the domain."""
+
+ is_match_query_string: Required[Annotated[bool, PropertyInfo(alias="isMatchQueryString")]]
+ """
+ Whether the `routePrefix` should match on the entire URL path, including the
+ query string.
+ """
+
+ is_only_after_not_found: Required[Annotated[bool, PropertyInfo(alias="isOnlyAfterNotFound")]]
+ """
+ Whether the URL redirect mapping should apply only if a live page on the URL
+ isn't found. If False, the URL redirect mapping will take precedence over any
+ existing page.
+ """
+
+ is_pattern: Required[Annotated[bool, PropertyInfo(alias="isPattern")]]
+ """Whether the `routePrefix` should match based on pattern."""
+
+ is_protocol_agnostic: Required[Annotated[bool, PropertyInfo(alias="isProtocolAgnostic")]]
+ """Whether the `routePrefix` should match both HTTP and HTTPS protocols."""
+
+ is_trailing_slash_optional: Required[Annotated[bool, PropertyInfo(alias="isTrailingSlashOptional")]]
+ """Whether a trailing slash will be ignored."""
+
+ precedence: Required[int]
+ """Used to prioritize URL redirection.
+
+ If a given URL matches more than one redirect, the one with the **lower**
+ precedence will be used.
+ """
+
+ redirect_style: Required[Annotated[int, PropertyInfo(alias="redirectStyle")]]
+ """The type of redirect to create.
+
+ Options include: 301 (permanent), 302 (temporary), or 305 (proxy). Find more
+ details
+ [here](https://knowledge.hubspot.com/cos-general/how-to-redirect-a-hubspot-page).
+ """
+
+ route_prefix: Required[Annotated[str, PropertyInfo(alias="routePrefix")]]
+ """The target incoming URL, path, or pattern to match for redirection."""
+
+ updated: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
+ """The date and time when the URL mapping was last modified."""
diff --git a/src/hubspot_sdk/types/conversations/pre_resolved_contact_param.py b/src/hubspot_sdk/types/conversations/pre_resolved_contact_param.py
index c24d4c32..f8d6a0a1 100644
--- a/src/hubspot_sdk/types/conversations/pre_resolved_contact_param.py
+++ b/src/hubspot_sdk/types/conversations/pre_resolved_contact_param.py
@@ -290,6 +290,7 @@ class PreResolvedContactParam(TypedDict, total=False):
"hs_social_twitter_clicks",
"hs_source_object_id",
"hs_source_portal_id",
+ "hs_sourced_contact_origin",
"hs_state_code",
"hs_sub_role",
"hs_testpurge",
diff --git a/src/hubspot_sdk/types/conversations/visitor_identification_generate_token_params.py b/src/hubspot_sdk/types/conversations/visitor_identification_generate_token_params.py
index 494f7455..6971bff1 100644
--- a/src/hubspot_sdk/types/conversations/visitor_identification_generate_token_params.py
+++ b/src/hubspot_sdk/types/conversations/visitor_identification_generate_token_params.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+from typing import Dict
from typing_extensions import Required, Annotated, TypedDict
from ..._utils import PropertyInfo
@@ -13,6 +14,8 @@ class VisitorIdentificationGenerateTokenParams(TypedDict, total=False):
email: Required[str]
"""The email of the visitor that you wish to identify"""
+ hs_customer_agent_context: Required[Annotated[Dict[str, str], PropertyInfo(alias="hsCustomerAgentContext")]]
+
first_name: Annotated[str, PropertyInfo(alias="firstName")]
"""The first name of the visitor that you wish to identify.
diff --git a/src/hubspot_sdk/types/crm/__init__.py b/src/hubspot_sdk/types/crm/__init__.py
index afb55085..46254a9f 100644
--- a/src/hubspot_sdk/types/crm/__init__.py
+++ b/src/hubspot_sdk/types/crm/__init__.py
@@ -5,7 +5,6 @@
from .pipeline import Pipeline as Pipeline
from .date_time import DateTime as DateTime
from .public_team import PublicTeam as PublicTeam
-from .filter_param import FilterParam as FilterParam
from .public_owner import PublicOwner as PublicOwner
from .associated_id import AssociatedID as AssociatedID
from .flag_response import FlagResponse as FlagResponse
@@ -14,6 +13,7 @@
from .import_row_core import ImportRowCore as ImportRowCore
from .import_template import ImportTemplate as ImportTemplate
from .list_get_params import ListGetParams as ListGetParams
+from .crm_filter_param import CrmFilterParam as CrmFilterParam
from .list_list_params import ListListParams as ListListParams
from .owner_get_params import OwnerGetParams as OwnerGetParams
from .owner_list_params import OwnerListParams as OwnerListParams
@@ -94,6 +94,7 @@
from .public_object_list_record import PublicObjectListRecord as PublicObjectListRecord
from .app_event_occurrence_param import AppEventOccurrenceParam as AppEventOccurrenceParam
from .developer_qualified_symbol import DeveloperQualifiedSymbol as DeveloperQualifiedSymbol
+from .export_create_async_params import ExportCreateAsyncParams as ExportCreateAsyncParams
from .feature_flag_update_params import FeatureFlagUpdateParams as FeatureFlagUpdateParams
from .labels_between_object_pair import LabelsBetweenObjectPair as LabelsBetweenObjectPair
from .list_folder_fetch_response import ListFolderFetchResponse as ListFolderFetchResponse
@@ -159,7 +160,6 @@
from .public_bool_property_operation import PublicBoolPropertyOperation as PublicBoolPropertyOperation
from .public_date_property_operation import PublicDatePropertyOperation as PublicDatePropertyOperation
from .public_in_list_filter_metadata import PublicInListFilterMetadata as PublicInListFilterMetadata
-from .public_num_associations_filter import PublicNumAssociationsFilter as PublicNumAssociationsFilter
from .public_quarter_reference_param import PublicQuarterReferenceParam as PublicQuarterReferenceParam
from .limit_and_usage_for_object_type import LimitAndUsageForObjectType as LimitAndUsageForObjectType
from .list_update_list_filters_params import ListUpdateListFiltersParams as ListUpdateListFiltersParams
@@ -191,7 +191,6 @@
from .collection_response_associated_id import CollectionResponseAssociatedID as CollectionResponseAssociatedID
from .object_type_property_create_param import ObjectTypePropertyCreateParam as ObjectTypePropertyCreateParam
from .public_association_in_list_filter import PublicAssociationInListFilter as PublicAssociationInListFilter
-from .public_campaign_influenced_filter import PublicCampaignInfluencedFilter as PublicCampaignInfluencedFilter
from .public_cta_analytics_filter_param import PublicCtaAnalyticsFilterParam as PublicCtaAnalyticsFilterParam
from .public_list_conversion_date_param import PublicListConversionDateParam as PublicListConversionDateParam
from .public_list_conversion_inactivity import PublicListConversionInactivity as PublicListConversionInactivity
@@ -228,7 +227,6 @@
from .public_bool_property_operation_param import PublicBoolPropertyOperationParam as PublicBoolPropertyOperationParam
from .public_date_property_operation_param import PublicDatePropertyOperationParam as PublicDatePropertyOperationParam
from .public_in_list_filter_metadata_param import PublicInListFilterMetadataParam as PublicInListFilterMetadataParam
-from .public_num_associations_filter_param import PublicNumAssociationsFilterParam as PublicNumAssociationsFilterParam
from .pipeline_update_all_properties_params import (
PipelineUpdateAllPropertiesParams as PipelineUpdateAllPropertiesParams,
)
@@ -317,9 +315,6 @@
from .public_calendar_date_property_operation import (
PublicCalendarDatePropertyOperation as PublicCalendarDatePropertyOperation,
)
-from .public_campaign_influenced_filter_param import (
- PublicCampaignInfluencedFilterParam as PublicCampaignInfluencedFilterParam,
-)
from .public_deal_splits_create_request_param import (
PublicDealSplitsCreateRequestParam as PublicDealSplitsCreateRequestParam,
)
@@ -359,9 +354,6 @@
from .public_date_time_property_operation_param import (
PublicDateTimePropertyOperationParam as PublicDateTimePropertyOperationParam,
)
-from .public_property_association_filter_branch import (
- PublicPropertyAssociationFilterBranch as PublicPropertyAssociationFilterBranch,
-)
from .public_rolling_property_updated_operation import (
PublicRollingPropertyUpdatedOperation as PublicRollingPropertyUpdatedOperation,
)
@@ -377,9 +369,6 @@
from .public_comparative_date_property_operation import (
PublicComparativeDatePropertyOperation as PublicComparativeDatePropertyOperation,
)
-from .public_property_association_in_list_filter import (
- PublicPropertyAssociationInListFilter as PublicPropertyAssociationInListFilter,
-)
from .public_relative_ranged_timestamp_refine_by import (
PublicRelativeRangedTimestampRefineBy as PublicRelativeRangedTimestampRefineBy,
)
@@ -446,9 +435,6 @@
from .public_absolute_comparative_timestamp_refine_by import (
PublicAbsoluteComparativeTimestampRefineBy as PublicAbsoluteComparativeTimestampRefineBy,
)
-from .public_property_association_filter_branch_param import (
- PublicPropertyAssociationFilterBranchParam as PublicPropertyAssociationFilterBranchParam,
-)
from .public_relative_comparative_timestamp_refine_by import (
PublicRelativeComparativeTimestampRefineBy as PublicRelativeComparativeTimestampRefineBy,
)
@@ -464,9 +450,6 @@
from .public_comparative_date_property_operation_param import (
PublicComparativeDatePropertyOperationParam as PublicComparativeDatePropertyOperationParam,
)
-from .public_property_association_in_list_filter_param import (
- PublicPropertyAssociationInListFilterParam as PublicPropertyAssociationInListFilterParam,
-)
from .public_relative_ranged_timestamp_refine_by_param import (
PublicRelativeRangedTimestampRefineByParam as PublicRelativeRangedTimestampRefineByParam,
)
diff --git a/src/hubspot_sdk/types/crm/filter_param.py b/src/hubspot_sdk/types/crm/crm_filter_param.py
similarity index 94%
rename from src/hubspot_sdk/types/crm/filter_param.py
rename to src/hubspot_sdk/types/crm/crm_filter_param.py
index 5064ae87..060e7956 100644
--- a/src/hubspot_sdk/types/crm/filter_param.py
+++ b/src/hubspot_sdk/types/crm/crm_filter_param.py
@@ -7,10 +7,10 @@
from ..._types import SequenceNotStr
from ..._utils import PropertyInfo
-__all__ = ["FilterParam"]
+__all__ = ["CrmFilterParam"]
-class FilterParam(TypedDict, total=False):
+class CrmFilterParam(TypedDict, total=False):
"""
Defines a single condition for searching CRM objects, specifying the property to filter on, the operator to use (such as equals, greater than, or contains), and the value(s) to compare against.
"""
diff --git a/src/hubspot_sdk/types/crm/export_create_async_params.py b/src/hubspot_sdk/types/crm/export_create_async_params.py
new file mode 100644
index 00000000..38442586
--- /dev/null
+++ b/src/hubspot_sdk/types/crm/export_create_async_params.py
@@ -0,0 +1,175 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Union
+from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
+
+from ..._types import SequenceNotStr
+from ..._utils import PropertyInfo
+from .public_crm_search_request_param import PublicCrmSearchRequestParam
+
+__all__ = ["ExportCreateAsyncParams", "PublicExportViewRequest", "PublicExportListRequest"]
+
+
+class PublicExportViewRequest(TypedDict, total=False):
+ associated_object_type: Required[Annotated[SequenceNotStr[str], PropertyInfo(alias="associatedObjectType")]]
+
+ export_internal_values_options: Required[
+ Annotated[List[Literal["NAMES", "VALUES"]], PropertyInfo(alias="exportInternalValuesOptions")]
+ ]
+
+ export_name: Required[Annotated[str, PropertyInfo(alias="exportName")]]
+
+ export_type: Required[Annotated[Literal["VIEW"], PropertyInfo(alias="exportType")]]
+
+ format: Required[Literal["CSV", "XLS", "XLSX"]]
+
+ include_labeled_associations: Required[Annotated[bool, PropertyInfo(alias="includeLabeledAssociations")]]
+
+ include_primary_display_property_for_associated_objects: Required[
+ Annotated[bool, PropertyInfo(alias="includePrimaryDisplayPropertyForAssociatedObjects")]
+ ]
+
+ language: Required[
+ Literal[
+ "AF_ZA",
+ "AR_EG",
+ "BG",
+ "BN",
+ "CA_ES",
+ "CS",
+ "DA_DK",
+ "DE",
+ "EL_GR",
+ "EN",
+ "EN_GB",
+ "ES",
+ "ES_MX",
+ "ET_EE",
+ "FI",
+ "FR",
+ "FR_CA",
+ "HE_IL",
+ "HI_IN",
+ "HR",
+ "HU",
+ "ID",
+ "IT",
+ "JA",
+ "KO_KR",
+ "LT_LT",
+ "MS",
+ "NL",
+ "NO",
+ "PL",
+ "PT_BR",
+ "PT_PT",
+ "RO",
+ "RU",
+ "SK_SK",
+ "SL",
+ "SV",
+ "TH",
+ "TL",
+ "TR",
+ "UK",
+ "VI_VN",
+ "ZH_CN",
+ "ZH_HK",
+ "ZH_TW",
+ ]
+ ]
+
+ object_properties: Required[Annotated[SequenceNotStr[str], PropertyInfo(alias="objectProperties")]]
+
+ object_type: Required[Annotated[str, PropertyInfo(alias="objectType")]]
+
+ override_associated_objects_per_definition_per_row_limit: Required[
+ Annotated[bool, PropertyInfo(alias="overrideAssociatedObjectsPerDefinitionPerRowLimit")]
+ ]
+
+ public_crm_search_request: Annotated[PublicCrmSearchRequestParam, PropertyInfo(alias="publicCrmSearchRequest")]
+
+
+class PublicExportListRequest(TypedDict, total=False):
+ associated_object_type: Required[Annotated[SequenceNotStr[str], PropertyInfo(alias="associatedObjectType")]]
+
+ export_internal_values_options: Required[
+ Annotated[List[Literal["NAMES", "VALUES"]], PropertyInfo(alias="exportInternalValuesOptions")]
+ ]
+
+ export_name: Required[Annotated[str, PropertyInfo(alias="exportName")]]
+
+ export_type: Required[Annotated[Literal["LIST"], PropertyInfo(alias="exportType")]]
+
+ format: Required[Literal["CSV", "XLS", "XLSX"]]
+
+ include_labeled_associations: Required[Annotated[bool, PropertyInfo(alias="includeLabeledAssociations")]]
+
+ include_primary_display_property_for_associated_objects: Required[
+ Annotated[bool, PropertyInfo(alias="includePrimaryDisplayPropertyForAssociatedObjects")]
+ ]
+
+ language: Required[
+ Literal[
+ "AF_ZA",
+ "AR_EG",
+ "BG",
+ "BN",
+ "CA_ES",
+ "CS",
+ "DA_DK",
+ "DE",
+ "EL_GR",
+ "EN",
+ "EN_GB",
+ "ES",
+ "ES_MX",
+ "ET_EE",
+ "FI",
+ "FR",
+ "FR_CA",
+ "HE_IL",
+ "HI_IN",
+ "HR",
+ "HU",
+ "ID",
+ "IT",
+ "JA",
+ "KO_KR",
+ "LT_LT",
+ "MS",
+ "NL",
+ "NO",
+ "PL",
+ "PT_BR",
+ "PT_PT",
+ "RO",
+ "RU",
+ "SK_SK",
+ "SL",
+ "SV",
+ "TH",
+ "TL",
+ "TR",
+ "UK",
+ "VI_VN",
+ "ZH_CN",
+ "ZH_HK",
+ "ZH_TW",
+ ]
+ ]
+
+ list_id: Required[Annotated[str, PropertyInfo(alias="listId")]]
+
+ object_properties: Required[Annotated[SequenceNotStr[str], PropertyInfo(alias="objectProperties")]]
+
+ object_type: Required[Annotated[str, PropertyInfo(alias="objectType")]]
+
+ override_associated_objects_per_definition_per_row_limit: Required[
+ Annotated[bool, PropertyInfo(alias="overrideAssociatedObjectsPerDefinitionPerRowLimit")]
+ ]
+
+
+ExportCreateAsyncParams: TypeAlias = Union[PublicExportViewRequest, PublicExportListRequest]
diff --git a/src/hubspot_sdk/types/crm/filter_group_param.py b/src/hubspot_sdk/types/crm/filter_group_param.py
index 963287a1..ac607d81 100644
--- a/src/hubspot_sdk/types/crm/filter_group_param.py
+++ b/src/hubspot_sdk/types/crm/filter_group_param.py
@@ -5,10 +5,10 @@
from typing import Iterable
from typing_extensions import Required, TypedDict
-from .filter_param import FilterParam
+from .crm_filter_param import CrmFilterParam
__all__ = ["FilterGroupParam"]
class FilterGroupParam(TypedDict, total=False):
- filters: Required[Iterable[FilterParam]]
+ filters: Required[Iterable[CrmFilterParam]]
diff --git a/src/hubspot_sdk/types/crm/list_create_params.py b/src/hubspot_sdk/types/crm/list_create_params.py
index 0ae72ef6..da530bc5 100644
--- a/src/hubspot_sdk/types/crm/list_create_params.py
+++ b/src/hubspot_sdk/types/crm/list_create_params.py
@@ -53,7 +53,6 @@ class ListCreateParams(TypedDict, total=False):
"PublicNotAnyFilterBranchParam",
"PublicRestrictedFilterBranchParam",
"PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
"PublicAssociationFilterBranchParam",
]
@@ -64,4 +63,3 @@ class ListCreateParams(TypedDict, total=False):
from .public_restricted_filter_branch_param import PublicRestrictedFilterBranchParam
from .public_association_filter_branch_param import PublicAssociationFilterBranchParam
from .public_unified_events_filter_branch_param import PublicUnifiedEventsFilterBranchParam
-from .public_property_association_filter_branch_param import PublicPropertyAssociationFilterBranchParam
diff --git a/src/hubspot_sdk/types/crm/list_update_list_filters_params.py b/src/hubspot_sdk/types/crm/list_update_list_filters_params.py
index 8c49da04..ea5b0903 100644
--- a/src/hubspot_sdk/types/crm/list_update_list_filters_params.py
+++ b/src/hubspot_sdk/types/crm/list_update_list_filters_params.py
@@ -24,7 +24,6 @@ class ListUpdateListFiltersParams(TypedDict, total=False):
"PublicNotAnyFilterBranchParam",
"PublicRestrictedFilterBranchParam",
"PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
"PublicAssociationFilterBranchParam",
]
@@ -35,4 +34,3 @@ class ListUpdateListFiltersParams(TypedDict, total=False):
from .public_restricted_filter_branch_param import PublicRestrictedFilterBranchParam
from .public_association_filter_branch_param import PublicAssociationFilterBranchParam
from .public_unified_events_filter_branch_param import PublicUnifiedEventsFilterBranchParam
-from .public_property_association_filter_branch_param import PublicPropertyAssociationFilterBranchParam
diff --git a/src/hubspot_sdk/types/crm/public_and_filter_branch.py b/src/hubspot_sdk/types/crm/public_and_filter_branch.py
index 0cada240..c3f668f5 100644
--- a/src/hubspot_sdk/types/crm/public_and_filter_branch.py
+++ b/src/hubspot_sdk/types/crm/public_and_filter_branch.py
@@ -22,17 +22,14 @@
from .public_unified_events_filter import PublicUnifiedEventsFilter
from .public_event_analytics_filter import PublicEventAnalyticsFilter
from .public_form_submission_filter import PublicFormSubmissionFilter
-from .public_num_associations_filter import PublicNumAssociationsFilter
from .public_integration_event_filter import PublicIntegrationEventFilter
from .public_privacy_analytics_filter import PublicPrivacyAnalyticsFilter
from .public_email_subscription_filter import PublicEmailSubscriptionFilter
from .public_association_in_list_filter import PublicAssociationInListFilter
-from .public_campaign_influenced_filter import PublicCampaignInfluencedFilter
from .public_page_view_analytics_filter import PublicPageViewAnalyticsFilter
from .public_survey_monkey_value_filter import PublicSurveyMonkeyValueFilter
from .public_form_submission_on_page_filter import PublicFormSubmissionOnPageFilter
from .public_communication_subscription_filter import PublicCommunicationSubscriptionFilter
-from .public_property_association_in_list_filter import PublicPropertyAssociationInListFilter
__all__ = ["PublicAndFilterBranch", "FilterBranch", "Filter"]
@@ -47,7 +44,6 @@
"PublicNotAnyFilterBranch",
"PublicRestrictedFilterBranch",
"PublicUnifiedEventsFilterBranch",
- "PublicPropertyAssociationFilterBranch",
"PublicAssociationFilterBranch",
],
PropertyInfo(discriminator="filter_branch_type"),
@@ -62,7 +58,6 @@
"PublicNotAnyFilterBranch",
"PublicRestrictedFilterBranch",
"PublicUnifiedEventsFilterBranch",
- "PublicPropertyAssociationFilterBranch",
"PublicAssociationFilterBranch",
],
PropertyInfo(discriminator="filter_branch_type"),
@@ -80,7 +75,6 @@
PublicIntegrationEventFilter,
PublicEmailSubscriptionFilter,
PublicCommunicationSubscriptionFilter,
- PublicCampaignInfluencedFilter,
PublicSurveyMonkeyFilter,
PublicSurveyMonkeyValueFilter,
PublicWebinarFilter,
@@ -89,9 +83,7 @@
PublicAdsSearchFilter,
PublicAdsTimeFilter,
PublicInListFilter,
- PublicNumAssociationsFilter,
PublicUnifiedEventsFilter,
- PublicPropertyAssociationInListFilter,
PublicConstantFilter,
],
PropertyInfo(discriminator="filter_type"),
@@ -116,4 +108,3 @@ class PublicAndFilterBranch(BaseModel):
from .public_restricted_filter_branch import PublicRestrictedFilterBranch
from .public_association_filter_branch import PublicAssociationFilterBranch
from .public_unified_events_filter_branch import PublicUnifiedEventsFilterBranch
-from .public_property_association_filter_branch import PublicPropertyAssociationFilterBranch
diff --git a/src/hubspot_sdk/types/crm/public_and_filter_branch_param.py b/src/hubspot_sdk/types/crm/public_and_filter_branch_param.py
index ca9b0900..0d23842c 100644
--- a/src/hubspot_sdk/types/crm/public_and_filter_branch_param.py
+++ b/src/hubspot_sdk/types/crm/public_and_filter_branch_param.py
@@ -19,17 +19,14 @@
from .public_unified_events_filter_param import PublicUnifiedEventsFilterParam
from .public_event_analytics_filter_param import PublicEventAnalyticsFilterParam
from .public_form_submission_filter_param import PublicFormSubmissionFilterParam
-from .public_num_associations_filter_param import PublicNumAssociationsFilterParam
from .public_integration_event_filter_param import PublicIntegrationEventFilterParam
from .public_privacy_analytics_filter_param import PublicPrivacyAnalyticsFilterParam
from .public_email_subscription_filter_param import PublicEmailSubscriptionFilterParam
from .public_association_in_list_filter_param import PublicAssociationInListFilterParam
-from .public_campaign_influenced_filter_param import PublicCampaignInfluencedFilterParam
from .public_page_view_analytics_filter_param import PublicPageViewAnalyticsFilterParam
from .public_survey_monkey_value_filter_param import PublicSurveyMonkeyValueFilterParam
from .public_form_submission_on_page_filter_param import PublicFormSubmissionOnPageFilterParam
from .public_communication_subscription_filter_param import PublicCommunicationSubscriptionFilterParam
-from .public_property_association_in_list_filter_param import PublicPropertyAssociationInListFilterParam
__all__ = ["PublicAndFilterBranchParam", "FilterBranch", "Filter"]
@@ -43,7 +40,6 @@
"PublicNotAnyFilterBranchParam",
"PublicRestrictedFilterBranchParam",
"PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
"PublicAssociationFilterBranchParam",
],
)
@@ -55,7 +51,6 @@
"PublicNotAnyFilterBranchParam",
"PublicRestrictedFilterBranchParam",
"PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
"PublicAssociationFilterBranchParam",
]
@@ -70,7 +65,6 @@
PublicIntegrationEventFilterParam,
PublicEmailSubscriptionFilterParam,
PublicCommunicationSubscriptionFilterParam,
- PublicCampaignInfluencedFilterParam,
PublicSurveyMonkeyFilterParam,
PublicSurveyMonkeyValueFilterParam,
PublicWebinarFilterParam,
@@ -79,9 +73,7 @@
PublicAdsSearchFilterParam,
PublicAdsTimeFilterParam,
PublicInListFilterParam,
- PublicNumAssociationsFilterParam,
PublicUnifiedEventsFilterParam,
- PublicPropertyAssociationInListFilterParam,
PublicConstantFilterParam,
]
@@ -104,4 +96,3 @@ class PublicAndFilterBranchParam(TypedDict, total=False):
from .public_restricted_filter_branch_param import PublicRestrictedFilterBranchParam
from .public_association_filter_branch_param import PublicAssociationFilterBranchParam
from .public_unified_events_filter_branch_param import PublicUnifiedEventsFilterBranchParam
-from .public_property_association_filter_branch_param import PublicPropertyAssociationFilterBranchParam
diff --git a/src/hubspot_sdk/types/crm/public_association_filter_branch.py b/src/hubspot_sdk/types/crm/public_association_filter_branch.py
index 5d6c5b21..ff6cc205 100644
--- a/src/hubspot_sdk/types/crm/public_association_filter_branch.py
+++ b/src/hubspot_sdk/types/crm/public_association_filter_branch.py
@@ -22,17 +22,14 @@
from .public_unified_events_filter import PublicUnifiedEventsFilter
from .public_event_analytics_filter import PublicEventAnalyticsFilter
from .public_form_submission_filter import PublicFormSubmissionFilter
-from .public_num_associations_filter import PublicNumAssociationsFilter
from .public_integration_event_filter import PublicIntegrationEventFilter
from .public_privacy_analytics_filter import PublicPrivacyAnalyticsFilter
from .public_email_subscription_filter import PublicEmailSubscriptionFilter
from .public_association_in_list_filter import PublicAssociationInListFilter
-from .public_campaign_influenced_filter import PublicCampaignInfluencedFilter
from .public_page_view_analytics_filter import PublicPageViewAnalyticsFilter
from .public_survey_monkey_value_filter import PublicSurveyMonkeyValueFilter
from .public_form_submission_on_page_filter import PublicFormSubmissionOnPageFilter
from .public_communication_subscription_filter import PublicCommunicationSubscriptionFilter
-from .public_property_association_in_list_filter import PublicPropertyAssociationInListFilter
__all__ = ["PublicAssociationFilterBranch", "FilterBranch", "Filter"]
@@ -47,7 +44,6 @@
"PublicNotAnyFilterBranch",
"PublicRestrictedFilterBranch",
"PublicUnifiedEventsFilterBranch",
- "PublicPropertyAssociationFilterBranch",
"PublicAssociationFilterBranch",
],
PropertyInfo(discriminator="filter_branch_type"),
@@ -62,7 +58,6 @@
"PublicNotAnyFilterBranch",
"PublicRestrictedFilterBranch",
"PublicUnifiedEventsFilterBranch",
- "PublicPropertyAssociationFilterBranch",
"PublicAssociationFilterBranch",
],
PropertyInfo(discriminator="filter_branch_type"),
@@ -80,7 +75,6 @@
PublicIntegrationEventFilter,
PublicEmailSubscriptionFilter,
PublicCommunicationSubscriptionFilter,
- PublicCampaignInfluencedFilter,
PublicSurveyMonkeyFilter,
PublicSurveyMonkeyValueFilter,
PublicWebinarFilter,
@@ -89,9 +83,7 @@
PublicAdsSearchFilter,
PublicAdsTimeFilter,
PublicInListFilter,
- PublicNumAssociationsFilter,
PublicUnifiedEventsFilter,
- PublicPropertyAssociationInListFilter,
PublicConstantFilter,
],
PropertyInfo(discriminator="filter_type"),
@@ -134,4 +126,3 @@ class PublicAssociationFilterBranch(BaseModel):
from .public_not_any_filter_branch import PublicNotAnyFilterBranch
from .public_restricted_filter_branch import PublicRestrictedFilterBranch
from .public_unified_events_filter_branch import PublicUnifiedEventsFilterBranch
-from .public_property_association_filter_branch import PublicPropertyAssociationFilterBranch
diff --git a/src/hubspot_sdk/types/crm/public_association_filter_branch_param.py b/src/hubspot_sdk/types/crm/public_association_filter_branch_param.py
index 3cdd5734..8ab06c59 100644
--- a/src/hubspot_sdk/types/crm/public_association_filter_branch_param.py
+++ b/src/hubspot_sdk/types/crm/public_association_filter_branch_param.py
@@ -19,17 +19,14 @@
from .public_unified_events_filter_param import PublicUnifiedEventsFilterParam
from .public_event_analytics_filter_param import PublicEventAnalyticsFilterParam
from .public_form_submission_filter_param import PublicFormSubmissionFilterParam
-from .public_num_associations_filter_param import PublicNumAssociationsFilterParam
from .public_integration_event_filter_param import PublicIntegrationEventFilterParam
from .public_privacy_analytics_filter_param import PublicPrivacyAnalyticsFilterParam
from .public_email_subscription_filter_param import PublicEmailSubscriptionFilterParam
from .public_association_in_list_filter_param import PublicAssociationInListFilterParam
-from .public_campaign_influenced_filter_param import PublicCampaignInfluencedFilterParam
from .public_page_view_analytics_filter_param import PublicPageViewAnalyticsFilterParam
from .public_survey_monkey_value_filter_param import PublicSurveyMonkeyValueFilterParam
from .public_form_submission_on_page_filter_param import PublicFormSubmissionOnPageFilterParam
from .public_communication_subscription_filter_param import PublicCommunicationSubscriptionFilterParam
-from .public_property_association_in_list_filter_param import PublicPropertyAssociationInListFilterParam
__all__ = ["PublicAssociationFilterBranchParam", "FilterBranch", "Filter"]
@@ -43,7 +40,6 @@
"PublicNotAnyFilterBranchParam",
"PublicRestrictedFilterBranchParam",
"PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
"PublicAssociationFilterBranchParam",
],
)
@@ -55,7 +51,6 @@
"PublicNotAnyFilterBranchParam",
"PublicRestrictedFilterBranchParam",
"PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
"PublicAssociationFilterBranchParam",
]
@@ -70,7 +65,6 @@
PublicIntegrationEventFilterParam,
PublicEmailSubscriptionFilterParam,
PublicCommunicationSubscriptionFilterParam,
- PublicCampaignInfluencedFilterParam,
PublicSurveyMonkeyFilterParam,
PublicSurveyMonkeyValueFilterParam,
PublicWebinarFilterParam,
@@ -79,9 +73,7 @@
PublicAdsSearchFilterParam,
PublicAdsTimeFilterParam,
PublicInListFilterParam,
- PublicNumAssociationsFilterParam,
PublicUnifiedEventsFilterParam,
- PublicPropertyAssociationInListFilterParam,
PublicConstantFilterParam,
]
@@ -122,4 +114,3 @@ class PublicAssociationFilterBranchParam(TypedDict, total=False):
from .public_not_any_filter_branch_param import PublicNotAnyFilterBranchParam
from .public_restricted_filter_branch_param import PublicRestrictedFilterBranchParam
from .public_unified_events_filter_branch_param import PublicUnifiedEventsFilterBranchParam
-from .public_property_association_filter_branch_param import PublicPropertyAssociationFilterBranchParam
diff --git a/src/hubspot_sdk/types/crm/public_campaign_influenced_filter.py b/src/hubspot_sdk/types/crm/public_campaign_influenced_filter.py
deleted file mode 100644
index 25b8bc71..00000000
--- a/src/hubspot_sdk/types/crm/public_campaign_influenced_filter.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing_extensions import Literal
-
-from pydantic import Field as FieldInfo
-
-from ..._models import BaseModel
-
-__all__ = ["PublicCampaignInfluencedFilter"]
-
-
-class PublicCampaignInfluencedFilter(BaseModel):
- campaign_id: str = FieldInfo(alias="campaignId")
- """The ID of the campaign that influences the filter."""
-
- filter_type: Literal["CAMPAIGN_INFLUENCED"] = FieldInfo(alias="filterType")
- """Indicates the type of filter (CAMPAIGN_INFLUENCED)."""
diff --git a/src/hubspot_sdk/types/crm/public_campaign_influenced_filter_param.py b/src/hubspot_sdk/types/crm/public_campaign_influenced_filter_param.py
deleted file mode 100644
index 015be243..00000000
--- a/src/hubspot_sdk/types/crm/public_campaign_influenced_filter_param.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import Literal, Required, Annotated, TypedDict
-
-from ..._utils import PropertyInfo
-
-__all__ = ["PublicCampaignInfluencedFilterParam"]
-
-
-class PublicCampaignInfluencedFilterParam(TypedDict, total=False):
- campaign_id: Required[Annotated[str, PropertyInfo(alias="campaignId")]]
- """The ID of the campaign that influences the filter."""
-
- filter_type: Required[Annotated[Literal["CAMPAIGN_INFLUENCED"], PropertyInfo(alias="filterType")]]
- """Indicates the type of filter (CAMPAIGN_INFLUENCED)."""
diff --git a/src/hubspot_sdk/types/crm/public_crm_search_request_param.py b/src/hubspot_sdk/types/crm/public_crm_search_request_param.py
index 82f75402..e723de40 100644
--- a/src/hubspot_sdk/types/crm/public_crm_search_request_param.py
+++ b/src/hubspot_sdk/types/crm/public_crm_search_request_param.py
@@ -7,7 +7,7 @@
from ..._types import SequenceNotStr
from ..._utils import PropertyInfo
-from .filter_param import FilterParam
+from .crm_filter_param import CrmFilterParam
from .filter_group_param import FilterGroupParam
__all__ = ["PublicCrmSearchRequestParam"]
@@ -16,7 +16,7 @@
class PublicCrmSearchRequestParam(TypedDict, total=False):
filter_groups: Required[Annotated[Iterable[FilterGroupParam], PropertyInfo(alias="filterGroups")]]
- filters: Required[Iterable[FilterParam]]
+ filters: Required[Iterable[CrmFilterParam]]
sorts: Required[SequenceNotStr[str]]
"""Defines the order in which the CRM records should be returned."""
diff --git a/src/hubspot_sdk/types/crm/public_export_list_request_param.py b/src/hubspot_sdk/types/crm/public_export_list_request_param.py
index 1009cf55..cf4f7cde 100644
--- a/src/hubspot_sdk/types/crm/public_export_list_request_param.py
+++ b/src/hubspot_sdk/types/crm/public_export_list_request_param.py
@@ -22,7 +22,7 @@ class PublicExportListRequestParam(TypedDict, total=False):
export_type: Required[Annotated[Literal["LIST"], PropertyInfo(alias="exportType")]]
- format: Required[Literal["XLS", "XLSX", "CSV"]]
+ format: Required[Literal["CSV", "XLS", "XLSX"]]
include_labeled_associations: Required[Annotated[bool, PropertyInfo(alias="includeLabeledAssociations")]]
@@ -32,23 +32,51 @@ class PublicExportListRequestParam(TypedDict, total=False):
language: Required[
Literal[
- "EN",
+ "AF_ZA",
+ "AR_EG",
+ "BG",
+ "BN",
+ "CA_ES",
+ "CS",
+ "DA_DK",
"DE",
+ "EL_GR",
+ "EN",
+ "EN_GB",
"ES",
+ "ES_MX",
+ "ET_EE",
+ "FI",
"FR",
+ "FR_CA",
+ "HE_IL",
+ "HI_IN",
+ "HR",
+ "HU",
+ "ID",
+ "IT",
"JA",
+ "KO_KR",
+ "LT_LT",
+ "MS",
"NL",
- "PT_BR",
- "IT",
+ "NO",
"PL",
+ "PT_BR",
+ "PT_PT",
+ "RO",
+ "RU",
+ "SK_SK",
+ "SL",
"SV",
- "FI",
- "ZH_TW",
- "DA_DK",
- "NO",
- "KO_KR",
"TH",
+ "TL",
+ "TR",
+ "UK",
+ "VI_VN",
"ZH_CN",
+ "ZH_HK",
+ "ZH_TW",
]
]
diff --git a/src/hubspot_sdk/types/crm/public_export_view_request_param.py b/src/hubspot_sdk/types/crm/public_export_view_request_param.py
index b80fa62c..ed0ff499 100644
--- a/src/hubspot_sdk/types/crm/public_export_view_request_param.py
+++ b/src/hubspot_sdk/types/crm/public_export_view_request_param.py
@@ -23,7 +23,7 @@ class PublicExportViewRequestParam(TypedDict, total=False):
export_type: Required[Annotated[Literal["VIEW"], PropertyInfo(alias="exportType")]]
- format: Required[Literal["XLS", "XLSX", "CSV"]]
+ format: Required[Literal["CSV", "XLS", "XLSX"]]
include_labeled_associations: Required[Annotated[bool, PropertyInfo(alias="includeLabeledAssociations")]]
@@ -33,23 +33,51 @@ class PublicExportViewRequestParam(TypedDict, total=False):
language: Required[
Literal[
- "EN",
+ "AF_ZA",
+ "AR_EG",
+ "BG",
+ "BN",
+ "CA_ES",
+ "CS",
+ "DA_DK",
"DE",
+ "EL_GR",
+ "EN",
+ "EN_GB",
"ES",
+ "ES_MX",
+ "ET_EE",
+ "FI",
"FR",
+ "FR_CA",
+ "HE_IL",
+ "HI_IN",
+ "HR",
+ "HU",
+ "ID",
+ "IT",
"JA",
+ "KO_KR",
+ "LT_LT",
+ "MS",
"NL",
- "PT_BR",
- "IT",
+ "NO",
"PL",
+ "PT_BR",
+ "PT_PT",
+ "RO",
+ "RU",
+ "SK_SK",
+ "SL",
"SV",
- "FI",
- "ZH_TW",
- "DA_DK",
- "NO",
- "KO_KR",
"TH",
+ "TL",
+ "TR",
+ "UK",
+ "VI_VN",
"ZH_CN",
+ "ZH_HK",
+ "ZH_TW",
]
]
diff --git a/src/hubspot_sdk/types/crm/public_not_all_filter_branch.py b/src/hubspot_sdk/types/crm/public_not_all_filter_branch.py
index 0da3eec2..a5434aa8 100644
--- a/src/hubspot_sdk/types/crm/public_not_all_filter_branch.py
+++ b/src/hubspot_sdk/types/crm/public_not_all_filter_branch.py
@@ -22,17 +22,14 @@
from .public_unified_events_filter import PublicUnifiedEventsFilter
from .public_event_analytics_filter import PublicEventAnalyticsFilter
from .public_form_submission_filter import PublicFormSubmissionFilter
-from .public_num_associations_filter import PublicNumAssociationsFilter
from .public_integration_event_filter import PublicIntegrationEventFilter
from .public_privacy_analytics_filter import PublicPrivacyAnalyticsFilter
from .public_email_subscription_filter import PublicEmailSubscriptionFilter
from .public_association_in_list_filter import PublicAssociationInListFilter
-from .public_campaign_influenced_filter import PublicCampaignInfluencedFilter
from .public_page_view_analytics_filter import PublicPageViewAnalyticsFilter
from .public_survey_monkey_value_filter import PublicSurveyMonkeyValueFilter
from .public_form_submission_on_page_filter import PublicFormSubmissionOnPageFilter
from .public_communication_subscription_filter import PublicCommunicationSubscriptionFilter
-from .public_property_association_in_list_filter import PublicPropertyAssociationInListFilter
__all__ = ["PublicNotAllFilterBranch", "FilterBranch", "Filter"]
@@ -47,7 +44,6 @@
"PublicNotAnyFilterBranch",
"PublicRestrictedFilterBranch",
"PublicUnifiedEventsFilterBranch",
- "PublicPropertyAssociationFilterBranch",
"PublicAssociationFilterBranch",
],
PropertyInfo(discriminator="filter_branch_type"),
@@ -62,7 +58,6 @@
"PublicNotAnyFilterBranch",
"PublicRestrictedFilterBranch",
"PublicUnifiedEventsFilterBranch",
- "PublicPropertyAssociationFilterBranch",
"PublicAssociationFilterBranch",
],
PropertyInfo(discriminator="filter_branch_type"),
@@ -80,7 +75,6 @@
PublicIntegrationEventFilter,
PublicEmailSubscriptionFilter,
PublicCommunicationSubscriptionFilter,
- PublicCampaignInfluencedFilter,
PublicSurveyMonkeyFilter,
PublicSurveyMonkeyValueFilter,
PublicWebinarFilter,
@@ -89,9 +83,7 @@
PublicAdsSearchFilter,
PublicAdsTimeFilter,
PublicInListFilter,
- PublicNumAssociationsFilter,
PublicUnifiedEventsFilter,
- PublicPropertyAssociationInListFilter,
PublicConstantFilter,
],
PropertyInfo(discriminator="filter_type"),
@@ -116,4 +108,3 @@ class PublicNotAllFilterBranch(BaseModel):
from .public_restricted_filter_branch import PublicRestrictedFilterBranch
from .public_association_filter_branch import PublicAssociationFilterBranch
from .public_unified_events_filter_branch import PublicUnifiedEventsFilterBranch
-from .public_property_association_filter_branch import PublicPropertyAssociationFilterBranch
diff --git a/src/hubspot_sdk/types/crm/public_not_all_filter_branch_param.py b/src/hubspot_sdk/types/crm/public_not_all_filter_branch_param.py
index ba8283dc..d45a88c5 100644
--- a/src/hubspot_sdk/types/crm/public_not_all_filter_branch_param.py
+++ b/src/hubspot_sdk/types/crm/public_not_all_filter_branch_param.py
@@ -19,17 +19,14 @@
from .public_unified_events_filter_param import PublicUnifiedEventsFilterParam
from .public_event_analytics_filter_param import PublicEventAnalyticsFilterParam
from .public_form_submission_filter_param import PublicFormSubmissionFilterParam
-from .public_num_associations_filter_param import PublicNumAssociationsFilterParam
from .public_integration_event_filter_param import PublicIntegrationEventFilterParam
from .public_privacy_analytics_filter_param import PublicPrivacyAnalyticsFilterParam
from .public_email_subscription_filter_param import PublicEmailSubscriptionFilterParam
from .public_association_in_list_filter_param import PublicAssociationInListFilterParam
-from .public_campaign_influenced_filter_param import PublicCampaignInfluencedFilterParam
from .public_page_view_analytics_filter_param import PublicPageViewAnalyticsFilterParam
from .public_survey_monkey_value_filter_param import PublicSurveyMonkeyValueFilterParam
from .public_form_submission_on_page_filter_param import PublicFormSubmissionOnPageFilterParam
from .public_communication_subscription_filter_param import PublicCommunicationSubscriptionFilterParam
-from .public_property_association_in_list_filter_param import PublicPropertyAssociationInListFilterParam
__all__ = ["PublicNotAllFilterBranchParam", "FilterBranch", "Filter"]
@@ -43,7 +40,6 @@
"PublicNotAnyFilterBranchParam",
"PublicRestrictedFilterBranchParam",
"PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
"PublicAssociationFilterBranchParam",
],
)
@@ -55,7 +51,6 @@
"PublicNotAnyFilterBranchParam",
"PublicRestrictedFilterBranchParam",
"PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
"PublicAssociationFilterBranchParam",
]
@@ -70,7 +65,6 @@
PublicIntegrationEventFilterParam,
PublicEmailSubscriptionFilterParam,
PublicCommunicationSubscriptionFilterParam,
- PublicCampaignInfluencedFilterParam,
PublicSurveyMonkeyFilterParam,
PublicSurveyMonkeyValueFilterParam,
PublicWebinarFilterParam,
@@ -79,9 +73,7 @@
PublicAdsSearchFilterParam,
PublicAdsTimeFilterParam,
PublicInListFilterParam,
- PublicNumAssociationsFilterParam,
PublicUnifiedEventsFilterParam,
- PublicPropertyAssociationInListFilterParam,
PublicConstantFilterParam,
]
@@ -104,4 +96,3 @@ class PublicNotAllFilterBranchParam(TypedDict, total=False):
from .public_restricted_filter_branch_param import PublicRestrictedFilterBranchParam
from .public_association_filter_branch_param import PublicAssociationFilterBranchParam
from .public_unified_events_filter_branch_param import PublicUnifiedEventsFilterBranchParam
-from .public_property_association_filter_branch_param import PublicPropertyAssociationFilterBranchParam
diff --git a/src/hubspot_sdk/types/crm/public_not_any_filter_branch.py b/src/hubspot_sdk/types/crm/public_not_any_filter_branch.py
index 928f3466..20287466 100644
--- a/src/hubspot_sdk/types/crm/public_not_any_filter_branch.py
+++ b/src/hubspot_sdk/types/crm/public_not_any_filter_branch.py
@@ -22,17 +22,14 @@
from .public_unified_events_filter import PublicUnifiedEventsFilter
from .public_event_analytics_filter import PublicEventAnalyticsFilter
from .public_form_submission_filter import PublicFormSubmissionFilter
-from .public_num_associations_filter import PublicNumAssociationsFilter
from .public_integration_event_filter import PublicIntegrationEventFilter
from .public_privacy_analytics_filter import PublicPrivacyAnalyticsFilter
from .public_email_subscription_filter import PublicEmailSubscriptionFilter
from .public_association_in_list_filter import PublicAssociationInListFilter
-from .public_campaign_influenced_filter import PublicCampaignInfluencedFilter
from .public_page_view_analytics_filter import PublicPageViewAnalyticsFilter
from .public_survey_monkey_value_filter import PublicSurveyMonkeyValueFilter
from .public_form_submission_on_page_filter import PublicFormSubmissionOnPageFilter
from .public_communication_subscription_filter import PublicCommunicationSubscriptionFilter
-from .public_property_association_in_list_filter import PublicPropertyAssociationInListFilter
__all__ = ["PublicNotAnyFilterBranch", "FilterBranch", "Filter"]
@@ -47,7 +44,6 @@
"PublicNotAnyFilterBranch",
"PublicRestrictedFilterBranch",
"PublicUnifiedEventsFilterBranch",
- "PublicPropertyAssociationFilterBranch",
"PublicAssociationFilterBranch",
],
PropertyInfo(discriminator="filter_branch_type"),
@@ -62,7 +58,6 @@
"PublicNotAnyFilterBranch",
"PublicRestrictedFilterBranch",
"PublicUnifiedEventsFilterBranch",
- "PublicPropertyAssociationFilterBranch",
"PublicAssociationFilterBranch",
],
PropertyInfo(discriminator="filter_branch_type"),
@@ -80,7 +75,6 @@
PublicIntegrationEventFilter,
PublicEmailSubscriptionFilter,
PublicCommunicationSubscriptionFilter,
- PublicCampaignInfluencedFilter,
PublicSurveyMonkeyFilter,
PublicSurveyMonkeyValueFilter,
PublicWebinarFilter,
@@ -89,9 +83,7 @@
PublicAdsSearchFilter,
PublicAdsTimeFilter,
PublicInListFilter,
- PublicNumAssociationsFilter,
PublicUnifiedEventsFilter,
- PublicPropertyAssociationInListFilter,
PublicConstantFilter,
],
PropertyInfo(discriminator="filter_type"),
@@ -119,4 +111,3 @@ class PublicNotAnyFilterBranch(BaseModel):
from .public_restricted_filter_branch import PublicRestrictedFilterBranch
from .public_association_filter_branch import PublicAssociationFilterBranch
from .public_unified_events_filter_branch import PublicUnifiedEventsFilterBranch
-from .public_property_association_filter_branch import PublicPropertyAssociationFilterBranch
diff --git a/src/hubspot_sdk/types/crm/public_not_any_filter_branch_param.py b/src/hubspot_sdk/types/crm/public_not_any_filter_branch_param.py
index f4897a3e..b92e4c1c 100644
--- a/src/hubspot_sdk/types/crm/public_not_any_filter_branch_param.py
+++ b/src/hubspot_sdk/types/crm/public_not_any_filter_branch_param.py
@@ -19,17 +19,14 @@
from .public_unified_events_filter_param import PublicUnifiedEventsFilterParam
from .public_event_analytics_filter_param import PublicEventAnalyticsFilterParam
from .public_form_submission_filter_param import PublicFormSubmissionFilterParam
-from .public_num_associations_filter_param import PublicNumAssociationsFilterParam
from .public_integration_event_filter_param import PublicIntegrationEventFilterParam
from .public_privacy_analytics_filter_param import PublicPrivacyAnalyticsFilterParam
from .public_email_subscription_filter_param import PublicEmailSubscriptionFilterParam
from .public_association_in_list_filter_param import PublicAssociationInListFilterParam
-from .public_campaign_influenced_filter_param import PublicCampaignInfluencedFilterParam
from .public_page_view_analytics_filter_param import PublicPageViewAnalyticsFilterParam
from .public_survey_monkey_value_filter_param import PublicSurveyMonkeyValueFilterParam
from .public_form_submission_on_page_filter_param import PublicFormSubmissionOnPageFilterParam
from .public_communication_subscription_filter_param import PublicCommunicationSubscriptionFilterParam
-from .public_property_association_in_list_filter_param import PublicPropertyAssociationInListFilterParam
__all__ = ["PublicNotAnyFilterBranchParam", "FilterBranch", "Filter"]
@@ -43,7 +40,6 @@
"PublicNotAnyFilterBranchParam",
"PublicRestrictedFilterBranchParam",
"PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
"PublicAssociationFilterBranchParam",
],
)
@@ -55,7 +51,6 @@
"PublicNotAnyFilterBranchParam",
"PublicRestrictedFilterBranchParam",
"PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
"PublicAssociationFilterBranchParam",
]
@@ -70,7 +65,6 @@
PublicIntegrationEventFilterParam,
PublicEmailSubscriptionFilterParam,
PublicCommunicationSubscriptionFilterParam,
- PublicCampaignInfluencedFilterParam,
PublicSurveyMonkeyFilterParam,
PublicSurveyMonkeyValueFilterParam,
PublicWebinarFilterParam,
@@ -79,9 +73,7 @@
PublicAdsSearchFilterParam,
PublicAdsTimeFilterParam,
PublicInListFilterParam,
- PublicNumAssociationsFilterParam,
PublicUnifiedEventsFilterParam,
- PublicPropertyAssociationInListFilterParam,
PublicConstantFilterParam,
]
@@ -107,4 +99,3 @@ class PublicNotAnyFilterBranchParam(TypedDict, total=False):
from .public_restricted_filter_branch_param import PublicRestrictedFilterBranchParam
from .public_association_filter_branch_param import PublicAssociationFilterBranchParam
from .public_unified_events_filter_branch_param import PublicUnifiedEventsFilterBranchParam
-from .public_property_association_filter_branch_param import PublicPropertyAssociationFilterBranchParam
diff --git a/src/hubspot_sdk/types/crm/public_num_associations_filter.py b/src/hubspot_sdk/types/crm/public_num_associations_filter.py
deleted file mode 100644
index ba371542..00000000
--- a/src/hubspot_sdk/types/crm/public_num_associations_filter.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Union
-from typing_extensions import Literal, TypeAlias
-
-from pydantic import Field as FieldInfo
-
-from ..._models import BaseModel
-from .public_time_point_operation import PublicTimePointOperation
-from .public_all_history_refine_by import PublicAllHistoryRefineBy
-from .public_ranged_time_operation import PublicRangedTimeOperation
-from .public_num_occurrences_refine_by import PublicNumOccurrencesRefineBy
-from .public_set_occurrences_refine_by import PublicSetOccurrencesRefineBy
-from .public_absolute_ranged_timestamp_refine_by import PublicAbsoluteRangedTimestampRefineBy
-from .public_relative_ranged_timestamp_refine_by import PublicRelativeRangedTimestampRefineBy
-from .public_absolute_comparative_timestamp_refine_by import PublicAbsoluteComparativeTimestampRefineBy
-from .public_relative_comparative_timestamp_refine_by import PublicRelativeComparativeTimestampRefineBy
-
-__all__ = ["PublicNumAssociationsFilter", "CoalescingRefineBy"]
-
-CoalescingRefineBy: TypeAlias = Union[
- PublicNumOccurrencesRefineBy,
- PublicSetOccurrencesRefineBy,
- PublicRelativeComparativeTimestampRefineBy,
- PublicRelativeRangedTimestampRefineBy,
- PublicAbsoluteComparativeTimestampRefineBy,
- PublicAbsoluteRangedTimestampRefineBy,
- PublicAllHistoryRefineBy,
- PublicTimePointOperation,
- PublicRangedTimeOperation,
-]
-
-
-class PublicNumAssociationsFilter(BaseModel):
- association_category: str = FieldInfo(alias="associationCategory")
- """
- Defines the category of the association (HUBSPOT_DEFINED, USER_DEFINED,
- INTEGRATOR_DEFINED, WORK).
- """
-
- association_type_id: int = FieldInfo(alias="associationTypeId")
- """The ID representing the type of association being filtered."""
-
- coalescing_refine_by: CoalescingRefineBy = FieldInfo(alias="coalescingRefineBy")
- """Specifies the criteria for refining the association filter."""
-
- filter_type: Literal["NUM_ASSOCIATIONS"] = FieldInfo(alias="filterType")
- """Indicates the type of filter being applied (NUM_ASSOCIATIONS)."""
diff --git a/src/hubspot_sdk/types/crm/public_num_associations_filter_param.py b/src/hubspot_sdk/types/crm/public_num_associations_filter_param.py
deleted file mode 100644
index ffa3e52c..00000000
--- a/src/hubspot_sdk/types/crm/public_num_associations_filter_param.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import Union
-from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
-
-from ..._utils import PropertyInfo
-from .public_time_point_operation_param import PublicTimePointOperationParam
-from .public_all_history_refine_by_param import PublicAllHistoryRefineByParam
-from .public_ranged_time_operation_param import PublicRangedTimeOperationParam
-from .public_num_occurrences_refine_by_param import PublicNumOccurrencesRefineByParam
-from .public_set_occurrences_refine_by_param import PublicSetOccurrencesRefineByParam
-from .public_absolute_ranged_timestamp_refine_by_param import PublicAbsoluteRangedTimestampRefineByParam
-from .public_relative_ranged_timestamp_refine_by_param import PublicRelativeRangedTimestampRefineByParam
-from .public_absolute_comparative_timestamp_refine_by_param import PublicAbsoluteComparativeTimestampRefineByParam
-from .public_relative_comparative_timestamp_refine_by_param import PublicRelativeComparativeTimestampRefineByParam
-
-__all__ = ["PublicNumAssociationsFilterParam", "CoalescingRefineBy"]
-
-CoalescingRefineBy: TypeAlias = Union[
- PublicNumOccurrencesRefineByParam,
- PublicSetOccurrencesRefineByParam,
- PublicRelativeComparativeTimestampRefineByParam,
- PublicRelativeRangedTimestampRefineByParam,
- PublicAbsoluteComparativeTimestampRefineByParam,
- PublicAbsoluteRangedTimestampRefineByParam,
- PublicAllHistoryRefineByParam,
- PublicTimePointOperationParam,
- PublicRangedTimeOperationParam,
-]
-
-
-class PublicNumAssociationsFilterParam(TypedDict, total=False):
- association_category: Required[Annotated[str, PropertyInfo(alias="associationCategory")]]
- """
- Defines the category of the association (HUBSPOT_DEFINED, USER_DEFINED,
- INTEGRATOR_DEFINED, WORK).
- """
-
- association_type_id: Required[Annotated[int, PropertyInfo(alias="associationTypeId")]]
- """The ID representing the type of association being filtered."""
-
- coalescing_refine_by: Required[Annotated[CoalescingRefineBy, PropertyInfo(alias="coalescingRefineBy")]]
- """Specifies the criteria for refining the association filter."""
-
- filter_type: Required[Annotated[Literal["NUM_ASSOCIATIONS"], PropertyInfo(alias="filterType")]]
- """Indicates the type of filter being applied (NUM_ASSOCIATIONS)."""
diff --git a/src/hubspot_sdk/types/crm/public_object_list.py b/src/hubspot_sdk/types/crm/public_object_list.py
index 3d8ac21f..fbdda1ff 100644
--- a/src/hubspot_sdk/types/crm/public_object_list.py
+++ b/src/hubspot_sdk/types/crm/public_object_list.py
@@ -23,7 +23,6 @@
"PublicNotAnyFilterBranch",
"PublicRestrictedFilterBranch",
"PublicUnifiedEventsFilterBranch",
- "PublicPropertyAssociationFilterBranch",
"PublicAssociationFilterBranch",
],
PropertyInfo(discriminator="filter_branch_type"),
@@ -88,4 +87,3 @@ class PublicObjectList(BaseModel):
from .public_restricted_filter_branch import PublicRestrictedFilterBranch
from .public_association_filter_branch import PublicAssociationFilterBranch
from .public_unified_events_filter_branch import PublicUnifiedEventsFilterBranch
-from .public_property_association_filter_branch import PublicPropertyAssociationFilterBranch
diff --git a/src/hubspot_sdk/types/crm/public_or_filter_branch.py b/src/hubspot_sdk/types/crm/public_or_filter_branch.py
index b5969585..570fdcc1 100644
--- a/src/hubspot_sdk/types/crm/public_or_filter_branch.py
+++ b/src/hubspot_sdk/types/crm/public_or_filter_branch.py
@@ -22,17 +22,14 @@
from .public_unified_events_filter import PublicUnifiedEventsFilter
from .public_event_analytics_filter import PublicEventAnalyticsFilter
from .public_form_submission_filter import PublicFormSubmissionFilter
-from .public_num_associations_filter import PublicNumAssociationsFilter
from .public_integration_event_filter import PublicIntegrationEventFilter
from .public_privacy_analytics_filter import PublicPrivacyAnalyticsFilter
from .public_email_subscription_filter import PublicEmailSubscriptionFilter
from .public_association_in_list_filter import PublicAssociationInListFilter
-from .public_campaign_influenced_filter import PublicCampaignInfluencedFilter
from .public_page_view_analytics_filter import PublicPageViewAnalyticsFilter
from .public_survey_monkey_value_filter import PublicSurveyMonkeyValueFilter
from .public_form_submission_on_page_filter import PublicFormSubmissionOnPageFilter
from .public_communication_subscription_filter import PublicCommunicationSubscriptionFilter
-from .public_property_association_in_list_filter import PublicPropertyAssociationInListFilter
__all__ = ["PublicOrFilterBranch", "FilterBranch", "Filter"]
@@ -47,7 +44,6 @@
"PublicNotAnyFilterBranch",
"PublicRestrictedFilterBranch",
"PublicUnifiedEventsFilterBranch",
- "PublicPropertyAssociationFilterBranch",
"PublicAssociationFilterBranch",
],
PropertyInfo(discriminator="filter_branch_type"),
@@ -62,7 +58,6 @@
"PublicNotAnyFilterBranch",
"PublicRestrictedFilterBranch",
"PublicUnifiedEventsFilterBranch",
- "PublicPropertyAssociationFilterBranch",
"PublicAssociationFilterBranch",
],
PropertyInfo(discriminator="filter_branch_type"),
@@ -80,7 +75,6 @@
PublicIntegrationEventFilter,
PublicEmailSubscriptionFilter,
PublicCommunicationSubscriptionFilter,
- PublicCampaignInfluencedFilter,
PublicSurveyMonkeyFilter,
PublicSurveyMonkeyValueFilter,
PublicWebinarFilter,
@@ -89,9 +83,7 @@
PublicAdsSearchFilter,
PublicAdsTimeFilter,
PublicInListFilter,
- PublicNumAssociationsFilter,
PublicUnifiedEventsFilter,
- PublicPropertyAssociationInListFilter,
PublicConstantFilter,
],
PropertyInfo(discriminator="filter_type"),
@@ -116,4 +108,3 @@ class PublicOrFilterBranch(BaseModel):
from .public_restricted_filter_branch import PublicRestrictedFilterBranch
from .public_association_filter_branch import PublicAssociationFilterBranch
from .public_unified_events_filter_branch import PublicUnifiedEventsFilterBranch
-from .public_property_association_filter_branch import PublicPropertyAssociationFilterBranch
diff --git a/src/hubspot_sdk/types/crm/public_or_filter_branch_param.py b/src/hubspot_sdk/types/crm/public_or_filter_branch_param.py
index 3ac78e74..626b6772 100644
--- a/src/hubspot_sdk/types/crm/public_or_filter_branch_param.py
+++ b/src/hubspot_sdk/types/crm/public_or_filter_branch_param.py
@@ -19,17 +19,14 @@
from .public_unified_events_filter_param import PublicUnifiedEventsFilterParam
from .public_event_analytics_filter_param import PublicEventAnalyticsFilterParam
from .public_form_submission_filter_param import PublicFormSubmissionFilterParam
-from .public_num_associations_filter_param import PublicNumAssociationsFilterParam
from .public_integration_event_filter_param import PublicIntegrationEventFilterParam
from .public_privacy_analytics_filter_param import PublicPrivacyAnalyticsFilterParam
from .public_email_subscription_filter_param import PublicEmailSubscriptionFilterParam
from .public_association_in_list_filter_param import PublicAssociationInListFilterParam
-from .public_campaign_influenced_filter_param import PublicCampaignInfluencedFilterParam
from .public_page_view_analytics_filter_param import PublicPageViewAnalyticsFilterParam
from .public_survey_monkey_value_filter_param import PublicSurveyMonkeyValueFilterParam
from .public_form_submission_on_page_filter_param import PublicFormSubmissionOnPageFilterParam
from .public_communication_subscription_filter_param import PublicCommunicationSubscriptionFilterParam
-from .public_property_association_in_list_filter_param import PublicPropertyAssociationInListFilterParam
__all__ = ["PublicOrFilterBranchParam", "FilterBranch", "Filter"]
@@ -43,7 +40,6 @@
"PublicNotAnyFilterBranchParam",
"PublicRestrictedFilterBranchParam",
"PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
"PublicAssociationFilterBranchParam",
],
)
@@ -55,7 +51,6 @@
"PublicNotAnyFilterBranchParam",
"PublicRestrictedFilterBranchParam",
"PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
"PublicAssociationFilterBranchParam",
]
@@ -70,7 +65,6 @@
PublicIntegrationEventFilterParam,
PublicEmailSubscriptionFilterParam,
PublicCommunicationSubscriptionFilterParam,
- PublicCampaignInfluencedFilterParam,
PublicSurveyMonkeyFilterParam,
PublicSurveyMonkeyValueFilterParam,
PublicWebinarFilterParam,
@@ -79,9 +73,7 @@
PublicAdsSearchFilterParam,
PublicAdsTimeFilterParam,
PublicInListFilterParam,
- PublicNumAssociationsFilterParam,
PublicUnifiedEventsFilterParam,
- PublicPropertyAssociationInListFilterParam,
PublicConstantFilterParam,
]
@@ -104,4 +96,3 @@ class PublicOrFilterBranchParam(TypedDict, total=False):
from .public_restricted_filter_branch_param import PublicRestrictedFilterBranchParam
from .public_association_filter_branch_param import PublicAssociationFilterBranchParam
from .public_unified_events_filter_branch_param import PublicUnifiedEventsFilterBranchParam
-from .public_property_association_filter_branch_param import PublicPropertyAssociationFilterBranchParam
diff --git a/src/hubspot_sdk/types/crm/public_property_association_filter_branch.py b/src/hubspot_sdk/types/crm/public_property_association_filter_branch.py
deleted file mode 100644
index 81044cf5..00000000
--- a/src/hubspot_sdk/types/crm/public_property_association_filter_branch.py
+++ /dev/null
@@ -1,131 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import TYPE_CHECKING, List, Union
-from typing_extensions import Literal, Annotated, TypeAlias, TypeAliasType
-
-from pydantic import Field as FieldInfo
-
-from ..._utils import PropertyInfo
-from ..._compat import PYDANTIC_V1
-from ..._models import BaseModel
-from .public_in_list_filter import PublicInListFilter
-from .public_webinar_filter import PublicWebinarFilter
-from .public_ads_time_filter import PublicAdsTimeFilter
-from .public_constant_filter import PublicConstantFilter
-from .public_property_filter import PublicPropertyFilter
-from .public_ads_search_filter import PublicAdsSearchFilter
-from .public_email_event_filter import PublicEmailEventFilter
-from .public_cta_analytics_filter import PublicCtaAnalyticsFilter
-from .public_survey_monkey_filter import PublicSurveyMonkeyFilter
-from .public_unified_events_filter import PublicUnifiedEventsFilter
-from .public_event_analytics_filter import PublicEventAnalyticsFilter
-from .public_form_submission_filter import PublicFormSubmissionFilter
-from .public_num_associations_filter import PublicNumAssociationsFilter
-from .public_integration_event_filter import PublicIntegrationEventFilter
-from .public_privacy_analytics_filter import PublicPrivacyAnalyticsFilter
-from .public_email_subscription_filter import PublicEmailSubscriptionFilter
-from .public_association_in_list_filter import PublicAssociationInListFilter
-from .public_campaign_influenced_filter import PublicCampaignInfluencedFilter
-from .public_page_view_analytics_filter import PublicPageViewAnalyticsFilter
-from .public_survey_monkey_value_filter import PublicSurveyMonkeyValueFilter
-from .public_form_submission_on_page_filter import PublicFormSubmissionOnPageFilter
-from .public_communication_subscription_filter import PublicCommunicationSubscriptionFilter
-from .public_property_association_in_list_filter import PublicPropertyAssociationInListFilter
-
-__all__ = ["PublicPropertyAssociationFilterBranch", "FilterBranch", "Filter"]
-
-if TYPE_CHECKING or not PYDANTIC_V1:
- FilterBranch = TypeAliasType(
- "FilterBranch",
- Annotated[
- Union[
- "PublicOrFilterBranch",
- "PublicAndFilterBranch",
- "PublicNotAllFilterBranch",
- "PublicNotAnyFilterBranch",
- "PublicRestrictedFilterBranch",
- "PublicUnifiedEventsFilterBranch",
- "PublicPropertyAssociationFilterBranch",
- "PublicAssociationFilterBranch",
- ],
- PropertyInfo(discriminator="filter_branch_type"),
- ],
- )
-else:
- FilterBranch: TypeAlias = Annotated[
- Union[
- "PublicOrFilterBranch",
- "PublicAndFilterBranch",
- "PublicNotAllFilterBranch",
- "PublicNotAnyFilterBranch",
- "PublicRestrictedFilterBranch",
- "PublicUnifiedEventsFilterBranch",
- "PublicPropertyAssociationFilterBranch",
- "PublicAssociationFilterBranch",
- ],
- PropertyInfo(discriminator="filter_branch_type"),
- ]
-
-Filter: TypeAlias = Annotated[
- Union[
- PublicPropertyFilter,
- PublicAssociationInListFilter,
- PublicPageViewAnalyticsFilter,
- PublicCtaAnalyticsFilter,
- PublicEventAnalyticsFilter,
- PublicFormSubmissionFilter,
- PublicFormSubmissionOnPageFilter,
- PublicIntegrationEventFilter,
- PublicEmailSubscriptionFilter,
- PublicCommunicationSubscriptionFilter,
- PublicCampaignInfluencedFilter,
- PublicSurveyMonkeyFilter,
- PublicSurveyMonkeyValueFilter,
- PublicWebinarFilter,
- PublicEmailEventFilter,
- PublicPrivacyAnalyticsFilter,
- PublicAdsSearchFilter,
- PublicAdsTimeFilter,
- PublicInListFilter,
- PublicNumAssociationsFilter,
- PublicUnifiedEventsFilter,
- PublicPropertyAssociationInListFilter,
- PublicConstantFilter,
- ],
- PropertyInfo(discriminator="filter_type"),
-]
-
-
-class PublicPropertyAssociationFilterBranch(BaseModel):
- filter_branches: List[FilterBranch] = FieldInfo(alias="filterBranches")
-
- filter_branch_operator: str = FieldInfo(alias="filterBranchOperator")
- """The logical operator used to combine filters within the branch."""
-
- filter_branch_type: Literal["PROPERTY_ASSOCIATION"] = FieldInfo(alias="filterBranchType")
- """The type of the filter branch (PROPERTY_ASSOCIATION)."""
-
- filters: List[Filter]
-
- object_type_id: str = FieldInfo(alias="objectTypeId")
- """The ID representing the type of object associated with the filter branch."""
-
- operator: str
- """
- Defines the operation to be applied within the filter branch (IN_LIST,
- NOT_IN_LIST).
- """
-
- property_with_object_id: str = FieldInfo(alias="propertyWithObjectId")
- """The property that is associated with the object ID in the filter branch."""
-
-
-from .public_or_filter_branch import PublicOrFilterBranch
-from .public_and_filter_branch import PublicAndFilterBranch
-from .public_not_all_filter_branch import PublicNotAllFilterBranch
-from .public_not_any_filter_branch import PublicNotAnyFilterBranch
-from .public_restricted_filter_branch import PublicRestrictedFilterBranch
-from .public_association_filter_branch import PublicAssociationFilterBranch
-from .public_unified_events_filter_branch import PublicUnifiedEventsFilterBranch
diff --git a/src/hubspot_sdk/types/crm/public_property_association_filter_branch_param.py b/src/hubspot_sdk/types/crm/public_property_association_filter_branch_param.py
deleted file mode 100644
index 6689166c..00000000
--- a/src/hubspot_sdk/types/crm/public_property_association_filter_branch_param.py
+++ /dev/null
@@ -1,119 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import TYPE_CHECKING, Union, Iterable
-from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict, TypeAliasType
-
-from ..._utils import PropertyInfo
-from ..._compat import PYDANTIC_V1
-from .public_in_list_filter_param import PublicInListFilterParam
-from .public_webinar_filter_param import PublicWebinarFilterParam
-from .public_ads_time_filter_param import PublicAdsTimeFilterParam
-from .public_constant_filter_param import PublicConstantFilterParam
-from .public_property_filter_param import PublicPropertyFilterParam
-from .public_ads_search_filter_param import PublicAdsSearchFilterParam
-from .public_email_event_filter_param import PublicEmailEventFilterParam
-from .public_cta_analytics_filter_param import PublicCtaAnalyticsFilterParam
-from .public_survey_monkey_filter_param import PublicSurveyMonkeyFilterParam
-from .public_unified_events_filter_param import PublicUnifiedEventsFilterParam
-from .public_event_analytics_filter_param import PublicEventAnalyticsFilterParam
-from .public_form_submission_filter_param import PublicFormSubmissionFilterParam
-from .public_num_associations_filter_param import PublicNumAssociationsFilterParam
-from .public_integration_event_filter_param import PublicIntegrationEventFilterParam
-from .public_privacy_analytics_filter_param import PublicPrivacyAnalyticsFilterParam
-from .public_email_subscription_filter_param import PublicEmailSubscriptionFilterParam
-from .public_association_in_list_filter_param import PublicAssociationInListFilterParam
-from .public_campaign_influenced_filter_param import PublicCampaignInfluencedFilterParam
-from .public_page_view_analytics_filter_param import PublicPageViewAnalyticsFilterParam
-from .public_survey_monkey_value_filter_param import PublicSurveyMonkeyValueFilterParam
-from .public_form_submission_on_page_filter_param import PublicFormSubmissionOnPageFilterParam
-from .public_communication_subscription_filter_param import PublicCommunicationSubscriptionFilterParam
-from .public_property_association_in_list_filter_param import PublicPropertyAssociationInListFilterParam
-
-__all__ = ["PublicPropertyAssociationFilterBranchParam", "FilterBranch", "Filter"]
-
-if TYPE_CHECKING or not PYDANTIC_V1:
- FilterBranch = TypeAliasType(
- "FilterBranch",
- Union[
- "PublicOrFilterBranchParam",
- "PublicAndFilterBranchParam",
- "PublicNotAllFilterBranchParam",
- "PublicNotAnyFilterBranchParam",
- "PublicRestrictedFilterBranchParam",
- "PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
- "PublicAssociationFilterBranchParam",
- ],
- )
-else:
- FilterBranch: TypeAlias = Union[
- "PublicOrFilterBranchParam",
- "PublicAndFilterBranchParam",
- "PublicNotAllFilterBranchParam",
- "PublicNotAnyFilterBranchParam",
- "PublicRestrictedFilterBranchParam",
- "PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
- "PublicAssociationFilterBranchParam",
- ]
-
-Filter: TypeAlias = Union[
- PublicPropertyFilterParam,
- PublicAssociationInListFilterParam,
- PublicPageViewAnalyticsFilterParam,
- PublicCtaAnalyticsFilterParam,
- PublicEventAnalyticsFilterParam,
- PublicFormSubmissionFilterParam,
- PublicFormSubmissionOnPageFilterParam,
- PublicIntegrationEventFilterParam,
- PublicEmailSubscriptionFilterParam,
- PublicCommunicationSubscriptionFilterParam,
- PublicCampaignInfluencedFilterParam,
- PublicSurveyMonkeyFilterParam,
- PublicSurveyMonkeyValueFilterParam,
- PublicWebinarFilterParam,
- PublicEmailEventFilterParam,
- PublicPrivacyAnalyticsFilterParam,
- PublicAdsSearchFilterParam,
- PublicAdsTimeFilterParam,
- PublicInListFilterParam,
- PublicNumAssociationsFilterParam,
- PublicUnifiedEventsFilterParam,
- PublicPropertyAssociationInListFilterParam,
- PublicConstantFilterParam,
-]
-
-
-class PublicPropertyAssociationFilterBranchParam(TypedDict, total=False):
- filter_branches: Required[Annotated[Iterable[FilterBranch], PropertyInfo(alias="filterBranches")]]
-
- filter_branch_operator: Required[Annotated[str, PropertyInfo(alias="filterBranchOperator")]]
- """The logical operator used to combine filters within the branch."""
-
- filter_branch_type: Required[Annotated[Literal["PROPERTY_ASSOCIATION"], PropertyInfo(alias="filterBranchType")]]
- """The type of the filter branch (PROPERTY_ASSOCIATION)."""
-
- filters: Required[Iterable[Filter]]
-
- object_type_id: Required[Annotated[str, PropertyInfo(alias="objectTypeId")]]
- """The ID representing the type of object associated with the filter branch."""
-
- operator: Required[str]
- """
- Defines the operation to be applied within the filter branch (IN_LIST,
- NOT_IN_LIST).
- """
-
- property_with_object_id: Required[Annotated[str, PropertyInfo(alias="propertyWithObjectId")]]
- """The property that is associated with the object ID in the filter branch."""
-
-
-from .public_or_filter_branch_param import PublicOrFilterBranchParam
-from .public_and_filter_branch_param import PublicAndFilterBranchParam
-from .public_not_all_filter_branch_param import PublicNotAllFilterBranchParam
-from .public_not_any_filter_branch_param import PublicNotAnyFilterBranchParam
-from .public_restricted_filter_branch_param import PublicRestrictedFilterBranchParam
-from .public_association_filter_branch_param import PublicAssociationFilterBranchParam
-from .public_unified_events_filter_branch_param import PublicUnifiedEventsFilterBranchParam
diff --git a/src/hubspot_sdk/types/crm/public_property_association_in_list_filter.py b/src/hubspot_sdk/types/crm/public_property_association_in_list_filter.py
deleted file mode 100644
index 1fd1331e..00000000
--- a/src/hubspot_sdk/types/crm/public_property_association_in_list_filter.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Union, Optional
-from typing_extensions import Literal, TypeAlias
-
-from pydantic import Field as FieldInfo
-
-from ..._models import BaseModel
-from .public_time_point_operation import PublicTimePointOperation
-from .public_all_history_refine_by import PublicAllHistoryRefineBy
-from .public_ranged_time_operation import PublicRangedTimeOperation
-from .public_num_occurrences_refine_by import PublicNumOccurrencesRefineBy
-from .public_set_occurrences_refine_by import PublicSetOccurrencesRefineBy
-from .public_absolute_ranged_timestamp_refine_by import PublicAbsoluteRangedTimestampRefineBy
-from .public_relative_ranged_timestamp_refine_by import PublicRelativeRangedTimestampRefineBy
-from .public_absolute_comparative_timestamp_refine_by import PublicAbsoluteComparativeTimestampRefineBy
-from .public_relative_comparative_timestamp_refine_by import PublicRelativeComparativeTimestampRefineBy
-
-__all__ = ["PublicPropertyAssociationInListFilter", "CoalescingRefineBy"]
-
-CoalescingRefineBy: TypeAlias = Union[
- PublicNumOccurrencesRefineBy,
- PublicSetOccurrencesRefineBy,
- PublicRelativeComparativeTimestampRefineBy,
- PublicRelativeRangedTimestampRefineBy,
- PublicAbsoluteComparativeTimestampRefineBy,
- PublicAbsoluteRangedTimestampRefineBy,
- PublicAllHistoryRefineBy,
- PublicTimePointOperation,
- PublicRangedTimeOperation,
-]
-
-
-class PublicPropertyAssociationInListFilter(BaseModel):
- coalescing_refine_by: CoalescingRefineBy = FieldInfo(alias="coalescingRefineBy")
- """Specifies the criteria for refining the filter by coalescing."""
-
- filter_type: Literal["PROPERTY_ASSOCIATION"] = FieldInfo(alias="filterType")
- """Indicates the type of filter being applied (PROPERTY_ASSOCIATION)."""
-
- list_id: str = FieldInfo(alias="listId")
- """The ID of the list used in the property association filter."""
-
- operator: str
- """Defines the operation to be applied by the filter (IN_LIST, NOT_IN_LIST)."""
-
- property_with_object_id: str = FieldInfo(alias="propertyWithObjectId")
- """The property associated with the object ID in the filter."""
-
- to_object_type_id: Optional[str] = FieldInfo(alias="toObjectTypeId", default=None)
- """
- The ID representing the type of object that the property association filter is
- targeting.
- """
diff --git a/src/hubspot_sdk/types/crm/public_property_association_in_list_filter_param.py b/src/hubspot_sdk/types/crm/public_property_association_in_list_filter_param.py
deleted file mode 100644
index 729108ac..00000000
--- a/src/hubspot_sdk/types/crm/public_property_association_in_list_filter_param.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import Union
-from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
-
-from ..._utils import PropertyInfo
-from .public_time_point_operation_param import PublicTimePointOperationParam
-from .public_all_history_refine_by_param import PublicAllHistoryRefineByParam
-from .public_ranged_time_operation_param import PublicRangedTimeOperationParam
-from .public_num_occurrences_refine_by_param import PublicNumOccurrencesRefineByParam
-from .public_set_occurrences_refine_by_param import PublicSetOccurrencesRefineByParam
-from .public_absolute_ranged_timestamp_refine_by_param import PublicAbsoluteRangedTimestampRefineByParam
-from .public_relative_ranged_timestamp_refine_by_param import PublicRelativeRangedTimestampRefineByParam
-from .public_absolute_comparative_timestamp_refine_by_param import PublicAbsoluteComparativeTimestampRefineByParam
-from .public_relative_comparative_timestamp_refine_by_param import PublicRelativeComparativeTimestampRefineByParam
-
-__all__ = ["PublicPropertyAssociationInListFilterParam", "CoalescingRefineBy"]
-
-CoalescingRefineBy: TypeAlias = Union[
- PublicNumOccurrencesRefineByParam,
- PublicSetOccurrencesRefineByParam,
- PublicRelativeComparativeTimestampRefineByParam,
- PublicRelativeRangedTimestampRefineByParam,
- PublicAbsoluteComparativeTimestampRefineByParam,
- PublicAbsoluteRangedTimestampRefineByParam,
- PublicAllHistoryRefineByParam,
- PublicTimePointOperationParam,
- PublicRangedTimeOperationParam,
-]
-
-
-class PublicPropertyAssociationInListFilterParam(TypedDict, total=False):
- coalescing_refine_by: Required[Annotated[CoalescingRefineBy, PropertyInfo(alias="coalescingRefineBy")]]
- """Specifies the criteria for refining the filter by coalescing."""
-
- filter_type: Required[Annotated[Literal["PROPERTY_ASSOCIATION"], PropertyInfo(alias="filterType")]]
- """Indicates the type of filter being applied (PROPERTY_ASSOCIATION)."""
-
- list_id: Required[Annotated[str, PropertyInfo(alias="listId")]]
- """The ID of the list used in the property association filter."""
-
- operator: Required[str]
- """Defines the operation to be applied by the filter (IN_LIST, NOT_IN_LIST)."""
-
- property_with_object_id: Required[Annotated[str, PropertyInfo(alias="propertyWithObjectId")]]
- """The property associated with the object ID in the filter."""
-
- to_object_type_id: Annotated[str, PropertyInfo(alias="toObjectTypeId")]
- """
- The ID representing the type of object that the property association filter is
- targeting.
- """
diff --git a/src/hubspot_sdk/types/crm/public_restricted_filter_branch.py b/src/hubspot_sdk/types/crm/public_restricted_filter_branch.py
index 0f7f8467..e7467e5d 100644
--- a/src/hubspot_sdk/types/crm/public_restricted_filter_branch.py
+++ b/src/hubspot_sdk/types/crm/public_restricted_filter_branch.py
@@ -22,17 +22,14 @@
from .public_unified_events_filter import PublicUnifiedEventsFilter
from .public_event_analytics_filter import PublicEventAnalyticsFilter
from .public_form_submission_filter import PublicFormSubmissionFilter
-from .public_num_associations_filter import PublicNumAssociationsFilter
from .public_integration_event_filter import PublicIntegrationEventFilter
from .public_privacy_analytics_filter import PublicPrivacyAnalyticsFilter
from .public_email_subscription_filter import PublicEmailSubscriptionFilter
from .public_association_in_list_filter import PublicAssociationInListFilter
-from .public_campaign_influenced_filter import PublicCampaignInfluencedFilter
from .public_page_view_analytics_filter import PublicPageViewAnalyticsFilter
from .public_survey_monkey_value_filter import PublicSurveyMonkeyValueFilter
from .public_form_submission_on_page_filter import PublicFormSubmissionOnPageFilter
from .public_communication_subscription_filter import PublicCommunicationSubscriptionFilter
-from .public_property_association_in_list_filter import PublicPropertyAssociationInListFilter
__all__ = ["PublicRestrictedFilterBranch", "FilterBranch", "Filter"]
@@ -47,7 +44,6 @@
"PublicNotAnyFilterBranch",
"PublicRestrictedFilterBranch",
"PublicUnifiedEventsFilterBranch",
- "PublicPropertyAssociationFilterBranch",
"PublicAssociationFilterBranch",
],
PropertyInfo(discriminator="filter_branch_type"),
@@ -62,7 +58,6 @@
"PublicNotAnyFilterBranch",
"PublicRestrictedFilterBranch",
"PublicUnifiedEventsFilterBranch",
- "PublicPropertyAssociationFilterBranch",
"PublicAssociationFilterBranch",
],
PropertyInfo(discriminator="filter_branch_type"),
@@ -80,7 +75,6 @@
PublicIntegrationEventFilter,
PublicEmailSubscriptionFilter,
PublicCommunicationSubscriptionFilter,
- PublicCampaignInfluencedFilter,
PublicSurveyMonkeyFilter,
PublicSurveyMonkeyValueFilter,
PublicWebinarFilter,
@@ -89,9 +83,7 @@
PublicAdsSearchFilter,
PublicAdsTimeFilter,
PublicInListFilter,
- PublicNumAssociationsFilter,
PublicUnifiedEventsFilter,
- PublicPropertyAssociationInListFilter,
PublicConstantFilter,
],
PropertyInfo(discriminator="filter_type"),
@@ -119,4 +111,3 @@ class PublicRestrictedFilterBranch(BaseModel):
from .public_not_any_filter_branch import PublicNotAnyFilterBranch
from .public_association_filter_branch import PublicAssociationFilterBranch
from .public_unified_events_filter_branch import PublicUnifiedEventsFilterBranch
-from .public_property_association_filter_branch import PublicPropertyAssociationFilterBranch
diff --git a/src/hubspot_sdk/types/crm/public_restricted_filter_branch_param.py b/src/hubspot_sdk/types/crm/public_restricted_filter_branch_param.py
index b6edd1bf..f79fc601 100644
--- a/src/hubspot_sdk/types/crm/public_restricted_filter_branch_param.py
+++ b/src/hubspot_sdk/types/crm/public_restricted_filter_branch_param.py
@@ -19,17 +19,14 @@
from .public_unified_events_filter_param import PublicUnifiedEventsFilterParam
from .public_event_analytics_filter_param import PublicEventAnalyticsFilterParam
from .public_form_submission_filter_param import PublicFormSubmissionFilterParam
-from .public_num_associations_filter_param import PublicNumAssociationsFilterParam
from .public_integration_event_filter_param import PublicIntegrationEventFilterParam
from .public_privacy_analytics_filter_param import PublicPrivacyAnalyticsFilterParam
from .public_email_subscription_filter_param import PublicEmailSubscriptionFilterParam
from .public_association_in_list_filter_param import PublicAssociationInListFilterParam
-from .public_campaign_influenced_filter_param import PublicCampaignInfluencedFilterParam
from .public_page_view_analytics_filter_param import PublicPageViewAnalyticsFilterParam
from .public_survey_monkey_value_filter_param import PublicSurveyMonkeyValueFilterParam
from .public_form_submission_on_page_filter_param import PublicFormSubmissionOnPageFilterParam
from .public_communication_subscription_filter_param import PublicCommunicationSubscriptionFilterParam
-from .public_property_association_in_list_filter_param import PublicPropertyAssociationInListFilterParam
__all__ = ["PublicRestrictedFilterBranchParam", "FilterBranch", "Filter"]
@@ -43,7 +40,6 @@
"PublicNotAnyFilterBranchParam",
"PublicRestrictedFilterBranchParam",
"PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
"PublicAssociationFilterBranchParam",
],
)
@@ -55,7 +51,6 @@
"PublicNotAnyFilterBranchParam",
"PublicRestrictedFilterBranchParam",
"PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
"PublicAssociationFilterBranchParam",
]
@@ -70,7 +65,6 @@
PublicIntegrationEventFilterParam,
PublicEmailSubscriptionFilterParam,
PublicCommunicationSubscriptionFilterParam,
- PublicCampaignInfluencedFilterParam,
PublicSurveyMonkeyFilterParam,
PublicSurveyMonkeyValueFilterParam,
PublicWebinarFilterParam,
@@ -79,9 +73,7 @@
PublicAdsSearchFilterParam,
PublicAdsTimeFilterParam,
PublicInListFilterParam,
- PublicNumAssociationsFilterParam,
PublicUnifiedEventsFilterParam,
- PublicPropertyAssociationInListFilterParam,
PublicConstantFilterParam,
]
@@ -107,4 +99,3 @@ class PublicRestrictedFilterBranchParam(TypedDict, total=False):
from .public_not_any_filter_branch_param import PublicNotAnyFilterBranchParam
from .public_association_filter_branch_param import PublicAssociationFilterBranchParam
from .public_unified_events_filter_branch_param import PublicUnifiedEventsFilterBranchParam
-from .public_property_association_filter_branch_param import PublicPropertyAssociationFilterBranchParam
diff --git a/src/hubspot_sdk/types/crm/public_unified_events_filter_branch.py b/src/hubspot_sdk/types/crm/public_unified_events_filter_branch.py
index 98596122..76e6b17c 100644
--- a/src/hubspot_sdk/types/crm/public_unified_events_filter_branch.py
+++ b/src/hubspot_sdk/types/crm/public_unified_events_filter_branch.py
@@ -25,20 +25,17 @@
from .public_unified_events_filter import PublicUnifiedEventsFilter
from .public_event_analytics_filter import PublicEventAnalyticsFilter
from .public_form_submission_filter import PublicFormSubmissionFilter
-from .public_num_associations_filter import PublicNumAssociationsFilter
from .public_integration_event_filter import PublicIntegrationEventFilter
from .public_privacy_analytics_filter import PublicPrivacyAnalyticsFilter
from .public_email_subscription_filter import PublicEmailSubscriptionFilter
from .public_num_occurrences_refine_by import PublicNumOccurrencesRefineBy
from .public_set_occurrences_refine_by import PublicSetOccurrencesRefineBy
from .public_association_in_list_filter import PublicAssociationInListFilter
-from .public_campaign_influenced_filter import PublicCampaignInfluencedFilter
from .public_page_view_analytics_filter import PublicPageViewAnalyticsFilter
from .public_survey_monkey_value_filter import PublicSurveyMonkeyValueFilter
from .public_form_submission_on_page_filter import PublicFormSubmissionOnPageFilter
from .public_communication_subscription_filter import PublicCommunicationSubscriptionFilter
from .public_absolute_ranged_timestamp_refine_by import PublicAbsoluteRangedTimestampRefineBy
-from .public_property_association_in_list_filter import PublicPropertyAssociationInListFilter
from .public_relative_ranged_timestamp_refine_by import PublicRelativeRangedTimestampRefineBy
from .public_absolute_comparative_timestamp_refine_by import PublicAbsoluteComparativeTimestampRefineBy
from .public_relative_comparative_timestamp_refine_by import PublicRelativeComparativeTimestampRefineBy
@@ -56,7 +53,6 @@
"PublicNotAnyFilterBranch",
"PublicRestrictedFilterBranch",
"PublicUnifiedEventsFilterBranch",
- "PublicPropertyAssociationFilterBranch",
"PublicAssociationFilterBranch",
],
PropertyInfo(discriminator="filter_branch_type"),
@@ -71,7 +67,6 @@
"PublicNotAnyFilterBranch",
"PublicRestrictedFilterBranch",
"PublicUnifiedEventsFilterBranch",
- "PublicPropertyAssociationFilterBranch",
"PublicAssociationFilterBranch",
],
PropertyInfo(discriminator="filter_branch_type"),
@@ -89,7 +84,6 @@
PublicIntegrationEventFilter,
PublicEmailSubscriptionFilter,
PublicCommunicationSubscriptionFilter,
- PublicCampaignInfluencedFilter,
PublicSurveyMonkeyFilter,
PublicSurveyMonkeyValueFilter,
PublicWebinarFilter,
@@ -98,9 +92,7 @@
PublicAdsSearchFilter,
PublicAdsTimeFilter,
PublicInListFilter,
- PublicNumAssociationsFilter,
PublicUnifiedEventsFilter,
- PublicPropertyAssociationInListFilter,
PublicConstantFilter,
],
PropertyInfo(discriminator="filter_type"),
@@ -163,4 +155,3 @@ class PublicUnifiedEventsFilterBranch(BaseModel):
from .public_not_any_filter_branch import PublicNotAnyFilterBranch
from .public_restricted_filter_branch import PublicRestrictedFilterBranch
from .public_association_filter_branch import PublicAssociationFilterBranch
-from .public_property_association_filter_branch import PublicPropertyAssociationFilterBranch
diff --git a/src/hubspot_sdk/types/crm/public_unified_events_filter_branch_param.py b/src/hubspot_sdk/types/crm/public_unified_events_filter_branch_param.py
index 943bf043..0785564a 100644
--- a/src/hubspot_sdk/types/crm/public_unified_events_filter_branch_param.py
+++ b/src/hubspot_sdk/types/crm/public_unified_events_filter_branch_param.py
@@ -22,20 +22,17 @@
from .public_unified_events_filter_param import PublicUnifiedEventsFilterParam
from .public_event_analytics_filter_param import PublicEventAnalyticsFilterParam
from .public_form_submission_filter_param import PublicFormSubmissionFilterParam
-from .public_num_associations_filter_param import PublicNumAssociationsFilterParam
from .public_integration_event_filter_param import PublicIntegrationEventFilterParam
from .public_privacy_analytics_filter_param import PublicPrivacyAnalyticsFilterParam
from .public_email_subscription_filter_param import PublicEmailSubscriptionFilterParam
from .public_num_occurrences_refine_by_param import PublicNumOccurrencesRefineByParam
from .public_set_occurrences_refine_by_param import PublicSetOccurrencesRefineByParam
from .public_association_in_list_filter_param import PublicAssociationInListFilterParam
-from .public_campaign_influenced_filter_param import PublicCampaignInfluencedFilterParam
from .public_page_view_analytics_filter_param import PublicPageViewAnalyticsFilterParam
from .public_survey_monkey_value_filter_param import PublicSurveyMonkeyValueFilterParam
from .public_form_submission_on_page_filter_param import PublicFormSubmissionOnPageFilterParam
from .public_communication_subscription_filter_param import PublicCommunicationSubscriptionFilterParam
from .public_absolute_ranged_timestamp_refine_by_param import PublicAbsoluteRangedTimestampRefineByParam
-from .public_property_association_in_list_filter_param import PublicPropertyAssociationInListFilterParam
from .public_relative_ranged_timestamp_refine_by_param import PublicRelativeRangedTimestampRefineByParam
from .public_absolute_comparative_timestamp_refine_by_param import PublicAbsoluteComparativeTimestampRefineByParam
from .public_relative_comparative_timestamp_refine_by_param import PublicRelativeComparativeTimestampRefineByParam
@@ -52,7 +49,6 @@
"PublicNotAnyFilterBranchParam",
"PublicRestrictedFilterBranchParam",
"PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
"PublicAssociationFilterBranchParam",
],
)
@@ -64,7 +60,6 @@
"PublicNotAnyFilterBranchParam",
"PublicRestrictedFilterBranchParam",
"PublicUnifiedEventsFilterBranchParam",
- "PublicPropertyAssociationFilterBranchParam",
"PublicAssociationFilterBranchParam",
]
@@ -79,7 +74,6 @@
PublicIntegrationEventFilterParam,
PublicEmailSubscriptionFilterParam,
PublicCommunicationSubscriptionFilterParam,
- PublicCampaignInfluencedFilterParam,
PublicSurveyMonkeyFilterParam,
PublicSurveyMonkeyValueFilterParam,
PublicWebinarFilterParam,
@@ -88,9 +82,7 @@
PublicAdsSearchFilterParam,
PublicAdsTimeFilterParam,
PublicInListFilterParam,
- PublicNumAssociationsFilterParam,
PublicUnifiedEventsFilterParam,
- PublicPropertyAssociationInListFilterParam,
PublicConstantFilterParam,
]
@@ -151,4 +143,3 @@ class PublicUnifiedEventsFilterBranchParam(TypedDict, total=False):
from .public_not_any_filter_branch_param import PublicNotAnyFilterBranchParam
from .public_restricted_filter_branch_param import PublicRestrictedFilterBranchParam
from .public_association_filter_branch_param import PublicAssociationFilterBranchParam
-from .public_property_association_filter_branch_param import PublicPropertyAssociationFilterBranchParam
diff --git a/src/hubspot_sdk/types/scheduler/external_calendar_meeting_event_response_properties.py b/src/hubspot_sdk/types/scheduler/external_calendar_meeting_event_response_properties.py
index 06b55443..ad4a40bd 100644
--- a/src/hubspot_sdk/types/scheduler/external_calendar_meeting_event_response_properties.py
+++ b/src/hubspot_sdk/types/scheduler/external_calendar_meeting_event_response_properties.py
@@ -34,6 +34,7 @@ class ExternalCalendarMeetingEventResponseProperties(BaseModel):
"BIDEN",
"BILLING",
"BOT",
+ "BREEZE_AGENT",
"CALCULATED",
"CENTRAL_EXCHANGE_RATES",
"CHATSPOT",
@@ -58,6 +59,7 @@ class ExternalCalendarMeetingEventResponseProperties(BaseModel):
"DEALS",
"DEFAULT",
"DELETE_OBJECTS",
+ "DI_WRITE_TO_CRM",
"EMAIL",
"EMAIL_INBOX_IMPORT",
"EMAIL_INTEGRATION",
diff --git a/src/hubspot_sdk/types/shared/__init__.py b/src/hubspot_sdk/types/shared/__init__.py
index 5ccb9068..b8cc8ca1 100644
--- a/src/hubspot_sdk/types/shared/__init__.py
+++ b/src/hubspot_sdk/types/shared/__init__.py
@@ -1,8 +1,10 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+from .filter import Filter as Filter
from .option import Option as Option
from .paging import Paging as Paging
from .property import Property as Property
+from .condition import Condition as Condition
from .next_page import NextPage as NextPage
from .error_data import ErrorData as ErrorData
from .error_detail import ErrorDetail as ErrorDetail
@@ -16,24 +18,54 @@
from .property_value import PropertyValue as PropertyValue
from .standard_error import StandardError as StandardError
from .action_response import ActionResponse as ActionResponse
+from .filter_response import FilterResponse as FilterResponse
from .property_create import PropertyCreate as PropertyCreate
from .association_spec import AssociationSpec as AssociationSpec
from .public_object_id import PublicObjectID as PublicObjectID
from .batch_input_string import BatchInputString as BatchInputString
+from .filter_create_request import FilterCreateRequest as FilterCreateRequest
from .property_group_create import PropertyGroupCreate as PropertyGroupCreate
from .property_group_update import PropertyGroupUpdate as PropertyGroupUpdate
from .association_definition import AssociationDefinition as AssociationDefinition
+from .filter_create_response import FilterCreateResponse as FilterCreateResponse
+from .journal_fetch_response import JournalFetchResponse as JournalFetchResponse
from .object_type_definition import ObjectTypeDefinition as ObjectTypeDefinition
+from .action_override_request import ActionOverrideRequest as ActionOverrideRequest
+from .snapshot_status_response import SnapshotStatusResponse as SnapshotStatusResponse
from .automation_actions_option import AutomationActionsOption as AutomationActionsOption
from .batch_input_property_name import BatchInputPropertyName as BatchInputPropertyName
from .association_definition_egg import AssociationDefinitionEgg as AssociationDefinitionEgg
from .batch_input_property_create import BatchInputPropertyCreate as BatchInputPropertyCreate
+from .crm_object_snapshot_request import CrmObjectSnapshotRequest as CrmObjectSnapshotRequest
+from .subscription_upsert_request import SubscriptionUpsertRequest as SubscriptionUpsertRequest
from .batch_input_public_object_id import BatchInputPublicObjectID as BatchInputPublicObjectID
+from .crm_object_snapshot_response import CrmObjectSnapshotResponse as CrmObjectSnapshotResponse
from .object_type_definition_patch import ObjectTypeDefinitionPatch as ObjectTypeDefinitionPatch
from .ab_test_create_request_v_next import AbTestCreateRequestVNext as AbTestCreateRequestVNext
from .object_type_definition_labels import ObjectTypeDefinitionLabels as ObjectTypeDefinitionLabels
from .batch_read_input_property_name import BatchReadInputPropertyName as BatchReadInputPropertyName
from .property_modification_metadata import PropertyModificationMetadata as PropertyModificationMetadata
+from .crm_object_snapshot_batch_request import CrmObjectSnapshotBatchRequest as CrmObjectSnapshotBatchRequest
+from .crm_object_snapshot_batch_response import CrmObjectSnapshotBatchResponse as CrmObjectSnapshotBatchResponse
+from .object_subscription_upsert_request import ObjectSubscriptionUpsertRequest as ObjectSubscriptionUpsertRequest
+from .batch_response_journal_fetch_response import (
+ BatchResponseJournalFetchResponse as BatchResponseJournalFetchResponse,
+)
+from .association_subscription_upsert_request import (
+ AssociationSubscriptionUpsertRequest as AssociationSubscriptionUpsertRequest,
+)
+from .list_membership_subscription_upsert_request import (
+ ListMembershipSubscriptionUpsertRequest as ListMembershipSubscriptionUpsertRequest,
+)
from .collection_response_property_group_no_paging import (
CollectionResponsePropertyGroupNoPaging as CollectionResponsePropertyGroupNoPaging,
)
+from .app_lifecycle_event_subscription_upsert_request import (
+ AppLifecycleEventSubscriptionUpsertRequest as AppLifecycleEventSubscriptionUpsertRequest,
+)
+from .batch_response_journal_fetch_response_with_errors import (
+ BatchResponseJournalFetchResponseWithErrors as BatchResponseJournalFetchResponseWithErrors,
+)
+from .gdpr_privacy_deletion_subscription_upsert_request import (
+ GdprPrivacyDeletionSubscriptionUpsertRequest as GdprPrivacyDeletionSubscriptionUpsertRequest,
+)
diff --git a/src/hubspot_sdk/types/webhooks/action_override_request.py b/src/hubspot_sdk/types/shared/action_override_request.py
similarity index 100%
rename from src/hubspot_sdk/types/webhooks/action_override_request.py
rename to src/hubspot_sdk/types/shared/action_override_request.py
diff --git a/src/hubspot_sdk/types/shared/app_lifecycle_event_subscription_upsert_request.py b/src/hubspot_sdk/types/shared/app_lifecycle_event_subscription_upsert_request.py
new file mode 100644
index 00000000..47675de5
--- /dev/null
+++ b/src/hubspot_sdk/types/shared/app_lifecycle_event_subscription_upsert_request.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+from typing_extensions import Literal
+
+from pydantic import Field as FieldInfo
+
+from ..._models import BaseModel
+
+__all__ = ["AppLifecycleEventSubscriptionUpsertRequest"]
+
+
+class AppLifecycleEventSubscriptionUpsertRequest(BaseModel):
+ event_type_id: str = FieldInfo(alias="eventTypeId")
+
+ properties: List[str]
+
+ subscription_type: Literal["APP_LIFECYCLE_EVENT"] = FieldInfo(alias="subscriptionType")
diff --git a/src/hubspot_sdk/types/shared/association_subscription_upsert_request.py b/src/hubspot_sdk/types/shared/association_subscription_upsert_request.py
new file mode 100644
index 00000000..cd58211a
--- /dev/null
+++ b/src/hubspot_sdk/types/shared/association_subscription_upsert_request.py
@@ -0,0 +1,40 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+from typing_extensions import Literal
+
+from pydantic import Field as FieldInfo
+
+from ..._models import BaseModel
+
+__all__ = ["AssociationSubscriptionUpsertRequest"]
+
+
+class AssociationSubscriptionUpsertRequest(BaseModel):
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ]
+
+ associated_object_type_ids: List[str] = FieldInfo(alias="associatedObjectTypeIds")
+
+ object_ids: List[int] = FieldInfo(alias="objectIds")
+
+ object_type_id: str = FieldInfo(alias="objectTypeId")
+
+ portal_id: int = FieldInfo(alias="portalId")
+
+ subscription_type: Literal["ASSOCIATION"] = FieldInfo(alias="subscriptionType")
diff --git a/src/hubspot_sdk/types/webhooks/batch_response_journal_fetch_response.py b/src/hubspot_sdk/types/shared/batch_response_journal_fetch_response.py
similarity index 100%
rename from src/hubspot_sdk/types/webhooks/batch_response_journal_fetch_response.py
rename to src/hubspot_sdk/types/shared/batch_response_journal_fetch_response.py
diff --git a/src/hubspot_sdk/types/shared/batch_response_journal_fetch_response_with_errors.py b/src/hubspot_sdk/types/shared/batch_response_journal_fetch_response_with_errors.py
new file mode 100644
index 00000000..f6ac3e2e
--- /dev/null
+++ b/src/hubspot_sdk/types/shared/batch_response_journal_fetch_response_with_errors.py
@@ -0,0 +1,51 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, List, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from pydantic import Field as FieldInfo
+
+from ..._models import BaseModel
+from .standard_error import StandardError
+from .journal_fetch_response import JournalFetchResponse
+
+__all__ = ["BatchResponseJournalFetchResponseWithErrors"]
+
+
+class BatchResponseJournalFetchResponseWithErrors(BaseModel):
+ completed_at: datetime = FieldInfo(alias="completedAt")
+ """The date and time when the batch process was completed, in ISO 8601 format."""
+
+ results: List[JournalFetchResponse]
+ """
+ An array of journal fetch responses, each representing a result from the batch
+ process.
+ """
+
+ started_at: datetime = FieldInfo(alias="startedAt")
+ """The date and time when the batch process started, in ISO 8601 format."""
+
+ status: Literal["CANCELED", "COMPLETE", "PENDING", "PROCESSING"]
+ """The current status of the batch process.
+
+ Valid values include 'PENDING', 'PROCESSING', 'CANCELED', and 'COMPLETE'.
+ """
+
+ errors: Optional[List[StandardError]] = None
+ """
+ An array of standard errors that occurred during the batch process, providing
+ details about each error.
+ """
+
+ links: Optional[Dict[str, str]] = None
+ """
+ A map of link names to associated URIs, providing additional context or actions
+ related to the batch process.
+ """
+
+ num_errors: Optional[int] = FieldInfo(alias="numErrors", default=None)
+ """The number of errors that occurred during the batch process."""
+
+ requested_at: Optional[datetime] = FieldInfo(alias="requestedAt", default=None)
+ """The date and time when the batch request was made, in ISO 8601 format."""
diff --git a/src/hubspot_sdk/types/webhooks/condition.py b/src/hubspot_sdk/types/shared/condition.py
similarity index 100%
rename from src/hubspot_sdk/types/webhooks/condition.py
rename to src/hubspot_sdk/types/shared/condition.py
diff --git a/src/hubspot_sdk/types/shared/crm_object_snapshot_batch_request.py b/src/hubspot_sdk/types/shared/crm_object_snapshot_batch_request.py
new file mode 100644
index 00000000..f8cb72e5
--- /dev/null
+++ b/src/hubspot_sdk/types/shared/crm_object_snapshot_batch_request.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from pydantic import Field as FieldInfo
+
+from ..._models import BaseModel
+from .crm_object_snapshot_request import CrmObjectSnapshotRequest
+
+__all__ = ["CrmObjectSnapshotBatchRequest"]
+
+
+class CrmObjectSnapshotBatchRequest(BaseModel):
+ snapshot_requests: List[CrmObjectSnapshotRequest] = FieldInfo(alias="snapshotRequests")
+ """
+ An array of CrmObjectSnapshotRequest objects, each representing a request to
+ create a snapshot for a specific CRM object. This property is required.
+ """
diff --git a/src/hubspot_sdk/types/webhooks/crm_object_snapshot_batch_response.py b/src/hubspot_sdk/types/shared/crm_object_snapshot_batch_response.py
similarity index 100%
rename from src/hubspot_sdk/types/webhooks/crm_object_snapshot_batch_response.py
rename to src/hubspot_sdk/types/shared/crm_object_snapshot_batch_response.py
diff --git a/src/hubspot_sdk/types/shared/crm_object_snapshot_request.py b/src/hubspot_sdk/types/shared/crm_object_snapshot_request.py
new file mode 100644
index 00000000..c00aa79f
--- /dev/null
+++ b/src/hubspot_sdk/types/shared/crm_object_snapshot_request.py
@@ -0,0 +1,35 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from pydantic import Field as FieldInfo
+
+from ..._models import BaseModel
+
+__all__ = ["CrmObjectSnapshotRequest"]
+
+
+class CrmObjectSnapshotRequest(BaseModel):
+ object_id: int = FieldInfo(alias="objectId")
+ """
+ An integer representing the unique identifier of the CRM object for which the
+ snapshot is requested.
+ """
+
+ object_type_id: str = FieldInfo(alias="objectTypeId")
+ """
+ A string representing the type identifier of the CRM object, specifying what
+ kind of object it is within HubSpot.
+ """
+
+ portal_id: int = FieldInfo(alias="portalId")
+ """
+ An integer representing the unique identifier of the HubSpot account (portal)
+ where the CRM object resides.
+ """
+
+ properties: List[str]
+ """
+ An array of strings, each representing a property of the CRM object that should
+ be included in the snapshot.
+ """
diff --git a/src/hubspot_sdk/types/webhooks/crm_object_snapshot_response.py b/src/hubspot_sdk/types/shared/crm_object_snapshot_response.py
similarity index 100%
rename from src/hubspot_sdk/types/webhooks/crm_object_snapshot_response.py
rename to src/hubspot_sdk/types/shared/crm_object_snapshot_response.py
diff --git a/src/hubspot_sdk/types/webhooks/filter.py b/src/hubspot_sdk/types/shared/filter.py
similarity index 100%
rename from src/hubspot_sdk/types/webhooks/filter.py
rename to src/hubspot_sdk/types/shared/filter.py
diff --git a/src/hubspot_sdk/types/shared/filter_create_request.py b/src/hubspot_sdk/types/shared/filter_create_request.py
new file mode 100644
index 00000000..09d566e5
--- /dev/null
+++ b/src/hubspot_sdk/types/shared/filter_create_request.py
@@ -0,0 +1,23 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from pydantic import Field as FieldInfo
+
+from .filter import Filter
+from ..._models import BaseModel
+
+__all__ = ["FilterCreateRequest"]
+
+
+class FilterCreateRequest(BaseModel):
+ filter: Filter
+ """
+ Defines a single condition for searching CRM objects, specifying the property to
+ filter on, the operator to use (such as equals, greater than, or contains), and
+ the value(s) to compare against.
+ """
+
+ subscription_id: int = FieldInfo(alias="subscriptionId")
+ """The unique identifier of the subscription to which the filter will be applied.
+
+ It is an integer formatted as int64.
+ """
diff --git a/src/hubspot_sdk/types/webhooks/filter_create_response.py b/src/hubspot_sdk/types/shared/filter_create_response.py
similarity index 100%
rename from src/hubspot_sdk/types/webhooks/filter_create_response.py
rename to src/hubspot_sdk/types/shared/filter_create_response.py
diff --git a/src/hubspot_sdk/types/webhooks/filter_response.py b/src/hubspot_sdk/types/shared/filter_response.py
similarity index 100%
rename from src/hubspot_sdk/types/webhooks/filter_response.py
rename to src/hubspot_sdk/types/shared/filter_response.py
diff --git a/src/hubspot_sdk/types/shared/gdpr_privacy_deletion_subscription_upsert_request.py b/src/hubspot_sdk/types/shared/gdpr_privacy_deletion_subscription_upsert_request.py
new file mode 100644
index 00000000..2666ac85
--- /dev/null
+++ b/src/hubspot_sdk/types/shared/gdpr_privacy_deletion_subscription_upsert_request.py
@@ -0,0 +1,36 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+from typing_extensions import Literal
+
+from pydantic import Field as FieldInfo
+
+from ..._models import BaseModel
+
+__all__ = ["GdprPrivacyDeletionSubscriptionUpsertRequest"]
+
+
+class GdprPrivacyDeletionSubscriptionUpsertRequest(BaseModel):
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ]
+
+ object_type_id: str = FieldInfo(alias="objectTypeId")
+
+ portal_id: int = FieldInfo(alias="portalId")
+
+ subscription_type: Literal["GDPR_PRIVACY_DELETION"] = FieldInfo(alias="subscriptionType")
diff --git a/src/hubspot_sdk/types/webhooks/journal_fetch_response.py b/src/hubspot_sdk/types/shared/journal_fetch_response.py
similarity index 100%
rename from src/hubspot_sdk/types/webhooks/journal_fetch_response.py
rename to src/hubspot_sdk/types/shared/journal_fetch_response.py
diff --git a/src/hubspot_sdk/types/shared/list_membership_subscription_upsert_request.py b/src/hubspot_sdk/types/shared/list_membership_subscription_upsert_request.py
new file mode 100644
index 00000000..759728fe
--- /dev/null
+++ b/src/hubspot_sdk/types/shared/list_membership_subscription_upsert_request.py
@@ -0,0 +1,38 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+from typing_extensions import Literal
+
+from pydantic import Field as FieldInfo
+
+from ..._models import BaseModel
+
+__all__ = ["ListMembershipSubscriptionUpsertRequest"]
+
+
+class ListMembershipSubscriptionUpsertRequest(BaseModel):
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ]
+
+ list_ids: List[int] = FieldInfo(alias="listIds")
+
+ object_ids: List[int] = FieldInfo(alias="objectIds")
+
+ portal_id: int = FieldInfo(alias="portalId")
+
+ subscription_type: Literal["LIST_MEMBERSHIP"] = FieldInfo(alias="subscriptionType")
diff --git a/src/hubspot_sdk/types/shared/object_subscription_upsert_request.py b/src/hubspot_sdk/types/shared/object_subscription_upsert_request.py
new file mode 100644
index 00000000..b84fafdb
--- /dev/null
+++ b/src/hubspot_sdk/types/shared/object_subscription_upsert_request.py
@@ -0,0 +1,40 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+from typing_extensions import Literal
+
+from pydantic import Field as FieldInfo
+
+from ..._models import BaseModel
+
+__all__ = ["ObjectSubscriptionUpsertRequest"]
+
+
+class ObjectSubscriptionUpsertRequest(BaseModel):
+ actions: List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ]
+
+ object_ids: List[int] = FieldInfo(alias="objectIds")
+
+ object_type_id: str = FieldInfo(alias="objectTypeId")
+
+ portal_id: int = FieldInfo(alias="portalId")
+
+ properties: List[str]
+
+ subscription_type: Literal["OBJECT"] = FieldInfo(alias="subscriptionType")
diff --git a/src/hubspot_sdk/types/shared/property_value.py b/src/hubspot_sdk/types/shared/property_value.py
index 23a11fd0..b68229c8 100644
--- a/src/hubspot_sdk/types/shared/property_value.py
+++ b/src/hubspot_sdk/types/shared/property_value.py
@@ -66,6 +66,7 @@ class PropertyValue(BaseModel):
"BIDEN",
"BILLING",
"BOT",
+ "BREEZE_AGENT",
"CALCULATED",
"CENTRAL_EXCHANGE_RATES",
"CHATSPOT",
@@ -90,6 +91,7 @@ class PropertyValue(BaseModel):
"DEALS",
"DEFAULT",
"DELETE_OBJECTS",
+ "DI_WRITE_TO_CRM",
"EMAIL",
"EMAIL_INBOX_IMPORT",
"EMAIL_INTEGRATION",
diff --git a/src/hubspot_sdk/types/webhooks/snapshot_status_response.py b/src/hubspot_sdk/types/shared/snapshot_status_response.py
similarity index 100%
rename from src/hubspot_sdk/types/webhooks/snapshot_status_response.py
rename to src/hubspot_sdk/types/shared/snapshot_status_response.py
diff --git a/src/hubspot_sdk/types/shared/subscription_upsert_request.py b/src/hubspot_sdk/types/shared/subscription_upsert_request.py
new file mode 100644
index 00000000..325eb65b
--- /dev/null
+++ b/src/hubspot_sdk/types/shared/subscription_upsert_request.py
@@ -0,0 +1,20 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Union
+from typing_extensions import TypeAlias
+
+from .object_subscription_upsert_request import ObjectSubscriptionUpsertRequest
+from .association_subscription_upsert_request import AssociationSubscriptionUpsertRequest
+from .list_membership_subscription_upsert_request import ListMembershipSubscriptionUpsertRequest
+from .app_lifecycle_event_subscription_upsert_request import AppLifecycleEventSubscriptionUpsertRequest
+from .gdpr_privacy_deletion_subscription_upsert_request import GdprPrivacyDeletionSubscriptionUpsertRequest
+
+__all__ = ["SubscriptionUpsertRequest"]
+
+SubscriptionUpsertRequest: TypeAlias = Union[
+ ObjectSubscriptionUpsertRequest,
+ AssociationSubscriptionUpsertRequest,
+ AppLifecycleEventSubscriptionUpsertRequest,
+ ListMembershipSubscriptionUpsertRequest,
+ GdprPrivacyDeletionSubscriptionUpsertRequest,
+]
diff --git a/src/hubspot_sdk/types/shared_params/__init__.py b/src/hubspot_sdk/types/shared_params/__init__.py
index 5d982954..be2a9fe3 100644
--- a/src/hubspot_sdk/types/shared_params/__init__.py
+++ b/src/hubspot_sdk/types/shared_params/__init__.py
@@ -1,5 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+from .filter import Filter as Filter
+from .condition import Condition as Condition
from .option_input import OptionInput as OptionInput
from .property_name import PropertyName as PropertyName
from .property_value import PropertyValue as PropertyValue
@@ -7,4 +9,19 @@
from .association_spec import AssociationSpec as AssociationSpec
from .public_object_id import PublicObjectID as PublicObjectID
from .automation_actions_option import AutomationActionsOption as AutomationActionsOption
+from .crm_object_snapshot_request import CrmObjectSnapshotRequest as CrmObjectSnapshotRequest
+from .subscription_upsert_request import SubscriptionUpsertRequest as SubscriptionUpsertRequest
from .object_type_definition_labels import ObjectTypeDefinitionLabels as ObjectTypeDefinitionLabels
+from .object_subscription_upsert_request import ObjectSubscriptionUpsertRequest as ObjectSubscriptionUpsertRequest
+from .association_subscription_upsert_request import (
+ AssociationSubscriptionUpsertRequest as AssociationSubscriptionUpsertRequest,
+)
+from .list_membership_subscription_upsert_request import (
+ ListMembershipSubscriptionUpsertRequest as ListMembershipSubscriptionUpsertRequest,
+)
+from .app_lifecycle_event_subscription_upsert_request import (
+ AppLifecycleEventSubscriptionUpsertRequest as AppLifecycleEventSubscriptionUpsertRequest,
+)
+from .gdpr_privacy_deletion_subscription_upsert_request import (
+ GdprPrivacyDeletionSubscriptionUpsertRequest as GdprPrivacyDeletionSubscriptionUpsertRequest,
+)
diff --git a/src/hubspot_sdk/types/shared_params/app_lifecycle_event_subscription_upsert_request.py b/src/hubspot_sdk/types/shared_params/app_lifecycle_event_subscription_upsert_request.py
new file mode 100644
index 00000000..6eb9e63a
--- /dev/null
+++ b/src/hubspot_sdk/types/shared_params/app_lifecycle_event_subscription_upsert_request.py
@@ -0,0 +1,18 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, Required, Annotated, TypedDict
+
+from ..._types import SequenceNotStr
+from ..._utils import PropertyInfo
+
+__all__ = ["AppLifecycleEventSubscriptionUpsertRequest"]
+
+
+class AppLifecycleEventSubscriptionUpsertRequest(TypedDict, total=False):
+ event_type_id: Required[Annotated[str, PropertyInfo(alias="eventTypeId")]]
+
+ properties: Required[SequenceNotStr[str]]
+
+ subscription_type: Required[Annotated[Literal["APP_LIFECYCLE_EVENT"], PropertyInfo(alias="subscriptionType")]]
diff --git a/src/hubspot_sdk/types/webhooks/association_subscription_upsert_request_param.py b/src/hubspot_sdk/types/shared_params/association_subscription_upsert_request.py
similarity index 74%
rename from src/hubspot_sdk/types/webhooks/association_subscription_upsert_request_param.py
rename to src/hubspot_sdk/types/shared_params/association_subscription_upsert_request.py
index 9fae7e70..ad4a770d 100644
--- a/src/hubspot_sdk/types/webhooks/association_subscription_upsert_request_param.py
+++ b/src/hubspot_sdk/types/shared_params/association_subscription_upsert_request.py
@@ -8,10 +8,10 @@
from ..._types import SequenceNotStr
from ..._utils import PropertyInfo
-__all__ = ["AssociationSubscriptionUpsertRequestParam"]
+__all__ = ["AssociationSubscriptionUpsertRequest"]
-class AssociationSubscriptionUpsertRequestParam(TypedDict, total=False):
+class AssociationSubscriptionUpsertRequest(TypedDict, total=False):
actions: Required[
List[
Literal[
@@ -40,11 +40,4 @@ class AssociationSubscriptionUpsertRequestParam(TypedDict, total=False):
portal_id: Required[Annotated[int, PropertyInfo(alias="portalId")]]
- subscription_type: Required[
- Annotated[
- Literal[
- "OBJECT", "ASSOCIATION", "EVENT", "APP_LIFECYCLE_EVENT", "LIST_MEMBERSHIP", "GDPR_PRIVACY_DELETION"
- ],
- PropertyInfo(alias="subscriptionType"),
- ]
- ]
+ subscription_type: Required[Annotated[Literal["ASSOCIATION"], PropertyInfo(alias="subscriptionType")]]
diff --git a/src/hubspot_sdk/types/webhooks/condition_param.py b/src/hubspot_sdk/types/shared_params/condition.py
similarity index 95%
rename from src/hubspot_sdk/types/webhooks/condition_param.py
rename to src/hubspot_sdk/types/shared_params/condition.py
index 04b3edf1..da494ef1 100644
--- a/src/hubspot_sdk/types/webhooks/condition_param.py
+++ b/src/hubspot_sdk/types/shared_params/condition.py
@@ -7,10 +7,10 @@
from ..._types import SequenceNotStr
from ..._utils import PropertyInfo
-__all__ = ["ConditionParam"]
+__all__ = ["Condition"]
-class ConditionParam(TypedDict, total=False):
+class Condition(TypedDict, total=False):
filter_type: Required[Annotated[Literal["CRM_OBJECT_PROPERTY"], PropertyInfo(alias="filterType")]]
"""A string indicating the type of filter being applied.
diff --git a/src/hubspot_sdk/types/webhooks/crm_object_snapshot_request_param.py b/src/hubspot_sdk/types/shared_params/crm_object_snapshot_request.py
similarity index 91%
rename from src/hubspot_sdk/types/webhooks/crm_object_snapshot_request_param.py
rename to src/hubspot_sdk/types/shared_params/crm_object_snapshot_request.py
index 309fb0ac..7193b1f3 100644
--- a/src/hubspot_sdk/types/webhooks/crm_object_snapshot_request_param.py
+++ b/src/hubspot_sdk/types/shared_params/crm_object_snapshot_request.py
@@ -7,10 +7,10 @@
from ..._types import SequenceNotStr
from ..._utils import PropertyInfo
-__all__ = ["CrmObjectSnapshotRequestParam"]
+__all__ = ["CrmObjectSnapshotRequest"]
-class CrmObjectSnapshotRequestParam(TypedDict, total=False):
+class CrmObjectSnapshotRequest(TypedDict, total=False):
object_id: Required[Annotated[int, PropertyInfo(alias="objectId")]]
"""
An integer representing the unique identifier of the CRM object for which the
diff --git a/src/hubspot_sdk/types/webhooks/filter_param.py b/src/hubspot_sdk/types/shared_params/filter.py
similarity index 78%
rename from src/hubspot_sdk/types/webhooks/filter_param.py
rename to src/hubspot_sdk/types/shared_params/filter.py
index 573559f8..10aec0da 100644
--- a/src/hubspot_sdk/types/webhooks/filter_param.py
+++ b/src/hubspot_sdk/types/shared_params/filter.py
@@ -5,17 +5,17 @@
from typing import Iterable
from typing_extensions import Required, TypedDict
-from .condition_param import ConditionParam
+from .condition import Condition
-__all__ = ["FilterParam"]
+__all__ = ["Filter"]
-class FilterParam(TypedDict, total=False):
+class Filter(TypedDict, total=False):
"""
Defines a single condition for searching CRM objects, specifying the property to filter on, the operator to use (such as equals, greater than, or contains), and the value(s) to compare against.
"""
- conditions: Required[Iterable[ConditionParam]]
+ conditions: Required[Iterable[Condition]]
"""An array of conditions that define the criteria for the filter.
Each condition specifies a property, an operator, and optionally a value or
diff --git a/src/hubspot_sdk/types/webhooks/gdpr_privacy_deletion_subscription_upsert_request_param.py b/src/hubspot_sdk/types/shared_params/gdpr_privacy_deletion_subscription_upsert_request.py
similarity index 68%
rename from src/hubspot_sdk/types/webhooks/gdpr_privacy_deletion_subscription_upsert_request_param.py
rename to src/hubspot_sdk/types/shared_params/gdpr_privacy_deletion_subscription_upsert_request.py
index 5c136464..dc8b9e05 100644
--- a/src/hubspot_sdk/types/webhooks/gdpr_privacy_deletion_subscription_upsert_request_param.py
+++ b/src/hubspot_sdk/types/shared_params/gdpr_privacy_deletion_subscription_upsert_request.py
@@ -7,10 +7,10 @@
from ..._utils import PropertyInfo
-__all__ = ["GdprPrivacyDeletionSubscriptionUpsertRequestParam"]
+__all__ = ["GdprPrivacyDeletionSubscriptionUpsertRequest"]
-class GdprPrivacyDeletionSubscriptionUpsertRequestParam(TypedDict, total=False):
+class GdprPrivacyDeletionSubscriptionUpsertRequest(TypedDict, total=False):
actions: Required[
List[
Literal[
@@ -35,11 +35,4 @@ class GdprPrivacyDeletionSubscriptionUpsertRequestParam(TypedDict, total=False):
portal_id: Required[Annotated[int, PropertyInfo(alias="portalId")]]
- subscription_type: Required[
- Annotated[
- Literal[
- "OBJECT", "ASSOCIATION", "EVENT", "APP_LIFECYCLE_EVENT", "LIST_MEMBERSHIP", "GDPR_PRIVACY_DELETION"
- ],
- PropertyInfo(alias="subscriptionType"),
- ]
- ]
+ subscription_type: Required[Annotated[Literal["GDPR_PRIVACY_DELETION"], PropertyInfo(alias="subscriptionType")]]
diff --git a/src/hubspot_sdk/types/webhooks/list_membership_subscription_upsert_request_param.py b/src/hubspot_sdk/types/shared_params/list_membership_subscription_upsert_request.py
similarity index 70%
rename from src/hubspot_sdk/types/webhooks/list_membership_subscription_upsert_request_param.py
rename to src/hubspot_sdk/types/shared_params/list_membership_subscription_upsert_request.py
index 58fcdc4f..5306638b 100644
--- a/src/hubspot_sdk/types/webhooks/list_membership_subscription_upsert_request_param.py
+++ b/src/hubspot_sdk/types/shared_params/list_membership_subscription_upsert_request.py
@@ -7,10 +7,10 @@
from ..._utils import PropertyInfo
-__all__ = ["ListMembershipSubscriptionUpsertRequestParam"]
+__all__ = ["ListMembershipSubscriptionUpsertRequest"]
-class ListMembershipSubscriptionUpsertRequestParam(TypedDict, total=False):
+class ListMembershipSubscriptionUpsertRequest(TypedDict, total=False):
actions: Required[
List[
Literal[
@@ -37,11 +37,4 @@ class ListMembershipSubscriptionUpsertRequestParam(TypedDict, total=False):
portal_id: Required[Annotated[int, PropertyInfo(alias="portalId")]]
- subscription_type: Required[
- Annotated[
- Literal[
- "OBJECT", "ASSOCIATION", "EVENT", "APP_LIFECYCLE_EVENT", "LIST_MEMBERSHIP", "GDPR_PRIVACY_DELETION"
- ],
- PropertyInfo(alias="subscriptionType"),
- ]
- ]
+ subscription_type: Required[Annotated[Literal["LIST_MEMBERSHIP"], PropertyInfo(alias="subscriptionType")]]
diff --git a/src/hubspot_sdk/types/webhooks/object_subscription_upsert_request_param.py b/src/hubspot_sdk/types/shared_params/object_subscription_upsert_request.py
similarity index 73%
rename from src/hubspot_sdk/types/webhooks/object_subscription_upsert_request_param.py
rename to src/hubspot_sdk/types/shared_params/object_subscription_upsert_request.py
index fa6e8d53..85f604c1 100644
--- a/src/hubspot_sdk/types/webhooks/object_subscription_upsert_request_param.py
+++ b/src/hubspot_sdk/types/shared_params/object_subscription_upsert_request.py
@@ -8,10 +8,10 @@
from ..._types import SequenceNotStr
from ..._utils import PropertyInfo
-__all__ = ["ObjectSubscriptionUpsertRequestParam"]
+__all__ = ["ObjectSubscriptionUpsertRequest"]
-class ObjectSubscriptionUpsertRequestParam(TypedDict, total=False):
+class ObjectSubscriptionUpsertRequest(TypedDict, total=False):
actions: Required[
List[
Literal[
@@ -40,11 +40,4 @@ class ObjectSubscriptionUpsertRequestParam(TypedDict, total=False):
properties: Required[SequenceNotStr[str]]
- subscription_type: Required[
- Annotated[
- Literal[
- "OBJECT", "ASSOCIATION", "EVENT", "APP_LIFECYCLE_EVENT", "LIST_MEMBERSHIP", "GDPR_PRIVACY_DELETION"
- ],
- PropertyInfo(alias="subscriptionType"),
- ]
- ]
+ subscription_type: Required[Annotated[Literal["OBJECT"], PropertyInfo(alias="subscriptionType")]]
diff --git a/src/hubspot_sdk/types/shared_params/property_value.py b/src/hubspot_sdk/types/shared_params/property_value.py
index 6af2f88b..9b4066a5 100644
--- a/src/hubspot_sdk/types/shared_params/property_value.py
+++ b/src/hubspot_sdk/types/shared_params/property_value.py
@@ -67,6 +67,7 @@ class PropertyValue(TypedDict, total=False):
"BIDEN",
"BILLING",
"BOT",
+ "BREEZE_AGENT",
"CALCULATED",
"CENTRAL_EXCHANGE_RATES",
"CHATSPOT",
@@ -91,6 +92,7 @@ class PropertyValue(TypedDict, total=False):
"DEALS",
"DEFAULT",
"DELETE_OBJECTS",
+ "DI_WRITE_TO_CRM",
"EMAIL",
"EMAIL_INBOX_IMPORT",
"EMAIL_INTEGRATION",
diff --git a/src/hubspot_sdk/types/shared_params/subscription_upsert_request.py b/src/hubspot_sdk/types/shared_params/subscription_upsert_request.py
new file mode 100644
index 00000000..e7d5cdfb
--- /dev/null
+++ b/src/hubspot_sdk/types/shared_params/subscription_upsert_request.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Union
+from typing_extensions import TypeAlias
+
+from .object_subscription_upsert_request import ObjectSubscriptionUpsertRequest
+from .association_subscription_upsert_request import AssociationSubscriptionUpsertRequest
+from .list_membership_subscription_upsert_request import ListMembershipSubscriptionUpsertRequest
+from .app_lifecycle_event_subscription_upsert_request import AppLifecycleEventSubscriptionUpsertRequest
+from .gdpr_privacy_deletion_subscription_upsert_request import GdprPrivacyDeletionSubscriptionUpsertRequest
+
+__all__ = ["SubscriptionUpsertRequest"]
+
+SubscriptionUpsertRequest: TypeAlias = Union[
+ ObjectSubscriptionUpsertRequest,
+ AssociationSubscriptionUpsertRequest,
+ AppLifecycleEventSubscriptionUpsertRequest,
+ ListMembershipSubscriptionUpsertRequest,
+ GdprPrivacyDeletionSubscriptionUpsertRequest,
+]
diff --git a/src/hubspot_sdk/types/webhooks/__init__.py b/src/hubspot_sdk/types/webhooks/__init__.py
index 83e8bf54..9dab8bf6 100644
--- a/src/hubspot_sdk/types/webhooks/__init__.py
+++ b/src/hubspot_sdk/types/webhooks/__init__.py
@@ -2,31 +2,14 @@
from __future__ import annotations
-from .filter import Filter as Filter
-from .condition import Condition as Condition
-from .filter_param import FilterParam as FilterParam
-from .condition_param import ConditionParam as ConditionParam
-from .filter_response import FilterResponse as FilterResponse
from .settings_response import SettingsResponse as SettingsResponse
from .throttling_settings import ThrottlingSettings as ThrottlingSettings
from .subscription_response import SubscriptionResponse as SubscriptionResponse
-from .filter_create_response import FilterCreateResponse as FilterCreateResponse
-from .journal_fetch_response import JournalFetchResponse as JournalFetchResponse
-from .action_override_request import ActionOverrideRequest as ActionOverrideRequest
-from .subscription_response_1 import SubscriptionResponse1 as SubscriptionResponse1
-from .snapshot_status_response import SnapshotStatusResponse as SnapshotStatusResponse
from .throttling_settings_param import ThrottlingSettingsParam as ThrottlingSettingsParam
from .subscription_list_response import SubscriptionListResponse as SubscriptionListResponse
-from .crm_object_snapshot_response import CrmObjectSnapshotResponse as CrmObjectSnapshotResponse
from .webhook_update_settings_params import WebhookUpdateSettingsParams as WebhookUpdateSettingsParams
-from .crm_object_snapshot_request_param import CrmObjectSnapshotRequestParam as CrmObjectSnapshotRequestParam
-from .subscription_upsert_request_param import SubscriptionUpsertRequestParam as SubscriptionUpsertRequestParam
-from .crm_object_snapshot_batch_response import CrmObjectSnapshotBatchResponse as CrmObjectSnapshotBatchResponse
from .webhook_create_crm_snapshots_params import WebhookCreateCrmSnapshotsParams as WebhookCreateCrmSnapshotsParams
from .batch_response_subscription_response import BatchResponseSubscriptionResponse as BatchResponseSubscriptionResponse
-from .batch_response_journal_fetch_response import (
- BatchResponseJournalFetchResponse as BatchResponseJournalFetchResponse,
-)
from .subscription_batch_update_request_param import (
SubscriptionBatchUpdateRequestParam as SubscriptionBatchUpdateRequestParam,
)
@@ -39,9 +22,6 @@
from .webhook_get_next_journal_entries_params import (
WebhookGetNextJournalEntriesParams as WebhookGetNextJournalEntriesParams,
)
-from .object_subscription_upsert_request_param import (
- ObjectSubscriptionUpsertRequestParam as ObjectSubscriptionUpsertRequestParam,
-)
from .webhook_create_event_subscription_params import (
WebhookCreateEventSubscriptionParams as WebhookCreateEventSubscriptionParams,
)
@@ -57,6 +37,9 @@
from .webhook_get_earliest_journal_entry_params import (
WebhookGetEarliestJournalEntryParams as WebhookGetEarliestJournalEntryParams,
)
+from .webhook_create_journal_subscription_params import (
+ WebhookCreateJournalSubscriptionParams as WebhookCreateJournalSubscriptionParams,
+)
from .webhook_list_subscription_filters_response import (
WebhookListSubscriptionFiltersResponse as WebhookListSubscriptionFiltersResponse,
)
@@ -66,9 +49,6 @@
from .webhook_get_journal_batch_from_offset_params import (
WebhookGetJournalBatchFromOffsetParams as WebhookGetJournalBatchFromOffsetParams,
)
-from .association_subscription_upsert_request_param import (
- AssociationSubscriptionUpsertRequestParam as AssociationSubscriptionUpsertRequestParam,
-)
from .webhook_get_latest_local_journal_batch_params import (
WebhookGetLatestLocalJournalBatchParams as WebhookGetLatestLocalJournalBatchParams,
)
@@ -87,21 +67,9 @@
from .webhook_get_earliest_local_journal_entry_params import (
WebhookGetEarliestLocalJournalEntryParams as WebhookGetEarliestLocalJournalEntryParams,
)
-from .list_membership_subscription_upsert_request_param import (
- ListMembershipSubscriptionUpsertRequestParam as ListMembershipSubscriptionUpsertRequestParam,
-)
from .webhook_get_local_journal_batch_by_request_params import (
WebhookGetLocalJournalBatchByRequestParams as WebhookGetLocalJournalBatchByRequestParams,
)
from .webhook_get_local_journal_batch_from_offset_params import (
WebhookGetLocalJournalBatchFromOffsetParams as WebhookGetLocalJournalBatchFromOffsetParams,
)
-from .collection_response_subscription_response_no_paging import (
- CollectionResponseSubscriptionResponseNoPaging as CollectionResponseSubscriptionResponseNoPaging,
-)
-from .app_lifecycle_event_subscription_upsert_request_param import (
- AppLifecycleEventSubscriptionUpsertRequestParam as AppLifecycleEventSubscriptionUpsertRequestParam,
-)
-from .gdpr_privacy_deletion_subscription_upsert_request_param import (
- GdprPrivacyDeletionSubscriptionUpsertRequestParam as GdprPrivacyDeletionSubscriptionUpsertRequestParam,
-)
diff --git a/src/hubspot_sdk/types/webhooks/app_lifecycle_event_subscription_upsert_request_param.py b/src/hubspot_sdk/types/webhooks/app_lifecycle_event_subscription_upsert_request_param.py
deleted file mode 100644
index 2819a80e..00000000
--- a/src/hubspot_sdk/types/webhooks/app_lifecycle_event_subscription_upsert_request_param.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import Literal, Required, Annotated, TypedDict
-
-from ..._types import SequenceNotStr
-from ..._utils import PropertyInfo
-
-__all__ = ["AppLifecycleEventSubscriptionUpsertRequestParam"]
-
-
-class AppLifecycleEventSubscriptionUpsertRequestParam(TypedDict, total=False):
- event_type_id: Required[Annotated[str, PropertyInfo(alias="eventTypeId")]]
-
- properties: Required[SequenceNotStr[str]]
-
- subscription_type: Required[
- Annotated[
- Literal[
- "OBJECT", "ASSOCIATION", "EVENT", "APP_LIFECYCLE_EVENT", "LIST_MEMBERSHIP", "GDPR_PRIVACY_DELETION"
- ],
- PropertyInfo(alias="subscriptionType"),
- ]
- ]
diff --git a/src/hubspot_sdk/types/webhooks/subscription_upsert_request_param.py b/src/hubspot_sdk/types/webhooks/subscription_upsert_request_param.py
deleted file mode 100644
index 40b3cfe7..00000000
--- a/src/hubspot_sdk/types/webhooks/subscription_upsert_request_param.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import Union
-from typing_extensions import TypeAlias
-
-from .object_subscription_upsert_request_param import ObjectSubscriptionUpsertRequestParam
-from .association_subscription_upsert_request_param import AssociationSubscriptionUpsertRequestParam
-from .list_membership_subscription_upsert_request_param import ListMembershipSubscriptionUpsertRequestParam
-from .app_lifecycle_event_subscription_upsert_request_param import AppLifecycleEventSubscriptionUpsertRequestParam
-from .gdpr_privacy_deletion_subscription_upsert_request_param import GdprPrivacyDeletionSubscriptionUpsertRequestParam
-
-__all__ = ["SubscriptionUpsertRequestParam"]
-
-SubscriptionUpsertRequestParam: TypeAlias = Union[
- ObjectSubscriptionUpsertRequestParam,
- AssociationSubscriptionUpsertRequestParam,
- AppLifecycleEventSubscriptionUpsertRequestParam,
- ListMembershipSubscriptionUpsertRequestParam,
- GdprPrivacyDeletionSubscriptionUpsertRequestParam,
-]
diff --git a/src/hubspot_sdk/types/webhooks/webhook_create_crm_snapshots_params.py b/src/hubspot_sdk/types/webhooks/webhook_create_crm_snapshots_params.py
index cd088ca2..01b5f553 100644
--- a/src/hubspot_sdk/types/webhooks/webhook_create_crm_snapshots_params.py
+++ b/src/hubspot_sdk/types/webhooks/webhook_create_crm_snapshots_params.py
@@ -6,15 +6,13 @@
from typing_extensions import Required, Annotated, TypedDict
from ..._utils import PropertyInfo
-from .crm_object_snapshot_request_param import CrmObjectSnapshotRequestParam
+from ..shared_params.crm_object_snapshot_request import CrmObjectSnapshotRequest
__all__ = ["WebhookCreateCrmSnapshotsParams"]
class WebhookCreateCrmSnapshotsParams(TypedDict, total=False):
- snapshot_requests: Required[
- Annotated[Iterable[CrmObjectSnapshotRequestParam], PropertyInfo(alias="snapshotRequests")]
- ]
+ snapshot_requests: Required[Annotated[Iterable[CrmObjectSnapshotRequest], PropertyInfo(alias="snapshotRequests")]]
"""
An array of CrmObjectSnapshotRequest objects, each representing a request to
create a snapshot for a specific CRM object. This property is required.
diff --git a/src/hubspot_sdk/types/webhooks/webhook_create_journal_subscription_params.py b/src/hubspot_sdk/types/webhooks/webhook_create_journal_subscription_params.py
new file mode 100644
index 00000000..87198b89
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks/webhook_create_journal_subscription_params.py
@@ -0,0 +1,157 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Union, Iterable
+from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
+
+from ..._types import SequenceNotStr
+from ..._utils import PropertyInfo
+
+__all__ = [
+ "WebhookCreateJournalSubscriptionParams",
+ "ObjectSubscriptionUpsertRequest",
+ "AssociationSubscriptionUpsertRequest",
+ "AppLifecycleEventSubscriptionUpsertRequest",
+ "ListMembershipSubscriptionUpsertRequest",
+ "GdprPrivacyDeletionSubscriptionUpsertRequest",
+]
+
+
+class ObjectSubscriptionUpsertRequest(TypedDict, total=False):
+ actions: Required[
+ List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ]
+ ]
+
+ object_ids: Required[Annotated[Iterable[int], PropertyInfo(alias="objectIds")]]
+
+ object_type_id: Required[Annotated[str, PropertyInfo(alias="objectTypeId")]]
+
+ portal_id: Required[Annotated[int, PropertyInfo(alias="portalId")]]
+
+ properties: Required[SequenceNotStr[str]]
+
+ subscription_type: Required[Annotated[Literal["OBJECT"], PropertyInfo(alias="subscriptionType")]]
+
+
+class AssociationSubscriptionUpsertRequest(TypedDict, total=False):
+ actions: Required[
+ List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ]
+ ]
+
+ associated_object_type_ids: Required[Annotated[SequenceNotStr[str], PropertyInfo(alias="associatedObjectTypeIds")]]
+
+ object_ids: Required[Annotated[Iterable[int], PropertyInfo(alias="objectIds")]]
+
+ object_type_id: Required[Annotated[str, PropertyInfo(alias="objectTypeId")]]
+
+ portal_id: Required[Annotated[int, PropertyInfo(alias="portalId")]]
+
+ subscription_type: Required[Annotated[Literal["ASSOCIATION"], PropertyInfo(alias="subscriptionType")]]
+
+
+class AppLifecycleEventSubscriptionUpsertRequest(TypedDict, total=False):
+ event_type_id: Required[Annotated[str, PropertyInfo(alias="eventTypeId")]]
+
+ properties: Required[SequenceNotStr[str]]
+
+ subscription_type: Required[Annotated[Literal["APP_LIFECYCLE_EVENT"], PropertyInfo(alias="subscriptionType")]]
+
+
+class ListMembershipSubscriptionUpsertRequest(TypedDict, total=False):
+ actions: Required[
+ List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ]
+ ]
+
+ list_ids: Required[Annotated[Iterable[int], PropertyInfo(alias="listIds")]]
+
+ object_ids: Required[Annotated[Iterable[int], PropertyInfo(alias="objectIds")]]
+
+ portal_id: Required[Annotated[int, PropertyInfo(alias="portalId")]]
+
+ subscription_type: Required[Annotated[Literal["LIST_MEMBERSHIP"], PropertyInfo(alias="subscriptionType")]]
+
+
+class GdprPrivacyDeletionSubscriptionUpsertRequest(TypedDict, total=False):
+ actions: Required[
+ List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ]
+ ]
+
+ object_type_id: Required[Annotated[str, PropertyInfo(alias="objectTypeId")]]
+
+ portal_id: Required[Annotated[int, PropertyInfo(alias="portalId")]]
+
+ subscription_type: Required[Annotated[Literal["GDPR_PRIVACY_DELETION"], PropertyInfo(alias="subscriptionType")]]
+
+
+WebhookCreateJournalSubscriptionParams: TypeAlias = Union[
+ ObjectSubscriptionUpsertRequest,
+ AssociationSubscriptionUpsertRequest,
+ AppLifecycleEventSubscriptionUpsertRequest,
+ ListMembershipSubscriptionUpsertRequest,
+ GdprPrivacyDeletionSubscriptionUpsertRequest,
+]
diff --git a/src/hubspot_sdk/types/webhooks/webhook_create_subscription_filter_params.py b/src/hubspot_sdk/types/webhooks/webhook_create_subscription_filter_params.py
index 80de4322..812f6dc2 100644
--- a/src/hubspot_sdk/types/webhooks/webhook_create_subscription_filter_params.py
+++ b/src/hubspot_sdk/types/webhooks/webhook_create_subscription_filter_params.py
@@ -5,13 +5,13 @@
from typing_extensions import Required, Annotated, TypedDict
from ..._utils import PropertyInfo
-from .filter_param import FilterParam
+from ..shared_params.filter import Filter
__all__ = ["WebhookCreateSubscriptionFilterParams"]
class WebhookCreateSubscriptionFilterParams(TypedDict, total=False):
- filter: Required[FilterParam]
+ filter: Required[Filter]
"""
Defines a single condition for searching CRM objects, specifying the property to
filter on, the operator to use (such as equals, greater than, or contains), and
diff --git a/src/hubspot_sdk/types/webhooks/webhook_get_earliest_journal_batch_params.py b/src/hubspot_sdk/types/webhooks/webhook_get_earliest_journal_batch_params.py
index 46611a94..5704cd8a 100644
--- a/src/hubspot_sdk/types/webhooks/webhook_get_earliest_journal_batch_params.py
+++ b/src/hubspot_sdk/types/webhooks/webhook_get_earliest_journal_batch_params.py
@@ -11,7 +11,7 @@
class WebhookGetEarliestJournalBatchParams(TypedDict, total=False):
install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
- """The ID of the portal installation to filter the webhook journal entries by.
+ """The ID of the portal installation.
- This is an integer value.
+ This is an integer value that specifies which portal's data to access.
"""
diff --git a/src/hubspot_sdk/types/webhooks/webhook_get_earliest_journal_entry_params.py b/src/hubspot_sdk/types/webhooks/webhook_get_earliest_journal_entry_params.py
index 7bd708d0..1bb065c6 100644
--- a/src/hubspot_sdk/types/webhooks/webhook_get_earliest_journal_entry_params.py
+++ b/src/hubspot_sdk/types/webhooks/webhook_get_earliest_journal_entry_params.py
@@ -11,7 +11,7 @@
class WebhookGetEarliestJournalEntryParams(TypedDict, total=False):
install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
- """The ID of the portal installation to filter the journal entries.
+ """The ID of the portal installation to filter the journal entries by.
- It is an integer.
+ This is an integer value.
"""
diff --git a/src/hubspot_sdk/types/webhooks/webhook_get_earliest_local_journal_batch_params.py b/src/hubspot_sdk/types/webhooks/webhook_get_earliest_local_journal_batch_params.py
index 6b7d57d8..0318c4ae 100644
--- a/src/hubspot_sdk/types/webhooks/webhook_get_earliest_local_journal_batch_params.py
+++ b/src/hubspot_sdk/types/webhooks/webhook_get_earliest_local_journal_batch_params.py
@@ -11,7 +11,7 @@
class WebhookGetEarliestLocalJournalBatchParams(TypedDict, total=False):
install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
- """The ID of the portal where the webhooks are installed.
+ """The ID of the portal installation to filter the webhook journal entries.
- This is an integer value.
+ This is an optional integer parameter.
"""
diff --git a/src/hubspot_sdk/types/webhooks/webhook_get_earliest_local_journal_entry_params.py b/src/hubspot_sdk/types/webhooks/webhook_get_earliest_local_journal_entry_params.py
index 61e30ce9..5a0dc9f2 100644
--- a/src/hubspot_sdk/types/webhooks/webhook_get_earliest_local_journal_entry_params.py
+++ b/src/hubspot_sdk/types/webhooks/webhook_get_earliest_local_journal_entry_params.py
@@ -11,7 +11,7 @@
class WebhookGetEarliestLocalJournalEntryParams(TypedDict, total=False):
install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
- """The ID of the portal installation to filter the journal entries by.
+ """The ID of the portal for which to retrieve the earliest webhook journal entries.
This parameter is optional and should be an integer.
"""
diff --git a/src/hubspot_sdk/types/webhooks/webhook_get_journal_batch_by_request_params.py b/src/hubspot_sdk/types/webhooks/webhook_get_journal_batch_by_request_params.py
index 7ad12c68..144fdf3e 100644
--- a/src/hubspot_sdk/types/webhooks/webhook_get_journal_batch_by_request_params.py
+++ b/src/hubspot_sdk/types/webhooks/webhook_get_journal_batch_by_request_params.py
@@ -15,7 +15,7 @@ class WebhookGetJournalBatchByRequestParams(TypedDict, total=False):
"""Strings to input."""
install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
- """The ID of the portal where the webhooks are installed.
-
- This is an integer value.
+ """
+ An integer representing the ID of the portal installation for which the webhooks
+ journal data should be retrieved.
"""
diff --git a/src/hubspot_sdk/types/webhooks/webhook_get_journal_batch_from_offset_params.py b/src/hubspot_sdk/types/webhooks/webhook_get_journal_batch_from_offset_params.py
index 175cb87c..161e7bce 100644
--- a/src/hubspot_sdk/types/webhooks/webhook_get_journal_batch_from_offset_params.py
+++ b/src/hubspot_sdk/types/webhooks/webhook_get_journal_batch_from_offset_params.py
@@ -13,7 +13,4 @@ class WebhookGetJournalBatchFromOffsetParams(TypedDict, total=False):
offset: Required[str]
install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
- """The ID of the portal installation.
-
- This is an integer value used to specify the portal context for the request.
- """
+ """The ID of the portal installation. This is an integer value."""
diff --git a/src/hubspot_sdk/types/webhooks/webhook_get_latest_journal_batch_params.py b/src/hubspot_sdk/types/webhooks/webhook_get_latest_journal_batch_params.py
index ac126eed..fdb57789 100644
--- a/src/hubspot_sdk/types/webhooks/webhook_get_latest_journal_batch_params.py
+++ b/src/hubspot_sdk/types/webhooks/webhook_get_latest_journal_batch_params.py
@@ -13,5 +13,5 @@ class WebhookGetLatestJournalBatchParams(TypedDict, total=False):
install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
"""The ID of the portal installation.
- This is an integer value used to identify the specific portal.
+ This is an integer value used to specify the portal context for the request.
"""
diff --git a/src/hubspot_sdk/types/webhooks/webhook_get_latest_journal_entry_params.py b/src/hubspot_sdk/types/webhooks/webhook_get_latest_journal_entry_params.py
index 3f1fd243..5e911b71 100644
--- a/src/hubspot_sdk/types/webhooks/webhook_get_latest_journal_entry_params.py
+++ b/src/hubspot_sdk/types/webhooks/webhook_get_latest_journal_entry_params.py
@@ -11,7 +11,7 @@
class WebhookGetLatestJournalEntryParams(TypedDict, total=False):
install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
- """The ID of the portal installation to filter the journal entries.
-
- It is an integer value.
+ """
+ The unique identifier of the portal installation for which to retrieve the
+ latest journal entries. This parameter is optional and should be an integer.
"""
diff --git a/src/hubspot_sdk/types/webhooks/webhook_get_latest_local_journal_batch_params.py b/src/hubspot_sdk/types/webhooks/webhook_get_latest_local_journal_batch_params.py
index 9fb3d173..408eac97 100644
--- a/src/hubspot_sdk/types/webhooks/webhook_get_latest_local_journal_batch_params.py
+++ b/src/hubspot_sdk/types/webhooks/webhook_get_latest_local_journal_batch_params.py
@@ -11,8 +11,7 @@
class WebhookGetLatestLocalJournalBatchParams(TypedDict, total=False):
install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
- """The ID of the portal installation.
+ """The ID of the portal where the webhook journal is installed.
- This parameter is optional and used to filter the journal entries by a specific
- portal.
+ This parameter is optional and used to specify the target portal.
"""
diff --git a/src/hubspot_sdk/types/webhooks/webhook_get_latest_local_journal_entry_params.py b/src/hubspot_sdk/types/webhooks/webhook_get_latest_local_journal_entry_params.py
index fd93911a..f7d387c9 100644
--- a/src/hubspot_sdk/types/webhooks/webhook_get_latest_local_journal_entry_params.py
+++ b/src/hubspot_sdk/types/webhooks/webhook_get_latest_local_journal_entry_params.py
@@ -13,5 +13,5 @@ class WebhookGetLatestLocalJournalEntryParams(TypedDict, total=False):
install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
"""The ID of the portal for which to retrieve the latest journal entries.
- This parameter is optional and should be an integer.
+ This is an integer value.
"""
diff --git a/src/hubspot_sdk/types/webhooks/webhook_get_local_journal_batch_by_request_params.py b/src/hubspot_sdk/types/webhooks/webhook_get_local_journal_batch_by_request_params.py
index c51c5a6f..d650615c 100644
--- a/src/hubspot_sdk/types/webhooks/webhook_get_local_journal_batch_by_request_params.py
+++ b/src/hubspot_sdk/types/webhooks/webhook_get_local_journal_batch_by_request_params.py
@@ -17,5 +17,6 @@ class WebhookGetLocalJournalBatchByRequestParams(TypedDict, total=False):
install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
"""The ID of the portal where the webhooks are installed.
- This parameter is optional and is used to specify the target portal.
+ This parameter is optional and is used to specify the target portal for the
+ operation.
"""
diff --git a/src/hubspot_sdk/types/webhooks/webhook_get_local_journal_batch_from_offset_params.py b/src/hubspot_sdk/types/webhooks/webhook_get_local_journal_batch_from_offset_params.py
index 4fcf48dc..42c687b7 100644
--- a/src/hubspot_sdk/types/webhooks/webhook_get_local_journal_batch_from_offset_params.py
+++ b/src/hubspot_sdk/types/webhooks/webhook_get_local_journal_batch_from_offset_params.py
@@ -13,7 +13,7 @@ class WebhookGetLocalJournalBatchFromOffsetParams(TypedDict, total=False):
offset: Required[str]
install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
- """The ID of the portal installation.
+ """The ID of the portal where the webhooks are installed.
- This is an integer value used to specify the portal context for the request.
+ This is an optional parameter.
"""
diff --git a/src/hubspot_sdk/types/webhooks/webhook_get_next_journal_entries_params.py b/src/hubspot_sdk/types/webhooks/webhook_get_next_journal_entries_params.py
index 0554073d..a5a229ef 100644
--- a/src/hubspot_sdk/types/webhooks/webhook_get_next_journal_entries_params.py
+++ b/src/hubspot_sdk/types/webhooks/webhook_get_next_journal_entries_params.py
@@ -11,7 +11,7 @@
class WebhookGetNextJournalEntriesParams(TypedDict, total=False):
install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
- """The ID of the portal installation to filter the webhook journal entries.
+ """The ID of the portal where the webhooks are installed.
- This is an optional parameter.
+ This is an integer value.
"""
diff --git a/src/hubspot_sdk/types/webhooks/webhook_get_next_local_journal_entries_params.py b/src/hubspot_sdk/types/webhooks/webhook_get_next_local_journal_entries_params.py
index b05dbed2..eb43d110 100644
--- a/src/hubspot_sdk/types/webhooks/webhook_get_next_local_journal_entries_params.py
+++ b/src/hubspot_sdk/types/webhooks/webhook_get_next_local_journal_entries_params.py
@@ -11,4 +11,7 @@
class WebhookGetNextLocalJournalEntriesParams(TypedDict, total=False):
install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
- """The ID of the portal where the webhook is installed. This is an integer value."""
+ """The ID of the portal installation to filter the webhook journal entries.
+
+ This is an integer value.
+ """
diff --git a/src/hubspot_sdk/types/webhooks/webhook_list_subscription_filters_response.py b/src/hubspot_sdk/types/webhooks/webhook_list_subscription_filters_response.py
index cb3d63cc..44b9cc71 100644
--- a/src/hubspot_sdk/types/webhooks/webhook_list_subscription_filters_response.py
+++ b/src/hubspot_sdk/types/webhooks/webhook_list_subscription_filters_response.py
@@ -3,7 +3,7 @@
from typing import List
from typing_extensions import TypeAlias
-from .filter_response import FilterResponse
+from ..shared.filter_response import FilterResponse
__all__ = ["WebhookListSubscriptionFiltersResponse"]
diff --git a/src/hubspot_sdk/types/webhooks_journal/__init__.py b/src/hubspot_sdk/types/webhooks_journal/__init__.py
new file mode 100644
index 00000000..39868d4e
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/__init__.py
@@ -0,0 +1,17 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .subscription_response import SubscriptionResponse as SubscriptionResponse
+from .snapshot_create_params import SnapshotCreateParams as SnapshotCreateParams
+from .subscription_create_params import SubscriptionCreateParams as SubscriptionCreateParams
+from .journal_get_earliest_params import JournalGetEarliestParams as JournalGetEarliestParams
+from .journal_local_get_latest_params import JournalLocalGetLatestParams as JournalLocalGetLatestParams
+from .journal_local_get_earliest_params import JournalLocalGetEarliestParams as JournalLocalGetEarliestParams
+from .journal_get_next_from_offset_params import JournalGetNextFromOffsetParams as JournalGetNextFromOffsetParams
+from .journal_local_get_next_from_offset_params import (
+ JournalLocalGetNextFromOffsetParams as JournalLocalGetNextFromOffsetParams,
+)
+from .collection_response_subscription_response_no_paging import (
+ CollectionResponseSubscriptionResponseNoPaging as CollectionResponseSubscriptionResponseNoPaging,
+)
diff --git a/src/hubspot_sdk/types/webhooks/collection_response_subscription_response_no_paging.py b/src/hubspot_sdk/types/webhooks_journal/collection_response_subscription_response_no_paging.py
similarity index 52%
rename from src/hubspot_sdk/types/webhooks/collection_response_subscription_response_no_paging.py
rename to src/hubspot_sdk/types/webhooks_journal/collection_response_subscription_response_no_paging.py
index be0c56f0..d8b7ef25 100644
--- a/src/hubspot_sdk/types/webhooks/collection_response_subscription_response_no_paging.py
+++ b/src/hubspot_sdk/types/webhooks_journal/collection_response_subscription_response_no_paging.py
@@ -3,14 +3,14 @@
from typing import List
from ..._models import BaseModel
-from .subscription_response_1 import SubscriptionResponse1
+from .subscription_response import SubscriptionResponse
__all__ = ["CollectionResponseSubscriptionResponseNoPaging"]
class CollectionResponseSubscriptionResponseNoPaging(BaseModel):
- results: List[SubscriptionResponse1]
+ results: List[SubscriptionResponse]
"""
- An array of SubscriptionResponse objects, each representing a subscription's
- details such as actions, appId, createdAt, and other relevant properties.
+ An array of subscription responses, where each item contains details about a
+ specific subscription. Each item follows the SubscriptionResponse schema.
"""
diff --git a/src/hubspot_sdk/types/webhooks_journal/journal/__init__.py b/src/hubspot_sdk/types/webhooks_journal/journal/__init__.py
new file mode 100644
index 00000000..f41a50ca
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/journal/__init__.py
@@ -0,0 +1,8 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .batch_get_params import BatchGetParams as BatchGetParams
+from .batch_get_latest_params import BatchGetLatestParams as BatchGetLatestParams
+from .batch_get_earliest_params import BatchGetEarliestParams as BatchGetEarliestParams
+from .batch_get_from_offset_params import BatchGetFromOffsetParams as BatchGetFromOffsetParams
diff --git a/src/hubspot_sdk/types/webhooks_journal/journal/batch_get_earliest_params.py b/src/hubspot_sdk/types/webhooks_journal/journal/batch_get_earliest_params.py
new file mode 100644
index 00000000..b9980e99
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/journal/batch_get_earliest_params.py
@@ -0,0 +1,17 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Annotated, TypedDict
+
+from ...._utils import PropertyInfo
+
+__all__ = ["BatchGetEarliestParams"]
+
+
+class BatchGetEarliestParams(TypedDict, total=False):
+ install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
+ """The ID of the portal installation.
+
+ This is an integer value that specifies which portal's data to access.
+ """
diff --git a/src/hubspot_sdk/types/webhooks_journal/journal/batch_get_from_offset_params.py b/src/hubspot_sdk/types/webhooks_journal/journal/batch_get_from_offset_params.py
new file mode 100644
index 00000000..cbf623da
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/journal/batch_get_from_offset_params.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, Annotated, TypedDict
+
+from ...._utils import PropertyInfo
+
+__all__ = ["BatchGetFromOffsetParams"]
+
+
+class BatchGetFromOffsetParams(TypedDict, total=False):
+ offset: Required[str]
+
+ install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
+ """The ID of the portal installation. This is an integer value."""
diff --git a/src/hubspot_sdk/types/webhooks_journal/journal/batch_get_latest_params.py b/src/hubspot_sdk/types/webhooks_journal/journal/batch_get_latest_params.py
new file mode 100644
index 00000000..5a3bda8a
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/journal/batch_get_latest_params.py
@@ -0,0 +1,17 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Annotated, TypedDict
+
+from ...._utils import PropertyInfo
+
+__all__ = ["BatchGetLatestParams"]
+
+
+class BatchGetLatestParams(TypedDict, total=False):
+ install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
+ """The ID of the portal installation.
+
+ This is an integer value used to specify the portal context for the request.
+ """
diff --git a/src/hubspot_sdk/types/webhooks_journal/journal/batch_get_params.py b/src/hubspot_sdk/types/webhooks_journal/journal/batch_get_params.py
new file mode 100644
index 00000000..8e9ab439
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/journal/batch_get_params.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, Annotated, TypedDict
+
+from ...._types import SequenceNotStr
+from ...._utils import PropertyInfo
+
+__all__ = ["BatchGetParams"]
+
+
+class BatchGetParams(TypedDict, total=False):
+ inputs: Required[SequenceNotStr[str]]
+ """Strings to input."""
+
+ install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
+ """
+ An integer representing the ID of the portal installation for which the webhooks
+ journal data should be retrieved.
+ """
diff --git a/src/hubspot_sdk/types/webhooks_journal/journal_get_earliest_params.py b/src/hubspot_sdk/types/webhooks_journal/journal_get_earliest_params.py
new file mode 100644
index 00000000..4a94053a
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/journal_get_earliest_params.py
@@ -0,0 +1,17 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Annotated, TypedDict
+
+from ..._utils import PropertyInfo
+
+__all__ = ["JournalGetEarliestParams"]
+
+
+class JournalGetEarliestParams(TypedDict, total=False):
+ install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
+ """The ID of the portal installation to filter the journal entries by.
+
+ This is an integer value.
+ """
diff --git a/src/hubspot_sdk/types/webhooks_journal/journal_get_next_from_offset_params.py b/src/hubspot_sdk/types/webhooks_journal/journal_get_next_from_offset_params.py
new file mode 100644
index 00000000..651a4738
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/journal_get_next_from_offset_params.py
@@ -0,0 +1,17 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Annotated, TypedDict
+
+from ..._utils import PropertyInfo
+
+__all__ = ["JournalGetNextFromOffsetParams"]
+
+
+class JournalGetNextFromOffsetParams(TypedDict, total=False):
+ install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
+ """The ID of the portal where the webhooks are installed.
+
+ This is an integer value.
+ """
diff --git a/src/hubspot_sdk/types/webhooks_journal/journal_local/__init__.py b/src/hubspot_sdk/types/webhooks_journal/journal_local/__init__.py
new file mode 100644
index 00000000..813e68dd
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/journal_local/__init__.py
@@ -0,0 +1,7 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .batch_get_params import BatchGetParams as BatchGetParams
+from .batch_get_earliest_params import BatchGetEarliestParams as BatchGetEarliestParams
+from .batch_get_from_offset_params import BatchGetFromOffsetParams as BatchGetFromOffsetParams
diff --git a/src/hubspot_sdk/types/webhooks_journal/journal_local/batch_get_earliest_params.py b/src/hubspot_sdk/types/webhooks_journal/journal_local/batch_get_earliest_params.py
new file mode 100644
index 00000000..7f00b6f2
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/journal_local/batch_get_earliest_params.py
@@ -0,0 +1,17 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Annotated, TypedDict
+
+from ...._utils import PropertyInfo
+
+__all__ = ["BatchGetEarliestParams"]
+
+
+class BatchGetEarliestParams(TypedDict, total=False):
+ install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
+ """The ID of the portal installation to filter the webhook journal entries.
+
+ This is an optional integer parameter.
+ """
diff --git a/src/hubspot_sdk/types/webhooks_journal/journal_local/batch_get_from_offset_params.py b/src/hubspot_sdk/types/webhooks_journal/journal_local/batch_get_from_offset_params.py
new file mode 100644
index 00000000..394031b1
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/journal_local/batch_get_from_offset_params.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, Annotated, TypedDict
+
+from ...._utils import PropertyInfo
+
+__all__ = ["BatchGetFromOffsetParams"]
+
+
+class BatchGetFromOffsetParams(TypedDict, total=False):
+ offset: Required[str]
+
+ install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
+ """The ID of the portal where the webhooks are installed.
+
+ This is an optional parameter.
+ """
diff --git a/src/hubspot_sdk/types/webhooks_journal/journal_local/batch_get_params.py b/src/hubspot_sdk/types/webhooks_journal/journal_local/batch_get_params.py
new file mode 100644
index 00000000..c7380c4c
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/journal_local/batch_get_params.py
@@ -0,0 +1,22 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, Annotated, TypedDict
+
+from ...._types import SequenceNotStr
+from ...._utils import PropertyInfo
+
+__all__ = ["BatchGetParams"]
+
+
+class BatchGetParams(TypedDict, total=False):
+ inputs: Required[SequenceNotStr[str]]
+ """Strings to input."""
+
+ install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
+ """The ID of the portal where the webhooks are installed.
+
+ This parameter is optional and is used to specify the target portal for the
+ operation.
+ """
diff --git a/src/hubspot_sdk/types/webhooks_journal/journal_local_get_earliest_params.py b/src/hubspot_sdk/types/webhooks_journal/journal_local_get_earliest_params.py
new file mode 100644
index 00000000..bc4f5367
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/journal_local_get_earliest_params.py
@@ -0,0 +1,17 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Annotated, TypedDict
+
+from ..._utils import PropertyInfo
+
+__all__ = ["JournalLocalGetEarliestParams"]
+
+
+class JournalLocalGetEarliestParams(TypedDict, total=False):
+ install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
+ """The ID of the portal for which to retrieve the earliest webhook journal entries.
+
+ This parameter is optional and should be an integer.
+ """
diff --git a/src/hubspot_sdk/types/webhooks_journal/journal_local_get_latest_params.py b/src/hubspot_sdk/types/webhooks_journal/journal_local_get_latest_params.py
new file mode 100644
index 00000000..08bff686
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/journal_local_get_latest_params.py
@@ -0,0 +1,17 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Annotated, TypedDict
+
+from ..._utils import PropertyInfo
+
+__all__ = ["JournalLocalGetLatestParams"]
+
+
+class JournalLocalGetLatestParams(TypedDict, total=False):
+ install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
+ """
+ The unique identifier of the portal installation for which to retrieve the
+ latest journal entries. This parameter is optional and should be an integer.
+ """
diff --git a/src/hubspot_sdk/types/webhooks_journal/journal_local_get_next_from_offset_params.py b/src/hubspot_sdk/types/webhooks_journal/journal_local_get_next_from_offset_params.py
new file mode 100644
index 00000000..01ff5ade
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/journal_local_get_next_from_offset_params.py
@@ -0,0 +1,17 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Annotated, TypedDict
+
+from ..._utils import PropertyInfo
+
+__all__ = ["JournalLocalGetNextFromOffsetParams"]
+
+
+class JournalLocalGetNextFromOffsetParams(TypedDict, total=False):
+ install_portal_id: Annotated[int, PropertyInfo(alias="installPortalId")]
+ """The ID of the portal installation to filter the webhook journal entries.
+
+ This is an integer value.
+ """
diff --git a/src/hubspot_sdk/types/webhooks_journal/snapshot_create_params.py b/src/hubspot_sdk/types/webhooks_journal/snapshot_create_params.py
new file mode 100644
index 00000000..17b25fd9
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/snapshot_create_params.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Iterable
+from typing_extensions import Required, Annotated, TypedDict
+
+from ..._utils import PropertyInfo
+from ..shared_params.crm_object_snapshot_request import CrmObjectSnapshotRequest
+
+__all__ = ["SnapshotCreateParams"]
+
+
+class SnapshotCreateParams(TypedDict, total=False):
+ snapshot_requests: Required[Annotated[Iterable[CrmObjectSnapshotRequest], PropertyInfo(alias="snapshotRequests")]]
+ """
+ An array of CrmObjectSnapshotRequest objects, each representing a request to
+ create a snapshot for a specific CRM object. This property is required.
+ """
diff --git a/src/hubspot_sdk/types/webhooks_journal/subscription_create_params.py b/src/hubspot_sdk/types/webhooks_journal/subscription_create_params.py
new file mode 100644
index 00000000..4ac73c3e
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/subscription_create_params.py
@@ -0,0 +1,157 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import List, Union, Iterable
+from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict
+
+from ..._types import SequenceNotStr
+from ..._utils import PropertyInfo
+
+__all__ = [
+ "SubscriptionCreateParams",
+ "ObjectSubscriptionUpsertRequest",
+ "AssociationSubscriptionUpsertRequest",
+ "AppLifecycleEventSubscriptionUpsertRequest",
+ "ListMembershipSubscriptionUpsertRequest",
+ "GdprPrivacyDeletionSubscriptionUpsertRequest",
+]
+
+
+class ObjectSubscriptionUpsertRequest(TypedDict, total=False):
+ actions: Required[
+ List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ]
+ ]
+
+ object_ids: Required[Annotated[Iterable[int], PropertyInfo(alias="objectIds")]]
+
+ object_type_id: Required[Annotated[str, PropertyInfo(alias="objectTypeId")]]
+
+ portal_id: Required[Annotated[int, PropertyInfo(alias="portalId")]]
+
+ properties: Required[SequenceNotStr[str]]
+
+ subscription_type: Required[Annotated[Literal["OBJECT"], PropertyInfo(alias="subscriptionType")]]
+
+
+class AssociationSubscriptionUpsertRequest(TypedDict, total=False):
+ actions: Required[
+ List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ]
+ ]
+
+ associated_object_type_ids: Required[Annotated[SequenceNotStr[str], PropertyInfo(alias="associatedObjectTypeIds")]]
+
+ object_ids: Required[Annotated[Iterable[int], PropertyInfo(alias="objectIds")]]
+
+ object_type_id: Required[Annotated[str, PropertyInfo(alias="objectTypeId")]]
+
+ portal_id: Required[Annotated[int, PropertyInfo(alias="portalId")]]
+
+ subscription_type: Required[Annotated[Literal["ASSOCIATION"], PropertyInfo(alias="subscriptionType")]]
+
+
+class AppLifecycleEventSubscriptionUpsertRequest(TypedDict, total=False):
+ event_type_id: Required[Annotated[str, PropertyInfo(alias="eventTypeId")]]
+
+ properties: Required[SequenceNotStr[str]]
+
+ subscription_type: Required[Annotated[Literal["APP_LIFECYCLE_EVENT"], PropertyInfo(alias="subscriptionType")]]
+
+
+class ListMembershipSubscriptionUpsertRequest(TypedDict, total=False):
+ actions: Required[
+ List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ]
+ ]
+
+ list_ids: Required[Annotated[Iterable[int], PropertyInfo(alias="listIds")]]
+
+ object_ids: Required[Annotated[Iterable[int], PropertyInfo(alias="objectIds")]]
+
+ portal_id: Required[Annotated[int, PropertyInfo(alias="portalId")]]
+
+ subscription_type: Required[Annotated[Literal["LIST_MEMBERSHIP"], PropertyInfo(alias="subscriptionType")]]
+
+
+class GdprPrivacyDeletionSubscriptionUpsertRequest(TypedDict, total=False):
+ actions: Required[
+ List[
+ Literal[
+ "CREATE",
+ "UPDATE",
+ "DELETE",
+ "MERGE",
+ "RESTORE",
+ "ASSOCIATION_ADDED",
+ "ASSOCIATION_REMOVED",
+ "SNAPSHOT",
+ "APP_INSTALL",
+ "APP_UNINSTALL",
+ "ADDED_TO_LIST",
+ "REMOVED_FROM_LIST",
+ "GDPR_DELETE",
+ ]
+ ]
+ ]
+
+ object_type_id: Required[Annotated[str, PropertyInfo(alias="objectTypeId")]]
+
+ portal_id: Required[Annotated[int, PropertyInfo(alias="portalId")]]
+
+ subscription_type: Required[Annotated[Literal["GDPR_PRIVACY_DELETION"], PropertyInfo(alias="subscriptionType")]]
+
+
+SubscriptionCreateParams: TypeAlias = Union[
+ ObjectSubscriptionUpsertRequest,
+ AssociationSubscriptionUpsertRequest,
+ AppLifecycleEventSubscriptionUpsertRequest,
+ ListMembershipSubscriptionUpsertRequest,
+ GdprPrivacyDeletionSubscriptionUpsertRequest,
+]
diff --git a/src/hubspot_sdk/types/webhooks/subscription_response_1.py b/src/hubspot_sdk/types/webhooks_journal/subscription_response.py
similarity index 60%
rename from src/hubspot_sdk/types/webhooks/subscription_response_1.py
rename to src/hubspot_sdk/types/webhooks_journal/subscription_response.py
index b7c1c297..0032dc93 100644
--- a/src/hubspot_sdk/types/webhooks/subscription_response_1.py
+++ b/src/hubspot_sdk/types/webhooks_journal/subscription_response.py
@@ -7,17 +7,14 @@
from pydantic import Field as FieldInfo
from ..._models import BaseModel
-from .action_override_request import ActionOverrideRequest
+from ..shared.action_override_request import ActionOverrideRequest
-__all__ = ["SubscriptionResponse1"]
+__all__ = ["SubscriptionResponse"]
-class SubscriptionResponse1(BaseModel):
+class SubscriptionResponse(BaseModel):
id: int
- """The unique identifier for the subscription.
-
- It is an integer formatted as int64.
- """
+ """The unique identifier for the subscription, represented as an integer."""
actions: List[
Literal[
@@ -36,35 +33,35 @@ class SubscriptionResponse1(BaseModel):
"GDPR_DELETE",
]
]
- """A list of actions that trigger the subscription.
+ """An array of actions associated with the subscription.
- Possible values include 'CREATE', 'UPDATE', 'DELETE', 'MERGE', 'RESTORE',
+ Valid actions include 'CREATE', 'UPDATE', 'DELETE', 'MERGE', 'RESTORE',
'ASSOCIATION_ADDED', 'ASSOCIATION_REMOVED', 'SNAPSHOT', 'APP_INSTALL',
'APP_UNINSTALL', 'ADDED_TO_LIST', 'REMOVED_FROM_LIST', and 'GDPR_DELETE'.
"""
app_id: int = FieldInfo(alias="appId")
- """The unique identifier for the app associated with the subscription.
-
- It is an integer formatted as int64.
+ """
+ The unique identifier for the app associated with the subscription, represented
+ as an integer.
"""
created_at: datetime = FieldInfo(alias="createdAt")
"""The date and time when the subscription was created, in ISO 8601 format."""
object_type_id: str = FieldInfo(alias="objectTypeId")
- """The identifier for the object type associated with the subscription.
-
- It is a string.
+ """
+ The identifier for the type of object associated with the subscription,
+ represented as a string.
"""
subscription_type: Literal[
"APP_LIFECYCLE_EVENT", "ASSOCIATION", "EVENT", "GDPR_PRIVACY_DELETION", "LIST_MEMBERSHIP", "OBJECT"
] = FieldInfo(alias="subscriptionType")
- """
- The type of subscription, which can be one of the following: 'OBJECT',
- 'ASSOCIATION', 'EVENT', 'APP_LIFECYCLE_EVENT', 'LIST_MEMBERSHIP', or
- 'GDPR_PRIVACY_DELETION'.
+ """The type of subscription, indicating the nature of events it pertains to.
+
+ Valid values include 'OBJECT', 'ASSOCIATION', 'EVENT', 'APP_LIFECYCLE_EVENT',
+ 'LIST_MEMBERSHIP', and 'GDPR_PRIVACY_DELETION'.
"""
updated_at: datetime = FieldInfo(alias="updatedAt")
@@ -72,17 +69,17 @@ class SubscriptionResponse1(BaseModel):
action_overrides: Optional[Dict[str, ActionOverrideRequest]] = FieldInfo(alias="actionOverrides", default=None)
"""
- An object containing action overrides, where each key is an action and the value
- is an ActionOverrideRequest object.
+ An object containing overrides for actions, where each key is an action and the
+ value is an ActionOverrideRequest object.
"""
associated_object_type_ids: Optional[List[str]] = FieldInfo(alias="associatedObjectTypeIds", default=None)
- """A list of associated object type IDs. Each ID is a string."""
+ """An array of strings representing the IDs of associated object types."""
created_by: Optional[int] = FieldInfo(alias="createdBy", default=None)
- """The ID of the user who created the subscription.
-
- It is an integer formatted as int64.
+ """
+ The unique identifier of the user who created the subscription, represented as
+ an integer.
"""
deleted_at: Optional[datetime] = FieldInfo(alias="deletedAt", default=None)
@@ -92,25 +89,25 @@ class SubscriptionResponse1(BaseModel):
"""
list_ids: Optional[List[int]] = FieldInfo(alias="listIds", default=None)
- """A list of list IDs associated with the subscription.
-
- Each ID is an integer formatted as int64.
+ """
+ An array of integers representing the IDs of lists associated with the
+ subscription.
"""
object_ids: Optional[List[int]] = FieldInfo(alias="objectIds", default=None)
- """A list of object IDs associated with the subscription.
-
- Each ID is an integer formatted as int64.
+ """
+ An array of integers representing the IDs of objects associated with the
+ subscription.
"""
portal_id: Optional[int] = FieldInfo(alias="portalId", default=None)
- """The unique identifier for the portal associated with the subscription.
-
- It is an integer formatted as int64.
+ """
+ The unique identifier for the portal associated with the subscription,
+ represented as an integer.
"""
properties: Optional[List[str]] = None
- """A list of property names associated with the subscription.
-
- Each property is a string.
+ """
+ An array of strings representing the properties associated with the
+ subscription.
"""
diff --git a/src/hubspot_sdk/types/webhooks_journal/subscriptions/__init__.py b/src/hubspot_sdk/types/webhooks_journal/subscriptions/__init__.py
new file mode 100644
index 00000000..7927cab8
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/subscriptions/__init__.py
@@ -0,0 +1,6 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .filter_create_params import FilterCreateParams as FilterCreateParams
+from .filter_list_response import FilterListResponse as FilterListResponse
diff --git a/src/hubspot_sdk/types/webhooks_journal/subscriptions/filter_create_params.py b/src/hubspot_sdk/types/webhooks_journal/subscriptions/filter_create_params.py
new file mode 100644
index 00000000..75aa0a3e
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/subscriptions/filter_create_params.py
@@ -0,0 +1,25 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, Annotated, TypedDict
+
+from ...._utils import PropertyInfo
+from ...shared_params.filter import Filter
+
+__all__ = ["FilterCreateParams"]
+
+
+class FilterCreateParams(TypedDict, total=False):
+ filter: Required[Filter]
+ """
+ Defines a single condition for searching CRM objects, specifying the property to
+ filter on, the operator to use (such as equals, greater than, or contains), and
+ the value(s) to compare against.
+ """
+
+ subscription_id: Required[Annotated[int, PropertyInfo(alias="subscriptionId")]]
+ """The unique identifier of the subscription to which the filter will be applied.
+
+ It is an integer formatted as int64.
+ """
diff --git a/src/hubspot_sdk/types/webhooks_journal/subscriptions/filter_list_response.py b/src/hubspot_sdk/types/webhooks_journal/subscriptions/filter_list_response.py
new file mode 100644
index 00000000..c241b4e6
--- /dev/null
+++ b/src/hubspot_sdk/types/webhooks_journal/subscriptions/filter_list_response.py
@@ -0,0 +1,10 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+from typing_extensions import TypeAlias
+
+from ...shared.filter_response import FilterResponse
+
+__all__ = ["FilterListResponse"]
+
+FilterListResponse: TypeAlias = List[FilterResponse]
diff --git a/tests/api_resources/auth/test_oauth.py b/tests/api_resources/auth/test_oauth.py
index 0e67f6b3..52c9d3a8 100644
--- a/tests/api_resources/auth/test_oauth.py
+++ b/tests/api_resources/auth/test_oauth.py
@@ -18,6 +18,7 @@
AsyncStreamedBinaryAPIResponse,
)
from hubspot_sdk.types.auth import (
+ TokenResponseIf,
TokenInfoResponseBaseIf,
)
@@ -27,20 +28,15 @@
class TestOAuth:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
- @pytest.mark.respx(base_url=base_url)
- def test_method_create_token(self, client: HubSpot, respx_mock: MockRouter) -> None:
- respx_mock.post("/oauth/2026-03/token").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
+ def test_method_create_token(self, client: HubSpot) -> None:
oauth = client.auth.oauth.create_token()
- assert oauth.is_closed
- assert oauth.json() == {"foo": "bar"}
- assert cast(Any, oauth.is_closed) is True
- assert isinstance(oauth, BinaryAPIResponse)
+ assert_matches_type(TokenResponseIf, oauth, path=["response"])
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
- @pytest.mark.respx(base_url=base_url)
- def test_method_create_token_with_all_params(self, client: HubSpot, respx_mock: MockRouter) -> None:
- respx_mock.post("/oauth/2026-03/token").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
+ def test_method_create_token_with_all_params(self, client: HubSpot) -> None:
oauth = client.auth.oauth.create_token(
client_id="client_id",
client_secret="client_secret",
@@ -51,36 +47,29 @@ def test_method_create_token_with_all_params(self, client: HubSpot, respx_mock:
refresh_token="refresh_token",
scope="scope",
)
- assert oauth.is_closed
- assert oauth.json() == {"foo": "bar"}
- assert cast(Any, oauth.is_closed) is True
- assert isinstance(oauth, BinaryAPIResponse)
+ assert_matches_type(TokenResponseIf, oauth, path=["response"])
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
- @pytest.mark.respx(base_url=base_url)
- def test_raw_response_create_token(self, client: HubSpot, respx_mock: MockRouter) -> None:
- respx_mock.post("/oauth/2026-03/token").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
+ def test_raw_response_create_token(self, client: HubSpot) -> None:
+ response = client.auth.oauth.with_raw_response.create_token()
- oauth = client.auth.oauth.with_raw_response.create_token()
-
- assert oauth.is_closed is True
- assert oauth.http_request.headers.get("X-Stainless-Lang") == "python"
- assert oauth.json() == {"foo": "bar"}
- assert isinstance(oauth, BinaryAPIResponse)
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ oauth = response.parse()
+ assert_matches_type(TokenResponseIf, oauth, path=["response"])
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
- @pytest.mark.respx(base_url=base_url)
- def test_streaming_response_create_token(self, client: HubSpot, respx_mock: MockRouter) -> None:
- respx_mock.post("/oauth/2026-03/token").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
- with client.auth.oauth.with_streaming_response.create_token() as oauth:
- assert not oauth.is_closed
- assert oauth.http_request.headers.get("X-Stainless-Lang") == "python"
+ def test_streaming_response_create_token(self, client: HubSpot) -> None:
+ with client.auth.oauth.with_streaming_response.create_token() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- assert oauth.json() == {"foo": "bar"}
- assert cast(Any, oauth.is_closed) is True
- assert isinstance(oauth, StreamedBinaryAPIResponse)
+ oauth = response.parse()
+ assert_matches_type(TokenResponseIf, oauth, path=["response"])
- assert cast(Any, oauth.is_closed) is True
+ assert cast(Any, response.is_closed) is True
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -178,22 +167,15 @@ class TestAsyncOAuth:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
- @pytest.mark.respx(base_url=base_url)
- async def test_method_create_token(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
- respx_mock.post("/oauth/2026-03/token").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
+ async def test_method_create_token(self, async_client: AsyncHubSpot) -> None:
oauth = await async_client.auth.oauth.create_token()
- assert oauth.is_closed
- assert await oauth.json() == {"foo": "bar"}
- assert cast(Any, oauth.is_closed) is True
- assert isinstance(oauth, AsyncBinaryAPIResponse)
+ assert_matches_type(TokenResponseIf, oauth, path=["response"])
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
- @pytest.mark.respx(base_url=base_url)
- async def test_method_create_token_with_all_params(
- self, async_client: AsyncHubSpot, respx_mock: MockRouter
- ) -> None:
- respx_mock.post("/oauth/2026-03/token").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
+ async def test_method_create_token_with_all_params(self, async_client: AsyncHubSpot) -> None:
oauth = await async_client.auth.oauth.create_token(
client_id="client_id",
client_secret="client_secret",
@@ -204,36 +186,29 @@ async def test_method_create_token_with_all_params(
refresh_token="refresh_token",
scope="scope",
)
- assert oauth.is_closed
- assert await oauth.json() == {"foo": "bar"}
- assert cast(Any, oauth.is_closed) is True
- assert isinstance(oauth, AsyncBinaryAPIResponse)
+ assert_matches_type(TokenResponseIf, oauth, path=["response"])
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
- @pytest.mark.respx(base_url=base_url)
- async def test_raw_response_create_token(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
- respx_mock.post("/oauth/2026-03/token").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
-
- oauth = await async_client.auth.oauth.with_raw_response.create_token()
+ async def test_raw_response_create_token(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.auth.oauth.with_raw_response.create_token()
- assert oauth.is_closed is True
- assert oauth.http_request.headers.get("X-Stainless-Lang") == "python"
- assert await oauth.json() == {"foo": "bar"}
- assert isinstance(oauth, AsyncBinaryAPIResponse)
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ oauth = await response.parse()
+ assert_matches_type(TokenResponseIf, oauth, path=["response"])
+ @pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
- @pytest.mark.respx(base_url=base_url)
- async def test_streaming_response_create_token(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
- respx_mock.post("/oauth/2026-03/token").mock(return_value=httpx.Response(200, json={"foo": "bar"}))
- async with async_client.auth.oauth.with_streaming_response.create_token() as oauth:
- assert not oauth.is_closed
- assert oauth.http_request.headers.get("X-Stainless-Lang") == "python"
+ async def test_streaming_response_create_token(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.auth.oauth.with_streaming_response.create_token() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- assert await oauth.json() == {"foo": "bar"}
- assert cast(Any, oauth.is_closed) is True
- assert isinstance(oauth, AsyncStreamedBinaryAPIResponse)
+ oauth = await response.parse()
+ assert_matches_type(TokenResponseIf, oauth, path=["response"])
- assert cast(Any, oauth.is_closed) is True
+ assert cast(Any, response.is_closed) is True
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
diff --git a/tests/api_resources/automation/actions/test_definitions.py b/tests/api_resources/automation/actions/test_definitions.py
index c9fe6058..5240a06e 100644
--- a/tests/api_resources/automation/actions/test_definitions.py
+++ b/tests/api_resources/automation/actions/test_definitions.py
@@ -138,7 +138,7 @@ def test_method_create_with_all_params(self, client: HubSpot) -> None:
}
],
"schema": {
- "type": "ARRAY",
+ "type": "INTEGER",
"maximum": 0,
"minimum": 0,
},
@@ -318,7 +318,7 @@ def test_method_update_with_all_params(self, client: HubSpot) -> None:
}
],
"schema": {
- "type": "ARRAY",
+ "type": "INTEGER",
"maximum": 0,
"minimum": 0,
},
@@ -741,7 +741,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncHubSpot) -
}
],
"schema": {
- "type": "ARRAY",
+ "type": "INTEGER",
"maximum": 0,
"minimum": 0,
},
@@ -921,7 +921,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncHubSpot) -
}
],
"schema": {
- "type": "ARRAY",
+ "type": "INTEGER",
"maximum": 0,
"minimum": 0,
},
diff --git a/tests/api_resources/cms/test_url_redirects.py b/tests/api_resources/cms/test_url_redirects.py
index 05017e71..6ba71449 100644
--- a/tests/api_resources/cms/test_url_redirects.py
+++ b/tests/api_resources/cms/test_url_redirects.py
@@ -5,11 +5,19 @@
import os
from typing import Any, cast
+import httpx
import pytest
+from respx import MockRouter
from hubspot_sdk import HubSpot, AsyncHubSpot
from tests.utils import assert_matches_type
from hubspot_sdk._utils import parse_datetime
+from hubspot_sdk._response import (
+ BinaryAPIResponse,
+ AsyncBinaryAPIResponse,
+ StreamedBinaryAPIResponse,
+ AsyncStreamedBinaryAPIResponse,
+)
from hubspot_sdk.types.cms import (
URLMapping,
)
@@ -259,6 +267,124 @@ def test_path_params_delete(self, client: HubSpot) -> None:
"",
)
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_method_create_url_mapping(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.post("/cms/url-redirects/2026-03/url-mappings").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ url_redirect = client.cms.url_redirects.create_url_mapping(
+ id="id",
+ created=parse_datetime("2019-12-27T18:11:19.117Z"),
+ destination="destination",
+ is_match_full_url=True,
+ is_match_query_string=True,
+ is_only_after_not_found=True,
+ is_pattern=True,
+ is_protocol_agnostic=True,
+ is_trailing_slash_optional=True,
+ precedence=0,
+ redirect_style=0,
+ route_prefix="routePrefix",
+ updated=parse_datetime("2019-12-27T18:11:19.117Z"),
+ )
+ assert url_redirect.is_closed
+ assert url_redirect.json() == {"foo": "bar"}
+ assert cast(Any, url_redirect.is_closed) is True
+ assert isinstance(url_redirect, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_raw_response_create_url_mapping(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.post("/cms/url-redirects/2026-03/url-mappings").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+
+ url_redirect = client.cms.url_redirects.with_raw_response.create_url_mapping(
+ id="id",
+ created=parse_datetime("2019-12-27T18:11:19.117Z"),
+ destination="destination",
+ is_match_full_url=True,
+ is_match_query_string=True,
+ is_only_after_not_found=True,
+ is_pattern=True,
+ is_protocol_agnostic=True,
+ is_trailing_slash_optional=True,
+ precedence=0,
+ redirect_style=0,
+ route_prefix="routePrefix",
+ updated=parse_datetime("2019-12-27T18:11:19.117Z"),
+ )
+
+ assert url_redirect.is_closed is True
+ assert url_redirect.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert url_redirect.json() == {"foo": "bar"}
+ assert isinstance(url_redirect, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_streaming_response_create_url_mapping(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.post("/cms/url-redirects/2026-03/url-mappings").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ with client.cms.url_redirects.with_streaming_response.create_url_mapping(
+ id="id",
+ created=parse_datetime("2019-12-27T18:11:19.117Z"),
+ destination="destination",
+ is_match_full_url=True,
+ is_match_query_string=True,
+ is_only_after_not_found=True,
+ is_pattern=True,
+ is_protocol_agnostic=True,
+ is_trailing_slash_optional=True,
+ precedence=0,
+ redirect_style=0,
+ route_prefix="routePrefix",
+ updated=parse_datetime("2019-12-27T18:11:19.117Z"),
+ ) as url_redirect:
+ assert not url_redirect.is_closed
+ assert url_redirect.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ assert url_redirect.json() == {"foo": "bar"}
+ assert cast(Any, url_redirect.is_closed) is True
+ assert isinstance(url_redirect, StreamedBinaryAPIResponse)
+
+ assert cast(Any, url_redirect.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_delete_url_mapping(self, client: HubSpot) -> None:
+ url_redirect = client.cms.url_redirects.delete_url_mapping(
+ 0,
+ )
+ assert url_redirect is None
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_delete_url_mapping(self, client: HubSpot) -> None:
+ response = client.cms.url_redirects.with_raw_response.delete_url_mapping(
+ 0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ url_redirect = response.parse()
+ assert url_redirect is None
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_delete_url_mapping(self, client: HubSpot) -> None:
+ with client.cms.url_redirects.with_streaming_response.delete_url_mapping(
+ 0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ url_redirect = response.parse()
+ assert url_redirect is None
+
+ assert cast(Any, response.is_closed) is True
+
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_get(self, client: HubSpot) -> None:
@@ -301,6 +427,96 @@ def test_path_params_get(self, client: HubSpot) -> None:
"",
)
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_method_get_url_mapping(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/cms/url-redirects/2026-03/url-mappings/0").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ url_redirect = client.cms.url_redirects.get_url_mapping(
+ 0,
+ )
+ assert url_redirect.is_closed
+ assert url_redirect.json() == {"foo": "bar"}
+ assert cast(Any, url_redirect.is_closed) is True
+ assert isinstance(url_redirect, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_raw_response_get_url_mapping(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/cms/url-redirects/2026-03/url-mappings/0").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+
+ url_redirect = client.cms.url_redirects.with_raw_response.get_url_mapping(
+ 0,
+ )
+
+ assert url_redirect.is_closed is True
+ assert url_redirect.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert url_redirect.json() == {"foo": "bar"}
+ assert isinstance(url_redirect, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_streaming_response_get_url_mapping(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/cms/url-redirects/2026-03/url-mappings/0").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ with client.cms.url_redirects.with_streaming_response.get_url_mapping(
+ 0,
+ ) as url_redirect:
+ assert not url_redirect.is_closed
+ assert url_redirect.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ assert url_redirect.json() == {"foo": "bar"}
+ assert cast(Any, url_redirect.is_closed) is True
+ assert isinstance(url_redirect, StreamedBinaryAPIResponse)
+
+ assert cast(Any, url_redirect.is_closed) is True
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_method_list_url_mappings(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/cms/url-redirects/2026-03/url-mappings").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ url_redirect = client.cms.url_redirects.list_url_mappings()
+ assert url_redirect.is_closed
+ assert url_redirect.json() == {"foo": "bar"}
+ assert cast(Any, url_redirect.is_closed) is True
+ assert isinstance(url_redirect, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_raw_response_list_url_mappings(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/cms/url-redirects/2026-03/url-mappings").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+
+ url_redirect = client.cms.url_redirects.with_raw_response.list_url_mappings()
+
+ assert url_redirect.is_closed is True
+ assert url_redirect.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert url_redirect.json() == {"foo": "bar"}
+ assert isinstance(url_redirect, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_streaming_response_list_url_mappings(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/cms/url-redirects/2026-03/url-mappings").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ with client.cms.url_redirects.with_streaming_response.list_url_mappings() as url_redirect:
+ assert not url_redirect.is_closed
+ assert url_redirect.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ assert url_redirect.json() == {"foo": "bar"}
+ assert cast(Any, url_redirect.is_closed) is True
+ assert isinstance(url_redirect, StreamedBinaryAPIResponse)
+
+ assert cast(Any, url_redirect.is_closed) is True
+
class TestAsyncURLRedirects:
parametrize = pytest.mark.parametrize(
@@ -545,6 +761,126 @@ async def test_path_params_delete(self, async_client: AsyncHubSpot) -> None:
"",
)
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_method_create_url_mapping(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.post("/cms/url-redirects/2026-03/url-mappings").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ url_redirect = await async_client.cms.url_redirects.create_url_mapping(
+ id="id",
+ created=parse_datetime("2019-12-27T18:11:19.117Z"),
+ destination="destination",
+ is_match_full_url=True,
+ is_match_query_string=True,
+ is_only_after_not_found=True,
+ is_pattern=True,
+ is_protocol_agnostic=True,
+ is_trailing_slash_optional=True,
+ precedence=0,
+ redirect_style=0,
+ route_prefix="routePrefix",
+ updated=parse_datetime("2019-12-27T18:11:19.117Z"),
+ )
+ assert url_redirect.is_closed
+ assert await url_redirect.json() == {"foo": "bar"}
+ assert cast(Any, url_redirect.is_closed) is True
+ assert isinstance(url_redirect, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_raw_response_create_url_mapping(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.post("/cms/url-redirects/2026-03/url-mappings").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+
+ url_redirect = await async_client.cms.url_redirects.with_raw_response.create_url_mapping(
+ id="id",
+ created=parse_datetime("2019-12-27T18:11:19.117Z"),
+ destination="destination",
+ is_match_full_url=True,
+ is_match_query_string=True,
+ is_only_after_not_found=True,
+ is_pattern=True,
+ is_protocol_agnostic=True,
+ is_trailing_slash_optional=True,
+ precedence=0,
+ redirect_style=0,
+ route_prefix="routePrefix",
+ updated=parse_datetime("2019-12-27T18:11:19.117Z"),
+ )
+
+ assert url_redirect.is_closed is True
+ assert url_redirect.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert await url_redirect.json() == {"foo": "bar"}
+ assert isinstance(url_redirect, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_streaming_response_create_url_mapping(
+ self, async_client: AsyncHubSpot, respx_mock: MockRouter
+ ) -> None:
+ respx_mock.post("/cms/url-redirects/2026-03/url-mappings").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ async with async_client.cms.url_redirects.with_streaming_response.create_url_mapping(
+ id="id",
+ created=parse_datetime("2019-12-27T18:11:19.117Z"),
+ destination="destination",
+ is_match_full_url=True,
+ is_match_query_string=True,
+ is_only_after_not_found=True,
+ is_pattern=True,
+ is_protocol_agnostic=True,
+ is_trailing_slash_optional=True,
+ precedence=0,
+ redirect_style=0,
+ route_prefix="routePrefix",
+ updated=parse_datetime("2019-12-27T18:11:19.117Z"),
+ ) as url_redirect:
+ assert not url_redirect.is_closed
+ assert url_redirect.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ assert await url_redirect.json() == {"foo": "bar"}
+ assert cast(Any, url_redirect.is_closed) is True
+ assert isinstance(url_redirect, AsyncStreamedBinaryAPIResponse)
+
+ assert cast(Any, url_redirect.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_delete_url_mapping(self, async_client: AsyncHubSpot) -> None:
+ url_redirect = await async_client.cms.url_redirects.delete_url_mapping(
+ 0,
+ )
+ assert url_redirect is None
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_delete_url_mapping(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.cms.url_redirects.with_raw_response.delete_url_mapping(
+ 0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ url_redirect = await response.parse()
+ assert url_redirect is None
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_delete_url_mapping(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.cms.url_redirects.with_streaming_response.delete_url_mapping(
+ 0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ url_redirect = await response.parse()
+ assert url_redirect is None
+
+ assert cast(Any, response.is_closed) is True
+
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_get(self, async_client: AsyncHubSpot) -> None:
@@ -586,3 +922,95 @@ async def test_path_params_get(self, async_client: AsyncHubSpot) -> None:
await async_client.cms.url_redirects.with_raw_response.get(
"",
)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_method_get_url_mapping(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/cms/url-redirects/2026-03/url-mappings/0").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ url_redirect = await async_client.cms.url_redirects.get_url_mapping(
+ 0,
+ )
+ assert url_redirect.is_closed
+ assert await url_redirect.json() == {"foo": "bar"}
+ assert cast(Any, url_redirect.is_closed) is True
+ assert isinstance(url_redirect, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_raw_response_get_url_mapping(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/cms/url-redirects/2026-03/url-mappings/0").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+
+ url_redirect = await async_client.cms.url_redirects.with_raw_response.get_url_mapping(
+ 0,
+ )
+
+ assert url_redirect.is_closed is True
+ assert url_redirect.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert await url_redirect.json() == {"foo": "bar"}
+ assert isinstance(url_redirect, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_streaming_response_get_url_mapping(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/cms/url-redirects/2026-03/url-mappings/0").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ async with async_client.cms.url_redirects.with_streaming_response.get_url_mapping(
+ 0,
+ ) as url_redirect:
+ assert not url_redirect.is_closed
+ assert url_redirect.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ assert await url_redirect.json() == {"foo": "bar"}
+ assert cast(Any, url_redirect.is_closed) is True
+ assert isinstance(url_redirect, AsyncStreamedBinaryAPIResponse)
+
+ assert cast(Any, url_redirect.is_closed) is True
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_method_list_url_mappings(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/cms/url-redirects/2026-03/url-mappings").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ url_redirect = await async_client.cms.url_redirects.list_url_mappings()
+ assert url_redirect.is_closed
+ assert await url_redirect.json() == {"foo": "bar"}
+ assert cast(Any, url_redirect.is_closed) is True
+ assert isinstance(url_redirect, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_raw_response_list_url_mappings(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/cms/url-redirects/2026-03/url-mappings").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+
+ url_redirect = await async_client.cms.url_redirects.with_raw_response.list_url_mappings()
+
+ assert url_redirect.is_closed is True
+ assert url_redirect.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert await url_redirect.json() == {"foo": "bar"}
+ assert isinstance(url_redirect, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_streaming_response_list_url_mappings(
+ self, async_client: AsyncHubSpot, respx_mock: MockRouter
+ ) -> None:
+ respx_mock.get("/cms/url-redirects/2026-03/url-mappings").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ async with async_client.cms.url_redirects.with_streaming_response.list_url_mappings() as url_redirect:
+ assert not url_redirect.is_closed
+ assert url_redirect.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ assert await url_redirect.json() == {"foo": "bar"}
+ assert cast(Any, url_redirect.is_closed) is True
+ assert isinstance(url_redirect, AsyncStreamedBinaryAPIResponse)
+
+ assert cast(Any, url_redirect.is_closed) is True
diff --git a/tests/api_resources/conversations/test_visitor_identification.py b/tests/api_resources/conversations/test_visitor_identification.py
index a91f35d2..b67c6e0e 100644
--- a/tests/api_resources/conversations/test_visitor_identification.py
+++ b/tests/api_resources/conversations/test_visitor_identification.py
@@ -22,6 +22,7 @@ class TestVisitorIdentification:
def test_method_generate_token(self, client: HubSpot) -> None:
visitor_identification = client.conversations.visitor_identification.generate_token(
email="email",
+ hs_customer_agent_context={"foo": "string"},
)
assert_matches_type(IdentificationTokenResponse, visitor_identification, path=["response"])
@@ -30,6 +31,7 @@ def test_method_generate_token(self, client: HubSpot) -> None:
def test_method_generate_token_with_all_params(self, client: HubSpot) -> None:
visitor_identification = client.conversations.visitor_identification.generate_token(
email="email",
+ hs_customer_agent_context={"foo": "string"},
first_name="firstName",
last_name="lastName",
)
@@ -40,6 +42,7 @@ def test_method_generate_token_with_all_params(self, client: HubSpot) -> None:
def test_raw_response_generate_token(self, client: HubSpot) -> None:
response = client.conversations.visitor_identification.with_raw_response.generate_token(
email="email",
+ hs_customer_agent_context={"foo": "string"},
)
assert response.is_closed is True
@@ -52,6 +55,7 @@ def test_raw_response_generate_token(self, client: HubSpot) -> None:
def test_streaming_response_generate_token(self, client: HubSpot) -> None:
with client.conversations.visitor_identification.with_streaming_response.generate_token(
email="email",
+ hs_customer_agent_context={"foo": "string"},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -72,6 +76,7 @@ class TestAsyncVisitorIdentification:
async def test_method_generate_token(self, async_client: AsyncHubSpot) -> None:
visitor_identification = await async_client.conversations.visitor_identification.generate_token(
email="email",
+ hs_customer_agent_context={"foo": "string"},
)
assert_matches_type(IdentificationTokenResponse, visitor_identification, path=["response"])
@@ -80,6 +85,7 @@ async def test_method_generate_token(self, async_client: AsyncHubSpot) -> None:
async def test_method_generate_token_with_all_params(self, async_client: AsyncHubSpot) -> None:
visitor_identification = await async_client.conversations.visitor_identification.generate_token(
email="email",
+ hs_customer_agent_context={"foo": "string"},
first_name="firstName",
last_name="lastName",
)
@@ -90,6 +96,7 @@ async def test_method_generate_token_with_all_params(self, async_client: AsyncHu
async def test_raw_response_generate_token(self, async_client: AsyncHubSpot) -> None:
response = await async_client.conversations.visitor_identification.with_raw_response.generate_token(
email="email",
+ hs_customer_agent_context={"foo": "string"},
)
assert response.is_closed is True
@@ -102,6 +109,7 @@ async def test_raw_response_generate_token(self, async_client: AsyncHubSpot) ->
async def test_streaming_response_generate_token(self, async_client: AsyncHubSpot) -> None:
async with async_client.conversations.visitor_identification.with_streaming_response.generate_token(
email="email",
+ hs_customer_agent_context={"foo": "string"},
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/crm/test_exports.py b/tests/api_resources/crm/test_exports.py
index 35389b1d..40ee3bfb 100644
--- a/tests/api_resources/crm/test_exports.py
+++ b/tests/api_resources/crm/test_exports.py
@@ -9,7 +9,10 @@
from hubspot_sdk import HubSpot, AsyncHubSpot
from tests.utils import assert_matches_type
-from hubspot_sdk.types.crm import PublicExportResponse, ActionResponseWithSingleResultUri
+from hubspot_sdk.types.crm import (
+ PublicExportResponse,
+ ActionResponseWithSingleResultUri,
+)
from hubspot_sdk.types.shared import TaskLocator
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -21,13 +24,81 @@ class TestExports:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_create_async_overload_1(self, client: HubSpot) -> None:
- export = client.crm.exports.create_async()
+ export = client.crm.exports.create_async(
+ associated_object_type=["string"],
+ export_internal_values_options=["NAMES"],
+ export_name="exportName",
+ export_type="VIEW",
+ format="CSV",
+ include_labeled_associations=True,
+ include_primary_display_property_for_associated_objects=True,
+ language="AF_ZA",
+ object_properties=["string"],
+ object_type="objectType",
+ override_associated_objects_per_definition_per_row_limit=True,
+ )
+ assert_matches_type(TaskLocator, export, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_create_async_with_all_params_overload_1(self, client: HubSpot) -> None:
+ export = client.crm.exports.create_async(
+ associated_object_type=["string"],
+ export_internal_values_options=["NAMES"],
+ export_name="exportName",
+ export_type="VIEW",
+ format="CSV",
+ include_labeled_associations=True,
+ include_primary_display_property_for_associated_objects=True,
+ language="AF_ZA",
+ object_properties=["string"],
+ object_type="objectType",
+ override_associated_objects_per_definition_per_row_limit=True,
+ public_crm_search_request={
+ "filter_groups": [
+ {
+ "filters": [
+ {
+ "operator": "BETWEEN",
+ "property_name": "propertyName",
+ "high_value": "highValue",
+ "value": "value",
+ "values": ["string"],
+ }
+ ]
+ }
+ ],
+ "filters": [
+ {
+ "operator": "BETWEEN",
+ "property_name": "propertyName",
+ "high_value": "highValue",
+ "value": "value",
+ "values": ["string"],
+ }
+ ],
+ "sorts": ["string"],
+ "query": "query",
+ },
+ )
assert_matches_type(TaskLocator, export, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_create_async_overload_1(self, client: HubSpot) -> None:
- response = client.crm.exports.with_raw_response.create_async()
+ response = client.crm.exports.with_raw_response.create_async(
+ associated_object_type=["string"],
+ export_internal_values_options=["NAMES"],
+ export_name="exportName",
+ export_type="VIEW",
+ format="CSV",
+ include_labeled_associations=True,
+ include_primary_display_property_for_associated_objects=True,
+ language="AF_ZA",
+ object_properties=["string"],
+ object_type="objectType",
+ override_associated_objects_per_definition_per_row_limit=True,
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -37,7 +108,19 @@ def test_raw_response_create_async_overload_1(self, client: HubSpot) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_create_async_overload_1(self, client: HubSpot) -> None:
- with client.crm.exports.with_streaming_response.create_async() as response:
+ with client.crm.exports.with_streaming_response.create_async(
+ associated_object_type=["string"],
+ export_internal_values_options=["NAMES"],
+ export_name="exportName",
+ export_type="VIEW",
+ format="CSV",
+ include_labeled_associations=True,
+ include_primary_display_property_for_associated_objects=True,
+ language="AF_ZA",
+ object_properties=["string"],
+ object_type="objectType",
+ override_associated_objects_per_definition_per_row_limit=True,
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -49,13 +132,39 @@ def test_streaming_response_create_async_overload_1(self, client: HubSpot) -> No
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_create_async_overload_2(self, client: HubSpot) -> None:
- export = client.crm.exports.create_async()
+ export = client.crm.exports.create_async(
+ associated_object_type=["string"],
+ export_internal_values_options=["NAMES"],
+ export_name="exportName",
+ export_type="LIST",
+ format="CSV",
+ include_labeled_associations=True,
+ include_primary_display_property_for_associated_objects=True,
+ language="AF_ZA",
+ list_id="listId",
+ object_properties=["string"],
+ object_type="objectType",
+ override_associated_objects_per_definition_per_row_limit=True,
+ )
assert_matches_type(TaskLocator, export, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_create_async_overload_2(self, client: HubSpot) -> None:
- response = client.crm.exports.with_raw_response.create_async()
+ response = client.crm.exports.with_raw_response.create_async(
+ associated_object_type=["string"],
+ export_internal_values_options=["NAMES"],
+ export_name="exportName",
+ export_type="LIST",
+ format="CSV",
+ include_labeled_associations=True,
+ include_primary_display_property_for_associated_objects=True,
+ language="AF_ZA",
+ list_id="listId",
+ object_properties=["string"],
+ object_type="objectType",
+ override_associated_objects_per_definition_per_row_limit=True,
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -65,7 +174,20 @@ def test_raw_response_create_async_overload_2(self, client: HubSpot) -> None:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_create_async_overload_2(self, client: HubSpot) -> None:
- with client.crm.exports.with_streaming_response.create_async() as response:
+ with client.crm.exports.with_streaming_response.create_async(
+ associated_object_type=["string"],
+ export_internal_values_options=["NAMES"],
+ export_name="exportName",
+ export_type="LIST",
+ format="CSV",
+ include_labeled_associations=True,
+ include_primary_display_property_for_associated_objects=True,
+ language="AF_ZA",
+ list_id="listId",
+ object_properties=["string"],
+ object_type="objectType",
+ override_associated_objects_per_definition_per_row_limit=True,
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -151,13 +273,81 @@ class TestAsyncExports:
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_create_async_overload_1(self, async_client: AsyncHubSpot) -> None:
- export = await async_client.crm.exports.create_async()
+ export = await async_client.crm.exports.create_async(
+ associated_object_type=["string"],
+ export_internal_values_options=["NAMES"],
+ export_name="exportName",
+ export_type="VIEW",
+ format="CSV",
+ include_labeled_associations=True,
+ include_primary_display_property_for_associated_objects=True,
+ language="AF_ZA",
+ object_properties=["string"],
+ object_type="objectType",
+ override_associated_objects_per_definition_per_row_limit=True,
+ )
+ assert_matches_type(TaskLocator, export, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_create_async_with_all_params_overload_1(self, async_client: AsyncHubSpot) -> None:
+ export = await async_client.crm.exports.create_async(
+ associated_object_type=["string"],
+ export_internal_values_options=["NAMES"],
+ export_name="exportName",
+ export_type="VIEW",
+ format="CSV",
+ include_labeled_associations=True,
+ include_primary_display_property_for_associated_objects=True,
+ language="AF_ZA",
+ object_properties=["string"],
+ object_type="objectType",
+ override_associated_objects_per_definition_per_row_limit=True,
+ public_crm_search_request={
+ "filter_groups": [
+ {
+ "filters": [
+ {
+ "operator": "BETWEEN",
+ "property_name": "propertyName",
+ "high_value": "highValue",
+ "value": "value",
+ "values": ["string"],
+ }
+ ]
+ }
+ ],
+ "filters": [
+ {
+ "operator": "BETWEEN",
+ "property_name": "propertyName",
+ "high_value": "highValue",
+ "value": "value",
+ "values": ["string"],
+ }
+ ],
+ "sorts": ["string"],
+ "query": "query",
+ },
+ )
assert_matches_type(TaskLocator, export, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_create_async_overload_1(self, async_client: AsyncHubSpot) -> None:
- response = await async_client.crm.exports.with_raw_response.create_async()
+ response = await async_client.crm.exports.with_raw_response.create_async(
+ associated_object_type=["string"],
+ export_internal_values_options=["NAMES"],
+ export_name="exportName",
+ export_type="VIEW",
+ format="CSV",
+ include_labeled_associations=True,
+ include_primary_display_property_for_associated_objects=True,
+ language="AF_ZA",
+ object_properties=["string"],
+ object_type="objectType",
+ override_associated_objects_per_definition_per_row_limit=True,
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -167,7 +357,19 @@ async def test_raw_response_create_async_overload_1(self, async_client: AsyncHub
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_create_async_overload_1(self, async_client: AsyncHubSpot) -> None:
- async with async_client.crm.exports.with_streaming_response.create_async() as response:
+ async with async_client.crm.exports.with_streaming_response.create_async(
+ associated_object_type=["string"],
+ export_internal_values_options=["NAMES"],
+ export_name="exportName",
+ export_type="VIEW",
+ format="CSV",
+ include_labeled_associations=True,
+ include_primary_display_property_for_associated_objects=True,
+ language="AF_ZA",
+ object_properties=["string"],
+ object_type="objectType",
+ override_associated_objects_per_definition_per_row_limit=True,
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -179,13 +381,39 @@ async def test_streaming_response_create_async_overload_1(self, async_client: As
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_create_async_overload_2(self, async_client: AsyncHubSpot) -> None:
- export = await async_client.crm.exports.create_async()
+ export = await async_client.crm.exports.create_async(
+ associated_object_type=["string"],
+ export_internal_values_options=["NAMES"],
+ export_name="exportName",
+ export_type="LIST",
+ format="CSV",
+ include_labeled_associations=True,
+ include_primary_display_property_for_associated_objects=True,
+ language="AF_ZA",
+ list_id="listId",
+ object_properties=["string"],
+ object_type="objectType",
+ override_associated_objects_per_definition_per_row_limit=True,
+ )
assert_matches_type(TaskLocator, export, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_create_async_overload_2(self, async_client: AsyncHubSpot) -> None:
- response = await async_client.crm.exports.with_raw_response.create_async()
+ response = await async_client.crm.exports.with_raw_response.create_async(
+ associated_object_type=["string"],
+ export_internal_values_options=["NAMES"],
+ export_name="exportName",
+ export_type="LIST",
+ format="CSV",
+ include_labeled_associations=True,
+ include_primary_display_property_for_associated_objects=True,
+ language="AF_ZA",
+ list_id="listId",
+ object_properties=["string"],
+ object_type="objectType",
+ override_associated_objects_per_definition_per_row_limit=True,
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -195,7 +423,20 @@ async def test_raw_response_create_async_overload_2(self, async_client: AsyncHub
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_create_async_overload_2(self, async_client: AsyncHubSpot) -> None:
- async with async_client.crm.exports.with_streaming_response.create_async() as response:
+ async with async_client.crm.exports.with_streaming_response.create_async(
+ associated_object_type=["string"],
+ export_internal_values_options=["NAMES"],
+ export_name="exportName",
+ export_type="LIST",
+ format="CSV",
+ include_labeled_associations=True,
+ include_primary_display_property_for_associated_objects=True,
+ language="AF_ZA",
+ list_id="listId",
+ object_properties=["string"],
+ object_type="objectType",
+ override_associated_objects_per_definition_per_row_limit=True,
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/crm/test_lists.py b/tests/api_resources/crm/test_lists.py
index 12b8f742..dc648acb 100644
--- a/tests/api_resources/crm/test_lists.py
+++ b/tests/api_resources/crm/test_lists.py
@@ -67,31 +67,13 @@ def test_method_create_with_all_params(self, client: HubSpot) -> None:
"event_type_id": "eventTypeId",
"filter_branches": [
{
+ "association_category": "associationCategory",
+ "association_type_id": 0,
"filter_branches": [
{
- "association_category": "associationCategory",
- "association_type_id": 0,
- "filter_branches": [
- {
- "filter_branches": [],
- "filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "OR",
- "filters": [
- {
- "filter_type": "PROPERTY",
- "operation": {
- "include_objects_with_no_value_set": True,
- "operation_type": "BOOL",
- "operator": "operator",
- "value": True,
- },
- "property": "property",
- }
- ],
- }
- ],
+ "filter_branches": [],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "ASSOCIATION",
+ "filter_branch_type": "OR",
"filters": [
{
"filter_type": "PROPERTY",
@@ -104,12 +86,10 @@ def test_method_create_with_all_params(self, client: HubSpot) -> None:
"property": "property",
}
],
- "object_type_id": "objectTypeId",
- "operator": "operator",
}
],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "PROPERTY_ASSOCIATION",
+ "filter_branch_type": "ASSOCIATION",
"filters": [
{
"filter_type": "PROPERTY",
@@ -124,7 +104,6 @@ def test_method_create_with_all_params(self, client: HubSpot) -> None:
],
"object_type_id": "objectTypeId",
"operator": "operator",
- "property_with_object_id": "propertyWithObjectId",
}
],
"filter_branch_operator": "filterBranchOperator",
@@ -1493,31 +1472,13 @@ def test_method_update_list_filters(self, client: HubSpot) -> None:
"event_type_id": "eventTypeId",
"filter_branches": [
{
+ "association_category": "associationCategory",
+ "association_type_id": 0,
"filter_branches": [
{
- "association_category": "associationCategory",
- "association_type_id": 0,
- "filter_branches": [
- {
- "filter_branches": [],
- "filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "OR",
- "filters": [
- {
- "filter_type": "PROPERTY",
- "operation": {
- "include_objects_with_no_value_set": True,
- "operation_type": "BOOL",
- "operator": "operator",
- "value": True,
- },
- "property": "property",
- }
- ],
- }
- ],
+ "filter_branches": [],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "ASSOCIATION",
+ "filter_branch_type": "OR",
"filters": [
{
"filter_type": "PROPERTY",
@@ -1530,12 +1491,10 @@ def test_method_update_list_filters(self, client: HubSpot) -> None:
"property": "property",
}
],
- "object_type_id": "objectTypeId",
- "operator": "operator",
}
],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "PROPERTY_ASSOCIATION",
+ "filter_branch_type": "ASSOCIATION",
"filters": [
{
"filter_type": "PROPERTY",
@@ -1550,7 +1509,6 @@ def test_method_update_list_filters(self, client: HubSpot) -> None:
],
"object_type_id": "objectTypeId",
"operator": "operator",
- "property_with_object_id": "propertyWithObjectId",
}
],
"filter_branch_operator": "filterBranchOperator",
@@ -1671,31 +1629,13 @@ def test_method_update_list_filters_with_all_params(self, client: HubSpot) -> No
"event_type_id": "eventTypeId",
"filter_branches": [
{
+ "association_category": "associationCategory",
+ "association_type_id": 0,
"filter_branches": [
{
- "association_category": "associationCategory",
- "association_type_id": 0,
- "filter_branches": [
- {
- "filter_branches": [],
- "filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "OR",
- "filters": [
- {
- "filter_type": "PROPERTY",
- "operation": {
- "include_objects_with_no_value_set": True,
- "operation_type": "BOOL",
- "operator": "operator",
- "value": True,
- },
- "property": "property",
- }
- ],
- }
- ],
+ "filter_branches": [],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "ASSOCIATION",
+ "filter_branch_type": "OR",
"filters": [
{
"filter_type": "PROPERTY",
@@ -1708,12 +1648,10 @@ def test_method_update_list_filters_with_all_params(self, client: HubSpot) -> No
"property": "property",
}
],
- "object_type_id": "objectTypeId",
- "operator": "operator",
}
],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "PROPERTY_ASSOCIATION",
+ "filter_branch_type": "ASSOCIATION",
"filters": [
{
"filter_type": "PROPERTY",
@@ -1728,7 +1666,6 @@ def test_method_update_list_filters_with_all_params(self, client: HubSpot) -> No
],
"object_type_id": "objectTypeId",
"operator": "operator",
- "property_with_object_id": "propertyWithObjectId",
}
],
"filter_branch_operator": "filterBranchOperator",
@@ -1860,31 +1797,13 @@ def test_raw_response_update_list_filters(self, client: HubSpot) -> None:
"event_type_id": "eventTypeId",
"filter_branches": [
{
+ "association_category": "associationCategory",
+ "association_type_id": 0,
"filter_branches": [
{
- "association_category": "associationCategory",
- "association_type_id": 0,
- "filter_branches": [
- {
- "filter_branches": [],
- "filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "OR",
- "filters": [
- {
- "filter_type": "PROPERTY",
- "operation": {
- "include_objects_with_no_value_set": True,
- "operation_type": "BOOL",
- "operator": "operator",
- "value": True,
- },
- "property": "property",
- }
- ],
- }
- ],
+ "filter_branches": [],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "ASSOCIATION",
+ "filter_branch_type": "OR",
"filters": [
{
"filter_type": "PROPERTY",
@@ -1897,12 +1816,10 @@ def test_raw_response_update_list_filters(self, client: HubSpot) -> None:
"property": "property",
}
],
- "object_type_id": "objectTypeId",
- "operator": "operator",
}
],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "PROPERTY_ASSOCIATION",
+ "filter_branch_type": "ASSOCIATION",
"filters": [
{
"filter_type": "PROPERTY",
@@ -1917,7 +1834,6 @@ def test_raw_response_update_list_filters(self, client: HubSpot) -> None:
],
"object_type_id": "objectTypeId",
"operator": "operator",
- "property_with_object_id": "propertyWithObjectId",
}
],
"filter_branch_operator": "filterBranchOperator",
@@ -2042,31 +1958,13 @@ def test_streaming_response_update_list_filters(self, client: HubSpot) -> None:
"event_type_id": "eventTypeId",
"filter_branches": [
{
+ "association_category": "associationCategory",
+ "association_type_id": 0,
"filter_branches": [
{
- "association_category": "associationCategory",
- "association_type_id": 0,
- "filter_branches": [
- {
- "filter_branches": [],
- "filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "OR",
- "filters": [
- {
- "filter_type": "PROPERTY",
- "operation": {
- "include_objects_with_no_value_set": True,
- "operation_type": "BOOL",
- "operator": "operator",
- "value": True,
- },
- "property": "property",
- }
- ],
- }
- ],
+ "filter_branches": [],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "ASSOCIATION",
+ "filter_branch_type": "OR",
"filters": [
{
"filter_type": "PROPERTY",
@@ -2079,12 +1977,10 @@ def test_streaming_response_update_list_filters(self, client: HubSpot) -> None:
"property": "property",
}
],
- "object_type_id": "objectTypeId",
- "operator": "operator",
}
],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "PROPERTY_ASSOCIATION",
+ "filter_branch_type": "ASSOCIATION",
"filters": [
{
"filter_type": "PROPERTY",
@@ -2099,7 +1995,6 @@ def test_streaming_response_update_list_filters(self, client: HubSpot) -> None:
],
"object_type_id": "objectTypeId",
"operator": "operator",
- "property_with_object_id": "propertyWithObjectId",
}
],
"filter_branch_operator": "filterBranchOperator",
@@ -2227,31 +2122,13 @@ def test_path_params_update_list_filters(self, client: HubSpot) -> None:
"event_type_id": "eventTypeId",
"filter_branches": [
{
+ "association_category": "associationCategory",
+ "association_type_id": 0,
"filter_branches": [
{
- "association_category": "associationCategory",
- "association_type_id": 0,
- "filter_branches": [
- {
- "filter_branches": [],
- "filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "OR",
- "filters": [
- {
- "filter_type": "PROPERTY",
- "operation": {
- "include_objects_with_no_value_set": True,
- "operation_type": "BOOL",
- "operator": "operator",
- "value": True,
- },
- "property": "property",
- }
- ],
- }
- ],
+ "filter_branches": [],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "ASSOCIATION",
+ "filter_branch_type": "OR",
"filters": [
{
"filter_type": "PROPERTY",
@@ -2264,12 +2141,10 @@ def test_path_params_update_list_filters(self, client: HubSpot) -> None:
"property": "property",
}
],
- "object_type_id": "objectTypeId",
- "operator": "operator",
}
],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "PROPERTY_ASSOCIATION",
+ "filter_branch_type": "ASSOCIATION",
"filters": [
{
"filter_type": "PROPERTY",
@@ -2284,7 +2159,6 @@ def test_path_params_update_list_filters(self, client: HubSpot) -> None:
],
"object_type_id": "objectTypeId",
"operator": "operator",
- "property_with_object_id": "propertyWithObjectId",
}
],
"filter_branch_operator": "filterBranchOperator",
@@ -2587,31 +2461,13 @@ async def test_method_create_with_all_params(self, async_client: AsyncHubSpot) -
"event_type_id": "eventTypeId",
"filter_branches": [
{
+ "association_category": "associationCategory",
+ "association_type_id": 0,
"filter_branches": [
{
- "association_category": "associationCategory",
- "association_type_id": 0,
- "filter_branches": [
- {
- "filter_branches": [],
- "filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "OR",
- "filters": [
- {
- "filter_type": "PROPERTY",
- "operation": {
- "include_objects_with_no_value_set": True,
- "operation_type": "BOOL",
- "operator": "operator",
- "value": True,
- },
- "property": "property",
- }
- ],
- }
- ],
+ "filter_branches": [],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "ASSOCIATION",
+ "filter_branch_type": "OR",
"filters": [
{
"filter_type": "PROPERTY",
@@ -2624,12 +2480,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncHubSpot) -
"property": "property",
}
],
- "object_type_id": "objectTypeId",
- "operator": "operator",
}
],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "PROPERTY_ASSOCIATION",
+ "filter_branch_type": "ASSOCIATION",
"filters": [
{
"filter_type": "PROPERTY",
@@ -2644,7 +2498,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncHubSpot) -
],
"object_type_id": "objectTypeId",
"operator": "operator",
- "property_with_object_id": "propertyWithObjectId",
}
],
"filter_branch_operator": "filterBranchOperator",
@@ -4013,31 +3866,13 @@ async def test_method_update_list_filters(self, async_client: AsyncHubSpot) -> N
"event_type_id": "eventTypeId",
"filter_branches": [
{
+ "association_category": "associationCategory",
+ "association_type_id": 0,
"filter_branches": [
{
- "association_category": "associationCategory",
- "association_type_id": 0,
- "filter_branches": [
- {
- "filter_branches": [],
- "filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "OR",
- "filters": [
- {
- "filter_type": "PROPERTY",
- "operation": {
- "include_objects_with_no_value_set": True,
- "operation_type": "BOOL",
- "operator": "operator",
- "value": True,
- },
- "property": "property",
- }
- ],
- }
- ],
+ "filter_branches": [],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "ASSOCIATION",
+ "filter_branch_type": "OR",
"filters": [
{
"filter_type": "PROPERTY",
@@ -4050,12 +3885,10 @@ async def test_method_update_list_filters(self, async_client: AsyncHubSpot) -> N
"property": "property",
}
],
- "object_type_id": "objectTypeId",
- "operator": "operator",
}
],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "PROPERTY_ASSOCIATION",
+ "filter_branch_type": "ASSOCIATION",
"filters": [
{
"filter_type": "PROPERTY",
@@ -4070,7 +3903,6 @@ async def test_method_update_list_filters(self, async_client: AsyncHubSpot) -> N
],
"object_type_id": "objectTypeId",
"operator": "operator",
- "property_with_object_id": "propertyWithObjectId",
}
],
"filter_branch_operator": "filterBranchOperator",
@@ -4191,31 +4023,13 @@ async def test_method_update_list_filters_with_all_params(self, async_client: As
"event_type_id": "eventTypeId",
"filter_branches": [
{
+ "association_category": "associationCategory",
+ "association_type_id": 0,
"filter_branches": [
{
- "association_category": "associationCategory",
- "association_type_id": 0,
- "filter_branches": [
- {
- "filter_branches": [],
- "filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "OR",
- "filters": [
- {
- "filter_type": "PROPERTY",
- "operation": {
- "include_objects_with_no_value_set": True,
- "operation_type": "BOOL",
- "operator": "operator",
- "value": True,
- },
- "property": "property",
- }
- ],
- }
- ],
+ "filter_branches": [],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "ASSOCIATION",
+ "filter_branch_type": "OR",
"filters": [
{
"filter_type": "PROPERTY",
@@ -4228,12 +4042,10 @@ async def test_method_update_list_filters_with_all_params(self, async_client: As
"property": "property",
}
],
- "object_type_id": "objectTypeId",
- "operator": "operator",
}
],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "PROPERTY_ASSOCIATION",
+ "filter_branch_type": "ASSOCIATION",
"filters": [
{
"filter_type": "PROPERTY",
@@ -4248,7 +4060,6 @@ async def test_method_update_list_filters_with_all_params(self, async_client: As
],
"object_type_id": "objectTypeId",
"operator": "operator",
- "property_with_object_id": "propertyWithObjectId",
}
],
"filter_branch_operator": "filterBranchOperator",
@@ -4380,31 +4191,13 @@ async def test_raw_response_update_list_filters(self, async_client: AsyncHubSpot
"event_type_id": "eventTypeId",
"filter_branches": [
{
+ "association_category": "associationCategory",
+ "association_type_id": 0,
"filter_branches": [
{
- "association_category": "associationCategory",
- "association_type_id": 0,
- "filter_branches": [
- {
- "filter_branches": [],
- "filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "OR",
- "filters": [
- {
- "filter_type": "PROPERTY",
- "operation": {
- "include_objects_with_no_value_set": True,
- "operation_type": "BOOL",
- "operator": "operator",
- "value": True,
- },
- "property": "property",
- }
- ],
- }
- ],
+ "filter_branches": [],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "ASSOCIATION",
+ "filter_branch_type": "OR",
"filters": [
{
"filter_type": "PROPERTY",
@@ -4417,12 +4210,10 @@ async def test_raw_response_update_list_filters(self, async_client: AsyncHubSpot
"property": "property",
}
],
- "object_type_id": "objectTypeId",
- "operator": "operator",
}
],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "PROPERTY_ASSOCIATION",
+ "filter_branch_type": "ASSOCIATION",
"filters": [
{
"filter_type": "PROPERTY",
@@ -4437,7 +4228,6 @@ async def test_raw_response_update_list_filters(self, async_client: AsyncHubSpot
],
"object_type_id": "objectTypeId",
"operator": "operator",
- "property_with_object_id": "propertyWithObjectId",
}
],
"filter_branch_operator": "filterBranchOperator",
@@ -4562,31 +4352,13 @@ async def test_streaming_response_update_list_filters(self, async_client: AsyncH
"event_type_id": "eventTypeId",
"filter_branches": [
{
+ "association_category": "associationCategory",
+ "association_type_id": 0,
"filter_branches": [
{
- "association_category": "associationCategory",
- "association_type_id": 0,
- "filter_branches": [
- {
- "filter_branches": [],
- "filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "OR",
- "filters": [
- {
- "filter_type": "PROPERTY",
- "operation": {
- "include_objects_with_no_value_set": True,
- "operation_type": "BOOL",
- "operator": "operator",
- "value": True,
- },
- "property": "property",
- }
- ],
- }
- ],
+ "filter_branches": [],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "ASSOCIATION",
+ "filter_branch_type": "OR",
"filters": [
{
"filter_type": "PROPERTY",
@@ -4599,12 +4371,10 @@ async def test_streaming_response_update_list_filters(self, async_client: AsyncH
"property": "property",
}
],
- "object_type_id": "objectTypeId",
- "operator": "operator",
}
],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "PROPERTY_ASSOCIATION",
+ "filter_branch_type": "ASSOCIATION",
"filters": [
{
"filter_type": "PROPERTY",
@@ -4619,7 +4389,6 @@ async def test_streaming_response_update_list_filters(self, async_client: AsyncH
],
"object_type_id": "objectTypeId",
"operator": "operator",
- "property_with_object_id": "propertyWithObjectId",
}
],
"filter_branch_operator": "filterBranchOperator",
@@ -4747,31 +4516,13 @@ async def test_path_params_update_list_filters(self, async_client: AsyncHubSpot)
"event_type_id": "eventTypeId",
"filter_branches": [
{
+ "association_category": "associationCategory",
+ "association_type_id": 0,
"filter_branches": [
{
- "association_category": "associationCategory",
- "association_type_id": 0,
- "filter_branches": [
- {
- "filter_branches": [],
- "filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "OR",
- "filters": [
- {
- "filter_type": "PROPERTY",
- "operation": {
- "include_objects_with_no_value_set": True,
- "operation_type": "BOOL",
- "operator": "operator",
- "value": True,
- },
- "property": "property",
- }
- ],
- }
- ],
+ "filter_branches": [],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "ASSOCIATION",
+ "filter_branch_type": "OR",
"filters": [
{
"filter_type": "PROPERTY",
@@ -4784,12 +4535,10 @@ async def test_path_params_update_list_filters(self, async_client: AsyncHubSpot)
"property": "property",
}
],
- "object_type_id": "objectTypeId",
- "operator": "operator",
}
],
"filter_branch_operator": "filterBranchOperator",
- "filter_branch_type": "PROPERTY_ASSOCIATION",
+ "filter_branch_type": "ASSOCIATION",
"filters": [
{
"filter_type": "PROPERTY",
@@ -4804,7 +4553,6 @@ async def test_path_params_update_list_filters(self, async_client: AsyncHubSpot)
],
"object_type_id": "objectTypeId",
"operator": "operator",
- "property_with_object_id": "propertyWithObjectId",
}
],
"filter_branch_operator": "filterBranchOperator",
diff --git a/tests/api_resources/test_webhooks.py b/tests/api_resources/test_webhooks.py
index 7cd0737b..258ef76b 100644
--- a/tests/api_resources/test_webhooks.py
+++ b/tests/api_resources/test_webhooks.py
@@ -17,18 +17,22 @@
StreamedBinaryAPIResponse,
AsyncStreamedBinaryAPIResponse,
)
-from hubspot_sdk.types.webhooks import (
+from hubspot_sdk.types.shared import (
FilterResponse,
- SettingsResponse,
FilterCreateResponse,
- SubscriptionResponse,
- SubscriptionResponse1,
SnapshotStatusResponse,
- SubscriptionListResponse,
CrmObjectSnapshotBatchResponse,
BatchResponseJournalFetchResponse,
+)
+from hubspot_sdk.types.webhooks import (
+ SettingsResponse,
+ SubscriptionResponse as WebhooksSubscriptionResponse,
+ SubscriptionListResponse,
BatchResponseSubscriptionResponse,
WebhookListSubscriptionFiltersResponse,
+)
+from hubspot_sdk.types.webhooks_journal import (
+ SubscriptionResponse as WebhooksJournalSubscriptionResponse,
CollectionResponseSubscriptionResponseNoPaging,
)
@@ -153,7 +157,7 @@ def test_method_create_event_subscription(self, client: HubSpot) -> None:
active=True,
event_type="company.associationChange",
)
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -166,7 +170,7 @@ def test_method_create_event_subscription_with_all_params(self, client: HubSpot)
object_type_id="objectTypeId",
property_name="propertyName",
)
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -180,7 +184,7 @@ def test_raw_response_create_event_subscription(self, client: HubSpot) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -194,147 +198,234 @@ def test_streaming_response_create_event_subscription(self, client: HubSpot) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_create_journal_subscription_overload_1(self, client: HubSpot) -> None:
- webhook = client.webhooks.create_journal_subscription()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ webhook = client.webhooks.create_journal_subscription(
+ actions=["CREATE"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ properties=["string"],
+ subscription_type="OBJECT",
+ )
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_create_journal_subscription_overload_1(self, client: HubSpot) -> None:
- response = client.webhooks.with_raw_response.create_journal_subscription()
+ response = client.webhooks.with_raw_response.create_journal_subscription(
+ actions=["CREATE"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ properties=["string"],
+ subscription_type="OBJECT",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_create_journal_subscription_overload_1(self, client: HubSpot) -> None:
- with client.webhooks.with_streaming_response.create_journal_subscription() as response:
+ with client.webhooks.with_streaming_response.create_journal_subscription(
+ actions=["CREATE"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ properties=["string"],
+ subscription_type="OBJECT",
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_create_journal_subscription_overload_2(self, client: HubSpot) -> None:
- webhook = client.webhooks.create_journal_subscription()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ webhook = client.webhooks.create_journal_subscription(
+ actions=["CREATE"],
+ associated_object_type_ids=["string"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="ASSOCIATION",
+ )
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_create_journal_subscription_overload_2(self, client: HubSpot) -> None:
- response = client.webhooks.with_raw_response.create_journal_subscription()
+ response = client.webhooks.with_raw_response.create_journal_subscription(
+ actions=["CREATE"],
+ associated_object_type_ids=["string"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="ASSOCIATION",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_create_journal_subscription_overload_2(self, client: HubSpot) -> None:
- with client.webhooks.with_streaming_response.create_journal_subscription() as response:
+ with client.webhooks.with_streaming_response.create_journal_subscription(
+ actions=["CREATE"],
+ associated_object_type_ids=["string"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="ASSOCIATION",
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_create_journal_subscription_overload_3(self, client: HubSpot) -> None:
- webhook = client.webhooks.create_journal_subscription()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ webhook = client.webhooks.create_journal_subscription(
+ event_type_id="eventTypeId",
+ properties=["string"],
+ subscription_type="APP_LIFECYCLE_EVENT",
+ )
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_create_journal_subscription_overload_3(self, client: HubSpot) -> None:
- response = client.webhooks.with_raw_response.create_journal_subscription()
+ response = client.webhooks.with_raw_response.create_journal_subscription(
+ event_type_id="eventTypeId",
+ properties=["string"],
+ subscription_type="APP_LIFECYCLE_EVENT",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_create_journal_subscription_overload_3(self, client: HubSpot) -> None:
- with client.webhooks.with_streaming_response.create_journal_subscription() as response:
+ with client.webhooks.with_streaming_response.create_journal_subscription(
+ event_type_id="eventTypeId",
+ properties=["string"],
+ subscription_type="APP_LIFECYCLE_EVENT",
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_create_journal_subscription_overload_4(self, client: HubSpot) -> None:
- webhook = client.webhooks.create_journal_subscription()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ webhook = client.webhooks.create_journal_subscription(
+ actions=["CREATE"],
+ list_ids=[0],
+ object_ids=[0],
+ portal_id=0,
+ subscription_type="LIST_MEMBERSHIP",
+ )
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_create_journal_subscription_overload_4(self, client: HubSpot) -> None:
- response = client.webhooks.with_raw_response.create_journal_subscription()
+ response = client.webhooks.with_raw_response.create_journal_subscription(
+ actions=["CREATE"],
+ list_ids=[0],
+ object_ids=[0],
+ portal_id=0,
+ subscription_type="LIST_MEMBERSHIP",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_create_journal_subscription_overload_4(self, client: HubSpot) -> None:
- with client.webhooks.with_streaming_response.create_journal_subscription() as response:
+ with client.webhooks.with_streaming_response.create_journal_subscription(
+ actions=["CREATE"],
+ list_ids=[0],
+ object_ids=[0],
+ portal_id=0,
+ subscription_type="LIST_MEMBERSHIP",
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_create_journal_subscription_overload_5(self, client: HubSpot) -> None:
- webhook = client.webhooks.create_journal_subscription()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ webhook = client.webhooks.create_journal_subscription(
+ actions=["CREATE"],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="GDPR_PRIVACY_DELETION",
+ )
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_create_journal_subscription_overload_5(self, client: HubSpot) -> None:
- response = client.webhooks.with_raw_response.create_journal_subscription()
+ response = client.webhooks.with_raw_response.create_journal_subscription(
+ actions=["CREATE"],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="GDPR_PRIVACY_DELETION",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_create_journal_subscription_overload_5(self, client: HubSpot) -> None:
- with client.webhooks.with_streaming_response.create_journal_subscription() as response:
+ with client.webhooks.with_streaming_response.create_journal_subscription(
+ actions=["CREATE"],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="GDPR_PRIVACY_DELETION",
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -779,7 +870,7 @@ def test_method_get_event_subscription(self, client: HubSpot) -> None:
subscription_id=0,
app_id=0,
)
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -792,7 +883,7 @@ def test_raw_response_get_event_subscription(self, client: HubSpot) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -805,7 +896,7 @@ def test_streaming_response_get_event_subscription(self, client: HubSpot) -> Non
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -956,7 +1047,7 @@ def test_method_get_journal_subscription(self, client: HubSpot) -> None:
webhook = client.webhooks.get_journal_subscription(
0,
)
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -968,7 +1059,7 @@ def test_raw_response_get_journal_subscription(self, client: HubSpot) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -980,7 +1071,7 @@ def test_streaming_response_get_journal_subscription(self, client: HubSpot) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1640,7 +1731,7 @@ def test_method_update_event_subscription(self, client: HubSpot) -> None:
subscription_id=0,
app_id=0,
)
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -1650,7 +1741,7 @@ def test_method_update_event_subscription_with_all_params(self, client: HubSpot)
app_id=0,
active=True,
)
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -1663,7 +1754,7 @@ def test_raw_response_update_event_subscription(self, client: HubSpot) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -1676,7 +1767,7 @@ def test_streaming_response_update_event_subscription(self, client: HubSpot) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = response.parse()
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -1841,7 +1932,7 @@ async def test_method_create_event_subscription(self, async_client: AsyncHubSpot
active=True,
event_type="company.associationChange",
)
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -1854,7 +1945,7 @@ async def test_method_create_event_subscription_with_all_params(self, async_clie
object_type_id="objectTypeId",
property_name="propertyName",
)
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -1868,7 +1959,7 @@ async def test_raw_response_create_event_subscription(self, async_client: AsyncH
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -1882,147 +1973,234 @@ async def test_streaming_response_create_event_subscription(self, async_client:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_create_journal_subscription_overload_1(self, async_client: AsyncHubSpot) -> None:
- webhook = await async_client.webhooks.create_journal_subscription()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ webhook = await async_client.webhooks.create_journal_subscription(
+ actions=["CREATE"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ properties=["string"],
+ subscription_type="OBJECT",
+ )
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_create_journal_subscription_overload_1(self, async_client: AsyncHubSpot) -> None:
- response = await async_client.webhooks.with_raw_response.create_journal_subscription()
+ response = await async_client.webhooks.with_raw_response.create_journal_subscription(
+ actions=["CREATE"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ properties=["string"],
+ subscription_type="OBJECT",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_create_journal_subscription_overload_1(self, async_client: AsyncHubSpot) -> None:
- async with async_client.webhooks.with_streaming_response.create_journal_subscription() as response:
+ async with async_client.webhooks.with_streaming_response.create_journal_subscription(
+ actions=["CREATE"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ properties=["string"],
+ subscription_type="OBJECT",
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_create_journal_subscription_overload_2(self, async_client: AsyncHubSpot) -> None:
- webhook = await async_client.webhooks.create_journal_subscription()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ webhook = await async_client.webhooks.create_journal_subscription(
+ actions=["CREATE"],
+ associated_object_type_ids=["string"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="ASSOCIATION",
+ )
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_create_journal_subscription_overload_2(self, async_client: AsyncHubSpot) -> None:
- response = await async_client.webhooks.with_raw_response.create_journal_subscription()
+ response = await async_client.webhooks.with_raw_response.create_journal_subscription(
+ actions=["CREATE"],
+ associated_object_type_ids=["string"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="ASSOCIATION",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_create_journal_subscription_overload_2(self, async_client: AsyncHubSpot) -> None:
- async with async_client.webhooks.with_streaming_response.create_journal_subscription() as response:
+ async with async_client.webhooks.with_streaming_response.create_journal_subscription(
+ actions=["CREATE"],
+ associated_object_type_ids=["string"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="ASSOCIATION",
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_create_journal_subscription_overload_3(self, async_client: AsyncHubSpot) -> None:
- webhook = await async_client.webhooks.create_journal_subscription()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ webhook = await async_client.webhooks.create_journal_subscription(
+ event_type_id="eventTypeId",
+ properties=["string"],
+ subscription_type="APP_LIFECYCLE_EVENT",
+ )
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_create_journal_subscription_overload_3(self, async_client: AsyncHubSpot) -> None:
- response = await async_client.webhooks.with_raw_response.create_journal_subscription()
+ response = await async_client.webhooks.with_raw_response.create_journal_subscription(
+ event_type_id="eventTypeId",
+ properties=["string"],
+ subscription_type="APP_LIFECYCLE_EVENT",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_create_journal_subscription_overload_3(self, async_client: AsyncHubSpot) -> None:
- async with async_client.webhooks.with_streaming_response.create_journal_subscription() as response:
+ async with async_client.webhooks.with_streaming_response.create_journal_subscription(
+ event_type_id="eventTypeId",
+ properties=["string"],
+ subscription_type="APP_LIFECYCLE_EVENT",
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_create_journal_subscription_overload_4(self, async_client: AsyncHubSpot) -> None:
- webhook = await async_client.webhooks.create_journal_subscription()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ webhook = await async_client.webhooks.create_journal_subscription(
+ actions=["CREATE"],
+ list_ids=[0],
+ object_ids=[0],
+ portal_id=0,
+ subscription_type="LIST_MEMBERSHIP",
+ )
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_create_journal_subscription_overload_4(self, async_client: AsyncHubSpot) -> None:
- response = await async_client.webhooks.with_raw_response.create_journal_subscription()
+ response = await async_client.webhooks.with_raw_response.create_journal_subscription(
+ actions=["CREATE"],
+ list_ids=[0],
+ object_ids=[0],
+ portal_id=0,
+ subscription_type="LIST_MEMBERSHIP",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_create_journal_subscription_overload_4(self, async_client: AsyncHubSpot) -> None:
- async with async_client.webhooks.with_streaming_response.create_journal_subscription() as response:
+ async with async_client.webhooks.with_streaming_response.create_journal_subscription(
+ actions=["CREATE"],
+ list_ids=[0],
+ object_ids=[0],
+ portal_id=0,
+ subscription_type="LIST_MEMBERSHIP",
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_create_journal_subscription_overload_5(self, async_client: AsyncHubSpot) -> None:
- webhook = await async_client.webhooks.create_journal_subscription()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ webhook = await async_client.webhooks.create_journal_subscription(
+ actions=["CREATE"],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="GDPR_PRIVACY_DELETION",
+ )
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_create_journal_subscription_overload_5(self, async_client: AsyncHubSpot) -> None:
- response = await async_client.webhooks.with_raw_response.create_journal_subscription()
+ response = await async_client.webhooks.with_raw_response.create_journal_subscription(
+ actions=["CREATE"],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="GDPR_PRIVACY_DELETION",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_create_journal_subscription_overload_5(self, async_client: AsyncHubSpot) -> None:
- async with async_client.webhooks.with_streaming_response.create_journal_subscription() as response:
+ async with async_client.webhooks.with_streaming_response.create_journal_subscription(
+ actions=["CREATE"],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="GDPR_PRIVACY_DELETION",
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2479,7 +2657,7 @@ async def test_method_get_event_subscription(self, async_client: AsyncHubSpot) -
subscription_id=0,
app_id=0,
)
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -2492,7 +2670,7 @@ async def test_raw_response_get_event_subscription(self, async_client: AsyncHubS
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -2505,7 +2683,7 @@ async def test_streaming_response_get_event_subscription(self, async_client: Asy
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -2656,7 +2834,7 @@ async def test_method_get_journal_subscription(self, async_client: AsyncHubSpot)
webhook = await async_client.webhooks.get_journal_subscription(
0,
)
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -2668,7 +2846,7 @@ async def test_raw_response_get_journal_subscription(self, async_client: AsyncHu
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -2680,7 +2858,7 @@ async def test_streaming_response_get_journal_subscription(self, async_client: A
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse1, webhook, path=["response"])
+ assert_matches_type(WebhooksJournalSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -3364,7 +3542,7 @@ async def test_method_update_event_subscription(self, async_client: AsyncHubSpot
subscription_id=0,
app_id=0,
)
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -3374,7 +3552,7 @@ async def test_method_update_event_subscription_with_all_params(self, async_clie
app_id=0,
active=True,
)
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -3387,7 +3565,7 @@ async def test_raw_response_update_event_subscription(self, async_client: AsyncH
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
@@ -3400,7 +3578,7 @@ async def test_streaming_response_update_event_subscription(self, async_client:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webhook = await response.parse()
- assert_matches_type(SubscriptionResponse, webhook, path=["response"])
+ assert_matches_type(WebhooksSubscriptionResponse, webhook, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/webhooks_journal/__init__.py b/tests/api_resources/webhooks_journal/__init__.py
new file mode 100644
index 00000000..fd8019a9
--- /dev/null
+++ b/tests/api_resources/webhooks_journal/__init__.py
@@ -0,0 +1 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/webhooks_journal/journal/__init__.py b/tests/api_resources/webhooks_journal/journal/__init__.py
new file mode 100644
index 00000000..fd8019a9
--- /dev/null
+++ b/tests/api_resources/webhooks_journal/journal/__init__.py
@@ -0,0 +1 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/webhooks_journal/journal/test_batch.py b/tests/api_resources/webhooks_journal/journal/test_batch.py
new file mode 100644
index 00000000..b3521748
--- /dev/null
+++ b/tests/api_resources/webhooks_journal/journal/test_batch.py
@@ -0,0 +1,394 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from hubspot_sdk import HubSpot, AsyncHubSpot
+from tests.utils import assert_matches_type
+from hubspot_sdk.types.shared import BatchResponseJournalFetchResponse
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestBatch:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get(self, client: HubSpot) -> None:
+ batch = client.webhooks_journal.journal.batch.get(
+ inputs=["string"],
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get_with_all_params(self, client: HubSpot) -> None:
+ batch = client.webhooks_journal.journal.batch.get(
+ inputs=["string"],
+ install_portal_id=0,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_get(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.journal.batch.with_raw_response.get(
+ inputs=["string"],
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ batch = response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_get(self, client: HubSpot) -> None:
+ with client.webhooks_journal.journal.batch.with_streaming_response.get(
+ inputs=["string"],
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ batch = response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get_earliest(self, client: HubSpot) -> None:
+ batch = client.webhooks_journal.journal.batch.get_earliest(
+ count=1,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get_earliest_with_all_params(self, client: HubSpot) -> None:
+ batch = client.webhooks_journal.journal.batch.get_earliest(
+ count=1,
+ install_portal_id=0,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_get_earliest(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.journal.batch.with_raw_response.get_earliest(
+ count=1,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ batch = response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_get_earliest(self, client: HubSpot) -> None:
+ with client.webhooks_journal.journal.batch.with_streaming_response.get_earliest(
+ count=1,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ batch = response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get_from_offset(self, client: HubSpot) -> None:
+ batch = client.webhooks_journal.journal.batch.get_from_offset(
+ count=1,
+ offset="offset",
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get_from_offset_with_all_params(self, client: HubSpot) -> None:
+ batch = client.webhooks_journal.journal.batch.get_from_offset(
+ count=1,
+ offset="offset",
+ install_portal_id=0,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_get_from_offset(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.journal.batch.with_raw_response.get_from_offset(
+ count=1,
+ offset="offset",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ batch = response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_get_from_offset(self, client: HubSpot) -> None:
+ with client.webhooks_journal.journal.batch.with_streaming_response.get_from_offset(
+ count=1,
+ offset="offset",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ batch = response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_path_params_get_from_offset(self, client: HubSpot) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `offset` but received ''"):
+ client.webhooks_journal.journal.batch.with_raw_response.get_from_offset(
+ count=1,
+ offset="",
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get_latest(self, client: HubSpot) -> None:
+ batch = client.webhooks_journal.journal.batch.get_latest(
+ count=1,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get_latest_with_all_params(self, client: HubSpot) -> None:
+ batch = client.webhooks_journal.journal.batch.get_latest(
+ count=1,
+ install_portal_id=0,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_get_latest(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.journal.batch.with_raw_response.get_latest(
+ count=1,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ batch = response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_get_latest(self, client: HubSpot) -> None:
+ with client.webhooks_journal.journal.batch.with_streaming_response.get_latest(
+ count=1,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ batch = response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+
+class TestAsyncBatch:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get(self, async_client: AsyncHubSpot) -> None:
+ batch = await async_client.webhooks_journal.journal.batch.get(
+ inputs=["string"],
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get_with_all_params(self, async_client: AsyncHubSpot) -> None:
+ batch = await async_client.webhooks_journal.journal.batch.get(
+ inputs=["string"],
+ install_portal_id=0,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_get(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.journal.batch.with_raw_response.get(
+ inputs=["string"],
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ batch = await response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_get(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.journal.batch.with_streaming_response.get(
+ inputs=["string"],
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ batch = await response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get_earliest(self, async_client: AsyncHubSpot) -> None:
+ batch = await async_client.webhooks_journal.journal.batch.get_earliest(
+ count=1,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get_earliest_with_all_params(self, async_client: AsyncHubSpot) -> None:
+ batch = await async_client.webhooks_journal.journal.batch.get_earliest(
+ count=1,
+ install_portal_id=0,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_get_earliest(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.journal.batch.with_raw_response.get_earliest(
+ count=1,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ batch = await response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_get_earliest(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.journal.batch.with_streaming_response.get_earliest(
+ count=1,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ batch = await response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get_from_offset(self, async_client: AsyncHubSpot) -> None:
+ batch = await async_client.webhooks_journal.journal.batch.get_from_offset(
+ count=1,
+ offset="offset",
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get_from_offset_with_all_params(self, async_client: AsyncHubSpot) -> None:
+ batch = await async_client.webhooks_journal.journal.batch.get_from_offset(
+ count=1,
+ offset="offset",
+ install_portal_id=0,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_get_from_offset(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.journal.batch.with_raw_response.get_from_offset(
+ count=1,
+ offset="offset",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ batch = await response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_get_from_offset(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.journal.batch.with_streaming_response.get_from_offset(
+ count=1,
+ offset="offset",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ batch = await response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_path_params_get_from_offset(self, async_client: AsyncHubSpot) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `offset` but received ''"):
+ await async_client.webhooks_journal.journal.batch.with_raw_response.get_from_offset(
+ count=1,
+ offset="",
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get_latest(self, async_client: AsyncHubSpot) -> None:
+ batch = await async_client.webhooks_journal.journal.batch.get_latest(
+ count=1,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get_latest_with_all_params(self, async_client: AsyncHubSpot) -> None:
+ batch = await async_client.webhooks_journal.journal.batch.get_latest(
+ count=1,
+ install_portal_id=0,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_get_latest(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.journal.batch.with_raw_response.get_latest(
+ count=1,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ batch = await response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_get_latest(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.journal.batch.with_streaming_response.get_latest(
+ count=1,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ batch = await response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/webhooks_journal/journal_local/__init__.py b/tests/api_resources/webhooks_journal/journal_local/__init__.py
new file mode 100644
index 00000000..fd8019a9
--- /dev/null
+++ b/tests/api_resources/webhooks_journal/journal_local/__init__.py
@@ -0,0 +1 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/webhooks_journal/journal_local/test_batch.py b/tests/api_resources/webhooks_journal/journal_local/test_batch.py
new file mode 100644
index 00000000..0f37c8f6
--- /dev/null
+++ b/tests/api_resources/webhooks_journal/journal_local/test_batch.py
@@ -0,0 +1,308 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from hubspot_sdk import HubSpot, AsyncHubSpot
+from tests.utils import assert_matches_type
+from hubspot_sdk.types.shared import BatchResponseJournalFetchResponse
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestBatch:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get(self, client: HubSpot) -> None:
+ batch = client.webhooks_journal.journal_local.batch.get(
+ inputs=["string"],
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get_with_all_params(self, client: HubSpot) -> None:
+ batch = client.webhooks_journal.journal_local.batch.get(
+ inputs=["string"],
+ install_portal_id=0,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_get(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.journal_local.batch.with_raw_response.get(
+ inputs=["string"],
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ batch = response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_get(self, client: HubSpot) -> None:
+ with client.webhooks_journal.journal_local.batch.with_streaming_response.get(
+ inputs=["string"],
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ batch = response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get_earliest(self, client: HubSpot) -> None:
+ batch = client.webhooks_journal.journal_local.batch.get_earliest(
+ count=1,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get_earliest_with_all_params(self, client: HubSpot) -> None:
+ batch = client.webhooks_journal.journal_local.batch.get_earliest(
+ count=1,
+ install_portal_id=0,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_get_earliest(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.journal_local.batch.with_raw_response.get_earliest(
+ count=1,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ batch = response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_get_earliest(self, client: HubSpot) -> None:
+ with client.webhooks_journal.journal_local.batch.with_streaming_response.get_earliest(
+ count=1,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ batch = response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get_from_offset(self, client: HubSpot) -> None:
+ batch = client.webhooks_journal.journal_local.batch.get_from_offset(
+ count=1,
+ offset="offset",
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get_from_offset_with_all_params(self, client: HubSpot) -> None:
+ batch = client.webhooks_journal.journal_local.batch.get_from_offset(
+ count=1,
+ offset="offset",
+ install_portal_id=0,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_get_from_offset(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.journal_local.batch.with_raw_response.get_from_offset(
+ count=1,
+ offset="offset",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ batch = response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_get_from_offset(self, client: HubSpot) -> None:
+ with client.webhooks_journal.journal_local.batch.with_streaming_response.get_from_offset(
+ count=1,
+ offset="offset",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ batch = response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_path_params_get_from_offset(self, client: HubSpot) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `offset` but received ''"):
+ client.webhooks_journal.journal_local.batch.with_raw_response.get_from_offset(
+ count=1,
+ offset="",
+ )
+
+
+class TestAsyncBatch:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get(self, async_client: AsyncHubSpot) -> None:
+ batch = await async_client.webhooks_journal.journal_local.batch.get(
+ inputs=["string"],
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get_with_all_params(self, async_client: AsyncHubSpot) -> None:
+ batch = await async_client.webhooks_journal.journal_local.batch.get(
+ inputs=["string"],
+ install_portal_id=0,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_get(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.journal_local.batch.with_raw_response.get(
+ inputs=["string"],
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ batch = await response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_get(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.journal_local.batch.with_streaming_response.get(
+ inputs=["string"],
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ batch = await response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get_earliest(self, async_client: AsyncHubSpot) -> None:
+ batch = await async_client.webhooks_journal.journal_local.batch.get_earliest(
+ count=1,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get_earliest_with_all_params(self, async_client: AsyncHubSpot) -> None:
+ batch = await async_client.webhooks_journal.journal_local.batch.get_earliest(
+ count=1,
+ install_portal_id=0,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_get_earliest(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.journal_local.batch.with_raw_response.get_earliest(
+ count=1,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ batch = await response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_get_earliest(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.journal_local.batch.with_streaming_response.get_earliest(
+ count=1,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ batch = await response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get_from_offset(self, async_client: AsyncHubSpot) -> None:
+ batch = await async_client.webhooks_journal.journal_local.batch.get_from_offset(
+ count=1,
+ offset="offset",
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get_from_offset_with_all_params(self, async_client: AsyncHubSpot) -> None:
+ batch = await async_client.webhooks_journal.journal_local.batch.get_from_offset(
+ count=1,
+ offset="offset",
+ install_portal_id=0,
+ )
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_get_from_offset(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.journal_local.batch.with_raw_response.get_from_offset(
+ count=1,
+ offset="offset",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ batch = await response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_get_from_offset(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.journal_local.batch.with_streaming_response.get_from_offset(
+ count=1,
+ offset="offset",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ batch = await response.parse()
+ assert_matches_type(BatchResponseJournalFetchResponse, batch, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_path_params_get_from_offset(self, async_client: AsyncHubSpot) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `offset` but received ''"):
+ await async_client.webhooks_journal.journal_local.batch.with_raw_response.get_from_offset(
+ count=1,
+ offset="",
+ )
diff --git a/tests/api_resources/webhooks_journal/subscriptions/__init__.py b/tests/api_resources/webhooks_journal/subscriptions/__init__.py
new file mode 100644
index 00000000..fd8019a9
--- /dev/null
+++ b/tests/api_resources/webhooks_journal/subscriptions/__init__.py
@@ -0,0 +1 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/webhooks_journal/subscriptions/test_filters.py b/tests/api_resources/webhooks_journal/subscriptions/test_filters.py
new file mode 100644
index 00000000..efe47c69
--- /dev/null
+++ b/tests/api_resources/webhooks_journal/subscriptions/test_filters.py
@@ -0,0 +1,351 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from hubspot_sdk import HubSpot, AsyncHubSpot
+from tests.utils import assert_matches_type
+from hubspot_sdk.types.shared import FilterResponse, FilterCreateResponse
+from hubspot_sdk.types.webhooks_journal.subscriptions import FilterListResponse
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestFilters:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_create(self, client: HubSpot) -> None:
+ filter = client.webhooks_journal.subscriptions.filters.create(
+ filter={
+ "conditions": [
+ {
+ "filter_type": "CRM_OBJECT_PROPERTY",
+ "operator": "CONTAINS",
+ "property": "property",
+ }
+ ]
+ },
+ subscription_id=0,
+ )
+ assert_matches_type(FilterCreateResponse, filter, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_create(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.subscriptions.filters.with_raw_response.create(
+ filter={
+ "conditions": [
+ {
+ "filter_type": "CRM_OBJECT_PROPERTY",
+ "operator": "CONTAINS",
+ "property": "property",
+ }
+ ]
+ },
+ subscription_id=0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ filter = response.parse()
+ assert_matches_type(FilterCreateResponse, filter, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_create(self, client: HubSpot) -> None:
+ with client.webhooks_journal.subscriptions.filters.with_streaming_response.create(
+ filter={
+ "conditions": [
+ {
+ "filter_type": "CRM_OBJECT_PROPERTY",
+ "operator": "CONTAINS",
+ "property": "property",
+ }
+ ]
+ },
+ subscription_id=0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ filter = response.parse()
+ assert_matches_type(FilterCreateResponse, filter, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_list(self, client: HubSpot) -> None:
+ filter = client.webhooks_journal.subscriptions.filters.list(
+ 0,
+ )
+ assert_matches_type(FilterListResponse, filter, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_list(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.subscriptions.filters.with_raw_response.list(
+ 0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ filter = response.parse()
+ assert_matches_type(FilterListResponse, filter, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_list(self, client: HubSpot) -> None:
+ with client.webhooks_journal.subscriptions.filters.with_streaming_response.list(
+ 0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ filter = response.parse()
+ assert_matches_type(FilterListResponse, filter, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_delete(self, client: HubSpot) -> None:
+ filter = client.webhooks_journal.subscriptions.filters.delete(
+ 0,
+ )
+ assert filter is None
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_delete(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.subscriptions.filters.with_raw_response.delete(
+ 0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ filter = response.parse()
+ assert filter is None
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_delete(self, client: HubSpot) -> None:
+ with client.webhooks_journal.subscriptions.filters.with_streaming_response.delete(
+ 0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ filter = response.parse()
+ assert filter is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get(self, client: HubSpot) -> None:
+ filter = client.webhooks_journal.subscriptions.filters.get(
+ 0,
+ )
+ assert_matches_type(FilterResponse, filter, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_get(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.subscriptions.filters.with_raw_response.get(
+ 0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ filter = response.parse()
+ assert_matches_type(FilterResponse, filter, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_get(self, client: HubSpot) -> None:
+ with client.webhooks_journal.subscriptions.filters.with_streaming_response.get(
+ 0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ filter = response.parse()
+ assert_matches_type(FilterResponse, filter, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+
+class TestAsyncFilters:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_create(self, async_client: AsyncHubSpot) -> None:
+ filter = await async_client.webhooks_journal.subscriptions.filters.create(
+ filter={
+ "conditions": [
+ {
+ "filter_type": "CRM_OBJECT_PROPERTY",
+ "operator": "CONTAINS",
+ "property": "property",
+ }
+ ]
+ },
+ subscription_id=0,
+ )
+ assert_matches_type(FilterCreateResponse, filter, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.subscriptions.filters.with_raw_response.create(
+ filter={
+ "conditions": [
+ {
+ "filter_type": "CRM_OBJECT_PROPERTY",
+ "operator": "CONTAINS",
+ "property": "property",
+ }
+ ]
+ },
+ subscription_id=0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ filter = await response.parse()
+ assert_matches_type(FilterCreateResponse, filter, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.subscriptions.filters.with_streaming_response.create(
+ filter={
+ "conditions": [
+ {
+ "filter_type": "CRM_OBJECT_PROPERTY",
+ "operator": "CONTAINS",
+ "property": "property",
+ }
+ ]
+ },
+ subscription_id=0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ filter = await response.parse()
+ assert_matches_type(FilterCreateResponse, filter, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_list(self, async_client: AsyncHubSpot) -> None:
+ filter = await async_client.webhooks_journal.subscriptions.filters.list(
+ 0,
+ )
+ assert_matches_type(FilterListResponse, filter, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_list(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.subscriptions.filters.with_raw_response.list(
+ 0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ filter = await response.parse()
+ assert_matches_type(FilterListResponse, filter, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_list(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.subscriptions.filters.with_streaming_response.list(
+ 0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ filter = await response.parse()
+ assert_matches_type(FilterListResponse, filter, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_delete(self, async_client: AsyncHubSpot) -> None:
+ filter = await async_client.webhooks_journal.subscriptions.filters.delete(
+ 0,
+ )
+ assert filter is None
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_delete(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.subscriptions.filters.with_raw_response.delete(
+ 0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ filter = await response.parse()
+ assert filter is None
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_delete(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.subscriptions.filters.with_streaming_response.delete(
+ 0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ filter = await response.parse()
+ assert filter is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get(self, async_client: AsyncHubSpot) -> None:
+ filter = await async_client.webhooks_journal.subscriptions.filters.get(
+ 0,
+ )
+ assert_matches_type(FilterResponse, filter, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_get(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.subscriptions.filters.with_raw_response.get(
+ 0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ filter = await response.parse()
+ assert_matches_type(FilterResponse, filter, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_get(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.subscriptions.filters.with_streaming_response.get(
+ 0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ filter = await response.parse()
+ assert_matches_type(FilterResponse, filter, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/webhooks_journal/test_journal.py b/tests/api_resources/webhooks_journal/test_journal.py
new file mode 100644
index 00000000..4216c3fc
--- /dev/null
+++ b/tests/api_resources/webhooks_journal/test_journal.py
@@ -0,0 +1,376 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import httpx
+import pytest
+from respx import MockRouter
+
+from hubspot_sdk import HubSpot, AsyncHubSpot
+from tests.utils import assert_matches_type
+from hubspot_sdk._response import (
+ BinaryAPIResponse,
+ AsyncBinaryAPIResponse,
+ StreamedBinaryAPIResponse,
+ AsyncStreamedBinaryAPIResponse,
+)
+from hubspot_sdk.types.shared import SnapshotStatusResponse
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestJournal:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_method_get_earliest(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/earliest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal = client.webhooks_journal.journal.get_earliest()
+ assert journal.is_closed
+ assert journal.json() == {"foo": "bar"}
+ assert cast(Any, journal.is_closed) is True
+ assert isinstance(journal, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_method_get_earliest_with_all_params(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/earliest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal = client.webhooks_journal.journal.get_earliest(
+ install_portal_id=0,
+ )
+ assert journal.is_closed
+ assert journal.json() == {"foo": "bar"}
+ assert cast(Any, journal.is_closed) is True
+ assert isinstance(journal, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_raw_response_get_earliest(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/earliest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+
+ journal = client.webhooks_journal.journal.with_raw_response.get_earliest()
+
+ assert journal.is_closed is True
+ assert journal.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert journal.json() == {"foo": "bar"}
+ assert isinstance(journal, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_streaming_response_get_earliest(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/earliest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ with client.webhooks_journal.journal.with_streaming_response.get_earliest() as journal:
+ assert not journal.is_closed
+ assert journal.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ assert journal.json() == {"foo": "bar"}
+ assert cast(Any, journal.is_closed) is True
+ assert isinstance(journal, StreamedBinaryAPIResponse)
+
+ assert cast(Any, journal.is_closed) is True
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_method_get_next_from_offset(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/offset/offset/next").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal = client.webhooks_journal.journal.get_next_from_offset(
+ offset="offset",
+ )
+ assert journal.is_closed
+ assert journal.json() == {"foo": "bar"}
+ assert cast(Any, journal.is_closed) is True
+ assert isinstance(journal, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_method_get_next_from_offset_with_all_params(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/offset/offset/next").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal = client.webhooks_journal.journal.get_next_from_offset(
+ offset="offset",
+ install_portal_id=0,
+ )
+ assert journal.is_closed
+ assert journal.json() == {"foo": "bar"}
+ assert cast(Any, journal.is_closed) is True
+ assert isinstance(journal, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_raw_response_get_next_from_offset(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/offset/offset/next").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+
+ journal = client.webhooks_journal.journal.with_raw_response.get_next_from_offset(
+ offset="offset",
+ )
+
+ assert journal.is_closed is True
+ assert journal.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert journal.json() == {"foo": "bar"}
+ assert isinstance(journal, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_streaming_response_get_next_from_offset(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/offset/offset/next").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ with client.webhooks_journal.journal.with_streaming_response.get_next_from_offset(
+ offset="offset",
+ ) as journal:
+ assert not journal.is_closed
+ assert journal.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ assert journal.json() == {"foo": "bar"}
+ assert cast(Any, journal.is_closed) is True
+ assert isinstance(journal, StreamedBinaryAPIResponse)
+
+ assert cast(Any, journal.is_closed) is True
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_path_params_get_next_from_offset(self, client: HubSpot) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `offset` but received ''"):
+ client.webhooks_journal.journal.with_raw_response.get_next_from_offset(
+ offset="",
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get_status(self, client: HubSpot) -> None:
+ journal = client.webhooks_journal.journal.get_status(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(SnapshotStatusResponse, journal, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_get_status(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.journal.with_raw_response.get_status(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ journal = response.parse()
+ assert_matches_type(SnapshotStatusResponse, journal, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_get_status(self, client: HubSpot) -> None:
+ with client.webhooks_journal.journal.with_streaming_response.get_status(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ journal = response.parse()
+ assert_matches_type(SnapshotStatusResponse, journal, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_path_params_get_status(self, client: HubSpot) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `status_id` but received ''"):
+ client.webhooks_journal.journal.with_raw_response.get_status(
+ "",
+ )
+
+
+class TestAsyncJournal:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_method_get_earliest(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/earliest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal = await async_client.webhooks_journal.journal.get_earliest()
+ assert journal.is_closed
+ assert await journal.json() == {"foo": "bar"}
+ assert cast(Any, journal.is_closed) is True
+ assert isinstance(journal, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_method_get_earliest_with_all_params(
+ self, async_client: AsyncHubSpot, respx_mock: MockRouter
+ ) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/earliest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal = await async_client.webhooks_journal.journal.get_earliest(
+ install_portal_id=0,
+ )
+ assert journal.is_closed
+ assert await journal.json() == {"foo": "bar"}
+ assert cast(Any, journal.is_closed) is True
+ assert isinstance(journal, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_raw_response_get_earliest(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/earliest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+
+ journal = await async_client.webhooks_journal.journal.with_raw_response.get_earliest()
+
+ assert journal.is_closed is True
+ assert journal.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert await journal.json() == {"foo": "bar"}
+ assert isinstance(journal, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_streaming_response_get_earliest(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/earliest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ async with async_client.webhooks_journal.journal.with_streaming_response.get_earliest() as journal:
+ assert not journal.is_closed
+ assert journal.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ assert await journal.json() == {"foo": "bar"}
+ assert cast(Any, journal.is_closed) is True
+ assert isinstance(journal, AsyncStreamedBinaryAPIResponse)
+
+ assert cast(Any, journal.is_closed) is True
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_method_get_next_from_offset(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/offset/offset/next").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal = await async_client.webhooks_journal.journal.get_next_from_offset(
+ offset="offset",
+ )
+ assert journal.is_closed
+ assert await journal.json() == {"foo": "bar"}
+ assert cast(Any, journal.is_closed) is True
+ assert isinstance(journal, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_method_get_next_from_offset_with_all_params(
+ self, async_client: AsyncHubSpot, respx_mock: MockRouter
+ ) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/offset/offset/next").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal = await async_client.webhooks_journal.journal.get_next_from_offset(
+ offset="offset",
+ install_portal_id=0,
+ )
+ assert journal.is_closed
+ assert await journal.json() == {"foo": "bar"}
+ assert cast(Any, journal.is_closed) is True
+ assert isinstance(journal, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_raw_response_get_next_from_offset(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/offset/offset/next").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+
+ journal = await async_client.webhooks_journal.journal.with_raw_response.get_next_from_offset(
+ offset="offset",
+ )
+
+ assert journal.is_closed is True
+ assert journal.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert await journal.json() == {"foo": "bar"}
+ assert isinstance(journal, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_streaming_response_get_next_from_offset(
+ self, async_client: AsyncHubSpot, respx_mock: MockRouter
+ ) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/offset/offset/next").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ async with async_client.webhooks_journal.journal.with_streaming_response.get_next_from_offset(
+ offset="offset",
+ ) as journal:
+ assert not journal.is_closed
+ assert journal.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ assert await journal.json() == {"foo": "bar"}
+ assert cast(Any, journal.is_closed) is True
+ assert isinstance(journal, AsyncStreamedBinaryAPIResponse)
+
+ assert cast(Any, journal.is_closed) is True
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_path_params_get_next_from_offset(self, async_client: AsyncHubSpot) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `offset` but received ''"):
+ await async_client.webhooks_journal.journal.with_raw_response.get_next_from_offset(
+ offset="",
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get_status(self, async_client: AsyncHubSpot) -> None:
+ journal = await async_client.webhooks_journal.journal.get_status(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(SnapshotStatusResponse, journal, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_get_status(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.journal.with_raw_response.get_status(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ journal = await response.parse()
+ assert_matches_type(SnapshotStatusResponse, journal, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_get_status(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.journal.with_streaming_response.get_status(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ journal = await response.parse()
+ assert_matches_type(SnapshotStatusResponse, journal, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_path_params_get_status(self, async_client: AsyncHubSpot) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `status_id` but received ''"):
+ await async_client.webhooks_journal.journal.with_raw_response.get_status(
+ "",
+ )
diff --git a/tests/api_resources/webhooks_journal/test_journal_local.py b/tests/api_resources/webhooks_journal/test_journal_local.py
new file mode 100644
index 00000000..36001b9c
--- /dev/null
+++ b/tests/api_resources/webhooks_journal/test_journal_local.py
@@ -0,0 +1,488 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import httpx
+import pytest
+from respx import MockRouter
+
+from hubspot_sdk import HubSpot, AsyncHubSpot
+from tests.utils import assert_matches_type
+from hubspot_sdk._response import (
+ BinaryAPIResponse,
+ AsyncBinaryAPIResponse,
+ StreamedBinaryAPIResponse,
+ AsyncStreamedBinaryAPIResponse,
+)
+from hubspot_sdk.types.shared import SnapshotStatusResponse
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestJournalLocal:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_method_get_earliest(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal-local/2026-03/earliest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal_local = client.webhooks_journal.journal_local.get_earliest()
+ assert journal_local.is_closed
+ assert journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_method_get_earliest_with_all_params(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal-local/2026-03/earliest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal_local = client.webhooks_journal.journal_local.get_earliest(
+ install_portal_id=0,
+ )
+ assert journal_local.is_closed
+ assert journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_raw_response_get_earliest(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal-local/2026-03/earliest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+
+ journal_local = client.webhooks_journal.journal_local.with_raw_response.get_earliest()
+
+ assert journal_local.is_closed is True
+ assert journal_local.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert journal_local.json() == {"foo": "bar"}
+ assert isinstance(journal_local, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_streaming_response_get_earliest(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal-local/2026-03/earliest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ with client.webhooks_journal.journal_local.with_streaming_response.get_earliest() as journal_local:
+ assert not journal_local.is_closed
+ assert journal_local.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ assert journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, StreamedBinaryAPIResponse)
+
+ assert cast(Any, journal_local.is_closed) is True
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_method_get_latest(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/latest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal_local = client.webhooks_journal.journal_local.get_latest()
+ assert journal_local.is_closed
+ assert journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_method_get_latest_with_all_params(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/latest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal_local = client.webhooks_journal.journal_local.get_latest(
+ install_portal_id=0,
+ )
+ assert journal_local.is_closed
+ assert journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_raw_response_get_latest(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/latest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+
+ journal_local = client.webhooks_journal.journal_local.with_raw_response.get_latest()
+
+ assert journal_local.is_closed is True
+ assert journal_local.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert journal_local.json() == {"foo": "bar"}
+ assert isinstance(journal_local, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_streaming_response_get_latest(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/latest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ with client.webhooks_journal.journal_local.with_streaming_response.get_latest() as journal_local:
+ assert not journal_local.is_closed
+ assert journal_local.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ assert journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, StreamedBinaryAPIResponse)
+
+ assert cast(Any, journal_local.is_closed) is True
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_method_get_next_from_offset(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal-local/2026-03/offset/offset/next").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal_local = client.webhooks_journal.journal_local.get_next_from_offset(
+ offset="offset",
+ )
+ assert journal_local.is_closed
+ assert journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_method_get_next_from_offset_with_all_params(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal-local/2026-03/offset/offset/next").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal_local = client.webhooks_journal.journal_local.get_next_from_offset(
+ offset="offset",
+ install_portal_id=0,
+ )
+ assert journal_local.is_closed
+ assert journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_raw_response_get_next_from_offset(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal-local/2026-03/offset/offset/next").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+
+ journal_local = client.webhooks_journal.journal_local.with_raw_response.get_next_from_offset(
+ offset="offset",
+ )
+
+ assert journal_local.is_closed is True
+ assert journal_local.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert journal_local.json() == {"foo": "bar"}
+ assert isinstance(journal_local, BinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_streaming_response_get_next_from_offset(self, client: HubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal-local/2026-03/offset/offset/next").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ with client.webhooks_journal.journal_local.with_streaming_response.get_next_from_offset(
+ offset="offset",
+ ) as journal_local:
+ assert not journal_local.is_closed
+ assert journal_local.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ assert journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, StreamedBinaryAPIResponse)
+
+ assert cast(Any, journal_local.is_closed) is True
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ def test_path_params_get_next_from_offset(self, client: HubSpot) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `offset` but received ''"):
+ client.webhooks_journal.journal_local.with_raw_response.get_next_from_offset(
+ offset="",
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get_status(self, client: HubSpot) -> None:
+ journal_local = client.webhooks_journal.journal_local.get_status(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(SnapshotStatusResponse, journal_local, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_get_status(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.journal_local.with_raw_response.get_status(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ journal_local = response.parse()
+ assert_matches_type(SnapshotStatusResponse, journal_local, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_get_status(self, client: HubSpot) -> None:
+ with client.webhooks_journal.journal_local.with_streaming_response.get_status(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ journal_local = response.parse()
+ assert_matches_type(SnapshotStatusResponse, journal_local, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_path_params_get_status(self, client: HubSpot) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `status_id` but received ''"):
+ client.webhooks_journal.journal_local.with_raw_response.get_status(
+ "",
+ )
+
+
+class TestAsyncJournalLocal:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_method_get_earliest(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal-local/2026-03/earliest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal_local = await async_client.webhooks_journal.journal_local.get_earliest()
+ assert journal_local.is_closed
+ assert await journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_method_get_earliest_with_all_params(
+ self, async_client: AsyncHubSpot, respx_mock: MockRouter
+ ) -> None:
+ respx_mock.get("/webhooks-journal/journal-local/2026-03/earliest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal_local = await async_client.webhooks_journal.journal_local.get_earliest(
+ install_portal_id=0,
+ )
+ assert journal_local.is_closed
+ assert await journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_raw_response_get_earliest(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal-local/2026-03/earliest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+
+ journal_local = await async_client.webhooks_journal.journal_local.with_raw_response.get_earliest()
+
+ assert journal_local.is_closed is True
+ assert journal_local.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert await journal_local.json() == {"foo": "bar"}
+ assert isinstance(journal_local, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_streaming_response_get_earliest(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal-local/2026-03/earliest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ async with async_client.webhooks_journal.journal_local.with_streaming_response.get_earliest() as journal_local:
+ assert not journal_local.is_closed
+ assert journal_local.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ assert await journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, AsyncStreamedBinaryAPIResponse)
+
+ assert cast(Any, journal_local.is_closed) is True
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_method_get_latest(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/latest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal_local = await async_client.webhooks_journal.journal_local.get_latest()
+ assert journal_local.is_closed
+ assert await journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_method_get_latest_with_all_params(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/latest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal_local = await async_client.webhooks_journal.journal_local.get_latest(
+ install_portal_id=0,
+ )
+ assert journal_local.is_closed
+ assert await journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_raw_response_get_latest(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/latest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+
+ journal_local = await async_client.webhooks_journal.journal_local.with_raw_response.get_latest()
+
+ assert journal_local.is_closed is True
+ assert journal_local.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert await journal_local.json() == {"foo": "bar"}
+ assert isinstance(journal_local, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_streaming_response_get_latest(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal/2026-03/latest").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ async with async_client.webhooks_journal.journal_local.with_streaming_response.get_latest() as journal_local:
+ assert not journal_local.is_closed
+ assert journal_local.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ assert await journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, AsyncStreamedBinaryAPIResponse)
+
+ assert cast(Any, journal_local.is_closed) is True
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_method_get_next_from_offset(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal-local/2026-03/offset/offset/next").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal_local = await async_client.webhooks_journal.journal_local.get_next_from_offset(
+ offset="offset",
+ )
+ assert journal_local.is_closed
+ assert await journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_method_get_next_from_offset_with_all_params(
+ self, async_client: AsyncHubSpot, respx_mock: MockRouter
+ ) -> None:
+ respx_mock.get("/webhooks-journal/journal-local/2026-03/offset/offset/next").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ journal_local = await async_client.webhooks_journal.journal_local.get_next_from_offset(
+ offset="offset",
+ install_portal_id=0,
+ )
+ assert journal_local.is_closed
+ assert await journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_raw_response_get_next_from_offset(self, async_client: AsyncHubSpot, respx_mock: MockRouter) -> None:
+ respx_mock.get("/webhooks-journal/journal-local/2026-03/offset/offset/next").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+
+ journal_local = await async_client.webhooks_journal.journal_local.with_raw_response.get_next_from_offset(
+ offset="offset",
+ )
+
+ assert journal_local.is_closed is True
+ assert journal_local.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert await journal_local.json() == {"foo": "bar"}
+ assert isinstance(journal_local, AsyncBinaryAPIResponse)
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_streaming_response_get_next_from_offset(
+ self, async_client: AsyncHubSpot, respx_mock: MockRouter
+ ) -> None:
+ respx_mock.get("/webhooks-journal/journal-local/2026-03/offset/offset/next").mock(
+ return_value=httpx.Response(200, json={"foo": "bar"})
+ )
+ async with async_client.webhooks_journal.journal_local.with_streaming_response.get_next_from_offset(
+ offset="offset",
+ ) as journal_local:
+ assert not journal_local.is_closed
+ assert journal_local.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ assert await journal_local.json() == {"foo": "bar"}
+ assert cast(Any, journal_local.is_closed) is True
+ assert isinstance(journal_local, AsyncStreamedBinaryAPIResponse)
+
+ assert cast(Any, journal_local.is_closed) is True
+
+ @parametrize
+ @pytest.mark.respx(base_url=base_url)
+ async def test_path_params_get_next_from_offset(self, async_client: AsyncHubSpot) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `offset` but received ''"):
+ await async_client.webhooks_journal.journal_local.with_raw_response.get_next_from_offset(
+ offset="",
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get_status(self, async_client: AsyncHubSpot) -> None:
+ journal_local = await async_client.webhooks_journal.journal_local.get_status(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(SnapshotStatusResponse, journal_local, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_get_status(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.journal_local.with_raw_response.get_status(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ journal_local = await response.parse()
+ assert_matches_type(SnapshotStatusResponse, journal_local, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_get_status(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.journal_local.with_streaming_response.get_status(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ journal_local = await response.parse()
+ assert_matches_type(SnapshotStatusResponse, journal_local, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_path_params_get_status(self, async_client: AsyncHubSpot) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `status_id` but received ''"):
+ await async_client.webhooks_journal.journal_local.with_raw_response.get_status(
+ "",
+ )
diff --git a/tests/api_resources/webhooks_journal/test_snapshots.py b/tests/api_resources/webhooks_journal/test_snapshots.py
new file mode 100644
index 00000000..4ed72f2f
--- /dev/null
+++ b/tests/api_resources/webhooks_journal/test_snapshots.py
@@ -0,0 +1,134 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from hubspot_sdk import HubSpot, AsyncHubSpot
+from tests.utils import assert_matches_type
+from hubspot_sdk.types.shared import CrmObjectSnapshotBatchResponse
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestSnapshots:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_create(self, client: HubSpot) -> None:
+ snapshot = client.webhooks_journal.snapshots.create(
+ snapshot_requests=[
+ {
+ "object_id": 0,
+ "object_type_id": "objectTypeId",
+ "portal_id": 0,
+ "properties": ["string"],
+ }
+ ],
+ )
+ assert_matches_type(CrmObjectSnapshotBatchResponse, snapshot, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_create(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.snapshots.with_raw_response.create(
+ snapshot_requests=[
+ {
+ "object_id": 0,
+ "object_type_id": "objectTypeId",
+ "portal_id": 0,
+ "properties": ["string"],
+ }
+ ],
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ snapshot = response.parse()
+ assert_matches_type(CrmObjectSnapshotBatchResponse, snapshot, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_create(self, client: HubSpot) -> None:
+ with client.webhooks_journal.snapshots.with_streaming_response.create(
+ snapshot_requests=[
+ {
+ "object_id": 0,
+ "object_type_id": "objectTypeId",
+ "portal_id": 0,
+ "properties": ["string"],
+ }
+ ],
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ snapshot = response.parse()
+ assert_matches_type(CrmObjectSnapshotBatchResponse, snapshot, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+
+class TestAsyncSnapshots:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_create(self, async_client: AsyncHubSpot) -> None:
+ snapshot = await async_client.webhooks_journal.snapshots.create(
+ snapshot_requests=[
+ {
+ "object_id": 0,
+ "object_type_id": "objectTypeId",
+ "portal_id": 0,
+ "properties": ["string"],
+ }
+ ],
+ )
+ assert_matches_type(CrmObjectSnapshotBatchResponse, snapshot, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.snapshots.with_raw_response.create(
+ snapshot_requests=[
+ {
+ "object_id": 0,
+ "object_type_id": "objectTypeId",
+ "portal_id": 0,
+ "properties": ["string"],
+ }
+ ],
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ snapshot = await response.parse()
+ assert_matches_type(CrmObjectSnapshotBatchResponse, snapshot, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.snapshots.with_streaming_response.create(
+ snapshot_requests=[
+ {
+ "object_id": 0,
+ "object_type_id": "objectTypeId",
+ "portal_id": 0,
+ "properties": ["string"],
+ }
+ ],
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ snapshot = await response.parse()
+ assert_matches_type(CrmObjectSnapshotBatchResponse, snapshot, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/webhooks_journal/test_subscriptions.py b/tests/api_resources/webhooks_journal/test_subscriptions.py
new file mode 100644
index 00000000..5360beed
--- /dev/null
+++ b/tests/api_resources/webhooks_journal/test_subscriptions.py
@@ -0,0 +1,741 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from hubspot_sdk import HubSpot, AsyncHubSpot
+from tests.utils import assert_matches_type
+from hubspot_sdk.types.webhooks_journal import (
+ SubscriptionResponse,
+ CollectionResponseSubscriptionResponseNoPaging,
+)
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestSubscriptions:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_create_overload_1(self, client: HubSpot) -> None:
+ subscription = client.webhooks_journal.subscriptions.create(
+ actions=["CREATE"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ properties=["string"],
+ subscription_type="OBJECT",
+ )
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_create_overload_1(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.subscriptions.with_raw_response.create(
+ actions=["CREATE"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ properties=["string"],
+ subscription_type="OBJECT",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_create_overload_1(self, client: HubSpot) -> None:
+ with client.webhooks_journal.subscriptions.with_streaming_response.create(
+ actions=["CREATE"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ properties=["string"],
+ subscription_type="OBJECT",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_create_overload_2(self, client: HubSpot) -> None:
+ subscription = client.webhooks_journal.subscriptions.create(
+ actions=["CREATE"],
+ associated_object_type_ids=["string"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="ASSOCIATION",
+ )
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_create_overload_2(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.subscriptions.with_raw_response.create(
+ actions=["CREATE"],
+ associated_object_type_ids=["string"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="ASSOCIATION",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_create_overload_2(self, client: HubSpot) -> None:
+ with client.webhooks_journal.subscriptions.with_streaming_response.create(
+ actions=["CREATE"],
+ associated_object_type_ids=["string"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="ASSOCIATION",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_create_overload_3(self, client: HubSpot) -> None:
+ subscription = client.webhooks_journal.subscriptions.create(
+ event_type_id="eventTypeId",
+ properties=["string"],
+ subscription_type="APP_LIFECYCLE_EVENT",
+ )
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_create_overload_3(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.subscriptions.with_raw_response.create(
+ event_type_id="eventTypeId",
+ properties=["string"],
+ subscription_type="APP_LIFECYCLE_EVENT",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_create_overload_3(self, client: HubSpot) -> None:
+ with client.webhooks_journal.subscriptions.with_streaming_response.create(
+ event_type_id="eventTypeId",
+ properties=["string"],
+ subscription_type="APP_LIFECYCLE_EVENT",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_create_overload_4(self, client: HubSpot) -> None:
+ subscription = client.webhooks_journal.subscriptions.create(
+ actions=["CREATE"],
+ list_ids=[0],
+ object_ids=[0],
+ portal_id=0,
+ subscription_type="LIST_MEMBERSHIP",
+ )
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_create_overload_4(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.subscriptions.with_raw_response.create(
+ actions=["CREATE"],
+ list_ids=[0],
+ object_ids=[0],
+ portal_id=0,
+ subscription_type="LIST_MEMBERSHIP",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_create_overload_4(self, client: HubSpot) -> None:
+ with client.webhooks_journal.subscriptions.with_streaming_response.create(
+ actions=["CREATE"],
+ list_ids=[0],
+ object_ids=[0],
+ portal_id=0,
+ subscription_type="LIST_MEMBERSHIP",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_create_overload_5(self, client: HubSpot) -> None:
+ subscription = client.webhooks_journal.subscriptions.create(
+ actions=["CREATE"],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="GDPR_PRIVACY_DELETION",
+ )
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_create_overload_5(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.subscriptions.with_raw_response.create(
+ actions=["CREATE"],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="GDPR_PRIVACY_DELETION",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_create_overload_5(self, client: HubSpot) -> None:
+ with client.webhooks_journal.subscriptions.with_streaming_response.create(
+ actions=["CREATE"],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="GDPR_PRIVACY_DELETION",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_list(self, client: HubSpot) -> None:
+ subscription = client.webhooks_journal.subscriptions.list()
+ assert_matches_type(CollectionResponseSubscriptionResponseNoPaging, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_list(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.subscriptions.with_raw_response.list()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = response.parse()
+ assert_matches_type(CollectionResponseSubscriptionResponseNoPaging, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_list(self, client: HubSpot) -> None:
+ with client.webhooks_journal.subscriptions.with_streaming_response.list() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = response.parse()
+ assert_matches_type(CollectionResponseSubscriptionResponseNoPaging, subscription, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_delete(self, client: HubSpot) -> None:
+ subscription = client.webhooks_journal.subscriptions.delete(
+ 0,
+ )
+ assert subscription is None
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_delete(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.subscriptions.with_raw_response.delete(
+ 0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = response.parse()
+ assert subscription is None
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_delete(self, client: HubSpot) -> None:
+ with client.webhooks_journal.subscriptions.with_streaming_response.delete(
+ 0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = response.parse()
+ assert subscription is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_delete_for_portal(self, client: HubSpot) -> None:
+ subscription = client.webhooks_journal.subscriptions.delete_for_portal(
+ 0,
+ )
+ assert subscription is None
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_delete_for_portal(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.subscriptions.with_raw_response.delete_for_portal(
+ 0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = response.parse()
+ assert subscription is None
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_delete_for_portal(self, client: HubSpot) -> None:
+ with client.webhooks_journal.subscriptions.with_streaming_response.delete_for_portal(
+ 0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = response.parse()
+ assert subscription is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_get(self, client: HubSpot) -> None:
+ subscription = client.webhooks_journal.subscriptions.get(
+ 0,
+ )
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_get(self, client: HubSpot) -> None:
+ response = client.webhooks_journal.subscriptions.with_raw_response.get(
+ 0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_get(self, client: HubSpot) -> None:
+ with client.webhooks_journal.subscriptions.with_streaming_response.get(
+ 0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+
+class TestAsyncSubscriptions:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_create_overload_1(self, async_client: AsyncHubSpot) -> None:
+ subscription = await async_client.webhooks_journal.subscriptions.create(
+ actions=["CREATE"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ properties=["string"],
+ subscription_type="OBJECT",
+ )
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_create_overload_1(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.subscriptions.with_raw_response.create(
+ actions=["CREATE"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ properties=["string"],
+ subscription_type="OBJECT",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = await response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_create_overload_1(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.subscriptions.with_streaming_response.create(
+ actions=["CREATE"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ properties=["string"],
+ subscription_type="OBJECT",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = await response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_create_overload_2(self, async_client: AsyncHubSpot) -> None:
+ subscription = await async_client.webhooks_journal.subscriptions.create(
+ actions=["CREATE"],
+ associated_object_type_ids=["string"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="ASSOCIATION",
+ )
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_create_overload_2(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.subscriptions.with_raw_response.create(
+ actions=["CREATE"],
+ associated_object_type_ids=["string"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="ASSOCIATION",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = await response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_create_overload_2(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.subscriptions.with_streaming_response.create(
+ actions=["CREATE"],
+ associated_object_type_ids=["string"],
+ object_ids=[0],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="ASSOCIATION",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = await response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_create_overload_3(self, async_client: AsyncHubSpot) -> None:
+ subscription = await async_client.webhooks_journal.subscriptions.create(
+ event_type_id="eventTypeId",
+ properties=["string"],
+ subscription_type="APP_LIFECYCLE_EVENT",
+ )
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_create_overload_3(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.subscriptions.with_raw_response.create(
+ event_type_id="eventTypeId",
+ properties=["string"],
+ subscription_type="APP_LIFECYCLE_EVENT",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = await response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_create_overload_3(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.subscriptions.with_streaming_response.create(
+ event_type_id="eventTypeId",
+ properties=["string"],
+ subscription_type="APP_LIFECYCLE_EVENT",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = await response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_create_overload_4(self, async_client: AsyncHubSpot) -> None:
+ subscription = await async_client.webhooks_journal.subscriptions.create(
+ actions=["CREATE"],
+ list_ids=[0],
+ object_ids=[0],
+ portal_id=0,
+ subscription_type="LIST_MEMBERSHIP",
+ )
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_create_overload_4(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.subscriptions.with_raw_response.create(
+ actions=["CREATE"],
+ list_ids=[0],
+ object_ids=[0],
+ portal_id=0,
+ subscription_type="LIST_MEMBERSHIP",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = await response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_create_overload_4(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.subscriptions.with_streaming_response.create(
+ actions=["CREATE"],
+ list_ids=[0],
+ object_ids=[0],
+ portal_id=0,
+ subscription_type="LIST_MEMBERSHIP",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = await response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_create_overload_5(self, async_client: AsyncHubSpot) -> None:
+ subscription = await async_client.webhooks_journal.subscriptions.create(
+ actions=["CREATE"],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="GDPR_PRIVACY_DELETION",
+ )
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_create_overload_5(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.subscriptions.with_raw_response.create(
+ actions=["CREATE"],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="GDPR_PRIVACY_DELETION",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = await response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_create_overload_5(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.subscriptions.with_streaming_response.create(
+ actions=["CREATE"],
+ object_type_id="objectTypeId",
+ portal_id=0,
+ subscription_type="GDPR_PRIVACY_DELETION",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = await response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_list(self, async_client: AsyncHubSpot) -> None:
+ subscription = await async_client.webhooks_journal.subscriptions.list()
+ assert_matches_type(CollectionResponseSubscriptionResponseNoPaging, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_list(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.subscriptions.with_raw_response.list()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = await response.parse()
+ assert_matches_type(CollectionResponseSubscriptionResponseNoPaging, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_list(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.subscriptions.with_streaming_response.list() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = await response.parse()
+ assert_matches_type(CollectionResponseSubscriptionResponseNoPaging, subscription, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_delete(self, async_client: AsyncHubSpot) -> None:
+ subscription = await async_client.webhooks_journal.subscriptions.delete(
+ 0,
+ )
+ assert subscription is None
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_delete(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.subscriptions.with_raw_response.delete(
+ 0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = await response.parse()
+ assert subscription is None
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_delete(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.subscriptions.with_streaming_response.delete(
+ 0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = await response.parse()
+ assert subscription is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_delete_for_portal(self, async_client: AsyncHubSpot) -> None:
+ subscription = await async_client.webhooks_journal.subscriptions.delete_for_portal(
+ 0,
+ )
+ assert subscription is None
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_delete_for_portal(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.subscriptions.with_raw_response.delete_for_portal(
+ 0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = await response.parse()
+ assert subscription is None
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_delete_for_portal(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.subscriptions.with_streaming_response.delete_for_portal(
+ 0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = await response.parse()
+ assert subscription is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_get(self, async_client: AsyncHubSpot) -> None:
+ subscription = await async_client.webhooks_journal.subscriptions.get(
+ 0,
+ )
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_get(self, async_client: AsyncHubSpot) -> None:
+ response = await async_client.webhooks_journal.subscriptions.with_raw_response.get(
+ 0,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ subscription = await response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_get(self, async_client: AsyncHubSpot) -> None:
+ async with async_client.webhooks_journal.subscriptions.with_streaming_response.get(
+ 0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ subscription = await response.parse()
+ assert_matches_type(SubscriptionResponse, subscription, path=["response"])
+
+ assert cast(Any, response.is_closed) is True