diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 078b9e2..9127b1b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.8.0" + ".": "3.9.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index f2af74d..d6c218a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 24 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openregister/openregister-747e4d0416e248c5a1ad22fe34847a234427a1228bde5192ca1cb9dd879ebdc0.yml -openapi_spec_hash: 3774f4295f698f445c3ece73583f3604 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openregister/openregister-4bd4cc957806a1fc7250db66762de302ee6718d21ebe7159b8753af53acc68df.yml +openapi_spec_hash: 2ada6c644f88094e8e542e539643f724 config_hash: 42520b3d15dbe4a67577eb9c86e4ed01 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c7caa7..693b811 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.9.0 (2026-07-27) + +Full Changelog: [v3.8.0...v3.9.0](https://github.com/oregister/openregister-python/compare/v3.8.0...v3.9.0) + +### Features + +* **api:** daily monitor updates for companies ([76d79be](https://github.com/oregister/openregister-python/commit/76d79becc9c2d3335431eb92833c96648e6df667)) + ## 3.8.0 (2026-07-23) Full Changelog: [v3.7.0...v3.8.0](https://github.com/oregister/openregister-python/compare/v3.7.0...v3.8.0) diff --git a/pyproject.toml b/pyproject.toml index 4da2f23..5d2e8a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openregister-sdk" -version = "3.8.0" +version = "3.9.0" description = "The official Python library for the openregister API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/openregister/_version.py b/src/openregister/_version.py index 1bd21c2..e386e0a 100644 --- a/src/openregister/_version.py +++ b/src/openregister/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "openregister" -__version__ = "3.8.0" # x-release-please-version +__version__ = "3.9.0" # x-release-please-version diff --git a/src/openregister/resources/monitor.py b/src/openregister/resources/monitor.py index 9110948..e5ab055 100644 --- a/src/openregister/resources/monitor.py +++ b/src/openregister/resources/monitor.py @@ -8,7 +8,7 @@ import httpx from ..types import monitor_create_params -from .._types import Body, Query, Headers, NoneType, NotGiven, not_given +from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -62,6 +62,7 @@ def create( "insolvencies", ] ], + update_frequency: Literal["daily", "weekly"] | 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, @@ -82,6 +83,15 @@ def create( values when `entity_type` is `company`, and `WebhookMonitorPersonPreference` values when `entity_type` is `person`. + update_frequency: How often the monitored company is checked for register updates. Defaults to + `weekly` if not provided. + + Only supported when `entity_type` is `company`. Requests for `person` monitors + that include this field are rejected with a validation error. + + Daily monitors are billed at a premium: 50 credits at creation and 50 credits + per month while active, instead of the standard 25. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -97,6 +107,7 @@ def create( "entity_id": entity_id, "entity_type": entity_type, "preferences": preferences, + "update_frequency": update_frequency, }, monitor_create_params.MonitorCreateParams, ), @@ -197,6 +208,7 @@ async def create( "insolvencies", ] ], + update_frequency: Literal["daily", "weekly"] | 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, @@ -217,6 +229,15 @@ async def create( values when `entity_type` is `company`, and `WebhookMonitorPersonPreference` values when `entity_type` is `person`. + update_frequency: How often the monitored company is checked for register updates. Defaults to + `weekly` if not provided. + + Only supported when `entity_type` is `company`. Requests for `person` monitors + that include this field are rejected with a validation error. + + Daily monitors are billed at a premium: 50 credits at creation and 50 credits + per month while active, instead of the standard 25. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -232,6 +253,7 @@ async def create( "entity_id": entity_id, "entity_type": entity_type, "preferences": preferences, + "update_frequency": update_frequency, }, monitor_create_params.MonitorCreateParams, ), diff --git a/src/openregister/types/monitor_create_params.py b/src/openregister/types/monitor_create_params.py index 24aa8f5..102f9a0 100644 --- a/src/openregister/types/monitor_create_params.py +++ b/src/openregister/types/monitor_create_params.py @@ -37,3 +37,15 @@ class MonitorCreateParams(TypedDict, total=False): values when `entity_type` is `company`, and `WebhookMonitorPersonPreference` values when `entity_type` is `person`. """ + + update_frequency: Literal["daily", "weekly"] + """ + How often the monitored company is checked for register updates. Defaults to + `weekly` if not provided. + + Only supported when `entity_type` is `company`. Requests for `person` monitors + that include this field are rejected with a validation error. + + Daily monitors are billed at a premium: 50 credits at creation and 50 credits + per month while active, instead of the standard 25. + """ diff --git a/src/openregister/types/monitor_create_response.py b/src/openregister/types/monitor_create_response.py index 62d24fe..74fb7bd 100644 --- a/src/openregister/types/monitor_create_response.py +++ b/src/openregister/types/monitor_create_response.py @@ -38,3 +38,9 @@ class MonitorCreateResponse(BaseModel): values when `entity_type` is `company`, and `WebhookMonitorPersonPreference` values when `entity_type` is `person`. """ + + update_frequency: Literal["daily", "weekly"] + """ + How often the monitored company is checked for register updates. Always `weekly` + for `person` monitors. + """ diff --git a/src/openregister/types/monitor_list_response.py b/src/openregister/types/monitor_list_response.py index 593ace2..6a39ed8 100644 --- a/src/openregister/types/monitor_list_response.py +++ b/src/openregister/types/monitor_list_response.py @@ -39,6 +39,12 @@ class Item(BaseModel): values when `entity_type` is `person`. """ + update_frequency: Literal["daily", "weekly"] + """ + How often the monitored company is checked for register updates. Always `weekly` + for `person` monitors. + """ + class MonitorListResponse(BaseModel): items: List[Item] diff --git a/tests/api_resources/test_monitor.py b/tests/api_resources/test_monitor.py index 8a4720e..4c79220 100644 --- a/tests/api_resources/test_monitor.py +++ b/tests/api_resources/test_monitor.py @@ -27,6 +27,17 @@ def test_method_create(self, client: Openregister) -> None: ) assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_create_with_all_params(self, client: Openregister) -> None: + monitor = client.monitor.create( + entity_id="entity_id", + entity_type="company", + preferences=["basic"], + update_frequency="daily", + ) + assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_raw_response_create(self, client: Openregister) -> None: @@ -143,6 +154,17 @@ async def test_method_create(self, async_client: AsyncOpenregister) -> None: ) assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncOpenregister) -> None: + monitor = await async_client.monitor.create( + entity_id="entity_id", + entity_type="company", + preferences=["basic"], + update_frequency="daily", + ) + assert_matches_type(MonitorCreateResponse, monitor, path=["response"]) + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_raw_response_create(self, async_client: AsyncOpenregister) -> None: