Skip to main content
AccountWorkspaceConnector is a per-entity junction record that tracks provenance for an Account → WorkspaceConnector association. Each row captures which connector (input or output) interacted with a given bank account, discriminated by direction, following the same document_workspace_connectors pattern. Tenant scope is inherited transitively through account.workspace and workspaceConnector.workspace — no direct workspace_pk column is stored on the junction itself. Rows are written exclusively by the connector sync pipeline and are never modified by users.
Internal object. Not currently exposed on the public REST API. The operations below describe the intended contract.

API operations

Data model

Attributes

Relationships

System-computed

  • pk — auto-increment serial primary key, internal only; never exposed on the public API.
  • created_at — set automatically via MikroORM onCreate hook (and Postgres default now()); not writable after insert.
  • updated_at — set automatically via MikroORM onCreate and onUpdate hooks; updated on every flush.
  • deleted_at — populated exclusively by soft-delete logic in the sync pipeline; no user-initiated deletion path.
  • direction — written at row creation time by the connector sync orchestrator based on the connector’s role; never changed after insert.
  • No workspace_pk column: tenant scope is resolved by traversing the account → workspace or workspaceConnector → workspace relationship, consistent with the document_workspace_connectors design precedent.
  • No UNIQUE constraint on (account_pk, workspace_connector_pk, direction) — duplicate rows are allowed by design in the current schema; deduplication is deferred to iteration 3+ per migration comments.
  • No external_id field — external object identity is deferred to a future iteration; this table records the connector pointer only.
  • Rows are created exclusively by the connector sync pipeline (connector sync writer). There is no resource PATCH endpoint for this entity.

Example

Source: apps/api/src/database/entities/AccountWorkspaceConnector.ts · domain: ingestion · tier: Infrastructure