Skip to content

feat: Integrations model + HTTP_REQUEST workflow step type#18

Merged
pel19072 merged 3 commits intodevelopfrom
feat/integrations-http-request-step
Feb 24, 2026
Merged

feat: Integrations model + HTTP_REQUEST workflow step type#18
pel19072 merged 3 commits intodevelopfrom
feat/integrations-http-request-step

Conversation

@pel19072
Copy link
Copy Markdown
Owner

Summary

  • New Integration model (integration table) — company-scoped registry of external API connections. Stores name, base_url, auth_type (NONE / API_KEY / BEARER_TOKEN / BASIC_AUTH), and credentials JSON.
  • New IntegrationAuthType enum for the four supported auth strategies.
  • HTTP_REQUEST added to StepActionType — enables workflow steps to call external APIs.
  • Company.integrations back-reference added to the Company relationship chain (CASCADE delete).
  • IntegrationCreate/Update/Out Pydantic schemasIntegrationOut.from_orm_masked() redacts api_key, token, and password values in GET responses.
  • _resolve_template() — recursively resolves {{trigger.resource_id}}, {{trigger.after.FIELD}}, and {{steps.UUID.FIELD}} in HTTP request bodies and headers.
  • _execute_http_request() added to workflow engine — lazy-imports httpx (lives in backend-erp) and Integration; applies auth headers per auth_type; stores status_code, response_body (≤10KB), and success in WorkflowStepExecution.result.
  • Alembic migration c865c4c8e97a — creates integration table with integrationauthtype enum, and runs ALTER TYPE stepactiontype ADD VALUE IF NOT EXISTS 'HTTP_REQUEST'.

Test plan

  • GitHub Actions migration runs successfully against dev DB
  • integration table and integrationauthtype enum exist in dev DB
  • stepactiontype enum includes HTTP_REQUEST value
  • IntegrationOut.from_orm_masked() returns *** for sensitive credential keys
  • _resolve_template() correctly resolves nested {{trigger.after.field}} and {{steps.UUID.field}} patterns
  • Workflow engine executes HTTP_REQUEST step and stores result in WorkflowStepExecution.result

🤖 Generated with Claude Code

pel19072 and others added 2 commits February 22, 2026 23:26
…-type

Feat/task template linked object type
…ine HTTP execution

- Add IntegrationAuthType enum (NONE, API_KEY, BEARER_TOKEN, BASIC_AUTH)
- Add Integration model (company-scoped, stores base_url + credentials JSON)
- Add HTTP_REQUEST value to StepActionType enum
- Add Company.integrations back-reference relationship
- Add IntegrationCreate/Update/Out Pydantic schemas with credential masking
- Add _resolve_template() for {{trigger.field}} / {{steps.UUID.field}} syntax
- Add _execute_http_request() to workflow engine (sync httpx, lazy imports)
- Alembic migration: create integration table + ALTER TYPE stepactiontype ADD VALUE

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- New Alembic revision d4e5f6a7b8c9 (chained from integration table
  migration c865c4c8e97a): inserts integrations.create/read/update/delete
  permissions and assigns them to ADMIN and MANAGER roles
  (all inserts are ON CONFLICT DO NOTHING — idempotent)
- Update rbac_seed.py to include integrations.* permissions so
  fresh database initializations also receive them

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pel19072 pel19072 merged commit 30b6c49 into develop Feb 24, 2026
2 checks passed
@pel19072 pel19072 deleted the feat/integrations-http-request-step branch February 28, 2026 02:14
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