Skip to content

feat(scheduler): typed email task body, module enable / disable send PUT - #26

Merged
Domantas merged 3 commits into
mainfrom
feat/scheduler-typed-task
Oct 4, 2026
Merged

Domantas merged 3 commits into
mainfrom
feat/scheduler-typed-task

Conversation

@Domantas

@Domantas Domantas commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Scheduler: module enable / disable are PUT, real route tests, working docs

  • enable_scheduler / disable_scheduler (sync and async) now send PUT /{version}/scheduler/enable|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: the SDK takes plain keyword arguments by design).
  • tests/hub/test_scheduler.py used to check only the verb and an https prefix. 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 with task.type = EmailCampaign + campaign, taskId in the body on update, and the surface size (8).
  • docs/hub/scheduler.md: module verbs fixed (said GET), 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 src clean (37 files), uv run pytest 806 passed (scheduler file: 12 passed), uv build OK. The new route tests fail on the old GET code (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

Domantas and others added 3 commits October 4, 2026 10:54
… 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>
@Domantas
Domantas merged commit 4739c92 into main Oct 4, 2026
9 checks passed
@Domantas
Domantas deleted the feat/scheduler-typed-task branch October 4, 2026 08:24
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