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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.8.0"
".": "3.9.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "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"
Expand Down
2 changes: 1 addition & 1 deletion src/openregister/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "openregister"
__version__ = "3.8.0" # x-release-please-version
__version__ = "3.9.0" # x-release-please-version
24 changes: 23 additions & 1 deletion src/openregister/resources/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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
Expand All @@ -97,6 +107,7 @@ def create(
"entity_id": entity_id,
"entity_type": entity_type,
"preferences": preferences,
"update_frequency": update_frequency,
},
monitor_create_params.MonitorCreateParams,
),
Expand Down Expand Up @@ -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,
Expand All @@ -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
Expand All @@ -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,
),
Expand Down
12 changes: 12 additions & 0 deletions src/openregister/types/monitor_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
6 changes: 6 additions & 0 deletions src/openregister/types/monitor_create_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
6 changes: 6 additions & 0 deletions src/openregister/types/monitor_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
22 changes: 22 additions & 0 deletions tests/api_resources/test_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down