Repository navigation
feat!: rename monitors property to event_monitors on client - #39
Merged
Merged
Conversation
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
approved these changes
Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking: MAJOR because
MonitorsClient,AsyncMonitorsClient,RawMonitorsClient, andAsyncRawMonitorsClientwere renamed to theirEventMonitors*equivalents and theclient.monitorsaccessor was renamed toclient.event_monitors, breaking all existing callers that import or reference these symbols by their old names.Breaking Changes
MonitorsClient/AsyncMonitorsClient— renamed toEventMonitorsClient/AsyncEventMonitorsClient; update all imports and type annotations accordingly.RawMonitorsClient/AsyncRawMonitorsClient— renamed toRawEventMonitorsClient/AsyncRawEventMonitorsClient; update any direct references to these raw client classes.client.monitors— accessor renamed toclient.event_monitors; replace allclient.monitors.*call sites withclient.event_monitors.*.newscatcher_catchall.monitorsmodule — renamed tonewscatcher_catchall.event_monitors; update all imports fromfrom newscatcher_catchall.monitors import …tofrom newscatcher_catchall.event_monitors import ….Added
EventMonitorsClient.update_monitor()scheduleandtimezoneparameters — 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 allListSourceGroupsResponseDtosource groups visible to your organization.JobsClient.submit()source_groupsparameter — new optionallist[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-levelnewscatcher_catchallnamespace.project_idfilter parameter — new optionalproject_id: stradded toEntitiesClient.list_entities()andWebhooksClient.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 raiseUnauthorizedErroron 401 instead of falling through to a genericApiError.HttpClientrequest body handling — requests with no body fields supplied now omit the body and strip theContent-Typeheader entirely instead of sending an empty JSON object.pydantic_utilitiesalias coercion — field-alias rewriting is now cached per model class via aWeakKeyDictionary, reducing introspection overhead on hot deserialization paths.BaseHttpResponse.responseproperty — exposes the underlyinghttpx.Responseobject directly from anyHttpResponseorAsyncHttpResponseinstance.See full changelog