Skip to content

feat(triggers): ai trigger methods, shared routes and exact-path tests for every host - #77

Merged
Domantas merged 2 commits into
mainfrom
feat/triggers
Nov 4, 2026
Merged

Domantas merged 2 commits into
mainfrom
feat/triggers

Conversation

@Domantas

@Domantas Domantas commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

AI trigger methods (6, sync + async) and the shared definition / pre-execute-code routes; every files / membership / payments trigger test asserts the exact /v3 path; Code and Workflow action bodies for all five hosts.

Tests: make check green, 1372 tests.
Task file: gateway docs/tasks/triggers-coverage-2026-11-04.md. Expected: minor release.

Domantas and others added 2 commits November 4, 2026 10:52
…e-code test

`hub.ai.save_ai_project_trigger`, `get_ai_project_triggers`,
`get_ai_project_trigger`, `enable_ai_project_trigger`,
`disable_ai_project_trigger`, `delete_ai_project_trigger` (sync and async) in
the generated style of the other hosts, and `hub.triggers.get_trigger_definition`
/ `test_trigger_pre_execute_code` for the two shared routes the hand-written
module lacked. The SDK has no typed trigger DTOs (every method takes
`**request`), so nothing was hand-written beside the methods.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ute of every host; Code and Workflow action bodies

The 18 files / membership / payments trigger tests asserted the verb and
url.startswith('https://') only; each now asserts the exact /v3 path with the
id filled in, an empty body for the reads, deletes and toggles, and the
trigger in the body of a save. Six AI trigger tests (sync) plus the async
sweep; definition (id in the path, type and schema on the query) and
pre-execute-code test (code and records as text in the body). A Code action
(functionRef, invocationType, config) and a Workflow action (workflowRef,
payload) go through every host's save — Schema, Files, Membership, Payments,
AI — and arrive under trigger.action as they are, with no runAsUserId.
make check: ruff, mypy, 1372 tests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Domantas
Domantas merged commit cc2bce1 into main Nov 4, 2026
8 checks passed
@Domantas
Domantas deleted the feat/triggers branch November 4, 2026 09:01
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