Skip to content

feat!: rename monitors property to event_monitors on client - #39

Merged
Kizy625 merged 3 commits into
mainfrom
fern-bot/2026-09-30_10-10-06_544
Sep 30, 2026
Merged

Kizy625 merged 3 commits into
mainfrom
fern-bot/2026-09-30_10-10-06_544

Conversation

@fern-api

@fern-api fern-api Bot commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

⚠️ 3.1.1 → 4.0.0

Breaking: MAJOR because MonitorsClient, AsyncMonitorsClient, RawMonitorsClient, and AsyncRawMonitorsClient were renamed to their EventMonitors* equivalents and the client.monitors accessor was renamed to client.event_monitors, breaking all existing callers that import or reference these symbols by their old names.

Breaking Changes

  • MonitorsClient / AsyncMonitorsClient — renamed to EventMonitorsClient / AsyncEventMonitorsClient; update all imports and type annotations accordingly.
  • RawMonitorsClient / AsyncRawMonitorsClient — renamed to RawEventMonitorsClient / AsyncRawEventMonitorsClient; update any direct references to these raw client classes.
  • client.monitors — accessor renamed to client.event_monitors; replace all client.monitors.* call sites with client.event_monitors.*.
  • newscatcher_catchall.monitors module — renamed to newscatcher_catchall.event_monitors; update all imports from from newscatcher_catchall.monitors import … to from newscatcher_catchall.event_monitors import ….

Added

  • EventMonitorsClient.update_monitor() schedule and timezone parameters — new optional parameters (sync and async) allow replacing an event monitor's schedule and IANA timezone in a single call; omit to leave the current schedule unchanged.
  • JobsClient.list_source_groups() / AsyncJobsClient.list_source_groups() — new paginated method returning all ListSourceGroupsResponseDto source groups visible to your organization.
  • JobsClient.submit() source_groups parameter — new optional list[str] parameter (sync and async) that scopes article fetching to up to 20 curated domain allowlists by slug.
  • EventTags, ListSourceGroupsResponseDto, SourceGroupRef — three new types added to the top-level newscatcher_catchall namespace.
  • project_id filter parameter — new optional project_id: str added to EntitiesClient.list_entities() and WebhooksClient.list_webhooks() (sync and async) to scope results to a specific project.

Changed

  • UnauthorizedError (HTTP 401) handling — all event-monitor, job, entity, project, webhook, dataset, and meta endpoints now raise UnauthorizedError on 401 instead of falling through to a generic ApiError.
  • HttpClient request body handling — requests with no body fields supplied now omit the body and strip the Content-Type header entirely instead of sending an empty JSON object.
  • pydantic_utilities alias coercion — field-alias rewriting is now cached per model class via a WeakKeyDictionary, reducing introspection overhead on hot deserialization paths.
  • BaseHttpResponse.response property — exposes the underlying httpx.Response object directly from any HttpResponse or AsyncHttpResponse instance.

See full changelog

fern-api Bot added 3 commits September 30, 2026 10:10
Generated by Fern
CLI Version: unknown
Generators:
  - fernapi/fern-python-sdk: 5.34.1
…rs` on client

The `monitors` property on both `CatchAllApi` and `AsyncCatchAllApi` has
been renamed to `event_monitors`, backed by the new `EventMonitorsClient`
and `AsyncEventMonitorsClient` from the `event_monitors` subpackage. The
old `monitors` module and `MonitorsClient` / `AsyncMonitorsClient` classes
are removed entirely.

Additionally, the HTTP client internals gain two improvements: an
`optional_body` flag that suppresses the request body (and its
`Content-Type` header) when all body fields are omitted, and a refactored
`_coerce_keys_to_aliases` helper in `pydantic_utilities.py` that is now
shared between Pydantic v1 and v2 code paths via a per-class WeakKeyDictionary
cache.

Key changes:
- `CatchAllApi.monitors` and `AsyncCatchAllApi.monitors` renamed to `event_monitors`; backed by `EventMonitorsClient` / `AsyncEventMonitorsClient`
- `monitors` subpackage and `MonitorsClient` / `AsyncMonitorsClient` removed
- `get_request_body()` and all `HttpClient` send methods accept `optional_body: bool` to omit body + `Content-Type` when no fields are supplied
- New `drop_content_type_without_body()` helper strips `Content-Type` from bodyless optional-body requests
- `_coerce_keys_to_aliases()` extracted as a shared, cached utility for both Pydantic v1 and v2 alias coercion

🌿 Generated with Fern
Patches absorbed by generator (3):
  - patch-c286a78c: Update pyproject.toml
  - patch-c37db871: Update client_wrapper.py
  - patch-9ae23836: Update client_wrapper.py
    The generator now produces these customizations natively.
@Kizy625
Kizy625 merged commit f1a350c into main Sep 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant