Repository navigation
feat(scheduler): typed email task body, module enable / disable send PUT - #26
Merged
Merged
Conversation
… task body on save_scheduler_task
enable_scheduler and disable_scheduler (sync and async) now call
PUT /{version}/scheduler/enable and PUT /{version}/scheduler/disable (the
gateway moved them off GET). save_scheduler_task's docstring names the body
fields and the task shape ({"type": "EmailCampaign", "campaign": {...}}).
No typed model added: the SDK takes plain keyword arguments by design.
Breaking: scheduler module enable / disable now send PUT (gateway changed the route).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…heduler method, sync and async tests/hub/test_scheduler.py used to check only the verb and an https prefix. Each of the 8 methods now asserts the verb, the fully-resolved path, the query string and the JSON body, for the sync and the async client; plus the save body with task.type "EmailCampaign" + campaign, taskId in the body on update, and the surface size (8). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/hub/scheduler.md listed module enable / disable as GET and had no example. It now has every method with where its parameters go, a save example (initiatorUserId, 5-field UTC cron, task type EmailCampaign + campaign with AllUsers source and templateId) and the JSON it sends, the body and task fields, "only EmailCampaign today", list / get / pause / delete and async examples, and a note that module enable / disable are PUT. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Scheduler: module enable / disable are PUT, real route tests, working docs
enable_scheduler/disable_scheduler(sync and async) now sendPUT /{version}/scheduler/enable|disable(the gateway moved them offGET).save_scheduler_task's docstring names the body fields and the task shape{"type": "EmailCampaign", "campaign": {...}}(no typed model: the SDK takes plain keyword arguments by design).tests/hub/test_scheduler.pyused to check only the verb and anhttpsprefix. Every one of the 8 methods now asserts verb + exact path + query + JSON body, for the sync and the async client; plus the save body withtask.type=EmailCampaign+campaign,taskIdin the body on update, and the surface size (8).docs/hub/scheduler.md: module verbs fixed (saidGET), where every parameter goes, a working save example (initiatorUserId, 5-field UTC cron, EmailCampaign task with AllUsers + templateId) with the JSON it sends, "only EmailCampaign today", list / get / pause / delete and async examples.Tests:
uv run ruff check .clean,uv run mypy srcclean (37 files),uv run pytest806 passed (scheduler file: 12 passed),uv buildOK. The new route tests fail on the oldGETcode (checked).Breaking: scheduler module enable / disable now send PUT (gateway changed the route).
Expected next version: v3.6.0 (minor; major frozen).
🤖 Generated with Claude Code